CMS 3D CMS Logo

HcalTextCalibrations.h
Go to the documentation of this file.
1 //
2 // Original Author: Fedor Ratnikov Oct 21, 2005
3 //
4 //
5 #include <map>
6 #include <string>
7 
14 class ParameterSet;
15 
16 class HcalPedestalsRcd;
18 class HcalGainsRcd;
19 class HcalGainWidthsRcd;
20 class HcalQIEDataRcd;
21 class HcalQIETypesRcd;
24 class HcalFrontEndMapRcd;
25 class HcalRespCorrsRcd;
26 class HcalTimeCorrsRcd;
27 class HcalLUTCorrsRcd;
28 class HcalPFCorrsRcd;
32 class HcalLutMetadataRcd;
33 class HcalDcsRcd;
34 class HcalDcsMapRcd;
35 class HcalRecoParamsRcd;
38 class HcalMCParamsRcd;
44 class HcalTPParaamersRcd;
45 
47 public:
49  ~HcalTextCalibrations() override;
50 
51  void produce(){};
52 
53  template <class T>
55  public:
56  CheckGetObject(const HcalTopology* topo) {}
57  std::unique_ptr<T> operator()(std::istream& inStream) {
58  auto result = makeResult();
59  if (!HcalDbASCIIIO::getObject(inStream, &*result))
60  result.reset(nullptr);
61  return result;
62  }
63  virtual ~CheckGetObject() = default;
64 
65  protected:
66  virtual std::unique_ptr<T> makeResult() { return std::make_unique<T>(); }
67  };
68  template <class T>
69  class CheckGetObjectTopo : public CheckGetObject<T> {
70  public:
71  CheckGetObjectTopo(const HcalTopology* topo) : CheckGetObject<T>(topo), topo_(topo) {}
72  ~CheckGetObjectTopo() override = default;
73 
74  protected:
75  std::unique_ptr<T> makeResult() override { return std::make_unique<T>(topo_); }
76 
77  private:
79  };
80  template <class T>
82  public:
84  std::unique_ptr<T> operator()(std::istream& inStream) { return HcalDbASCIIIO::createObject<T>(inStream); }
85  };
86 
87 protected:
89  const edm::IOVSyncValue&,
90  edm::ValidityInterval&) override;
91 
92  std::unique_ptr<HcalPedestals> producePedestals(const HcalPedestalsRcd& rcd);
93  std::unique_ptr<HcalPedestalWidths> producePedestalWidths(const HcalPedestalWidthsRcd& rcd);
94  std::unique_ptr<HcalPedestals> produceEffectivePedestals(const HcalPedestalsRcd& rcd);
95  std::unique_ptr<HcalPedestalWidths> produceEffectivePedestalWidths(const HcalPedestalWidthsRcd& rcd);
96  std::unique_ptr<HcalGains> produceGains(const HcalGainsRcd& rcd);
97  std::unique_ptr<HcalGainWidths> produceGainWidths(const HcalGainWidthsRcd& rcd);
98  std::unique_ptr<HcalQIEData> produceQIEData(const HcalQIEDataRcd& rcd);
99  std::unique_ptr<HcalQIETypes> produceQIETypes(const HcalQIETypesRcd& rcd);
100  std::unique_ptr<HcalChannelQuality> produceChannelQuality(const HcalChannelQualityRcd& rcd);
101  std::unique_ptr<HcalElectronicsMap> produceElectronicsMap(const HcalElectronicsMapRcd& rcd);
102  std::unique_ptr<HcalFrontEndMap> produceFrontEndMap(const HcalFrontEndMapRcd& rcd);
103 
104  std::unique_ptr<HcalRespCorrs> produceRespCorrs(const HcalRespCorrsRcd& rcd);
105  std::unique_ptr<HcalZSThresholds> produceZSThresholds(const HcalZSThresholdsRcd& rcd);
106  std::unique_ptr<HcalL1TriggerObjects> produceL1TriggerObjects(const HcalL1TriggerObjectsRcd& rcd);
107  std::unique_ptr<HcalTimeCorrs> produceTimeCorrs(const HcalTimeCorrsRcd& rcd);
108  std::unique_ptr<HcalLUTCorrs> produceLUTCorrs(const HcalLUTCorrsRcd& rcd);
109  std::unique_ptr<HcalPFCorrs> producePFCorrs(const HcalPFCorrsRcd& rcd);
110 
111  std::unique_ptr<HcalRecoParams> produceRecoParams(const HcalRecoParamsRcd& rcd);
112  std::unique_ptr<HcalLongRecoParams> produceLongRecoParams(const HcalLongRecoParamsRcd& rcd);
113  std::unique_ptr<HcalZDCLowGainFractions> produceZDCLowGainFractions(const HcalZDCLowGainFractionsRcd& rcd);
114  std::unique_ptr<HcalMCParams> produceMCParams(const HcalMCParamsRcd& rcd);
115  std::unique_ptr<HcalFlagHFDigiTimeParams> produceFlagHFDigiTimeParams(const HcalFlagHFDigiTimeParamsRcd& rcd);
116 
117  std::unique_ptr<HcalValidationCorrs> produceValidationCorrs(const HcalValidationCorrsRcd& rcd);
118  std::unique_ptr<HcalLutMetadata> produceLutMetadata(const HcalLutMetadataRcd& rcd);
119  std::unique_ptr<HcalDcsValues> produceDcsValues(HcalDcsRcd const& rcd);
120  std::unique_ptr<HcalDcsMap> produceDcsMap(const HcalDcsMapRcd& rcd);
121 
122  std::unique_ptr<HcalTimingParams> produceTimingParams(const HcalTimingParamsRcd& rcd);
123  std::unique_ptr<HcalSiPMParameters> produceSiPMParameters(const HcalSiPMParametersRcd& rcd);
124  std::unique_ptr<HcalSiPMCharacteristics> produceSiPMCharacteristics(const HcalSiPMCharacteristicsRcd& rcd);
125  std::unique_ptr<HcalTPChannelParameters> produceTPChannelParameters(const HcalTPChannelParametersRcd& rcd);
126  std::unique_ptr<HcalTPParameters> produceTPParameters(const HcalTPParametersRcd& rcd);
127 
128 private:
129  std::map<std::string, std::string> mInputs;
130  std::unordered_map<std::string, edm::ESGetToken<HcalTopology, HcalRecNumberingRecord>> mTokens;
131 };
HcalTextCalibrations::CheckCreateObject::CheckCreateObject
CheckCreateObject(const HcalTopology *topo)
Definition: HcalTextCalibrations.h:83
HcalTPChannelParametersRcd
Definition: HcalTPChannelParametersRcd.h:7
HcalTPParametersRcd.h
HcalTextCalibrations::produceEffectivePedestalWidths
std::unique_ptr< HcalPedestalWidths > produceEffectivePedestalWidths(const HcalPedestalWidthsRcd &rcd)
Definition: HcalTextCalibrations.cc:203
HcalTextCalibrations::produceDcsMap
std::unique_ptr< HcalDcsMap > produceDcsMap(const HcalDcsMapRcd &rcd)
Definition: HcalTextCalibrations.cc:286
HcalTextCalibrations::produceElectronicsMap
std::unique_ptr< HcalElectronicsMap > produceElectronicsMap(const HcalElectronicsMapRcd &rcd)
Definition: HcalTextCalibrations.cc:264
HcalTextCalibrations::produceQIEData
std::unique_ptr< HcalQIEData > produceQIEData(const HcalQIEDataRcd &rcd)
Definition: HcalTextCalibrations.cc:219
HcalSiPMCharacteristicsRcd
Definition: HcalSiPMCharacteristicsRcd.h:4
HcalElectronicsMapRcd
Definition: HcalElectronicsMapRcd.h:8
HcalLongRecoParamsRcd
Definition: HcalLongRecoParamsRcd.h:6
HcalLutMetadataRcd
Definition: HcalLutMetadataRcd.h:25
HcalChannelQualityRcd
Definition: HcalChannelQualityRcd.h:8
HcalTextCalibrations::CheckGetObjectTopo::CheckGetObjectTopo
CheckGetObjectTopo(const HcalTopology *topo)
Definition: HcalTextCalibrations.h:71
HcalGainsRcd
Definition: HcalGainsRcd.h:8
HcalTextCalibrations::produceTPParameters
std::unique_ptr< HcalTPParameters > produceTPParameters(const HcalTPParametersRcd &rcd)
Definition: HcalTextCalibrations.cc:337
HcalL1TriggerObjectsRcd
Definition: HcalL1TriggerObjectsRcd.h:25
AllObjects.h
HcalTopology
Definition: HcalTopology.h:26
HcalTextCalibrations::produceRespCorrs
std::unique_ptr< HcalRespCorrs > produceRespCorrs(const HcalRespCorrsRcd &rcd)
Definition: HcalTextCalibrations.cc:239
HcalMCParamsRcd
Definition: HcalMCParamsRcd.h:6
edm::ValidityInterval
Definition: ValidityInterval.h:28
ESProducer.h
HcalTextCalibrations::produceTPChannelParameters
std::unique_ptr< HcalTPChannelParameters > produceTPChannelParameters(const HcalTPChannelParametersRcd &rcd)
Definition: HcalTextCalibrations.cc:331
HcalTextCalibrations::produceLutMetadata
std::unique_ptr< HcalLutMetadata > produceLutMetadata(const HcalLutMetadataRcd &rcd)
Definition: HcalTextCalibrations.cc:277
HcalTextCalibrations::CheckGetObjectTopo::~CheckGetObjectTopo
~CheckGetObjectTopo() override=default
HcalTextCalibrations
Definition: HcalTextCalibrations.h:46
HcalTextCalibrations::producePedestalWidths
std::unique_ptr< HcalPedestalWidths > producePedestalWidths(const HcalPedestalWidthsRcd &rcd)
Definition: HcalTextCalibrations.cc:193
HcalTextCalibrations::produceSiPMParameters
std::unique_ptr< HcalSiPMParameters > produceSiPMParameters(const HcalSiPMParametersRcd &rcd)
Definition: HcalTextCalibrations.cc:321
HcalGainWidthsRcd
Definition: HcalGainWidthsRcd.h:8
edm::EventSetupRecordIntervalFinder
Definition: EventSetupRecordIntervalFinder.h:33
HcalLUTCorrsRcd
Definition: HcalLUTCorrsRcd.h:25
edm::eventsetup::EventSetupRecordKey
Definition: EventSetupRecordKey.h:30
HcalTextCalibrations::produceMCParams
std::unique_ptr< HcalMCParams > produceMCParams(const HcalMCParamsRcd &rcd)
Definition: HcalTextCalibrations.cc:310
HcalTextCalibrations::CheckGetObject::~CheckGetObject
virtual ~CheckGetObject()=default
HcalQIETypesRcd
Definition: HcalQIETypesRcd.h:25
HcalSiPMParametersRcd
Definition: HcalSiPMParametersRcd.h:7
HcalTextCalibrations::produceL1TriggerObjects
std::unique_ptr< HcalL1TriggerObjects > produceL1TriggerObjects(const HcalL1TriggerObjectsRcd &rcd)
Definition: HcalTextCalibrations.cc:259
HcalTextCalibrations::producePFCorrs
std::unique_ptr< HcalPFCorrs > producePFCorrs(const HcalPFCorrsRcd &rcd)
Definition: HcalTextCalibrations.cc:249
HcalTextCalibrations::produceTimingParams
std::unique_ptr< HcalTimingParams > produceTimingParams(const HcalTimingParamsRcd &rcd)
Definition: HcalTextCalibrations.cc:306
HcalTextCalibrations::produceLUTCorrs
std::unique_ptr< HcalLUTCorrs > produceLUTCorrs(const HcalLUTCorrsRcd &rcd)
Definition: HcalTextCalibrations.cc:244
HcalTextCalibrations::CheckGetObjectTopo
Definition: HcalTextCalibrations.h:69
HcalTextCalibrations::CheckGetObjectTopo::makeResult
std::unique_ptr< T > makeResult() override
Definition: HcalTextCalibrations.h:75
HcalTextCalibrations::mInputs
std::map< std::string, std::string > mInputs
Definition: HcalTextCalibrations.h:129
HcalTextCalibrations::CheckGetObject::makeResult
virtual std::unique_ptr< T > makeResult()
Definition: HcalTextCalibrations.h:66
HcalTextCalibrations::produceTimeCorrs
std::unique_ptr< HcalTimeCorrs > produceTimeCorrs(const HcalTimeCorrsRcd &rcd)
Definition: HcalTextCalibrations.cc:254
HcalTextCalibrations::CheckGetObjectTopo::topo_
const HcalTopology * topo_
Definition: HcalTextCalibrations.h:78
HcalTextCalibrations::produceQIETypes
std::unique_ptr< HcalQIETypes > produceQIETypes(const HcalQIETypesRcd &rcd)
Definition: HcalTextCalibrations.cc:224
HcalPedestalWidthsRcd
Definition: HcalPedestalWidthsRcd.h:8
edm::IOVSyncValue
Definition: IOVSyncValue.h:31
EventSetupRecordIntervalFinder.h
HcalTextCalibrations::produceGains
std::unique_ptr< HcalGains > produceGains(const HcalGainsRcd &rcd)
Definition: HcalTextCalibrations.cc:209
HcalValidationCorrsRcd
Definition: HcalValidationCorrsRcd.h:25
HcalTextCalibrations::produceDcsValues
std::unique_ptr< HcalDcsValues > produceDcsValues(HcalDcsRcd const &rcd)
Definition: HcalTextCalibrations.cc:282
HcalDcsRcd
Definition: HcalDcsRcd.h:5
HcalTPParametersRcd
Definition: HcalTPParametersRcd.h:4
HcalTextCalibrations::produceSiPMCharacteristics
std::unique_ptr< HcalSiPMCharacteristics > produceSiPMCharacteristics(const HcalSiPMCharacteristicsRcd &rcd)
Definition: HcalTextCalibrations.cc:326
HcalZDCLowGainFractionsRcd
Definition: HcalZDCLowGainFractionsRcd.h:25
edm::ParameterSet
Definition: ParameterSet.h:47
HcalPFCorrsRcd
Definition: HcalPFCorrsRcd.h:25
ParameterSet
Definition: Functions.h:16
HcalTextCalibrations::CheckCreateObject::operator()
std::unique_ptr< T > operator()(std::istream &inStream)
Definition: HcalTextCalibrations.h:84
HcalFrontEndMapRcd
Definition: HcalFrontEndMapRcd.h:7
HcalTextCalibrations::produceEffectivePedestals
std::unique_ptr< HcalPedestals > produceEffectivePedestals(const HcalPedestalsRcd &rcd)
Definition: HcalTextCalibrations.cc:198
HcalZSThresholdsRcd
Definition: HcalZSThresholdsRcd.h:25
HcalRespCorrsRcd
Definition: HcalRespCorrsRcd.h:27
HcalTimingParamsRcd
Definition: HcalTimingParamsRcd.h:6
HcalTextCalibrations::produceValidationCorrs
std::unique_ptr< HcalValidationCorrs > produceValidationCorrs(const HcalValidationCorrsRcd &rcd)
Definition: HcalTextCalibrations.cc:272
HcalTextCalibrations::CheckGetObject
Definition: HcalTextCalibrations.h:54
HcalTextCalibrations::produceChannelQuality
std::unique_ptr< HcalChannelQuality > produceChannelQuality(const HcalChannelQualityRcd &rcd)
Definition: HcalTextCalibrations.cc:229
HcalDbASCIIIO.h
HcalTextCalibrations::produceFrontEndMap
std::unique_ptr< HcalFrontEndMap > produceFrontEndMap(const HcalFrontEndMapRcd &rcd)
Definition: HcalTextCalibrations.cc:268
HcalTextCalibrations::produceRecoParams
std::unique_ptr< HcalRecoParams > produceRecoParams(const HcalRecoParamsRcd &rcd)
Definition: HcalTextCalibrations.cc:290
HcalQIEDataRcd
Definition: HcalQIEDataRcd.h:8
T
long double T
Definition: Basic3DVectorLD.h:48
HcalTextCalibrations::produceFlagHFDigiTimeParams
std::unique_ptr< HcalFlagHFDigiTimeParams > produceFlagHFDigiTimeParams(const HcalFlagHFDigiTimeParamsRcd &rcd)
Definition: HcalTextCalibrations.cc:315
HcalTextCalibrations::CheckGetObject::CheckGetObject
CheckGetObject(const HcalTopology *topo)
Definition: HcalTextCalibrations.h:56
HcalTextCalibrations::produceZSThresholds
std::unique_ptr< HcalZSThresholds > produceZSThresholds(const HcalZSThresholdsRcd &rcd)
Definition: HcalTextCalibrations.cc:234
HcalDbASCIIIO::getObject
bool getObject(std::istream &fInput, HcalPedestals *fObject)
HcalTextCalibrations::producePedestals
std::unique_ptr< HcalPedestals > producePedestals(const HcalPedestalsRcd &rcd)
Definition: HcalTextCalibrations.cc:188
HcalPedestalsRcd
Definition: HcalPedestalsRcd.h:9
HcalRecoParamsRcd
Definition: HcalRecoParamsRcd.h:6
HcalFlagHFDigiTimeParamsRcd
Definition: HcalFlagHFDigiTimeParamsRcd.h:6
HcalTextCalibrations::produceLongRecoParams
std::unique_ptr< HcalLongRecoParams > produceLongRecoParams(const HcalLongRecoParamsRcd &rcd)
Definition: HcalTextCalibrations.cc:295
edm::ESProducer
Definition: ESProducer.h:104
HcalTextCalibrations::CheckGetObject::operator()
std::unique_ptr< T > operator()(std::istream &inStream)
Definition: HcalTextCalibrations.h:57
mps_fire.result
result
Definition: mps_fire.py:311
ParameterSet.h
HcalTextCalibrations::produce
void produce()
Definition: HcalTextCalibrations.h:51
HcalTextCalibrations::produceGainWidths
std::unique_ptr< HcalGainWidths > produceGainWidths(const HcalGainWidthsRcd &rcd)
Definition: HcalTextCalibrations.cc:214
HcalTimeCorrsRcd
Definition: HcalTimeCorrsRcd.h:25
HcalTextCalibrations::CheckCreateObject
Definition: HcalTextCalibrations.h:81
HcalTextCalibrations::produceZDCLowGainFractions
std::unique_ptr< HcalZDCLowGainFractions > produceZDCLowGainFractions(const HcalZDCLowGainFractionsRcd &rcd)
Definition: HcalTextCalibrations.cc:300
HcalTextCalibrations::~HcalTextCalibrations
~HcalTextCalibrations() override
Definition: HcalTextCalibrations.cc:148
HcalDcsMapRcd
Definition: HcalDcsMapRcd.h:5
HcalTextCalibrations::HcalTextCalibrations
HcalTextCalibrations(const edm::ParameterSet &)
Definition: HcalTextCalibrations.cc:27
HcalTextCalibrations::setIntervalFor
void setIntervalFor(const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &) override
Definition: HcalTextCalibrations.cc:153
HcalTextCalibrations::mTokens
std::unordered_map< std::string, edm::ESGetToken< HcalTopology, HcalRecNumberingRecord > > mTokens
Definition: HcalTextCalibrations.h:130