ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/OSUT3Analysis/AnaTools/plugins/OSUAnalysis.cc
(Generate patch)

Comparing UserCode/OSUT3Analysis/AnaTools/plugins/OSUAnalysis.cc (file contents):
Revision 1.103 by wulsin, Mon Jul 22 15:27:58 2013 UTC vs.
Revision 1.104 by wulsin, Mon Jul 22 15:39:13 2013 UTC

# Line 642 | Line 642 | OSUAnalysis::OSUAnalysis (const edm::Par
642      clog << "Listing run:lumi:event in file findEvents.txt for events that pass full selection (of any channel)." << endl;  
643    }
644  
645 +  isFirstEvent_ = true;  
646 +
647   } // end constructor OSUAnalysis::OSUAnalysis()
648  
649  
# Line 730 | Line 732 | OSUAnalysis::produce (edm::Event &event,
732    //get pile-up event weight
733    if (doPileupReweighting_ && datasetType_ != "data") {
734      //for "data" datasets, the numTruePV is always set to -1
735 <    if (events->at(0).numTruePV < 0) clog << "WARNING[OSUAnalysis::analyze]: Event has numTruePV<0.  Turning off pile-up reweighting." << endl;
735 >    if (events->at(0).numTruePV < 0 && isFirstEvent_) clog << "WARNING[OSUAnalysis::analyze]: Event has numTruePV<0.  Turning off pile-up reweighting." << endl;
736      else masterScaleFactor *= puWeight_->at (events->at (0).numTruePV);
737    }
738  
# Line 1355 | Line 1357 | OSUAnalysis::produce (edm::Event &event,
1357  
1358    event.put (channelDecisions, "channelDecisions");
1359  
1360 < } // end void OSUAnalysis::analyze (const edm::Event &event, const edm::EventSetup &setup)
1360 >  isFirstEvent_ = false;  
1361 >
1362 > } // end void OSUAnalysis::produce (const edm::Event &event, const edm::EventSetup &setup)
1363  
1364  
1365  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines