BOSS 6.6.4.p01
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_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_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 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 ()
 
virtual const CLID & clID () const
 
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 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 getNCON () const
 
const string & getEventName () const
 
bool isType (string &type) const
 
virtual void push_mdc (uint32_t)
 
virtual void push_tof (uint32_t)
 
virtual void push_emc (uint32_t)
 
virtual void push_muc (uint32_t)
 
virtual void push_con (uint32_t)
 
virtual void push_mdc (float)
 
virtual void push_tof (float)
 
virtual void push_emc (float)
 
virtual void push_muc (float)
 
virtual void push_con (float)
 
virtual bool setData (const Identifier &, uint32_t)
 
virtual bool setData (const Identifier &, float)
 
virtual void setMdcData (const std::vector< uint32_t > &)
 
virtual void setTofData (const std::vector< uint32_t > &)
 
virtual void setEmcData (const std::vector< uint32_t > &)
 
virtual void setMucData (const std::vector< uint32_t > &)
 
virtual void setConData (const std::vector< uint32_t > &)
 
virtual bool getData (const Identifier &, uint32_t *)
 
virtual void print () const
 
- Public Member Functions inherited from IHltInterface
 IHltInterface ()
 
virtual ~IHltInterface ()
 
virtual void push_mdc (uint32_t data=0)=0
 
virtual void push_tof (uint32_t data=0)=0
 
virtual void push_emc (uint32_t data=0)=0
 
virtual void push_muc (uint32_t data=0)=0
 
virtual void push_con (uint32_t data=0)=0
 
virtual void push_mdc (float data=0)=0
 
virtual void push_tof (float data=0)=0
 
virtual void push_emc (float data=0)=0
 
virtual void push_muc (float data=0)=0
 
virtual void push_con (float data=0)=0
 
virtual bool setData (const Identifier &id, uint32_t data=0)=0
 
virtual bool setData (const Identifier &id, float data=0)=0
 
virtual void setMdcData (const std::vector< uint32_t > &data)=0
 
virtual void setTofData (const std::vector< uint32_t > &data)=0
 
virtual void setEmcData (const std::vector< uint32_t > &data)=0
 
virtual void setMucData (const std::vector< uint32_t > &data)=0
 
virtual void setConData (const std::vector< uint32_t > &data)=0
 
virtual bool getData (const Identifier &id, uint32_t *data=0)=0
 
virtual void print () const =0
 

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_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_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_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
Definition: EventModel.cxx:282

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 80 of file HltInf.cxx.

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

Referenced by EventFilter::print().

◆ getDataVec() [1/2]

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

Definition at line 67 of file HltInf.cxx.

67 {
68 if(HltID::is_mdc_inf(id)) return m_mdcData;
69 else if(HltID::is_tof_inf(id)) return m_tofData;
70 else if(HltID::is_emc_inf(id)) return m_emcData;
71 else if(HltID::is_muc_inf(id)) return m_mucData;
72 else if(HltID::is_con_inf(id)) return m_conData;
73 else return m_conData; //default: return condition number
74}

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

◆ getDataVec() [2/2]

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

Definition at line 76 of file HltInf.cxx.

76 {
77 return getDataVec(HltID::data_type_id(part));
78}
static Identifier data_type_id(const unsigned int detector, const unsigned int id_in_sub=0)
For a single data.
Definition: HltID.cxx:171
std::vector< uint32_t > & getDataVec(const Identifier &)
Definition: HltInf.cxx:67

◆ 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 118 of file HltInf.cxx.

