CMS 3D CMS Logo

WriteCTPPSPixelDAQMapping.cc
Go to the documentation of this file.
1 /****************************************************************************
2 *
3 * Offline analyzer for writing CTPPS DAQ Mapping sqlite file
4 * H. Malbouisson
5 * based on TOTEM code from Jan Kašpar (jan.kaspar@gmail.com)
6 *
7 ****************************************************************************/
8 
16 
19 
22 
27 
28 #include <cstdint>
29 
30 //----------------------------------------------------------------------------------------------------
31 
36 public:
38  ~WriteCTPPSPixelDAQMapping() override {}
39 
40 private:
41  void analyze(const edm::Event &e, const edm::EventSetup &es) override;
45 };
46 
47 using namespace std;
48 using namespace edm;
49 
50 //----------------------------------------------------------------------------------------------------
51 
53  : daqmappingiov_(ps.getParameter<unsigned long long>("daqmappingiov")),
54  record_(ps.getParameter<string>("record")),
55  label_(ps.getParameter<string>("label")) {}
56 
58  // get DAQ mapping
61 
62  // print mapping
63  /*printf("* DAQ mapping\n");
64  for (const auto &p : mapping->ROCMapping)
65  cout << " " << p.first << " -> " << p.second << endl;
66  */
67 
68  // Write DAQ Mapping to sqlite file:
69  const CTPPSPixelDAQMapping *pCTPPSPixelDAQMapping = mapping.product(); // DAQ Mapping
71  if (poolDbService.isAvailable()) {
72  poolDbService->writeOne(pCTPPSPixelDAQMapping, daqmappingiov_, /*m_record*/ record_);
73  }
74 }
75 
76 //----------------------------------------------------------------------------------------------------
77 
CTPPSPixelAnalysisMaskRcd.h
EDAnalyzer.h
CTPPSPixelDAQMappingRcd.h
WriteCTPPSPixelDAQMapping::label_
std::string label_
Definition: WriteCTPPSPixelDAQMapping.cc:48
EDProducer.h
ESHandle.h
edm
HLT enums.
Definition: AlignableModifier.h:19
edm::one::EDAnalyzer
Definition: EDAnalyzer.h:30
edm::Service::isAvailable
bool isAvailable() const
Definition: Service.h:40
MakerMacros.h
PoolDBOutputService.h
edm::EventSetup::get
T get() const
Definition: EventSetup.h:87
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
Service.h
edm::ESHandle
Definition: DTSurvey.h:22
CTPPSPixelDAQMappingRcd
Definition: CTPPSPixelDAQMappingRcd.h:23
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
WriteCTPPSPixelDAQMapping::WriteCTPPSPixelDAQMapping
WriteCTPPSPixelDAQMapping(const edm::ParameterSet &ps)
Definition: WriteCTPPSPixelDAQMapping.cc:51
CTPPSPixelAnalysisMask.h
WriteCTPPSPixelDAQMapping::~WriteCTPPSPixelDAQMapping
~WriteCTPPSPixelDAQMapping() override
Definition: WriteCTPPSPixelDAQMapping.cc:42
Time.h
edm::ParameterSet
Definition: ParameterSet.h:47
Event.h
cond::Time_t
unsigned long long Time_t
Definition: Time.h:14
edm::Service< cond::service::PoolDBOutputService >
WriteCTPPSPixelDAQMapping::record_
std::string record_
Definition: WriteCTPPSPixelDAQMapping.cc:47
edm::EventSetup
Definition: EventSetup.h:58
get
#define get
WriteCTPPSPixelDAQMapping::daqmappingiov_
cond::Time_t daqmappingiov_
Definition: WriteCTPPSPixelDAQMapping.cc:46
std
Definition: JetResolutionObject.h:76
CTPPSPixelDAQMapping.h
WriteCTPPSPixelDAQMapping
Prints the DAQ mapping loaded by TotemDAQMappingESSourceXML.
Definition: WriteCTPPSPixelDAQMapping.cc:34
Frameworkfwd.h
cond::service::PoolDBOutputService::writeOne
Hash writeOne(const T *payload, Time_t time, const std::string &recordName)
Definition: PoolDBOutputService.h:63
CTPPSPixelDAQMapping
The mapping between FramePosition and ROCInfo.
Definition: CTPPSPixelDAQMapping.h:40
EventSetup.h
ParameterSet.h
WriteCTPPSPixelDAQMapping::analyze
void analyze(const edm::Event &e, const edm::EventSetup &es) override
Definition: WriteCTPPSPixelDAQMapping.cc:56
edm::Event
Definition: Event.h:73
taus_updatedMVAIds_cff.mapping
mapping
Definition: taus_updatedMVAIds_cff.py:29
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37