1 #ifndef ALIANALYSISSTATISTICS_H
2 #define ALIANALYSISSTATISTICS_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
7 // Author: Andrei Gheata, 20/12/2010
9 //==============================================================================
10 // AliAnalysisStatistics - Class holding statistics information regarding the
11 // number of events processed, failed and accepted.
12 //==============================================================================
20 class AliAnalysisStatistics : public TNamed {
23 Long64_t fNinput; // Total number of input events
24 Long64_t fNprocessed; // Number of events processed
25 Long64_t fNfailed; // Number of events for which reading failed
26 Long64_t fNaccepted; // Number of events that passed filtering criteria
27 UInt_t fOfflineMask; // Offline mask used for accepted events
29 AliAnalysisStatistics() : TNamed(),fNinput(0),fNprocessed(0),fNfailed(0),fNaccepted(0),fOfflineMask(0) {}
30 AliAnalysisStatistics(const char *name) : TNamed(name,""),fNinput(0),fNprocessed(0),fNfailed(0),fNaccepted(0),fOfflineMask(0) {}
31 AliAnalysisStatistics(const AliAnalysisStatistics &other);
32 virtual ~AliAnalysisStatistics() {}
34 AliAnalysisStatistics& operator=(const AliAnalysisStatistics &other);
36 void AddInput(Int_t nevents=1) {fNinput += nevents;}
37 void AddProcessed(Int_t nevents=1) {fNprocessed += nevents;}
38 void AddFailed(Int_t nevents=1) {fNfailed += nevents;}
39 void AddAccepted(Int_t nevents=1) {fNaccepted += nevents;}
41 Long64_t GetNinput() const {return fNinput;}
42 Long64_t GetNprocessed() const {return fNprocessed;}
43 Long64_t GetNfailed() const {return fNfailed;}
44 Long64_t GetNaccepted() const {return fNaccepted;}
45 UInt_t GetOfflineMask() const {return fOfflineMask;}
46 static const char *GetMaskAsString(UInt_t mask);
48 void SetOfflineMask(UInt_t mask) {fOfflineMask = mask;}
49 virtual Long64_t Merge(TCollection* list);
50 virtual void Print(const Option_t *option="") const;
52 ClassDef(AliAnalysisStatistics,1) // Class holding the processed events statistics