Main Page
Namespaces
Classes
Package Documentation
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
//
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
; }
edm::Event::put
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition:
Event.h:125
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
Event.h
simwatcher::BeginOfTrackCounter::m_label
std::string m_label
Definition:
BeginOfTrackCounter.h:57
std
Definition:
JetResolutionObject.h:80
MillePedeFileConverter_cfg.e
e
Definition:
MillePedeFileConverter_cfg.py:37
BeginOfTrack
Definition:
BeginOfTrack.h:6
ParameterSet.h
simwatcher::BeginOfTrackCounter::produce
void produce(edm::Event &, const edm::EventSetup &) override
Definition:
BeginOfTrackCounter.cc:41
edm::EventSetup
Definition:
EventSetup.h:57
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
simwatcher
Definition:
BeginOfTrackCounter.h:37
simwatcher::BeginOfTrackCounter::BeginOfTrackCounter
BeginOfTrackCounter(const edm::ParameterSet &)
Definition:
BeginOfTrackCounter.cc:32
BeginOfTrackCounter.h
edm::ParameterSet
Definition:
ParameterSet.h:36
edm::Event
Definition:
Event.h:71
eostools.move
def move(src, dest)
Definition:
eostools.py:511
Generated for CMSSW Reference Manual by
1.8.11