]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/BASE/AliHLTHOMERSourceDesc.h
Cosmetics. Fixed bug preventing creation of async block list
[u/mrichter/AliRoot.git] / HLT / BASE / AliHLTHOMERSourceDesc.h
1 //-*- Mode: C++ -*-
2 // $Id$
3 #ifndef ALIHLTHOMERSOURCEDESC_H
4 #define ALIHLTHOMERSOURCEDESC_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   AliHLTHOMERSourceDesc.h
11     @author Jochen Thaeder
12     @date   
13     @brief  Container for HOMER Sources
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 /**
23  * @defgroup alihlt_homer HOMER handling for AliROOT
24  * This section describes the handling of HOMER Sources, Blocks 
25  * and the HOMER Reader inside the HLT and AliROOT
26  */
27
28 #include "TString.h"
29 #include "TNamed.h"
30
31 /**
32  * @class AliHLTHOMERSourceDesc
33  * This class contains the information of 1 homer source: hostname, port for the HOMER 
34  * interface as well as data specifications. It used in order to fill these sources in 
35  * TLists. ( It has to inherit from TObject ). Further more it knows if this source was
36  * selected for read from a user. Mainly used in the AliEVEHOMERManager, as source 
37  * objects for AliEVE.
38  * 
39  * @ingroup alihlt_homer
40  */
41 class AliHLTHOMERSourceDesc : public TNamed {
42
43 public:
44
45   /**  constructor */
46   AliHLTHOMERSourceDesc();       
47
48   /** destructor */
49   virtual ~AliHLTHOMERSourceDesc();
50
51   /*
52    * ---------------------------------------------------------------------------------
53    *                        Selection - public
54    * ---------------------------------------------------------------------------------
55    */
56
57   // -- SELECTION --
58
59   /** Set selection state
60    * @param state      state, either kTRUE or kFALSE
61    */
62   void SetState( Bool_t state ) { fSelected = state; }
63
64   /** Checks if Source is selected to readout 
65    * @return           returns state, either kTRUE or kFALSE
66    */
67   Bool_t IsSelected()           { return fSelected; }
68
69   /** Select this source */
70   void Select()                 { fSelected = kTRUE; }
71   
72   /** Deselect this source */
73   void Deselect()               { fSelected = kFALSE; }
74
75   /*
76    * ---------------------------------------------------------------------------------
77    *                        Setter - public
78    * ---------------------------------------------------------------------------------
79    */
80
81   /** Set Service of this source 
82    *  @param hostname  hostname of the source
83    *  @param port      port of the source
84    *  @param origin    HLT data origin
85    *  @param type      HLT data type
86    *  @param spec      HLT data specification
87    */
88   void SetService( TString hostname, Int_t port, TString origin, 
89                    TString type, TString spec );
90
91   /*
92    * ---------------------------------------------------------------------------------
93    *                        Getter - public
94    * ---------------------------------------------------------------------------------
95    */
96
97   /** Get node name of this source 
98    * @return           hostname
99    */
100   TString GetHostname()       { return fHostname; }
101
102   /** Get node name of this source 
103    * @return           port
104    */
105   Int_t   GetPort()           { return fPort; }
106
107   /** Get name of this source 
108    * @return           name
109    */
110   TString GetSourceName()     { return fSourceName; }
111
112   /** Get detector of this source 
113    * @return           detector
114    */
115   TString GetDetector()       { return fDetector; }
116
117   /** Get sub detector of this source 
118    * @return           subdetector
119    */
120   Int_t   GetSubDetector()    { return fSubDetector; }
121
122   /** Get sub sub detector of this source 
123    * @return           subsubdetector
124    */
125   Int_t   GetSubSubDetector() { return fSubSubDetector; }
126
127   /** Get HLT data type of this source
128    * @return           HLT data type
129    */
130   TString GetDataType()       { return fDataType; }
131
132   /** Get HLT specification of this source
133    * @return           HLT specification
134    */
135   ULong_t GetSpecification()  { return fSpecification; }
136
137   ///////////////////////////////////////////////////////////////////////////////////
138
139 private:
140
141   /** copy constructor prohibited */
142   AliHLTHOMERSourceDesc(const AliHLTHOMERSourceDesc&);
143   
144   /** assignment operator prohibited */
145   AliHLTHOMERSourceDesc& operator=(const AliHLTHOMERSourceDesc&);
146
147   /*
148    * ---------------------------------------------------------------------------------
149    *                            Members - private
150    * ---------------------------------------------------------------------------------
151    */
152
153   /** is selected to read out */
154   Bool_t fSelected;             // see above
155
156   /** Name of Source */
157   TString fSourceName;          // see above
158
159   // -- Service Specifications --
160   // ----------------------------
161
162   /** Name of HOMER Node */
163   TString fHostname;            // see above
164
165   /** Name of HOMER port */
166   Int_t fPort;                  // see above
167
168   // -- Data Specifications --
169   // -------------------------
170
171   /** HLT DataType */
172   TString fDataType;            // see above
173
174   /** Detector Name, e.g. PHOS 
175    *  corresponds to HLT origin
176    */
177   TString fDetector;            // see above
178
179   /** HLT Specification */
180   ULong_t fSpecification;       // see above
181
182   /** SubDetector Name e.g. MODULE */
183   Int_t   fSubDetector;         // see above
184
185   /** SubSubDetector Name e.g. PARTITION */
186   Int_t   fSubSubDetector;      // see above
187
188   ClassDef( AliHLTHOMERSourceDesc, 0 )
189 };
190
191 #endif