Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
src
SimG4Core
HelpfulWatchers
src
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
17
#include "
SimG4Core/HelpfulWatchers/src/BeginOfTrackCounter.h
"
18
19
#include "
FWCore/Framework/interface/Event.h
"
20
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
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
//
33
BeginOfTrackCounter::BeginOfTrackCounter
(
const
edm::ParameterSet
& iPSet) :
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
46
BeginOfTrackCounter::produce
(
edm::Event
&
e
,
const
edm::EventSetup
&)
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
54
BeginOfTrackCounter::update
(
const
BeginOfTrack
*){
55
++
m_count
;
56
}
Event.h
simwatcher::BeginOfTrackCounter::produce
void produce(edm::Event &, const edm::EventSetup &)
Definition:
BeginOfTrackCounter.cc:46
simwatcher::BeginOfTrackCounter::m_label
std::string m_label
Definition:
BeginOfTrackCounter.h:55
BeginOfTrack
Definition:
BeginOfTrack.h:6
ParameterSet.h
edm::Event::put
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition:
Event.h:85
edm::EventSetup
Definition:
EventSetup.h:44
simwatcher::BeginOfTrackCounter::m_count
int m_count
Definition:
BeginOfTrackCounter.h:54
simwatcher::BeginOfTrackCounter::BeginOfTrackCounter
BeginOfTrackCounter(const edm::ParameterSet &)
Definition:
BeginOfTrackCounter.cc:33
alignCSCRings.e
list e
Definition:
alignCSCRings.py:90
simwatcher::BeginOfTrackCounter::update
void update(const BeginOfTrack *)
This routine will be called when the appropriate signal arrives.
Definition:
BeginOfTrackCounter.cc:54
BeginOfTrackCounter.h
edm::ParameterSet
Definition:
ParameterSet.h:35
edm::Event
Definition:
Event.h:50
Generated for CMSSW Reference Manual by
1.8.5