Line data Source code
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 :
22 : #include "TNamed.h"
23 : #include "TObjArray.h"
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 : *
40 : * Currently implemented detecor classes <br>
41 : * * @see AliHLTTPCRunStatistics <br>
42 : *
43 : * @ingroup alihlt_run_statistics alihlt_trigger
44 : */
45 :
46 : class AliHLTRunStatistics : public TNamed {
47 :
48 : public:
49 :
50 : /** constructor */
51 : AliHLTRunStatistics();
52 : /** copy constructor */
53 : AliHLTRunStatistics (const AliHLTRunStatistics&);
54 : /** assignment operator */
55 : AliHLTRunStatistics& operator= (const AliHLTRunStatistics&);
56 : /** destructor */
57 : virtual ~AliHLTRunStatistics();
58 :
59 : /// Get detector name
60 0 : TString GetDetectorName() const { return GetName(); }
61 :
62 : /// Set detector name
63 0 : void SetDetectorName( TString s ) { SetName(s); }
64 : /// Set detector name
65 0 : void SetDetectorName(const char* name) { SetName(name); }
66 :
67 : /// inherited from TObject
68 : virtual void Print(Option_t* option) const;
69 :
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 ="");
78 :
79 : // -- event parameters ------------------------
80 :
81 : /// Set Number of events
82 0 : void SetNEvents( ULong_t i ) { fNEvents = i; }
83 :
84 : /// Increment event count
85 0 : void IncrementNEvents() { fNEvents++; }
86 :
87 : /// Get number of events
88 0 : ULong_t GetNEvents() const { return fNEvents; }
89 :
90 : /// Add clone of object
91 : int Add(const TObject* pObject);
92 :
93 : /// Find an object
94 : virtual TObject *FindObject(const char *name) const {
95 0 : return fMyObjects.FindObject(name); }
96 :
97 : private:
98 :
99 : /** Number of events */
100 : ULong_t fNEvents; // see above
101 :
102 : /// array of statistics objects owned by the array
103 : TObjArray fMyObjects; // see above
104 :
105 126 : ClassDef(AliHLTRunStatistics, 1);
106 :
107 : };
108 : #endif
|