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 {
27  public:
29  ~PrintTotemDAQMapping() override {}
30 
31  private:
34 
35  void analyze(const edm::Event &e, const edm::EventSetup &es) override;
36 };
37 
38 using namespace std;
39 using namespace edm;
40 
41 //----------------------------------------------------------------------------------------------------
42 
44  subSystemName(ps.getUntrackedParameter<string>("subSystem"))
45 {
46 }
47 
48 //----------------------------------------------------------------------------------------------------
49 
51 {
52  // get mapping
54  es.get<TotemReadoutRcd>().get(subSystemName, mapping);
55 
56  // get analysis mask to mask channels
57  ESHandle<TotemAnalysisMask> analysisMask;
58  es.get<TotemReadoutRcd>().get(subSystemName, analysisMask);
59 
60  // print mapping
61  printf("* DAQ mapping\n");
62  for (const auto &p : mapping->VFATMapping)
63  cout << " " << p.first << " -> " << p.second << endl;
64 
65  // print mapping
66  printf("* mask\n");
67  for (const auto &p : analysisMask->analysisMask)
68  cout << " " << p.first
69  << ": fullMask=" << p.second.fullMask
70  << ", number of masked channels " << p.second.maskedChannels.size() << endl;
71 }
72 
73 //----------------------------------------------------------------------------------------------------
74 
Prints the DAQ mapping loaded by TotemDAQMappingESSourceXML.
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
EventSetup record for TOTEM readout-related information.
std::map< TotemSymbID, TotemVFATAnalysisMask > analysisMask
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:68