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

EventCnv Class Reference

Concrete converter for the Event header stored in the TDS /Event Based on the EventCnv of GLAST. More...

#include <EventCnv.h>

Inheritance diagram for EventCnv:

RootEventBaseCnv RootEventBaseCnv 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

virtual StatusCode createRep (DataObject *pObject, IOpaqueAddress *&refpAddress)
 Convert the transient object to the requested representation.
void declareObject (const std::string &fullPath, const CLID &clid, const std::string &treename, const std::string &branchname)
 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 &treename, const std::string &branchname)
 Store TDS path to link a particular converter to an object on the TDS.
virtual StatusCode fillObjRefs (IOpaqueAddress *pAddress, DataObject *pObject)
 Resolve the references of the converted object.
virtual StatusCode fillObjRefs (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 fillRepRefs (IOpaqueAddress *pAddress, DataObject *pObject)
 Resolve the references of the converted object.
virtual StatusCode finalize ()
virtual StatusCode finalize ()
TObject * getReadObject () const
 get the object to be read
TObject * getReadObject () const
 get the object to be read
virtual StatusCode initialize ()
virtual StatusCode initialize ()
destinationoperator (const source &) const
destinationoperator (const source &) const
virtual long repSvcType () const
virtual long repSvcType () const
virtual ~EventCnv ()
virtual ~EventCnv ()

Static Public Member Functions

const CLID & classID ()
const CLID & classID ()
const unsigned char storageType ()
 Storage type and class ID.
const unsigned char storageType ()
 Storage type and class ID.

Protected Member Functions

virtual destinationconvert (const source &) const =0
virtual destinationconvert (const source &) const =0
StatusCode createObj (IOpaqueAddress *addr, DataObject *&refpObject)
 transform from ROOT to TDS
StatusCode createObj (IOpaqueAddress *addr, DataObject *&refpObject)
 transform from ROOT to TDS
StatusCode createRep (DataObject *obj, RootAddress *addr)
 transform from TDS to ROOT
StatusCode createRep (DataObject *obj, RootAddress *addr)
 transform from TDS to ROOT
StatusCode DataObjectToTObject (DataObject *obj, RootAddress *addr)
 do the concrete transformation from TDS to ROOT
StatusCode DataObjectToTObject (DataObject *obj, RootAddress *addr)
 do the concrete transformation from TDS to ROOT
 EventCnv (ISvcLocator *svc)
 EventCnv (ISvcLocator *svc)
virtual StatusCode TObjectToDataObject (DataObject *&dat)
 do the concrete transformation from ROOT to TDS
virtual StatusCode TObjectToDataObject (DataObject *&dat)
 do the concrete transformation from ROOT to TDS

Protected Attributes

CLID CLID_top
 the CLID of the upper converter if any
std::vector< void * > m_adresses
 each converter knows the corresponding adresses
std::vector< void * > m_adresses
 each converter knows the corresponding adresses
int m_branchNr
 the branchNr of this converter for writing
int m_branchNrDst
int m_branchNrEvtHeader
int m_branchNrEvtRec
int m_branchNrMc
int m_branchNrRecon
TArrayS * m_branchNumbers
 array with number of branches for reading
TArrayS * m_branchNumbers
 array with number of branches for reading
RootCnvSvcm_cnvSvc
RootCnvSvcm_cnvSvc
commonData m_common
std::string m_currentFileName
IDataProviderSvc * m_eds
 pointer to eventdataservice
IDataProviderSvc * m_eds
 pointer to eventdataservice
RootEvtSelectorm_evtsel
RootEvtSelectorm_evtsel
std::vector< RootCnvSvc::Leafm_leaves
std::vector< RootCnvSvc::Leafm_leaves
TObject * m_objRead
 the object that was read
TObject * m_objRead
 the object that was read
std::string m_rootBranchname
 root branchname (may be concatenated of severals)
RootInterfacem_rootInterface
 pointer to the RootInterface
RootInterfacem_rootInterface
 pointer to the RootInterface
std::string m_rootTreename
 each converter knows it's treename

Friends

class CnvFactory<EventCnv>

Detailed Description

Concrete converter for the Event header stored in the TDS /Event Based on the EventCnv of GLAST.


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

virtual EventCnv::~EventCnv  )  [inline, virtual]
 

