Main Page
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
o
p
q
r
s
t
u
v
w
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Properties
_
a
d
e
f
l
m
o
p
s
t
u
v
Related Functions
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Package Documentation
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
Calibration
LumiAlCaRecoProducers
plugins
AlcaPCCIntegrator.cc
Go to the documentation of this file.
1
/*_________________________________________________________________
2
class: AlcaPCCIntegrator.cc
3
4
5
6
authors: Sam Higginbotham (shigginb@cern.ch), Chris Palmer (capalmer@cern.ch), Attila Radl (attila.radl@cern.ch)
7
8
________________________________________________________________**/
9
10
// C++ standard
11
#include <string>
12
// CMS
13
#include "
DataFormats/Luminosity/interface/PixelClusterCountsInEvent.h
"
14
#include "
DataFormats/Luminosity/interface/PixelClusterCounts.h
"
15
16
#include "
FWCore/MessageLogger/interface/MessageLogger.h
"
17
#include "
FWCore/Framework/interface/MakerMacros.h
"
18
#include "
FWCore/Framework/interface/ConsumesCollector.h
"
19
#include "
FWCore/Framework/interface/Frameworkfwd.h
"
20
#include "
FWCore/Framework/interface/one/EDProducer.h
"
21
#include "
FWCore/Framework/interface/Event.h
"
22
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
23
#include "
FWCore/Utilities/interface/EDGetToken.h
"
24
#include "
FWCore/ServiceRegistry/interface/Service.h
"
25
#include "
FWCore/Framework/interface/ESHandle.h
"
26
#include "
FWCore/Framework/interface/EventSetup.h
"
27
#include "
FWCore/Framework/interface/LuminosityBlock.h
"
28
#include "TMath.h"
29
//The class
30
class
AlcaPCCIntegrator
31
:
public
edm::one::EDProducer
<edm::EndLuminosityBlockProducer, edm::one::WatchLuminosityBlocks> {
32
public
:
33
explicit
AlcaPCCIntegrator
(
const
edm::ParameterSet
&);
34
~AlcaPCCIntegrator
()
override
;
35
36
private
:
37
void
beginLuminosityBlock
(
edm::LuminosityBlock
const
& lumiSeg,
const
edm::EventSetup
& iSetup)
override
;
38
void
endLuminosityBlock
(
edm::LuminosityBlock
const
& lumiSeg,
const
edm::EventSetup
& iSetup)
override
;
39
void
endLuminosityBlockProduce
(
edm::LuminosityBlock
& lumiSeg,
const
edm::EventSetup
& iSetup)
override
;
40
void
produce
(
edm::Event
&
iEvent
,
const
edm::EventSetup
& iSetup)
override
;
41
42
edm::EDGetTokenT<reco::PixelClusterCountsInEvent>
pccToken_
;
43
std::string
pccSource_
;
44
45
std::string
trigstring_
;
//specifies the input trigger Rand or ZeroBias
46
std::string
prodInst_
;
//file product instance
47
int
countEvt_
;
//counter
48
int
countLumi_
;
//counter
49
50
std::unique_ptr<reco::PixelClusterCounts>
thePCCob
;
51
};
52
53
//--------------------------------------------------------------------------------------------------
54
AlcaPCCIntegrator::AlcaPCCIntegrator
(
const
edm::ParameterSet
& iConfig) {
55
pccSource_
=
56
iConfig.
getParameter
<
edm::ParameterSet
>(
"AlcaPCCIntegratorParameters"
).getParameter<std::string>(
"inputPccLabel"
);
57
auto
trigstring_
= iConfig.
getParameter
<
edm::ParameterSet
>(
"AlcaPCCIntegratorParameters"
)
58
.getUntrackedParameter<std::string>(
"trigstring"
,
"alcaPCC"
);
59
prodInst_
=
60
iConfig.
getParameter
<
edm::ParameterSet
>(
"AlcaPCCIntegratorParameters"
).getParameter<std::string>(
"ProdInst"
);
61
62
edm::InputTag
PCCInputTag_(
pccSource_
,
trigstring_
);
63
64
countLumi_
= 0;
65
66
produces<reco::PixelClusterCounts, edm::Transition::EndLuminosityBlock>(
prodInst_
);
67
pccToken_
= consumes<reco::PixelClusterCountsInEvent>(PCCInputTag_);
68
}
69
70
//--------------------------------------------------------------------------------------------------
71
AlcaPCCIntegrator::~AlcaPCCIntegrator
() {}
72
73
//--------------------------------------------------------------------------------------------------
74
void
AlcaPCCIntegrator::produce
(
edm::Event
&
iEvent
,
const
edm::EventSetup
& iSetup) {
75
countEvt_
++;
76
77
unsigned
int
bx
=
iEvent
.bunchCrossing();
78
//std::cout<<"The Bunch Crossing Int"<<bx<<std::endl;
79
80
thePCCob
->eventCounter(
bx
);
81
82
//Looping over the clusters and adding the counts up
83
edm::Handle<reco::PixelClusterCountsInEvent>
pccHandle;
84
iEvent
.getByToken(
pccToken_
, pccHandle);
85
86
const
reco::PixelClusterCountsInEvent
inputPcc = *(pccHandle.
product
());
87
thePCCob
->add(inputPcc);
88
}
89
90
//--------------------------------------------------------------------------------------------------
91
void
AlcaPCCIntegrator::beginLuminosityBlock
(
edm::LuminosityBlock
const
& lumiSeg,
const
edm::EventSetup
& iSetup) {
92
//PCC object at the beginning of each lumi section
93
thePCCob
= std::make_unique<reco::PixelClusterCounts>();
94
countLumi_
++;
95
}
96
97
//--------------------------------------------------------------------------------------------------
98
void
AlcaPCCIntegrator::endLuminosityBlock
(
edm::LuminosityBlock
const
& lumiSeg,
const
edm::EventSetup
& iSetup) {}
99
100
//--------------------------------------------------------------------------------------------------
101
void
AlcaPCCIntegrator::endLuminosityBlockProduce
(
edm::LuminosityBlock
& lumiSeg,
const
edm::EventSetup
& iSetup) {
102
//Saving the PCC object
103
lumiSeg.
put
(
std::move
(
thePCCob
),
std::string
(
prodInst_
));
104
}
105
106
DEFINE_FWK_MODULE
(
AlcaPCCIntegrator
);
reco::PixelClusterCountsInEvent
Definition:
PixelClusterCountsInEvent.h:15
AlcaPCCIntegrator::produce
void produce(edm::Event &iEvent, const edm::EventSetup &iSetup) override
Definition:
AlcaPCCIntegrator.cc:74
EDProducer.h
MessageLogger.h
edm::Handle::product
T const * product() const
Definition:
Handle.h:70
PixelClusterCountsInEvent.h
ESHandle.h
edm::LuminosityBlock
Definition:
LuminosityBlock.h:50
edm::EDGetTokenT< reco::PixelClusterCountsInEvent >
LuminosityBlock.h
AlcaPCCIntegrator::thePCCob
std::unique_ptr< reco::PixelClusterCounts > thePCCob
Definition:
AlcaPCCIntegrator.cc:50
l1GtPatternGenerator_cfi.bx
bx
Definition:
l1GtPatternGenerator_cfi.py:18
AlcaPCCIntegrator::AlcaPCCIntegrator
AlcaPCCIntegrator(const edm::ParameterSet &)
Definition:
AlcaPCCIntegrator.cc:54
edm::one::EDProducer
Definition:
EDProducer.h:30
edm::Handle
Definition:
AssociativeIterator.h:50
AlcaPCCIntegrator
Definition:
AlcaPCCIntegrator.cc:30
PixelClusterCounts.h
MakerMacros.h
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition:
MakerMacros.h:16
Service.h
AlcaPCCIntegrator::endLuminosityBlock
void endLuminosityBlock(edm::LuminosityBlock const &lumiSeg, const edm::EventSetup &iSetup) override
Definition:
AlcaPCCIntegrator.cc:98
EDGetToken.h
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
AlcaPCCIntegrator::~AlcaPCCIntegrator
~AlcaPCCIntegrator() override
Definition:
AlcaPCCIntegrator.cc:71
edm::ParameterSet
Definition:
ParameterSet.h:47
Event.h
AlcaPCCIntegrator::countEvt_
int countEvt_
Definition:
AlcaPCCIntegrator.cc:47
iEvent
int iEvent
Definition:
GenABIO.cc:224
edm::EventSetup
Definition:
EventSetup.h:57
AlcaPCCIntegrator::trigstring_
std::string trigstring_
Definition:
AlcaPCCIntegrator.cc:45
AlcaPCCIntegrator::prodInst_
std::string prodInst_
Definition:
AlcaPCCIntegrator.cc:46
edm::LuminosityBlock::put
void put(std::unique_ptr< PROD > product)
Put a new product.
Definition:
LuminosityBlock.h:116
AlcaPCCIntegrator::beginLuminosityBlock
void beginLuminosityBlock(edm::LuminosityBlock const &lumiSeg, const edm::EventSetup &iSetup) override
Definition:
AlcaPCCIntegrator.cc:91
eostools.move
def move(src, dest)
Definition:
eostools.py:511
AlcaPCCIntegrator::pccToken_
edm::EDGetTokenT< reco::PixelClusterCountsInEvent > pccToken_
Definition:
AlcaPCCIntegrator.cc:42
AlcaPCCIntegrator::countLumi_
int countLumi_
Definition:
AlcaPCCIntegrator.cc:48
Frameworkfwd.h
EventSetup.h
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition:
ParameterSet.h:303
ConsumesCollector.h
AlcaPCCIntegrator::endLuminosityBlockProduce
void endLuminosityBlockProduce(edm::LuminosityBlock &lumiSeg, const edm::EventSetup &iSetup) override
Definition:
AlcaPCCIntegrator.cc:101
ParameterSet.h
edm::Event
Definition:
Event.h:73
AlcaPCCIntegrator::pccSource_
std::string pccSource_
Definition:
AlcaPCCIntegrator.cc:43
edm::InputTag
Definition:
InputTag.h:15
Generated for CMSSW Reference Manual by
1.8.16