61 auto& dbService = cool::DatabaseSvcFactory::databaseService();
63 uint64_t runStartTime = 0xFFffFFffFFffFFff;
65 std::map<uint64_t, uint32_t>
lbs;
67 auto databaseName = std::string(
"COOLONL_TRIGGER/CONDBR2" );
68 auto folderName = std::string(
"/TRIGGER/LUMI/LBLB" );
69 auto databasePtr = dbService.openDatabase( databaseName,
true );
70 auto folderPtr = databasePtr->getFolder(
folderName );
72 auto since = cool::ValidityKey( run64 << 32 );
73 auto until = cool::ValidityKey( ( run64 + 1 ) << 32 );
75 while ( iterPtr->goToNext() ) {
76 auto&
object = iterPtr->currentRef();
77 auto lbStartTime = getStartTime(
object );
78 auto lbEndTime = getEndTime(
object );
79 lbs.emplace( lbStartTime, getLB(
object ) );
80 if ( lbStartTime < runStartTime ) runStartTime = lbStartTime;
81 if ( lbEndTime > runEndTime ) runEndTime = lbEndTime;
83 if (
lbs.empty() )
throw afp::CantReadCool( ERS_HERE, databaseName,
folderName );
89 auto databaseName = std::string(
"COOLOFL_DCS/CONDBR2" );
90 auto folderName = std::string(
"/AFP/DCS/STATION" );
91 auto databasePtr = dbService.openDatabase( databaseName,
true );
92 auto folderPtr = databasePtr->getFolder(
folderName );
93 auto iterPtr = folderPtr->browseObjects( runStartTime, runEndTime, cool::ChannelSelection(
channel ) );
95 iovs.reserve( iterPtr->size() / 2 );
96 while ( iterPtr->goToNext() ) {
97 auto&
object = iterPtr->currentRef();
98 auto inphysics =
object.payload()[
"inphysics" ].data<cool::Bool>();
101 until =
object.until();
102 }
else if (
since != 0 ) {
111 if (
iovs.empty() ) {
112 iovs.emplace_back( 0
u, 0
u );