CGEM BOSS 6.6.5.h
BESIII Offline Software System
Loading...
Searching...
No Matches
HltInf Class Reference

#include <HltInf.h>

+ Inheritance diagram for HltInf:

Public Member Functions

virtual const CLID & clID () const
 
 HltInf (const unsigned int type, const unsigned int alg, const unsigned int cri, const unsigned int ver, const float etot)
 
 HltInf ()
 
 ~HltInf ()
 
 HltInf (const DstHltInf &aHlt)
 
HltInfoperator= (const DstHltInf &aHlt)
 
virtual void push_mdc (uint32_t data)
 
virtual void push_cgem (uint32_t data)
 
virtual void push_tof (uint32_t data)
 
virtual void push_emc (uint32_t data)
 
virtual void push_muc (uint32_t data)
 
virtual void push_con (uint32_t data)
 
virtual void push_mdc (float data)
 
virtual void push_cgem (float data)
 
virtual void push_tof (float data)
 
virtual void push_emc (float data)
 
virtual void push_muc (float data)
 
virtual void push_con (float data)
 
virtual bool setData (const Identifier &id, float data)
 
virtual bool setData (const Identifier &, uint32_t)
 
virtual void setMdcData (const std::vector< uint32_t > &vec)
 
virtual void setCgemData (const std::vector< uint32_t > &vec)
 
virtual void setTofData (const std::vector< uint32_t > &vec)
 
virtual void setEmcData (const std::vector< uint32_t > &vec)
 
virtual void setMucData (const std::vector< uint32_t > &vec)
 
virtual void setConData (const std::vector< uint32_t > &vec)
 
std::vector< uint32_t > & getDataVec (const Identifier &)
 
std::vector< uint32_t > & getDataVec (const uint32_t)
 
virtual bool getData (const Identifier &, uint32_t *)
 
virtual void print () const
 
- Public Member Functions inherited from DstHltInf
 DstHltInf (const unsigned int type, const unsigned int alg, const unsigned int cri, const unsigned int ver, const float etot)
 
 DstHltInf ()
 
 DstHltInf (const DstHltInf &)
 
DstHltInfoperator= (const DstHltInf &)
 
virtual ~DstHltInf ()
 
void setEventType (const unsigned int i)
 
void setAlgProcess (const unsigned int i)
 
void setCriteriaTable (const unsigned int i)
 
void setVersion (const unsigned int i)
 
void setTotalEnergy (const float etot)
 
void setNumber (const unsigned int i)
 
void setNMDC (const unsigned int i)
 
void setNTOF (const unsigned int i)
 
void setNEMC (const unsigned int i)
 
void setNMUC (const unsigned int i)
 
void setNCGEM (const unsigned int i)
 
void setNCON (const unsigned int i)
 
uint32_t getEventType () const
 
uint32_t getAlgProcess () const
 
uint32_t getCriteriaTable () const
 
uint32_t getVersion () const
 
float getTotalEnergy () const
 
uint32_t getNumber () const
 
uint32_t getNMDC () const
 
uint32_t getNTOF () const
 
uint32_t getNEMC () const
 
uint32_t getNMUC () const
 
uint32_t getNCGEM () const
 
uint32_t getNCON () const
 
const string & getEventName () const
 
bool isType (string &type) const
 
- Public Member Functions inherited from IHltInterface
 IHltInterface ()
 
virtual ~IHltInterface ()
 

Static Public Member Functions

static const CLID & classID ()
 
- Static Public Member Functions inherited from DstHltInf
static const CLID & classID ()
 

Additional Inherited Members

- Protected Attributes inherited from DstHltInf
uint32_t m_eventType
 
uint32_t m_algProcess
 
uint32_t m_criTable
 
uint32_t m_version
 
float m_eTotal
 
uint32_t m_number
 
uint32_t m_ncon
 
- Static Protected Attributes inherited from DstHltInf
static const std::string s_chn [32]
 
static const std::string s_err ="EventFilterError"
 

Detailed Description

Definition at line 16 of file HltInf.h.

Constructor & Destructor Documentation

◆ HltInf() [1/3]

HltInf::HltInf ( const unsigned int type,
const unsigned int alg,
const unsigned int cri,
const unsigned int ver,
const float etot )

Definition at line 5 of file HltInf.cxx.

6 :
7 DstHltInf(type,alg,cri,ver,etot),
8 m_mdcData(0),m_cgemData(0),m_tofData(0),m_emcData(0),m_mucData(0),m_conData(0){
9}
Double_t etot

◆ HltInf() [2/3]

HltInf::HltInf ( )

Definition at line 11 of file HltInf.cxx.

