25#include "BDSBH4DBase.hh"
50 Analysis(
const std::string& treeNameIn,
52 const std::string& mergedHistogramNameIn,
53 bool perEntryAnalysis =
true,
54 bool debugIn =
false);
85 virtual void Write(TFile* outputFile);
90 std::vector<TH1*>* outputHistograms =
nullptr);
95 std::vector<TH1*> simpleHistograms;
96 std::vector<PerEntryHistogram*> perEntryHistograms;
Base class for any TTree analysis.
virtual void Execute()
Method which calls all other methods in order.
virtual void SimpleHistograms()
Process histogram definitions from configuration instance.
void PreparePerEntryHistograms()
Create structures necessary for per entry histograms.
long int entries
Number of entries in the chain.
bool debug
Whether debug print out is used or not.
HistogramMeanFromFile * histoSum
Merge of per event stored histograms.
void AccumulatePerEntryHistograms(long int entryNumber)
Accumulate means and variances for per entry histograms.
virtual void Write(TFile *outputFile)
Write rebdsim histograms.
Analysis()=delete
No default constructor for this base class.
void TerminatePerEntryHistograms()
Prepare result of per entry histogram accumulation.
std::string mergedHistogramName
Name of directory for merged histograms.
virtual void UserProcess()
Virtual function for user to overload and use. Does nothing by default.
bool perEntry
Whether to analyse each entry in the tree in a for loop or not.
void FillHistogram(HistogramDef *definition, std::vector< TH1 * > *outputHistograms=nullptr)
Create an individual histogram based on a definition.
Common specification for a histogram.
Accumulator to merge pre-made per-entry histograms.
Holder for information to calculate per entry histograms.