1 #ifndef CondTools_Hcal_BoostIODBWriter_h 2 #define CondTools_Hcal_BoostIODBWriter_h 27 #include "CondFormats/Serialization/interface/eos/portable_iarchive.hpp" 43 template <
class DataType>
58 template <
class DataType>
60 : inputFile_(ps.getParameter<
std::
string>(
"inputFile")), record_(ps.getParameter<
std::
string>(
"record")) {}
62 template <
class DataType>
64 std::ifstream is(inputFile_.c_str(), std::ios_base::binary);
66 throw cms::Exception(
"InvalidArgument") <<
"Failed to open file \"" << inputFile_ <<
'"' << std::endl;
68 std::unique_ptr<DataType> datum(
new DataType());
69 eos::portable_iarchive ar(is);
76 throw cms::Exception(
"ConfigurationError") <<
"PoolDBOutputService is not available, " 77 <<
"please configure it properly" << std::endl;
80 #endif // CondTools_Hcal_BoostIODBWriter_h
void analyze(const edm::Event &, const edm::EventSetup &) override
cond::Time_t currentTime() const
Hash writeOneIOV(const T &payload, Time_t time, const std::string &recordName)
BoostIODBWriter(const edm::ParameterSet &)
~BoostIODBWriter() override