]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/trigger/AliHLTRunSummary.h
coding violations and compilation warnings fixed (Sergey)
[u/mrichter/AliRoot.git] / HLT / trigger / AliHLTRunSummary.h
1 //-*- Mode: C++ -*-
2 // $Id$
3 #ifndef ALIHLTRUNSUMMARY_H
4 #define ALIHLTRUNSUMMARY_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   AliHLTRunSummary.h
11     @author Jochen Thaeder
12     @date  
13     @brief  Summary class for a run, merges 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 "TObject.h"
23 #include "TObjArray.h"
24
25 #include "AliHLTDataTypes.h"
26
27 /**
28  * @class  AliHLTRunSummary
29  * @brief  Summary class for a run, merges all detectors 
30  *
31  * The run statistic classes hold information / histograms about certain 
32  * characteristica of the processed events. They are devided into 3 parts. 
33  * A base class  @see AliHLTRunStatistics for general Information, detector 
34  * specific classes like @see AliHLTTPCRunStatistics for the TPC and a summary 
35  * class @see AliHLTRunSummary which can hold several detector classes.
36  * 
37  * This is the summary class.
38  * 
39  * See base class @see AliHLTRunStatistics for further information.
40  *
41  * @ingroup alihlt_run_statistics alihlt_trigger
42  */
43
44 class AliHLTRunSummary : public TObject {
45   
46 public:
47   
48   /** constructor */
49   AliHLTRunSummary();
50   /** destructor */
51   virtual ~AliHLTRunSummary();
52
53   // -- event parameters ------------------------
54
55   /** Set Number of events 
56    *  @param i number of events
57    */
58   void SetNEvents( ULong_t i )           { fNEvents = i; }
59
60   /** Add events */
61   void AddNEvents()                      { fNEvents++; }
62
63   /** Get number of events
64    *  @return number of events
65    */
66   ULong_t GetNEvents()                   { return fNEvents; }
67  
68   /** Set number of rejected events 
69    *  @param i number of events rejected
70    */
71   void SetNEventsRejected( ULong_t i )   { fNEventsRejected = i; }
72
73   /** Add rejected events */
74   void AddNEventsRejected()              { fNEventsRejected++; }
75
76   /** Get number of reejcted events 
77    *  @return number of events rejected
78    */
79   ULong_t GetNEventsRejected()           { return fNEventsRejected; }
80
81   // -- run parameters ------------------------
82
83   /** Set Run Number 
84    *  @param i run number
85    */
86   void SetRunNumber( AliHLTUInt32_t i )           { fRunNumber = i; }
87
88   /** Get Run Number 
89    *  @return run number
90    */
91   AliHLTUInt32_t GetRunNumber()                   { return  fRunNumber;}
92
93   /** Set Run Type 
94    *  @param i run type
95    */
96   void SetRunType( AliHLTUInt32_t i )             { fRunType = i; }
97
98   /** Get Run Type s
99    *  @return run type
100    */
101   AliHLTUInt32_t GetRunType()                     { return fRunType; }
102
103   // -- trigger parameters ------------------------
104
105   /** Set ocurrance of trigger classe with index ndx
106    *  @param ndx index of Trigger Class   
107    *  @return kTRUE on success
108    */
109   Bool_t AddTriggerClass( Int_t ndx );
110
111   /** Get ocurrance of trigger classes 
112    *  @return ptr to array of trigger classes
113    */
114   ULong_t* GetTriggerClasses()           { return fTriggerClasses; }
115   
116   // -- detector parameters ------------------------
117
118   /** Detector run statistics classes 
119    *  @return ptr to Detector arry
120    */
121   TObjArray* GetDetectorArray ()         { return fDetectorArray; }
122
123   /** Rest the Detector array, all elements are removed */
124   void ResetDetectorArray()              { if ( fDetectorArray ) fDetectorArray->Clear(); }
125
126   /** Add another detector run statistics class to detector arry 
127    *  @param obj to TObject, which should be added
128    *  @return kTRUE on success
129    */
130   Bool_t AddDetector( TObject *obj );
131
132 private:
133
134   /** copy constructor prohibited */
135   AliHLTRunSummary (const AliHLTRunSummary&);
136
137   /** assignment operator prohibited */
138   AliHLTRunSummary& operator= (const AliHLTRunSummary&);
139
140   /** Number of events */
141   ULong_t fNEvents;                              // see above
142
143   /** Number of rejected events */
144   ULong_t fNEventsRejected;                      // see above
145
146   /** Run Number */   
147   AliHLTUInt32_t fRunNumber;                     // see above
148
149   /** Run Type */
150   AliHLTUInt32_t fRunType;                       // see above
151
152   /** Ocurrance of trigger classes */
153   ULong_t fTriggerClasses[gkNCTPTriggerClasses]; // see above
154
155   /** Detector run statistics classes */
156   TObjArray* fDetectorArray;                     //! transient
157
158   ClassDef(AliHLTRunSummary, 0);  
159 };
160 #endif