Skip to content

Commit 258478f

Browse files
committed
moved populating run number from getLumiData to getCTPSData
1 parent ad0825f commit 258478f

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

CondTools/RunInfo/src/LHCInfoPerLSPopConSourceHandler.cc

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,6 @@ void LHCInfoPerLSPopConSourceHandler::addPayloadToBuffer(cond::OMSServiceResultR
8888
auto lumiTime = row.get<boost::posix_time::ptime>("start_time");
8989
LHCInfoPerLS* thisLumiSectionInfo = new LHCInfoPerLS(*m_fillPayload);
9090
m_tmpBuffer.emplace_back(std::make_pair(cond::time::from_boost(lumiTime), thisLumiSectionInfo));
91-
92-
thisLumiSectionInfo->setRunNumber(row.get<cond::Time_t>("run_number"));
9391
}
9492

9593
size_t LHCInfoPerLSPopConSourceHandler::bufferAllLS(const cond::OMSServiceResult& queryResult)
@@ -218,6 +216,7 @@ bool LHCInfoPerLSPopConSourceHandler::getCTTPSData(cond::persistency::Session& s
218216
//SELECT clause
219217
CTPPSDataQuery->addToOutputList(std::string("DIP_UPDATE_TIME"));
220218
CTPPSDataQuery->addToOutputList(std::string("LUMI_SECTION"));
219+
CTPPSDataQuery->addToOutputList(std::string("RUN_NUMBER"));
221220
CTPPSDataQuery->addToOutputList(std::string("XING_ANGLE_P5_X_URAD"));
222221
CTPPSDataQuery->addToOutputList(std::string("XING_ANGLE_P5_Y_URAD"));
223222
CTPPSDataQuery->addToOutputList(std::string("BETA_STAR_P5_X_M"));
@@ -236,6 +235,7 @@ bool LHCInfoPerLSPopConSourceHandler::getCTTPSData(cond::persistency::Session& s
236235
coral::AttributeList CTPPSDataOutput;
237236
CTPPSDataOutput.extend<coral::TimeStamp>(std::string("DIP_UPDATE_TIME"));
238237
CTPPSDataOutput.extend<int>(std::string("LUMI_SECTION"));
238+
CTPPSDataOutput.extend<int>(std::string("RUN_NUMBER"));
239239
CTPPSDataOutput.extend<float>(std::string("XING_ANGLE_P5_X_URAD"));
240240
CTPPSDataOutput.extend<float>(std::string("XING_ANGLE_P5_Y_URAD"));
241241
CTPPSDataOutput.extend<float>(std::string("BETA_STAR_P5_X_M"));
@@ -245,6 +245,7 @@ bool LHCInfoPerLSPopConSourceHandler::getCTTPSData(cond::persistency::Session& s
245245
coral::ICursor& CTPPSDataCursor = CTPPSDataQuery->execute();
246246
cond::Time_t dipTime = 0;
247247
unsigned int lumiSection = 0;
248+
cond::Time_t runNumber = 0;
248249
float crossingAngleX = 0., betaStarX = 0.;
249250
float crossingAngleY = 0., betaStarY = 0.;
250251

@@ -264,6 +265,10 @@ bool LHCInfoPerLSPopConSourceHandler::getCTTPSData(cond::persistency::Session& s
264265
if (!lumiSectionAttribute.isNull()) {
265266
lumiSection = lumiSectionAttribute.data<int>();
266267
}
268+
coral::Attribute const& runNumberAttribute = CTPPSDataCursor.currentRow()[std::string("RUN_NUMBER")];
269+
if (!runNumberAttribute.isNull()) {
270+
runNumber = runNumberAttribute.data<int>();
271+
}
267272
coral::Attribute const& crossingAngleXAttribute =
268273
CTPPSDataCursor.currentRow()[std::string("XING_ANGLE_P5_X_URAD")];
269274
if (!crossingAngleXAttribute.isNull()) {
@@ -290,6 +295,7 @@ bool LHCInfoPerLSPopConSourceHandler::getCTTPSData(cond::persistency::Session& s
290295
payload.setBetaStarX(betaStarX);
291296
payload.setBetaStarY(betaStarY);
292297
payload.setLumiSection(lumiSection);
298+
payload.setRunNumber(runNumber);
293299
}
294300
}
295301
}

0 commit comments

Comments
 (0)