Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

RawDataMcCnv Class Reference

#include <RawDataMcCnv.h>

Inheritance diagram for RawDataMcCnv:

RawDataBaseCnv RawDataBaseCnv Converter< Ty1, Ty2 > Converter< Ty1, Ty2 > Converter< Ty1, Ty2 > Converter< Ty1, Ty2 > List of all members.

Public Types

typedef Ty2 destination
typedef Ty2 destination
typedef Ty1 source
typedef Ty1 source

Public Member Functions

StatusCode createObj (IOpaqueAddress *pAddr, DataObject *&pObj)
StatusCode createObj (IOpaqueAddress *pAddr, DataObject *&pObj)
virtual StatusCode createRep (DataObject *pObj, IOpaqueAddress *&pAddr)
 Convert the transient object to the requested representation.
virtual StatusCode createRep (DataObject *pObj, IOpaqueAddress *&pAddr)
 Convert the transient object to the requested representation.
void declareObject (const std::string &fullPath, const CLID &clid, const std::string &bank, long par=0)
 Store TDS path to link a particular converter to an object on the TDS.
void declareObject (const std::string &fullPath, const CLID &clid, const std::string &bank, long par=0)
 Store TDS path to link a particular converter to an object on the TDS.
virtual StatusCode fillRepRefs (IOpaqueAddress *pAddress, DataObject *pObject)
 Resolve the references of the converted object.
virtual StatusCode fillRepRefs (IOpaqueAddress *pAddress, DataObject *pObject)
 Resolve the references of the converted object.
virtual StatusCode finalize ()
virtual StatusCode finalize ()
StatusCode initialize ()
StatusCode initialize ()
destinationoperator (const source &) const
destinationoperator (const source &) const
virtual long repSvcType () const
virtual long repSvcType () const
virtual StatusCode updateObj (IOpaqueAddress *, DataObject *)
 override the RawDataBaseCnv version
virtual StatusCode updateObj (IOpaqueAddress *, DataObject *)
 override the RawDataBaseCnv version
virtual StatusCode updateRep (IOpaqueAddress *pAddress, DataObject *pObject)
 Update the converted representation of a transient object.
virtual StatusCode updateRep (IOpaqueAddress *pAddress, DataObject *pObject)
 Update the converted representation of a transient object.
virtual StatusCode updateRepRefs (IOpaqueAddress *pAddress, DataObject *pObject)
 Update the references of an already converted object.
virtual StatusCode updateRepRefs (IOpaqueAddress *pAddress, DataObject *pObject)
 Update the references of an already converted object.

Static Public Member Functions

const CLID & classID ()
const CLID & classID ()
const unsigned char storageType ()
const unsigned char storageType ()

Protected Member Functions

virtual destinationconvert (const source &) const =0
virtual destinationconvert (const source &) const =0
 RawDataMcCnv (ISvcLocator *svc)
 RawDataMcCnv (ISvcLocator *svc)

Protected Attributes

IRawDataCnvSvcm_CnvSvc
 Pointer to event conversion service interface.
IRawDataCnvSvcm_CnvSvc
 Pointer to event conversion service interface.
std::vector< IRawDataCnvSvc::Leafm_leaves
 Leaf objects giving the locations of the objects in the data store.
std::vector< IRawDataCnvSvc::Leafm_leaves
 Leaf objects giving the locations of the objects in the data store.

Private Attributes

IRawDataInputSvcm_inputSvc
IRawDataInputSvcm_inputSvc
IRawDataCnvSvcm_RawDataAccess
 Define the interface to raw data cnv.
IRawDataCnvSvcm_RawDataAccess
 Define the interface to raw data cnv.

Friends

class CnvFactory<RawDataMcCnv>

Member Typedef Documentation

template<class Ty1, class Ty2>
typedef Ty2 Converter< Ty1, Ty2 >::destination [inherited]
 