11 :
12 DstHltInf(),
13 m_mdcData(0),m_cgemData(0),m_tofData(0),m_emcData(0),m_mucData(0),m_conData(0){
14}

◆ ~HltInf()

HltInf::~HltInf ( )

Definition at line 16 of file HltInf.cxx.

16 {
17}

◆ HltInf() [3/3]

HltInf::HltInf ( const DstHltInf & aHlt)

Definition at line 19 of file HltInf.cxx.

19 :
20 DstHltInf(aHlt),
21 m_mdcData(0),m_cgemData(0),m_tofData(0),m_emcData(0),m_mucData(0),m_conData(0){
22}

Member Function Documentation

◆ classID()

static const CLID & HltInf::classID ( )
inlinestatic

Definition at line 19 of file HltInf.h.

19{return CLID_HltInf;} ;
const CLID & CLID_HltInf

Referenced by clID().

◆ clID()

virtual const CLID & HltInf::clID ( ) const
inlinevirtual

Reimplemented from DstHltInf.

Definition at line 18 of file HltInf.h.

18{ return HltInf::classID();}
static const CLID & classID()
Definition HltInf.h:19

Referenced by main().

◆ getData()

bool HltInf::getData ( const Identifier & id,
uint32_t * address )
virtual

Reimplemented from DstHltInf.

Definition at line 85 of file HltInf.cxx.

85 {
86
87 vector<uint32_t>::iterator iter;
88 uint32_t size=0;
89
90 if(HltID::is_mdc_inf(id)) {
91 iter = m_mdcData.begin();
92 size = m_mdcData.size();
93 }
94 else if(HltID::is_cgem_inf(id)) {
95 iter = m_cgemData.begin();
96 size = m_cgemData.size();
97 }
98 else if(HltID::is_tof_inf(id)) {
99 iter = m_tofData.begin();
100 size = m_tofData.size();
101 }
102 else if(HltID::is_emc_inf(id)) {
103 iter = m_emcData.begin();
104 size = m_emcData.size();
105 }
106 else if(HltID::is_muc_inf(id)) {
107 iter = m_mucData.begin();
108 size = m_mucData.size();
109 }
110 else if(HltID::is_con_inf(id)) {
111 iter = m_conData.begin();
112 size = m_conData.size();
113 }
114 else return false;
115
116 uint32_t sub=HltID::id_sub(id);
117
118 if(sub<size) {
119 *address = *(iter+sub);
120 return true;
121 }
122 else {
123 return false;
124 }
125}
EvtStreamInputIterator< typename Generator::result_type > iter(Generator gen, int N=0)
static bool is_tof_inf(const Identifier &id)
Definition HltID.cxx:130
static bool is_con_inf(const Identifier &id)
Definition HltID.cxx:145
static bool is_cgem_inf(const Identifier &id)
Definition HltID.cxx:125
static bool is_muc_inf(const Identifier &id)
Definition HltID.cxx:140
static bool is_emc_inf(const Identifier &id)
Definition HltID.cxx:135
static bool is_mdc_inf(const Identifier &id)
Definition HltID.cxx:120
static unsigned int id_sub(const Identifier &id)
Definition HltID.cxx:156

Referenced by EventFilter::print().

◆ getDataVec() [1/2]

vector< uint32_t > & HltInf::getDataVec ( const Identifier & id)

Definition at line 71 of file HltInf.cxx.

71 {
72 if(HltID::is_mdc_inf(id)) return m_mdcData;
73 else if(HltID::is_cgem_inf(id)) return m_cgemData;
74 else if(HltID::is_tof_inf(id)) return m_tofData;
75 else if(HltID::is_emc_inf(id)) return m_emcData;
76 else if(HltID::is_muc_inf(id)) return m_mucData;
77 else if(HltID::is_con_inf(id)) return m_conData;
78 else return m_conData; //default: return condition number
79}

Referenced by HltInfCnv::DataObjectToTObject(), and getDataVec().

◆ getDataVec() [2/2]

vector< uint32_t > & HltInf::getDataVec ( const uint32_t part)

Definition at line 81 of file HltInf.cxx.

81 {
82 return getDataVec(HltID::data_type_id(part));
83}
static Identifier data_type_id(const unsigned int detector, const unsigned int id_in_sub=0)
For a single data.
Definition HltID.cxx:186
std::vector< uint32_t > & getDataVec(const Identifier &)
Definition HltInf.cxx:71

◆ operator=()

HltInf & HltInf::operator= ( const DstHltInf & aHlt)

Definition at line 24 of file HltInf.cxx.

24 {
26 return *this;
27}
DstHltInf & operator=(const DstHltInf &)
Definition DstHltInf.cxx:48

