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