BOSS 7.1.0
BESIII Offline Software System
Loading...
Searching...
No Matches
TrigEACC Class Reference

#include <TrigEACC.h>

Public Member Functions

 TrigEACC (const char *name)
 
virtual ~TrigEACC ()
 
void setEACCTrigData (uint32_t boardId, uint32_t window, uint32_t datasize, const uint32_t *data)
 
void initialize ()
 
const std::string & getName () const
 
unsigned int getTimeWindow () const
 
unsigned int getBBLKCharge (int id) const
 
unsigned int getBBLKTime (int id) const
 
unsigned int getEBLKCharge (int id) const
 
unsigned int getEBLKTime (int id) const
 
unsigned int getWBLKCharge (int id) const
 
unsigned int getWBLKTime (int id) const
 
unsigned int getBarrelCharge () const
 
unsigned int getBarrelTime () const
 
unsigned int getEndCapsCharge () const
 
unsigned int getEndCapsTime () const
 
unsigned int getEMCTotalCharge () const
 
unsigned int getEMCTotalTime () const
 
unsigned int getEastHalfCharge () const
 
unsigned int getEastHalfTime () const
 
unsigned int getWestHalfCharge () const
 
unsigned int getWestHalfTime () const
 
unsigned int getEastEndHalfCharge () const
 
unsigned int getEastEndHalfTime () const
 
unsigned int getWestEndHalfCharge () const
 
unsigned int getWestEndHalfTime () const
 
unsigned int getBTC (int theta, int phi, int winId) const
 
unsigned int getETC (int phi, int winId) const
 
unsigned int getWTC (int phi, int winId) const
 
unsigned int getMidCondi (int bit) const
 
unsigned int getTrigCondi (int bit, int winId) const
 
void print ()
 

Detailed Description

Definition at line 9 of file TrigEACC.h.

Constructor & Destructor Documentation

◆ TrigEACC()

TrigEACC::TrigEACC ( const char *  name)

Definition at line 6 of file TrigEACC.cxx.

7{
8 m_name = name;
9}

◆ ~TrigEACC()

TrigEACC::~TrigEACC ( )
virtual

Definition at line 11 of file TrigEACC.cxx.

11 {
12}

Member Function Documentation

◆ getBarrelCharge()

unsigned int TrigEACC::getBarrelCharge ( ) const
inline

Definition at line 27 of file TrigEACC.h.

27{ return E_B_Etot; }

◆ getBarrelTime()

unsigned int TrigEACC::getBarrelTime ( ) const
inline

Definition at line 28 of file TrigEACC.h.

28{ return T_B_Etot; }

◆ getBBLKCharge()

unsigned int TrigEACC::getBBLKCharge ( int  id) const
inline

Definition at line 21 of file TrigEACC.h.

21{ return E_blk[id]; }

◆ getBBLKTime()

unsigned int TrigEACC::getBBLKTime ( int  id) const
inline

Definition at line 22 of file TrigEACC.h.

22{ return T_blk[id]; }

◆ getBTC()

unsigned int TrigEACC::getBTC ( int  theta,
int  phi,
int  winId 
) const
inline

Definition at line 42 of file TrigEACC.h.

42{ return TC[theta][phi][winId]; }

◆ getEastEndHalfCharge()

unsigned int TrigEACC::getEastEndHalfCharge ( ) const
inline

Definition at line 37 of file TrigEACC.h.

37{ return E_eastEndHalf; }

◆ getEastEndHalfTime()

unsigned int TrigEACC::getEastEndHalfTime ( ) const
inline

Definition at line 38 of file TrigEACC.h.

38{ return T_eastEndHalf; }

◆ getEastHalfCharge()

unsigned int TrigEACC::getEastHalfCharge ( ) const
inline

Definition at line 33 of file TrigEACC.h.

33{ return E_eastHalf; }

◆ getEastHalfTime()

unsigned int TrigEACC::getEastHalfTime ( ) const
inline

Definition at line 34 of file TrigEACC.h.

34{ return T_eastHalf; }

◆ getEBLKCharge()

unsigned int TrigEACC::getEBLKCharge ( int  id) const
inline

Definition at line 23 of file TrigEACC.h.

23{ return E_blkE[id]; }

◆ getEBLKTime()

unsigned int TrigEACC::getEBLKTime ( int  id) const
inline

Definition at line 24 of file TrigEACC.h.

24{ return T_blkE[id]; }

◆ getEMCTotalCharge()

unsigned int TrigEACC::getEMCTotalCharge ( ) const
inline

