Changeset d77b51d in git for classes/DelphesLHEFReader.cc
- Timestamp:
- Sep 29, 2015, 2:08:10 PM (9 years ago)
- Branches:
- ImprovedOutputFile, Timing, dual_readout, llp, master
- Children:
- a98c7ef
- Parents:
- d870fc5 (diff), 06ec139 (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
rd870fc5 rd77b51d 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.