L1Trigger
L1THGCalUtilities
plugins
ntuples
HGCalTriggerNtupleEvent.cc
Go to the documentation of this file.
1
#include "
L1Trigger/L1THGCalUtilities/interface/HGCalTriggerNtupleBase.h
"
2
3
class
HGCalTriggerNtupleEvent
:
public
HGCalTriggerNtupleBase
{
4
public
:
5
HGCalTriggerNtupleEvent
(
const
edm::ParameterSet
&);
6
7
void
initialize
(TTree&,
const
edm::ParameterSet
&,
edm::ConsumesCollector
&&)
final
;
8
void
fill
(
const
edm::Event
&,
const
edm::EventSetup
&)
final
;
9
10
private
:
11
void
clear
()
final
;
12
13
int
run_
;
14
int
event_
;
15
int
lumi_
;
16
};
17
18
DEFINE_EDM_PLUGIN
(
HGCalTriggerNtupleFactory
,
HGCalTriggerNtupleEvent
,
"HGCalTriggerNtupleEvent"
);
19
20
HGCalTriggerNtupleEvent::HGCalTriggerNtupleEvent
(
const
edm::ParameterSet
& conf) :
HGCalTriggerNtupleBase
(conf) {}
21
22
void
HGCalTriggerNtupleEvent::initialize
(TTree&
tree
,
const
edm::ParameterSet
&,
edm::ConsumesCollector
&&) {
23
clear
();
24
tree
.Branch(
"run"
, &
run_
,
"run/I"
);
25
tree
.Branch(
"event"
, &
event_
,
"event/I"
);
26
tree
.Branch(
"lumi"
, &
lumi_
,
"lumi/I"
);
27
}
28
29
void
HGCalTriggerNtupleEvent::fill
(
const
edm::Event
&
e
,
const
edm::EventSetup
& es) {
30
run_
=
e
.id().run();
31
lumi_
=
e
.luminosityBlock();
32
event_
=
e
.id().event();
33
}
34
35
void
HGCalTriggerNtupleEvent::clear
() {
36
run_
= 0;
37
lumi_
= 0;
38
event_
= 0;
39
}
tree
Definition:
tree.py:1
HGCalTriggerNtupleEvent::HGCalTriggerNtupleEvent
HGCalTriggerNtupleEvent(const edm::ParameterSet &)
Definition:
HGCalTriggerNtupleEvent.cc:20
HGCalTriggerNtupleBase
Definition:
HGCalTriggerNtupleBase.h:10
DEFINE_EDM_PLUGIN
#define DEFINE_EDM_PLUGIN(factory, type, name)
Definition:
PluginFactory.h:124
edm::ParameterSet
Definition:
ParameterSet.h:47
HGCalTriggerNtupleEvent::event_
int event_
Definition:
HGCalTriggerNtupleEvent.cc:14
HGCalTriggerNtupleEvent::fill
void fill(const edm::Event &, const edm::EventSetup &) final
Definition:
HGCalTriggerNtupleEvent.cc:29
edmplugin::PluginFactory
Definition:
PluginFactory.h:34
HGCalTriggerNtupleBase.h
HGCalTriggerNtupleEvent::run_
int run_
Definition:
HGCalTriggerNtupleEvent.cc:13
edm::EventSetup
Definition:
EventSetup.h:58
HGCalTriggerNtupleEvent::lumi_
int lumi_
Definition:
HGCalTriggerNtupleEvent.cc:15
HGCalTriggerNtupleEvent
Definition:
HGCalTriggerNtupleEvent.cc:3
HGCalTriggerNtupleEvent::initialize
void initialize(TTree &, const edm::ParameterSet &, edm::ConsumesCollector &&) final
Definition:
HGCalTriggerNtupleEvent.cc:22
edm::Event
Definition:
Event.h:73
HGCalTriggerNtupleEvent::clear
void clear() final
Definition:
HGCalTriggerNtupleEvent.cc:35
edm::ConsumesCollector
Definition:
ConsumesCollector.h:45
MillePedeFileConverter_cfg.e
e
Definition:
MillePedeFileConverter_cfg.py:37
Generated for CMSSW Reference Manual by
1.8.16