File indexing completed on 2024-04-06 11:58:20
0001 #ifndef _CSCGAINSCONDITIONS_H
0002 #define _CSCGAINSCONDITIONS_H
0003
0004 #include "FWCore/Framework/interface/ESHandle.h"
0005 #include "FWCore/Framework/interface/ESProducer.h"
0006 #include "FWCore/Framework/interface/Event.h"
0007 #include "FWCore/Framework/interface/EventSetup.h"
0008 #include "FWCore/Framework/interface/EventSetupRecordIntervalFinder.h"
0009 #include "FWCore/Framework/interface/Frameworkfwd.h"
0010 #include "FWCore/Framework/interface/MakerMacros.h"
0011 #include "FWCore/Framework/interface/SourceFactory.h"
0012 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0013 #include <memory>
0014
0015 #include "CondFormats/CSCObjects/interface/CSCGains.h"
0016 #include "CondFormats/DataRecord/interface/CSCGainsRcd.h"
0017 #include <DataFormats/MuonDetId/interface/CSCDetId.h>
0018
0019 class CSCGainsConditions : public edm::ESProducer, public edm::EventSetupRecordIntervalFinder {
0020 public:
0021 CSCGainsConditions(const edm::ParameterSet &);
0022 ~CSCGainsConditions() override;
0023
0024 static CSCGains *prefillGains();
0025
0026 typedef std::unique_ptr<CSCGains> ReturnType;
0027
0028 ReturnType produceGains(const CSCGainsRcd &);
0029
0030 private:
0031
0032 void setIntervalFor(const edm::eventsetup::EventSetupRecordKey &,
0033 const edm::IOVSyncValue &,
0034 edm::ValidityInterval &) override;
0035 CSCGains *cnGains;
0036 };
0037
0038 #endif