![]() |
eventAnalysis
7.0-49-g0ac7482
|
Generate an analysis tree to summarize the event reconstruction. More...
#include <TAnalysisLoop.hxx>
Public Member Functions | |
TAnalysisLoop () | |
Initialize any class specific variables. More... | |
virtual | ~TAnalysisLoop () |
virtual void | BeginFile (ND::TVInputFile *input) |
Called before the first event of a file is read, but you should prefer TAnalysisLoop::Initialize for general initialization. More... | |
virtual void | EndFile (ND::TVInputFile *) |
Called after the last event of a file is read, but you should prefer TAnalysisLoop: Finalize() for general finalization. More... | |
virtual void | Finalize (ND::TND280Output *const output) |
virtual void | Initialize (void) |
Called after the arguments are processes by before reading the first event. More... | |
bool | operator() (ND::TND280Event &event) |
Called for each event inside the event loop, and returns true if the event should be saved to the output file. More... | |
virtual bool | SetOption (std::string, std::string) |
Set an option and return true if it is valid. More... | |
void | Usage (void) |
Print a usage message. More... | |
Private Types | |
typedef std::vector < ModDescriptor > ::const_iterator | CModDescripterator |
Private typedef which makes talking to fAnalysisModules slightly nicer. More... | |
typedef std::vector < ModDescriptor >::iterator | ModDescripterator |
Private typedef which makes talking to fAnalysisModules slightly nicer. More... | |
typedef std::pair< std::string, ND::TAnalysisModuleBase * > | ModDescriptor |
Private typedef which makes talking to fAnalysisModules slightly nicer. More... | |
Private Member Functions | |
ModDescripterator | FindNamedModule (std::vector< TAnalysisLoop::ModDescriptor > &ModMap, std::string ModuleName) |
Searches through TAnalysisLoop::fAnalysisModules for a street module named Bob. More... | |
CModDescripterator | FindNamedModule (std::vector< TAnalysisLoop::ModDescriptor > const &ModMap, std::string ModuleName) |
Searches through TAnalysisLoop::fAnalysisModules for a street module named Bob. More... | |
void | SetModuleDefaults () |
Method to set the the default enable/disable values for all modules in fAnalysisModules map. More... | |
Private Attributes | |
std::vector< ModDescriptor > | fAnalysisModules |
Internal map of all modules. More... | |
bool | fDisableAll |
This is overridden by fEnableAll. More... | |
bool | fEnableAll |
Enables All modules, if a given module isn't disabled in fUserEnabled. More... | |
int | fEventCount |
Keep track of the events that have been read. More... | |
bool | fExit |
If set to true during execution will result in execution termination at the end of the next event. More... | |
TGeoManager * | fGeom |
The ND280 geometry to be saved. More... | |
bool | fGeometry |
Flag to control saving ND280 geometry. More... | |
bool | fProduction |
Controls production mode. More... | |
bool | fSaveOriginalFullEvent |
Flag if the full event (not the analysis format) is also to be saved This overrides any -preselection=<<moduleclass>> settings. More... | |
bool | fSaveOutputOaEventTree |
Set automatically if the oaEvent tree needs to be saved in output file. More... | |
std::map< std::string, bool > | fUserEnabled |
Store whether a module has been set to disabled/enables by user as well as whether the disable/enable all options have been set. More... | |
bool | fValidation |
Control validation mode. More... | |
Generate an analysis tree to summarize the event reconstruction.
This should be replaced by the general eventAnalysis tree, but that's not ready.
Definition at line 30 of file TAnalysisLoop.hxx.
|
private |
Private typedef which makes talking to fAnalysisModules slightly nicer.
Definition at line 92 of file TAnalysisLoop.hxx.
|
private |
Private typedef which makes talking to fAnalysisModules slightly nicer.
Definition at line 90 of file TAnalysisLoop.hxx.
|
private |
Private typedef which makes talking to fAnalysisModules slightly nicer.
Definition at line 88 of file TAnalysisLoop.hxx.
ND::TAnalysisLoop::TAnalysisLoop | ( | ) |
Initialize any class specific variables.
Most of the work can be done in ND::TAnalysisLoop::Initialize.
Definition at line 65 of file TAnalysisLoop.cxx.
References fAnalysisModules, and SetModuleDefaults().
|
virtual |
Definition at line 121 of file TAnalysisLoop.cxx.
|
virtual |
Called before the first event of a file is read, but you should prefer TAnalysisLoop::Initialize for general initialization.
This method will be called once for each input file.
Definition at line 514 of file TAnalysisLoop.cxx.
References fAnalysisModules, and FindNamedModule().
|
virtual |
Called after the last event of a file is read, but you should prefer TAnalysisLoop: Finalize() for general finalization.
This method will be called once for each input file.
Definition at line 538 of file TAnalysisLoop.cxx.
|
virtual |
Definition at line 540 of file TAnalysisLoop.cxx.
References eventAnalysisEnums::DetectorName(), fAnalysisModules, fEventCount, fGeom, fGeometry, ND::TAnalysisModuleBase::FillConfigTree(), fSaveOutputOaEventTree, ND::TAnalysisModuleBase::GetName(), eventAnalysisEnums::kChargedLepton, eventAnalysisEnums::kFGD1, eventAnalysisEnums::kNParticleCategories, eventAnalysisEnums::kNSubdetectors, eventAnalysisEnums::Next(), and eventAnalysisEnums::ParticleName().
|
private |
Searches through TAnalysisLoop::fAnalysisModules for a street module named Bob.
Definition at line 643 of file TAnalysisLoop.cxx.
Referenced by BeginFile(), operator()(), and SetOption().
|
private |
Searches through TAnalysisLoop::fAnalysisModules for a street module named Bob.
Definition at line 631 of file TAnalysisLoop.cxx.
|
virtual |
Called after the arguments are processes by before reading the first event.
The output file is open so any histograms will be added to the output file.
Definition at line 438 of file TAnalysisLoop.cxx.
References fAnalysisModules, fDisableAll, fEnableAll, fUserEnabled, ND::TAnalysisModuleBase::GetDirectoryName(), ND::TAnalysisModuleBase::GetName(), ND::TAnalysisModuleBase::GetTitle(), ND::TAnalysisModuleBase::Initialize(), ND::TAnalysisModuleBase::IsEnabled(), ND::TAnalysisModuleBase::IsUsedForPreselection(), ND::PreselectionSorter(), ND::TAnalysisModuleBase::Print(), ND::TAnalysisModuleBase::SetDisabled(), and ND::TAnalysisModuleBase::SetEnabled().
bool ND::TAnalysisLoop::operator() | ( | ND::TND280Event & | event | ) |
Called for each event inside the event loop, and returns true if the event should be saved to the output file.
If the remainder of the current file should be skipped, this should throw the ENextEventLoopFile exception.
Definition at line 273 of file TAnalysisLoop.cxx.
References AnalysisLoopGlobals::CurrentlyProcessingModule, AnalysisLoopGlobals::EventNumber, fAnalysisModules, fEventCount, fExit, fGeom, FindNamedModule(), fProduction, fSaveOriginalFullEvent, fValidation, ND::TAnalysisModuleBase::GetName(), ND::TAnalysisModuleBase::IsEnabled(), ND::TAnalysisModuleBase::IsUsedForPreselection(), ND::TAnalysisModuleBase::Process(), ND::TAnalysisModuleBase::ProcessFirstEvent(), ND::TAnalysisModuleBase::SetDisabled(), and AnalysisLoopGlobals::StopProcessing.
|
private |
Method to set the the default enable/disable values for all modules in fAnalysisModules map.
Definition at line 624 of file TAnalysisLoop.cxx.
References fAnalysisModules.
Referenced by TAnalysisLoop().
|
virtual |
Set an option and return true if it is valid.
This is called by the event loop command line argument processing code for each "-O [name]=[value]" option found on the command line. If the command line has "-O [name]" without a value, then the value string will be equal to "". This must return false if the option was not correctly processed.
Definition at line 165 of file TAnalysisLoop.cxx.
References fAnalysisModules, fDisableAll, fEnableAll, fGeometry, FindNamedModule(), fProduction, fSaveOriginalFullEvent, fSaveOutputOaEventTree, fUserEnabled, fValidation, ND::TAnalysisModuleBase::SetEnabled(), and ND::TAnalysisModuleBase::SetUsedForPreselection().
void ND::TAnalysisLoop::Usage | ( | void | ) |
Print a usage message.
Definition at line 123 of file TAnalysisLoop.cxx.
References fAnalysisModules.
|
private |
Internal map of all modules.
Definition at line 126 of file TAnalysisLoop.hxx.
Referenced by BeginFile(), Finalize(), Initialize(), operator()(), SetModuleDefaults(), SetOption(), TAnalysisLoop(), and Usage().
|
private |
This is overridden by fEnableAll.
Definition at line 135 of file TAnalysisLoop.hxx.
Referenced by Initialize(), and SetOption().
|
private |
Enables All modules, if a given module isn't disabled in fUserEnabled.
Definition at line 138 of file TAnalysisLoop.hxx.
Referenced by Initialize(), and SetOption().
|
private |
Keep track of the events that have been read.
Definition at line 115 of file TAnalysisLoop.hxx.
Referenced by Finalize(), and operator()().
|
private |
If set to true during execution will result in execution termination at the end of the next event.
Definition at line 144 of file TAnalysisLoop.hxx.
Referenced by operator()().
|
private |
The ND280 geometry to be saved.
Definition at line 150 of file TAnalysisLoop.hxx.
Referenced by Finalize(), and operator()().
|
private |
Flag to control saving ND280 geometry.
Definition at line 152 of file TAnalysisLoop.hxx.
Referenced by Finalize(), and SetOption().
|
private |
Controls production mode.
Definition at line 141 of file TAnalysisLoop.hxx.
Referenced by operator()(), and SetOption().
|
private |
Flag if the full event (not the analysis format) is also to be saved This overrides any -preselection=<<moduleclass>> settings.
Definition at line 119 of file TAnalysisLoop.hxx.
Referenced by operator()(), and SetOption().
|
private |
Set automatically if the oaEvent tree needs to be saved in output file.
Definition at line 123 of file TAnalysisLoop.hxx.
Referenced by Finalize(), and SetOption().
|
private |
Store whether a module has been set to disabled/enables by user as well as whether the disable/enable all options have been set.
fUserEnabled takes highest precidence over fDisableAll and fEnableAll.
Definition at line 132 of file TAnalysisLoop.hxx.
Referenced by Initialize(), and SetOption().
|
private |
Control validation mode.
Definition at line 147 of file TAnalysisLoop.hxx.
Referenced by operator()(), and SetOption().