118 {
119 std::cout << *this;
120 std::cout << "MDC data:" << dec << m_mdcData.size() << std::endl;
121 for(uint32_t i=0;i<m_mdcData.size();i++){
122 std::cout << " #"<<i<<"# ";
123 std::cout << *((int*)&m_mdcData[i]) << "(" << *((float*)&m_mdcData[i]) << ")";
124 if(i==m_mdcData.size()-1) std::cout << std::endl;
125 }
126 std::cout << "TOF data:" << m_tofData.size() << std::endl;
127 for(uint32_t i=0;i<m_tofData.size();i++){
128 std::cout << " #"<<i<<"# ";
129 std::cout << *((int*)&m_tofData[i]) << "(" << *((float*)&m_tofData[i]) << ")";
130 if(i==m_tofData.size()-1) std::cout << std::endl;
131 }
132 std::cout << "EMC data:" << m_emcData.size() << std::endl;
133 for(uint32_t i=0;i<m_emcData.size();i++){
134 std::cout << " #"<<i<<"# ";
135 std::cout << *((int*)&m_emcData[i]) << "(" << *((float*)&m_emcData[i]) << ")";
136 if(i==m_emcData.size()-1) std::cout << std::endl;
137 }
138 std::cout << "MUC data:" << m_mucData.size() << std::endl;
139 for(uint32_t i=0;i<m_mucData.size();i++){
140 std::cout << " #"<<i<<"# ";
141 std::cout << *((int*)&m_mucData[i]) << "(" << *((float*)&m_mucData[i]) << ")";
142 if(i==m_mucData.size()-1) std::cout << std::endl;
143 }
144 std::cout << "CON data:" << m_conData.size() << std::endl;
145 for(uint32_t i=0;i<m_conData.size();i++){
146 std::cout << " #"<<i<<"# ";
147 std::cout << *((int*)&m_conData[i]);
148 if(i==m_conData.size()-1) std::cout << std::endl;
149 }
150 return;
151}

Referenced by main().

◆ push_con() [1/2]

virtual void HltInf::push_con ( float  data)
inlinevirtual

Reimplemented from DstHltInf.

Definition at line 40 of file HltInf.h.

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

◆ push_con() [2/2]

virtual void HltInf::push_con ( uint32_t  data)
inlinevirtual

Reimplemented from DstHltInf.

Definition at line 35 of file HltInf.h.

35{ 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 38 of file HltInf.h.

38{ 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 33 of file HltInf.h.

33{ 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 36 of file HltInf.h.

36{ 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 39 of file HltInf.h.

39{ 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 34 of file HltInf.h.

34{ 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 37 of file HltInf.h.

37{ 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 32 of file HltInf.h.

32{ m_tofData.push_back(data);};

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

◆ setConData()

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

Reimplemented from DstHltInf.

Definition at line 47 of file HltInf.h.

47{m_conData=vec;};
dble_vec_t vec[12]
Definition: ranlxd.c:372

◆ 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_tof_inf(id)) {
39 iter = m_tofData.begin();
40 size = m_tofData.size();
41 }
42 else if(HltID::is_emc_inf(id)) {
43 iter = m_emcData.begin();
44 size = m_emcData.size();
45 }
46 else if(HltID::is_muc_inf(id)) {
47 iter = m_mucData.begin();
48 size = m_mucData.size();
49 }
50 else if(HltID::is_con_inf(id)) {
51 iter = m_conData.begin();
52 size = m_conData.size();
53 }
54 else return false;
55
56 uint32_t sub=HltID::id_sub(id);
57
58 if(sub<size) {
59 (*(iter+sub))=data;
60 return true;
61 }
62 else {
63 return false;
64 }
65}

◆ setData() [2/2]

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

Reimplemented from DstHltInf.

Definition at line 41 of file HltInf.h.

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

Referenced by setData().

◆ setEmcData()

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

Reimplemented from DstHltInf.

Definition at line 45 of file HltInf.h.

45{m_emcData=vec;};

◆ setMdcData()

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

Reimplemented from DstHltInf.

Definition at line 43 of file HltInf.h.

43{m_mdcData=vec;};

◆ setMucData()

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

Reimplemented from DstHltInf.

Definition at line 46 of file HltInf.h.

46{m_mucData=vec;};

◆ setTofData()

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

Reimplemented from DstHltInf.

Definition at line 44 of file HltInf.h.

44{m_tofData=vec;};

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