CMS 3D CMS Logo

Public Member Functions | Public Attributes

__class__Worker Struct Reference

#include <TSelector.h>

List of all members.

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 25 of file TSelector.h.


Constructor & Destructor Documentation

__class__Worker::__class__Worker ( 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);
}
__class__Worker::~__class__Worker ( )

Definition at line 54 of file TSelector.cc.

{
}

Member Function Documentation

void __class__Worker::postProcess ( TList &  out)

Definition at line 84 of file TSelector.cc.

{
}
void __class__Worker::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* __class__Worker::h_pt

Definition at line 32 of file TSelector.h.

Referenced by __class__Worker(), and process().