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 HcalPFCutsRcd;
21 class HcalQIEDataRcd;
22 class HcalQIETypesRcd;
25 class HcalFrontEndMapRcd;
26 class HcalRespCorrsRcd;
27 class HcalTimeCorrsRcd;
28 class HcalLUTCorrsRcd;
29 class HcalPFCorrsRcd;
33 class HcalLutMetadataRcd;
34 class HcalDcsRcd;
35 class HcalDcsMapRcd;
36 class HcalRecoParamsRcd;
39 class HcalMCParamsRcd;
45 class HcalTPParaamersRcd;
46 
48 public:
50  ~HcalTextCalibrations() override;
51 
52  void produce(){};
53 
54  template <class T>
56  public:
57  CheckGetObject(const HcalTopology* topo) {}
58  std::unique_ptr<T> operator()(std::istream& inStream) {
59  auto result = makeResult();
60  if (!HcalDbASCIIIO::getObject(inStream, &*result))
61  result.reset(nullptr);
62  return result;
63  }
64  virtual ~CheckGetObject() = default;
65 
66  protected:
67  virtual std::unique_ptr<T> makeResult() { return std::make_unique<T>(); }
68  };
69  template <class T>
70  class CheckGetObjectTopo : public CheckGetObject<T> {
71  public:
72  CheckGetObjectTopo(const HcalTopology* topo) : CheckGetObject<T>(topo), topo_(topo) {}
73  ~CheckGetObjectTopo() override = default;
74 
75  protected:
76  std::unique_ptr<T> makeResult() override { return std::make_unique<T>(topo_); }
77 
78  private:
80  };
81  template <class T>
83  public:
85  std::unique_ptr<T> operator()(std::istream& inStream) { return HcalDbASCIIIO::createObject<T>(inStream); }
86  };
87 
88 protected:
90  const edm::IOVSyncValue&,
91  edm::ValidityInterval&) override;
92 
93  std::unique_ptr<HcalPedestals> producePedestals(const HcalPedestalsRcd& rcd);
94  std::unique_ptr<HcalPedestalWidths> producePedestalWidths(const HcalPedestalWidthsRcd& rcd);
95  std::unique_ptr<HcalPedestals> produceEffectivePedestals(const HcalPedestalsRcd& rcd);
96  std::unique_ptr<HcalPedestalWidths> produceEffectivePedestalWidths(const HcalPedestalWidthsRcd& rcd);
97  std::unique_ptr<HcalGains> produceGains(const HcalGainsRcd& rcd);
98  std::unique_ptr<HcalGainWidths> produceGainWidths(const HcalGainWidthsRcd& rcd);
99  std::unique_ptr<HcalPFCuts> producePFCuts(const HcalPFCutsRcd& rcd);
100  std::unique_ptr<HcalQIEData> produceQIEData(const HcalQIEDataRcd& rcd);
101  std::unique_ptr<HcalQIETypes> produceQIETypes(const HcalQIETypesRcd& rcd);
102  std::unique_ptr<HcalChannelQuality> produceChannelQuality(const HcalChannelQualityRcd& rcd);
103  std::unique_ptr<HcalElectronicsMap> produceElectronicsMap(const HcalElectronicsMapRcd& rcd);
104  std::unique_ptr<HcalFrontEndMap> produceFrontEndMap(const HcalFrontEndMapRcd& rcd);
105 
106  std::unique_ptr<HcalRespCorrs> produceRespCorrs(const HcalRespCorrsRcd& rcd);
107  std::unique_ptr<HcalZSThresholds> produceZSThresholds(const HcalZSThresholdsRcd& rcd);
108  std::unique_ptr<HcalL1TriggerObjects> produceL1TriggerObjects(const HcalL1TriggerObjectsRcd& rcd);
109  std::unique_ptr<HcalTimeCorrs> produceTimeCorrs(const HcalTimeCorrsRcd& rcd);
110  std::unique_ptr<HcalLUTCorrs> produceLUTCorrs(const HcalLUTCorrsRcd& rcd);
111  std::unique_ptr<HcalPFCorrs> producePFCorrs(const HcalPFCorrsRcd& rcd);
112 
113  std::unique_ptr<HcalRecoParams> produceRecoParams(const HcalRecoParamsRcd& rcd);
114  std::unique_ptr<HcalLongRecoParams> produceLongRecoParams(const HcalLongRecoParamsRcd& rcd);
115  std::unique_ptr<HcalZDCLowGainFractions> produceZDCLowGainFractions(const HcalZDCLowGainFractionsRcd& rcd);
116  std::unique_ptr<HcalMCParams> produceMCParams(const HcalMCParamsRcd& rcd);
117  std::unique_ptr<HcalFlagHFDigiTimeParams> produceFlagHFDigiTimeParams(const HcalFlagHFDigiTimeParamsRcd& rcd);
118 
119  std::unique_ptr<HcalValidationCorrs> produceValidationCorrs(const HcalValidationCorrsRcd& rcd);
120  std::unique_ptr<HcalLutMetadata> produceLutMetadata(const HcalLutMetadataRcd& rcd);
121  std::unique_ptr<HcalDcsValues> produceDcsValues(HcalDcsRcd const& rcd);
122  std::unique_ptr<HcalDcsMap> produceDcsMap(const HcalDcsMapRcd& rcd);
123 
124  std::unique_ptr<HcalTimingParams> produceTimingParams(const HcalTimingParamsRcd& rcd);
125  std::unique_ptr<HcalSiPMParameters> produceSiPMParameters(const HcalSiPMParametersRcd& rcd);
126  std::unique_ptr<HcalSiPMCharacteristics> produceSiPMCharacteristics(const HcalSiPMCharacteristicsRcd& rcd);
127  std::unique_ptr<HcalTPChannelParameters> produceTPChannelParameters(const HcalTPChannelParametersRcd& rcd);
128  std::unique_ptr<HcalTPParameters> produceTPParameters(const HcalTPParametersRcd& rcd);
129 
130 private:
131  std::map<std::string, std::string> mInputs;
132  std::unordered_map<std::string, edm::ESGetToken<HcalTopology, HcalRecNumberingRecord>> mTokens;
133 };
std::unique_ptr< HcalPedestals > producePedestals(const HcalPedestalsRcd &rcd)
std::unique_ptr< HcalGainWidths > produceGainWidths(const HcalGainWidthsRcd &rcd)
virtual std::unique_ptr< T > makeResult()
std::unique_ptr< HcalZDCLowGainFractions > produceZDCLowGainFractions(const HcalZDCLowGainFractionsRcd &rcd)
std::unique_ptr< HcalPedestals > produceEffectivePedestals(const HcalPedestalsRcd &rcd)
std::map< std::string, std::string > mInputs
std::unique_ptr< HcalL1TriggerObjects > produceL1TriggerObjects(const HcalL1TriggerObjectsRcd &rcd)
std::unique_ptr< HcalPedestalWidths > producePedestalWidths(const HcalPedestalWidthsRcd &rcd)
std::unique_ptr< HcalLongRecoParams > produceLongRecoParams(const HcalLongRecoParamsRcd &rcd)
std::unique_ptr< T > operator()(std::istream &inStream)
std::unique_ptr< HcalMCParams > produceMCParams(const HcalMCParamsRcd &rcd)
std::unique_ptr< HcalLUTCorrs > produceLUTCorrs(const HcalLUTCorrsRcd &rcd)
std::unique_ptr< HcalPFCorrs > producePFCorrs(const HcalPFCorrsRcd &rcd)
std::unique_ptr< HcalDcsValues > produceDcsValues(HcalDcsRcd const &rcd)
std::unique_ptr< HcalQIEData > produceQIEData(const HcalQIEDataRcd &rcd)
void setIntervalFor(const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &) override
std::unique_ptr< HcalSiPMCharacteristics > produceSiPMCharacteristics(const HcalSiPMCharacteristicsRcd &rcd)
std::unique_ptr< HcalPFCuts > producePFCuts(const HcalPFCutsRcd &rcd)
CheckGetObject(const HcalTopology *topo)
std::unique_ptr< HcalZSThresholds > produceZSThresholds(const HcalZSThresholdsRcd &rcd)
std::unique_ptr< HcalSiPMParameters > produceSiPMParameters(const HcalSiPMParametersRcd &rcd)
std::unique_ptr< HcalDcsMap > produceDcsMap(const HcalDcsMapRcd &rcd)
std::unique_ptr< HcalRecoParams > produceRecoParams(const HcalRecoParamsRcd &rcd)
std::unique_ptr< HcalChannelQuality > produceChannelQuality(const HcalChannelQualityRcd &rcd)
std::unique_ptr< HcalPedestalWidths > produceEffectivePedestalWidths(const HcalPedestalWidthsRcd &rcd)
HcalTextCalibrations(const edm::ParameterSet &)
std::unique_ptr< HcalTPChannelParameters > produceTPChannelParameters(const HcalTPChannelParametersRcd &rcd)
std::unique_ptr< HcalQIETypes > produceQIETypes(const HcalQIETypesRcd &rcd)
std::unique_ptr< HcalTimingParams > produceTimingParams(const HcalTimingParamsRcd &rcd)
std::unique_ptr< HcalTPParameters > produceTPParameters(const HcalTPParametersRcd &rcd)
std::unique_ptr< HcalElectronicsMap > produceElectronicsMap(const HcalElectronicsMapRcd &rcd)
std::unordered_map< std::string, edm::ESGetToken< HcalTopology, HcalRecNumberingRecord > > mTokens
std::unique_ptr< HcalGains > produceGains(const HcalGainsRcd &rcd)
bool getObject(std::istream &fInput, HcalPedestals *fObject)
std::unique_ptr< HcalRespCorrs > produceRespCorrs(const HcalRespCorrsRcd &rcd)
std::unique_ptr< HcalFrontEndMap > produceFrontEndMap(const HcalFrontEndMapRcd &rcd)
std::unique_ptr< T > operator()(std::istream &inStream)
std::unique_ptr< HcalLutMetadata > produceLutMetadata(const HcalLutMetadataRcd &rcd)
std::unique_ptr< HcalTimeCorrs > produceTimeCorrs(const HcalTimeCorrsRcd &rcd)
long double T
std::unique_ptr< HcalFlagHFDigiTimeParams > produceFlagHFDigiTimeParams(const HcalFlagHFDigiTimeParamsRcd &rcd)
std::unique_ptr< T > makeResult() override
std::unique_ptr< HcalValidationCorrs > produceValidationCorrs(const HcalValidationCorrsRcd &rcd)