#include <GenAccessIO.h>
Public Types | |
typedef std::string | String |
Public Member Functions | |
GenAccessIO () | |
StatusCode | getDH (const McEventCollection *&, String key) const |
StatusCode | getDH (const McEventCollection *&) const |
StatusCode | getMC (MCparticleCollection &, const GenIMCselector *) const |
StatusCode | getMC (MCparticleCollection &) const |
StatusCode | store (McEventCollection *, String key) const |
StatusCode | store (McEventCollection *) const |
Private Attributes | |
StoreGateSvc * | m_sgSvc |
|
|
|
00042 :m_sgSvc(0){ 00043 ISvcLocator* svcLoc = Gaudi::svcLocator( ); 00044 if( (svcLoc->service( "StoreGateSvc", m_sgSvc )).isFailure() ){ 00045 throw StatusCode::FAILURE; 00046 } 00047 }
|
|
00058 { 00059 if( (m_sgSvc->retrieve(dh, key)).isFailure() ){ 00060 return StatusCode::FAILURE; 00061 } 00062 return StatusCode::SUCCESS; 00063 }
|
|
00050 { 00051 if((m_sgSvc->retrieve(dh)).isFailure() ){ 00052 return StatusCode::FAILURE; 00053 } 00054 return StatusCode::SUCCESS; 00055 }
|
|
00017 { 00018 00019 const McEventCollection* mcCollptr; 00020 StatusCode stat = this->getDH(mcCollptr); 00021 if(!stat){ 00022 return StatusCode::FAILURE; 00023 } 00024 00025 // Iterate over all McEvent records 00026 McEventCollection::const_iterator itr; 00027 for (itr = mcCollptr->begin(); itr!=mcCollptr->end(); ++itr) { 00028 // Access the HepMC record which is wrapped within McEvent 00029 const HepMC::GenEvent* genEvt = (*itr); 00030 if(genEvt == 0) return StatusCode::FAILURE; 00031 00032 HepMC::GenEvent::particle_const_iterator it= genEvt->particles_begin(); 00033 HepMC::GenEvent::particle_const_iterator en= genEvt->particles_end(); 00034 for(; it!=en; ++it){ 00035 if((*selector)(*it)){mcParticles.push_back(*it);} 00036 } 00037 } 00038 00039 return StatusCode::SUCCESS; 00040 00041 }
|
|
00009 { 00010 const GenIMCselector* selector = new GenAll(); 00011 StatusCode stat = this->getMC(mcParticles, selector); 00012 return stat; 00013 }
|
|
00070 { 00071 return (m_sgSvc->record(storee, key) ) ; 00072 }
|
|
00065 { 00066 return (m_sgSvc->record(pObject) ) ; 00067 }
|
|
|