]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/BASE/AliHLTHOMERSourceDesc.h
string.h instead of cstring on Solaris x86
[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
21#include "TString.h"
1a04dcde 22#include "TNamed.h"
155ff173 23
24/**
25 * @class AliHLTHOMERSourceDesc
26 * This class contains the information of 1 homer source: hostname, port for the HOMER
27 * interface as well as data specifications. It used in order to fill these sources in
28 * TLists. ( It has to inherit from TObject ). Further more it knows if this source was
29 * selected for read from a user. Mainly used in the AliEVEHOMERManager, as source
30 * objects for AliEVE.
31 *
32 * @ingroup alihlt_homer
33 */
1a04dcde 34class AliHLTHOMERSourceDesc : public TNamed {
155ff173 35
36public:
37
38 /** standard constructor */
39 AliHLTHOMERSourceDesc();
40
41 /** constructor
42 * @param hostname hostname of the source
43 * @param port port of the source
44 */
45 AliHLTHOMERSourceDesc( TString hostname, Int_t port );
46
47 /** destructor */
48 virtual ~AliHLTHOMERSourceDesc();
49
50 // -- SELECTION --
51
52 /** Set selection state
53 * @param state state, either kTRUE or kFALSE
54 */
55 void SetState( Bool_t state ) { fSelected = state; }
56
57 /** Checks if Source is selected to readout
58 * @return returns state, either kTRUE or kFALSE
59 */
60 Bool_t IsSelected() { return fSelected; }
61
62 /** Select this source */
63 void Select() { fSelected = kTRUE; }
64
65 /** Deselect this source */
66 void Deselect() { fSelected = kFALSE; }
67
68 // -- SETTER --
69
70 /** Set node name of this source
71 * @param hostname hostname of the source
72 * @param port port of the source
73 */
74 void SetHostnamePort( TString hostname, Int_t port ) { fHostname = hostname; fPort = port; }
75
76 /** Set name/obj name of this source
77 * @param s1 source name
78 * @param s2 source class name, default is ""
79 */
80 void SetSourceName( TString s1, TString s2="" ) { fSourceName = s1; fClassName = s2; }
81
82 /** Set detector, sub detector and sub sub detector of this source
83 * @param s1 detector name
84 * @param s2 subdetector name
85 * @param s3 subsubdetector name
86 */
87 void SetDetectors( TString s1, TString s2, TString s3 ) { fDetector = s1; fSubDetector = s2; fSubSubDetector = s3; }
88
89 /** Set HLT specification anf HLT data type of this source
90 * @param ul HLT specification
91 * @param s HLT data type
92 */
93 void SetSourceType( ULong_t ul, TString s ) { fSpecification = ul, fDataType = s; }
94
95 // -- GETTER --
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
60dd5042 108 * @return name
155ff173 109 */
110 TString GetSourceName() { return fSourceName; }
111
112 /** Get object name of this source
113 * @return class name
114 */
115 TString GetClassName() { return fClassName; }
116
117 /** Get detector of this source
118 * @return detector
119 */
120 TString GetDetector() { return fDetector; }
121
122 /** Get sub detector of this source
123 * @return subdetector
124 */
125 TString GetSubDetector() { return fSubDetector; }
126
127 /** Get sub sub detector of this source
128 * @return subsubdetector
129 */
130 TString GetSubSubDetector() { return fSubSubDetector; }
131
132 /** Get HLT data type of this source
133 * @return HLT data type
134 */
135 TString GetDataType() { return fDataType; }
136
137 /** Get HLT specification of this source
138 * @return HLT specification
139 */
140 ULong_t GetSpecification() { return fSpecification; }
141
142
143private:
144 /** copy constructor prohibited */
145 AliHLTHOMERSourceDesc(const AliHLTHOMERSourceDesc&);
146
147 /** assignment operator prohibited */
148 AliHLTHOMERSourceDesc& operator=(const AliHLTHOMERSourceDesc&);
149
150 /** is selected to read out */
151 Bool_t fSelected; // see above
152
153 /** Name of HOMER Node */
154 TString fHostname; // see above
155
156 /** Name of HOMER port */
157 Int_t fPort; // see above
158
159 /** Name of Source */
160 TString fSourceName; // see above
161
162 /** Object Name of Source */
163 TString fClassName; // see above
164
165 /** Detector Name, e.g. PHOS
166 * corresponds to HLT origin
167 */
168 TString fDetector; // see above
169
170 /** SubDetector Name e.g. MODULE */
171 TString fSubDetector; // see above
172
173 /** SubSubDetector Name e.g. PARTITION */
174 TString fSubSubDetector; // see above
175
176 /** HLT Specification */
177 ULong_t fSpecification; // see above
178
179 /** HLT DataType */
180 TString fDataType; // see above
181
182 ClassDef( AliHLTHOMERSourceDesc, 0 )
183};
184
185#endif