CMS 3D CMS Logo

anlzrname Class Reference

Description: <one line="" class="" summary>="">. More...

Inheritance diagram for anlzrname:

edm::EDAnalyzer

List of all members.

Public Member Functions

 anlzrname (const edm::ParameterSet &)
 ~anlzrname ()

Private Member Functions

virtual void analyze (const edm::Event &, const edm::EventSetup &)
virtual void beginJob (const edm::EventSetup &)
virtual void endJob ()

Private Attributes

example_histo TH1D * histo
example_track edm::InputTag trackTags_


Detailed Description

Description: <one line="" class="" summary>="">.

Implementation: <Notes on="" implementation>="">

Definition at line 42 of file edanalyzer.cc.


Constructor & Destructor Documentation

anlzrname::anlzrname ( const edm::ParameterSet iConfig  )  [explicit]

Definition at line 69 of file edanalyzer.cc.

References histo.

00070                :
00071 @example_track  trackTags_(iConfig.getUntrackedParameter<edm::InputTag>("tracks"))
00072 
00073 {
00074    //now do what ever initialization is needed
00075 @example_histo   edm::Service<TFileService> fs;
00076 @example_histo   histo = fs->make<TH1D>("charge" , "Charges" , 200 , -2 , 2 );
00077 
00078 }

anlzrname::~anlzrname (  ) 

Definition at line 81 of file edanalyzer.cc.

00082 {
00083  
00084    // do anything here that needs to be done at desctruction time
00085    // (e.g. close files, deallocate resources etc.)
00086 
00087 }


Member Function Documentation

void anlzrname::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
) [private, virtual]

Implements edm::EDAnalyzer.

Definition at line 96 of file edanalyzer.cc.

References edm::EventSetup::get(), edm::Event::getByLabel(), histo, tracks, and trackTags_.

00097 {
00098    using namespace edm;
00099 
00100 @example_track   using reco::TrackCollection;
00101 
00102 @example_track    Handle<TrackCollection> tracks;
00103 @example_track    iEvent.getByLabel(trackTags_,tracks);
00104 @example_track    for(TrackCollection::const_iterator itTrack = tracks->begin();
00105 @example_track        itTrack != tracks->end();                      
00106 @example_track        ++itTrack) {
00107 @example_track_histo       int charge = 0;
00108 @example_track       charge = itTrack->charge();  
00109 @example_histo       histo->Fill( charge );
00110 @example_track    }
00111 
00112 #ifdef THIS_IS_AN_EVENT_EXAMPLE
00113    Handle<ExampleData> pIn;
00114    iEvent.getByLabel("example",pIn);
00115 #endif
00116    
00117 #ifdef THIS_IS_AN_EVENTSETUP_EXAMPLE
00118    ESHandle<SetupData> pSetup;
00119    iSetup.get<SetupRecord>().get(pSetup);
00120 #endif
00121 }

void anlzrname::beginJob ( const edm::EventSetup  )  [private, virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 126 of file edanalyzer.cc.

00127 {
00128 }

void anlzrname::endJob ( void   )  [private, virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 132 of file edanalyzer.cc.

00132                   {
00133 }


Member Data Documentation

example_histo TH1D* anlzrname::histo [private]

Definition at line 55 of file edanalyzer.cc.

Referenced by analyze().

example_track edm::InputTag anlzrname::trackTags_ [private]

Definition at line 54 of file edanalyzer.cc.

Referenced by analyze().


The documentation for this class was generated from the following file:
Generated on Tue Jun 9 18:14:40 2009 for CMSSW by  doxygen 1.5.4