#include <SoHepMCEventCnv.h>
Inheritance diagram for SoHepMCEventCnv:
Public Types | |
INVALID_ADDRESS | |
INVALID_OBJECT | |
NO_MEMORY | |
BAD_STORAGE_TYPE | |
NO_SOURCE_OBJECT | |
ICONVERSIONSVC_LAST_ERROR | |
SUCCESS | |
NO_INTERFACE | |
VERSMISMATCH | |
LAST_ERROR | |
enum | Status |
Public Member Functions | |
SoHepMCEventCnv (ISvcLocator *) | |
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!// | |
virtual StatusCode | initialize () |
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!// | |
virtual StatusCode | finalize () |
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!// | |
virtual long | repSvcType () const |
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!// | |
virtual StatusCode | createRep (DataObject *, IOpaqueAddress *&) |
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!// | |
virtual StatusCode | queryInterface (const InterfaceID &riid, void **ppvInterface) |
virtual unsigned long | addRef () |
virtual unsigned long | release () |
virtual StatusCode | setDataProvider (IDataProviderSvc *svc) |
virtual IDataProviderSvc * | dataProvider () const |
virtual StatusCode | setConversionSvc (IConversionSvc *svc) |
virtual IConversionSvc * | conversionSvc () const |
virtual StatusCode | setAddressCreator (IAddressCreator *creator) |
virtual IAddressCreator * | addressCreator () const |
virtual const CLID & | objType () const |
virtual long | i_repSvcType () const |
virtual StatusCode | createObj (IOpaqueAddress *pAddress, DataObject *&refpObject) |
virtual StatusCode | fillObjRefs (IOpaqueAddress *pAddress, DataObject *pObject) |
virtual StatusCode | updateObj (IOpaqueAddress *pAddress, DataObject *refpObject) |
virtual StatusCode | updateObjRefs (IOpaqueAddress *pAddress, DataObject *pObject) |
virtual StatusCode | fillRepRefs (IOpaqueAddress *pAddress, DataObject *pObject) |
virtual StatusCode | updateRep (IOpaqueAddress *pAddress, DataObject *pObject) |
virtual StatusCode | updateRepRefs (IOpaqueAddress *pAddress, DataObject *pObject) |
StatusCode | service (const std::string &name, T *&psvc, bool createIf=false) const |
StatusCode | service (const std::string &type, const std::string &name, T *&psvc) const |
Static Public Member Functions | |
static const CLID & | classID () |
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!// | |
static const unsigned char | storageType () |
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!// | |
static const InterfaceID & | interfaceID () |
Public Attributes | |
INVALID_ADDRESS | |
INVALID_OBJECT | |
NO_MEMORY | |
BAD_STORAGE_TYPE | |
NO_SOURCE_OBJECT | |
ICONVERSIONSVC_LAST_ERROR | |
Protected Member Functions | |
ISvcLocator * | serviceLocator () const |
IMessageSvc * | msgSvc () const |
IMessageSvc * | messageService () const |
IDataManagerSvc * | dataManager () const |
Private Attributes | |
ISoConversionSvc * | fSoCnvSvc |
IUserInterfaceSvc * | fUISvc |
IParticlePropertySvc * | fParticlePropertySvc |
Friends | |
class | CnvFactory< SoHepMCEventCnv > |
Definition at line 12 of file SoHepMCEventCnv.h.
SoHepMCEventCnv::SoHepMCEventCnv | ( | ISvcLocator * | ) |
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
Definition at line 33 of file SoHepMCEventCnv.cpp.
00036 :Converter(So_TechnologyType,SoHepMCEventCnv::classID(),aSvcLoc) 00037 ,fSoCnvSvc(0) 00038 ,fUISvc(0) 00039 ,fParticlePropertySvc(0) 00042 { 00043 }
StatusCode SoHepMCEventCnv::initialize | ( | ) | [virtual] |
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
Reimplemented from Converter.
Definition at line 45 of file SoHepMCEventCnv.cpp.
00049 { 00050 StatusCode status = Converter::initialize(); 00051 if( status.isFailure() ) return status; 00052 status = serviceLocator()->service("SoConversionSvc",fSoCnvSvc); 00053 if(status.isFailure()) return status; 00054 status = serviceLocator()->service("OnXSvc",fUISvc); 00055 if(status.isFailure()) return status; 00056 status = 00057 serviceLocator()->service("ParticlePropertySvc",fParticlePropertySvc); 00058 if(status.isFailure()) return status; 00059 return status; 00060 }
StatusCode SoHepMCEventCnv::finalize | ( | ) | [virtual] |
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
Reimplemented from Converter.
Definition at line 62 of file SoHepMCEventCnv.cpp.
00065 { 00066 //debug if(fSoCnvSvc) fSoCnvSvc->release(); 00067 //debug if(fUISvc) fUISvc->release(); 00068 //debug if(fParticlePropertySvc) fParticlePropertySvc->release(); 00069 return StatusCode::SUCCESS; 00070 }
long SoHepMCEventCnv::repSvcType | ( | ) | const [virtual] |
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
Implements Converter.
Definition at line 72 of file SoHepMCEventCnv.cpp.
00075 { 00076 return i_repSvcType(); 00077 }
StatusCode SoHepMCEventCnv::createRep | ( | DataObject * | , | |
IOpaqueAddress *& | ||||
) | [virtual] |
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
Reimplemented from Converter.
Definition at line 79 of file SoHepMCEventCnv.cpp.
00085 { 00086 MsgStream log(messageService(), "SoHepMCEventCnv"); 00087 log << MSG::INFO << "SoHEPMcEventCnv createReps" << endreq; 00088 00089 if(!fUISvc) { 00090 log << MSG::INFO << " UI service not found" << endreq; 00091 return StatusCode::SUCCESS; 00092 } 00093 00094 if(!fParticlePropertySvc) { 00095 log << MSG::INFO << " ParticleProperty service not found" << endreq; 00096 return StatusCode::SUCCESS; 00097 } 00098 00099 ISession* session = fUISvc->session(); 00100 if(!session) { 00101 log << MSG::INFO << " can't get ISession." << endreq; 00102 return StatusCode::FAILURE; 00103 } 00104 00105 SoRegion* soRegion = fUISvc->currentSoRegion(); 00106 if(!soRegion) { 00107 log << MSG::INFO << " can't get viewing region." << endreq; 00108 return StatusCode::FAILURE; 00109 } 00110 00111 if(!aObject) { 00112 log << MSG::INFO << " NULL object." << endreq; 00113 return StatusCode::FAILURE; 00114 } 00115 00116 LHCb::HepMCEvents* mcEvents = dynamic_cast<LHCb::HepMCEvents*>(aObject); 00117 if(!mcEvents) { 00118 log << MSG::INFO << " bad object type." << endreq; 00119 return StatusCode::FAILURE; 00120 } 00121 00122 log << MSG::INFO << " number of events : " << mcEvents->size() << endreq; 00123 00124 LHCb::HepMCEvents::iterator it; 00125 for(it = mcEvents->begin(); it != mcEvents->end(); it++) { 00126 HepMC::GenEvent* genEvent = (*it)->pGenEvt(); 00127 00128 log << MSG::INFO 00129 << " number of particles : " << genEvent->particles_size() 00130 << " number of vertices : " << genEvent->vertices_size() 00131 << endreq; 00132 for ( HepMC::GenEvent::particle_const_iterator p 00133 = genEvent->particles_begin(); 00134 p != genEvent->particles_end(); ++p ) { 00135 00136 00137 HepMC::GenParticle* genParticle = (*p); 00138 GenParticleType::represent(genParticle, 00139 session,soRegion, 00140 fParticlePropertySvc); 00141 00142 } 00143 00144 } 00145 00146 return StatusCode::SUCCESS; 00147 }
const CLID & SoHepMCEventCnv::classID | ( | ) | [static] |
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
Definition at line 149 of file SoHepMCEventCnv.cpp.
const unsigned char SoHepMCEventCnv::storageType | ( | ) | [static] |
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
Definition at line 157 of file SoHepMCEventCnv.cpp.
00161 { 00162 return So_TechnologyType; 00163 }
friend class CnvFactory< SoHepMCEventCnv > [friend] |
Definition at line 13 of file SoHepMCEventCnv.h.
ISoConversionSvc* SoHepMCEventCnv::fSoCnvSvc [private] |
Definition at line 24 of file SoHepMCEventCnv.h.
IUserInterfaceSvc* SoHepMCEventCnv::fUISvc [private] |
Definition at line 25 of file SoHepMCEventCnv.h.
Definition at line 26 of file SoHepMCEventCnv.h.