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++) {
34 std::string
objectName = request->getParameter<std::string> (
"object");
37 if (objectName ==
"Pedestals") {
39 findingRecord <HcalPedestalsRcd> ();
41 else if (objectName ==
"PedestalWidths") {
43 findingRecord <HcalPedestalWidthsRcd> ();
45 else if (objectName ==
"Gains") {
47 findingRecord <HcalGainsRcd> ();
49 else if (objectName ==
"GainWidths") {
51 findingRecord <HcalGainWidthsRcd> ();
53 else if (objectName ==
"QIEData") {
55 findingRecord <HcalQIEDataRcd> ();
57 else if (objectName ==
"ChannelQuality") {
59 findingRecord <HcalChannelQualityRcd> ();
61 else if (objectName ==
"ZSThresholds") {
63 findingRecord <HcalZSThresholdsRcd> ();
65 else if (objectName ==
"RespCorrs") {
67 findingRecord <HcalRespCorrsRcd> ();
69 else if (objectName ==
"LUTCorrs") {
71 findingRecord <HcalLUTCorrsRcd> ();
73 else if (objectName ==
"PFCorrs") {
75 findingRecord <HcalPFCorrsRcd> ();
77 else if (objectName ==
"TimeCorrs") {
79 findingRecord <HcalTimeCorrsRcd> ();
81 else if (objectName ==
"L1TriggerObjects") {
83 findingRecord <HcalL1TriggerObjectsRcd> ();
85 else if (objectName ==
"ElectronicsMap") {
87 findingRecord <HcalElectronicsMapRcd> ();
89 else if (objectName ==
"ValidationCorrs") {
91 findingRecord <HcalValidationCorrsRcd> ();
93 else if (objectName ==
"LutMetadata") {
95 findingRecord <HcalLutMetadataRcd> ();
97 else if (objectName ==
"DcsValues") {
99 findingRecord <HcalDcsRcd> ();
101 else if (objectName ==
"DcsMap") {
103 findingRecord <HcalDcsMapRcd> ();
105 else if (objectName ==
"CholeskyMatrices") {
107 findingRecord <HcalCholeskyMatricesRcd> ();
109 else if (objectName ==
"CovarianceMatrices") {
111 findingRecord <HcalCovarianceMatricesRcd> ();
113 else if (objectName ==
"RecoParams") {
115 findingRecord <HcalRecoParamsRcd> ();
117 else if (objectName ==
"TimingParams") {
119 findingRecord <HcalTimingParamsRcd> ();
121 else if (objectName ==
"LongRecoParams") {
123 findingRecord <HcalLongRecoParamsRcd> ();
125 else if (objectName ==
"MCParams") {
127 findingRecord <HcalMCParamsRcd> ();
129 else if (objectName ==
"FlagHFDigiTimeParams") {
131 findingRecord <HcalFlagHFDigiTimeParamsRcd> ();
134 std::cerr <<
"HcalTextCalibrations-> Unknown object name '" << objectName
135 <<
"', known names are: "
136 <<
"Pedestals PedestalWidths Gains GainWidths QIEData ChannelQuality ElectronicsMap "
137 <<
"ZSThresholds RespCorrs LUTCorrs PFCorrs TimeCorrs L1TriggerObjects "
138 <<
"ValidationCorrs LutMetadata DcsValues DcsMap CholeskyMatrices CovarianceMatrices "
139 <<
"RecoParams LongRecoParams FlagHFDigiTimeParams MCParams "
163 std::auto_ptr<T>
result (
new T ());
165 std::ifstream inStream (fFile.c_str ());
166 if (!inStream.good ()) {
167 std::cerr <<
"HcalTextCalibrations-> Unable to open file '" << fFile <<
"'" << std::endl;
168 throw cms::Exception(
"FileNotFound") <<
"Unable to open '" << fFile <<
"'" << std::endl;
171 std::cerr <<
"HcalTextCalibrations-> Can not read object from file '" << fFile <<
"'" << std::endl;
172 throw cms::Exception(
"ReadError") <<
"Can not read object from file '" << fFile <<
"'" << std::endl;
180 return produce_impl<HcalPedestals> (mInputs [
"Pedestals"]);
184 return produce_impl<HcalPedestalWidths> (mInputs [
"PedestalWidths"]);
188 return produce_impl<HcalGains> (mInputs [
"Gains"]);
192 return produce_impl<HcalGainWidths> (mInputs [
"GainWidths"]);
196 return produce_impl<HcalQIEData> (mInputs [
"QIEData"]);
200 return produce_impl<HcalChannelQuality> (mInputs [
"ChannelQuality"]);
204 return produce_impl<HcalZSThresholds> (mInputs [
"ZSThresholds"]);
208 return produce_impl<HcalRespCorrs> (mInputs [
"RespCorrs"]);
212 return produce_impl<HcalLUTCorrs> (mInputs [
"LUTCorrs"]);
216 return produce_impl<HcalPFCorrs> (mInputs [
"PFCorrs"]);
220 return produce_impl<HcalTimeCorrs> (mInputs [
"TimeCorrs"]);
224 return produce_impl<HcalL1TriggerObjects> (mInputs [
"L1TriggerObjects"]);
228 return produce_impl<HcalElectronicsMap> (mInputs [
"ElectronicsMap"]);
232 return produce_impl<HcalValidationCorrs> (mInputs [
"ValidationCorrs"]);
236 return produce_impl<HcalLutMetadata> (mInputs [
"LutMetadata"]);
239 std::auto_ptr<HcalDcsValues>
241 return produce_impl<HcalDcsValues> (mInputs [
"DcsValues"]);
245 return produce_impl<HcalDcsMap> (mInputs [
"DcsMap"]);
249 return produce_impl<HcalCovarianceMatrices> (mInputs [
"CovarianceMatrices"]);
253 return produce_impl<HcalCholeskyMatrices> (mInputs [
"CholeskyMatrices"]);
257 return produce_impl<HcalRecoParams> (mInputs [
"RecoParams"]);
261 return produce_impl<HcalLongRecoParams> (mInputs [
"LongRecoParams"]);
264 return produce_impl<HcalTimingParams> (mInputs [
"TimingParams"]);
267 return produce_impl<HcalMCParams> (mInputs [
"MCParams"]);
271 return produce_impl<HcalFlagHFDigiTimeParams> (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)
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)