Changeset 28027d5 in git for classes/DelphesLHEFReader.cc
- Timestamp:
- Jun 26, 2015, 3:13:55 PM (9 years ago)
- Branches:
- ImprovedOutputFile, Timing, dual_readout, llp, master
- Children:
- f3c4047
- Parents:
- f53a4d2 (diff), fe0273c (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
classes/DelphesLHEFReader.cc
rf53a4d2 r28027d5 82 82 fEventCounter = -1; 83 83 fParticleCounter = -1; 84 f RwgtList.clear();84 fWeightList.clear(); 85 85 } 86 86 … … 99 99 TObjArray *partonOutputArray) 100 100 { 101 int rc ;101 int rc, id; 102 102 char *pch; 103 103 double weight; … … 158 158 else if(strstr(fBuffer, "<wgt")) 159 159 { 160 pch = str str(fBuffer, ">");160 pch = strpbrk(fBuffer, "\"'"); 161 161 if(!pch) 162 162 { … … 165 165 } 166 166 167 DelphesStream bufferStream(pch + 1); 168 rc = bufferStream.ReadDbl(weight); 167 DelphesStream idStream(pch + 1); 168 rc = idStream.ReadInt(id); 169 170 pch = strchr(fBuffer, '>'); 171 if(!pch) 172 { 173 cerr << "** ERROR: " << "invalid weight format" << endl; 174 return kFALSE; 175 } 176 177 DelphesStream weightStream(pch + 1); 178 rc = weightStream.ReadDbl(weight); 169 179 170 180 if(!rc) … … 174 184 } 175 185 176 f RwgtList.push_back(weight);186 fWeightList.push_back(make_pair(id, weight)); 177 187 } 178 188 else if(strstr(fBuffer, "</event>")) … … 206 216 //--------------------------------------------------------------------------- 207 217 208 void DelphesLHEFReader::AnalyzeRwgt(ExRootTreeBranch *branch) 209 { 210 Weight *element; 211 vector<double>::const_iterator itRwgtList; 212 213 for(itRwgtList = fRwgtList.begin(); itRwgtList != fRwgtList.end(); ++itRwgtList) 214 { 215 element = static_cast<Weight *>(branch->NewEntry()); 216 217 element->Weight = *itRwgtList; 218 void DelphesLHEFReader::AnalyzeWeight(ExRootTreeBranch *branch) 219 { 220 LHEFWeight *element; 221 vector< pair< int, double > >::const_iterator itWeightList; 222 223 for(itWeightList = fWeightList.begin(); itWeightList != fWeightList.end(); ++itWeightList) 224 { 225 element = static_cast<LHEFWeight *>(branch->NewEntry()); 226 227 element->ID = itWeightList->first; 228 element->Weight = itWeightList->second; 218 229 } 219 230 }
Note:
See TracChangeset
for help on using the changeset viewer.