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

RawDataMdcDigiCnv Class Reference

#include <RawDataMdcDigiCnv.h>

Inheritance diagram for RawDataMdcDigiCnv:

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

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

MdcConverterm_cnv
 MdcConverter for packing or unpacking data.
MdcConverterm_cnv
 MdcConverter for packing or unpacking data.
IRawDataInputSvcm_inputSvc
IRawDataInputSvcm_inputSvc
PackedRawDataCnvSvcm_RawDataAccess
 Define the interface to raw data cnv.
PackedRawDataCnvSvcm_RawDataAccess
 Define the interface to raw data cnv.
int m_runFrom
int m_runTo

Friends

class CnvFactory<RawDataMdcDigiCnv>

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

RawDataMdcDigiCnv::RawDataMdcDigiCnv ISvcLocator *  svc  )  [protected]
 

00032                                                      : 
00033 RawDataBaseCnv(PACKEDRAWEVENT_StorageType, classID(), svc) 
00034 {
00035    PropertyMgr m_propMgr;
00036    m_propMgr.declareProperty("ExWireFromRun", m_runFrom = 0 );  
00037    m_propMgr.declareProperty("ExWireToRun",   m_runTo = 999999);
00038 
00039    IJobOptionsSvc* jobSvc; 
00040    serviceLocator()->service("JobOptionsSvc", jobSvc);
00041    jobSvc->setMyProperties("RawDataMdcDigiCnv", &m_propMgr);
00042 }

RawDataMdcDigiCnv::~RawDataMdcDigiCnv  )  [protected]
 

00045 {
00046    MdcConverter::destroy();
00047 }

RawDataMdcDigiCnv::RawDataMdcDigiCnv ISvcLocator *  svc  )  [protected]
 

RawDataMdcDigiCnv::~RawDataMdcDigiCnv  )  [protected]
 


Member Function Documentation

const CLID& RawDataMdcDigiCnv::classID  )  [static]
 

Reimplemented from RawDataBaseCnv.

const CLID & RawDataMdcDigiCnv::classID  )  [static]
 

Reimplemented from RawDataBaseCnv.

00052 {
00053    return CLID_MdcDigiCol;
00054 }

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

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

00120 {
00121   //MsgStream log(msgSvc(), "RawDataMdcDigiCnv");
00122 
00123   // Purpose and Method:  This converter will create an empty MdcDigiCol on
00124   //   the TDS.
00125   MdcDigiCol *digiCol = new MdcDigiCol;
00126   pObj = digiCol;
00127 
00128   RAWEVENT* evt = m_inputSvc->currentEvent(); 
00129 
00130   if (evt == NULL) {
00131     //log << MSG::ERROR << "RawDataMdcDigiCnv::createObj has event!" << endreq; 
00132     return StatusCode::FAILURE;
00133   }
00134 
00135   int runId = evt->eventHeader().run_number();
00136   m_cnv->setRunId(runId);
00137 
00138   const BufferHolder& mdcBuf = evt->getMdcBuf();
00139 
00140   return m_cnv->convert(mdcBuf, digiCol);
00141 }

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

Convert the transient object to the requested representation.

Reimplemented from RawDataBaseCnv.

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

Convert the transient object to the requested representation.

Reimplemented from RawDataBaseCnv.

00144 {
00145   // convert PixelRaw in the container into ByteStream
00146   MsgStream log(messageService(), "RawDataMdcDigiCnv");
00147 
00148   WriteRawEvent*& re = m_RawDataAccess->getRawEvent(); 
00149   if (re == 0) {
00150     log << " get RawEvent failed !" << endreq;
00151     return StatusCode::FAILURE; 
00152   }
00153 
00154   SmartDataPtr<MdcDigiCol> digiCol(dataProvider(), EventModel::Digi::MdcDigiCol);
00155   if (digiCol == 0) {
00156     log << "no MdcDigiCol found" << endreq;
00157     return StatusCode::FAILURE;
00158   }
00159   /*
00160   else {
00161     log << MSG::DEBUG << endreq << "Detailed dump of 1st event: " << endreq << endreq;
00162     int ndigi = 0;
00163     MdcDigiCol::const_iterator pMdcDigi = digiCol->begin();
00164     for (pMdcDigi; pMdcDigi!= digiCol->end(); pMdcDigi++) {
00165       log <<MSG::INFO << "Digi " << ndigi++ << " ";
00166       // output the digi proper:  " << digi " no longer works because
00167       // "digi" now returns an integer sort order
00168       (**pMdcDigi).fillStream(log.stream());
00169       log << endreq;
00170     }
00171   }
00172   */
00173 
00174   return m_cnv->convert(digiCol, re);
00175 }

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

