L1TriggerConfig
Utilities
src
L1TriggerKeyExtViewer.cc
Go to the documentation of this file.
1
#include "
FWCore/Framework/interface/EDAnalyzer.h
"
2
#include "
FWCore/Framework/interface/Event.h
"
3
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
4
5
#include "
FWCore/Framework/interface/EventSetup.h
"
6
#include "
FWCore/Framework/interface/ESHandle.h
"
7
8
#include "
CondFormats/DataRecord/interface/L1TriggerKeyExtRcd.h
"
9
#include "
CondFormats/L1TObjects/interface/L1TriggerKeyExt.h
"
10
11
class
L1TriggerKeyExtViewer
:
public
edm::EDAnalyzer
{
12
private
:
13
std::string
label
;
14
15
public
:
16
void
analyze
(
const
edm::Event
&,
const
edm::EventSetup
&)
override
;
17
18
explicit
L1TriggerKeyExtViewer
(
const
edm::ParameterSet
&
pset
)
19
:
edm
::
EDAnalyzer
(),
label
(
pset
.getParameter<
std
::
string
>(
"label"
)) {}
20
21
~L1TriggerKeyExtViewer
(
void
)
override
{}
22
};
23
24
#include <iostream>
25
using namespace
std
;
26
27
void
L1TriggerKeyExtViewer::analyze
(
const
edm::Event
&
iEvent
,
const
edm::EventSetup
& evSetup) {
28
edm::ESHandle<L1TriggerKeyExt>
handle1;
29
evSetup.
get
<
L1TriggerKeyExtRcd
>().
get
(
label
, handle1);
30
std::shared_ptr<L1TriggerKeyExt> ptr1(
new
L1TriggerKeyExt
(*(handle1.
product
())));
31
32
cout
<<
"L1TriggerKeyExt: parent key = "
<< ptr1->tscKey() << endl;
33
34
cout
<<
" uGT key: "
<< ptr1->subsystemKey(
L1TriggerKeyExt::kuGT
) << endl;
35
cout
<<
" uGMT key: "
<< ptr1->subsystemKey(
L1TriggerKeyExt::kuGMT
) << endl;
36
cout
<<
" CALO key: "
<< ptr1->subsystemKey(
L1TriggerKeyExt::kCALO
) << endl;
37
cout
<<
" BMTF key: "
<< ptr1->subsystemKey(
L1TriggerKeyExt::kBMTF
) << endl;
38
cout
<<
" OMTF key: "
<< ptr1->subsystemKey(
L1TriggerKeyExt::kOMTF
) << endl;
39
cout
<<
" EMTF key: "
<< ptr1->subsystemKey(
L1TriggerKeyExt::kEMTF
) << endl;
40
cout
<<
" TWINMUX key: "
<< ptr1->subsystemKey(
L1TriggerKeyExt::kTWINMUX
) << endl;
41
42
cout
<<
"Records: "
<< endl;
43
44
L1TriggerKeyExt::RecordToKey::const_iterator itr = ptr1->recordToKeyMap().begin();
45
L1TriggerKeyExt::RecordToKey::const_iterator
end
= ptr1->recordToKeyMap().end();
46
47
for
(; itr !=
end
; ++itr) {
48
std::string
recordType = itr->first;
49
std::string
objectKey = itr->second;
50
std::string
recordName
(recordType, 0, recordType.find_first_of(
'@'
));
51
cout
<<
" record "
<<
recordName
<<
" key: "
<< itr->second << endl;
52
}
53
54
cout
<<
dec
<< endl;
55
}
56
57
#include "
FWCore/PluginManager/interface/ModuleDef.h
"
58
#include "
FWCore/Framework/interface/MakerMacros.h
"
59
#include "
FWCore/Framework/interface/ModuleFactory.h
"
60
61
DEFINE_FWK_MODULE
(
L1TriggerKeyExtViewer
);
L1TriggerKeyExtRcd.h
edm::EDAnalyzer::EDAnalyzer
EDAnalyzer()
Definition:
EDAnalyzer.cc:28
L1TriggerKeyExt::kCALO
Definition:
L1TriggerKeyExt.h:27
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition:
MakerMacros.h:16
Event.h
L1TriggerKeyExt.h
MakerMacros.h
EventSetup.h
L1TriggerKeyExt::kuGMT
Definition:
L1TriggerKeyExt.h:27
muonDTDigis_cfi.pset
pset
Definition:
muonDTDigis_cfi.py:27
std
Definition:
JetResolutionObject.h:76
L1TriggerKeyExt::kTWINMUX
Definition:
L1TriggerKeyExt.h:27
L1TriggerKeyExt::kBMTF
Definition:
L1TriggerKeyExt.h:27
L1TriggerKeyExtViewer::label
std::string label
Definition:
L1TriggerKeyExtViewer.cc:13
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
ParameterSet.h
label
char const * label
Definition:
PFTauDecayModeTools.cc:11
iEvent
int iEvent
Definition:
GenABIO.cc:224
edm::ESHandle::product
T const * product() const
Definition:
ESHandle.h:86
L1TriggerKeyExtRcd
Definition:
L1TriggerKeyExtRcd.h:8
edm::ESHandle
Definition:
DTSurvey.h:22
L1TriggerKeyExt::kOMTF
Definition:
L1TriggerKeyExt.h:27
ESHandle.h
edm::EventSetup::get
T get() const
Definition:
EventSetup.h:82
align_cfg.recordName
recordName
Definition:
align_cfg.py:66
edm::EventSetup
Definition:
EventSetup.h:59
L1TriggerKeyExt
Definition:
L1TriggerKeyExt.h:23
edm::EDAnalyzer
Definition:
EDAnalyzer.h:35
EDAnalyzer.h
L1TriggerKeyExtViewer::analyze
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition:
L1TriggerKeyExtViewer.cc:27
L1TriggerKeyExtViewer::L1TriggerKeyExtViewer
L1TriggerKeyExtViewer(const edm::ParameterSet &pset)
Definition:
L1TriggerKeyExtViewer.cc:18
L1TriggerKeyExt::kEMTF
Definition:
L1TriggerKeyExt.h:27
mps_fire.end
end
Definition:
mps_fire.py:242
L1TriggerKeyExt::kuGT
Definition:
L1TriggerKeyExt.h:27
TauDecayModes.dec
dec
Definition:
TauDecayModes.py:142
edm
HLT enums.
Definition:
AlignableModifier.h:19
edm::ParameterSet
Definition:
ParameterSet.h:47
ModuleFactory.h
L1TriggerKeyExtViewer::~L1TriggerKeyExtViewer
~L1TriggerKeyExtViewer(void) override
Definition:
L1TriggerKeyExtViewer.cc:21
gather_cfg.cout
cout
Definition:
gather_cfg.py:144
edm::Event
Definition:
Event.h:73
ModuleDef.h
L1TriggerKeyExtViewer
Definition:
L1TriggerKeyExtViewer.cc:11
Generated for CMSSW Reference Manual by
1.8.14