template<class Ty1, class Ty2>
typedef Ty2 Converter< Ty1, Ty2 >::destination [inherited]
 

template<class Ty1, class Ty2>
typedef Ty1 Converter< Ty1, Ty2 >::source [inherited]
 

template<class Ty1, class Ty2>
typedef Ty1 Converter< Ty1, Ty2 >::source [inherited]
 


Constructor & Destructor Documentation

RawDataMcCnv::RawDataMcCnv ISvcLocator *  svc  )  [protected]
 

00027                                            : 
00028 RawDataBaseCnv(PACKEDRAWEVENT_StorageType, classID(), svc) 
00029 {
00030   //init();
00031 }

RawDataMcCnv::RawDataMcCnv ISvcLocator *  svc  )  [protected]
 


Member Function Documentation

const CLID& RawDataMcCnv::classID  )  [static]
 

Reimplemented from RawDataBaseCnv.

const CLID & RawDataMcCnv::classID  )  [static]
 

Reimplemented from RawDataBaseCnv.

00036 {
00037   return CLID_McEvent;
00038 }

template<class Ty1, class Ty2>
virtual destination* Converter< Ty1, Ty2 >::convert const source  )  const [protected, pure virtual, inherited]
 

template<class Ty1, class Ty2>
virtual destination* Converter< Ty1, Ty2 >::convert const source  )  const [protected, pure virtual, inherited]
 

StatusCode RawDataMcCnv::createObj IOpaqueAddress *  pAddr,
DataObject *&  pObj
 

StatusCode RawDataMcCnv::createObj IOpaqueAddress *  pAddr,
DataObject *&  pObj
 

00105 {
00106   //MsgStream log(msgSvc(), "RawDataMcCnv");
00107 
00108   McEvent *mcEvent = new McEvent;
00109   pObj = mcEvent;
00110    
00111   return StatusCode::SUCCESS; 
00112 
00113 }

virtual StatusCode RawDataMcCnv::createRep DataObject *  pObj,
IOpaqueAddress *&  pAddr
[virtual]
 

Convert the transient object to the requested representation.

Reimplemented from RawDataBaseCnv.

StatusCode RawDataMcCnv::createRep DataObject *  pObj,
IOpaqueAddress *&  pAddr
[virtual]
 

Convert the transient object to the requested representation.

Reimplemented from RawDataBaseCnv.

00116 {
00117    // convert PixelRaw in the container into ByteStream
00118   //MsgStream log(messageService(), "RawDataMcCnv");
00119   
00120   std::string nm = pObj->registry()->name();
00121   
00122   RawDataAddress* addr = new RawDataAddress(classID(), nm, "");
00123 
00124   pAddr = addr;
00125   
00126   return StatusCode::SUCCESS; 
00127 }

void RawDataBaseCnv::declareObject const std::string &  fullPath,
const CLID &  clid,
const std::string &  bank,
long  par = 0
[inherited]
 

Store TDS path to link a particular converter to an object on the TDS.

void RawDataBaseCnv::declareObject const std::string &  fullPath,
const CLID &  clid,
const std::string &  bank,
long  par = 0
[inherited]
 

Store TDS path to link a particular converter to an object on the TDS.

00082                                                                       {
00083     // Purpose and Method:  Save the path on the TDS, in the m_leaves vector, 
00084     //   corresponding to the DataObject that the converter handles.
00085     // m_leaves.push_back(IRawDataCnvSvc::Leaf(path, cl, bank, par));
00086 }

virtual StatusCode RawDataBaseCnv::fillRepRefs IOpaqueAddress *  pAddress,
DataObject *  pObject
[virtual, inherited]
 

Resolve the references of the converted object.

StatusCode RawDataBaseCnv::fillRepRefs IOpaqueAddress *  pAddress,
DataObject *  pObject
[virtual, inherited]
 

Resolve the references of the converted object.

