CGEM BOSS 6.6.5.g
BESIII Offline Software System
Loading...
Searching...
No Matches
TrigGTL Class Reference

#include <TrigGTL.h>

Public Member Functions

 TrigGTL (char *name)
 
virtual ~TrigGTL ()
 
void setGTLTrigData (uint32_t boardId, uint32_t window, uint32_t datasize, const uint32_t *data)
 
void initialize ()
 
const std::string & getName () const
 
int getDataGroup12One (int index) const
 
int getDataGroup12Zero (int index) const
 
int getDataGroup34One (int index) const
 
int getDataGroup34Zero (int index) const
 
int getDataGroup5One (int index) const
 
int getDataGroup5Zero (int index) const
 

Detailed Description

Definition at line 8 of file TrigGTL.h.

Constructor & Destructor Documentation

◆ TrigGTL()

TrigGTL::TrigGTL ( char *  name)

Definition at line 4 of file TrigGTL.cxx.

5{
6 m_name = name;
7}

◆ ~TrigGTL()

virtual TrigGTL::~TrigGTL ( )
inlinevirtual

Definition at line 11 of file TrigGTL.h.

11{}

Member Function Documentation

◆ getDataGroup12One()

int TrigGTL::getDataGroup12One ( int  index) const
inline

Definition at line 19 of file TrigGTL.h.

19{ return m_dataGroup12_One[index]; }

◆ getDataGroup12Zero()

int TrigGTL::getDataGroup12Zero ( int  index) const
inline

Definition at line 20 of file TrigGTL.h.

20{ return m_dataGroup12_Zero[index]; }

◆ getDataGroup34One()

int TrigGTL::getDataGroup34One ( int  index) const
inline

Definition at line 22 of file TrigGTL.h.

22{ return m_dataGroup34_One[index]; }

◆ getDataGroup34Zero()

int TrigGTL::getDataGroup34Zero ( int  index) const
inline

Definition at line 23 of file TrigGTL.h.

23{ return m_dataGroup34_Zero[index]; }

◆ getDataGroup5One()

int TrigGTL::getDataGroup5One ( int  index) const
inline

Definition at line 25 of file TrigGTL.h.

25{ return m_dataGroup5_One[index]; }

◆ getDataGroup5Zero()

int TrigGTL::getDataGroup5Zero ( int  index) const
inline

Definition at line 26 of file TrigGTL.h.

26{ return m_dataGroup5_Zero[index]; }

◆ getName()

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

Definition at line 17 of file TrigGTL.h.

17{ return m_name; }

◆ initialize()

void TrigGTL::initialize ( )

Definition at line 9 of file TrigGTL.cxx.

10{
11 for(int i = 0; i < 48; i++)
12 {
13 m_dataGroup12_One[i] = 0;
14 m_dataGroup12_Zero[i] = 0;
15 m_dataGroup34_One[i] = 0;
16 m_dataGroup34_Zero[i] = 0;
17 if(i < 24) {
18 m_dataGroup5_One[i] = 0;
19 m_dataGroup5_Zero[i] = 0;
20 }
21 }
22}

◆ setGTLTrigData()

void TrigGTL::setGTLTrigData ( uint32_t  boardId,
uint32_t  window,
uint32_t  datasize,
const uint32_t *  data 
)

Definition at line 24 of file TrigGTL.cxx.

24 {
25
26 if(boardId != 0xD3) std::cerr << "ERROR: You set the wrong board data to TrigGTL!!!" << std::endl;
27 if(datasize%window != 0) std::cerr << "WARNING: The data in GTL maybe not complete!!!" << std::endl;
28
29 for(uint32_t i = 0; i < datasize; i++) {
30 uint32_t dataId = ((data[i] >> 24) & 0x7);
31 for(uint32_t j = 0, mask = 1; j < 24; j++, mask <<= 1) {
32 if(dataId == 1) {
33 if((data[i] & mask) != 0) {
34 m_dataGroup12_One[j] += 1;
35 }
36 if(m_dataGroup12_One[j] == 0) m_dataGroup12_Zero[j] += 1;
37 }
38 if(dataId == 2) {
39 if((data[i] & mask) != 0) {
40 m_dataGroup12_One[j+24] += 1;
41 }
42 if(m_dataGroup12_One[j+24] == 0) m_dataGroup12_Zero[j+24] += 1;
43 }
44 if(dataId == 3) {
45 if((data[i] & mask) != 0) {
46 m_dataGroup34_One[j] += 1;
47 }
48 if(m_dataGroup34_One[j] == 0) m_dataGroup34_Zero[j] += 1;
49 }
50 if(dataId == 4) {
51 if((data[i] & mask) != 0) {
52 m_dataGroup34_One[j+24] += 1;
53 }
54 if(m_dataGroup34_One[j+24] == 0) m_dataGroup34_Zero[j+24] += 1;
55 }
56 if(dataId == 5) {
57 if((data[i] & mask) != 0) {
58 m_dataGroup5_One[j] += 1;
59 }
60 if(m_dataGroup5_One[j] == 0) m_dataGroup5_Zero[j] += 1;
61 }
62 }
63 }
64}
TTree * data

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