![]() |
KaliVeda
Toolkit for HIC analysis
|
Abstract base class for user analysis of raw data.
The user's analysis class must implement the following methods:
InitAnalysis() is called once at the beginning of the analyis. It is the place to define the histograms and/or TTrees you want to fill in your analysis:
Definition at line 43 of file KVRawDataAnalyser.h.
#include <KVRawDataAnalyser.h>

Static Public Member Functions | |
| static void | Make (const Char_t *kvsname="MyOwnRawDataAnalyser") |
| Automatic generation of derived class for raw data analysis. More... | |
Static Public Member Functions inherited from KVDataAnalyser | |
| static Bool_t | AbortProcessingLoop () |
| static KVDataAnalyser * | GetAnalyser (const Char_t *plugin) |
| static Bool_t | IsRunningBatchAnalysis () |
| static void | RunAnalyser (const Char_t *plugin="") |
| static void | SetAbortProcessingLoop (Bool_t now=kTRUE) |
Static Public Member Functions inherited from TObject | |
| static TClass * | Class () |
| static const char * | Class_Name () |
| static constexpr Version_t | Class_Version () |
| static const char * | DeclFileName () |
| static Longptr_t | GetDtorOnly () |
| static Bool_t | GetObjectStat () |
| static void | SetDtorOnly (void *obj) |
| static void | SetObjectStat (Bool_t stat) |
Private Member Functions | |
| void | AbortDuringRunProcessing () |
| Method called to abort analysis during processing of a run. More... | |
| void | add_histo (TH1 *histo) |
| void | add_tree (TTree *tree) |
| void | FillTH1 (TH1 *h1, Double_t one, Double_t two) |
| void | FillTH2 (TH2 *h2, Double_t one, Double_t two, Double_t three) |
| void | FillTH3 (TH3 *h3, Double_t one, Double_t two, Double_t three, Double_t four) |
| void | FillTProfile (TProfile *h1, Double_t one, Double_t two, Double_t three) |
| void | FillTProfile2D (TProfile2D *h2, Double_t one, Double_t two, Double_t three, Double_t four) |
| void | ProcessRun () |
| void | SetCombinedOutputFile (const KVString &filename) |
Private Attributes | |
| KVString | fCombinedOutputFile |
| optional name for single results file with trees and histos More... | |
| KVDBRun * | fCurrentRun |
| poiner to current run More... | |
| Long64_t | fEventNumber |
| event number in current run More... | |
| KVHashList | fHistoList |
| list of histograms of user analysis More... | |
| KVUserAnalysisOptionList | fOptionList |
| list of options set by user for analysis More... | |
| KVRawDataReader * | fRunFile |
| currently analysed run file More... | |
| run_index_t | fRunNumber |
| run-index of current file More... | |
| KVRawDataPatchList | fRustines |
| TFile * | fTreeFile |
| KVHashList | fTreeList |
| list of trees of user analysis More... | |
| Long64_t | TotalEntriesToRead |
Additional Inherited Members | |
Public Types inherited from KVDataAnalyser | |
| enum | EProofMode { None , Lite , Proof } |
Public Types inherited from TObject | |
| enum | EDeprecatedStatusBits |
| enum | EStatusBits |
Public Attributes inherited from TObject | |
| kBitMask | |
| kCanDelete | |
| kCannotPick | |
| kHasUUID | |
| kInconsistent | |
| kInvalidObject | |
| kIsOnHeap | |
| kIsReferenced | |
| kMustCleanup | |
| kNoContextMenu | |
| kNotDeleted | |
| kObjInCanvas | |
| kOverwrite | |
| kSingleKey | |
| kWriteDelete | |
| kZombie | |
Protected Member Functions inherited from TObject | |
| virtual void | DoError (int level, const char *location, const char *fmt, va_list va) const |
| void | MakeZombie () |
Protected Attributes inherited from TObject | |
| kOnlyPrepStep | |
| KVRawDataAnalyser::KVRawDataAnalyser | ( | ) |
Default constructor.
Definition at line 21 of file KVRawDataAnalyser.cpp.
|
virtual |
Destructor.
Definition at line 34 of file KVRawDataAnalyser.cpp.
|
private |
Method called to abort analysis during processing of a run.
Definition at line 485 of file KVRawDataAnalyser.cpp.
Definition at line 64 of file KVRawDataAnalyser.h.
User must call CreateTreeFile(const Char_t*) before calling this method
Definition at line 68 of file KVRawDataAnalyser.h.
|
inline |
Add a user histogram to the analysis. The name of the histogram can later be used in calls to FillHisto().
| HistoType | valid ROOT histogram class name |
| args | arguments required by constructor of HistoType class |
Definition at line 185 of file KVRawDataAnalyser.h.
Definition at line 191 of file KVRawDataAnalyser.h.
Create TTree and add to list of trees to be filled during analysis. name can be used to fill individual TTree with FillTree().
Definition at line 205 of file KVRawDataAnalyser.h.
Definition at line 212 of file KVRawDataAnalyser.h.
|
pure virtual |
Implemented in KVRawDataReconstructor.
| void KVRawDataAnalyser::CalculateTotalEventsToRead | ( | ) |
loop over runs and calculate total events
Definition at line 276 of file KVRawDataAnalyser.cpp.
This method must be called before creating any user TTree in InitAnalysis(). If no filename is given, default name="TreeFileFrom[name of analysis class].root"
Definition at line 445 of file KVRawDataAnalyser.cpp.
|
pure virtual |
Implemented in KVRawDataReconstructor.
|
pure virtual |
Implemented in KVRawDataReconstructor.
| void KVRawDataAnalyser::FillHisto | ( | const Char_t * | sname, |
| const Char_t * | label, | ||
| Double_t | weight = 1 |
||
| ) |
Fill 1D histogram with named bins.
Definition at line 327 of file KVRawDataAnalyser.cpp.
| void KVRawDataAnalyser::FillHisto | ( | const Char_t * | histo_name, |
| Double_t | one, | ||
| Double_t | two = 1, |
||
| Double_t | three = 1, |
||
| Double_t | four = 1 |
||
| ) |
Find in the list, if there is an histogram named "histo_name" If not print an error message If yes redirect to the right method according to its closest mother class to fill it
Definition at line 295 of file KVRawDataAnalyser.cpp.
Definition at line 80 of file KVRawDataAnalyser.h.
|
inlineprivate |
Definition at line 88 of file KVRawDataAnalyser.h.
|
inlineprivate |
Definition at line 96 of file KVRawDataAnalyser.h.
|
inlineprivate |
Definition at line 84 of file KVRawDataAnalyser.h.
|
inlineprivate |
Definition at line 92 of file KVRawDataAnalyser.h.
Filltree method, the tree named tree_name has to be declared with AddTTree(TTree*) method
if no sname="", all trees in the list is filled
Definition at line 348 of file KVRawDataAnalyser.cpp.
|
inline |
Definition at line 144 of file KVRawDataAnalyser.h.
|
inline |
Definition at line 150 of file KVRawDataAnalyser.h.
|
inline |
Definition at line 139 of file KVRawDataAnalyser.h.
Definition at line 232 of file KVRawDataAnalyser.h.
|
inline |
Definition at line 223 of file KVRawDataAnalyser.h.
Definition at line 266 of file KVRawDataAnalyser.h.
|
inline |
Definition at line 162 of file KVRawDataAnalyser.h.
|
inline |
Definition at line 133 of file KVRawDataAnalyser.h.
Definition at line 129 of file KVRawDataAnalyser.h.
|
inlineoverridevirtual |
Reimplemented from KVDataAnalyser.
Definition at line 115 of file KVRawDataAnalyser.h.
Definition at line 236 of file KVRawDataAnalyser.h.
|
inline |
Definition at line 227 of file KVRawDataAnalyser.h.
|
pure virtual |
Implemented in KVRawDataReconstructor.
|
pure virtual |
Implemented in KVRawDataReconstructor.
Definition at line 262 of file KVRawDataAnalyser.h.
Automatic generation of derived class for raw data analysis.
Definition at line 469 of file KVRawDataAnalyser.cpp.
|
private |
Perform treatment of a given runfile
Before processing begins, after opening the runfile, and initialising the experimental setup (KVMultiDetArray object accessible through global pointer gMultiDetArray), the user's InitRun() method is called.
After reading each runfile, user's EndRun() method is called.
For each event of each runfile, user's Analysis() method is called just after calling gMultiDetArray->HandleRawDataEvent(fRunfile).
In the Analysis() method the user can test gMultiDetArray->HandledRawData() to know if some pertinent data was found in the event or not.
For further customisation, the following methods are called just before and just after each of these methods:
Definition at line 66 of file KVRawDataAnalyser.cpp.
|
virtual |
Write in file all histograms declared with AddHisto(TH1*)
If no filename is specified, set default name : HistoFileFrom[name_of_class].root
If a filename is specified, search in gROOT->GetListOfFiles() if this file has been already opened
onlyfilled flag allow to write all (onlyfilled=kFALSE, default) or only histograms (onlyfilled=kTRUE) those have been filled
Definition at line 385 of file KVRawDataAnalyser.cpp.
Call in InitAnalysis() to set the name of the single output file containing all histograms and TTrees produced by analysis. This is equivalent to running the analysis with option CombinedOutputFile=[filename] but setting this option in InitAnalysis() will not work. Note that if this method is not called/the option is not given, histograms and TTrees will be written in separate files.
Definition at line 101 of file KVRawDataAnalyser.h.
Call in InitAnalysis() to set the name of the single output file containing all histograms and TTrees produced by analysis.
For interactive jobs, filename will be used for the ROOT file.
For jobs using a batch system to execute many jobs in parallel, we use the job name with the '.root' extension.
Definition at line 242 of file KVRawDataAnalyser.h.
Definition at line 258 of file KVRawDataAnalyser.h.
|
overridevirtual |
Perform analysis of chosen runs
Before beginning the loop over the runs, the user's InitAnalysis() method is called. After completing the analysis of all runs, the user's EndAnalysis() method is called.
Further customisation of the event loop is possible by overriding the methods
which are executed respectively just before and just after those methods.
Reimplemented from KVDataAnalyser.
Definition at line 190 of file KVRawDataAnalyser.cpp.
Definition at line 270 of file KVRawDataAnalyser.h.
|
private |
optional name for single results file with trees and histos
Definition at line 54 of file KVRawDataAnalyser.h.
|
private |
poiner to current run
Definition at line 52 of file KVRawDataAnalyser.h.
|
private |
event number in current run
Definition at line 48 of file KVRawDataAnalyser.h.
|
private |
list of histograms of user analysis
Definition at line 49 of file KVRawDataAnalyser.h.
|
private |
list of options set by user for analysis
Definition at line 55 of file KVRawDataAnalyser.h.
|
private |
currently analysed run file
Definition at line 46 of file KVRawDataAnalyser.h.
|
private |
run-index of current file
Definition at line 47 of file KVRawDataAnalyser.h.
|
private |
Definition at line 57 of file KVRawDataAnalyser.h.
|
private |
Definition at line 51 of file KVRawDataAnalyser.h.
|
private |
list of trees of user analysis
Definition at line 50 of file KVRawDataAnalyser.h.
|
private |
Definition at line 53 of file KVRawDataAnalyser.h.