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 | Private Member Functions | Private Attributes
simwatcher::BeginOfTrackCounter Class Reference

#include <BeginOfTrackCounter.h>

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

Public Member Functions

 BeginOfTrackCounter (const edm::ParameterSet &)
 
 BeginOfTrackCounter (const BeginOfTrackCounter &)=delete
 
const BeginOfTrackCounteroperator= (const BeginOfTrackCounter &)=delete
 
void produce (edm::Event &, const edm::EventSetup &) override
 
- Public Member Functions inherited from SimProducer
const SimProduceroperator= (const SimProducer &)=delete
 
void registerProducts (edm::ProducesCollector producesCollector)
 
 SimProducer ()
 
 SimProducer (const SimProducer &)=delete
 
- Public Member Functions inherited from SimWatcher
virtual void beginRun (edm::EventSetup const &)
 
bool isMT () const
 
const SimWatcheroperator= (const SimWatcher &)=delete
 
virtual void registerConsumes (edm::ConsumesCollector)
 
 SimWatcher ()
 
 SimWatcher (const SimWatcher &)=delete
 
virtual ~SimWatcher ()
 
- Public Member Functions inherited from Observer< const BeginOfTrack * >
 Observer ()
 
void slotForUpdate (const BeginOfTrack *iT)
 
virtual ~Observer ()
 

Private Member Functions

void update (const BeginOfTrack *) override
 This routine will be called when the appropriate signal arrives. More...
 

Private Attributes

int m_count
 
std::string m_label
 

Additional Inherited Members

- Protected Member Functions inherited from SimProducer
template<class T >
void produces ()
 
template<class T >
void produces (const std::string &instanceName)
 
- Protected Member Functions inherited from SimWatcher
void setMT (bool val)
 

Detailed Description

Definition at line 38 of file BeginOfTrackCounter.h.

Constructor & Destructor Documentation

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

Definition at line 32 of file BeginOfTrackCounter.cc.

References m_label.

33  : m_count(0), m_label(iPSet.getUntrackedParameter<std::string>("instanceLabel", "nBeginOfTracks")) {
34  produces<int>(m_label);
35 }
T getUntrackedParameter(std::string const &, T const &) const
simwatcher::BeginOfTrackCounter::BeginOfTrackCounter ( const BeginOfTrackCounter )
delete

Member Function Documentation

const BeginOfTrackCounter& simwatcher::BeginOfTrackCounter::operator= ( const BeginOfTrackCounter )
delete
void BeginOfTrackCounter::produce ( edm::Event e,
const edm::EventSetup  
)
overridevirtual

Implements SimProducer.

Definition at line 41 of file BeginOfTrackCounter.cc.

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

41  {
42  std::unique_ptr<int> product(new int(m_count));
43  e.put(std::move(product), m_label);
44  m_count = 0;
45 }
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:133
def move
Definition: eostools.py:511
void BeginOfTrackCounter::update ( const BeginOfTrack )
overrideprivatevirtual

Member Data Documentation

int simwatcher::BeginOfTrackCounter::m_count
private

Definition at line 54 of file BeginOfTrackCounter.h.

Referenced by produce(), and update().

std::string simwatcher::BeginOfTrackCounter::m_label
private

Definition at line 55 of file BeginOfTrackCounter.h.

Referenced by BeginOfTrackCounter(), and produce().