Definition at line 31 of file TrigEACC.h.

31{ return E_blkAll; }

◆ getEMCTotalTime()

unsigned int TrigEACC::getEMCTotalTime ( ) const
inline

Definition at line 32 of file TrigEACC.h.

32{ return T_blkAll; }

◆ getEndCapsCharge()

unsigned int TrigEACC::getEndCapsCharge ( ) const
inline

Definition at line 29 of file TrigEACC.h.

29{ return E_E_Etot; }

◆ getEndCapsTime()

unsigned int TrigEACC::getEndCapsTime ( ) const
inline

Definition at line 30 of file TrigEACC.h.

30{ return T_E_Etot; }

◆ getETC()

unsigned int TrigEACC::getETC ( int  phi,
int  winId 
) const
inline

Definition at line 43 of file TrigEACC.h.

43{ return TC_E[phi][winId]; }

◆ getMidCondi()

unsigned int TrigEACC::getMidCondi ( int  bit) const
inline

Definition at line 46 of file TrigEACC.h.

46{ return midCondi[bit]; }

◆ getName()

const std::string & TrigEACC::getName ( ) const
inline

Definition at line 18 of file TrigEACC.h.

18{ return m_name; }

◆ getTimeWindow()

unsigned int TrigEACC::getTimeWindow ( ) const
inline

Definition at line 19 of file TrigEACC.h.

19{ return m_window; }

◆ getTrigCondi()

unsigned int TrigEACC::getTrigCondi ( int  bit,
int  winId 
) const
inline

Definition at line 47 of file TrigEACC.h.

47{ return emcTrigCondi[bit][winId]; }

◆ getWBLKCharge()

unsigned int TrigEACC::getWBLKCharge ( int  id) const
inline

Definition at line 25 of file TrigEACC.h.

25{ return E_blkW[id]; }

◆ getWBLKTime()

unsigned int TrigEACC::getWBLKTime ( int  id) const
inline

Definition at line 26 of file TrigEACC.h.

26{ return T_blkW[id]; }

◆ getWestEndHalfCharge()

unsigned int TrigEACC::getWestEndHalfCharge ( ) const
inline

Definition at line 39 of file TrigEACC.h.

39{ return E_westEndHalf; }

◆ getWestEndHalfTime()

unsigned int TrigEACC::getWestEndHalfTime ( ) const
inline

Definition at line 40 of file TrigEACC.h.

40{ return T_westEndHalf; }

◆ getWestHalfCharge()

unsigned int TrigEACC::getWestHalfCharge ( ) const
inline

Definition at line 35 of file TrigEACC.h.

35{ return E_westHalf; }

◆ getWestHalfTime()

unsigned int TrigEACC::getWestHalfTime ( ) const
inline

Definition at line 36 of file TrigEACC.h.

36{ return T_westHalf; }

◆ getWTC()

unsigned int TrigEACC::getWTC ( int  phi,
int  winId 
) const
inline

Definition at line 44 of file TrigEACC.h.

44{ return TC_W[phi][winId]; }

◆ initialize()

void TrigEACC::initialize ( )

Definition at line 14 of file TrigEACC.cxx.

14 {
15 //initialize
16 for(uint32_t i = 0; i < 11; i++)
17 for(uint32_t j = 0; j < 32; j++)
18 for(uint32_t k = 0; k < 32; k++) {
19 if(j < 30) TC[i][j][k] = 0;
20 if(i == 0) { TC_E[j][k] = 0; TC_W[j][k] = 0; }
21 if(i == 0 && j < 16) { midCondi[j] = 0; emcTrigCondi[j][k] = 0; }
22 if(i == 0 && j < 12) { E_blk[j] = 0; T_blk[j] = 0; }
23 if(i == 0 && j < 2) { E_blkE[j] = 0; T_blkE[j] = 0; E_blkW[j] = 0; T_blkW[j] = 0; }
24 }
25 E_B_Etot = 0;
26 T_B_Etot = 0;
27 E_E_Etot = 0;
28 T_E_Etot = 0;
29 E_blkAll = 0;
30 T_blkAll = 0;
31 E_eastHalf = 0;
32 T_eastHalf = 0;
33 E_westHalf = 0;
34 T_westHalf = 0;
35 E_eastEndHalf = 0;
36 T_eastEndHalf = 0;
37 E_westEndHalf = 0;
38 T_westEndHalf = 0;
39}

◆ print()

void TrigEACC::print ( )

Definition at line 118 of file TrigEACC.cxx.