◆ print()

void HltInf::print ( ) const
virtual

Reimplemented from DstHltInf.

Definition at line 127 of file HltInf.cxx.

127 {
128 std::cout << *this;
129 std::cout << "MDC data:" << dec << m_mdcData.size() << std::endl;
130 for(uint32_t i=0;i<m_mdcData.size();i++){
131 std::cout << " #"<<i<<"# ";
132 std::cout << *((int*)&m_mdcData[i]) << "(" << *((float*)&m_mdcData[i]) << ")";
133 if(i==m_mdcData.size()-1) std::cout << std::endl;
134 }
135 std::cout << "CGEM data:" << dec << m_cgemData.size() << std::endl;
136 for(uint32_t i=0;i<m_cgemData.size();i++){
137 std::cout << " #"<<i<<"# ";
138 std::cout << *((int*)&m_cgemData[i]) << "(" << *((float*)&m_cgemData[i]) << ")";
139 if(i==m_cgemData.size()-1) std::cout << std::endl;
140 }
141 std::cout << "TOF data:" << m_tofData.size() << std::endl;
142 for(uint32_t i=0;i<m_tofData.size();i++){
143 std::cout << " #"<<i<<"# ";
144 std::cout << *((int*)&m_tofData[i]) << "(" << *((float*)&m_tofData[i]) << ")";
145 if(i==m_tofData.size()-1) std::cout << std::endl;
146 }
147 std::cout << "EMC data:" << m_emcData.size() << std::endl;
148 for(uint32_t i=0;i<m_emcData.size();i++){
149 std::cout << " #"<<i<<"# ";
150 std::cout << *((int*)&m_emcData[i]) << "(" << *((float*)&m_emcData[i]) << ")";
151 if(i==m_emcData.size()-1) std::cout << std::endl;
152 }
153 std::cout << "MUC data:" << m_mucData.size() << std::endl;
154 for(uint32_t i=0;i<m_mucData.size();i++){
155 std::cout << " #"<<i<<"# ";
156 std::cout << *((int*)&m_mucData[i]) << "(" << *((float*)&m_mucData[i]) << ")";
157 if(i==m_mucData.size()-1) std::cout << std::endl;
158 }
159 std::cout << "CON data:" << m_conData.size() << std::endl;
160 for(uint32_t i=0;i<m_conData.size();i++){
161 std::cout << " #"<<i<<"# ";
162 std::cout << *((int*)&m_conData[i]);
163 if(i==m_conData.size()-1) std::cout << std::endl;
164 }
165 return;
166}

Referenced by main().

◆ push_cgem() [1/2]

virtual void HltInf::push_cgem ( float data)
inlinevirtual

Reimplemented from DstHltInf.

Definition at line 38 of file HltInf.h.

38{ m_cgemData.push_back(*((uint32_t*)&data));};
TTree * data

◆ push_cgem() [2/2]

virtual void HltInf::push_cgem ( uint32_t data)
inlinevirtual

Reimplemented from DstHltInf.

Definition at line 32 of file HltInf.h.

32{ m_cgemData.push_back(data);};

Referenced by HltInfCnv::TObjectToDataObject().

◆ push_con() [1/2]

virtual void HltInf::push_con ( float data)
inlinevirtual

Reimplemented from DstHltInf.

Definition at line 42 of file HltInf.h.

42{ m_conData.push_back(*((uint32_t*)&data));};

◆ push_con() [2/2]

virtual void HltInf::push_con ( uint32_t data)
inlinevirtual

Reimplemented from DstHltInf.

Definition at line 36 of file HltInf.h.

36{ m_conData.push_back(data);};

Referenced by HltEventMaker::execute(), main(), and HltInfCnv::TObjectToDataObject().

◆ push_emc() [1/2]

virtual void HltInf::push_emc ( float data)
inlinevirtual

Reimplemented from DstHltInf.

Definition at line 40 of file HltInf.h.

40{ m_emcData.push_back(*((uint32_t*)&data));};

◆ push_emc() [2/2]

virtual void HltInf::push_emc ( uint32_t data)
inlinevirtual

Reimplemented from DstHltInf.

Definition at line 34 of file HltInf.h.

34{ m_emcData.push_back(data);};

Referenced by HltEventMaker::execute(), main(), and HltInfCnv::TObjectToDataObject().

◆ push_mdc() [1/2]

virtual void HltInf::push_mdc ( float data)
inlinevirtual

Reimplemented from DstHltInf.

Definition at line 37 of file HltInf.h.

37{ m_mdcData.push_back(*((uint32_t*)&data));};

◆ push_mdc() [2/2]

virtual void HltInf::push_mdc ( uint32_t data)
inlinevirtual

