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