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

RawDataEmcDigiCnv Class Reference

#include <RawDataEmcDigiCnv.h>

Inheritance diagram for RawDataEmcDigiCnv:

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
 RawDataEmcDigiCnv (ISvcLocator *svc)
 RawDataEmcDigiCnv (ISvcLocator *svc)
 ~RawDataEmcDigiCnv ()
 ~RawDataEmcDigiCnv ()

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

EmcConverterm_cnv
 Emc converter for unpacking or packing data.
EmcConverterm_cnv
 Emc converter for unpacking or packing data.
IRawDataInputSvcm_inputSvc
IRawDataInputSvcm_inputSvc
PackedRawDataCnvSvcm_RawDataAccess
 Define the interface to raw data cnv.
PackedRawDataCnvSvcm_RawDataAccess
 Define the interface to raw data cnv.

Friends

class CnvFactory<RawDataEmcDigiCnv>

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

RawDataEmcDigiCnv::RawDataEmcDigiCnv ISvcLocator *  svc  )  [protected]
 

00033                                                      : 
00034 RawDataBaseCnv(PACKEDRAWEVENT_StorageType, classID(), svc) 
00035 {
00036 }

RawDataEmcDigiCnv::~RawDataEmcDigiCnv  )  [protected]
 

00037                                      {
00038    EmcConverter::destroy();
00039 }

RawDataEmcDigiCnv::RawDataEmcDigiCnv ISvcLocator *  svc  )  [protected]
 

RawDataEmcDigiCnv::~RawDataEmcDigiCnv  )  [protected]
 


Member Function Documentation

const CLID& RawDataEmcDigiCnv::classID  )  [static]
 

Reimplemented from RawDataBaseCnv.

const CLID & RawDataEmcDigiCnv::classID  )  [static]
 

Reimplemented from RawDataBaseCnv.

00044 {
00045    return CLID_EmcDigiCol;
00046 }

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 RawDataEmcDigiCnv::createObj IOpaqueAddress *  pAddr,
DataObject *&  pObj
 

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

00111 {
00112    MsgStream log(msgSvc(), "RawDataEmcDigiCnv");
00113 
00114    // Purpose and Method:  This converter will create an empty EmcDigiCol on
00115    //   the TDS.
00116    EmcDigiCol *digiCol = new EmcDigiCol;
00117    pObj = digiCol;
00118 
00119    RAWEVENT *evt = m_inputSvc->currentEvent(); 
00120    if (evt == NULL) {
00121      cout << "RawDataEmcDigiCnv::createObj can't get event!" << endl; 
00122      return StatusCode::FAILURE;
00123    }
00124 
00125    const BufferHolder& emcBuf = evt->getEmcBuf();
00126 
00127    return m_cnv->convert(emcBuf, digiCol); 
00128 }

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

Convert the transient object to the requested representation.

Reimplemented from RawDataBaseCnv.

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

Convert the transient object to the requested representation.

Reimplemented from RawDataBaseCnv.

00131 {
00132   // convert PixelRaw in the container into ByteStream
00133   MsgStream log(msgSvc(), "RawDataEmcDigiCnv");
00134 
00135   WriteRawEvent*& re = m_RawDataAccess->getRawEvent(); 
00136   if (re == 0) {
00137     log << " get RawEvent failed !" << endreq;
00138     return StatusCode::FAILURE; 
00139   }
00140 
00141   SmartDataPtr<EmcDigiCol> digiCol(dataProvider(), EventModel::Digi::EmcDigiCol);
00142   if (digiCol == 0) {
00143     log << "no EmcDigiCol found" << endreq;
00144     return StatusCode::FAILURE;
00145   }
00146   /*
00147   else {
00148     log << MSG::INFO << endreq << "Detailed dump of 1st event: " << endreq << endreq;
00149     int ndigi = 0;
00150     EmcDigiCol::const_iterator pEmcDigi = digiCol->begin();
00151     for (pEmcDigi; pEmcDigi!= digiCol->end(); pEmcDigi++) {
00152       log <<MSG::INFO << "Digi " << ndigi++ << " ";
00153       // output the digi proper:  " << digi " no longer works because
00154       // "digi" now returns an integer sort order
00155       (**pEmcDigi).fillStream(log.stream());
00156       log << endreq;
00157     }
00158   }
00159   */
00160 
00161   return m_cnv->convert(digiCol, re);
00162 }

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 RawDataEmcDigiCnv::initialize  ) 
 

Reimplemented from RawDataBaseCnv.

StatusCode RawDataEmcDigiCnv::initialize  ) 
 

Reimplemented from RawDataBaseCnv.

