CMS 3D CMS Logo

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 
15 
19 
20 //----------------------------------------------------------------------------------------------------
21 
26 public:
28  ~PrintTotemDAQMapping() override {}
29 
30 private:
35  void analyze(const edm::Event &e, const edm::EventSetup &es) override;
36 };
37 
39  : subSystemName(ps.getUntrackedParameter<std::string>("subSystem")),
40  mappingToken_(esConsumes(edm::ESInputTag("", subSystemName))),
41  maskToken_(esConsumes(edm::ESInputTag("", subSystemName))) {}
42 
43 //----------------------------------------------------------------------------------------------------
44 
46  // get mapping
47  auto const &mapping = es.getData(mappingToken_);
48 
49  // get analysis mask to mask channels
50  auto const &analysisMask = es.getData(maskToken_);
51 
52  // print mapping
53  for (const auto &p : mapping.VFATMapping)
54  edm::LogInfo("PrintTotemDAQMapping mapping") << " " << p.first << " -> " << p.second;
55 
56  // print mapping
57  for (const auto &p : analysisMask.analysisMask)
58  edm::LogInfo("PrintTotemDAQMapping mask") << " " << p.first << ": fullMask=" << p.second.fullMask
59  << ", number of masked channels " << p.second.maskedChannels.size();
60 }
61 
62 //----------------------------------------------------------------------------------------------------
63 
Prints the DAQ mapping loaded by TotemDAQMappingESSourceXML.
ESGetTokenH3DDVariant esConsumes(std::string const &Record, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
void analyze(const edm::Event &e, const edm::EventSetup &es) override
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
bool getData(T &iHolder) const
Definition: EventSetup.h:122
Log< level::Info, false > LogInfo
PrintTotemDAQMapping(const edm::ParameterSet &ps)
edm::ESGetToken< TotemAnalysisMask, TotemReadoutRcd > maskToken_
std::string subSystemName
label of the CTPPS sub-system
HLT enums.
edm::ESGetToken< TotemDAQMapping, TotemReadoutRcd > mappingToken_