CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 };
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)
tuple result
Definition: mps_fire.py:311
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)