6 #include "CoolKernel/IObject.h"
7 #include "CoralBase/Blob.h"
15 #include "CoralBase/AttributeListException.h"
19 EventIDBase infiniteIOVBegin() {
20 return EventIDBase( 0,
21 EventIDBase::UNDEFEVT,
28 EventIDBase infiniteIOVEend() {
30 EventIDBase::UNDEFEVT,
49 return StatusCode::SUCCESS;
60 return StatusCode::SUCCESS;
65 EventIDRange infinite_range(infiniteIOVBegin(),infiniteIOVEend());
70 auto bccd=std::make_unique<BunchCrossingIntensityCondData>();
87 if (attrList.size() == 0 || attrList[
"Valid"].isNull()) {
89 return StatusCode::SUCCESS;
95 if (attrList_fBCT.size() == 0 || attrList_fBCT[
"Valid"].isNull()) {
97 return StatusCode::SUCCESS;
104 ATH_MSG_INFO(
"Got AttributeList with size " << attrList.size());
105 ATH_MSG_INFO(
"Got AttributeList fBCT with size " << attrList_fBCT.size());
110 float nb1 = attrList[
"B1BunchAverage"].data<cool::Float>();
111 float nb2 = attrList[
"B2BunchAverage"].data<cool::Float>();
112 float nb1_fBCT = attrList_fBCT[
"B1BunchAverage"].data<cool::Float>();
113 float nb2_fBCT = attrList_fBCT[
"B2BunchAverage"].data<cool::Float>();
115 unsigned long long RunLB = attrList[
"RunLB"].data<
unsigned long long >();
118 int lb = RunLB & 0xffffffff;
136 bccd->SetBeam1IntensityAll(nb1,0);
137 bccd->SetBeam2IntensityAll(nb2,0);
138 bccd->SetBeam1IntensityAll(nb1_fBCT,1);
139 bccd->SetBeam2IntensityAll(nb2_fBCT,1);
140 bccd->SetRunLB(RunLB);
149 std::vector<float> instBeam1 (nbcids);
150 for (
unsigned int i=0;
i<nbcids;
i++) {
160 std::vector<float> instBeam2 (nbcids);
161 for (
unsigned int i=0;
i<nbcids;
i++) {
167 bccd->setBeam1IntensityPerBCIDVector(std::move(instBeam1),0);
168 bccd->setBeam2IntensityPerBCIDVector(std::move(instBeam2),0);
179 std::vector<float> instBeam1_fBCT (nbcids_fBCT);
180 for (
unsigned int i=0;
i<nbcids_fBCT;
i++) {
190 std::vector<float> instBeam2_fBCT (nbcids_fBCT);
191 for (
unsigned int i=0;
i<nbcids_fBCT;
i++) {
197 bccd->setBeam1IntensityPerBCIDVector(std::move(instBeam1_fBCT),1);
198 bccd->setBeam2IntensityPerBCIDVector(std::move(instBeam2_fBCT),1);
208 return StatusCode::SUCCESS;
223 std::vector< float >
result;
225 const char* cEnd=
c +
pattern.size();