BOSS 7.0.2
BESIII Offline Software System
Loading...
Searching...
No Matches
BesStatus.cxx
Go to the documentation of this file.
1//
2// BesStatus.cxx
3//
4
5#include <iostream>
6
7#include "BesVisLib/BesStatus.h"
8
9using namespace std;
10
11#ifndef __CINT__
13#endif
14
15//__________________________________________________________
16// BesStatus
17// holds view status flags
18//
19//
20BesStatus::BesStatus() : TObject() {
21 //
22 // BesStatus default constructor
23 if ( gDebug ) cout << "BesStatus default ctor called" << endl;
24}
26//__________________________________________________________
27
29 //
30 // BesStatus default destructor
31 if (gDebug) {
32 cout << "BesStatus default dtor called" << endl;
33 }
34}
35
36//__________________________________________________________
37
39 //
40 // default view settings
41 if ( type & k3DView ) {
42 if ( gDebug ) cout << "BesStatus default 3D called" << endl;
43
44 fMdcGlobal = 1; // nothing
45 fMdcTubes = 1; // tubes
46 fMdcWires = 0; // wires
47
48 fTofGlobal = 1; // nothing
49 fTofEast = 1; // scintilator
50 fTofBarrel = 1; // scintilator
51 fTofWest = 1; // scintilator
52
53 fEmcGlobal = 0; // nothing
54 fEmcEast = 1; // east frame, one cirlcle
55 fEmcBarrel = 1; // frame,
56 fEmcWest = 1; // west frame, one circle
57 fEmcSide = 0; // side
58
59 fMucGlobal = 1; // nothing
60 fMucEast = 0; // gap
61 fMucBarrel = 1; // gap
62 fMucWest = 0; // gap
63 fMucStrips = 0; // strips
64
65 fFull3DMdc = 0;
66 fFull3DTof = 0;
67 fFull3DEmc = 0;
68 fFull3DMuc = 0;
69
70 fBeamPipe = 1; // beamPipe
71 fZRPlaneOnXY = 0;
72 fAxis = 0;
73
75 fMdcHits = 1;
76
78 fTofHitsEast = 1;
80 fTofHitsWest = 1;
81
83 fEmcHitsEast = 1;
85 fEmcHitsWest = 1;
86 fEmcHitsSide = 0;
87
89 fMucHitsEast = 1;
91 fMucHitsWest = 1;
92
93 fTracksGlobal = 1;
94 fTracksMdc = 1;
95 fTracksTof = 1;
96 fTracksEmc = 1;
97 fTracksMuc = 1;
98 fTracksExt = 1;
99
100 fFishEye = 0;
101
102 fPhiRangeMin = 90;
103 fPhiRangeMax = 120;
104
105 } else if ( type & kXYView ) {
106
107 if ( gDebug ) cout << "BesStatus default ZR called" << endl;
108
109 fMdcGlobal = 1; // nothing
110 fMdcTubes = 0; // tubes
111 fMdcWires = 0; // wires
112
113 fTofGlobal = 1; // nothing
114 fTofEast = 0; // circle
115 fTofBarrel = 1; // circle
116 fTofWest = 0; // circle
117
118 fEmcGlobal = 1; // nothing
119 fEmcEast = 0; // east ec crystals
120 fEmcBarrel = 1; // 120 crystals
121 fEmcWest = 0; // west ec crystals
122 fEmcSide = 0; // side
123
124 fMucGlobal = 1; // nothing
125 fMucEast = 0; // shape of bakelite or chamber
126 fMucBarrel = 1; // gap
127 fMucWest = 0; // shape of bakelite or chamber
128 fMucStrips = 0; // strips
129
130 fFull3DMdc = 0;
131 fFull3DTof = 0;
132 fFull3DEmc = 0;
133 fFull3DMuc = 0;
134
135 fBeamPipe = 1; // circle
136 fZRPlaneOnXY = 0;
137 fAxis = 0;
138
139 fMdcHitsGlobal = 1;
140 fMdcHits = 1;
141
142 fTofHitsGlobal = 1;
143 fTofHitsEast = 1;
144 fTofHitsBarrel = 1;
145 fTofHitsWest = 1;
146
147 fEmcHitsGlobal = 1;
148 fEmcHitsEast = 1;
149 fEmcHitsBarrel = 1;
150 fEmcHitsWest = 1;
151 fEmcHitsSide = 0;
152
153 fMucHitsGlobal = 1;
154 fMucHitsEast = 1;
155 fMucHitsBarrel = 1;
156 fMucHitsWest = 1;
157
158 fTracksGlobal = 1;
159 fTracksMdc = 1;
160 fTracksTof = 1;
161 fTracksEmc = 1;
162 fTracksMuc = 1;
163 fTracksExt = 1;
164
165 fFishEye = 0;
166
167 fPhiRangeMin = 90;
168 fPhiRangeMax = 120;
169
170 fZoom = 1.44;
171
172 } else if ( type & kZRView ) {
173
174 if ( gDebug ) cout << "BesStatus default ZR called" << endl;
175
176 fMdcGlobal = 1; // nothing
177 fMdcTubes = 1; // nothing
178 fMdcWires = 0; // wire
179
180 fTofGlobal = 1; // nothing
181 fTofEast = 1; // box
182 fTofBarrel = 1; // box
183 fTofWest = 1; // box
184
185 fEmcGlobal = 1; // nothing
186 fEmcEast = 1; // intersect ec crystals
187 fEmcBarrel = 1; // 44 crystals
188 fEmcWest = 1; // intersect ec crystals
189 fEmcSide = 0; // side
190
191 fMucGlobal = 1; // nothing
192 fMucEast = 1; // project of bakelite or chamber
193 fMucBarrel = 1; // gap
194 fMucWest = 1; // shape of bakelite or chamber
195 fMucStrips = 0; // strips
196
197 fFull3DMdc = 0;
198 fFull3DTof = 0;
199 fFull3DEmc = 0;
200 fFull3DMuc = 0;
201
202 fBeamPipe = 1; // box
203 fZRPlaneOnXY = 0;
204 fAxis = 0;
205
206 fMdcHitsGlobal = 1;
207 fMdcHits = 1;
208
209 fTofHitsGlobal = 1;
210 fTofHitsEast = 1;
211 fTofHitsBarrel = 1;
212 fTofHitsWest = 1;
213
214 fEmcHitsGlobal = 1;
215 fEmcHitsEast = 1;
216 fEmcHitsBarrel = 1;
217 fEmcHitsWest = 1;
218 fEmcHitsSide = 0;
219
220 fMucHitsGlobal = 1;
221 fMucHitsEast = 1;
222 fMucHitsBarrel = 1;
223 fMucHitsWest = 1;
224
225 fTracksGlobal = 1;
226 fTracksMdc = 1;
227 fTracksTof = 1;
228 fTracksEmc = 1;
229 fTracksMuc = 1;
230 fTracksExt = 1;
231
232 fFishEye = 0;
233
234 fPhiRangeMin = 90;
235 fPhiRangeMax = 120;
236
237 fZoom = 1.44;
238 }
239}
240
241//__________________________________________________________
242
243void BesStatus::Transfer(BesStatus *right, Bool_t set) {
244 //
245 // transfer status informations from one status instance to
246 // another, from here, all components transfer functions are called
247 if ( gDebug ) cout << "BesStatus::Transfer(BesStatus *right) called" << endl;
248
249 this->TransferGeometryMdc (right, set);
250 this->TransferGeometryTof (right, set);
251 this->TransferGeometryEmc (right, set);
252 this->TransferGeometryMuc (right, set);
253 this->TransferGeometryFull3D (right, set);
254 this->TransferGeometryOtherParts (right, set);
255
256 this->TransferHitsMdc (right, set);
257 this->TransferHitsTof (right, set);
258 this->TransferHitsEmc (right, set);
259 this->TransferHitsMuc (right, set);
260
261 this->TransferTracks (right, set);
262
263 this->TransferFishEye (right, set);
264 this->TransferPhiRange (right, set);
265 this->TransferZoom (right, set);
266}
267
268//__________________________________________________________
269
271
272 fMdcGlobal = right->fMdcGlobal;
273 fMdcTubes = right->fMdcTubes;
274 fMdcWires = right->fMdcWires;
275}
276
277// ____________________________________________________________
278
280
281 fTofGlobal = right->fTofGlobal;
282 fTofEast = right->fTofEast;
283 fTofBarrel = right->fTofBarrel;
284 fTofWest = right->fTofWest;
285}
286
287//__________________________________________________________
288
290
291 fEmcGlobal = right->fEmcGlobal;
292 fEmcEast = right->fEmcEast;
293 fEmcBarrel = right->fEmcBarrel;
294 fEmcWest = right->fEmcWest;
295 fEmcSide = right->fEmcSide;
296}
297
298// ____________________________________________________________
299
301
302 fMucGlobal = right->fMucGlobal;
303 fMucEast = right->fMucEast;
304 fMucBarrel = right->fMucBarrel;
305 fMucWest = right->fMucWest;
306 fMucStrips = right->fMucStrips;
307}
308
309// ____________________________________________________________
310
312
313 fFull3DMdc = right->fFull3DMdc;
314 fFull3DTof = right->fFull3DTof;
315 fFull3DEmc = right->fFull3DEmc;
316 fFull3DMuc = right->fFull3DMuc;
317}
318
319// ____________________________________________________________
320
322
323 fBeamPipe = right->fBeamPipe;
324 fZRPlaneOnXY = right->fZRPlaneOnXY;
325 fAxis = right->fAxis;
326}
327
328//__________________________________________________________
329
330void BesStatus::TransferHitsMdc(BesStatus *right, Bool_t set) {
331
333 fMdcHits = right->fMdcHits;
334}
335
336//__________________________________________________________
337
338void BesStatus::TransferHitsTof(BesStatus *right, Bool_t set) {
339
341 fTofHitsEast = right->fTofHitsEast;
343 fTofHitsWest = right->fTofHitsWest;
344}
345
346//__________________________________________________________
347
348void BesStatus::TransferHitsEmc(BesStatus *right, Bool_t set) {
349
351 fEmcHitsEast = right->fEmcHitsEast;
353 fEmcHitsWest = right->fEmcHitsWest;
354 fEmcHitsSide = right->fEmcHitsSide;
355}
356
357//__________________________________________________________
358
359void BesStatus::TransferHitsMuc(BesStatus *right, Bool_t set) {
360
362 fMucHitsEast = right->fMucHitsEast;
364 fMucHitsWest = right->fMucHitsWest;
365}
366
367//__________________________________________________________
368
369void BesStatus::TransferTracks(BesStatus *right, Bool_t set) {
370
372 fTracksMdc = right->fTracksMdc;
373 fTracksTof = right->fTracksTof;
374 fTracksEmc = right->fTracksEmc;
375 fTracksMuc = right->fTracksMuc;
376 fTracksExt = right->fTracksExt;
377}
378
379//__________________________________________________________
380
381void BesStatus::TransferFishEye(BesStatus *right, Bool_t set) {
382 //
383 // transfer function for fish eye flag
384 if ( gDebug ) cout << "BesStatus::TransferFishEye(BesStatus *right) called" << endl;
385
386 fFishEye = right->fFishEye;
387}
388
389//__________________________________________________________
390
391void BesStatus::TransferPhiRange(BesStatus *right, Bool_t set) {
392 //
393 // transfer function for fish phi range
394 if ( gDebug ) cout << "BesStatus::TransferPhiRange(BesStatus *right) called" << endl;
395
396 fPhiRangeMin = right->fPhiRangeMin;
397 fPhiRangeMax = right->fPhiRangeMax;
398}
399
400//__________________________________________________________
401
402void BesStatus::TransferZoom(BesStatus *right, Bool_t set) {
403 //
404 // transfer function for zoom
405 if ( gDebug ) cout << "BesStatus::TransferZoom(BesStatus *right) called" << endl;
406
407 fZoom = right->fZoom;
408}
409
410istream& operator>> (istream& is,BesStatus& bs) {
411
412 unsigned int cMdc, cTof, cEmc, cMuc, cFull3D, cOther, cMdcHits;
413 unsigned int cTofHits, cEmcHits, cMucHits, cTracks;
414 Float_t cZoom;
415
416 is >> hex >> cMdc >> cTof >> cEmc >> cMuc >> cFull3D >>
417 cOther >> cMdcHits >> cTofHits >> cEmcHits >> cMucHits >> cTracks >> cZoom;
418
419 bs.fMdcGlobal = 1 & (cMdc>>2);
420 bs.fMdcTubes = 1 & (cMdc>>1);
421 bs.fMdcWires = 1 & cMdc;
422
423 bs.fTofGlobal = 1 & (cTof>>3);
424 bs.fTofEast = 1 & (cTof>>2);
425 bs.fTofBarrel = 1 & (cTof>>1);
426 bs.fTofWest = 1 & cTof;
427
428 bs.fEmcGlobal = 1 & (cEmc>>4);
429 bs.fEmcEast = 1 & (cEmc>>3);
430 bs.fEmcBarrel = 1 & (cEmc>>2);
431 bs.fEmcWest = 1 & (cEmc>>1);
432 bs.fEmcSide = 1 & cEmc;
433
434 bs.fMucGlobal = 1 & (cMuc>>4);
435 bs.fMucEast = 1 & (cMuc>>3);
436 bs.fMucBarrel = 1 & (cMuc>>2);
437 bs.fMucWest = 1 & (cMuc>>1);
438 bs.fMucStrips = 1 & cMuc;
439
440 bs.fFull3DMdc = 1 & (cFull3D>>3);
441 bs.fFull3DTof = 1 & (cFull3D>>2);
442 bs.fFull3DEmc = 1 & (cFull3D>>1);
443 bs.fFull3DMuc = 1 & cFull3D;
444
445 bs.fBeamPipe = 1 & (cOther>>2);
446 bs.fZRPlaneOnXY = 1 & (cOther>>1);
447 bs.fAxis = 1 & cOther;
448
449 bs.fMdcHitsGlobal = 1 & (cMdcHits>>1);
450 bs.fMdcHits = 1 & cMdcHits;
451
452 bs.fTofHitsGlobal = 1 & (cTofHits>>3);
453 bs.fTofHitsEast = 1 & (cTofHits>>2);
454 bs.fTofHitsBarrel = 1 & (cTofHits>>1);
455 bs.fTofHitsWest = 1 & cTofHits;
456
457 bs.fEmcHitsGlobal = 1 & (cEmcHits>>4);
458 bs.fEmcHitsEast = 1 & (cEmcHits>>3);
459 bs.fEmcHitsBarrel = 1 & (cEmcHits>>2);
460 bs.fEmcHitsWest = 1 & (cEmcHits>>1);
461 bs.fEmcHitsSide = 1 & cEmcHits;
462
463 bs.fMucHitsGlobal = 1 & (cMucHits>>3);
464 bs.fMucHitsEast = 1 & (cMucHits>>2);
465 bs.fMucHitsBarrel = 1 & (cMucHits>>1);
466 bs.fMucHitsWest = 1 & cMucHits;
467
468 bs.fTracksGlobal = 1 & (cTracks>>5);
469 bs.fTracksMdc = 1 & (cTracks>>4);
470 bs.fTracksTof = 1 & (cTracks>>3);
471 bs.fTracksEmc = 1 & (cTracks>>2);
472 bs.fTracksMuc = 1 & (cTracks>>1);
473 bs.fTracksExt = 1 & cTracks;
474 bs.fZoom = cZoom;
475
476 return is;
477}
478
479ostream& operator<< (ostream& os,const BesStatus& bs) {
480
481 return os << hex << " "
482 << (bs.fMdcGlobal<<2) + (bs.fMdcTubes<<1) + bs.fMdcWires << " "
483 << (bs.fTofGlobal<<3) + (bs.fTofEast<<2) + (bs.fTofBarrel<<1) + bs.fTofWest << " "
484 << (bs.fEmcGlobal<<4) + (bs.fEmcEast<<3) + (bs.fEmcBarrel<<2) + (bs.fEmcWest<<1) + bs.fEmcSide << " "
485 << (bs.fMucGlobal<<4) + (bs.fMucEast<<3) + (bs.fMucBarrel<<2) + (bs.fMucWest<<1) + bs.fMucStrips << " "
486 << (bs.fFull3DMdc<<3) + (bs.fFull3DTof<<2) + (bs.fFull3DEmc<<1) + bs.fFull3DMuc << " "
487 << (bs.fBeamPipe<<2) + (bs.fZRPlaneOnXY<<1) + bs.fAxis << " "
488 << (bs.fMdcHitsGlobal<<1) + bs.fMdcHits << " "
489 << (bs.fTofHitsGlobal<<3) + (bs.fTofHitsEast<<2) + (bs.fTofHitsBarrel<<1) + bs.fTofHitsWest << " "
490 << (bs.fEmcHitsGlobal<<4) + (bs.fEmcHitsEast<<3) + (bs.fEmcHitsBarrel<<2) + (bs.fEmcHitsWest<<1) + bs.fEmcHitsSide << " "
491 << (bs.fMucHitsGlobal<<3) + (bs.fMucHitsEast<<2) + (bs.fMucHitsBarrel<<1) + bs.fMucHitsWest << " "
492 << (bs.fTracksGlobal<<5) + (bs.fTracksMdc<<4) + (bs.fTracksTof<<3) + (bs.fTracksEmc<<2) + (bs.fTracksMuc<<1) + bs.fTracksExt << " " << bs.fZoom;
493
494}
ostream & operator<<(ostream &os, const BesStatus &bs)
Definition: BesStatus.cxx:479
ClassImp(BesStatus) BesStatus
Definition: BesStatus.cxx:12
istream & operator>>(istream &is, BesStatus &bs)
Definition: BesStatus.cxx:410
Bool_t fTracksEmc
visibility flag for Tof Tracks
Bool_t fMucHitsEast
visibility flag for global Muc Hits
void TransferGeometryMdc(BesStatus *right, Bool_t set)
Definition: BesStatus.cxx:270
Bool_t fTofHitsEast
visibility flag for global Tof Hits
Bool_t fMucBarrel
visivility flag for Muc east EC
Bool_t fFull3DMdc
visivility flag for Muc strips
Bool_t fTracksMdc
visibility flag for global Tracks
Bool_t fTofBarrel
visibility flag for Tof east EC
Bool_t fTracksExt
visibility flag for Muc Tracks
void TransferPhiRange(BesStatus *right, Bool_t set)
Definition: BesStatus.cxx:391
void TransferHitsMdc(BesStatus *right, Bool_t set)
Definition: BesStatus.cxx:330
void TransferGeometryMuc(BesStatus *right, Bool_t set)
Definition: BesStatus.cxx:300
Bool_t fMucStrips
visivility flag for Muc west EC
void TransferGeometryFull3D(BesStatus *right, Bool_t set)
Definition: BesStatus.cxx:311
void TransferHitsMuc(BesStatus *right, Bool_t set)
Definition: BesStatus.cxx:359
void TransferGeometryEmc(BesStatus *right, Bool_t set)
Definition: BesStatus.cxx:289
void TransferGeometryTof(BesStatus *right, Bool_t set)
Definition: BesStatus.cxx:279
Bool_t fAxis
visibility flag for ZRPlaneOnXY
Bool_t fEmcHitsGlobal
visibility flag for Tof Hits West
Bool_t fMucHitsWest
visibility flag for Muc Hits Barrel
void TransferHitsTof(BesStatus *right, Bool_t set)
Definition: BesStatus.cxx:338
Bool_t fZRPlaneOnXY
visibility flag for beam pipe
Bool_t fMucWest
visivility flag for Muc barrel
Bool_t fMucEast
visivility flag for global Muc
Bool_t fMdcWires
visibility flag for Mdc main tubes
Bool_t fFull3DMuc
visivility flag for full 3D Emc
Bool_t fEmcGlobal
visibility flag for Tof west EC
void TransferGeometryOtherParts(BesStatus *right, Bool_t set)
Definition: BesStatus.cxx:321
Bool_t fTofHitsWest
visibility flag for Tof Hits Barrel
Bool_t fFull3DEmc
visivility flag for full 3D Tof
Bool_t fTofHitsBarrel
visibility flag for Tof Hits East
Bool_t fEmcWest
visivility flag for Emc barrel
Bool_t fTofWest
visibility flag for Tof barrel
Bool_t fTofEast
visibility flag for global Tof
Bool_t fTofHitsGlobal
visibility flag for Mdc Hits
Bool_t fEmcHitsBarrel
visibility flag for Emc Hits East
Bool_t fEmcEast
visivility flag for global Emc
Bool_t fMdcHits
visibility flag for global Mdc Hits
Bool_t fMdcTubes
visibility flag for global Mdc
Bool_t fEmcHitsSide
visibility flag for Emc Hits West
Bool_t fEmcHitsWest
visibility flag for Emc Hits Barrel
Bool_t fEmcSide
visivility flag for Emc west EC
Bool_t fFull3DTof
visivility flag for full 3D Mdc
Bool_t fTracksMuc
visibility flag for Emc Tracks
Bool_t fTofGlobal
visibility flag for Mdc wires
void TransferZoom(BesStatus *right, Bool_t set)
Definition: BesStatus.cxx:402
Bool_t fBeamPipe
visivility flag for full 3D Muc
void TransferFishEye(BesStatus *right, Bool_t set)
Definition: BesStatus.cxx:381
Bool_t fMucHitsBarrel
visibility flag for Muc Hits East
Bool_t fEmcHitsEast
visibility flag for global Emc Hits
Bool_t fTracksTof
visibility flag for Mdc Tracks
Bool_t fEmcBarrel
visivility flag for Emc east EC
void Transfer(BesStatus *right, Bool_t set)
Definition: BesStatus.cxx:243
Bool_t fMucHitsGlobal
visibility flag for Emc Hits Side
virtual ~BesStatus()
Definition: BesStatus.cxx:28
void TransferTracks(BesStatus *right, Bool_t set)
Definition: BesStatus.cxx:369
void Default(EBESViewType type)
Definition: BesStatus.cxx:38
void TransferHitsEmc(BesStatus *right, Bool_t set)
Definition: BesStatus.cxx:348
Bool_t fTracksGlobal
visibility flag for Muc Hits West