14 #include "CoolKernel/IObject.h"
26 return StatusCode::SUCCESS;
39 EventIDRange
range (EventIDBase (0, UNDEFEVT, UNDEFNUM, 0, 0),
40 EventIDBase (UNDEFNUM-1, UNDEFEVT, UNDEFNUM, 0, 0));
42 unsigned int turnCounter = 0;
45 float lumiLiveFractionLo = 1;
46 float lumiLiveFractionHi = 1;
68 lumiLiveFractionHi) );
71 auto livefrac = std::make_unique<TrigLiveFractionCondData>
73 std::move (liveFractionLo),
74 std::move (liveFractionHi),
80 return StatusCode::SUCCESS;
95 unsigned int& turnCounter,
96 std::vector<float>& liveFractionLo,
97 std::vector<float>& liveFractionHi)
const
99 if (deadtimeFolder[
"TurnCounter"].isNull()) {
101 return StatusCode::SUCCESS;
104 turnCounter = deadtimeFolder[
"TurnCounter"].data<
uint32_t>();
110 if (deadtimeFolder[
"LowPriority"].isNull() || deadtimeFolder[
"HighPriority"].isNull()) {
111 ATH_MSG_WARNING(
" NULL veto counter information in database ... set livefraction to 1 " );
112 return StatusCode::SUCCESS;
124 for (
unsigned int i = 0;
i < liveFractionHi.size();
i++) {
130 return StatusCode::SUCCESS;
143 unsigned int turnCounter,
144 std::vector<float>& livevec)
const
146 if (turnCounter == 0) {
147 return StatusCode::SUCCESS;
155 return StatusCode::SUCCESS;
164 unsigned int busyCounter = *
p | (*(
p+1) << 8) | (*(
p+2) << 16);
165 livevec[
i] = (turnCounter - busyCounter) /
static_cast<float>(turnCounter);
168 return StatusCode::SUCCESS;
182 const std::vector<float>& liveFractionLo,
183 const std::vector<float>& liveFractionHi,
184 float& lumiLiveFractionLo,
185 float& lumiLiveFractionHi)
187 double numsumlo = 0.;
188 double numsumhi = 0.;
195 float bcidlum =
lumi.lbLuminosityPerBCIDVector().at(
bcid);
196 numsumlo += bcidlum * liveFractionLo.at(
bcid);
197 numsumhi += bcidlum * liveFractionHi.at(
bcid);
202 lumiLiveFractionLo = numsumlo/densum;
203 lumiLiveFractionHi = numsumhi/densum;
206 lumiLiveFractionLo = 1;
207 lumiLiveFractionHi = 1;
210 return StatusCode::SUCCESS;