File indexing completed on 2024-04-06 12:22:25
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015 #include <memory>
0016 #include "CondFormats/L1TObjects/interface/L1RPCHsbConfig.h"
0017 #include "CondFormats/DataRecord/interface/L1RPCHsbConfigRcd.h"
0018
0019 #include "FWCore/Framework/interface/Frameworkfwd.h"
0020 #include "FWCore/Framework/interface/global/EDAnalyzer.h"
0021
0022 #include "FWCore/Framework/interface/Event.h"
0023 #include "FWCore/Framework/interface/MakerMacros.h"
0024
0025 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0026
0027 #include "FWCore/Framework/interface/EventSetup.h"
0028 #include "FWCore/Framework/interface/ESHandle.h"
0029
0030 #include <fstream>
0031
0032
0033
0034
0035
0036 class DumpL1RPCHsbConfig : public edm::global::EDAnalyzer<> {
0037 public:
0038 explicit DumpL1RPCHsbConfig(const edm::ParameterSet&);
0039
0040 private:
0041 void analyze(edm::StreamID, const edm::Event&, const edm::EventSetup&) const override;
0042
0043
0044 edm::ESGetToken<L1RPCHsbConfig, L1RPCHsbConfigRcd> getToken_;
0045 };
0046
0047
0048
0049
0050
0051
0052
0053
0054
0055
0056
0057
0058 DumpL1RPCHsbConfig::DumpL1RPCHsbConfig(const edm::ParameterSet& iConfig)
0059 : getToken_(esConsumes())
0060
0061 {
0062
0063 }
0064
0065
0066
0067
0068
0069
0070 void DumpL1RPCHsbConfig::analyze(edm::StreamID, const edm::Event& iEvent, const edm::EventSetup& iSetup) const {
0071 using namespace edm;
0072
0073 edm::ESHandle<L1RPCHsbConfig> hsbConfig = iSetup.getHandle(getToken_);
0074
0075 LogTrace("DumpL1RPCHsbConfig") << std::endl;
0076 LogDebug("DumpL1RPCHsbConfig") << "\n\n Printing L1RPCHsbConfigRcd record\n" << std::endl;
0077 LogTrace("DumpL1RPCHsbConfig") << "\nChecking HSB inputs: \n" << std::endl;
0078
0079 LogTrace("DumpL1RPCHsbConfig") << " HSB0: ";
0080 for (int i = 0; i < hsbConfig->getMaskSize(); ++i) {
0081 LogTrace("DumpL1RPCHsbConfig") << " Input " << i << " " << hsbConfig->getHsbMask(0, i) << " ";
0082 }
0083
0084 std::cout << std::endl;
0085
0086 LogTrace("DumpL1RPCHsbConfig") << " HSB1: ";
0087 for (int i = 0; i < hsbConfig->getMaskSize(); ++i) {
0088 LogTrace("DumpL1RPCHsbConfig") << " Input " << i << " " << hsbConfig->getHsbMask(1, i) << " ";
0089 }
0090 }
0091
0092
0093 DEFINE_FWK_MODULE(DumpL1RPCHsbConfig);