00049 {
00050    std::string PackedRawDataCnvSvc_Name("PackedRawDataCnvSvc");
00051    std::string RawDataInputSvc_Name("RawDataInputSvc");
00052    std::string RawDataEmcDigiCnv_Name("RawDataEmcDigiCnv");
00053    //std::string RawDataProviderSvc_Name("RawDataProviderSvc");
00054 
00055    // for Mutil-thread by tianhl
00056    ConversionSvc*  pCnvSvc = 0;
00057    if (pCnvSvc = dynamic_cast<ConversionSvc*>(conversionSvc())){
00058       if  (isGaudiThreaded(pCnvSvc->name())){
00059          PackedRawDataCnvSvc_Name += getGaudiThreadIDfromName(pCnvSvc->name());
00060          RawDataInputSvc_Name += getGaudiThreadIDfromName(pCnvSvc->name());
00061          RawDataEmcDigiCnv_Name += getGaudiThreadIDfromName(pCnvSvc->name());
00062          //RawDataProviderSvc_Name += getGaudiThreadIDfromName(pCnvSvc->name());
00063       }
00064    }
00065    // for Mutil-thread by tianhl
00066    MsgStream log(msgSvc(), RawDataEmcDigiCnv_Name.c_str());
00067 
00068    StatusCode sc = RawDataBaseCnv::initialize();
00069    if ( sc.isFailure() ) {
00070       return sc;
00071    }
00072 
00073    // Check RawDataCnvSvc
00074    IService* isvc = 0;
00075    StatusCode status = serviceLocator()->service(PackedRawDataCnvSvc_Name.c_str(), isvc, true);
00076    m_RawDataAccess = dynamic_cast<PackedRawDataCnvSvc*> (isvc); 
00077    if(m_RawDataAccess  == 0 ) {
00078       log<<MSG::ERROR<< "  RawDataCnv: Cant cast to  RawDataCnvSvc " <<endreq; 
00079       return StatusCode::FAILURE ;
00080    }
00081 
00082    IService* svc ;
00083    sc = serviceLocator()->getService(RawDataInputSvc_Name.c_str(), svc);
00084    //if(sc != StatusCode::SUCCESS ) {
00085    //   log<<MSG::WARNING << " Cant get RawDataInputSvc " <<endreq;
00086    //   return sc ;
00087    //}
00088    m_inputSvc = dynamic_cast<RawDataInputSvc*> (svc);
00089    if ( m_inputSvc == 0 ) {
00090       log<<MSG::WARNING<< " Cant cast to  RawDataInputSvc " <<endreq;
00091       return StatusCode::FAILURE ;
00092    }
00093 
00094    m_cnv = EmcConverter::instance( m_inputSvc->runMode() );
00095 
00096    return StatusCode::SUCCESS; 
00097 }

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 RawDataEmcDigiCnv::repSvcType  )  const [inline, virtual]
 

Reimplemented from RawDataBaseCnv.

00044                                    {
00045        return PACKEDRAWEVENT_StorageType;
00046    }

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

Reimplemented from RawDataBaseCnv.

00044                                    {
00045        return PACKEDRAWEVENT_StorageType;
00046    }

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

Reimplemented from RawDataBaseCnv.

00048                                             {
00049        return PACKEDRAWEVENT_StorageType;
00050    }

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

Reimplemented from RawDataBaseCnv.

00048                                             {
00049        return PACKEDRAWEVENT_StorageType;
00050    }

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

override the RawDataBaseCnv version

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

override the RawDataBaseCnv version

00100                                                                                {
00101     // Purpose and Method:  This method does nothing other than announce it has
00102     //   been called.
00103 
00104     MsgStream log(msgSvc(), "RawDataEmcDigiCnv");
00105     log << MSG::DEBUG << "RawDataEmcDigiCnv::updateObj" << endreq;
00106     return Converter::updateObj(pAddr, pObj);
00107 }

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<RawDataEmcDigiCnv> [friend]
 


Member Data Documentation

EmcConverter* RawDataEmcDigiCnv::m_cnv [private]
 

Emc converter for unpacking or packing data.

EmcConverter* RawDataEmcDigiCnv::m_cnv [private]
 

Emc converter for unpacking or packing data.

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* RawDataEmcDigiCnv::m_inputSvc [private]
 

IRawDataInputSvc* RawDataEmcDigiCnv::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.

PackedRawDataCnvSvc* RawDataEmcDigiCnv::m_RawDataAccess [private]
 

Define the interface to raw data cnv.

PackedRawDataCnvSvc* RawDataEmcDigiCnv::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:18 2011 for BOSS6.5.5 by  doxygen 1.3.9.1