00031 { };

EventCnv::EventCnv ISvcLocator *  svc  )  [protected]
 

00025 : RootEventBaseCnv(classID(), svc)
00026 {
00027 // Here we associate this converter with the /Event path on the TDS.
00028   //declareObject("/Event", objType(), "","");
00029 
00030 
00031     MsgStream log(msgSvc(), "EventCnv");
00032     log << MSG::DEBUG << "EventCnv::EventCnv()" << endreq;
00033 }

virtual EventCnv::~EventCnv  )  [inline, virtual]
 

00031 { };

EventCnv::EventCnv ISvcLocator *  svc  )  [protected]
 


Member Function Documentation

const CLID& EventCnv::classID  )  [inline, static]
 

00027   {
00028     return CLID_Event;
00029   }

const CLID& EventCnv::classID  )  [inline, static]
 

00027   {
00028     return CLID_Event;
00029   }

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 EventCnv::createObj IOpaqueAddress *  addr,
DataObject *&  refpObject
[protected, virtual]
 

transform from ROOT to TDS

Reimplemented from RootEventBaseCnv.

StatusCode EventCnv::createObj IOpaqueAddress *  addr,
DataObject *&  refpObject
[protected, virtual]
 

transform from ROOT to TDS

Reimplemented from RootEventBaseCnv.

00035                                                                             {
00036     // Purpose and Method:  This converter creates an  Event on
00037     // the TDS. Registering was already done in GlastEventSelector
00038     // Information is dummy as long as no real datafile has been read
00039     m_common.clear();
00040     MsgStream log(msgSvc(), "EventCnv");
00041     log << MSG::DEBUG << "createObj" << endreq;
00042     Event::EventH * evh = new Event::EventH();
00043     refpObject=evh;
00044     return StatusCode::SUCCESS;
00045 }

StatusCode RootEventBaseCnv::createRep DataObject *  pObject,
IOpaqueAddress *&  refpAddress
[virtual, inherited]
 

Convert the transient object to the requested representation.

00078                                                            {
00079   // Purpose and Method: Convert the transient object to ROOT
00080 
00081   MsgStream log(msgSvc(), "RootEventBaseCnv");
00082  
00083   StatusCode sc= StatusCode::SUCCESS;
00084   // get the corresponding address 
00085   RootAddress *rootaddr;
00086   sc=m_cnvSvc->createAddress(obj,addr);
00087 
00088   rootaddr = dynamic_cast<RootAddress *>(addr);
00089 
00090   if (sc.isFailure() || !rootaddr  ) { 
00091     log << MSG::ERROR << "Could not create address for clid " <<obj->clID()<<", objname "<<obj->name()<<endreq;
00092     return StatusCode::FAILURE;
00093   }
00094 
00095   //  do the real conversion in the derived converter
00096   sc = DataObjectToTObject(obj,rootaddr);
00097 
00098   delete addr;
00099   addr = NULL;
00100 
00101   if (sc.isFailure()) {
00102     log << MSG::ERROR << "Could not transform object" << endreq;
00103     return sc;
00104   }
00105 
00106   return StatusCode::SUCCESS;
00107 }

StatusCode EventCnv::createRep DataObject *  obj,
RootAddress addr
[protected]
 

transform from TDS to ROOT

StatusCode EventCnv::createRep DataObject *  obj,
RootAddress addr
[protected]
 

transform from TDS to ROOT

00049                                                                      {
00050 
00051   MsgStream log(msgSvc(), "EventCnv");
00052   log << MSG::DEBUG << "EventCnv::DataObjectToObject" << endreq;
00053 
00054   Event::EventH * evh=dynamic_cast<Event::EventH *> (obj);
00055   if (!evh) {
00056        log << MSG::ERROR << "Could not downcast Event" << endreq;
00057        return StatusCode::FAILURE;
00058   }
00059   // nothing to do, will be done in lower converters
00060   return StatusCode::SUCCESS;
00061 }

