]>
Commit | Line | Data |
---|---|---|
2ff24e4c | 1 | //-*- Mode: C++ -*- |
2 | // $Id$ | |
3 | #ifndef ALIHLTRUNSTATISTICS_H | |
4 | #define ALIHLTRUNSTATISTICS_H | |
5 | ||
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 */ | |
9 | ||
10 | /** @file AliHLTRunStatistics.h | |
11 | @author Jochen Thaeder | |
12 | @date | |
13 | @brief Base class for run statistics, for all detectors | |
14 | */ | |
15 | ||
16 | // see below for class documentation | |
17 | // or | |
18 | // refer to README to build package | |
19 | // or | |
20 | // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt | |
21 | ||
408bd64a | 22 | #include "TNamed.h" |
23 | #include "TObjArray.h" | |
2ff24e4c | 24 | #include "TString.h" |
25 | ||
26 | #include "AliHLTDataTypes.h" | |
27 | ||
28 | /** | |
29 | * @class AliHLTRunStatistics | |
30 | * @brief Base class for run statistics, for all detectors | |
31 | * | |
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. | |
37 | * | |
38 | * This is the base class. | |
39 | * | |
6291d256 | 40 | * Currently implemented detecor classes <br> |
41 | * * @see AliHLTTPCRunStatistics <br> | |
2ff24e4c | 42 | * |
43 | * @ingroup alihlt_run_statistics alihlt_trigger | |
44 | */ | |
45 | ||
408bd64a | 46 | class AliHLTRunStatistics : public TNamed { |
2ff24e4c | 47 | |
48 | public: | |
49 | ||
50 | /** constructor */ | |
51 | AliHLTRunStatistics(); | |
408bd64a | 52 | /** copy constructor */ |
53 | AliHLTRunStatistics (const AliHLTRunStatistics&); | |
54 | /** assignment operator */ | |
55 | AliHLTRunStatistics& operator= (const AliHLTRunStatistics&); | |
2ff24e4c | 56 | /** destructor */ |
57 | virtual ~AliHLTRunStatistics(); | |
58 | ||
408bd64a | 59 | /// Get detector name |
60 | TString GetDetectorName() const { return GetName(); } | |
61 | ||
62 | /// Set detector name | |
63 | void SetDetectorName( TString s ) { SetName(s); } | |
64 | /// Set detector name | |
65 | void SetDetectorName(const char* name) { SetName(name); } | |
66 | ||
67 | /// inherited from TObject | |
68 | virtual void Print(Option_t* option) const; | |
2ff24e4c | 69 | |
408bd64a | 70 | /// inherited from TObject, copy to the target object |
71 | virtual void Copy(TObject &object) const; | |
72 | ||
73 | /// Inherited from TObject. Create a new clone. | |
74 | virtual TObject *Clone(const char *newname="") const; | |
75 | ||
76 | /// Inherited from TObject. Clear content. | |
77 | virtual void Clear(Option_t * option =""); | |
2ff24e4c | 78 | |
79 | // -- event parameters ------------------------ | |
80 | ||
408bd64a | 81 | /// Set Number of events |
2ff24e4c | 82 | void SetNEvents( ULong_t i ) { fNEvents = i; } |
83 | ||
408bd64a | 84 | /// Increment event count |
85 | void IncrementNEvents() { fNEvents++; } | |
2ff24e4c | 86 | |
408bd64a | 87 | /// Get number of events |
88 | ULong_t GetNEvents() const { return fNEvents; } | |
2ff24e4c | 89 | |
408bd64a | 90 | /// Add clone of object |
91 | int Add(const TObject* pObject); | |
2ff24e4c | 92 | |
408bd64a | 93 | /// Find an object |
e62f2c56 | 94 | virtual TObject *FindObject(const char *name) const { |
95 | return fMyObjects.FindObject(name); } | |
2ff24e4c | 96 | |
408bd64a | 97 | private: |
2ff24e4c | 98 | |
99 | /** Number of events */ | |
100 | ULong_t fNEvents; // see above | |
101 | ||
408bd64a | 102 | /// array of statistics objects owned by the array |
103 | TObjArray fMyObjects; // see above | |
104 | ||
105 | ClassDef(AliHLTRunStatistics, 1); | |
2ff24e4c | 106 | |
107 | }; | |
108 | #endif |