Interface class for managing ROB for both online and offline.
More...
#include <IROBDataProviderSvc.h>
|
| DeclareInterfaceID (IROBDataProviderSvc, 1, 1) |
| Retrieve interface ID. More...
|
|
virtual void | addROBData (const std::vector< uint32_t > &robIds, const std::string_view callerName="UNKNOWN")=0 |
| Add ROBFragments to cache for given ROB ids, ROB fragments may be retrieved with DataCollector. More...
|
|
virtual void | setNextEvent (const std::vector< ROBF > &result)=0 |
| Add a given LVL1/LVL2 ROBFragment to cache. More...
|
|
virtual void | setNextEvent (const RawEvent *re)=0 |
| Add all ROBFragments of a RawEvent to cache. More...
|
|
virtual void | getROBData (const std::vector< uint32_t > &robIds, VROBFRAG &robFragments, const std::string_view callerName="UNKNOWN")=0 |
| Retrieve ROBFragments for given ROB ids from cache. More...
|
|
virtual const RawEvent * | getEvent ()=0 |
| Retrieve the whole event. More...
|
|
virtual void | setEventStatus (uint32_t status)=0 |
| Store the status for the event. More...
|
|
virtual uint32_t | getEventStatus ()=0 |
| Retrieve the status for the event. More...
|
|
virtual void | addROBData (const EventContext &, const std::vector< uint32_t > &, const std::string_view callerName="UNKNOWN") |
|
virtual void | setNextEvent (const EventContext &, const std::vector< ROBF > &) |
|
virtual void | setNextEvent (const EventContext &, const RawEvent *) |
|
virtual void | getROBData (const EventContext &, const std::vector< uint32_t > &, VROBFRAG &, const std::string_view callerName="UNKNOWN") |
|
virtual const RawEvent * | getEvent (const EventContext &) |
|
virtual void | setEventStatus (const EventContext &, uint32_t) |
|
virtual uint32_t | getEventStatus (const EventContext &) |
|
virtual void | processCachedROBs (const EventContext &, const std::function< void(const ROBF *)> &) const |
| Interface to access cache of ROBs (it is a full event in case of offline) In online implementation the cache will contain only a subset of ROBs. More...
|
|
virtual bool | isEventComplete (const EventContext &) const |
| Check if complete event data are already in cache. More...
|
|
virtual int | collectCompleteEventData (const EventContext &, const std::string_view callerName="UNKNOWN") |
| Collect all data for an event from the ROS and put them into the cache. More...
|
|
Interface class for managing ROB for both online and offline.
Definition at line 25 of file IROBDataProviderSvc.h.
◆ ROBF
◆ VROBFRAG
◆ addROBData() [1/2]
virtual void IROBDataProviderSvc::addROBData |
( |
const EventContext & |
, |
|
|
const std::vector< uint32_t > & |
, |
|
|
const std::string_view |
callerName = "UNKNOWN" |
|
) |
| |
|
inlinevirtual |
Definition at line 63 of file IROBDataProviderSvc.h.
64 throw std::runtime_error( std::string(callerName)+ std::string(
" is using unimplemented ") + __FUNCTION__ ) ;
◆ addROBData() [2/2]
virtual void IROBDataProviderSvc::addROBData |
( |
const std::vector< uint32_t > & |
robIds, |
|
|
const std::string_view |
callerName = "UNKNOWN" |
|
) |
| |
|
pure virtual |
Add ROBFragments to cache for given ROB ids, ROB fragments may be retrieved with DataCollector.
◆ collectCompleteEventData()
virtual int IROBDataProviderSvc::collectCompleteEventData |
( |
const EventContext & |
, |
|
|
const std::string_view |
callerName = "UNKNOWN" |
|
) |
| |
|
inlinevirtual |
Collect all data for an event from the ROS and put them into the cache.
- Returns
- value: number of ROBs which were retrieved to complete the event Optionally the name of the caller of this method can be specified for monitoring
Definition at line 107 of file IROBDataProviderSvc.h.
108 throw std::runtime_error(std::string(callerName) + std::string(
" is using unimplemented ") + __FUNCTION__ );
◆ DeclareInterfaceID()
◆ getEvent() [1/2]
Retrieve the whole event.
◆ getEvent() [2/2]
Definition at line 76 of file IROBDataProviderSvc.h.
77 throw std::runtime_error(std::string(
"Unimplemented ") + __FUNCTION__ );
◆ getEventStatus() [1/2]
virtual uint32_t IROBDataProviderSvc::getEventStatus |
( |
| ) |
|
|
pure virtual |
Retrieve the status for the event.
◆ getEventStatus() [2/2]
virtual uint32_t IROBDataProviderSvc::getEventStatus |
( |
const EventContext & |
| ) |
|
|
inlinevirtual |
Definition at line 82 of file IROBDataProviderSvc.h.
83 throw std::runtime_error(std::string(
"Unimplemented ") + __FUNCTION__ );
◆ getROBData() [1/2]
virtual void IROBDataProviderSvc::getROBData |
( |
const EventContext & |
, |
|
|
const std::vector< uint32_t > & |
, |
|
|
VROBFRAG & |
, |
|
|
const std::string_view |
callerName = "UNKNOWN" |
|
) |
| |
|
inlinevirtual |
Definition at line 72 of file IROBDataProviderSvc.h.
74 throw std::runtime_error( std::string(callerName)+ std::string(
" is using unimplemented ") + __FUNCTION__ ) ;
◆ getROBData() [2/2]
virtual void IROBDataProviderSvc::getROBData |
( |
const std::vector< uint32_t > & |
robIds, |
|
|
VROBFRAG & |
robFragments, |
|
|
const std::string_view |
callerName = "UNKNOWN" |
|
) |
| |
|
pure virtual |
Retrieve ROBFragments for given ROB ids from cache.
◆ isEventComplete()
virtual bool IROBDataProviderSvc::isEventComplete |
( |
const EventContext & |
| ) |
const |
|
inlinevirtual |
Check if complete event data are already in cache.
Definition at line 100 of file IROBDataProviderSvc.h.
101 throw std::runtime_error(std::string(
"Unimplemented ") + __FUNCTION__ );
◆ processCachedROBs()
virtual void IROBDataProviderSvc::processCachedROBs |
( |
const EventContext & |
, |
|
|
const std::function< void(const ROBF *)> & |
|
|
) |
| const |
|
inlinevirtual |
Interface to access cache of ROBs (it is a full event in case of offline) In online implementation the cache will contain only a subset of ROBs.
This method allows read access to the cache.
- Warning
- in case the cache is updated in the meantime the iteration is guaranteed to be safe but may not give access to all the ROBs available n the very moment Example of counting: size_t counter = 0; svc->processCahcedROBs(ctx, [&](const ROBF*){ counter ++; }) Example of printout: svc->processCahcedROBs(ctx, [&](const ROBF* rob){ log() << MSG::DEBUG << "ROB " << rob->source_id() << endmsg; })
Definition at line 94 of file IROBDataProviderSvc.h.
96 throw std::runtime_error(std::string(
"Unimplemented ") + __FUNCTION__ );
◆ setEventStatus() [1/2]
virtual void IROBDataProviderSvc::setEventStatus |
( |
const EventContext & |
, |
|
|
uint32_t |
|
|
) |
| |
|
inlinevirtual |
Definition at line 79 of file IROBDataProviderSvc.h.
80 throw std::runtime_error(std::string(
"Unimplemented ") + __FUNCTION__ );
◆ setEventStatus() [2/2]
virtual void IROBDataProviderSvc::setEventStatus |
( |
uint32_t |
status | ) |
|
|
pure virtual |
Store the status for the event.
◆ setNextEvent() [1/4]
virtual void IROBDataProviderSvc::setNextEvent |
( |
const EventContext & |
, |
|
|
const RawEvent * |
|
|
) |
| |
|
inlinevirtual |
Definition at line 69 of file IROBDataProviderSvc.h.
70 throw std::runtime_error(std::string(
"Unimplemented ") + __FUNCTION__ );
◆ setNextEvent() [2/4]
virtual void IROBDataProviderSvc::setNextEvent |
( |
const EventContext & |
, |
|
|
const std::vector< ROBF > & |
|
|
) |
| |
|
inlinevirtual |
Definition at line 66 of file IROBDataProviderSvc.h.
67 throw std::runtime_error( std::string(
"Unimplemented ") + __FUNCTION__ );
◆ setNextEvent() [3/4]
virtual void IROBDataProviderSvc::setNextEvent |
( |
const RawEvent * |
re | ) |
|
|
pure virtual |
Add all ROBFragments of a RawEvent to cache.
◆ setNextEvent() [4/4]
virtual void IROBDataProviderSvc::setNextEvent |
( |
const std::vector< ROBF > & |
result | ) |
|
|
pure virtual |
Add a given LVL1/LVL2 ROBFragment to cache.
The documentation for this class was generated from the following file: