3 #ifndef ALIHLTRUNSTATISTICS_H
4 #define ALIHLTRUNSTATISTICS_H
6 /* This file is property of and copyright by the ALICE HLT Project *
7 * ALICE Experiment at CERN, All rights reserved. *
8 * See cxx source for full Copyright notice */
10 /** @file AliHLTRunStatistics.h
11 @author Jochen Thaeder
13 @brief Base class for run statistics, for all detectors
16 // see below for class documentation
18 // refer to README to build package
20 // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
23 #include "TObjArray.h"
26 #include "AliHLTDataTypes.h"
29 * @class AliHLTRunStatistics
30 * @brief Base class for run statistics, for all detectors
32 * The run statistic classes hold information / histograms about certain
33 * characteristica of the processed events. They are devided into 3 parts.
34 * A base class @see AliHLTRunStatistics for general Information, detector
35 * specific classes like @see AliHLTTPCRunStatistics for the TPC and a summary
36 * class @see AliHLTRunStatisticsSummary which can hold several detector classes.
38 * This is the base class.
40 * Currently implemented detecor classes <br>
41 * * @see AliHLTTPCRunStatistics <br>
43 * @ingroup alihlt_run_statistics alihlt_trigger
46 class AliHLTRunStatistics : public TNamed {
51 AliHLTRunStatistics();
52 /** copy constructor */
53 AliHLTRunStatistics (const AliHLTRunStatistics&);
54 /** assignment operator */
55 AliHLTRunStatistics& operator= (const AliHLTRunStatistics&);
57 virtual ~AliHLTRunStatistics();
60 TString GetDetectorName() const { return GetName(); }
63 void SetDetectorName( TString s ) { SetName(s); }
65 void SetDetectorName(const char* name) { SetName(name); }
67 /// inherited from TObject
68 virtual void Print(Option_t* option) const;
70 /// inherited from TObject, copy to the target object
71 virtual void Copy(TObject &object) const;
73 /// Inherited from TObject. Create a new clone.
74 virtual TObject *Clone(const char *newname="") const;
76 /// Inherited from TObject. Clear content.
77 virtual void Clear(Option_t * option ="");
79 // -- event parameters ------------------------
81 /// Set Number of events
82 void SetNEvents( ULong_t i ) { fNEvents = i; }
84 /// Increment event count
85 void IncrementNEvents() { fNEvents++; }
87 /// Get number of events
88 ULong_t GetNEvents() const { return fNEvents; }
90 /// Add clone of object
91 int Add(const TObject* pObject);
94 virtual TObject *FindObject(const char *name) const {
95 return fMyObjects.FindObject(name); }
99 /** Number of events */
100 ULong_t fNEvents; // see above
102 /// array of statistics objects owned by the array
103 TObjArray fMyObjects; // see above
105 ClassDef(AliHLTRunStatistics, 1);