]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/BASE/AliHLTHOMERSourceDesc.h
Minor cleanup of code.
[u/mrichter/AliRoot.git] / HLT / BASE / AliHLTHOMERSourceDesc.h
CommitLineData
155ff173 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
2ff24e4c 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
155ff173 27#include "TString.h"
1a04dcde 28#include "TNamed.h"
155ff173 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 */
1a04dcde 40class AliHLTHOMERSourceDesc : public TNamed {
155ff173 41
42public:
43
44 /** standard constructor */
45 AliHLTHOMERSourceDesc();
46
47 /** constructor
48 * @param hostname hostname of the source
49 * @param port port of the source
50 */
51 AliHLTHOMERSourceDesc( TString hostname, Int_t port );
52
53 /** destructor */
54 virtual ~AliHLTHOMERSourceDesc();
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 */
2ff24e4c 66 Bool_t IsSelected() { return fSelected; }
155ff173 67
68 /** Select this source */
2ff24e4c 69 void Select() { fSelected = kTRUE; }
155ff173 70
71 /** Deselect this source */
2ff24e4c 72 void Deselect() { fSelected = kFALSE; }
155ff173 73
74 // -- SETTER --
75
76 /** Set node name of this source
77 * @param hostname hostname of the source
78 * @param port port of the source
79 */
2ff24e4c 80 void SetHostnamePort( TString hostname, Int_t port ) { fHostname = hostname; fPort = port; }
155ff173 81
82 /** Set name/obj name of this source
83 * @param s1 source name
84 * @param s2 source class name, default is ""
85 */
2ff24e4c 86 void SetSourceName( TString s1, TString s2="" ) { fSourceName = s1; fClassName = s2; }
155ff173 87
88 /** Set detector, sub detector and sub sub detector of this source
89 * @param s1 detector name
90 * @param s2 subdetector name
91 * @param s3 subsubdetector name
92 */
93 void SetDetectors( TString s1, TString s2, TString s3 ) { fDetector = s1; fSubDetector = s2; fSubSubDetector = s3; }
94
95 /** Set HLT specification anf HLT data type of this source
96 * @param ul HLT specification
97 * @param s HLT data type
98 */
2ff24e4c 99 void SetSourceType( ULong_t ul, TString s ) { fSpecification = ul, fDataType = s; }
100
155ff173 101 // -- GETTER --
102
103 /** Get node name of this source
104 * @return hostname
105 */
2ff24e4c 106 TString GetHostname() { return fHostname; }
155ff173 107
108 /** Get node name of this source
109 * @return port
110 */
2ff24e4c 111 Int_t GetPort() { return fPort; }
155ff173 112
113 /** Get name of this source
60dd5042 114 * @return name
155ff173 115 */
2ff24e4c 116 TString GetSourceName() { return fSourceName; }
155ff173 117
118 /** Get object name of this source
119 * @return class name
120 */
2ff24e4c 121 TString GetClassName() { return fClassName; }
155ff173 122
123 /** Get detector of this source
124 * @return detector
125 */
2ff24e4c 126 TString GetDetector() { return fDetector; }
155ff173 127
128 /** Get sub detector of this source
129 * @return subdetector
130 */
2ff24e4c 131 TString GetSubDetector() { return fSubDetector; }
155ff173 132
133 /** Get sub sub detector of this source
134 * @return subsubdetector
135 */
136 TString GetSubSubDetector() { return fSubSubDetector; }
137
138 /** Get HLT data type of this source
139 * @return HLT data type
140 */
2ff24e4c 141 TString GetDataType() { return fDataType; }
155ff173 142
143 /** Get HLT specification of this source
144 * @return HLT specification
145 */
2ff24e4c 146 ULong_t GetSpecification() { return fSpecification; }
155ff173 147
148
149private:
150 /** copy constructor prohibited */
151 AliHLTHOMERSourceDesc(const AliHLTHOMERSourceDesc&);
152
153 /** assignment operator prohibited */
154 AliHLTHOMERSourceDesc& operator=(const AliHLTHOMERSourceDesc&);
155
156 /** is selected to read out */
157 Bool_t fSelected; // see above
158
159 /** Name of HOMER Node */
160 TString fHostname; // see above
161
162 /** Name of HOMER port */
163 Int_t fPort; // see above
164
165 /** Name of Source */
166 TString fSourceName; // see above
167
168 /** Object Name of Source */
169 TString fClassName; // see above
170
171 /** Detector Name, e.g. PHOS
172 * corresponds to HLT origin
173 */
174 TString fDetector; // see above
175
176 /** SubDetector Name e.g. MODULE */
177 TString fSubDetector; // see above
178
179 /** SubSubDetector Name e.g. PARTITION */
180 TString fSubSubDetector; // see above
181
182 /** HLT Specification */
183 ULong_t fSpecification; // see above
184
185 /** HLT DataType */
186 TString fDataType; // see above
187
188 ClassDef( AliHLTHOMERSourceDesc, 0 )
189};
190
191#endif