File indexing completed on 2024-04-06 11:58:03
0001 #ifndef CalibCalorimetry_EcalTrivialCondModules_ESTrivialConditionRetriever_H
0002 #define CalibCalorimetry_EcalTrivialCondModules_ESTrivialConditionRetriever_H
0003
0004 #include <string>
0005 #include <vector>
0006
0007
0008 #include "FWCore/Framework/interface/ESProducer.h"
0009 #include "FWCore/Framework/interface/EventSetupRecordIntervalFinder.h"
0010
0011 #include "CondFormats/ESObjects/interface/ESPedestals.h"
0012 #include "CondFormats/DataRecord/interface/ESPedestalsRcd.h"
0013
0014 #include "CondFormats/ESObjects/interface/ESStripGroupId.h"
0015 #include "CondFormats/ESObjects/interface/ESWeightStripGroups.h"
0016 #include "CondFormats/DataRecord/interface/ESWeightStripGroupsRcd.h"
0017
0018 #include "CondFormats/ESObjects/interface/ESWeight.h"
0019 #include "CondFormats/ESObjects/interface/ESWeightSet.h"
0020 #include "CondFormats/ESObjects/interface/ESTBWeights.h"
0021 #include "CondFormats/DataRecord/interface/ESTBWeightsRcd.h"
0022
0023 #include "CondFormats/ESObjects/interface/ESIntercalibConstants.h"
0024 #include "CondFormats/DataRecord/interface/ESIntercalibConstantsRcd.h"
0025
0026 #include "CondFormats/ESObjects/interface/ESADCToGeVConstant.h"
0027 #include "CondFormats/DataRecord/interface/ESADCToGeVConstantRcd.h"
0028
0029 #include "CondFormats/ESObjects/interface/ESChannelStatus.h"
0030 #include "CondFormats/DataRecord/interface/ESChannelStatusRcd.h"
0031
0032 #include "FWCore/Framework/interface/IOVSyncValue.h"
0033
0034
0035
0036 namespace edm {
0037 class ParameterSet;
0038 }
0039
0040 class ESTrivialConditionRetriever : public edm::ESProducer, public edm::EventSetupRecordIntervalFinder {
0041 public:
0042 ESTrivialConditionRetriever(const edm::ParameterSet& pset);
0043 ESTrivialConditionRetriever(const ESTrivialConditionRetriever&) = delete;
0044 const ESTrivialConditionRetriever& operator=(const ESTrivialConditionRetriever&) = delete;
0045 ~ESTrivialConditionRetriever() override;
0046
0047
0048 virtual std::unique_ptr<ESPedestals> produceESPedestals(const ESPedestalsRcd&);
0049 virtual std::unique_ptr<ESWeightStripGroups> produceESWeightStripGroups(const ESWeightStripGroupsRcd&);
0050 virtual std::unique_ptr<ESIntercalibConstants> produceESIntercalibConstants(const ESIntercalibConstantsRcd&);
0051
0052
0053
0054
0055 virtual std::unique_ptr<ESADCToGeVConstant> produceESADCToGeVConstant(const ESADCToGeVConstantRcd&);
0056 virtual std::unique_ptr<ESTBWeights> produceESTBWeights(const ESTBWeightsRcd&);
0057
0058
0059 virtual std::unique_ptr<ESChannelStatus> produceESChannelStatus(const ESChannelStatusRcd&);
0060 virtual std::unique_ptr<ESChannelStatus> getChannelStatusFromConfiguration(const ESChannelStatusRcd&);
0061
0062 protected:
0063
0064 void setIntervalFor(const edm::eventsetup::EventSetupRecordKey&,
0065 const edm::IOVSyncValue&,
0066 edm::ValidityInterval&) override;
0067
0068 private:
0069 void getWeightsFromConfiguration(const edm::ParameterSet& ps);
0070
0071
0072 double adcToGeVLowConstant_;
0073 double adcToGeVHighConstant_;
0074
0075 double intercalibConstantMean_;
0076 double intercalibConstantSigma_;
0077
0078
0079
0080
0081 double ESpedMean_;
0082 double ESpedRMS_;
0083
0084 ESWeightSet amplWeights_;
0085
0086 std::string amplWeightsFile_;
0087 std::string intercalibConstantsFile_;
0088 std::string channelStatusFile_;
0089
0090 bool getWeightsFromFile_;
0091 bool producedESPedestals_;
0092 bool producedESWeights_;
0093 bool producedESIntercalibConstants_;
0094 bool producedESADCToGeVConstant_;
0095 bool producedESChannelStatus_;
0096
0097 int verbose_;
0098 };
0099 #endif