CMS 3D CMS Logo

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

#include <TSelector.h>

Public Member Functions

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

Public Attributes

example_track TH1F * h_pt
 

Detailed Description

Definition at line 24 of file TSelector.h.

Constructor & Destructor Documentation

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

Definition at line 45 of file TSelector.cc.

References h_pt, and kPt.

45  {
46  //h_a = new TH1F( kA , "a" , 100, 0, 20 );
47  //out.Add(h_a);
48 @example_track h_pt = new TH1F(kPt, "P_t", 100, 0, 100);
49 @example_track out.Add(h_pt);
50 }
example_track TH1F * h_pt
Definition: TSelector.h:31
example_track example_trackconst char *const kPt
Definition: TSelector.cc:33
__class__Worker::~__class__Worker ( )

Definition at line 52 of file TSelector.cc.

52  {
53 }

Member Function Documentation

void __class__Worker::postProcess ( TList &  out)

Definition at line 75 of file TSelector.cc.

75  {
76 }
void __class__Worker::process ( const edm::Event iEvent)

Definition at line 55 of file TSelector.cc.

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

55  {
56  using namespace edm;
57 @example_track using reco::TrackCollection;
58 @example_track
59 @example_track Handle<TrackCollection> tracks;
60 @example_track iEvent.getByLabel("ctfWithMaterialTracks", tracks);
61 @example_track for (const auto& track : *tracks) {
62 @example_track h_pt->Fill(itTrack->pt());
63 @example_track }
64 
65  //using namespace edmtest;
66  //edm::Handle<ThingCollection> hThings;
67  //iEvent.getByLabel("Thing", hThings);
68  //for (const auto& thing : *hThings) {
69  // h_a ->Fill(it->a);
70  //}
71 }
std::vector< Track > TrackCollection
collection of Tracks
Definition: TrackFwd.h:14
example_track TH1F * h_pt
Definition: TSelector.h:31
auto const & tracks
cannot be loose
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:500

Member Data Documentation

example_track TH1F* __class__Worker::h_pt

Definition at line 31 of file TSelector.h.

Referenced by __class__Worker(), and process().