dd4hep::sim::Geant4Output2Podio Class Reference

Saves output to podio data model. More...

#include <Geant4Output2Podio.h>

Inheritance diagram for dd4hep::sim::Geant4Output2Podio:
Collaboration diagram for dd4hep::sim::Geant4Output2Podio:

Public Member Functions

 Geant4Output2Podio (Geant4Context *context, const std::string &nam)
 Standard constructor. More...
 
virtual ~Geant4Output2Podio ()
 Default destructor. More...
 
virtual void beginRun (const G4Run *run)
 Callback to store the Geant4 run information. More...
 
virtual void endRun (const G4Run *run)
 Callback to store the Geant4 run information. More...
 
virtual void saveRun (const G4Run *run)
 Callback to store the Geant4 run information. More...
 
virtual void saveCollection (OutputContext< G4Event > &ctxt, G4VHitsCollection *collection)
 Callback to store each Geant4 hit collection. More...
 
virtual void saveEvent (OutputContext< G4Event > &ctxt)
 Callback to store the Geant4 event. More...
 
virtual void commit (OutputContext< G4Event > &ctxt)
 Commit data at end of filling procedure. More...
 

Protected Member Functions

void ConstructParticle (dd4pod::Geant4ParticleCollection *col, dd4hep::sim::Geant4Particle *part)
 

Protected Attributes

bool m_handleMCTruth
 Flag if Monte-Carlo truth should be followed and checked. More...
 
std::vector< std::string > m_disabledCollections
 Property: vector with disabled collections. More...
 
std::vector< std::string > m_enabledCollections
 Property: vector with disabled collections. More...
 
bool m_disableParticles = false
 Property: vector with disabled collections. More...
 
podio::EventStore store
 
podio::ROOTWriter * writer = nullptr
 
std::map< std::string, podio::CollectionBase * > m_col_map
 
std::vector< std::pair< std::string, podio::CollectionBase * > > m_collections
 
std::vector< std::pair< std::string, podio::CollectionBase * > > m_readCollections
 
podio::CollectionIDTable * m_collectionIDs
 

Detailed Description

Saves output to podio data model.

Uses the podio data model "dd4pod" as the output.

Definition at line 30 of file Geant4Output2Podio.h.

Constructor & Destructor Documentation

◆ Geant4Output2Podio()

dd4hep::sim::Geant4Output2Podio::Geant4Output2Podio ( Geant4Context *  context,
const std::string &  nam 
)

Standard constructor.

Definition at line 30 of file Geant4Output2Podio.cxx.

◆ ~Geant4Output2Podio()

dd4hep::sim::Geant4Output2Podio::~Geant4Output2Podio ( )
virtual

Default destructor.

Definition at line 40 of file Geant4Output2Podio.cxx.

Member Function Documentation

◆ beginRun()

void dd4hep::sim::Geant4Output2Podio::beginRun ( const G4Run *  run)
virtual

Callback to store the Geant4 run information.

Definition at line 58 of file Geant4Output2Podio.cxx.

◆ commit()

void dd4hep::sim::Geant4Output2Podio::commit ( OutputContext< G4Event > &  ctxt)
virtual

Commit data at end of filling procedure.

Definition at line 118 of file Geant4Output2Podio.cxx.

◆ ConstructParticle()

void dd4hep::sim::Geant4Output2Podio::ConstructParticle ( dd4pod::Geant4ParticleCollection col,
dd4hep::sim::Geant4Particle *  part 
)
protected

◆ endRun()

void dd4hep::sim::Geant4Output2Podio::endRun ( const G4Run *  run)
virtual

Callback to store the Geant4 run information.

Definition at line 65 of file Geant4Output2Podio.cxx.

◆ saveCollection()

void dd4hep::sim::Geant4Output2Podio::saveCollection ( OutputContext< G4Event > &  ctxt,
G4VHitsCollection *  collection 
)
virtual

Callback to store each Geant4 hit collection.

Definition at line 174 of file Geant4Output2Podio.cxx.

◆ saveEvent()

void dd4hep::sim::Geant4Output2Podio::saveEvent ( OutputContext< G4Event > &  ctxt)
virtual

Callback to store the Geant4 event.

Definition at line 125 of file Geant4Output2Podio.cxx.

◆ saveRun()

void dd4hep::sim::Geant4Output2Podio::saveRun ( const G4Run *  run)
virtual

Callback to store the Geant4 run information.

Definition at line 114 of file Geant4Output2Podio.cxx.

Member Data Documentation

◆ m_col_map

std::map<std::string, podio::CollectionBase*> dd4hep::sim::Geant4Output2Podio::m_col_map
protected

Definition at line 51 of file Geant4Output2Podio.h.

◆ m_collectionIDs

podio::CollectionIDTable* dd4hep::sim::Geant4Output2Podio::m_collectionIDs
protected

Definition at line 55 of file Geant4Output2Podio.h.

◆ m_collections

std::vector<std::pair<std::string, podio::CollectionBase*> > dd4hep::sim::Geant4Output2Podio::m_collections
protected

Definition at line 52 of file Geant4Output2Podio.h.

◆ m_disabledCollections

std::vector<std::string> dd4hep::sim::Geant4Output2Podio::m_disabledCollections
protected

Property: vector with disabled collections.

Definition at line 40 of file Geant4Output2Podio.h.

◆ m_disableParticles

bool dd4hep::sim::Geant4Output2Podio::m_disableParticles = false
protected

Property: vector with disabled collections.

Definition at line 46 of file Geant4Output2Podio.h.

◆ m_enabledCollections

std::vector<std::string> dd4hep::sim::Geant4Output2Podio::m_enabledCollections
protected

Property: vector with disabled collections.

Definition at line 43 of file Geant4Output2Podio.h.

◆ m_handleMCTruth

bool dd4hep::sim::Geant4Output2Podio::m_handleMCTruth
protected

Flag if Monte-Carlo truth should be followed and checked.

Definition at line 37 of file Geant4Output2Podio.h.

◆ m_readCollections

std::vector<std::pair<std::string, podio::CollectionBase*> > dd4hep::sim::Geant4Output2Podio::m_readCollections
protected

Definition at line 54 of file Geant4Output2Podio.h.

◆ store

podio::EventStore dd4hep::sim::Geant4Output2Podio::store
protected

Definition at line 48 of file Geant4Output2Podio.h.

◆ writer

podio::ROOTWriter* dd4hep::sim::Geant4Output2Podio::writer = nullptr
protected

Definition at line 49 of file Geant4Output2Podio.h.


The documentation for this class was generated from the following files: