CMS 3D CMS Logo

Public Member Functions | Public Attributes

tselnameWorker Struct Reference

#include <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.

                                                                     {
  //h_a  = new TH1F( kA , "a"  , 100,  0, 20 );
  //out.Add(h_a);  
@example_track  h_pt = new TH1F(kPt, "P_t",100,0,100);
@example_track  out.Add(h_pt);
}
tselnameWorker::~tselnameWorker ( )

Definition at line 54 of file tselector.cc.

{
}

Member Function Documentation

void tselnameWorker::postProcess ( TList &  out)

Definition at line 84 of file tselector.cc.

{
}
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.

                                                {
  using namespace edm;
@example_track    using reco::TrackCollection;
  
@example_track    Handle<TrackCollection> tracks;
@example_track    iEvent.getByLabel("ctfWithMaterialTracks",tracks);
@example_track    for(TrackCollection::const_iterator itTrack = tracks->begin();
@example_track        itTrack != tracks->end();                      
@example_track        ++itTrack) {
@example_track       h_pt->Fill(itTrack->pt());  
@example_track    }
  
//  using namespace edmtest;
//  edm::Handle<ThingCollection> hThings;
//  iEvent.getByLabel("Thing",hThings);
//  for ( ThingCollection::const_iterator it = hThings->begin(); 
//        it != hThings->end(); ++it ) {
//    h_a ->Fill( it->a );
//  }
  
}

Member Data Documentation

example_track TH1F* tselnameWorker::h_pt

Definition at line 32 of file tselector.h.

Referenced by process(), and tselnameWorker().