BOSS 7.0.2
BESIII Offline Software System
Loading...
Searching...
No Matches
DstHltInf.cxx
Go to the documentation of this file.
1#include "HltEvent/DstHltInf.h"
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
bool isType(string &type) const
Definition: DstHltInf.cxx:68
const string & getEventName() const
Definition: DstHltInf.cxx:61
DstHltInf & operator=(const DstHltInf &)
Definition: DstHltInf.cxx:48