]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/BASE/AliHLTHOMERBlockDesc.h
Changes needed for new HLT output DDLs.
[u/mrichter/AliRoot.git] / HLT / BASE / AliHLTHOMERBlockDesc.h
1 //-*- Mode: C++ -*-
2 // $Id$
3 #ifndef ALIHLTHOMERBLOCKDESC_H
4 #define ALIHLTHOMERBLOCKDESC_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   AliHLTHOMERBlockDesc.h
11     @author Jochen Thaeder
12     @date   
13     @brief  Container for HOMER Blocks
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 class AliHLTMessage;
23
24 #include "TString.h"
25 #include "TObject.h"
26
27 #include "AliHLTLoggingVariadicFree.h"
28
29 /**
30  * @class AliHLTHOMERBlockDesc
31  * This class contains the data which comes from 1 block, delivered via the 
32  * HOMER interface. It used in order to fill these block in TLists. ( It has 
33  * to inherit from TObject ). Further more it reads the specification of the 
34  * block and classifies the data as TObject, raw data, or something else. Mainly 
35  * used in the AliEVEHOMERManager, as data objects for AliEVE.
36  * 
37  * @ingroup alihlt_homer
38  */
39 class AliHLTHOMERBlockDesc : public TObject, public AliHLTLogging {
40
41 public:
42
43  /*
44   * ---------------------------------------------------------------------------------
45   *                            Constructor / Destructor 
46   * --------------------------------------------------------------------------------- 
47   */
48
49   /** standard constructor */
50   AliHLTHOMERBlockDesc();       
51
52   /** destructor */
53   virtual ~AliHLTHOMERBlockDesc();
54
55   /*
56    * ---------------------------------------------------------------------------------
57    *                            Data Handling - Setter - public
58    * --------------------------------------------------------------------------------- 
59    */
60
61   /** Set block data 
62    * @param data           Pointer to data
63    * @param size           Size of data
64    * @param origin         Detector
65    * @param dataType       HLT data type  
66    * @param specification  HLT specification
67    */
68   void SetBlock( void * data, ULong_t size, TString origin, TString dataType, ULong_t specification );
69
70   /*
71    * ---------------------------------------------------------------------------------
72    *                            TObject Handling - public
73    * --------------------------------------------------------------------------------- 
74    */
75
76   /** Returns if block contains a TObject
77    * @return           Returns kTRUE if block contains a TObject, kFALSE otherwise.
78    */
79   Bool_t IsTObject()              { return fIsTObject;} 
80
81   /** Returns Pointer to TObject */
82   TObject* GetTObject()           { return fTObject;   }
83
84   /** Get class name of this block 
85    * @return           class name
86    */
87   TString GetClassName()          { return fClassName; }
88
89   /*
90    * ---------------------------------------------------------------------------------
91    *                            Data Handling - Getter - public
92    * --------------------------------------------------------------------------------- 
93    */
94   
95   /** Returns if block contains a raw data, fClassName is not set in this case.
96    * @return           Returns kTRUE if block contains raw data, kFALSE otherwise.
97    */
98   Bool_t IsRawData()              { return fIsRawData;} 
99
100   /** Get pointer to data 
101    * @return           Pointer to data
102    */
103   void* GetData()                 { return fData; }
104
105   /** Get size of data 
106    * @return           Size of data
107    */
108   ULong_t GetSize()               { return fSize; }
109
110   /** Get name of this block
111    * @return           name
112    */
113   TString GetBlockName()          { return fBlockName; }
114
115   /** Get detector of this block 
116    * @return           Detector name
117    */
118   TString GetDetector()           { return fDetector; }
119   
120   /** Get HLT data type of this block 
121    * @return           HLT data type
122    */
123   TString GetDataType()           { return fDataType; }
124   
125   /** Get HLT specification of this block 
126    * @return           HLT specification
127    */
128   ULong_t GetSpecification()      { return fSpecification; }
129
130   /** Get sub detector of this block 
131    * @return           subdetector
132    */
133   Int_t   GetSubDetector()        { return fSubDetector; }
134
135   /** Get sub sub detector of this block
136    * @return           subsubdetector
137    */
138   Int_t   GetSubSubDetector()     { return fSubSubDetector; }
139
140   /** Returns kTRUE if HLT specification indicates a subdetector range
141    * @return           kTRUE if subdetector range
142    */
143   Bool_t  HasSubDetectorRange()   { return fHasSubDetectorRange; }
144
145   /** Returns kTRUE if HLT specification indicates a subsubdetector range
146    * @return           kTRUE if subsubdetector range
147    */
148   Bool_t  HasSubSubDetectorRange(){ return fHasSubSubDetectorRange; }
149
150   ///////////////////////////////////////////////////////////////////////////////////
151
152 private:
153
154   /** copy constructor prohibited */
155   AliHLTHOMERBlockDesc(const AliHLTHOMERBlockDesc&);
156
157   /** assignment operator prohibited */
158   AliHLTHOMERBlockDesc& operator=(const AliHLTHOMERBlockDesc&);
159
160   /*
161    * ---------------------------------------------------------------------------------
162    *                            Data Handling - private
163    * --------------------------------------------------------------------------------- 
164    */
165
166   /** Set all additional members*/
167   void SetBlockParameters();
168
169   /** Checks if Block contains a TObject. 
170    * If so, set fIsTObject to kTRUE, otherwise kFALSE
171    * @return           fIsTObject
172    */
173   Bool_t CheckIfTObject();
174
175   /** Checks if Block contains a TObject raw data.
176    * If so, set fIsRawData to kTRUE, otherwise kFALSE
177    * @return           fIsRawData
178    */
179   Bool_t CheckIfRawData();
180
181   /*
182    * ---------------------------------------------------------------------------------
183    *                            Members - private
184    * --------------------------------------------------------------------------------- 
185    */
186
187   // -- Block properties --
188   // ----------------------
189
190   /** Pointer to data of the block */
191   Char_t* fData;                    //
192               
193   /** Size of data */
194   ULong_t fSize;                    // see above
195
196   /** Block Name */
197   TString fBlockName;               // see above
198
199   // -- Data flags --
200   // ----------------
201
202   /** States if block contains a TObject */
203   Bool_t fIsTObject;                // see above
204
205   /** States if block contains a raw data */
206   Bool_t fIsRawData;                // see above
207
208   // -- TObject properties --
209   // ------------------------
210
211   /** AliHTMessage object containg a TObject */
212   AliHLTMessage* fMessage;          //
213
214   /** TObject extracted out of @see AliHLTMessage */
215   TObject*       fTObject;          //
216
217   /** Class Name of the block */
218   TString        fClassName;        // see above
219   
220   // -- Data Specifications --
221   // -------------------------
222
223   /** HLT DataType */
224   TString fDataType;                // see above 
225
226   /** Detector Name, e.g. PHOS */
227   TString fDetector;                // see above
228
229   /** HLT Specification */
230   ULong_t fSpecification;           // see above
231
232   // XXXXXXXXXXXXXXXXXXXXXXXX REMOVE IF NOT NEEDED XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
233
234   // -- Sub Detector Specifications --
235   // ---------------------------------
236   
237   /** SubDetector Name e.g. MODULE */
238   Int_t   fSubDetector;             // see above
239
240   /** SubSubDetector Name e.g. PARTITION */
241   Int_t   fSubSubDetector;          // see above
242
243   /** States id block has a subdetector range */
244   Bool_t  fHasSubDetectorRange;     // see above
245
246   /** States id block has a subsubdetector range */
247   Bool_t  fHasSubSubDetectorRange;  // see above
248
249   // XXXXXXXXXXXXXXXXXXXXXXXX REMOVE IF NOT NEEDED XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
250
251   ClassDef( AliHLTHOMERBlockDesc, 2 )
252 };
253
254 #endif