CMS 3D CMS Logo

BeginOfTrackCounter.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: HelpfulWatchers
4 // Class : BeginOfTrackCounter
5 //
6 // Implementation:
7 // <Notes on implementation>
8 //
9 // Original Author:
10 // Created: Tue Nov 29 12:26:42 EST 2005
11 //
12 
13 // system include files
14 
15 // user include files
17 
20 
21 //
22 // constants, enums and typedefs
23 //
24 using namespace simwatcher;
25 //
26 // static data member definitions
27 //
28 
29 //
30 // constructors and destructor
31 //
33  m_count(0),
34  m_label(iPSet.getUntrackedParameter<std::string>("instanceLabel","nBeginOfTracks"))
35 {
36  produces<int>(m_label);
37 }
38 
39 
40 //
41 // member functions
42 //
43 
44 void
46 {
47  std::unique_ptr<int> product(new int(m_count));
48  e.put(std::move(product),m_label);
49  m_count = 0;
50 }
51 
52 void
54  ++m_count;
55 }
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:127
void produce(edm::Event &, const edm::EventSetup &) override
void update(const BeginOfTrack *) override
This routine will be called when the appropriate signal arrives.
BeginOfTrackCounter(const edm::ParameterSet &)
def move(src, dest)
Definition: eostools.py:510