CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Private Attributes

simwatcher::BeginOfTrackCounter Class Reference

#include <BeginOfTrackCounter.h>

Inheritance diagram for simwatcher::BeginOfTrackCounter:
SimProducer Observer< const BeginOfTrack * > SimWatcher

List of all members.

Public Member Functions

 BeginOfTrackCounter (const edm::ParameterSet &)
void produce (edm::Event &, const edm::EventSetup &)

Private Member Functions

 BeginOfTrackCounter (const BeginOfTrackCounter &)
const BeginOfTrackCounteroperator= (const BeginOfTrackCounter &)
void update (const BeginOfTrack *)
 This routine will be called when the appropriate signal arrives.

Private Attributes

int m_count
std::string m_label

Detailed Description

Definition at line 33 of file BeginOfTrackCounter.h.


Constructor & Destructor Documentation

BeginOfTrackCounter::BeginOfTrackCounter ( const edm::ParameterSet iPSet)

Definition at line 33 of file BeginOfTrackCounter.cc.

References m_label.

                                                                     :
   m_count(0),
   m_label(iPSet.getUntrackedParameter<std::string>("instanceLabel","nBeginOfTracks"))
{
   produces<int>(m_label);
}
simwatcher::BeginOfTrackCounter::BeginOfTrackCounter ( const BeginOfTrackCounter ) [private]

Member Function Documentation

const BeginOfTrackCounter& simwatcher::BeginOfTrackCounter::operator= ( const BeginOfTrackCounter ) [private]
void BeginOfTrackCounter::produce ( edm::Event e,
const edm::EventSetup  
) [virtual]

Implements SimProducer.

Definition at line 46 of file BeginOfTrackCounter.cc.

References m_count, m_label, and edm::Event::put().

{
   std::auto_ptr<int> product(new int(m_count));
   e.put(product,m_label);
   m_count = 0;
}
void BeginOfTrackCounter::update ( const BeginOfTrack ) [private, virtual]

This routine will be called when the appropriate signal arrives.

Implements Observer< const BeginOfTrack * >.

Definition at line 54 of file BeginOfTrackCounter.cc.

References m_count.

                                              {
   ++m_count;
}

Member Data Documentation

Definition at line 54 of file BeginOfTrackCounter.h.

Referenced by produce(), and update().

Definition at line 55 of file BeginOfTrackCounter.h.

Referenced by BeginOfTrackCounter(), and produce().