1 #ifndef CondTools_Hcal_BoostIODBWriter_h 2 #define CondTools_Hcal_BoostIODBWriter_h 28 #include "CondFormats/Serialization/interface/eos/portable_iarchive.hpp" 39 template <
class DataType>
54 template <
class DataType>
56 : inputFile_(ps.getParameter<
std::
string>(
"inputFile")), record_(ps.getParameter<
std::
string>(
"record")) {
60 template <
class DataType>
62 std::ifstream is(inputFile_.c_str(), std::ios_base::binary);
64 throw cms::Exception(
"InvalidArgument") <<
"Failed to open file \"" << inputFile_ <<
'"' << std::endl;
66 std::unique_ptr<DataType> datum(
new DataType());
67 eos::portable_iarchive ar(is);
74 throw cms::Exception(
"ConfigurationError") <<
"PoolDBOutputService is not available, " 75 <<
"please configure it properly" << std::endl;
78 #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
static const std::string kSharedResource