10 : m_debug(pset.getUntrackedParameter<bool>(
"debug",
false)),
11 m_name(pset.getUntrackedParameter<std::
string>(
"name",
"BeamSpotOnlineSourceHandler")),
12 m_maxAge(pset.getUntrackedParameter<unsigned int>(
"maxAge", 86400)),
13 m_runNumber(pset.getUntrackedParameter<unsigned int>(
"runNumber", 1)),
14 m_sourcePayloadTag(pset.getUntrackedParameter<std::
string>(
"sourcePayloadTag",
"")) {}
22 long age = nowSinceEpoch - creationTimeInSeconds;
28 std::unique_ptr<BeamSpotOnlineObjects>
ret;
29 ret = std::make_unique<BeamSpotOnlineObjects>();
32 ret->SetCreationTime(nowSinceEpoch << 32);
37 bool addNewPayload =
false;
53 session.transaction().start(
true);
66 edm::LogInfo(
m_name) <<
"Nothing to do, last payload satisfies maximum age requirement.";
BeamSpotOnlinePopConSourceHandler(const edm::ParameterSet &pset)
cond::persistency::Session & dbSession() const
tuple ret
prodAgent to be discontinued
std::string m_sourcePayloadTag
cond::Time_t GetCreationTime() const
std::string id() const override
bool checkPayloadAge(const BeamSpotOnlineObjects &payload, unsigned int maxAge)
unsigned long long Time_t
Time_t lumiTime(unsigned int run, unsigned int lumiId)
std::vector< std::pair< BeamSpotOnlineObjects *, Time_t > > m_to_transfer
std::unique_ptr< BeamSpotOnlineObjects > m_payload
Log< level::Info, false > LogInfo
std::unique_ptr< BeamSpotOnlineObjects > makeDummyPayload()
~BeamSpotOnlinePopConSourceHandler() override
tuple size
Write out results.
void getNewObjects() override
cond::TagInfo_t const & tagInfo() const