CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Public Attributes
tselnameWorker Struct Reference

#include <tselector.h>

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.

47  {
48  //h_a = new TH1F( kA , "a" , 100, 0, 20 );
49  //out.Add(h_a);
50 @example_track h_pt = new TH1F(kPt, "P_t",100,0,100);
51 @example_track out.Add(h_pt);
52 }
example_track TH1F * h_pt
Definition: tselector.h:32
example_track example_track const char *const kPt
Definition: tselector.cc:35
tuple out
Definition: dbtoconf.py:99
tselnameWorker::~tselnameWorker ( )

Definition at line 54 of file tselector.cc.

55 {
56 }

Member Function Documentation

void tselnameWorker::postProcess ( TList &  out)

Definition at line 84 of file tselector.cc.

85 {
86 }
void tselnameWorker::process ( const edm::Event iEvent)

Definition at line 59 of file tselector.cc.

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

59  {
60  using namespace edm;
61 @example_track using reco::TrackCollection;
62 
63 @example_track Handle<TrackCollection> tracks;
64 @example_track iEvent.getByLabel("ctfWithMaterialTracks",tracks);
65 @example_track for(TrackCollection::const_iterator itTrack = tracks->begin();
66 @example_track itTrack != tracks->end();
67 @example_track ++itTrack) {
68 @example_track h_pt->Fill(itTrack->pt());
69 @example_track }
70 
71 // using namespace edmtest;
72 // edm::Handle<ThingCollection> hThings;
73 // iEvent.getByLabel("Thing",hThings);
74 // for ( ThingCollection::const_iterator it = hThings->begin();
75 // it != hThings->end(); ++it ) {
76 // h_a ->Fill( it->a );
77 // }
78 
79 }
example_track TH1F * h_pt
Definition: tselector.h:32
std::vector< Track > TrackCollection
collection of Tracks
Definition: TrackFwd.h:10
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:355
tuple tracks
Definition: testEve_cfg.py:39

Member Data Documentation

example_track TH1F* tselnameWorker::h_pt

Definition at line 32 of file tselector.h.

Referenced by process(), and tselnameWorker().