CMS 3D CMS Logo

CTPPSPixelDAQMappingAnalyzer.cc
Go to the documentation of this file.
1 // system include files
2 #include <memory>
3 
10 
15 
16 using namespace std;
17 
19 public:
20  string label_;
23 
25  : label_(iConfig.getUntrackedParameter<string>("label", "RPix")),
26  daqmappingiov_(iConfig.getParameter<unsigned long long>("daqmappingiov")),
27  analysismaskiov_(iConfig.getParameter<unsigned long long>("analysismaskiov")) {}
30  void analyze(const edm::Event& e, const edm::EventSetup& c) override;
31 };
32 
34  using namespace edm;
35 
36  /*edm::eventsetup::EventSetupRecordKey recordKey(edm::eventsetup::EventSetupRecordKey::TypeTag::findType("CTPPSPixelDAQMappingRcd"));
37  if( recordKey.type() == edm::eventsetup::EventSetupRecordKey::TypeTag()) {
38  //record not found
39  std::cout <<"Record \"CTPPSPixelDAQMappingRcd"<<"\" does not exist "<<std::endl;
40  }*/
41 
42  //this part gets the handle of the event source and the record (i.e. the Database)
43  if (e.id().run() == daqmappingiov_) {
45  context.get<CTPPSPixelDAQMappingRcd>().get("RPix", mapping);
46 
47  // print mapping
48  /*printf("* DAQ mapping\n");
49  for (const auto &p : mapping->ROCMapping)
50  std::cout << " " << p.first << " -> " << p.second << std::endl;*/
51  }
52 
53  //edm::eventsetup::EventSetupRecordKey recordKey(edm::eventsetup::EventSetupRecordKey::TypeTag::findType("CTPPSPixelAnalysisMaskRcd"));
54  //if( recordKey.type() == edm::eventsetup::EventSetupRecordKey::TypeTag()) {
55  //record not found
56  //std::cout <<"Record \"CTPPSPixelAnalysisMaskRcd"<<"\" does not exist "<<std::endl;
57  //}
58 
59  if (e.id().run() == analysismaskiov_) {
60  // get analysis mask to mask channels
62  context.get<CTPPSPixelAnalysisMaskRcd>().get(label_, analysisMask);
63 
64  // print mask
65  /*printf("* mask\n");
66  for (const auto &p : analysisMask->analysisMask)
67  cout << " " << p.first
68  << ": fullMask=" << p.second.fullMask
69  << ", number of masked channels " << p.second.maskedPixels.size() << endl;
70  */
71  }
72 }
CTPPSPixelDAQMappingAnalyzer::CTPPSPixelDAQMappingAnalyzer
CTPPSPixelDAQMappingAnalyzer(edm::ParameterSet const &iConfig)
Definition: CTPPSPixelDAQMappingAnalyzer.cc:24
CTPPSPixelAnalysisMaskRcd.h
EDAnalyzer.h
mps_fire.i
i
Definition: mps_fire.py:355
CTPPSPixelDAQMappingRcd.h
ESHandle.h
edm
HLT enums.
Definition: AlignableModifier.h:19
CTPPSPixelDAQMappingAnalyzer
Definition: CTPPSPixelDAQMappingAnalyzer.cc:18
CTPPSPixelDAQMappingAnalyzer::label_
string label_
Definition: CTPPSPixelDAQMappingAnalyzer.cc:20
edm::one::EDAnalyzer
Definition: EDAnalyzer.h:30
MakerMacros.h
CTPPSPixelDAQMappingAnalyzer::daqmappingiov_
cond::Time_t daqmappingiov_
Definition: CTPPSPixelDAQMappingAnalyzer.cc:21
edm::EventSetup::get
T get() const
Definition: EventSetup.h:73
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
edm::ESHandle
Definition: DTSurvey.h:22
CTPPSPixelDAQMappingAnalyzer::analysismaskiov_
cond::Time_t analysismaskiov_
Definition: CTPPSPixelDAQMappingAnalyzer.cc:22
CTPPSPixelDAQMappingRcd
Definition: CTPPSPixelDAQMappingRcd.h:23
CTPPSPixelDAQMappingAnalyzer::CTPPSPixelDAQMappingAnalyzer
CTPPSPixelDAQMappingAnalyzer(int i)
Definition: CTPPSPixelDAQMappingAnalyzer.cc:28
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
CTPPSPixelAnalysisMaskRcd
Definition: CTPPSPixelAnalysisMaskRcd.h:23
CTPPSPixelAnalysisMask.h
Time.h
CTPPSPixelDAQMappingAnalyzer::~CTPPSPixelDAQMappingAnalyzer
~CTPPSPixelDAQMappingAnalyzer() override
Definition: CTPPSPixelDAQMappingAnalyzer.cc:29
edm::ParameterSet
Definition: ParameterSet.h:36
Event.h
cond::Time_t
unsigned long long Time_t
Definition: Time.h:14
analyze
example_stream void analyze(const edm::Event &, const edm::EventSetup &) override
edm::EventSetup
Definition: EventSetup.h:57
HltBtagPostValidation_cff.c
c
Definition: HltBtagPostValidation_cff.py:31
get
#define get
std
Definition: JetResolutionObject.h:76
CTPPSPixelDAQMapping.h
EventSetup.h
CTPPSPixelDAQMappingAnalyzer::analyze
void analyze(const edm::Event &e, const edm::EventSetup &c) override
Definition: CTPPSPixelDAQMappingAnalyzer.cc:33
edm::Event
Definition: Event.h:73
taus_updatedMVAIds_cff.mapping
mapping
Definition: taus_updatedMVAIds_cff.py:28
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37