![]() |
KaliVeda
Toolkit for HIC analysis
|
Abstract base class for user analysis of raw data.
The user's analysis class must implement the following methods:
See the doc for each method.
Definition at line 37 of file KVRawDataAnalyser.h.
#include <KVRawDataAnalyser.h>

Public Member Functions | |
| KVRawDataAnalyser () | |
| Default constructor. More... | |
| virtual | ~KVRawDataAnalyser () |
| Destructor. More... | |
| virtual Bool_t | Analysis ()=0 |
| void | CalculateTotalEventsToRead () |
| loop over runs and calculate total events More... | |
| virtual void | EndAnalysis ()=0 |
| virtual void | EndRun ()=0 |
| KVDBRun * | GetCurrentRun () const |
| KVDBRunFile * | GetCurrentRunFile () const |
| Long64_t | GetEventNumber () const |
| TString | GetOpt (const Char_t *option) const |
| const KVRawDataReader & | GetRunFileReader () const |
| const run_index_t & | GetRunIndexNumber () const |
| Int_t | GetRunNumber () const |
| Long64_t | GetTotalEntriesToRead () const override |
| virtual void | InitAnalysis ()=0 |
| virtual void | InitRun ()=0 |
| Bool_t | IsOptGiven (const Char_t *option) |
| virtual void | SaveHistos (const Char_t *filename="", Option_t *option="recreate", Bool_t onlyfilled=kFALSE) |
| void | SetJobOutputFileName (const TString &filename) |
| void | SetOpt (const Char_t *option, const Char_t *value) |
| void | SubmitTask () override |
| void | UnsetOpt (const Char_t *opt) |
Public Member Functions inherited from KVDataSetAnalyser | |
| KVDataSetAnalyser () | |
| Default constructor. More... | |
| virtual | ~KVDataSetAnalyser () |
| Destructor. More... | |
| void | AddJobDescriptionList (TList *) override |
| virtual void | ChooseAnalysisTask () |
| void | ChooseDataSet () |
| void | ChooseDataType () |
| void | ChooseRuns (KVDBSystem *system=nullptr, const Char_t *data_type="") |
| void | ChooseSystem (const Char_t *data_type="") |
| void | ClearRunList () |
| TString | ExpandAutoBatchName (const Char_t *format) const override |
| KVDBRun * | GetAnalysedRun () const override |
| KVDBSystem * | GetAnalysedSystem () const override |
| TString | GetAnalyserClassNameForBatchJob () override |
| const KVDataSet * | GetDataSet () const |
| const run_index_list & | GetFullRunList () const |
| const KV2Body * | GetKinematics () const override |
| Int_t | GetNumberOfFilesToAnalyse () const override |
| const Char_t * | GetRecognisedAutoBatchNameKeywords () const override |
| KVString | GetRootDirectoryOfDataToAnalyse () const override |
| Returns path to data to be analysed. More... | |
| const run_index_list & | GetRunList () const |
| const KVDBSystem * | GetSystem () const |
| Bool_t | IsChooseDataSet () const |
| Bool_t | IsChooseRuns () const |
| Bool_t | IsChooseSystem () const |
| Bool_t | IsChooseTask () const |
| Bool_t | ReadBatchEnvFile (const TString &filename) override |
| void | Reset () override |
| void | SetChooseDataSet (Bool_t yes=kTRUE) |
| void | SetChooseRuns (Bool_t yes=kTRUE) |
| void | SetChooseSystem (Bool_t yes=kTRUE) |
| void | SetChooseTask (Bool_t yes=kTRUE) |
| void | SetDataSet (const Char_t *name) |
| void | SetDataSet (KVDataSet *ds) |
| void | SetFullRunList (const run_index_list &nl) |
| void | SetRuns (const run_index_list &nl, Bool_t check=kTRUE) |
| void | SetSystem (KVDBSystem *syst) |
| Set the System used in the analysis. More... | |
| TString | SystemBatchName () const |
| void | WriteBatchEnvFile (const TString &jobname, Bool_t save=kTRUE) override |
Public Member Functions inherited from KVDataAnalyser | |
| KVDataAnalyser () | |
| Default constructor. More... | |
| virtual | ~KVDataAnalyser () |
| Default destructor. More... | |
| Bool_t | BatchMode () const |
| virtual Bool_t | CheckStatusUpdateInterval (Long64_t nevents) const |
| virtual Bool_t | CheckTaskVariables () |
| void | ChooseNbEventToRead () |
| Ask user to set number of events to read. More... | |
| void | ChooseRunningMode () |
| void | ChooseUserClass () |
| Choose the user's analysis class. More... | |
| void | DeleteBatchStatusFile () const |
| Delete batch status file (and backup - '.bak') for batch job. More... | |
| void | DoStatusUpdate (Long64_t nevents) const |
| Print infos on events treated, disk usage, memory usage. More... | |
| Bool_t | DoUserClassFilesExist () |
| virtual TTree * | GetAnalysedTree () const |
| KVDataAnalysisTask * | GetAnalysisTask () const |
| const Char_t * | GetBatchName () |
| const Char_t * | GetBatchStatusFileName () const |
| Returns full path to file used to store status of running batch jobs. More... | |
| virtual const KVBatchSystem * | GetBatchSystem () |
| const KVString & | GetDataType () const |
| const Char_t * | GetLaunchDirectory () const |
| Long64_t | GetNbEventToRead (void) const |
| KVDataAnalyser * | GetParent () const |
| TString | GetPathToFileInLaunchDirectory (const TString &) const |
| EProofMode | GetProofMode () const |
| Double_t | GetStatusUpdateInterval () const |
| const UserClass & | GetUserClass () const |
| KVString | GetUserClassName () |
| const KVString & | GetUserClassOptions () const |
| const KVString & | GetUserIncludes () const |
| const KVString & | GetUserLibraries () const |
| Bool_t | IsMenus () const |
| Bool_t | IsQuit () const |
| Bool_t | IsSubmit () const |
| Bool_t | IsUserClassValid () const |
| virtual void | postAnalysis () |
| virtual void | postEndAnalysis () |
| virtual void | postEndRun () |
| virtual void | postInitAnalysis () |
| virtual void | postInitRun () |
| virtual void | preAnalysis () |
| virtual void | preEndAnalysis () |
| virtual void | preEndRun () |
| virtual void | preInitAnalysis () |
| virtual void | preInitRun () |
| virtual void | RegisterUserClass (TObject *) |
| virtual void | Run () |
| Check all task variables, then run analyser. More... | |
| virtual void | RunMenus () |
| Run data analyser in menu-driven mode. More... | |
| Bool_t | RunningInLaunchDirectory () |
| virtual void | SetAnalysedTree (TTree *) |
| void | SetAnalysisTask (KVDataAnalysisTask *at) |
| virtual void | SetAuxFileList (const KVUnownedList &) |
| void | SetBatchMode (Bool_t on=kTRUE) |
| void | SetBatchName (const Char_t *batchname) |
| void | SetBatchSystem (KVBatchSystem *bs) |
| void | SetDataType (const Char_t *name) |
| virtual void | SetFileList (const KVUnownedList &) |
| void | SetMenus (Bool_t on=kTRUE) |
| void | SetNbEventToRead (Long64_t nb=0) |
| void | SetParent (KVDataAnalyser *da) |
| void | SetProofMode (EProofMode e) |
| void | SetQuit (Bool_t yes=kTRUE) |
| void | SetStatusUpdateInterval (double t) |
| void | SetSubmit (Bool_t yes=kTRUE) |
| virtual void | SetTriggerConditionsForRun (int) |
| void | SetUserClass (const UserClass &kvs, Bool_t check=kTRUE) |
| void | SetUserClassOptions (const Char_t *o="") |
| void | SetUserIncludes (const Char_t *incDirs=0) |
| void | SetUserLibraries (const Char_t *libs=0) |
| void | UpdateBatchStatusFile (Int_t totev, Int_t evread, TString disk) const |
| Update infos in batch status file. More... | |
| void | UseBaseClassSubmitTask () |
| void | WriteBatchInfo (TTree *) |
Public Member Functions inherited from TObject | |
| TObject () | |
| TObject (const TObject &object) | |
| virtual | ~TObject () |
| void | AbstractMethod (const char *method) const |
| virtual void | AppendPad (Option_t *option="") |
| virtual void | Browse (TBrowser *b) |
| ULong_t | CheckedHash () |
| virtual const char * | ClassName () const |
| virtual void | Clear (Option_t *="") |
| virtual TObject * | Clone (const char *newname="") const |
| virtual Int_t | Compare (const TObject *obj) const |
| virtual void | Copy (TObject &object) const |
| virtual void | Delete (Option_t *option="") |
| virtual Int_t | DistancetoPrimitive (Int_t px, Int_t py) |
| virtual void | Draw (Option_t *option="") |
| virtual void | DrawClass () const |
| virtual TObject * | DrawClone (Option_t *option="") const |
| virtual void | Dump () const |
| virtual void | Error (const char *method, const char *msgfmt,...) const |
| virtual void | Execute (const char *method, const char *params, Int_t *error=nullptr) |
| virtual void | Execute (TMethod *method, TObjArray *params, Int_t *error=nullptr) |
| virtual void | ExecuteEvent (Int_t event, Int_t px, Int_t py) |
| virtual void | Fatal (const char *method, const char *msgfmt,...) const |
| virtual TObject * | FindObject (const char *name) const |
| virtual TObject * | FindObject (const TObject *obj) const |
| virtual Option_t * | GetDrawOption () const |
| virtual const char * | GetIconName () const |
| virtual const char * | GetName () const |
| virtual char * | GetObjectInfo (Int_t px, Int_t py) const |
| virtual Option_t * | GetOption () const |
| virtual const char * | GetTitle () const |
| virtual UInt_t | GetUniqueID () const |
| virtual Bool_t | HandleTimer (TTimer *timer) |
| virtual ULong_t | Hash () const |
| Bool_t | HasInconsistentHash () const |
| virtual void | Info (const char *method, const char *msgfmt,...) const |
| virtual Bool_t | InheritsFrom (const char *classname) const |
| virtual Bool_t | InheritsFrom (const TClass *cl) const |
| virtual void | Inspect () const |
| void | InvertBit (UInt_t f) |
| virtual TClass * | IsA () const |
| Bool_t | IsDestructed () const |
| virtual Bool_t | IsEqual (const TObject *obj) const |
| virtual Bool_t | IsFolder () const |
| R__ALWAYS_INLINE Bool_t | IsOnHeap () const |
| virtual Bool_t | IsSortable () const |
| R__ALWAYS_INLINE Bool_t | IsZombie () const |
| virtual void | ls (Option_t *option="") const |
| void | MayNotUse (const char *method) const |
| virtual Bool_t | Notify () |
| void | Obsolete (const char *method, const char *asOfVers, const char *removedFromVers) const |
| void | operator delete (void *ptr) |
| void | operator delete (void *ptr, void *vp) |
| void | operator delete[] (void *ptr) |
| void | operator delete[] (void *ptr, void *vp) |
| void * | operator new (size_t sz) |
| void * | operator new (size_t sz, void *vp) |
| void * | operator new[] (size_t sz) |
| void * | operator new[] (size_t sz, void *vp) |
| TObject & | operator= (const TObject &rhs) |
| virtual void | Paint (Option_t *option="") |
| virtual void | Pop () |
| virtual void | Print (Option_t *option="") const |
| virtual Int_t | Read (const char *name) |
| virtual void | RecursiveRemove (TObject *obj) |
| void | ResetBit (UInt_t f) |
| virtual void | SaveAs (const char *filename="", Option_t *option="") const |
| virtual void | SavePrimitive (std::ostream &out, Option_t *option="") |
| void | SetBit (UInt_t f) |
| void | SetBit (UInt_t f, Bool_t set) |
| virtual void | SetDrawOption (Option_t *option="") |
| virtual void | SetUniqueID (UInt_t uid) |
| virtual void | Streamer (TBuffer &) |
| void | StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b) |
| virtual void | SysError (const char *method, const char *msgfmt,...) const |
| R__ALWAYS_INLINE Bool_t | TestBit (UInt_t f) const |
| Int_t | TestBits (UInt_t f) const |
| virtual void | UseCurrentStyle () |
| virtual void | Warning (const char *method, const char *msgfmt,...) const |
| virtual Int_t | Write (const char *name=nullptr, Int_t option=0, Int_t bufsize=0) |
| virtual Int_t | Write (const char *name=nullptr, Int_t option=0, Int_t bufsize=0) const |
Public Member Functions inherited from KVDataAnalysisTreeHistoHandler< KVRawDataAnalyser > | |
| HistoType * | AddHisto (Args &&... args) |
| TTree * | AddTree (const TString &name, const TString &title="") |
| void | FillHisto (const Char_t *histo_name, const Char_t *label, Double_t weight=1) |
| Fill histogram with given name according to label bin and weight. More... | |
| void | FillHisto (const Char_t *histo_name, Double_t x, Double_t y=1, Double_t z=1, Double_t w=1) |
| Fill previously-declared histogram with given name and required arguments. More... | |
| void | FillTree (std::optional< TString > tree_name={}) |
| TH1 * | GetHisto (const Char_t *name) const |
| const KVHashList * | GetHistoList () const |
| TTree * | GetTree (const Char_t *name) const |
| const KVHashList * | GetTreeList () const |
| GetTreeList. More... | |
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) |
Static Public Member Functions inherited from KVDataAnalysisTreeHistoHandler< KVRawDataAnalyser > | |
| static const Char_t * | Class_Name () |
Friends | |
| class | KVDataAnalysisTreeHistoHandler< KVRawDataAnalyser > |
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.
|
pure virtual |
The Analysis() method is called for each event.
See ExampleRawAnalysis.cpp for a complete example.
Implemented in KVRawDataReconstructor.
| void KVRawDataAnalyser::CalculateTotalEventsToRead | ( | ) |
loop over runs and calculate total events
Definition at line 276 of file KVRawDataAnalyser.cpp.
|
pure virtual |
Implemented in KVRawDataReconstructor.
|
pure virtual |
Implemented in KVRawDataReconstructor.
|
inline |
Definition at line 147 of file KVRawDataAnalyser.h.
|
inline |
Definition at line 153 of file KVRawDataAnalyser.h.
|
inline |
Definition at line 142 of file KVRawDataAnalyser.h.
Definition at line 197 of file KVRawDataAnalyser.h.
|
inline |
Definition at line 165 of file KVRawDataAnalyser.h.
|
inline |
Definition at line 136 of file KVRawDataAnalyser.h.
Definition at line 132 of file KVRawDataAnalyser.h.
|
inlineoverridevirtual |
Reimplemented from KVDataAnalyser.
Definition at line 85 of file KVRawDataAnalyser.h.
|
pure virtual |
This is the 1st method called when a new analysis is started. It is the place to define any histograms and/or TTrees to be filled during the analysis, using AddHisto() and AddTree(), plus optionally the name of the output ROOT file containing them:
(for easy use of std::vector branches in the TTree, see KVTreeVectorBranchHandler::AddVectorBranch()).
Note that by using these methods as shown here the histograms and TTrees will automatically be written to file at the end of the analysis
See ExampleRawAnalysis.cpp for a complete example.
Implemented in KVRawDataReconstructor.
|
pure virtual |
This method is called every time a new runfile is opened.
This is the first time in the analysis where
gMultiDetArray: see Detector Array Geometries in the Users Guide)See ExampleRawAnalysis.cpp for a complete example.
Implemented in KVRawDataReconstructor.
Definition at line 193 of file KVRawDataAnalyser.h.
Automatic generation of derived class for raw data analysis.
Definition at line 388 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 301 of file KVRawDataAnalyser.cpp.
Call in InitAnalysis() to set the name of the 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, this will be replaced by the job name plus the '.root' extension.
| filename | name to use for ROOT file |
Definition at line 181 of file KVRawDataAnalyser.h.
Definition at line 189 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 201 of file KVRawDataAnalyser.h.
|
friend |
Definition at line 1 of file KVRawDataAnalyser.h.