Changeset 243 in svn
- Timestamp:
- Feb 5, 2009, 11:53:41 AM (16 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/interface/TriggerUtil.h
r221 r243 25 25 26 26 TriggerBit(); 27 ~TriggerBit() {}; 27 TriggerBit(const TriggerBit& tb); 28 TriggerBit& operator=(const TriggerBit& tb); 29 ~TriggerBit(); 28 30 29 31 void GetTrigCondition(const string& trigger_algorithm); … … 32 34 TClonesArray *branchJetTrig, TClonesArray *branchTauJetTrig, 33 35 TClonesArray *branchPhotonTrig, TClonesArray *branchETmisTrig); 36 vector<float> GetCuts(const vector<string> &Sequences); 34 37 35 38 private: 36 37 vector<float> GetCuts(const vector<string> &Sequences); 39 38 40 vector<float> ElecValues; 39 41 vector<float> MuonValues; … … 51 53 52 54 TriggerTable(); 53 ~TriggerTable() {}; 55 ~TriggerTable() { list_of_trigger_bits.clear();}; 56 TriggerTable& operator=(TriggerTable& tt); 57 TriggerTable(const TriggerTable& tt); 54 58 55 59 void TriggerCardReader(const string& filename="data/trigger.dat"); … … 69 73 // sauve dans le TTree 70 74 // ce nom est stupide, faut le changer 71 int event_i;72 75 73 76 private: … … 82 85 bool has_been_evaluated; 83 86 bool GlobalResult; 87 int event_i; 84 88 85 89 }; -
trunk/src/TriggerUtil.cc
r219 r243 24 24 has_been_evaluated=false; 25 25 } 26 27 TriggerTable& TriggerTable::operator=(TriggerTable&tt) { 28 if (this == &tt) return *this; 29 event_i = tt.event_i; 30 has_been_evaluated = tt.has_been_evaluated; 31 GlobalResult = tt.GlobalResult; 32 for (unsigned int i=0; i<tt.list_of_trigger_bits.size(); i++) 33 list_of_trigger_bits.push_back(tt.list_of_trigger_bits[i]); 34 return *this; 35 } 36 37 TriggerTable::TriggerTable(const TriggerTable& tt) { 38 event_i = tt.event_i; 39 has_been_evaluated = tt.has_been_evaluated; 40 GlobalResult = tt.GlobalResult; 41 for (unsigned int i=0; i<tt.list_of_trigger_bits.size(); i++) 42 list_of_trigger_bits.push_back(tt.list_of_trigger_bits[i]); 43 } 44 26 45 27 46 void TriggerTable::TriggerCardReader(const string& filename){ … … 95 114 } 96 115 116 TriggerBit::~TriggerBit() { 117 ElecValues.clear(); 118 MuonValues.clear(); 119 JetValues.clear(); 120 TauJetValues.clear(); 121 EtmisValues.clear(); 122 GammaValues.clear(); 123 } 124 125 TriggerBit::TriggerBit(const TriggerBit& tb) { 126 for(unsigned int i=0; i<tb.ElecValues.size(); i++) 127 ElecValues.push_back(tb.ElecValues[i]); 128 129 for(unsigned int i=0; i<tb.MuonValues.size(); i++) 130 MuonValues.push_back(tb.MuonValues[i]); 131 132 for(unsigned int i=0; i<tb.JetValues.size(); i++) 133 JetValues.push_back(tb.JetValues[i]); 134 135 for(unsigned int i=0; i<tb.TauJetValues.size(); i++) 136 TauJetValues.push_back(tb.TauJetValues[i]); 137 138 for(unsigned int i=0; i<tb.EtmisValues.size(); i++) 139 EtmisValues.push_back(tb.EtmisValues[i]); 140 141 for(unsigned int i=0; i<tb.GammaValues.size(); i++) 142 GammaValues.push_back(tb.GammaValues[i]); 143 144 Result = tb.Result; 145 } 146 147 TriggerBit& TriggerBit::operator=(const TriggerBit& tb) { 148 if (this==&tb) return *this; 149 for(unsigned int i=0; i<tb.ElecValues.size(); i++) 150 ElecValues.push_back(tb.ElecValues[i]); 151 152 for(unsigned int i=0; i<tb.MuonValues.size(); i++) 153 MuonValues.push_back(tb.MuonValues[i]); 154 155 for(unsigned int i=0; i<tb.JetValues.size(); i++) 156 JetValues.push_back(tb.JetValues[i]); 157 158 for(unsigned int i=0; i<tb.TauJetValues.size(); i++) 159 TauJetValues.push_back(tb.TauJetValues[i]); 160 161 for(unsigned int i=0; i<tb.EtmisValues.size(); i++) 162 EtmisValues.push_back(tb.EtmisValues[i]); 163 164 for(unsigned int i=0; i<tb.GammaValues.size(); i++) 165 GammaValues.push_back(tb.GammaValues[i]); 166 Result = tb.Result; 167 168 return *this; 169 } 170 171 172 97 173 bool TriggerBit::GetResult(TClonesArray *branchElecTrig, TClonesArray *branchMuonTrig, 98 174 TClonesArray *branchJetTrig, TClonesArray *branchTauJetTrig,
Note:
See TracChangeset
for help on using the changeset viewer.