29 #ifndef SToGS_BaseROOT_h
30 #define SToGS_BaseROOT_h 1
88 BaseROOTAction(G4String conffile =
"setup/SToGS_root_actions.conf");
114 virtual void OpenFile(G4int run_id);
129 BaseROOTTree(G4String conf =
"setup/SToGS_root_actions.conf", G4String which_gene =
"GPS", G4String which_gene_opt =
"G4Macros/GPSPointLike.mac"):
Extract informations from Geant4 using SToGS sensitives and write hits in root tree.
G4String fBaseName
base for all the files
BaseROOTAction(G4String conffile="setup/SToGS_root_actions.conf")
BaseROOTTreeAction(G4String conffile="setup/SToGS_root_actions.conf")
TFile * fRootFile
the current root file
a G4 user's action manage by a single AllAction class
virtual void CloseFile()
Make sure ths file is closed properly.
virtual void PostUserTrackingAction(const G4Track *)
virtual void EndOfRunAction(const G4Run *)
virtual void PreUserTrackingAction(const G4Track *)
virtual void OpenFile(G4int run_id)
Open the stream depending of the configuration and attach the Tree to the file.
BaseROOTTree(G4String conf="setup/SToGS_root_actions.conf", G4String which_gene="GPS", G4String which_gene_opt="G4Macros/GPSPointLike.mac")
G4int fRecordOption
0 [default] means keep all, 1 only events which gives at least one hit in the full detector ...
virtual void BeginOfRunAction(const G4Run *)
TTree * fTree
the Tree to be filled
G4int fPrintModulo
to print out status any fPrintModulo events
virtual ~BaseROOTTreeRun()
virtual void EndOfEventAction(const G4Event *)
G4String fPathToData
directory where to output data
This class just print out once a new run begins/ends with the run number and the number of events to ...
G4int fMaxEvents
max numer of event per files ... better to limit because of BaseROOT file could be uged ! ...
virtual void BeginOfEventAction(const G4Event *)
virtual void CloseFile()
Make sure ths file is closed properly.
virtual void OpenFile(G4int run_id)
Just check if there are collected hits in the collection.
virtual ~BaseROOTAction()
virtual ~BaseROOTTreeAction()
BaseROOTTreeRun(G4int record_option=0)
Base class that regroups in the same space all user's hooks. Convenient for sharing similar data...