45 : timeThreshold_(
p.getParameter<
int>(
"timeThreshold")),
46 sigmaZThreshold_(
p.getParameter<double>(
"sigmaZThreshold")) {
61 dsc.
add<
int>(
"timeThreshold", 48)->setComment(
"hours");
63 desc.addWithDefaultLabel(dsc);
74 auto diffBStime1 = (currentTime - bs1time).
count();
76 auto diffBStime2 = (currentTime - bs2time).
count();
87 if (diffBStime1 > limitTime && diffBStime2 > limitTime) {
88 edm::LogInfo(
"OnlineBeamSpotESProducer") <<
"Defaulting to fake becuase both payloads are too old.";
90 }
else if (diffBStime2 > limitTime) {
95 <<
"Defaulting to fake because the legacy Beam Spot is not suitable and HLT one is too old.";
98 }
else if (diffBStime1 > limitTime) {
103 <<
"Defaulting to fake because the HLT Beam Spot is not suitable and the legacy one too old.";
113 <<
"Defaulting to fake because despite both payloads are young enough, none has the right BeamType.";
126 auto diffBStime1 = (currentTime - bs1time).
count();
142 if (not legacyRec and not hltRec) {
143 edm::LogInfo(
"OnlineBeamSpotESProducer") <<
"None of the Beam Spots in ES are available! \n returning a fake one.";
148 if (legacyRec and hltRec) {
150 }
else if (legacyRec) {
160 <<
"None of the Online BeamSpots in the ES is suitable, \n returning a fake one. ";