Skip to content

Commit b943403

Browse files
authored
Merge pull request #45565 from francescobrivio/alca-fix_BSESProducer_LogWarning
Add LogWarning in OnlineBeamSpotESProducer::checkSingleBS
2 parents 05fe54b + 4905ad3 commit b943403

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

RecoVertex/BeamSpotProducer/plugins/BeamSpotOnlineProducer.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ void BeamSpotOnlineProducer::produce(Event& iEvent, const EventSetup& iSetup) {
105105
auto const& spotDB = iSetup.getData(beamTransientToken_);
106106
if (spotDB.beamType() != 2) {
107107
if (shoutMODE && beamTransientRcdESWatcher_.check(iSetup)) {
108-
edm::LogWarning("BeamSpotFromDB")
108+
edm::LogWarning("BeamSpotOnlineProducer")
109109
<< "Online Beam Spot producer falls back to DB value because the ESProducer returned a fake beamspot ";
110110
}
111111
fallBackToDB = true;
@@ -181,15 +181,15 @@ void BeamSpotOnlineProducer::produce(Event& iEvent, const EventSetup& iSetup) {
181181
if (spotOnline.x() == 0 && spotOnline.y() == 0 && spotOnline.z() == 0 && spotOnline.width_x() == 0 &&
182182
spotOnline.width_y() == 0) {
183183
if (shoutMODE) {
184-
edm::LogWarning("BeamSpotFromDB")
184+
edm::LogWarning("BeamSpotOnlineProducer")
185185
<< "Online Beam Spot producer falls back to DB value because the scaler values are zero ";
186186
}
187187
fallBackToDB = true;
188188
}
189189
double r2 = spotOnline.x() * spotOnline.x() + spotOnline.y() * spotOnline.y();
190190
if (std::abs(spotOnline.z()) >= theMaxZ || r2 >= theMaxR2) {
191191
if (shoutMODE) {
192-
edm::LogError("BeamSpotFromDB")
192+
edm::LogError("BeamSpotOnlineProducer")
193193
<< "Online Beam Spot producer falls back to DB value because the scaler values are too big to be true :"
194194
<< spotOnline.x() << " " << spotOnline.y() << " " << spotOnline.z();
195195
}

RecoVertex/BeamSpotProducer/plugins/OnlineBeamSpotESProducer.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,8 @@ const BeamSpotOnlineObjects* OnlineBeamSpotESProducer::checkSingleBS(const BeamS
145145
if (diffBStime1 < limitTime && isGoodBS(bs1)) {
146146
return bs1;
147147
} else {
148+
edm::LogWarning("OnlineBeamSpotESProducer") << "Defaulting to fake (fallback to PCL) because the only payload "
149+
"is either too old or does not pass the fit sanity checks";
148150
return nullptr;
149151
}
150152
}
@@ -179,7 +181,7 @@ std::shared_ptr<const BeamSpotObjects> OnlineBeamSpotESProducer::produce(const B
179181
return std::shared_ptr<const BeamSpotObjects>(best, edm::do_nothing_deleter());
180182
}
181183
edm::LogWarning("OnlineBeamSpotESProducer")
182-
<< "None of the Online BeamSpots in the ES is suitable, \n returning a fake one(fallback to PCL).";
184+
<< "None of the Online BeamSpots in the ES is suitable, \n returning a fake one (fallback to PCL).";
183185
return std::shared_ptr<const BeamSpotObjects>(&fakeBS_, edm::do_nothing_deleter());
184186
}
185187

0 commit comments

Comments
 (0)