#include <InputAnalyzer.h>
Public Member Functions | |
InputAnalyzer (const edm::ParameterSet &) | |
~InputAnalyzer () | |
Private Member Functions | |
virtual void | analyze (const edm::Event &, const edm::EventSetup &) |
virtual void | beginJob () |
virtual void | endJob () |
Private Attributes | |
bool | dataStep2_ |
edm::InputTag | label_ |
Definition at line 33 of file InputAnalyzer.h.
data refman pasoursint CMSSW_4_4_5_patch3 src SimGeneral MixingModule plugins InputAnalyzer cc InputAnalyzer::InputAnalyzer | ( | const edm::ParameterSet & | iConfig | ) | [explicit] |
Definition at line 51 of file InputAnalyzer.cc.
References dataStep2_, edm::ParameterSet::getParameter(), and label_.
{ dataStep2_ = iConfig.getParameter<bool>("dataStep2"); if (dataStep2_) // The data file contain the PCrossingFrame<SimTrack> label_ = iConfig.getParameter<edm::InputTag>("collPCF"); else // The data file contain the SimTrack label_ = iConfig.getParameter<edm::InputTag>("collSimTrack"); }
InputAnalyzer::~InputAnalyzer | ( | ) |
Definition at line 65 of file InputAnalyzer.cc.
{ }
void InputAnalyzer::analyze | ( | const edm::Event & | iEvent, |
const edm::EventSetup & | iSetup | ||
) | [private, virtual] |
Implements edm::EDAnalyzer.
Definition at line 76 of file InputAnalyzer.cc.
References gather_cfg::cout, dataStep2_, edm::Event::getByLabel(), i, and label_.
{ std::cout << " dataStep2_ = " << dataStep2_ << std::endl; if (!dataStep2_){ // Get the SimTrack collection //double simPt=0; int i=0; // Get the SimTrack collection from the event edm::Handle<SimTrackContainer> simTracks; bool gotTracks = iEvent.getByLabel(label_,simTracks); if (!gotTracks) { std::cout<<"-> Could not read SimTracks !!!!"<<std::endl; } else{ std::cout<<"-> Could read SimTracks !!!!"<<std::endl; } // Loop over the tracks SimTrackContainer::const_iterator simTrack; for (simTrack = simTracks->begin(); simTrack != simTracks->end(); ++simTrack){ i++; //simPt=(*simTrack).momentum().Pt(); //std::cout << " # i = " << i << " simPt = " << simPt << std::endl; } } else{ // Get the PCrossingFrame collection given as signal edm::Handle<PCrossingFrame<SimTrack> > cf_simtrack; bool gotTracks = iEvent.getByLabel("CFWriter","g4SimHits",cf_simtrack); if (!gotTracks) { std::cout<<"-> Could not read PCrossingFrame<SimTracks> !!!!"<<std::endl; } else std::cout<<"-> Could read PCrossingFrame<SimTracks> !!!!"<<std::endl; } }
void InputAnalyzer::beginJob | ( | void | ) | [private, virtual] |
void InputAnalyzer::endJob | ( | void | ) | [private, virtual] |
Reimplemented from edm::EDAnalyzer.
Definition at line 136 of file InputAnalyzer.cc.
bool edm::InputAnalyzer::dataStep2_ [private] |
Definition at line 46 of file InputAnalyzer.h.
Referenced by analyze(), and InputAnalyzer().
edm::InputTag edm::InputAnalyzer::label_ [private] |
Definition at line 47 of file InputAnalyzer.h.
Referenced by analyze(), and InputAnalyzer().