CMS 3D CMS Logo

tselnameWorker Struct Reference

#include <FWCore/Skeletons/scripts/mkTemplates/TSelector/tselector.h>

List of all members.

Public Member Functions

void postProcess (TList &)
void process (const edm::Event &iEvent)
 tselnameWorker (const TList *, TList &)
 ~tselnameWorker ()

Public Attributes

example_track TH1F * h_pt


Detailed Description

Definition at line 25 of file tselector.h.


Constructor & Destructor Documentation

tselnameWorker::tselnameWorker ( const TList *  fromSelector,
TList &  out 
)

Definition at line 47 of file tselector.cc.

References h_pt, and kPt.

00047                                                                      {
00048   //h_a  = new TH1F( kA , "a"  , 100,  0, 20 );
00049   //out.Add(h_a);  
00050 @example_track  h_pt = new TH1F(kPt, "P_t",100,0,100);
00051 @example_track  out.Add(h_pt);
00052 }

tselnameWorker::~tselnameWorker (  ) 

Definition at line 54 of file tselector.cc.

00055 {
00056 }


Member Function Documentation

void tselnameWorker::postProcess ( TList &  out  ) 

Definition at line 84 of file tselector.cc.

00085 {
00086 }

void tselnameWorker::process ( const edm::Event iEvent  ) 

Definition at line 59 of file tselector.cc.

References edm::Event::getByLabel(), h_pt, and tracks.

00059                                                 {
00060   using namespace edm;
00061 @example_track    using reco::TrackCollection;
00062   
00063 @example_track    Handle<TrackCollection> tracks;
00064 @example_track    iEvent.getByLabel("ctfWithMaterialTracks",tracks);
00065 @example_track    for(TrackCollection::const_iterator itTrack = tracks->begin();
00066 @example_track        itTrack != tracks->end();                      
00067 @example_track        ++itTrack) {
00068 @example_track       h_pt->Fill(itTrack->pt());  
00069 @example_track    }
00070   
00071 //  using namespace edmtest;
00072 //  edm::Handle<ThingCollection> hThings;
00073 //  iEvent.getByLabel("Thing",hThings);
00074 //  for ( ThingCollection::const_iterator it = hThings->begin(); 
00075 //        it != hThings->end(); ++it ) {
00076 //    h_a ->Fill( it->a );
00077 //  }
00078   
00079 }


Member Data Documentation

example_track TH1F* tselnameWorker::h_pt

Definition at line 32 of file tselector.h.

Referenced by process(), and tselnameWorker().


The documentation for this struct was generated from the following files:
Generated on Tue Jun 9 18:34:38 2009 for CMSSW by  doxygen 1.5.4