File indexing completed on 2024-04-06 12:22:24
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018 #include <iostream>
0019
0020 #include "FWCore/Framework/interface/one/EDAnalyzer.h"
0021 #include "FWCore/Framework/interface/Event.h"
0022 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0023
0024 #include "FWCore/Framework/interface/EventSetup.h"
0025 #include "FWCore/Framework/interface/ESHandle.h"
0026
0027 #include "CondFormats/DataRecord/interface/L1RCTChannelMaskRcd.h"
0028 #include "CondFormats/L1TObjects/interface/L1RCTChannelMask.h"
0029 #include "CondFormats/DataRecord/interface/L1RCTNoisyChannelMaskRcd.h"
0030 #include "CondFormats/L1TObjects/interface/L1RCTNoisyChannelMask.h"
0031
0032 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0033 #include "FWCore/MessageLogger/interface/MessageDrop.h"
0034
0035 #include "FWCore/PluginManager/interface/ModuleDef.h"
0036 #include "FWCore/Framework/interface/MakerMacros.h"
0037
0038
0039
0040
0041
0042 class L1RCTChannelMaskTester : public edm::one::EDAnalyzer<> {
0043 public:
0044 explicit L1RCTChannelMaskTester(const edm::ParameterSet&) : maskToken_(esConsumes()), noisyToken_(esConsumes()) {}
0045 void analyze(const edm::Event&, const edm::EventSetup&) override;
0046
0047 private:
0048 edm::ESGetToken<L1RCTChannelMask, L1RCTChannelMaskRcd> maskToken_;
0049 edm::ESGetToken<L1RCTNoisyChannelMask, L1RCTNoisyChannelMaskRcd> noisyToken_;
0050 };
0051
0052 void L1RCTChannelMaskTester::analyze(const edm::Event& iEvent, const edm::EventSetup& evSetup) {
0053
0054 evSetup.getData(maskToken_).print(std::cout);
0055
0056 if (auto maskRecord = evSetup.tryToGet<L1RCTNoisyChannelMaskRcd>()) {
0057 maskRecord->get(noisyToken_).print(std::cout);
0058 } else {
0059 std::cout << "\nRecord \""
0060 << "L1RCTNoisyChannelMaskRcd"
0061 << "\" does not exist.\n"
0062 << std::endl;
0063 }
0064 }
0065
0066 DEFINE_FWK_MODULE(L1RCTChannelMaskTester);