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 // $Id: BeginOfTrackCounter.cc,v 1.1 2005/11/29 18:42:56 chrjones Exp $
12 //
13 
14 // system include files
15 
16 // user include files
18 
21 
22 //
23 // constants, enums and typedefs
24 //
25 using namespace simwatcher;
26 //
27 // static data member definitions
28 //
29 
30 //
31 // constructors and destructor
32 //
34  m_count(0),
35  m_label(iPSet.getUntrackedParameter<std::string>("instanceLabel","nBeginOfTracks"))
36 {
37  produces<int>(m_label);
38 }
39 
40 
41 //
42 // member functions
43 //
44 
45 void
47 {
48  std::auto_ptr<int> product(new int(m_count));
49  e.put(product,m_label);
50  m_count = 0;
51 }
52 
53 void
55  ++m_count;
56 }
void produce(edm::Event &, const edm::EventSetup &)
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:85
BeginOfTrackCounter(const edm::ParameterSet &)
void update(const BeginOfTrack *)
This routine will be called when the appropriate signal arrives.