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:
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 
41 {
42  // get 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 
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
virtual void analyze(const edm::Event &e, const edm::EventSetup &es) override
PrintTotemDAQMapping(const edm::ParameterSet &ps)
const T & get() const
Definition: EventSetup.h:56
std::map< TotemFramePosition, TotemVFATInfo > VFATMapping
HLT enums.