BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Public Member Functions | Protected Member Functions | Protected Attributes
RunAnalysis Class Reference

Analysis of a run. More...

#include <RunAnalysis.hh>

Inheritance diagram for RunAnalysis:
Inheritance graph
Collaboration diagram for RunAnalysis:
Collaboration graph

Public Member Functions

 RunAnalysis ()
 
 RunAnalysis (Run *runIn, TChain *chainIn, bool perEntryAnalysis=true, bool debugIn=false)
 Constructor intended for use to construct a run analysis object. More...
 
virtual void Process ()
 Operate on each entry in the run tree. More...
 
- Public Member Functions inherited from Analysis
 Analysis (const std::string &treeNameIn, TChain *chainIn, const std::string &mergedHistogramNameIn, bool perEntryAnalysis=true, bool debugIn=false)
 
virtual void Execute ()
 Method which calls all other methods in order. More...
 
virtual void Process ()=0
 
virtual void UserProcess ()
 Virtual function for user to overload and use. Does nothing by default. More...
 
virtual void SimpleHistograms ()
 Process histogram definitions from configuration instance. More...
 
void PreparePerEntryHistograms ()
 Create structures necessary for per entry histograms. More...
 
void AccumulatePerEntryHistograms (long int entryNumber)
 Accumulate means and variances for per entry histograms. More...
 
void TerminatePerEntryHistograms ()
 Prepare result of per entry histogram accumulation. More...
 
virtual void Terminate ()
 
virtual void Write (TFile *outputFile)
 Write rebdsim histograms. More...
 

Protected Member Functions

 ClassDef (RunAnalysis, 1)
 
- Protected Member Functions inherited from Analysis
void FillHistogram (HistogramDef *definition, std::vector< TH1 * > *outputHistograms=nullptr)
 Create an individual histogram based on a definition. More...
 

Protected Attributes

Runrun
 Run object that data loaded from the file will be loaded into. More...
 
- Protected Attributes inherited from Analysis
std::string treeName
 
TChain * chain
 
std::string mergedHistogramName
 Name of directory for merged histograms. More...
 
std::vector< TH1 * > simpleHistograms
 
std::vector< PerEntryHistogram * > perEntryHistograms
 
HistogramMeanFromFilehistoSum
 Merge of per event stored histograms. More...
 
bool debug
 Whether debug print out is used or not. More...
 
long int entries
 Number of entries in the chain. More...
 
bool perEntry
 Whether to analyse each entry in the tree in a for loop or not. More...
 

Detailed Description

Analysis of a run.

Author
Stuart Walker.

Definition at line 35 of file RunAnalysis.hh.

Constructor & Destructor Documentation

◆ RunAnalysis() [1/2]

RunAnalysis::RunAnalysis ( )

The default constructor is not intended for use and will not work for the purpose of analysis. It is required by the ROOT C++ reflection system in case you wish to save the object.

◆ RunAnalysis() [2/2]

RunAnalysis::RunAnalysis ( Run runIn,
TChain *  chainIn,
bool  perEntryAnalysis = true,
bool  debugIn = false 
)

Constructor intended for use to construct a run analysis object.

Definition at line 35 of file RunAnalysis.cc.

◆ ~RunAnalysis()

RunAnalysis::~RunAnalysis ( )
virtualnoexcept

Definition at line 43 of file RunAnalysis.cc.

Member Function Documentation

◆ Process()

void RunAnalysis::Process ( )
virtual

Operate on each entry in the run tree.

Implements Analysis.

Definition at line 46 of file RunAnalysis.cc.

References HistogramMeanFromFile::Accumulate(), Analysis::AccumulatePerEntryHistograms(), Analysis::debug, Run::Histos, Analysis::histoSum, run, and Analysis::UserProcess().

Here is the call graph for this function:

Field Documentation

◆ run

Run* RunAnalysis::run
protected

Run object that data loaded from the file will be loaded into.

Definition at line 55 of file RunAnalysis.hh.

Referenced by Process().


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