StatusCode EventCnv::DataObjectToTObject DataObject *  obj,
RootAddress addr
[inline, protected, virtual]
 

do the concrete transformation from TDS to ROOT

Implements RootEventBaseCnv.

00039 {return StatusCode::SUCCESS;}

StatusCode EventCnv::DataObjectToTObject DataObject *  obj,
RootAddress addr
[inline, protected, virtual]
 

do the concrete transformation from TDS to ROOT

Implements RootEventBaseCnv.

00039 {return StatusCode::SUCCESS;}

void RootEventBaseCnv::declareObject const std::string &  fullPath,
const CLID &  clid,
const std::string &  treename,
const std::string &  branchname
[inherited]
 

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

void RootEventBaseCnv::declareObject const std::string &  fullPath,
const CLID &  clid,
const std::string &  treename,
const std::string &  branchname
[inherited]
 

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

00150                                                                                       {
00151     // Purpose and Method:  Save the path on the TDS, treename, pathname in the m_leaves vector, 
00152     //   corresponding to the DataObject that the converter handles.
00153    m_leaves.push_back(RootCnvSvc::Leaf(path, cl,treename,branchname));
00154 }

virtual StatusCode RootEventBaseCnv::fillObjRefs IOpaqueAddress *  pAddress,
DataObject *  pObject
[virtual, inherited]
 

Resolve the references of the converted object.

StatusCode RootEventBaseCnv::fillObjRefs IOpaqueAddress *  pAddress,
DataObject *  pObject
[virtual, inherited]
 

Resolve the references of the converted object.

00117                                                  {
00118     // Purpose and Method:  Resolve the references of the converted object.
00119     //     It is expected that derived classes will override this method.
00120     MsgStream log(msgSvc(), "RootEventBaseCnv");
00121     return StatusCode::SUCCESS;
00122 }

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

Resolve the references of the converted object.

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

Resolve the references of the converted object.

00109                                                  {
00110     // Purpose and Method:  Resolve the references of the converted object.
00111     //     It is expected that derived classes will override this method.
00112     MsgStream log(msgSvc(), "RootEventBaseCnv");
00113     return StatusCode::SUCCESS;
00114 }

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

StatusCode RootEventBaseCnv::finalize  )  [virtual, inherited]
 

00141                                         {
00142     if ( m_cnvSvc )     {
00143         m_cnvSvc->release();
00144         m_cnvSvc=0;
00145     }
00146     return Converter::finalize();
00147 }

TObject* RootEventBaseCnv::getReadObject  )  const [inline, inherited]
 

get the object to be read

00124 { return m_objRead;} 

TObject* RootEventBaseCnv::getReadObject  )  const [inline, inherited]
 

get the object to be read

00124 { return m_objRead;} 

virtual StatusCode RootEventBaseCnv::initialize  )  [virtual, inherited]
 

Reimplemented in DigiCnv, DstCnv, EvtHeaderCnv, EvtRecCnv, HltCnv, McCnv, RecTrackCnv, TrigCnv, DigiCnv, DstCnv, EvtHeaderCnv, EvtRecCnv, HltCnv, McCnv, RecTrackCnv, and TrigCnv.

StatusCode RootEventBaseCnv::initialize  )  [virtual, inherited]
 

Reimplemented in DigiCnv, DstCnv, EvtHeaderCnv, EvtRecCnv, HltCnv, McCnv, RecTrackCnv, TrigCnv, DigiCnv, DstCnv, EvtHeaderCnv, EvtRecCnv, HltCnv, McCnv, RecTrackCnv, and TrigCnv.

00125                                           {
00126  
00127   StatusCode status = Converter::initialize();
00128 
00129   if ( status.isSuccess() )   {
00130     IService* isvc = 0;
00131     status = serviceLocator()->service("RootCnvSvc", isvc, false);
00132     if ( !status.isSuccess() )   status = serviceLocator()->service("EventCnvSvc", isvc, true);
00133     if ( status.isSuccess() )   {
00134       status = isvc->queryInterface(IID_IRootCnvSvc, (void**)&m_cnvSvc);
00135     }
00136   }
00137   
00138   return status;
00139 }

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