Reimplemented from DstHltInf.

Definition at line 31 of file HltInf.h.

31{ m_mdcData.push_back(data);};

Referenced by HltEventMaker::execute(), main(), and HltInfCnv::TObjectToDataObject().

◆ push_muc() [1/2]

virtual void HltInf::push_muc ( float data)
inlinevirtual

Reimplemented from DstHltInf.

Definition at line 41 of file HltInf.h.

41{ m_mucData.push_back(*((uint32_t*)&data));};

◆ push_muc() [2/2]

virtual void HltInf::push_muc ( uint32_t data)
inlinevirtual

Reimplemented from DstHltInf.

Definition at line 35 of file HltInf.h.

35{ m_mucData.push_back(data);};

Referenced by HltEventMaker::execute(), and HltInfCnv::TObjectToDataObject().

◆ push_tof() [1/2]

virtual void HltInf::push_tof ( float data)
inlinevirtual

Reimplemented from DstHltInf.

Definition at line 39 of file HltInf.h.

39{ m_tofData.push_back(*((uint32_t*)&data));};

◆ push_tof() [2/2]

virtual void HltInf::push_tof ( uint32_t data)
inlinevirtual

Reimplemented from DstHltInf.

Definition at line 33 of file HltInf.h.

33{ m_tofData.push_back(data);};

Referenced by HltEventMaker::execute(), and HltInfCnv::TObjectToDataObject().

◆ setCgemData()

virtual void HltInf::setCgemData ( const std::vector< uint32_t > & vec)
inlinevirtual

Reimplemented from DstHltInf.

Definition at line 46 of file HltInf.h.

46{m_cgemData=vec;};
dble_vec_t vec[12]
Definition ranlxd.c:372

◆ setConData()

virtual void HltInf::setConData ( const std::vector< uint32_t > & vec)
inlinevirtual

Reimplemented from DstHltInf.

Definition at line 50 of file HltInf.h.

50{m_conData=vec;};

◆ setData() [1/2]

bool HltInf::setData ( const Identifier & id,
uint32_t data )
virtual

Reimplemented from DstHltInf.

Definition at line 29 of file HltInf.cxx.

29 {
30
31 vector<uint32_t>::iterator iter;
32 uint32_t size=0;
33
34 if(HltID::is_mdc_inf(id)) {
35 iter = m_mdcData.begin();
36 size = m_mdcData.size();
37 }
38 else if(HltID::is_cgem_inf(id)) {
39 iter = m_cgemData.begin();
40 size = m_cgemData.size();
41 }
42 else if(HltID::is_tof_inf(id)) {
43 iter = m_tofData.begin();
44 size = m_tofData.size();
45 }
46 else if(HltID::is_emc_inf(id)) {
47 iter = m_emcData.begin();
48 size = m_emcData.size();
49 }
50 else if(HltID::is_muc_inf(id)) {
51 iter = m_mucData.begin();
52 size = m_mucData.size();
53 }
54 else if(HltID::is_con_inf(id)) {
55 iter = m_conData.begin();
56 size = m_conData.size();
57 }
58 else return false;
59
60 uint32_t sub=HltID::id_sub(id);
61
62 if(sub<size) {
63 (*(iter+sub))=data;
64 return true;
65 }
66 else {
67 return false;
68 }
69}

◆ setData() [2/2]

virtual bool HltInf::setData ( const Identifier & id,
float data )
inlinevirtual

Reimplemented from DstHltInf.

Definition at line 43 of file HltInf.h.

43{return setData(id,(*((uint32_t*)&data)));};
virtual bool setData(const Identifier &id, float data)
Definition HltInf.h:43

Referenced by setData().

◆ setEmcData()

virtual void HltInf::setEmcData ( const std::vector< uint32_t > & vec)
inlinevirtual

Reimplemented from DstHltInf.

Definition at line 48 of file HltInf.h.

48{m_emcData=vec;};

◆ setMdcData()

virtual void HltInf::setMdcData ( const std::vector< uint32_t > & vec)
inlinevirtual

Reimplemented from DstHltInf.

Definition at line 45 of file HltInf.h.

45{m_mdcData=vec;};

◆ setMucData()

virtual void HltInf::setMucData ( const std::vector< uint32_t > & vec)
inlinevirtual

Reimplemented from DstHltInf.

Definition at line 49 of file HltInf.h.

49{m_mucData=vec;};

◆ setTofData()

virtual void HltInf::setTofData ( const std::vector< uint32_t > & vec)
inlinevirtual

Reimplemented from DstHltInf.

Definition at line 47 of file HltInf.h.

47{m_tofData=vec;};

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