#include <memory>
#include <iostream>
#include <fstream>
#include "FWCore/Utilities/interface/Exception.h"
#include "FWCore/ParameterSet/interface/FileInPath.h"
#include "FWCore/Framework/interface/ValidityInterval.h"
#include "CalibCalorimetry/HcalAlgos/interface/HcalDbASCIIIO.h"
#include "CondFormats/HcalObjects/interface/HcalPedestals.h"
#include "CondFormats/HcalObjects/interface/HcalPedestalWidths.h"
#include "CondFormats/HcalObjects/interface/HcalGains.h"
#include "CondFormats/HcalObjects/interface/HcalGainWidths.h"
#include "CondFormats/HcalObjects/interface/HcalElectronicsMap.h"
#include "CondFormats/HcalObjects/interface/HcalChannelQuality.h"
#include "CondFormats/HcalObjects/interface/HcalQIEData.h"
#include "CondFormats/DataRecord/interface/HcalPedestalsRcd.h"
#include "CondFormats/DataRecord/interface/HcalPedestalWidthsRcd.h"
#include "CondFormats/DataRecord/interface/HcalGainsRcd.h"
#include "CondFormats/DataRecord/interface/HcalGainWidthsRcd.h"
#include "CondFormats/DataRecord/interface/HcalElectronicsMapRcd.h"
#include "CondFormats/DataRecord/interface/HcalChannelQualityRcd.h"
#include "CondFormats/DataRecord/interface/HcalQIEDataRcd.h"
#include "CondFormats/DataRecord/interface/HcalRespCorrsRcd.h"
#include "CondFormats/DataRecord/interface/HcalZSThresholdsRcd.h"
#include "HcalTextCalibrations.h"
Go to the source code of this file.
Functions | |
template<class T> | |
std::auto_ptr< T > | produce_impl (const std::string &fFile) |
std::auto_ptr<T> produce_impl | ( | const std::string & | fFile | ) | [inline] |
Definition at line 116 of file HcalTextCalibrations.cc.
References TestMuL1L2Filter_cff::cerr, lat::endl(), Exception, HcalDbASCIIIO::getObject(), and HLT_VtxMuL3::result.
00116 { 00117 std::auto_ptr<T> result (new T ()); 00118 std::ifstream inStream (fFile.c_str ()); 00119 if (!inStream.good ()) { 00120 std::cerr << "HcalTextCalibrations-> Unable to open file '" << fFile << "'" << std::endl; 00121 throw cms::Exception("FileNotFound") << "Unable to open '" << fFile << "'" << std::endl; 00122 } 00123 if (!HcalDbASCIIIO::getObject (inStream, &*result)) { 00124 std::cerr << "HcalTextCalibrations-> Can not read object from file '" << fFile << "'" << std::endl; 00125 throw cms::Exception("ReadError") << "Can not read object from file '" << fFile << "'" << std::endl; 00126 } 00127 return result; 00128 }