36 mutable std::atomic<unsigned int>
value;
40 UnsafeCache() :
value(0) {}
49 edm::LuminosityBlockCache<Cache>> {
72 unsigned int lumiNumber,
74 const char* functionName)
const;
85 tokenBeginRun_{esConsumes<edm::Transition::BeginRun>(
edm::ESInputTag(
"",
""))},
86 tokenBeginLumi_{esConsumes<edm::Transition::BeginLuminosityBlock>(
edm::ESInputTag(
"",
""))},
87 tokenEndLumi_{esConsumes<edm::Transition::EndLuminosityBlock>(
edm::ESInputTag(
"",
""))},
88 tokenEndRun_{esConsumes<edm::Transition::EndRun>(
edm::ESInputTag(
"",
""))} {}
91 return std::make_unique<UnsafeCache>();
96 unsigned int lumiNumber,
98 const char* functionName)
const {
105 << functionName <<
": values read from EventSetup do not agree with auxiliary";
108 if (iov.first().eventID().run() !=
run || iov.last().eventID().run() !=
run ||
109 iov.first().luminosityBlockNumber() != lumiNumber || iov.last().luminosityBlockNumber() != lumiNumber) {
110 throw cms::Exception(
"TestFailure") << functionName <<
": values from EventSetup IOV do not agree with auxiliary";
116 unsigned int lumiNumber = 0;
124 auto run =
iLumi.luminosityBlockAuxiliary().run();
125 unsigned int lumiNumber =
iLumi.luminosityBlockAuxiliary().luminosityBlock();
133 auto run =
iLumi.luminosityBlockAuxiliary().run();
134 unsigned int lumiNumber =
iLumi.luminosityBlockAuxiliary().luminosityBlock();
141 unsigned int lumiNumber = 4294967295;
149 unsigned int lumiNumber = 0;
152 return std::make_shared<Cache>();
157 unsigned int lumiNumber = 4294967295;
164 auto run =
iLumi.luminosityBlockAuxiliary().run();
165 unsigned int lumiNumber =
iLumi.luminosityBlockAuxiliary().luminosityBlock();
168 return std::make_shared<Cache>();
173 auto run =
iLumi.luminosityBlockAuxiliary().run();
174 unsigned int lumiNumber =
iLumi.luminosityBlockAuxiliary().luminosityBlock();
180 auto run =
event.eventAuxiliary().run();
181 auto lumiNumber =
event.eventAuxiliary().luminosityBlock();
std::unique_ptr< UnsafeCache > beginStream(edm::StreamID) const override
void globalEndLuminosityBlock(edm::LuminosityBlock const &iLB, edm::EventSetup const &) const override
void globalEndRun(edm::Run const &iRun, edm::EventSetup const &) const override
edm::ESGetToken< IOVTestInfo, ESTestRecordC > const esToken_
RunAuxiliary const & runAuxiliary() const final
edm::ESGetToken< IOVTestInfo, ESTestRecordC > const tokenEndLumi_
void streamEndRun(edm::StreamID, edm::Run const &, edm::EventSetup const &) const override
edm::ESGetToken< IOVTestInfo, ESTestRecordC > const tokenBeginRun_
void addDefault(ParameterSetDescription const &psetDescription)
edm::ESGetToken< IOVTestInfo, ESTestRecordC > const tokenBeginLumi_
void analyze(edm::StreamID, edm::Event const &, edm::EventSetup const &) const override
unsigned int iovStartLumi_
#define DEFINE_FWK_MODULE(type)
std::shared_ptr< Cache > globalBeginLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &) const override
void streamBeginRun(edm::StreamID, edm::Run const &, edm::EventSetup const &) const override
static void fillDescriptions(edm::ConfigurationDescriptions &)
void streamEndLuminosityBlock(edm::StreamID, edm::LuminosityBlock const &, edm::EventSetup const &) const override
void streamBeginLuminosityBlock(edm::StreamID, edm::LuminosityBlock const &, edm::EventSetup const &) const override
std::shared_ptr< Cache > globalBeginRun(edm::Run const &, edm::EventSetup const &) const override
unsigned int iovStartRun_
void checkIOVInfo(edm::EventSetup const &eventSetup, unsigned int run, unsigned int lumiNumber, edm::ESHandle< IOVTestInfo > const &iovTestInfo, const char *functionName) const
RunLumiESAnalyzer(edm::ParameterSet const &)
edm::ESGetToken< IOVTestInfo, ESTestRecordC > const tokenEndRun_
ValidityInterval validityInterval() const