Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
CondFormats
CTPPSReadoutObjects
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/CTPPSReadoutObjects/interface/TotemDAQMapping.h
"
18
#include "
CondFormats/CTPPSReadoutObjects/interface/TotemAnalysisMask.h
"
19
20
//----------------------------------------------------------------------------------------------------
21
25
class
PrintTotemDAQMapping
:
public
edm::one::EDAnalyzer
<>
26
{
27
public
:
28
PrintTotemDAQMapping
(
const
edm::ParameterSet
&ps) {}
29
~PrintTotemDAQMapping
() {}
30
31
private
:
32
virtual
void
analyze
(
const
edm::Event
&
e
,
const
edm::EventSetup
&es)
override
;
33
};
34
35
using namespace
std;
36
using namespace
edm;
37
38
//----------------------------------------------------------------------------------------------------
39
40
void
PrintTotemDAQMapping::analyze
(
const
edm::Event
&,
edm::EventSetup
const
& es)
41
{
42
// get mapping
43
ESHandle<TotemDAQMapping>
mapping;
44
es.
get
<
TotemReadoutRcd
>().
get
(mapping);
45
46
// get analysis mask to mask channels
47
ESHandle<TotemAnalysisMask>
analysisMask;
48
es.
get
<
TotemReadoutRcd
>().
get
(analysisMask);
49
50
// print mapping
51
printf(
"* DAQ mapping\n"
);
52
for
(
const
auto
&
p
: mapping->VFATMapping)
53
cout
<<
" "
<<
p
.first <<
" -> "
<<
p
.second << endl;
54
55
// print mapping
56
printf(
"* mask\n"
);
57
for
(
const
auto
&
p
: analysisMask->analysisMask)
58
cout
<<
" "
<<
p
.first
59
<<
": fullMask="
<<
p
.second.fullMask
60
<<
", number of masked channels "
<<
p
.second.maskedChannels.size() << endl;
61
}
62
63
//----------------------------------------------------------------------------------------------------
64
65
DEFINE_FWK_MODULE
(
PrintTotemDAQMapping
);
PrintTotemDAQMapping
Prints the DAQ mapping loaded by TotemDAQMappingESSourceXML.
Definition:
PrintTotemDAQMapping.cc:25
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition:
MakerMacros.h:17
Event.h
TotemReadoutRcd
EventSetup record for TOTEM readout-related information.
Definition:
TotemReadoutRcd.h:17
MakerMacros.h
EventSetup.h
ParameterSet.h
PrintTotemDAQMapping::analyze
virtual void analyze(const edm::Event &e, const edm::EventSetup &es) override
Definition:
PrintTotemDAQMapping.cc:40
PrintTotemDAQMapping::~PrintTotemDAQMapping
~PrintTotemDAQMapping()
Definition:
PrintTotemDAQMapping.cc:29
edm::ESHandle
Definition:
DTSurvey.h:22
ESHandle.h
edm::EventSetup
Definition:
EventSetup.h:45
TotemAnalysisMask.h
TotemDAQMapping.h
PrintTotemDAQMapping::PrintTotemDAQMapping
PrintTotemDAQMapping(const edm::ParameterSet &ps)
Definition:
PrintTotemDAQMapping.cc:28
edm::EventSetup::get
const T & get() const
Definition:
EventSetup.h:56
EDAnalyzer.h
alignCSCRings.e
list e
Definition:
alignCSCRings.py:90
AlCaHLTBitMon_ParallelJobs.p
tuple p
Definition:
AlCaHLTBitMon_ParallelJobs.py:152
edm::ParameterSet
Definition:
ParameterSet.h:36
gather_cfg.cout
tuple cout
Definition:
gather_cfg.py:145
edm::Event
Definition:
Event.h:65
edm::one::EDAnalyzer
Definition:
EDAnalyzer.h:30
TotemReadoutRcd.h
Generated for CMSSW Reference Manual by
1.8.5