31 std::vector<edm::ParameterSet>
data = iConfig.
getParameter<std::vector<edm::ParameterSet> >(
"input");
32 std::vector<edm::ParameterSet>::iterator request = data.begin ();
33 for (; request != data.end (); ++request) {
38 if (objectName ==
"Pedestals") {
40 findingRecord <HcalPedestalsRcd> ();
42 else if (objectName ==
"PedestalWidths") {
44 findingRecord <HcalPedestalWidthsRcd> ();
46 else if (objectName ==
"EffectivePedestals") {
48 findingRecord <HcalPedestalsRcd> ();
50 else if (objectName ==
"EffectivePedestalWidths") {
52 findingRecord <HcalPedestalWidthsRcd> ();
54 else if (objectName ==
"Gains") {
56 findingRecord <HcalGainsRcd> ();
58 else if (objectName ==
"GainWidths") {
60 findingRecord <HcalGainWidthsRcd> ();
62 else if (objectName ==
"QIEData") {
64 findingRecord <HcalQIEDataRcd> ();
66 else if (objectName ==
"QIETypes") {
68 findingRecord <HcalQIETypesRcd> ();
70 else if (objectName ==
"ChannelQuality") {
72 findingRecord <HcalChannelQualityRcd> ();
74 else if (objectName ==
"ZSThresholds") {
76 findingRecord <HcalZSThresholdsRcd> ();
78 else if (objectName ==
"RespCorrs") {
80 findingRecord <HcalRespCorrsRcd> ();
82 else if (objectName ==
"LUTCorrs") {
84 findingRecord <HcalLUTCorrsRcd> ();
86 else if (objectName ==
"PFCorrs") {
88 findingRecord <HcalPFCorrsRcd> ();
90 else if (objectName ==
"TimeCorrs") {
92 findingRecord <HcalTimeCorrsRcd> ();
94 else if (objectName ==
"L1TriggerObjects") {
96 findingRecord <HcalL1TriggerObjectsRcd> ();
98 else if (objectName ==
"ElectronicsMap") {
100 findingRecord <HcalElectronicsMapRcd> ();
102 else if (objectName ==
"FrontEndMap") {
104 findingRecord <HcalFrontEndMapRcd> ();
106 else if (objectName ==
"ValidationCorrs") {
108 findingRecord <HcalValidationCorrsRcd> ();
110 else if (objectName ==
"LutMetadata") {
112 findingRecord <HcalLutMetadataRcd> ();
114 else if (objectName ==
"DcsValues") {
116 findingRecord <HcalDcsRcd> ();
118 else if (objectName ==
"DcsMap") {
120 findingRecord <HcalDcsMapRcd> ();
122 else if (objectName ==
"RecoParams") {
124 findingRecord <HcalRecoParamsRcd> ();
126 else if (objectName ==
"TimingParams") {
128 findingRecord <HcalTimingParamsRcd> ();
130 else if (objectName ==
"LongRecoParams") {
132 findingRecord <HcalLongRecoParamsRcd> ();
134 else if (objectName ==
"ZDCLowGainFractions") {
136 findingRecord <HcalZDCLowGainFractionsRcd> ();
138 else if (objectName ==
"MCParams") {
140 findingRecord <HcalMCParamsRcd> ();
142 else if (objectName ==
"FlagHFDigiTimeParams") {
144 findingRecord <HcalFlagHFDigiTimeParamsRcd> ();
146 else if (objectName ==
"SiPMParameters") {
148 findingRecord <HcalSiPMParametersRcd> ();
150 else if (objectName ==
"SiPMCharacteristics") {
152 findingRecord <HcalSiPMCharacteristicsRcd> ();
154 else if (objectName ==
"TPChannelParameters") {
156 findingRecord <HcalTPChannelParametersRcd> ();
158 else if (objectName ==
"TPParameters") {
160 findingRecord <HcalTPParametersRcd> ();
163 std::cerr <<
"HcalTextCalibrations-> Unknown object name '" << objectName
164 <<
"', known names are: " 165 <<
"Pedestals PedestalWidths Gains GainWidths QIEData QIETypes ChannelQuality ElectronicsMap " 166 <<
"FrontEndMap ZSThresholds RespCorrs LUTCorrs PFCorrs TimeCorrs L1TriggerObjects " 167 <<
"ValidationCorrs LutMetadata DcsValues DcsMap " 168 <<
"RecoParams LongRecoParams ZDCLowGainFraction FlagHFDigiTimeParams MCParams " 169 <<
"SiPMParameters SiPMCharacteristics TPChannelParameters TPParameters" << std::endl;
190 template <
class T,
template <
class>
class F>
192 std::ifstream inStream (fFile.c_str ());
193 if (!inStream.good ()) {
194 std::cerr <<
"HcalTextCalibrations-> Unable to open file '" << fFile <<
"'" << std::endl;
195 throw cms::Exception(
"FileNotFound") <<
"Unable to open '" << fFile <<
"'" << std::endl;
197 auto result = F<T>(topo)(inStream);
199 std::cerr <<
"HcalTextCalibrations-> Can not read object from file '" << fFile <<
"'" << std::endl;
200 throw cms::Exception(
"ReadError") <<
"Can not read object from file '" << fFile <<
"'" << std::endl;
204 template <
class T> std::unique_ptr<T>
get_impl (
const std::string& fFile) {
return produce_impl<T,HcalTextCalibrations::CheckGetObject>(fFile); }
206 template <
class T> std::unique_ptr<T>
create_impl (
const std::string& fFile) {
return produce_impl<T,HcalTextCalibrations::CheckCreateObject>(fFile); }
214 return get_impl_topo<HcalPedestals> (mInputs [
"Pedestals"],topo);
221 return get_impl_topo<HcalPedestalWidths> (mInputs [
"PedestalWidths"],topo);
229 return get_impl_topo<HcalPedestals> (mInputs [
"PedestalsEffective"],topo);
236 return get_impl_topo<HcalPedestalWidths> (mInputs [
"PedestalWidthsEffective"],topo);
243 return get_impl_topo<HcalGains> (mInputs [
"Gains"],topo);
250 return get_impl_topo<HcalGainWidths> (mInputs [
"GainWidths"],topo);
257 return get_impl_topo<HcalQIEData> (mInputs [
"QIEData"],topo);
264 return get_impl_topo<HcalQIETypes> (mInputs [
"QIETypes"],topo);
271 return get_impl_topo<HcalChannelQuality> (mInputs [
"ChannelQuality"],topo);
277 return get_impl_topo<HcalZSThresholds> (mInputs [
"ZSThresholds"],topo);
284 return get_impl_topo<HcalRespCorrs> (mInputs [
"RespCorrs"],topo);
291 return get_impl_topo<HcalLUTCorrs> (mInputs [
"LUTCorrs"],topo);
298 return get_impl_topo<HcalPFCorrs> (mInputs [
"PFCorrs"],topo);
305 return get_impl_topo<HcalTimeCorrs> (mInputs [
"TimeCorrs"],topo);
312 return get_impl_topo<HcalL1TriggerObjects> (mInputs [
"L1TriggerObjects"],topo);
316 return create_impl<HcalElectronicsMap> (mInputs [
"ElectronicsMap"]);
320 return create_impl<HcalFrontEndMap> (mInputs [
"FrontEndMap"]);
327 return get_impl_topo<HcalValidationCorrs> (mInputs [
"ValidationCorrs"],topo);
334 return get_impl_topo<HcalLutMetadata> (mInputs [
"LutMetadata"],topo);
337 std::unique_ptr<HcalDcsValues>
339 return get_impl<HcalDcsValues> (mInputs [
"DcsValues"]);
343 return create_impl<HcalDcsMap> (mInputs [
"DcsMap"]);
350 return get_impl_topo<HcalRecoParams> (mInputs [
"RecoParams"],topo);
357 return get_impl_topo<HcalLongRecoParams> (mInputs [
"LongRecoParams"],topo);
364 return get_impl_topo<HcalZDCLowGainFractions> (mInputs [
"ZDCLowGainFractions"],topo);
371 return get_impl_topo<HcalTimingParams> (mInputs [
"TimingParams"],topo);
377 return get_impl_topo<HcalMCParams> (mInputs [
"MCParams"],topo);
384 return get_impl_topo<HcalFlagHFDigiTimeParams> (mInputs [
"FlagHFDigiTimeParams"],topo);
391 return get_impl_topo<HcalSiPMParameters> (mInputs [
"SiPMParameters"],topo);
395 return create_impl<HcalSiPMCharacteristics> (mInputs [
"SiPMCharacteristics"]);
402 return get_impl_topo<HcalTPChannelParameters> (mInputs [
"TPChannelParameters"],topo);
406 return get_impl<HcalTPParameters> (mInputs [
"TPParameters"]);
std::unique_ptr< HcalPedestals > producePedestals(const HcalPedestalsRcd &rcd)
std::unique_ptr< HcalGainWidths > produceGainWidths(const HcalGainWidthsRcd &rcd)
T getParameter(std::string const &) const
std::unique_ptr< HcalZDCLowGainFractions > produceZDCLowGainFractions(const HcalZDCLowGainFractionsRcd &rcd)
std::unique_ptr< T > get_impl(const std::string &fFile)
std::unique_ptr< T > get_impl_topo(const std::string &fFile, const HcalTopology *topo)
std::unique_ptr< HcalPedestals > produceEffectivePedestals(const HcalPedestalsRcd &rcd)
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< HcalMCParams > produceMCParams(const HcalMCParamsRcd &rcd)
std::unique_ptr< HcalLUTCorrs > produceLUTCorrs(const HcalLUTCorrsRcd &rcd)
std::unique_ptr< HcalPFCorrs > producePFCorrs(const HcalPFCorrsRcd &rcd)
std::unique_ptr< T > create_impl(const std::string &fFile)
static const IOVSyncValue & endOfTime()
std::unique_ptr< HcalDcsValues > produceDcsValues(HcalDcsRcd const &rcd)
std::unique_ptr< HcalQIEData > produceQIEData(const HcalQIEDataRcd &rcd)
std::pair< Time_t, Time_t > ValidityInterval
void setIntervalFor(const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &) override
std::unique_ptr< HcalSiPMCharacteristics > produceSiPMCharacteristics(const HcalSiPMCharacteristicsRcd &rcd)
std::unique_ptr< HcalZSThresholds > produceZSThresholds(const HcalZSThresholdsRcd &rcd)
std::unique_ptr< HcalSiPMParameters > produceSiPMParameters(const HcalSiPMParametersRcd &rcd)
std::unique_ptr< HcalDcsMap > produceDcsMap(const HcalDcsMapRcd &rcd)
static const IOVSyncValue & beginOfTime()
std::unique_ptr< HcalRecoParams > produceRecoParams(const HcalRecoParamsRcd &rcd)
const DepRecordT getRecord() const
std::unique_ptr< HcalChannelQuality > produceChannelQuality(const HcalChannelQualityRcd &rcd)
std::unique_ptr< HcalPedestalWidths > produceEffectivePedestalWidths(const HcalPedestalWidthsRcd &rcd)
HcalTextCalibrations(const edm::ParameterSet &)
const char * name() const
std::unique_ptr< T > produce_impl(const std::string &fFile, const HcalTopology *topo=0)
std::unique_ptr< HcalTPChannelParameters > produceTPChannelParameters(const HcalTPChannelParametersRcd &rcd)
std::unique_ptr< HcalQIETypes > produceQIETypes(const HcalQIETypesRcd &rcd)
Namespace of DDCMS conversion namespace.
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)
char data[epos_bytes_allocation]
std::unique_ptr< HcalRespCorrs > produceRespCorrs(const HcalRespCorrsRcd &rcd)
std::unique_ptr< HcalFrontEndMap > produceFrontEndMap(const HcalFrontEndMapRcd &rcd)
std::string fullPath() const
static uInt32 F(BLOWFISH_CTX *ctx, uInt32 x)
std::unique_ptr< HcalLutMetadata > produceLutMetadata(const HcalLutMetadataRcd &rcd)
std::unique_ptr< HcalTimeCorrs > produceTimeCorrs(const HcalTimeCorrsRcd &rcd)
~HcalTextCalibrations() override
std::unique_ptr< HcalFlagHFDigiTimeParams > produceFlagHFDigiTimeParams(const HcalFlagHFDigiTimeParamsRcd &rcd)
std::unique_ptr< HcalValidationCorrs > produceValidationCorrs(const HcalValidationCorrsRcd &rcd)