1 #ifndef CommonTools_ConditionDBWriter_ConditionDBWriter_h 2 #define CommonTools_ConditionDBWriter_ConditionDBWriter_h 148 :
public edm::one::EDAnalyzer<edm::one::WatchRuns, edm::one::WatchLuminosityBlocks, edm::one::SharedResources> {
161 edm::LogInfo(
"ConditionDBWriter") <<
"ConditionDBWriter()";
174 <<
"ConditionDBWriter(): ERROR - unknown IOV interval write mode...will not store anything " 182 edm::LogError(
"ConditionDBWriter") <<
"endJob(): ERROR - only SinceAppendMode support!!!!";
189 desc.add<
bool>(
"SinceAppendMode");
192 desc.add<
bool>(
"doStoreOnDB");
193 desc.addUntracked<
bool>(
"TimeFromEndRun",
false);
194 desc.addUntracked<
bool>(
"TimeFromStartOfRunRange",
false);
240 edm::LogInfo(
"ConditionDBWriter") <<
"beginLuminosityBlock";
255 edm::LogInfo(
"ConditionDBWriter") <<
"endLuminosityBlock";
265 <<
"endLuminosityblock(): ERROR - requested to store on DB on a Lumi Block based interval, " 266 "but received null pointer...will not store anything on the DB";
287 <<
"endRun(): ERROR - requested to store on DB on a Run based interval, but received null " 288 "pointer...will not store anything on the DB";
306 edm::LogError(
"ConditionDBWriter") <<
"endJob() : ERROR - requested to store on DB on a Job based interval, " 307 "but received null pointer...will not store anything on the DB";
318 edm::LogError(
"ConditionDBWriter: Pointer to object has not been set...storing no data on DB");
327 edm::LogError(
"ConditionDBWriter") <<
"PoolDBOutputService is unavailable";
338 edm::LogInfo(
"ConditionDBWriter") <<
"appending a new object to tag " <<
Record_ <<
" in since mode ";
350 edm::LogError(
"ConditionDBWriter") <<
"setTime(): PoolDBOutputService is not available...cannot set current time";
365 <<
"storeOnDbNow: ERROR - requested to store on DB a new object (module configuration is " 366 "algo driven based IOV), but received NULL pointer...will not store anything on the DB";
374 <<
"storeOnDbNow(): ERROR - received a direct request from concrete algorithm to store on DB " 375 "a new object, but module configuration is not to store on DB on an algo driven based interval...will not " 376 "store anything on the DB";
T getParameter(std::string const &) const
cond::Time_t beginOfTime() const
virtual void algoBeginJob(const edm::EventSetup &)
Log< level::Error, false > LogError
virtual void algoBeginLuminosityBlock(const edm::LuminosityBlock &, const edm::EventSetup &)
cond::Time_t timeOfLastIOV()
unsigned int maxRunRange_
T getUntrackedParameter(std::string const &, T const &) const
static void fillPSetDescription(edm::ParameterSetDescription &desc)
bool timeFromStartOfRunRange_
unsigned long long Time_t
bool isNewTagRequest(const std::string &recordName)
cond::Time_t currentTime() const
void analyze(const edm::Event &event, const edm::EventSetup &iSetup) override
void endLuminosityBlock(const edm::LuminosityBlock &lumiBlock, const edm::EventSetup &es) override
Hash writeOneIOV(const T &payload, Time_t time, const std::string &recordName)
virtual void algoEndJob()
void storeOnDb(std::unique_ptr< T > &objPointer)
virtual void algoBeginRun(const edm::Run &, const edm::EventSetup &)
virtual std::unique_ptr< T > getNewObject()=0
Log< level::Info, false > LogInfo
void beginLuminosityBlock(const edm::LuminosityBlock &lumiBlock, const edm::EventSetup &iSetup) override
void beginRun(const edm::Run &run, const edm::EventSetup &es) override
ConditionDBWriter(const edm::ParameterSet &iConfig)
static const std::string kSharedResource
void setDoStore(const bool doStore)
When set to false the payload will not be written to the db.
void endRun(const edm::Run &run, const edm::EventSetup &es) override
virtual void algoEndRun(const edm::Run &, const edm::EventSetup &)
~ConditionDBWriter() override
virtual void algoAnalyze(const edm::Event &, const edm::EventSetup &)
virtual void algoEndLuminosityBlock(const edm::LuminosityBlock &, const edm::EventSetup &)
unsigned int minRunRange_