Fixed warning
[u/mrichter/AliRoot.git] / ANALYSIS / AliAnalysisStatistics.h
CommitLineData
f091ecb5 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 */
5
6/* $Id$ */
7// Author: Andrei Gheata, 20/12/2010
8
9//==============================================================================
10// AliAnalysisStatistics - Class holding statistics information regarding the
11// number of events processed, failed and accepted.
12//==============================================================================
13
14#ifndef ROOT_TNamed
15#include "TNamed.h"
16#endif
17
18class TCollection;
19
20class AliAnalysisStatistics : public TNamed {
21
22protected:
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
c3732d79 27 UInt_t fOfflineMask; // Offline mask used for accepted events
f091ecb5 28public:
c3732d79 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) {}
f091ecb5 31 AliAnalysisStatistics(const AliAnalysisStatistics &other);
32 virtual ~AliAnalysisStatistics() {}
33
34 AliAnalysisStatistics& operator=(const AliAnalysisStatistics &other);
35 // Update methods
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;}
40 // Getters
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;}
c3732d79 45 UInt_t GetOfflineMask() const {return fOfflineMask;}
46 static const char *GetMaskAsString(UInt_t mask);
47
48 void SetOfflineMask(UInt_t mask) {fOfflineMask = mask;}
f091ecb5 49 virtual Long64_t Merge(TCollection* list);
f5cbe261 50 virtual void Print(const Option_t *option="") const;
f091ecb5 51
52 ClassDef(AliAnalysisStatistics,1) // Class holding the processed events statistics
53};
54#endif