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 
13 class ParameterSet;
14 
15 class HcalPedestalsRcd;
17 class HcalGainsRcd;
18 class HcalGainWidthsRcd;
19 class HcalQIEDataRcd;
20 class HcalQIETypesRcd;
23 class HcalFrontEndMapRcd;
24 class HcalRespCorrsRcd;
25 class HcalTimeCorrsRcd;
26 class HcalLUTCorrsRcd;
27 class HcalPFCorrsRcd;
31 class HcalLutMetadataRcd;
32 class HcalDcsRcd;
33 class HcalDcsMapRcd;
34 class HcalRecoParamsRcd;
37 class HcalMCParamsRcd;
43 class HcalTPParaamersRcd;
44 
47 {
48 public:
50  virtual ~HcalTextCalibrations ();
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)) result.reset(nullptr);
61  return result;
62  }
63  virtual ~CheckGetObject() = default ;
64  protected:
65  virtual std::unique_ptr<T> makeResult(){ return std::make_unique<T>(); }
66  };
67  template<class T>
68  class CheckGetObjectTopo : public CheckGetObject<T> {
69  public:
70  CheckGetObjectTopo(const HcalTopology* topo) : CheckGetObject<T>(topo), topo_(topo) {}
71  virtual ~CheckGetObjectTopo() = default;
72  protected:
73  std::unique_ptr<T> makeResult() override { return std::make_unique<T>(topo_); }
74  private:
76  };
77  template<class T>
79  public:
81  std::unique_ptr<T> operator()(std::istream& inStream){
82  return HcalDbASCIIIO::createObject<T>(inStream);
83  }
84  };
85 
86 protected:
88  const edm::IOVSyncValue& ,
90 
91  std::unique_ptr<HcalPedestals> producePedestals (const HcalPedestalsRcd& rcd);
92  std::unique_ptr<HcalPedestalWidths> producePedestalWidths (const HcalPedestalWidthsRcd& rcd);
93  std::unique_ptr<HcalGains> produceGains (const HcalGainsRcd& rcd);
94  std::unique_ptr<HcalGainWidths> produceGainWidths (const HcalGainWidthsRcd& rcd);
95  std::unique_ptr<HcalQIEData> produceQIEData (const HcalQIEDataRcd& rcd);
96  std::unique_ptr<HcalQIETypes> produceQIETypes (const HcalQIETypesRcd& rcd);
97  std::unique_ptr<HcalChannelQuality> produceChannelQuality (const HcalChannelQualityRcd& rcd);
98  std::unique_ptr<HcalElectronicsMap> produceElectronicsMap (const HcalElectronicsMapRcd& rcd);
99  std::unique_ptr<HcalFrontEndMap> produceFrontEndMap (const HcalFrontEndMapRcd& rcd);
100 
101  std::unique_ptr<HcalRespCorrs> produceRespCorrs (const HcalRespCorrsRcd& rcd);
102  std::unique_ptr<HcalZSThresholds> produceZSThresholds (const HcalZSThresholdsRcd& rcd);
103  std::unique_ptr<HcalL1TriggerObjects> produceL1TriggerObjects (const HcalL1TriggerObjectsRcd& rcd);
104  std::unique_ptr<HcalTimeCorrs> produceTimeCorrs (const HcalTimeCorrsRcd& rcd);
105  std::unique_ptr<HcalLUTCorrs> produceLUTCorrs (const HcalLUTCorrsRcd& rcd);
106  std::unique_ptr<HcalPFCorrs> producePFCorrs (const HcalPFCorrsRcd& rcd);
107 
108  std::unique_ptr<HcalRecoParams> produceRecoParams (const HcalRecoParamsRcd& rcd);
109  std::unique_ptr<HcalLongRecoParams> produceLongRecoParams (const HcalLongRecoParamsRcd& rcd);
110  std::unique_ptr<HcalZDCLowGainFractions> produceZDCLowGainFractions (const HcalZDCLowGainFractionsRcd& rcd);
111  std::unique_ptr<HcalMCParams> produceMCParams (const HcalMCParamsRcd& rcd);
112  std::unique_ptr<HcalFlagHFDigiTimeParams> produceFlagHFDigiTimeParams (const HcalFlagHFDigiTimeParamsRcd& rcd);
113 
114  std::unique_ptr<HcalValidationCorrs> produceValidationCorrs (const HcalValidationCorrsRcd& rcd);
115  std::unique_ptr<HcalLutMetadata> produceLutMetadata (const HcalLutMetadataRcd& rcd);
116  std::unique_ptr<HcalDcsValues> produceDcsValues (HcalDcsRcd const & rcd);
117  std::unique_ptr<HcalDcsMap> produceDcsMap (const HcalDcsMapRcd& rcd);
118 
119  std::unique_ptr<HcalTimingParams> produceTimingParams (const HcalTimingParamsRcd& rcd);
120  std::unique_ptr<HcalSiPMParameters> produceSiPMParameters (const HcalSiPMParametersRcd& rcd);
121  std::unique_ptr<HcalSiPMCharacteristics> produceSiPMCharacteristics (const HcalSiPMCharacteristicsRcd& rcd);
122  std::unique_ptr<HcalTPChannelParameters> produceTPChannelParameters (const HcalTPChannelParametersRcd& rcd);
123  std::unique_ptr<HcalTPParameters> produceTPParameters (const HcalTPParametersRcd& rcd);
124 
125 private:
126  std::map <std::string, std::string> mInputs;
127 };
128 
129 
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::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)
virtual void setIntervalFor(const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &)
std::unique_ptr< HcalSiPMCharacteristics > produceSiPMCharacteristics(const HcalSiPMCharacteristicsRcd &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)
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::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)