CalibPPS
ESProducers
plugins
PrintTotemDAQMapping.cc
Go to the documentation of this file.
1
/****************************************************************************
2
*
3
* This is a part of TOTEM offline software.
4
* Authors:
5
* Jan Kašpar (jan.kaspar@gmail.com)
6
*
7
****************************************************************************/
8
9
#include "
FWCore/Framework/interface/one/EDAnalyzer.h
"
10
#include "
FWCore/Framework/interface/Event.h
"
11
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
12
#include "
FWCore/Framework/interface/EventSetup.h
"
13
#include "
FWCore/Framework/interface/MakerMacros.h
"
14
#include "
FWCore/Framework/interface/ESHandle.h
"
15
16
#include "
CondFormats/DataRecord/interface/TotemReadoutRcd.h
"
17
#include "
CondFormats/PPSObjects/interface/TotemDAQMapping.h
"
18
#include "
CondFormats/PPSObjects/interface/TotemAnalysisMask.h
"
19
20
//----------------------------------------------------------------------------------------------------
21
25
class
PrintTotemDAQMapping
:
public
edm::one::EDAnalyzer
<> {
26
public
:
27
PrintTotemDAQMapping
(
const
edm::ParameterSet
&ps);
28
~PrintTotemDAQMapping
()
override
{}
29
30
private
:
32
std::string
subSystemName
;
33
34
void
analyze
(
const
edm::Event
&
e
,
const
edm::EventSetup
&es)
override
;
35
};
36
37
using namespace
std
;
38
using namespace
edm
;
39
40
//----------------------------------------------------------------------------------------------------
41
42
PrintTotemDAQMapping::PrintTotemDAQMapping
(
const
edm::ParameterSet
&ps)
43
:
subSystemName
(ps.getUntrackedParameter<
string
>(
"subSystem"
)) {}
44
45
//----------------------------------------------------------------------------------------------------
46
47
void
PrintTotemDAQMapping::analyze
(
const
edm::Event
&,
edm::EventSetup
const
&es) {
48
// get mapping
49
ESHandle<TotemDAQMapping>
mapping
;
50
es.
get
<
TotemReadoutRcd
>().
get
(
subSystemName
,
mapping
);
51
52
// get analysis mask to mask channels
53
ESHandle<TotemAnalysisMask>
analysisMask;
54
es.
get
<
TotemReadoutRcd
>().
get
(
subSystemName
, analysisMask);
55
56
// print mapping
57
printf(
"* DAQ mapping\n"
);
58
for
(
const
auto
&
p
:
mapping
->VFATMapping)
59
cout
<<
" "
<<
p
.first <<
" -> "
<<
p
.second << endl;
60
61
// print mapping
62
printf(
"* mask\n"
);
63
for
(
const
auto
&
p
: analysisMask->
analysisMask
)
64
cout
<<
" "
<<
p
.first <<
": fullMask="
<<
p
.second.fullMask <<
", number of masked channels "
65
<<
p
.second.maskedChannels.size() << endl;
66
}
67
68
//----------------------------------------------------------------------------------------------------
69
70
DEFINE_FWK_MODULE
(
PrintTotemDAQMapping
);
TotemReadoutRcd.h
EDAnalyzer.h
PrintTotemDAQMapping::subSystemName
std::string subSystemName
label of the CTPPS sub-system
Definition:
PrintTotemDAQMapping.cc:37
ESHandle.h
edm
HLT enums.
Definition:
AlignableModifier.h:19
AlCaHLTBitMon_ParallelJobs.p
p
Definition:
AlCaHLTBitMon_ParallelJobs.py:153
TotemDAQMapping.h
gather_cfg.cout
cout
Definition:
gather_cfg.py:144
PrintTotemDAQMapping
Prints the DAQ mapping loaded by TotemDAQMappingESSourceXML.
Definition:
PrintTotemDAQMapping.cc:25
TotemReadoutRcd
EventSetup record for TOTEM readout-related information.
Definition:
TotemReadoutRcd.h:16
edm::one::EDAnalyzer
Definition:
EDAnalyzer.h:30
MakerMacros.h
edm::EventSetup::get
T get() const
Definition:
EventSetup.h:73
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition:
MakerMacros.h:16
TotemAnalysisMask::analysisMask
std::map< TotemSymbID, TotemVFATAnalysisMask > analysisMask
Definition:
TotemAnalysisMask.h:40
edm::ESHandle
Definition:
DTSurvey.h:22
TotemAnalysisMask.h
PrintTotemDAQMapping::~PrintTotemDAQMapping
~PrintTotemDAQMapping() override
Definition:
PrintTotemDAQMapping.cc:33
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ParameterSet
Definition:
ParameterSet.h:36
Event.h
PrintTotemDAQMapping::PrintTotemDAQMapping
PrintTotemDAQMapping(const edm::ParameterSet &ps)
Definition:
PrintTotemDAQMapping.cc:42
PrintTotemDAQMapping::analyze
void analyze(const edm::Event &e, const edm::EventSetup &es) override
Definition:
PrintTotemDAQMapping.cc:47
edm::EventSetup
Definition:
EventSetup.h:57
get
#define get
hlx_dqm_sourceclient_cfi.subSystemName
subSystemName
Definition:
hlx_dqm_sourceclient_cfi.py:15
std
Definition:
JetResolutionObject.h:76
EventSetup.h
ParameterSet.h
edm::Event
Definition:
Event.h:73
taus_updatedMVAIds_cff.mapping
mapping
Definition:
taus_updatedMVAIds_cff.py:28
MillePedeFileConverter_cfg.e
e
Definition:
MillePedeFileConverter_cfg.py:37
Generated for CMSSW Reference Manual by
1.8.16