00030                                                  {
00031     // Purpose and Method:  Resolve the references of the converted object.
00032     //     It is expected that derived classes will override this method.
00033     return StatusCode::SUCCESS;
00034 }

virtual StatusCode RawDataBaseCnv::finalize  )  [virtual, inherited]
 

StatusCode RawDataBaseCnv::finalize  )  [virtual, inherited]
 

00073                                       {
00074     if ( m_CnvSvc )     {
00075         m_CnvSvc->release();
00076         m_CnvSvc = 0;
00077     }
00078     return Converter::finalize();
00079 }

StatusCode RawDataMcCnv::initialize  ) 
 

Reimplemented from RawDataBaseCnv.

StatusCode RawDataMcCnv::initialize  ) 
 

Reimplemented from RawDataBaseCnv.

00041 {
00042     std::string PackedRawDataCnvSvc_Name("PackedRawDataCnvSvc");
00043     std::string RawDataInputSvc_Name("RawDataInputSvc");
00044     std::string RawDataMcCnv_Name("RawDataMcCnv");
00045     
00046     // for Mutil-thread by tianhl
00047     ConversionSvc*  pCnvSvc = 0;
00048     if (pCnvSvc = dynamic_cast<ConversionSvc*>(conversionSvc())){
00049       if  (isGaudiThreaded(pCnvSvc->name())){
00050         PackedRawDataCnvSvc_Name += getGaudiThreadIDfromName(pCnvSvc->name());
00051         RawDataInputSvc_Name += getGaudiThreadIDfromName(pCnvSvc->name());
00052         RawDataMcCnv_Name += getGaudiThreadIDfromName(pCnvSvc->name());
00053       }
00054     }
00055     
00056 
00057   MsgStream log(messageService(), RawDataMcCnv_Name.c_str());
00058 
00059   StatusCode sc = RawDataBaseCnv::initialize();
00060   if (StatusCode::SUCCESS != sc) {
00061     log << MSG::ERROR << "RawDataBaseCnv: Cant initialize PackedRawDataCnvSvc" << endreq;
00062     return sc;
00063   }
00064 
00065   // Check RawDataCnvSvc
00066   IService* isvc = 0;
00067   sc = serviceLocator()->service(PackedRawDataCnvSvc_Name.c_str(), isvc, true);
00068   if (sc != StatusCode::SUCCESS) {
00069     log << MSG::ERROR << "Cant get PackedRawDataCnvSvc" << endreq;
00070   }
00071 
00072   m_RawDataAccess = dynamic_cast<PackedRawDataCnvSvc*> (isvc); 
00073   if (m_RawDataAccess  == 0 ) {
00074     log << MSG::ERROR << "RawDataMdcCnv: Cant cast to RawDataCnvSvc " << endreq; 
00075     return StatusCode::FAILURE;
00076   }
00077 
00078   sc = serviceLocator()->getService(RawDataInputSvc_Name.c_str(), isvc);
00079   if (sc != StatusCode::SUCCESS ) {
00080     log << MSG::WARNING << "Cant get RawDataInputSvc " << endreq;
00081     return sc ;
00082   }
00083 
00084   m_inputSvc = dynamic_cast<RawDataInputSvc*> (isvc);
00085   if (m_inputSvc == 0 ) {
00086     log << MSG::ERROR << "Cant cast to RawDataInputSvc " << endreq;
00087     return StatusCode::FAILURE ;
00088   }
00089 
00090   return StatusCode::SUCCESS; 
00091 }

template<class Ty1, class Ty2>
destination* Converter< Ty1, Ty2 >::operator const source  )  const [inline, inherited]
 

template<class Ty1, class Ty2>
destination* Converter< Ty1, Ty2 >::operator const source  )  const [inline, inherited]
 

virtual long RawDataMcCnv::repSvcType  )  const [inline, virtual]
 

Reimplemented from RawDataBaseCnv.

