33 std::vector<edm::ParameterSet>
data = iConfig.
getParameter<std::vector<edm::ParameterSet> >(
"input");
34 std::vector<edm::ParameterSet>::iterator request = data.begin ();
35 for (; request != data.end (); request++) {
39 if (objectName ==
"Pedestals") {
41 findingRecord <HcalPedestalsRcd> ();
43 else if (objectName ==
"PedestalWidths") {
45 findingRecord <HcalPedestalWidthsRcd> ();
47 else if (objectName ==
"Gains") {
49 findingRecord <HcalGainsRcd> ();
51 else if (objectName ==
"GainWidths") {
53 findingRecord <HcalGainWidthsRcd> ();
55 else if (objectName ==
"QIEData") {
57 findingRecord <HcalQIEDataRcd> ();
59 else if (objectName ==
"ChannelQuality") {
61 findingRecord <HcalChannelQualityRcd> ();
63 else if (objectName ==
"ZSThresholds") {
65 findingRecord <HcalZSThresholdsRcd> ();
67 else if (objectName ==
"RespCorrs") {
69 findingRecord <HcalRespCorrsRcd> ();
71 else if (objectName ==
"LUTCorrs") {
73 findingRecord <HcalLUTCorrsRcd> ();
75 else if (objectName ==
"PFCorrs") {
77 findingRecord <HcalPFCorrsRcd> ();
79 else if (objectName ==
"TimeCorrs") {
81 findingRecord <HcalTimeCorrsRcd> ();
83 else if (objectName ==
"L1TriggerObjects") {
85 findingRecord <HcalL1TriggerObjectsRcd> ();
87 else if (objectName ==
"ElectronicsMap") {
89 findingRecord <HcalElectronicsMapRcd> ();
91 else if (objectName ==
"ValidationCorrs") {
93 findingRecord <HcalValidationCorrsRcd> ();
95 else if (objectName ==
"LutMetadata") {
97 findingRecord <HcalLutMetadataRcd> ();
99 else if (objectName ==
"DcsValues") {
101 findingRecord <HcalDcsRcd> ();
103 else if (objectName ==
"DcsMap") {
105 findingRecord <HcalDcsMapRcd> ();
107 else if (objectName ==
"CholeskyMatrices") {
109 findingRecord <HcalCholeskyMatricesRcd> ();
111 else if (objectName ==
"CovarianceMatrices") {
113 findingRecord <HcalCovarianceMatricesRcd> ();
115 else if (objectName ==
"RecoParams") {
117 findingRecord <HcalRecoParamsRcd> ();
119 else if (objectName ==
"TimingParams") {
121 findingRecord <HcalTimingParamsRcd> ();
123 else if (objectName ==
"LongRecoParams") {
125 findingRecord <HcalLongRecoParamsRcd> ();
127 else if (objectName ==
"MCParams") {
129 findingRecord <HcalMCParamsRcd> ();
131 else if (objectName ==
"FlagHFDigiTimeParams") {
133 findingRecord <HcalFlagHFDigiTimeParamsRcd> ();
136 std::cerr <<
"HcalTextCalibrations-> Unknown object name '" << objectName
137 <<
"', known names are: "
138 <<
"Pedestals PedestalWidths Gains GainWidths QIEData ChannelQuality ElectronicsMap "
139 <<
"ZSThresholds RespCorrs LUTCorrs PFCorrs TimeCorrs L1TriggerObjects "
140 <<
"ValidationCorrs LutMetadata DcsValues DcsMap CholeskyMatrices CovarianceMatrices "
141 <<
"RecoParams LongRecoParams FlagHFDigiTimeParams MCParams "
165 std::auto_ptr<T>
result (
new T (topo));
167 std::ifstream inStream (fFile.c_str ());
168 if (!inStream.good ()) {
169 std::cerr <<
"HcalTextCalibrations-> Unable to open file '" << fFile <<
"'" << std::endl;
170 throw cms::Exception(
"FileNotFound") <<
"Unable to open '" << fFile <<
"'" << std::endl;
173 std::cerr <<
"HcalTextCalibrations-> Can not read object from file '" << fFile <<
"'" << std::endl;
174 throw cms::Exception(
"ReadError") <<
"Can not read object from file '" << fFile <<
"'" << std::endl;
181 std::auto_ptr<T>
result (
new T ());
183 std::ifstream inStream (fFile.c_str ());
184 if (!inStream.good ()) {
185 std::cerr <<
"HcalTextCalibrations-> Unable to open file '" << fFile <<
"'" << std::endl;
186 throw cms::Exception(
"FileNotFound") <<
"Unable to open '" << fFile <<
"'" << std::endl;
189 std::cerr <<
"HcalTextCalibrations-> Can not read object from file '" << fFile <<
"'" << std::endl;
190 throw cms::Exception(
"ReadError") <<
"Can not read object from file '" << fFile <<
"'" << std::endl;
202 return produce_impl<HcalPedestals> (topo,mInputs [
"Pedestals"]);
209 return produce_impl<HcalPedestalWidths> (topo,mInputs [
"PedestalWidths"]);
216 return produce_impl<HcalGains> (topo,mInputs [
"Gains"]);
223 return produce_impl<HcalGainWidths> (topo,mInputs [
"GainWidths"]);
230 return produce_impl<HcalQIEData> (topo,mInputs [
"QIEData"]);
237 return produce_impl<HcalChannelQuality> (topo,mInputs [
"ChannelQuality"]);
243 return produce_impl<HcalZSThresholds> (topo,mInputs [
"ZSThresholds"]);
250 return produce_impl<HcalRespCorrs> (topo,mInputs [
"RespCorrs"]);
257 return produce_impl<HcalLUTCorrs> (topo,mInputs [
"LUTCorrs"]);
264 return produce_impl<HcalPFCorrs> (topo,mInputs [
"PFCorrs"]);
271 return produce_impl<HcalTimeCorrs> (topo,mInputs [
"TimeCorrs"]);
278 return produce_impl<HcalL1TriggerObjects> (topo,mInputs [
"L1TriggerObjects"]);
282 return produce_impl<HcalElectronicsMap> (mInputs [
"ElectronicsMap"]);
289 return produce_impl<HcalValidationCorrs> (topo,mInputs [
"ValidationCorrs"]);
296 return produce_impl<HcalLutMetadata> (topo,mInputs [
"LutMetadata"]);
299 std::auto_ptr<HcalDcsValues>
301 return produce_impl<HcalDcsValues> (mInputs [
"DcsValues"]);
305 return produce_impl<HcalDcsMap> (mInputs [
"DcsMap"]);
312 return produce_impl<HcalCovarianceMatrices> (topo,mInputs [
"CovarianceMatrices"]);
319 return produce_impl<HcalCholeskyMatrices> (topo,mInputs [
"CholeskyMatrices"]);
326 return produce_impl<HcalRecoParams> (topo,mInputs [
"RecoParams"]);
333 return produce_impl<HcalLongRecoParams> (topo,mInputs [
"LongRecoParams"]);
339 return produce_impl<HcalTimingParams> (topo,mInputs [
"TimingParams"]);
345 return produce_impl<HcalMCParams> (topo,mInputs [
"MCParams"]);
352 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)
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::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)