Public Member Functions | |
anlzrname (const edm::ParameterSet &) | |
~anlzrname () | |
Static Public Member Functions | |
static void | fillDescriptions (edm::ConfigurationDescriptions &descriptions) |
Private Member Functions | |
virtual void | analyze (const edm::Event &, const edm::EventSetup &) |
virtual void | beginJob () |
virtual void | endJob () |
Private Attributes | |
example_histo TH1D * | histo |
example_track edm::InputTag | trackTags_ |
Description: [one line class summary]
Implementation: [Notes on implementation]
Definition at line 42 of file edanalyzer.cc.
anlzrname::anlzrname | ( | const edm::ParameterSet & | iConfig | ) | [explicit] |
Definition at line 76 of file edanalyzer.cc.
References timingPdfMaker::histo.
: @example_track trackTags_(iConfig.getUntrackedParameter<edm::InputTag>("tracks")) { //now do what ever initialization is needed @example_histo edm::Service<TFileService> fs; @example_histo histo = fs->make<TH1D>("charge" , "Charges" , 200 , -2 , 2 ); }
anlzrname::~anlzrname | ( | ) |
Definition at line 88 of file edanalyzer.cc.
{ // do anything here that needs to be done at desctruction time // (e.g. close files, deallocate resources etc.) }
void anlzrname::analyze | ( | const edm::Event & | iEvent, |
const edm::EventSetup & | iSetup | ||
) | [private, virtual] |
Implements edm::EDAnalyzer.
Definition at line 103 of file edanalyzer.cc.
References DeDxDiscriminatorTools::charge(), edm::EventSetup::get(), edm::Event::getByLabel(), histo, testEve_cfg::tracks, and trackTags_.
{ using namespace edm; @example_track using reco::TrackCollection; @example_track Handle<TrackCollection> tracks; @example_track iEvent.getByLabel(trackTags_,tracks); @example_track for(TrackCollection::const_iterator itTrack = tracks->begin(); @example_track itTrack != tracks->end(); @example_track ++itTrack) { @example_track_histo int charge = 0; @example_track charge = itTrack->charge(); @example_histo histo->Fill( charge ); @example_track } #ifdef THIS_IS_AN_EVENT_EXAMPLE Handle<ExampleData> pIn; iEvent.getByLabel("example",pIn); #endif #ifdef THIS_IS_AN_EVENTSETUP_EXAMPLE ESHandle<SetupData> pSetup; iSetup.get<SetupRecord>().get(pSetup); #endif }
void anlzrname::beginJob | ( | void | ) | [private, virtual] |
void anlzrname::endJob | ( | void | ) | [private, virtual] |
void anlzrname::fillDescriptions | ( | edm::ConfigurationDescriptions & | descriptions | ) | [static] |
Reimplemented from edm::EDAnalyzer.
Definition at line 177 of file edanalyzer.cc.
References edm::ConfigurationDescriptions::addDefault(), and edm::ParameterSetDescription::setUnknown().
{ //The following says we do not know what parameters are allowed so do no validation // Please change this to state exactly what you do use, even if it is no parameters edm::ParameterSetDescription desc; desc.setUnknown(); descriptions.addDefault(desc); @example_track @example_track //Specify that only 'tracks' is allowed @example_track //To use, remove the default given above and uncomment below @example_track //ParameterSetDescription desc; @example_track //desc.addUntracked<edm::InputTag>("tracks","ctfWithMaterialTracks"); @example_track //descriptions.addDefault(desc); }
example_histo TH1D* anlzrname::histo [private] |
Definition at line 62 of file edanalyzer.cc.
Referenced by analyze().
example_track edm::InputTag anlzrname::trackTags_ [private] |
Definition at line 61 of file edanalyzer.cc.
Referenced by analyze().