|
DD4hep
1.30.0
Detector Description Toolkit for High Energy Physics
|
Go to the documentation of this file.
13 #ifndef DDG4_GEANT4OUTPUT2ROOT_H
14 #define DDG4_GEANT4OUTPUT2ROOT_H
39 typedef std::map<std::string, TBranch*>
Branches;
40 typedef std::map<std::string, TTree*>
Sections;
68 TTree*
section(
const std::string& nam);
70 int fill(
const std::string& nam,
const ComponentCast& type,
void* ptr);
75 virtual void beginRun(
const G4Run* run)
override;
87 #endif // DDG4_GEANT4OUTPUT2ROOT_H
virtual void saveEvent(OutputContext< G4Event > &ctxt) override
Callback to store the Geant4 event.
Class of the Geant4 toolkit. See http://www-geant4.kek.jp/Reference.
Base class to output Geant4 event data to persistent media.
bool m_handleMCTruth
Property: Flag if Monte-Carlo truth should be followed and checked.
virtual ~Geant4Output2ROOT()
Default destructor.
virtual void commit(OutputContext< G4Event > &ctxt) override
Commit data at end of filling procedure.
Helper class for thread savety.
Geant4Output2ROOT(Geant4Context *context, const std::string &nam)
Standard constructor.
TTree * m_tree
Reference to the event data tree.
int fill(const std::string &nam, const ComponentCast &type, void *ptr)
Fill single EVENT branch entry (Geant4 collection data)
Branches m_branches
Branches in the event tree.
TTree * section(const std::string &nam)
Create/access tree by name for non collection user data.
std::map< std::string, TTree * > Sections
Class to output Geant4 event data to ROOT files.
virtual void saveCollection(OutputContext< G4Event > &ctxt, G4VHitsCollection *collection) override
Callback to store each Geant4 hit collection.
Sections m_sections
Known file sections.
std::vector< std::string > m_disabledCollections
Property: vector with disabled collections.
virtual void beginRun(const G4Run *run) override
Callback to store the Geant4 run information.
std::string m_section
Property: name of the event tree.
bool m_disableParticles
Property: vector with disabled collections.
bool m_filesByRun
Property: Flag if Monte-Carlo truth should be followed and checked.
Namespace for the AIDA detector description toolkit.
int m_fseqNunmber
File sequence number.
virtual void closeOutput()
Close current output file.
std::map< std::string, TBranch * > Branches
TFile * m_file
Reference to the ROOT file to open.
Generic context to extend user, run and event information.
Geant4Context * context() const
Access the context.