Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:22:49

0001 #include "FWCore/Framework/interface/Frameworkfwd.h"
0002 #include "FWCore/Framework/interface/one/EDAnalyzer.h"
0003 #include "FWCore/Framework/interface/Event.h"
0004 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0005 #include "FWCore/Framework/interface/EventSetup.h"
0006 #include "OnlineDB/CSCCondDB/interface/CSCCableRead.h"
0007 
0008 class CSCChamberTimeCorrectionsReadTest : public edm::one::EDAnalyzer<> {
0009 public:
0010   explicit CSCChamberTimeCorrectionsReadTest(const edm::ParameterSet &);
0011   ~CSCChamberTimeCorrectionsReadTest() override = default;
0012 
0013 private:
0014   void beginJob() override;
0015   void analyze(const edm::Event &, const edm::EventSetup &) override;
0016   void endJob() override;
0017 };
0018 
0019 #include "FWCore/Framework/interface/MakerMacros.h"
0020 DEFINE_FWK_MODULE(CSCChamberTimeCorrectionsReadTest);
0021 
0022 CSCChamberTimeCorrectionsReadTest::CSCChamberTimeCorrectionsReadTest(const edm::ParameterSet &) {}
0023 
0024 void CSCChamberTimeCorrectionsReadTest::analyze(const edm::Event &, const edm::EventSetup &) {
0025   csccableread *cable = new csccableread();
0026   std::cout << " Connected cscr for cables ... " << std::endl;
0027 
0028   // Get information by chamber index.
0029   int chamberindex = 2;
0030   std::cout << std::endl;
0031   std::cout << std::endl;
0032   std::cout << "Method cable_read, input: chamber index  " << chamberindex << std::endl;
0033   std::cout << std::endl;
0034   std::string chamber_label, cfeb_rev, alct_rev;
0035   float cfeb_length, alct_length, cfeb_tmb_skew_delay, cfeb_timing_corr;
0036 
0037   for (int i = 1; i <= 540; i++) {
0038     cable->cable_read(
0039         i, &chamber_label, &cfeb_length, &cfeb_rev, &alct_length, &alct_rev, &cfeb_tmb_skew_delay, &cfeb_timing_corr);
0040 
0041     std::cout << "chamber_label  "
0042               << "  " << chamber_label << " ";  //<<std::endl;
0043     std::cout << "cfeb_length  "
0044               << "  " << cfeb_length << " ";  //<<std::endl;
0045     std::cout << "cfeb_rev  "
0046               << "  " << cfeb_rev << " ";  //<<std::endl;
0047     std::cout << "alct_length  "
0048               << "  " << alct_length << " ";  //<<std::endl;
0049     std::cout << "alct_rev  "
0050               << "  " << alct_rev << " ";  //<<std::endl;
0051     std::cout << "cfeb_tmb_skew_delay  "
0052               << "  " << cfeb_tmb_skew_delay << " ";  //<<std::endl;
0053     std::cout << "cfeb_timing_corr  "
0054               << "  " << cfeb_timing_corr << std::endl;
0055   }
0056 }
0057 void CSCChamberTimeCorrectionsReadTest::beginJob() {
0058   std::cout << "Here is the start" << std::endl;
0059   std::cout << "-----------------" << std::endl;
0060 }
0061 void CSCChamberTimeCorrectionsReadTest::endJob() {
0062   std::cout << "---------------" << std::endl;
0063   std::cout << "Here is the end" << std::endl;
0064 }