00087                                     { 
00088       return ROOT_StorageType; 
00089     } 

virtual long RootEventBaseCnv::repSvcType  )  const [inline, virtual, inherited]
 

00087                                     { 
00088       return ROOT_StorageType; 
00089     } 

const unsigned char RootEventBaseCnv::storageType  )  [inline, static, inherited]
 

Storage type and class ID.

00083                                                   {
00084       return ROOT_StorageType;
00085     }

const unsigned char RootEventBaseCnv::storageType  )  [inline, static, inherited]
 

Storage type and class ID.

00083                                                   {
00084       return ROOT_StorageType;
00085     }

virtual StatusCode EventCnv::TObjectToDataObject DataObject *&  dat  )  [inline, protected, virtual]
 

do the concrete transformation from ROOT to TDS

Implements RootEventBaseCnv.

00047 {return StatusCode::SUCCESS;}

virtual StatusCode EventCnv::TObjectToDataObject DataObject *&  dat  )  [inline, protected, virtual]
 

do the concrete transformation from ROOT to TDS

Implements RootEventBaseCnv.

00047 {return StatusCode::SUCCESS;}


Friends And Related Function Documentation

CnvFactory<EventCnv> [friend]
 


Member Data Documentation

CLID RootEventBaseCnv::CLID_top [protected, inherited]
 

the CLID of the upper converter if any

std::vector<void *> RootEventBaseCnv::m_adresses [protected, inherited]
 

each converter knows the corresponding adresses

std::vector<void *> RootEventBaseCnv::m_adresses [protected, inherited]
 

each converter knows the corresponding adresses

int RootEventBaseCnv::m_branchNr [protected, inherited]
 

the branchNr of this converter for writing

int RootEventBaseCnv::m_branchNrDst [protected, inherited]
 

int RootEventBaseCnv::m_branchNrEvtHeader [protected, inherited]
 

int RootEventBaseCnv::m_branchNrEvtRec [protected, inherited]
 

int RootEventBaseCnv::m_branchNrMc [protected, inherited]
 

int RootEventBaseCnv::m_branchNrRecon [protected, inherited]
 

TArrayS* RootEventBaseCnv::m_branchNumbers [protected, inherited]
 

array with number of branches for reading

TArrayS* RootEventBaseCnv::m_branchNumbers [protected, inherited]
 

array with number of branches for reading

RootCnvSvc* RootEventBaseCnv::m_cnvSvc [protected, inherited]
 

RootCnvSvc* RootEventBaseCnv::m_cnvSvc [protected, inherited]
 

commonData EventCnv::m_common [protected]
 

std::string RootEventBaseCnv::m_currentFileName [protected, inherited]
 

IDataProviderSvc* RootEventBaseCnv::m_eds [protected, inherited]
 

pointer to eventdataservice

IDataProviderSvc* RootEventBaseCnv::m_eds [protected, inherited]
 

pointer to eventdataservice

RootEvtSelector* RootEventBaseCnv::m_evtsel [protected, inherited]
 

RootEvtSelector* RootEventBaseCnv::m_evtsel [protected, inherited]
 

std::vector<RootCnvSvc::Leaf> RootEventBaseCnv::m_leaves [protected, inherited]
 

std::vector<RootCnvSvc::Leaf> RootEventBaseCnv::m_leaves [protected, inherited]
 

TObject* RootEventBaseCnv::m_objRead [protected, inherited]
 

the object that was read

TObject* RootEventBaseCnv::m_objRead [protected, inherited]
 

the object that was read

std::string RootEventBaseCnv::m_rootBranchname [protected, inherited]
 

root branchname (may be concatenated of severals)

RootInterface* RootEventBaseCnv::m_rootInterface [protected, inherited]
 

pointer to the RootInterface

RootInterface* RootEventBaseCnv::m_rootInterface [protected, inherited]
 

pointer to the RootInterface

std::string RootEventBaseCnv::m_rootTreename [protected, inherited]
 

each converter knows it's treename


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