ATLAS Offline Software
Public Types | Public Member Functions | List of all members
IROBDataProviderSvc Class Referenceabstract

Interface class for managing ROB for both online and offline. More...

#include <IROBDataProviderSvc.h>

Inheritance diagram for IROBDataProviderSvc:
Collaboration diagram for IROBDataProviderSvc:

Public Types

typedef OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment ROBF
 
typedef std::vector< const ROBF * > VROBFRAG
 

Public Member Functions

 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 RawEventgetEvent ()=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 RawEventgetEvent (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...
 

Detailed Description

Interface class for managing ROB for both online and offline.

Definition at line 25 of file IROBDataProviderSvc.h.

Member Typedef Documentation

◆ ROBF

Definition at line 28 of file IROBDataProviderSvc.h.

◆ VROBFRAG

typedef std::vector<const ROBF*> IROBDataProviderSvc::VROBFRAG

Definition at line 29 of file IROBDataProviderSvc.h.

Member Function Documentation

◆ 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.

63  {
64  throw std::runtime_error( std::string(callerName)+ std::string(" is using unimplemented ") + __FUNCTION__ ) ;
65  }

◆ 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.

107  {
108  throw std::runtime_error(std::string(callerName) + std::string(" is using unimplemented ") + __FUNCTION__ );
109  return 0;
110  }

◆ DeclareInterfaceID()

IROBDataProviderSvc::DeclareInterfaceID ( IROBDataProviderSvc  ,
,
 
)

Retrieve interface ID.

◆ getEvent() [1/2]

virtual const RawEvent* IROBDataProviderSvc::getEvent ( )
pure virtual

Retrieve the whole event.

◆ getEvent() [2/2]

virtual const RawEvent* IROBDataProviderSvc::getEvent ( const EventContext &  )
inlinevirtual

Definition at line 76 of file IROBDataProviderSvc.h.

76  {
77  throw std::runtime_error(std::string("Unimplemented ") + __FUNCTION__ );
78  }

◆ 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.

82  {
83  throw std::runtime_error(std::string("Unimplemented ") + __FUNCTION__ );
84  return 0;
85  }

◆ 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.

73  {
74  throw std::runtime_error( std::string(callerName)+ std::string(" is using unimplemented ") + __FUNCTION__ ) ;
75  }

◆ 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.

100  {
101  throw std::runtime_error(std::string("Unimplemented ") + __FUNCTION__ );
102  }

◆ 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.

95  {
96  throw std::runtime_error(std::string("Unimplemented ") + __FUNCTION__ );
97  }

◆ setEventStatus() [1/2]

virtual void IROBDataProviderSvc::setEventStatus ( const EventContext &  ,
uint32_t   
)
inlinevirtual

Definition at line 79 of file IROBDataProviderSvc.h.

79  {
80  throw std::runtime_error(std::string("Unimplemented ") + __FUNCTION__ );
81  }

◆ 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.

69  {
70  throw std::runtime_error(std::string("Unimplemented ") + __FUNCTION__ );
71  }

◆ setNextEvent() [2/4]

virtual void IROBDataProviderSvc::setNextEvent ( const EventContext &  ,
const std::vector< ROBF > &   
)
inlinevirtual

Definition at line 66 of file IROBDataProviderSvc.h.

66  {
67  throw std::runtime_error( std::string("Unimplemented ") + __FUNCTION__ );
68  }

◆ 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: