CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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::auto_ptr<int> product(new int(m_count));
48  e.put(product,m_label);
49  m_count = 0;
50 }
51 
52 void
54  ++m_count;
55 }
void produce(edm::Event &, const edm::EventSetup &)
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:115
BeginOfTrackCounter(const edm::ParameterSet &)
void update(const BeginOfTrack *)
This routine will be called when the appropriate signal arrives.