Reimplemented from RawDataBaseCnv.

StatusCode RawDataMdcDigiCnv::initialize  ) 
 

Reimplemented from RawDataBaseCnv.

00057 {
00058    std::string PackedRawDataCnvSvc_Name("PackedRawDataCnvSvc");
00059    std::string RawDataInputSvc_Name("RawDataInputSvc");
00060    std::string RawDataMdcDigiCnv_Name("RawDataMdcDigiCnv");
00061 
00062    // for Mutil-thread by tianhl
00063    ConversionSvc*  pCnvSvc = 0;
00064    if (pCnvSvc = dynamic_cast<ConversionSvc*>(conversionSvc())){
00065       if  (isGaudiThreaded(pCnvSvc->name())){
00066          PackedRawDataCnvSvc_Name += getGaudiThreadIDfromName(pCnvSvc->name());
00067          RawDataInputSvc_Name += getGaudiThreadIDfromName(pCnvSvc->name());
00068          RawDataMdcDigiCnv_Name += getGaudiThreadIDfromName(pCnvSvc->name());
00069       }
00070    }
00071 
00072 
00073    StatusCode sc = RawDataBaseCnv::initialize();
00074    if ( sc.isFailure() ) {
00075       return sc;
00076    }
00077 
00078    MsgStream log(messageService(), RawDataMdcDigiCnv_Name.c_str());
00079 
00080    // Check RawDataCnvSvc
00081    IService* isvc = 0;
00082    StatusCode status = serviceLocator()->service(PackedRawDataCnvSvc_Name.c_str(), isvc, true);
00083    m_RawDataAccess = dynamic_cast<PackedRawDataCnvSvc*> (isvc); 
00084    if(m_RawDataAccess  == 0 ) {
00085       log<<MSG::ERROR<< "  RawDataMdcCnv: Cant cast to  RawDataCnvSvc " <<endreq; 
00086       return StatusCode::FAILURE ;
00087    }
00088 
00089    IService* svc ;
00090    sc = serviceLocator()->getService(RawDataInputSvc_Name.c_str(), svc);
00091    //if ( sc.isFailure() ) {
00092    //   log<<MSG::WARNING << " Cant get RawDataInputSvc " <<endreq;
00093    //   return sc ;
00094    //}
00095    m_inputSvc = dynamic_cast<RawDataInputSvc*> (svc);
00096    if(m_inputSvc == 0 ) {
00097       log<<MSG::WARNING<< " Cant cast to  RawDataInputSvc " <<endreq;
00098       return StatusCode::FAILURE ;
00099    }
00100 
00101    m_cnv = MdcConverter::instance( m_inputSvc->runMode() );
00102 
00103    m_cnv->init(m_runFrom, m_runTo);
00104 
00105    return StatusCode::SUCCESS; 
00106 }

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

Reimplemented from RawDataBaseCnv.

00046                                    {
00047           return PACKEDRAWEVENT_StorageType;
00048    }

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

Reimplemented from RawDataBaseCnv.

00046                                    {
00047           return PACKEDRAWEVENT_StorageType;
00048    }

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

Reimplemented from RawDataBaseCnv.

00050                                             {
00051        return PACKEDRAWEVENT_StorageType;
00052    }

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

Reimplemented from RawDataBaseCnv.

00050                                             {
00051        return PACKEDRAWEVENT_StorageType;
00052    }

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

override the RawDataBaseCnv version

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

override the RawDataBaseCnv version

00109                                                                                {
00110     // Purpose and Method:  This method does nothing other than announce it has
00111     //   been called.
00112 
00113     //MsgStream log(msgSvc(), "RawDataMdcDigiCnv");
00114     //log << MSG::DEBUG << "RawDataMdcDigiCnv::updateObj" << endreq;
00115     return Converter::updateObj(pAddr, pObj);
00116 }

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


Member Data Documentation

MdcConverter* RawDataMdcDigiCnv::m_cnv [private]
 

MdcConverter for packing or unpacking data.

MdcConverter* RawDataMdcDigiCnv::m_cnv [private]
 

MdcConverter for packing or unpacking 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* RawDataMdcDigiCnv::m_inputSvc [private]
 

IRawDataInputSvc* RawDataMdcDigiCnv::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* RawDataMdcDigiCnv::m_RawDataAccess [private]
 

Define the interface to raw data cnv.

PackedRawDataCnvSvc* RawDataMdcDigiCnv::m_RawDataAccess [private]
 

Define the interface to raw data cnv.

int RawDataMdcDigiCnv::m_runFrom [private]
 

int RawDataMdcDigiCnv::m_runTo [private]
 


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