41 std::vector<edm::ParameterSet>
data = iConfig.
getParameter<std::vector<edm::ParameterSet> >(
"input");
42 std::vector<edm::ParameterSet>::iterator request = data.begin ();
43 for (; request != data.end (); ++request) {
47 if (objectName ==
"Pedestals") {
49 findingRecord <CastorPedestalsRcd> ();
51 else if (objectName ==
"PedestalWidths") {
53 findingRecord <CastorPedestalWidthsRcd> ();
55 else if (objectName ==
"Gains") {
57 findingRecord <CastorGainsRcd> ();
59 else if (objectName ==
"GainWidths") {
61 findingRecord <CastorGainWidthsRcd> ();
63 else if (objectName ==
"QIEData") {
65 findingRecord <CastorQIEDataRcd> ();
67 else if (objectName ==
"ChannelQuality") {
69 findingRecord <CastorChannelQualityRcd> ();
71 else if (objectName ==
"ElectronicsMap") {
73 findingRecord <CastorElectronicsMapRcd> ();
75 else if (objectName ==
"RecoParams") {
77 findingRecord <CastorRecoParamsRcd> ();
79 else if (objectName ==
"SaturationCorrs") {
81 findingRecord <CastorSaturationCorrsRcd> ();
84 std::cerr <<
"CastorTextCalibrations-> Unknown object name '" << objectName
85 <<
"', known names are: " 86 <<
"Pedestals PedestalWidths Gains GainWidths QIEData ChannelQuality ElectronicsMap RecoParams SaturationCorrs" 110 std::unique_ptr<T>
result (
new T ());
111 std::ifstream inStream (fFile.c_str ());
112 if (!inStream.good ()) {
113 std::cerr <<
"CastorTextCalibrations-> Unable to open file '" << fFile <<
"'" << std::endl;
114 throw cms::Exception(
"FileNotFound") <<
"Unable to open '" << fFile <<
"'" << std::endl;
117 std::cerr <<
"CastorTextCalibrations-> Can not read object from file '" << fFile <<
"'" << std::endl;
118 throw cms::Exception(
"ReadError") <<
"Can not read object from file '" << fFile <<
"'" << std::endl;
125 return produce_impl<CastorPedestals> (mInputs [
"Pedestals"]);
129 return produce_impl<CastorPedestalWidths> (mInputs [
"PedestalWidths"]);
133 return produce_impl<CastorGains> (mInputs [
"Gains"]);
137 return produce_impl<CastorGainWidths> (mInputs [
"GainWidths"]);
141 return produce_impl<CastorQIEData> (mInputs [
"QIEData"]);
145 return produce_impl<CastorChannelQuality> (mInputs [
"ChannelQuality"]);
149 return produce_impl<CastorElectronicsMap> (mInputs [
"ElectronicsMap"]);
153 return produce_impl<CastorRecoParams> (mInputs [
"RecoParams"]);
157 return produce_impl<CastorSaturationCorrs> (mInputs [
"SaturationCorrs"]);
T getParameter(std::string const &) const
static const IOVSyncValue & endOfTime()
std::unique_ptr< CastorPedestals > producePedestals(const CastorPedestalsRcd &rcd)
std::pair< Time_t, Time_t > ValidityInterval
void setIntervalFor(const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &) override
std::unique_ptr< CastorGainWidths > produceGainWidths(const CastorGainWidthsRcd &rcd)
std::unique_ptr< CastorPedestalWidths > producePedestalWidths(const CastorPedestalWidthsRcd &rcd)
std::unique_ptr< T > produce_impl(const std::string &fFile)
std::unique_ptr< CastorRecoParams > produceRecoParams(const CastorRecoParamsRcd &rcd)
static const IOVSyncValue & beginOfTime()
bool getObject(std::istream &fInput, CastorPedestals *fObject)
const char * name() const
std::unique_ptr< CastorChannelQuality > produceChannelQuality(const CastorChannelQualityRcd &rcd)
char data[epos_bytes_allocation]
std::unique_ptr< CastorSaturationCorrs > produceSaturationCorrs(const CastorSaturationCorrsRcd &rcd)
std::unique_ptr< CastorElectronicsMap > produceElectronicsMap(const CastorElectronicsMapRcd &rcd)
std::string fullPath() const
~CastorTextCalibrations() override
CastorTextCalibrations(const edm::ParameterSet &)
std::unique_ptr< CastorQIEData > produceQIEData(const CastorQIEDataRcd &rcd)
std::unique_ptr< CastorGains > produceGains(const CastorGainsRcd &rcd)