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