1 #ifndef RecoLocalCalo_HcalRecAlgos_BoostIODBWriter_h
2 #define RecoLocalCalo_HcalRecAlgos_BoostIODBWriter_h
27 #include "CondFormats/Serialization/interface/eos/portable_iarchive.hpp"
43 template<
class DataType>
59 template<
class DataType>
61 : inputFile_(ps.getParameter<std::
string>(
"inputFile")),
62 record_(ps.getParameter<std::
string>(
"record"))
66 template<
class DataType>
70 std::ifstream is(inputFile_.c_str(), std::ios_base::binary);
73 <<
"Failed to open file \"" << inputFile_ <<
'"' << std::endl;
75 std::unique_ptr<DataType> datum(
new DataType());
76 eos::portable_iarchive ar(is);
81 poolDbService->
writeOne(datum.release(),
86 <<
"PoolDBOutputService is not available, "
87 <<
"please configure it properly" << std::endl;
90 #endif // RecoLocalCalo_HcalRecAlgos_BoostIODBWriter_h
virtual void analyze(const edm::Event &, const edm::EventSetup &) override
void writeOne(T *payload, Time_t time, const std::string &recordName, bool withlogging=false)
BoostIODBWriter(const edm::ParameterSet &)
virtual ~BoostIODBWriter()
cond::Time_t currentTime() const