32 std::vector<edm::ParameterSet>
data = iConfig.
getParameter<std::vector<edm::ParameterSet> >(
"input");
33 std::vector<edm::ParameterSet>::iterator request = data.begin ();
34 for (; request != data.end (); ++request) {
38 if (objectName ==
"Pedestals") {
40 findingRecord <HcalPedestalsRcd> ();
42 else if (objectName ==
"PedestalWidths") {
44 findingRecord <HcalPedestalWidthsRcd> ();
46 else if (objectName ==
"Gains") {
48 findingRecord <HcalGainsRcd> ();
50 else if (objectName ==
"GainWidths") {
52 findingRecord <HcalGainWidthsRcd> ();
54 else if (objectName ==
"QIEData") {
56 findingRecord <HcalQIEDataRcd> ();
58 else if (objectName ==
"QIETypes") {
60 findingRecord <HcalQIETypesRcd> ();
62 else if (objectName ==
"ChannelQuality") {
64 findingRecord <HcalChannelQualityRcd> ();
66 else if (objectName ==
"ZSThresholds") {
68 findingRecord <HcalZSThresholdsRcd> ();
70 else if (objectName ==
"RespCorrs") {
72 findingRecord <HcalRespCorrsRcd> ();
74 else if (objectName ==
"LUTCorrs") {
76 findingRecord <HcalLUTCorrsRcd> ();
78 else if (objectName ==
"PFCorrs") {
80 findingRecord <HcalPFCorrsRcd> ();
82 else if (objectName ==
"TimeCorrs") {
84 findingRecord <HcalTimeCorrsRcd> ();
86 else if (objectName ==
"L1TriggerObjects") {
88 findingRecord <HcalL1TriggerObjectsRcd> ();
90 else if (objectName ==
"ElectronicsMap") {
92 findingRecord <HcalElectronicsMapRcd> ();
94 else if (objectName ==
"ValidationCorrs") {
96 findingRecord <HcalValidationCorrsRcd> ();
98 else if (objectName ==
"LutMetadata") {
100 findingRecord <HcalLutMetadataRcd> ();
102 else if (objectName ==
"DcsValues") {
104 findingRecord <HcalDcsRcd> ();
106 else if (objectName ==
"DcsMap") {
108 findingRecord <HcalDcsMapRcd> ();
110 else if (objectName ==
"CholeskyMatrices") {
112 findingRecord <HcalCholeskyMatricesRcd> ();
114 else if (objectName ==
"CovarianceMatrices") {
116 findingRecord <HcalCovarianceMatricesRcd> ();
118 else if (objectName ==
"RecoParams") {
120 findingRecord <HcalRecoParamsRcd> ();
122 else if (objectName ==
"TimingParams") {
124 findingRecord <HcalTimingParamsRcd> ();
126 else if (objectName ==
"LongRecoParams") {
128 findingRecord <HcalLongRecoParamsRcd> ();
130 else if (objectName ==
"ZDCLowGainFractions") {
132 findingRecord <HcalZDCLowGainFractionsRcd> ();
134 else if (objectName ==
"MCParams") {
136 findingRecord <HcalMCParamsRcd> ();
138 else if (objectName ==
"FlagHFDigiTimeParams") {
140 findingRecord <HcalFlagHFDigiTimeParamsRcd> ();
143 std::cerr <<
"HcalTextCalibrations-> Unknown object name '" << objectName
144 <<
"', known names are: "
145 <<
"Pedestals PedestalWidths Gains GainWidths QIEData QIETypes ChannelQuality ElectronicsMap "
146 <<
"ZSThresholds RespCorrs LUTCorrs PFCorrs TimeCorrs L1TriggerObjects "
147 <<
"ValidationCorrs LutMetadata DcsValues DcsMap CholeskyMatrices CovarianceMatrices "
148 <<
"RecoParams LongRecoParams ZDCLowGainFraction FlagHFDigiTimeParams MCParams "
172 std::auto_ptr<T>
result (
new T (topo));
174 std::ifstream inStream (fFile.c_str ());
175 if (!inStream.good ()) {
176 std::cerr <<
"HcalTextCalibrations-> Unable to open file '" << fFile <<
"'" << std::endl;
177 throw cms::Exception(
"FileNotFound") <<
"Unable to open '" << fFile <<
"'" << std::endl;
180 std::cerr <<
"HcalTextCalibrations-> Can not read object from file '" << fFile <<
"'" << std::endl;
181 throw cms::Exception(
"ReadError") <<
"Can not read object from file '" << fFile <<
"'" << std::endl;
188 std::auto_ptr<T>
result (
new T ());
190 std::ifstream inStream (fFile.c_str ());
191 if (!inStream.good ()) {
192 std::cerr <<
"HcalTextCalibrations-> Unable to open file '" << fFile <<
"'" << std::endl;
193 throw cms::Exception(
"FileNotFound") <<
"Unable to open '" << fFile <<
"'" << std::endl;
196 std::cerr <<
"HcalTextCalibrations-> Can not read object from file '" << fFile <<
"'" << std::endl;
197 throw cms::Exception(
"ReadError") <<
"Can not read object from file '" << fFile <<
"'" << std::endl;
209 return produce_impl<HcalPedestals> (topo,mInputs [
"Pedestals"]);
216 return produce_impl<HcalPedestalWidths> (topo,mInputs [
"PedestalWidths"]);
223 return produce_impl<HcalGains> (topo,mInputs [
"Gains"]);
230 return produce_impl<HcalGainWidths> (topo,mInputs [
"GainWidths"]);
237 return produce_impl<HcalQIEData> (topo,mInputs [
"QIEData"]);
244 return produce_impl<HcalQIETypes> (topo,mInputs [
"QIETypes"]);
251 return produce_impl<HcalChannelQuality> (topo,mInputs [
"ChannelQuality"]);
257 return produce_impl<HcalZSThresholds> (topo,mInputs [
"ZSThresholds"]);
264 return produce_impl<HcalRespCorrs> (topo,mInputs [
"RespCorrs"]);
271 return produce_impl<HcalLUTCorrs> (topo,mInputs [
"LUTCorrs"]);
278 return produce_impl<HcalPFCorrs> (topo,mInputs [
"PFCorrs"]);
285 return produce_impl<HcalTimeCorrs> (topo,mInputs [
"TimeCorrs"]);
292 return produce_impl<HcalL1TriggerObjects> (topo,mInputs [
"L1TriggerObjects"]);
296 return produce_impl<HcalElectronicsMap> (mInputs [
"ElectronicsMap"]);
303 return produce_impl<HcalValidationCorrs> (topo,mInputs [
"ValidationCorrs"]);
310 return produce_impl<HcalLutMetadata> (topo,mInputs [
"LutMetadata"]);
313 std::auto_ptr<HcalDcsValues>
315 return produce_impl<HcalDcsValues> (mInputs [
"DcsValues"]);
319 return produce_impl<HcalDcsMap> (mInputs [
"DcsMap"]);
326 return produce_impl<HcalCovarianceMatrices> (topo,mInputs [
"CovarianceMatrices"]);
333 return produce_impl<HcalCholeskyMatrices> (topo,mInputs [
"CholeskyMatrices"]);
340 return produce_impl<HcalRecoParams> (topo,mInputs [
"RecoParams"]);
347 return produce_impl<HcalLongRecoParams> (topo,mInputs [
"LongRecoParams"]);
354 return produce_impl<HcalZDCLowGainFractions> (topo,mInputs [
"ZDCLowGainFractions"]);
361 return produce_impl<HcalTimingParams> (topo,mInputs [
"TimingParams"]);
367 return produce_impl<HcalMCParams> (topo,mInputs [
"MCParams"]);
374 return produce_impl<HcalFlagHFDigiTimeParams> (topo,mInputs [
"FlagHFDigiTimeParams"]);
T getParameter(std::string const &) const
std::auto_ptr< HcalDcsValues > produceDcsValues(HcalDcsRcd const &rcd)
std::auto_ptr< HcalQIEData > produceQIEData(const HcalQIEDataRcd &rcd)
std::auto_ptr< HcalLongRecoParams > produceLongRecoParams(const HcalLongRecoParamsRcd &rcd)
std::auto_ptr< HcalPedestals > producePedestals(const HcalPedestalsRcd &rcd)
std::auto_ptr< HcalCovarianceMatrices > produceCovarianceMatrices(const HcalCovarianceMatricesRcd &rcd)
std::auto_ptr< HcalZDCLowGainFractions > produceZDCLowGainFractions(const HcalZDCLowGainFractionsRcd &rcd)
static const IOVSyncValue & endOfTime()
std::pair< Time_t, Time_t > ValidityInterval
virtual void setIntervalFor(const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &)
std::auto_ptr< HcalMCParams > produceMCParams(const HcalMCParamsRcd &rcd)
const DepRecordT & getRecord() const
std::auto_ptr< HcalGainWidths > produceGainWidths(const HcalGainWidthsRcd &rcd)
static const IOVSyncValue & beginOfTime()
std::auto_ptr< HcalZSThresholds > produceZSThresholds(const HcalZSThresholdsRcd &rcd)
std::auto_ptr< HcalValidationCorrs > produceValidationCorrs(const HcalValidationCorrsRcd &rcd)
std::auto_ptr< HcalFlagHFDigiTimeParams > produceFlagHFDigiTimeParams(const HcalFlagHFDigiTimeParamsRcd &rcd)
HcalTextCalibrations(const edm::ParameterSet &)
std::auto_ptr< HcalRespCorrs > produceRespCorrs(const HcalRespCorrsRcd &rcd)
const char * name() const
std::auto_ptr< HcalL1TriggerObjects > produceL1TriggerObjects(const HcalL1TriggerObjectsRcd &rcd)
std::auto_ptr< HcalRecoParams > produceRecoParams(const HcalRecoParamsRcd &rcd)
std::auto_ptr< HcalTimeCorrs > produceTimeCorrs(const HcalTimeCorrsRcd &rcd)
std::auto_ptr< HcalTimingParams > produceTimingParams(const HcalTimingParamsRcd &rcd)
std::auto_ptr< HcalCholeskyMatrices > produceCholeskyMatrices(const HcalCholeskyMatricesRcd &rcd)
std::auto_ptr< HcalChannelQuality > produceChannelQuality(const HcalChannelQualityRcd &rcd)
bool getObject(std::istream &fInput, HcalPedestals *fObject)
char data[epos_bytes_allocation]
std::auto_ptr< HcalGains > produceGains(const HcalGainsRcd &rcd)
std::auto_ptr< HcalLUTCorrs > produceLUTCorrs(const HcalLUTCorrsRcd &rcd)
std::auto_ptr< HcalLutMetadata > produceLutMetadata(const HcalLutMetadataRcd &rcd)
std::auto_ptr< HcalQIETypes > produceQIETypes(const HcalQIETypesRcd &rcd)
std::string fullPath() const
std::auto_ptr< T > produce_impl(const std::string &fFile)
std::auto_ptr< HcalElectronicsMap > produceElectronicsMap(const HcalElectronicsMapRcd &rcd)
std::auto_ptr< HcalPedestalWidths > producePedestalWidths(const HcalPedestalWidthsRcd &rcd)
std::auto_ptr< HcalPFCorrs > producePFCorrs(const HcalPFCorrsRcd &rcd)
std::auto_ptr< HcalDcsMap > produceDcsMap(const HcalDcsMapRcd &rcd)