Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-12-10 02:51:16

0001 #include "CondFormats/DataRecord/interface/SiStripFedCablingRcd.h"
0002 #include "CondFormats/SiStripObjects/interface/SiStripFedCabling.h"
0003 #include "DataFormats/SiStripCommon/interface/SiStripConstants.h"
0004 #include "FWCore/Framework/interface/Event.h"
0005 #include "FWCore/Framework/interface/EventSetup.h"
0006 #include "FWCore/Framework/interface/one/EDAnalyzer.h"
0007 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0008 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0009 #include <iostream>
0010 #include <sstream>
0011 
0012 /**
0013    @class test_FedCablingBuilder 
0014    @brief Simple class that analyzes Digis produced by RawToDigi unpacker
0015 */
0016 class test_FedCablingBuilder : public edm::one::EDAnalyzer<> {
0017 public:
0018   test_FedCablingBuilder(const edm::ParameterSet&) : cablingToken_(esConsumes()) {}
0019   ~test_FedCablingBuilder() override = default;
0020   void analyze(const edm::Event&, const edm::EventSetup&) override;
0021 
0022 private:
0023   const edm::ESGetToken<SiStripFedCabling, SiStripFedCablingRcd> cablingToken_;
0024 };
0025 
0026 using namespace std;
0027 using namespace sistrip;
0028 
0029 // -----------------------------------------------------------------------------
0030 void test_FedCablingBuilder::analyze(const edm::Event& event, const edm::EventSetup& setup) {
0031   LogTrace(mlCabling_) << "[test_FedCablingBuilder::" << __func__ << "]"
0032                        << " Dumping all FED connections...";
0033   const SiStripFedCabling* fed_cabling = &setup.getData(cablingToken_);
0034   // fec cabling
0035   std::stringstream ss;
0036   ss << "[test_AnalyzeCabling::" << __func__ << "]"
0037      << " Dumping all SiStripModule objects in FED cabling..." << std::endl
0038      << fed_cabling;
0039   LogTrace(mlCabling_) << ss.str();
0040 }
0041 
0042 #include "FWCore/Framework/interface/MakerMacros.h"
0043 DEFINE_FWK_MODULE(test_FedCablingBuilder);