00045                                    {
00046        return PACKEDRAWEVENT_StorageType;
00047    }

virtual long RawDataMcCnv::repSvcType  )  const [inline, virtual]
 

Reimplemented from RawDataBaseCnv.

00045                                    {
00046        return PACKEDRAWEVENT_StorageType;
00047    }

const unsigned char RawDataMcCnv::storageType  )  [inline, static]
 

Reimplemented from RawDataBaseCnv.

00049                                             {
00050        return PACKEDRAWEVENT_StorageType;
00051    }

const unsigned char RawDataMcCnv::storageType  )  [inline, static]
 

Reimplemented from RawDataBaseCnv.

00049                                             {
00050        return PACKEDRAWEVENT_StorageType;
00051    }

virtual StatusCode RawDataMcCnv::updateObj IOpaqueAddress *  ,
DataObject * 
[virtual]
 

override the RawDataBaseCnv version

StatusCode RawDataMcCnv::updateObj IOpaqueAddress *  ,
DataObject * 
[virtual]
 

override the RawDataBaseCnv version

00094                                                                           {
00095   // Purpose and Method:  This method does nothing other than announce it has
00096   //   been called.
00097 
00098   //MsgStream log(msgSvc(), "RawDataMcCnv");
00099   //log << MSG::DEBUG << "RawDataMcCnv::updateObj" << endreq;
00100   return Converter::updateObj(pAddr, pObj);
00101 }

virtual StatusCode RawDataBaseCnv::updateRep IOpaqueAddress *  pAddress,
DataObject *  pObject
[virtual, inherited]
 

Update the converted representation of a transient object.

StatusCode RawDataBaseCnv::updateRep IOpaqueAddress *  pAddress,
DataObject *  pObject
[virtual, inherited]
 

Update the converted representation of a transient object.

00037                                               {
00038     // Purpose and Method:  Update the converted representation of a transient 
00039     //     object.  It is expected that derived classes will override this.
00040     return StatusCode::SUCCESS;
00041 }

virtual StatusCode RawDataBaseCnv::updateRepRefs IOpaqueAddress *  pAddress,
DataObject *  pObject
[virtual, inherited]
 

Update the references of an already converted object.

StatusCode RawDataBaseCnv::updateRepRefs IOpaqueAddress *  pAddress,
DataObject *  pObject
[virtual, inherited]
 

Update the references of an already converted object.

00044                                                 {
00045     // Purpose and Method:  Update the references of an already converted object.
00046     //   It is expected that derived classes will override this method.
00047     return StatusCode::SUCCESS;
00048 }


Friends And Related Function Documentation

CnvFactory<RawDataMcCnv> [friend]
 


Member Data Documentation

IRawDataCnvSvc* RawDataBaseCnv::m_CnvSvc [protected, inherited]
 

Pointer to event conversion service interface.

IRawDataCnvSvc* RawDataBaseCnv::m_CnvSvc [protected, inherited]
 

Pointer to event conversion service interface.

IRawDataInputSvc* RawDataMcCnv::m_inputSvc [private]
 

IRawDataInputSvc* RawDataMcCnv::m_inputSvc [private]
 

std::vector<IRawDataCnvSvc::Leaf> RawDataBaseCnv::m_leaves [protected, inherited]
 

Leaf objects giving the locations of the objects in the data store.

std::vector<IRawDataCnvSvc::Leaf> RawDataBaseCnv::m_leaves [protected, inherited]
 

Leaf objects giving the locations of the objects in the data store.

IRawDataCnvSvc* RawDataMcCnv::m_RawDataAccess [private]
 

Define the interface to raw data cnv.

IRawDataCnvSvc* RawDataMcCnv::m_RawDataAccess [private]
 

Define the interface to raw data cnv.


The documentation for this class was generated from the following files:
Generated on Wed Feb 2 16:42:35 2011 for BOSS6.5.5 by  doxygen 1.3.9.1