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:
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 
43  : subSystemName(ps.getUntrackedParameter<string>("subSystem")) {}
44 
45 //----------------------------------------------------------------------------------------------------
46 
48  // get 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 
Prints the DAQ mapping loaded by TotemDAQMappingESSourceXML.
EventSetup record for TOTEM readout-related information.
std::map< TotemSymbID, TotemVFATAnalysisMask > analysisMask
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
void analyze(const edm::Event &e, const edm::EventSetup &es) override
PrintTotemDAQMapping(const edm::ParameterSet &ps)
std::string subSystemName
label of the CTPPS sub-system
std::map< TotemFramePosition, TotemVFATInfo > VFATMapping
HLT enums.
T get() const
Definition: EventSetup.h:73