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",
"")) {}
19 long creationTimeInSeconds =
payload.creationTime() >> 32;
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)
std::string m_sourcePayloadTag
ret
prodAgent to be discontinued
std::string id() const override
bool checkPayloadAge(const BeamSpotOnlineObjects &payload, unsigned int maxAge)
cond::TagInfo_t const & tagInfo() const
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()
cond::persistency::Session & dbSession() const
~BeamSpotOnlinePopConSourceHandler() override
void getNewObjects() override