1 #ifndef ALIANALYSISSTATISTICS_H 2 #define ALIANALYSISSTATISTICS_H 42 fNaccepted(0),fOfflineMask(0), fMaxTasks(0),fNtasks(0), fCurrentTask(-1),
43 fTaskTimeReal(0), fTaskTimeCPU(0), fTaskNames(0), fTaskTimer(0) {}
45 : TNamed(name,
""),fNinput(0),fNprocessed(0),fNfailed(0),
46 fNaccepted(0),fOfflineMask(0), fMaxTasks(0),fNtasks(0), fCurrentTask(-1),
47 fTaskTimeReal(0), fTaskTimeCPU(0), fTaskNames(0), fTaskTimer(0) {}
53 void AddInput(Int_t nevents=1) {fNinput += nevents;}
55 void AddFailed(Int_t nevents=1) {fNfailed += nevents;}
66 Double_t
GetRealTime(Int_t itask)
const {
return (fTaskTimeReal) ? fTaskTimeReal[itask] : 0.;}
67 Double_t
GetCPUTime(Int_t itask)
const {
return (fTaskTimeCPU) ? fTaskTimeCPU[itask] : 0.;}
70 virtual Long64_t
Merge(TCollection* list);
71 virtual void Print(
const Option_t *option=
"")
const;
73 void StartTimer(Int_t itask,
const char *name,
const char *classname =
"");
TStopwatch * fTaskTimer
! Stopwatch for task timing
Double_t GetRealTime(Int_t itask) const
Long64_t fNfailed
Number of events for which reading failed.
Int_t fNtasks
Number of tasks.
Double_t * fTaskTimeCPU
Cumulated CPU time per task.
void SetOfflineMask(UInt_t mask)
virtual ~AliAnalysisStatistics()
Long64_t fNinput
Total number of input events.
Long64_t GetNaccepted() const
TObjArray * fTaskNames
Task names.
Long64_t GetNprocessed() const
static const char * GetMaskAsString(UInt_t mask)
void AddAccepted(Int_t nevents=1)
void AddFailed(Int_t nevents=1)
UInt_t fOfflineMask
Offline mask used for accepted events.
const char * GetTaskName(Int_t itask) const
Long64_t fNaccepted
Number of events that passed filtering criteria.
AliAnalysisStatistics basic class for storing statistics for the processed events. The object is mergeable and can be used for general purpose. In case a AliAnalysisTaskStat is used, this will set the global statistics object to the analysis manager and will update it for the accepted events.
Long64_t GetNfailed() const
void AddInput(Int_t nevents=1)
Long64_t fNprocessed
Number of events processed.
virtual Long64_t Merge(TCollection *list)
AliAnalysisStatistics & operator=(const AliAnalysisStatistics &other)
void StartTimer(Int_t itask, const char *name, const char *classname="")
void AddProcessed(Int_t nevents=1)
Double_t * fTaskTimeReal
Cumulated CPU time per task.
Double_t GetCPUTime(Int_t itask) const
Long64_t GetNinput() const
virtual void Print(const Option_t *option="") const
AliAnalysisStatistics(const char *name)
UInt_t GetOfflineMask() const
Int_t fMaxTasks
Allocated size for the task timing arrays.