BOSS 8.0.0
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", "Cosmic", "GCosmic", "EBhabha",
5 "GEBhabha", "BBhabha", "GBBhabha", "Dimuon", "GDimuon", "Diphoton", "GDiphoton",
6 "Hadron", "GHadron", "Twophoton", "Twophoton", "", "", "",
7 "", "", "", "", "EMCEBhabha", "", "",
8 "", "Other", "Error", "RandomTrg" };
9const std::string DstHltInf::s_err = "EventFilterError";
10
11DstHltInf::DstHltInf( const unsigned int type, const unsigned int alg, const unsigned int cri,
12 const unsigned int ver, const float etot )
13 : DataObject()
15 , m_eventType( type )
16 , m_algProcess( alg )
17 , m_criTable( cri )
18 , m_version( ver )
19 , m_eTotal( etot )
20 , m_number( 0 )
21 , m_ncon( 0 ) {}
22
24 : DataObject()
26 , m_eventType( 0 )
27 , m_algProcess( 0 )
28 , m_criTable( 0 )
29 , m_version( 0 )
30 , m_eTotal( 0 )
31 , m_number( 0 )
32 , m_ncon( 0 ) {}
33
35 : DataObject()
37 , m_eventType( other.m_eventType )
38 , m_algProcess( other.m_algProcess )
39 , m_criTable( other.m_criTable )
40 , m_version( other.m_version )
41 , m_eTotal( other.m_eTotal )
42 , m_number( other.m_number )
43 , m_ncon( other.m_ncon ) {}
44
46 if ( &h != this )
47 {
54 m_ncon = h.m_ncon;
55 }
56 return *this;
57}
58
59const string& DstHltInf::getEventName() const {
60 for ( int i = 0; i < 32; i++ )
61 {
62 if ( m_eventType & ( 1 << i ) ) return ( s_chn[i] );
63 }
64 return s_err;
65}
66
67bool DstHltInf::isType( string& type ) const {
68 for ( int i = 0; i < 32; i++ )
69 {
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]
bool isType(string &type) const
Definition DstHltInf.cxx:67
DstHltInf(const unsigned int type, const unsigned int alg, const unsigned int cri, const unsigned int ver, const float etot)
Definition DstHltInf.cxx:11
const string & getEventName() const
Definition DstHltInf.cxx:59
DstHltInf & operator=(const DstHltInf &)
Definition DstHltInf.cxx:45