118 {
119}

◆ setEACCTrigData()

void TrigEACC::setEACCTrigData ( uint32_t  boardId,
uint32_t  window,
uint32_t  datasize,
const uint32_t *  data 
)

Definition at line 41 of file TrigEACC.cxx.

41 {
42 if(boardId != 0xd7) std::cerr << "ERROR: You set the wrong board data to TrigEACC!!!" << std::endl;
43
44 m_window = window;
45
46 uint32_t charge_mask = 0xFFFF;
47 uint32_t time_mask = 0xFF0000;
48 for(uint32_t i = 0; i < datasize; i++) {
49 if(i < 12) {
50 E_blk[i] = ((data[i]) & charge_mask);
51 T_blk[i] = ((data[i]) & time_mask) >> 16;
52 }
53 if(i >= 12 && i < 14) {
54 E_blkE[i-12] = ((data[i]) & charge_mask);
55 T_blkE[i-12] = ((data[i]) & time_mask) >> 16;
56 }
57 if(i >= 14 && i < 16) {
58 E_blkW[i-14] = ((data[i]) & charge_mask);
59 T_blkW[i-14] = ((data[i]) & time_mask) >> 16;
60 }
61 if(i >= 16 && i < 23) {
62 if(i == 16) { E_B_Etot = ((data[i]) & charge_mask); T_B_Etot = ((data[i]) & time_mask) >> 16; }
63 if(i == 17) { E_E_Etot = ((data[i]) & charge_mask); T_E_Etot = ((data[i]) & time_mask) >> 16; }
64 if(i == 18) { E_blkAll = ((data[i]) & charge_mask); T_blkAll = ((data[i]) & time_mask) >> 16; }
65 if(i == 19) { E_eastHalf = ((data[i]) & charge_mask); T_eastHalf = ((data[i]) & time_mask) >> 16; }
66 if(i == 20) { E_westHalf = ((data[i]) & charge_mask); T_westHalf = ((data[i]) & time_mask) >> 16; }
67 if(i == 21) { E_eastEndHalf = ((data[i]) & charge_mask); T_eastEndHalf = ((data[i]) & time_mask) >> 16; }
68 if(i == 22) { E_westEndHalf = ((data[i]) & charge_mask); T_westEndHalf = ((data[i]) & time_mask) >> 16; }
69 }
70 if(i == 23) {
71 for(uint32_t j = 0, mask = 1; j < 16; j++, mask <<= 1) {
72 if(data[i] & mask) midCondi[j] = 1;
73 }
74 }
75 if(i >= 24 && i < 24 + 20*window) {
76 uint32_t winId = uint32_t ((i-24)/20);
77 uint32_t id = i - (24+winId*20);
78 if(i >= (24+winId*20) && i < (39+winId*20)) {
79 for(uint32_t j = 0, mask = 1; j < 24; j++, mask <<= 1) {
80 if(j < 11) {
81 if(data[i] & mask) TC[j][2*id+1][winId] = 1;
82 }
83 if(j >= 12 && j < 23) {
84 if(data[i] & mask) TC[j-12][2*id][winId] = 1;
85 }
86 }
87 }
88 if(i == (39+winId*20)) {
89 for(uint32_t j = 0, mask = 1; j < 16; j++, mask <<= 1) {
90 if(data[i] & mask) TC_E[j][winId] = 1;
91 }
92 }
93 if(i == (40+winId*20)) {
94 for(uint32_t j = 0, mask = 1; j < 16; j++, mask <<= 1) {
95 if(data[i] & mask) TC_E[j+16][winId] = 1;
96 }
97 }
98 if(i == (41+winId*20)) {
99 for(uint32_t j = 0, mask = 1; j < 16; j++, mask <<= 1) {
100 if(data[i] & mask) TC_W[j][winId] = 1;
101 }
102 }
103 if(i == (42+winId*20)) {
104 for(uint32_t j = 0, mask = 1; j < 16; j++, mask <<= 1) {
105 if(data[i] & mask) TC_W[j+16][winId] = 1;
106 }
107 }
108 if(i == (43+winId*20)) {
109 for(uint32_t j = 0, mask = 1; j < 16; j++, mask <<= 1) {
110 if(data[i] & mask) emcTrigCondi[j][winId] = 1;
111 }
112 }
113 }
114 }
115 if(24 + 20*window != datasize) std::cerr << "ERROR: The data in EACC are not complete" << std::endl;
116}
TTree * data

The documentation for this class was generated from the following files: