BOSS 6.6.4.p01
BESIII Offline Software System
Loading...
Searching...
No Matches
DstHltInf.cxx
Go to the documentation of this file.
2
3const std::string DstHltInf::s_chn[32]={
4 "Junk","GJunk","Beamgas","GBeamgas",
5 "Cosmic","GCosmic","EBhabha","GEBhabha",
6 "BBhabha","GBBhabha","Dimuon","GDimuon",
7 "Diphoton","GDiphoton","Hadron","GHadron",
8 "Twophoton","Twophoton","","",
9 "","","","",
10 "","EMCEBhabha","","",
11 "","Other","Error","RandomTrg"};
12const std::string DstHltInf::s_err="EventFilterError";
13
14DstHltInf::DstHltInf(const unsigned int type, const unsigned int alg,
15 const unsigned int cri, const unsigned int ver, const float etot):
16 DataObject(),IHltInterface(),
17 m_eventType(type),
18 m_algProcess(alg),
19 m_criTable(cri),
20 m_version(ver),
21 m_eTotal(etot),
22 m_number(0),
23 m_ncon(0){
24}
25
27 DataObject(),IHltInterface(),
28 m_eventType(0),
29 m_algProcess(0),
30 m_criTable(0),
31 m_version(0),
32 m_eTotal(0),
33 m_number(0),
34 m_ncon(0){
35}
36
38 DataObject(),IHltInterface(),
39 m_eventType(other.m_eventType),
40 m_algProcess(other.m_algProcess),
41 m_criTable(other.m_criTable),
42 m_version(other.m_version),
43 m_eTotal(other.m_eTotal),
44 m_number(other.m_number),
45 m_ncon(other.m_ncon) {
46}
47
49 if( &h != this ){
56 m_ncon =h.m_ncon;
57 }
58 return *this;
59}
60
61const string& DstHltInf::getEventName() const{
62 for(int i=0;i<32;i++){
63 if(m_eventType&(1<<i)) return (s_chn[i]);
64 }
65 return s_err;
66}
67
68bool DstHltInf::isType(string& type) const{
69 for(int i=0;i<32;i++){
70 if(type!=s_chn[i]) continue;
71 if(m_eventType&(1<<i))return true;
72 }
73 return false;
74}
75
76ostream& operator<<(ostream & os, const DstHltInf& aHlt){
77 os<<"-----DstHltInf-----:"<<endl;
78 os<<"EventType: "<<aHlt.getEventType()<<endl
79 <<"AlgProcess: "<<aHlt.getAlgProcess()<<endl
80 <<"CriteriaTab:"<<aHlt.getCriteriaTable()<<endl
81 <<"EFVersion: "<<aHlt.getVersion()<<endl
82 <<"TotalEnergy:"<<aHlt.getTotalEnergy()<<endl;
83 return os;
84}
Double_t etot
ostream & operator<<(ostream &os, const DstHltInf &aHlt)
Definition: DstHltInf.cxx:76
static const std::string s_chn[32]
Definition: DstHltInf.h:87
uint32_t m_number
Definition: DstHltInf.h:84
float getTotalEnergy() const
Definition: DstHltInf.h:46
uint32_t m_ncon
Definition: DstHltInf.h:85
uint32_t m_criTable
Definition: DstHltInf.h:81
bool isType(string &type) const
Definition: DstHltInf.cxx:68
uint32_t getCriteriaTable() const
Definition: DstHltInf.h:44
static const std::string s_err
Definition: DstHltInf.h:88
float m_eTotal
Definition: DstHltInf.h:83
uint32_t getVersion() const
Definition: DstHltInf.h:45
uint32_t m_version
Definition: DstHltInf.h:82
uint32_t m_eventType
Definition: DstHltInf.h:79
uint32_t getEventType() const
Definition: DstHltInf.h:42
uint32_t m_algProcess
Definition: DstHltInf.h:80
uint32_t getAlgProcess() const
Definition: DstHltInf.h:43
const string & getEventName() const
Definition: DstHltInf.cxx:61
DstHltInf & operator=(const DstHltInf &)
Definition: DstHltInf.cxx:48