BOSS 7.0.1
BESIII Offline Software System
Loading...
Searching...
No Matches
InstallArea/include/DQAEvent/DQAEvent/DQAEvent.h
Go to the documentation of this file.
1
2// **************************************************************************
3// * *
4// * ! ! ! A T T E N T I O N ! ! ! *
5// * *
6// * This file was created automatically by GaudiObjDesc, please do not *
7// * delete it or edit it by hand. *
8// * *
9// * If you want to change this file, first change the corresponding *
10// * xml-file and rerun the tools from GaudiObjDesc (or run make if you *
11// * are using it from inside a Gaudi-package). *
12// * *
13// **************************************************************************
14
15#ifndef DQAEvent_DQAEvent_H
16#define DQAEvent_DQAEvent_H 1
17
18// Include files
19#include "GaudiKernel/DataObject.h"
20#include "GaudiKernel/boost_allocator.h"
21
22// Forward declarations
23
24namespace DQAEvent
25{
26
27 // Forward declarations
28
29 /** @class DQAEvent DQAEvent.h
30 *
31 * DQA Event Model
32 *
33 * @author Ji Xiaobin
34 * created Tue May 26 09:05:58 2009
35 *
36 */
37
38 class DQAEvent: public DataObject
39 {
40 public:
41
42 /// Default Constructor
43 DQAEvent() : m_EventTag(0) {}
44
45 /// Default Destructor
46 virtual ~DQAEvent() {}
47
48 /// Retrieve const
49 /// Event Tag
50 unsigned int EventTag() const;
51
52 /// Update
53 /// Event Tag
54 void setEventTag(unsigned int value);
55
56 /// Retrieve
57 /// Bhabha event
58 bool Bhabha() const;
59
60 /// Update
61 /// Bhabha event
62 void setBhabha(bool value);
63
64 /// Retrieve
65 /// di-muon event
66 bool Dimu() const;
67
68 /// Update
69 /// di-muon event
70 void setDimu(bool value);
71
72 /// Retrieve
73 /// inclusive hadronic event
74 bool Hadron() const;
75
76 /// Update
77 /// inclusive hadronic event
78 void setHadron(bool value);
79
80 /// Retrieve
81 /// cosmic event
82 bool Cosmic() const;
83
84 /// Update
85 /// cosmic event
86 void setCosmic(bool value);
87
88 /// Retrieve
89 /// psi'->pi+ pi- J/psi, J/psi->Rho pi
90 bool PipiRhopi() const;
91
92 /// Update
93 /// psi'->pi+ pi- J/psi, J/psi->Rho pi
94 void setPipiRhopi(bool value);
95
96 /// Retrieve
97 /// J/psi->Rho pi
98 bool Rhopi() const;
99
100 /// Update
101 /// J/psi->Rho pi
102 void setRhopi(bool value);
103
104 /// Retrieve
105 /// J/psi->Kstar K
106 bool Kstark() const;
107
108 /// Update
109 /// J/psi->Kstar K
110 void setKstark(bool value);
111
112 /// Retrieve
113 /// J/psi->P Pbar
114 bool Ppbar() const;
115
116 /// Update
117 /// J/psi->P Pbar
118 void setPpbar(bool value);
119
120 /// Retrieve
121 /// J/psi->Lambda Lambdabar
122 bool Lambdalambdabar() const;
123
124 /// Update
125 /// J/psi->Lambda Lambdabar
126 void setLambdalambdabar(bool value);
127
128 /// Retrieve
129 /// J/psi->p pbar pi+ pi-
130 bool Ppbarpipi() const;
131
132 /// Update
133 /// J/psi->p pbar pi+ pi-
134 void setPpbarpipi(bool value);
135
136
137 #ifndef _WIN32
138 /// operator new
139 static void* operator new ( size_t size )
140 {
141 return ( sizeof(DQAEvent) == size ?
142 boost::singleton_pool<DQAEvent, sizeof(DQAEvent)>::malloc() :
143 ::operator new(size) );
144 }
145
146 /// placement operator new
147 /// it is needed by libstdc++ 3.2.3 (e.g. in std::vector)
148 /// it is not needed in libstdc++ >= 3.4
149 static void* operator new ( size_t size, void* pObj )
150 {
151 return ::operator new (size,pObj);
152 }
153
154 /// operator delete
155 static void operator delete ( void* p )
156 {
157 boost::singleton_pool<DQAEvent, sizeof(DQAEvent)>::is_from(p) ?
158 boost::singleton_pool<DQAEvent, sizeof(DQAEvent)>::free(p) :
159 ::operator delete(p);
160 }
161
162 /// placement operator delete
163 /// not sure if really needed, but it does not harm
164 static void operator delete ( void* p, void* pObj )
165 {
166 ::operator delete (p, pObj);
167 }
168 #endif
169 protected:
170
171 private:
172
173 /// Offsets of bitfield EventTag
174 enum EventTagBits{BhabhaBits = 0,
175 DimuBits = 1,
176 HadronBits = 2,
177 CosmicBits = 3,
178 PipiRhopiBits = 4,
179 RhopiBits = 5,
180 KstarkBits = 6,
181 PpbarBits = 7,
182 LambdalambdabarBits = 8,
183 PpbarpipiBits = 9};
184
185 /// Bitmasks for bitfield EventTag
186 enum EventTagMasks{BhabhaMask = 0x1L,
187 DimuMask = 0x2L,
188 HadronMask = 0x4L,
189 CosmicMask = 0x8L,
190 PipiRhopiMask = 0x10L,
191 RhopiMask = 0x20L,
192 KstarkMask = 0x40L,
193 PpbarMask = 0x80L,
194 LambdalambdabarMask = 0x100L,
195 PpbarpipiMask = 0x200L
196 };
197
198
199 unsigned int m_EventTag; ///< Event Tag
200
201 }; // class DQAEvent
202
203} // namespace DQAEvent;
204
205// -----------------------------------------------------------------------------
206// end of class
207// -----------------------------------------------------------------------------
208
209// Including forward declarations
210
211inline unsigned int DQAEvent::DQAEvent::EventTag() const
212{
213 return m_EventTag;
214}
215
216inline void DQAEvent::DQAEvent::setEventTag(unsigned int value)
217{
218 m_EventTag = value;
219}
220
221inline bool DQAEvent::DQAEvent::Bhabha() const
222{
223 return 0 != ((m_EventTag & BhabhaMask) >> BhabhaBits);
224}
225
226inline void DQAEvent::DQAEvent::setBhabha(bool value)
227{
228 unsigned int val = (unsigned int)value;
229 m_EventTag &= ~BhabhaMask;
230 m_EventTag |= ((((unsigned int)val) << BhabhaBits) & BhabhaMask);
231}
232
233inline bool DQAEvent::DQAEvent::Dimu() const
234{
235 return 0 != ((m_EventTag & DimuMask) >> DimuBits);
236}
237
238inline void DQAEvent::DQAEvent::setDimu(bool value)
239{
240 unsigned int val = (unsigned int)value;
241 m_EventTag &= ~DimuMask;
242 m_EventTag |= ((((unsigned int)val) << DimuBits) & DimuMask);
243}
244
245inline bool DQAEvent::DQAEvent::Hadron() const
246{
247 return 0 != ((m_EventTag & HadronMask) >> HadronBits);
248}
249
250inline void DQAEvent::DQAEvent::setHadron(bool value)
251{
252 unsigned int val = (unsigned int)value;
253 m_EventTag &= ~HadronMask;
254 m_EventTag |= ((((unsigned int)val) << HadronBits) & HadronMask);
255}
256
257inline bool DQAEvent::DQAEvent::Cosmic() const
258{
259 return 0 != ((m_EventTag & CosmicMask) >> CosmicBits);
260}
261
262inline void DQAEvent::DQAEvent::setCosmic(bool value)
263{
264 unsigned int val = (unsigned int)value;
265 m_EventTag &= ~CosmicMask;
266 m_EventTag |= ((((unsigned int)val) << CosmicBits) & CosmicMask);
267}
268
269inline bool DQAEvent::DQAEvent::PipiRhopi() const
270{
271 return 0 != ((m_EventTag & PipiRhopiMask) >> PipiRhopiBits);
272}
273
274inline void DQAEvent::DQAEvent::setPipiRhopi(bool value)
275{
276 unsigned int val = (unsigned int)value;
277 m_EventTag &= ~PipiRhopiMask;
278 m_EventTag |= ((((unsigned int)val) << PipiRhopiBits) & PipiRhopiMask);
279}
280
281inline bool DQAEvent::DQAEvent::Rhopi() const
282{
283 return 0 != ((m_EventTag & RhopiMask) >> RhopiBits);
284}
285
286inline void DQAEvent::DQAEvent::setRhopi(bool value)
287{
288 unsigned int val = (unsigned int)value;
289 m_EventTag &= ~RhopiMask;
290 m_EventTag |= ((((unsigned int)val) << RhopiBits) & RhopiMask);
291}
292
293inline bool DQAEvent::DQAEvent::Kstark() const
294{
295 return 0 != ((m_EventTag & KstarkMask) >> KstarkBits);
296}
297
298inline void DQAEvent::DQAEvent::setKstark(bool value)
299{
300 unsigned int val = (unsigned int)value;
301 m_EventTag &= ~KstarkMask;
302 m_EventTag |= ((((unsigned int)val) << KstarkBits) & KstarkMask);
303}
304
305inline bool DQAEvent::DQAEvent::Ppbar() const
306{
307 return 0 != ((m_EventTag & PpbarMask) >> PpbarBits);
308}
309
310inline void DQAEvent::DQAEvent::setPpbar(bool value)
311{
312 unsigned int val = (unsigned int)value;
313 m_EventTag &= ~PpbarMask;
314 m_EventTag |= ((((unsigned int)val) << PpbarBits) & PpbarMask);
315}
316
317inline bool DQAEvent::DQAEvent::Lambdalambdabar() const
318{
319 return 0 != ((m_EventTag & LambdalambdabarMask) >> LambdalambdabarBits);
320}
321
322inline void DQAEvent::DQAEvent::setLambdalambdabar(bool value)
323{
324 unsigned int val = (unsigned int)value;
325 m_EventTag &= ~LambdalambdabarMask;
326 m_EventTag |= ((((unsigned int)val) << LambdalambdabarBits) & LambdalambdabarMask);
327}
328
329inline bool DQAEvent::DQAEvent::Ppbarpipi() const
330{
331 return 0 != ((m_EventTag & PpbarpipiMask) >> PpbarpipiBits);
332}
333
334inline void DQAEvent::DQAEvent::setPpbarpipi(bool value)
335{
336 unsigned int val = (unsigned int)value;
337 m_EventTag &= ~PpbarpipiMask;
338 m_EventTag |= ((((unsigned int)val) << PpbarpipiBits) & PpbarpipiMask);
339}
340
341
342#endif ///DQAEvent_DQAEvent_H
unsigned int EventTag() const
bool Bhabha() const
void setBhabha(bool value)
bool Dimu() const
bool Ppbarpipi() const
bool Rhopi() const
void setLambdalambdabar(bool value)
void setEventTag(unsigned int value)
bool Hadron() const
void setCosmic(bool value)
void setPpbarpipi(bool value)
void setKstark(bool value)
bool Lambdalambdabar() const
void setDimu(bool value)
bool Kstark() const
bool Cosmic() const
void setPipiRhopi(bool value)
bool Ppbar() const
void setRhopi(bool value)
void setPpbar(bool value)
void setHadron(bool value)
bool PipiRhopi() const