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
//
12
13
// system include files
14
15
// user include files
16
#include "
SimG4Core/HelpfulWatchers/src/BeginOfTrackCounter.h
"
17
18
#include "
FWCore/Framework/interface/Event.h
"
19
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
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
//
32
BeginOfTrackCounter::BeginOfTrackCounter
(
const
edm::ParameterSet
&iPSet)
33
: m_count(0), m_label(iPSet.getUntrackedParameter<
std
::
string
>(
"instanceLabel"
,
"nBeginOfTracks"
)) {
34
produces<int>(
m_label
);
35
}
36
37
//
38
// member functions
39
//
40
41
void
BeginOfTrackCounter::produce
(
edm::Event
&
e
,
const
edm::EventSetup
&) {
42
std::unique_ptr<int> product(
new
int
(
m_count
));
43
e
.put(
std::move
(product),
m_label
);
44
m_count
= 0;
45
}
46
47
void
BeginOfTrackCounter::update
(
const
BeginOfTrack
*) { ++
m_count
; }
simwatcher
Definition:
BeginOfTrackCounter.h:37
simwatcher::BeginOfTrackCounter::update
void update(const BeginOfTrack *) override
This routine will be called when the appropriate signal arrives.
Definition:
BeginOfTrackCounter.cc:47
simwatcher::BeginOfTrackCounter::m_count
int m_count
Definition:
BeginOfTrackCounter.h:56
BeginOfTrackCounter.h
BeginOfTrack
Definition:
BeginOfTrack.h:6
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ParameterSet
Definition:
ParameterSet.h:47
Event.h
simwatcher::BeginOfTrackCounter::produce
void produce(edm::Event &, const edm::EventSetup &) override
Definition:
BeginOfTrackCounter.cc:41
edm::EventSetup
Definition:
EventSetup.h:58
simwatcher::BeginOfTrackCounter::m_label
std::string m_label
Definition:
BeginOfTrackCounter.h:57
eostools.move
def move(src, dest)
Definition:
eostools.py:511
std
Definition:
JetResolutionObject.h:76
simwatcher::BeginOfTrackCounter::BeginOfTrackCounter
BeginOfTrackCounter(const edm::ParameterSet &)
Definition:
BeginOfTrackCounter.cc:32
ParameterSet.h
edm::Event
Definition:
Event.h:73
MillePedeFileConverter_cfg.e
e
Definition:
MillePedeFileConverter_cfg.py:37
Generated for CMSSW Reference Manual by
1.8.16