| The Gaudi Framework v32r1 (f65d50dc)

Public Member Functions | Public Attributes | List of all members
precedence::EntityState Struct Reference

`#include <src/PRGraph/PrecedenceRulesGraph.h>`

Collaboration diagram for precedence::EntityState:
[legend]

## Public Member Functions
| EntityState (const EventSlot &slot, SmartIF< ISvcLocator > &svcLocator, bool conditionsEnabled)
std::string | operator() (const AlgoProps &props) const
std::string | operator() (const DecisionHubProps &) const
std::string | operator() (const DataProps &props) const
std::string | operator() (const CondDataProps &props) const

## Public Attributes
const EventSlot & | m_slot
SmartIF< IHiveWhiteBoard > | m_whiteboard
SmartIF< ICondSvc > | m_condSvc
bool | m_conditionsEnabled {false}

## Detailed Description

Definition at line 188 of file PrecedenceRulesGraph.h.

## Constructor & Destructor Documentation

## ◆ EntityState()

precedence::EntityState::EntityState | ( | const EventSlot & | slot,
|  | SmartIF< ISvcLocator > & | svcLocator,
|  | bool | conditionsEnabled
| ) |  |
| inline

Definition at line 189 of file PrecedenceRulesGraph.h.

190 : m_slot( slot ), m_conditionsEnabled( conditionsEnabled ) {
191 SmartIF<IMessageSvc> msgSvc{svcLocator};
192 MsgStream log{msgSvc, "EntityState.Getter"};
193
194 // Figure if we can discover the data object states
195 m_whiteboard = svcLocator->service<IHiveWhiteBoard>( "EventDataSvc", false );
196 if ( !m_whiteboard.isValid() ) {
197 log << MSG::WARNING << "Failed to locate EventDataSvc: no way to add DO "
198 << "states to the TTT dump " << endmsg;
199 }
200
201 if ( m_conditionsEnabled ) {
202 // Figure if we can discover Condition data object states
203 m_condSvc = svcLocator->service<ICondSvc>( "CondSvc", false );
204 if ( !m_condSvc.isValid() )
205 log << MSG::WARNING << "Failed to locate CondSvc: no way to add Condition DO "
206 << "states to the TTT dump " << endmsg;
207 }
208
209 if ( !m_slot.eventContext->valid() )
210 log << MSG::WARNING << "Event context is invalid: no way to add DO states"
211 << " in the TTT dump" << endmsg;
212 }
MsgStream
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:24
SmartIF< IMessageSvc >
SmartIF::isValid
bool isValid() const
Allow for check if smart pointer is valid.
Definition: SmartIF.h:62
EventContext::valid
bool valid() const
Definition: EventContext.h:44
AvalancheSchedulerErrorTest.msgSvc
msgSvc
Definition: AvalancheSchedulerErrorTest.py:67
ISvcLocator::service
StatusCode service(const Gaudi::Utils::TypeNameString &name, T *&svc, bool createIf=true)
Templated method to access a service by name.
Definition: ISvcLocator.h:76
precedence::EntityState::m_slot
const EventSlot & m_slot
Definition: PrecedenceRulesGraph.h:242
Gaudi::svcLocator
GAUDI_API ISvcLocator * svcLocator()
precedence::EntityState::m_condSvc
SmartIF< ICondSvc > m_condSvc
Definition: PrecedenceRulesGraph.h:245
ICondSvc
Interface for the Condition Service.
Definition: ICondSvc.h:28
IHiveWhiteBoard
Definition: IHiveWhiteBoard.h:17
precedence::EntityState::m_conditionsEnabled
bool m_conditionsEnabled
Definition: PrecedenceRulesGraph.h:246
precedence::EntityState::m_whiteboard
SmartIF< IHiveWhiteBoard > m_whiteboard
Definition: PrecedenceRulesGraph.h:244
MSG::WARNING
Definition: IMessageSvc.h:15
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:192
EventSlot::eventContext
std::unique_ptr< EventContext > eventContext
Cache for the eventContext.
Definition: EventSlot.h:73
Gaudi.Configuration.log
log
Definition: Configuration.py:13

## Member Function Documentation

## ◆ operator()() [1/4]

std::string precedence::EntityState::operator() | ( | const AlgoProps & | props | ) | const
| inline

Definition at line 215 of file PrecedenceRulesGraph.h.

215 {
216 std::ostringstream oss;
217 oss << m_slot.algsStates[props.m_algoIndex];
218 return oss.str();
219 }
precedence::EntityState::m_slot
const EventSlot & m_slot
Definition: PrecedenceRulesGraph.h:242
std::ostringstream
STL class.
std::ostringstream::str
T str(T... args)
EventSlot::algsStates
AlgsExecutionStates algsStates
Vector of algorithms states.
Definition: EventSlot.h:75

## ◆ operator()() [2/4]

std::string precedence::EntityState::operator() | ( | const DecisionHubProps & |  | ) | const
| inline

Definition at line 221 of file PrecedenceRulesGraph.h.

221 { return ""; }

## ◆ operator()() [3/4]

std::string precedence::EntityState::operator() | ( | const DataProps & | props | ) | const
| inline

Definition at line 223 of file PrecedenceRulesGraph.h.

223 {
224 std::string state;
225
226 if ( m_whiteboard.isValid() && m_slot.eventContext->valid() )
227 if ( m_whiteboard->selectStore( m_slot.eventContext->slot() ).isSuccess() )
228 state = m_whiteboard->exists( props.m_id ) ? "Produced" : "Missing";
229
230 return state;
231 }
EventContext::slot
ContextID_t slot() const
Definition: EventContext.h:41
SmartIF::isValid
bool isValid() const
Allow for check if smart pointer is valid.
Definition: SmartIF.h:62
IHiveWhiteBoard::exists
virtual bool exists(const DataObjID &)=0
Check if a data object exists in store.
EventContext::valid
bool valid() const
Definition: EventContext.h:44
std::string
STL class.
IHiveWhiteBoard::selectStore
virtual StatusCode selectStore(size_t partitionIndex)=0
Activate an given 'slot' for all subsequent calls within the same thread id.
precedence::EntityState::m_slot
const EventSlot & m_slot
Definition: PrecedenceRulesGraph.h:242
compareRootHistos.state
def state
Definition: compareRootHistos.py:455
precedence::EntityState::m_whiteboard
SmartIF< IHiveWhiteBoard > m_whiteboard
Definition: PrecedenceRulesGraph.h:244
EventSlot::eventContext
std::unique_ptr< EventContext > eventContext
Cache for the eventContext.
Definition: EventSlot.h:73

## ◆ operator()() [4/4]

std::string precedence::EntityState::operator() | ( | const CondDataProps & | props | ) | const
| inline

Definition at line 233 of file PrecedenceRulesGraph.h.

233 {
234 std::string state;
235
236 if ( m_condSvc.isValid() && m_slot.eventContext->valid() )
237 state = m_condSvc->isValidID( *( m_slot.eventContext ), props.m_id ) ? "Produced" : "Missing";
238
239 return state;
240 }
SmartIF::isValid
bool isValid() const
Allow for check if smart pointer is valid.
Definition: SmartIF.h:62
EventContext::valid
bool valid() const
Definition: EventContext.h:44
std::string
STL class.
precedence::EntityState::m_slot
const EventSlot & m_slot
Definition: PrecedenceRulesGraph.h:242
precedence::EntityState::m_condSvc
SmartIF< ICondSvc > m_condSvc
Definition: PrecedenceRulesGraph.h:245
ICondSvc::isValidID
virtual bool isValidID(const EventContext &ctx, const DataObjID &id) const =0
check to see if a specific condition object ID is valid for this event
compareRootHistos.state
def state
Definition: compareRootHistos.py:455
EventSlot::eventContext
std::unique_ptr< EventContext > eventContext
Cache for the eventContext.
Definition: EventSlot.h:73

## Member Data Documentation

## ◆ m_conditionsEnabled

bool precedence::EntityState::m_conditionsEnabled {false}

Definition at line 246 of file PrecedenceRulesGraph.h.

## ◆ m_condSvc

SmartIF<ICondSvc> precedence::EntityState::m_condSvc

Definition at line 245 of file PrecedenceRulesGraph.h.

## ◆ m_slot

const EventSlot& precedence::EntityState::m_slot

Definition at line 242 of file PrecedenceRulesGraph.h.

## ◆ m_whiteboard

SmartIF<IHiveWhiteBoard> precedence::EntityState::m_whiteboard

Definition at line 244 of file PrecedenceRulesGraph.h.

The documentation for this struct was generated from the following file:

- GaudiHive/src/PRGraph/PrecedenceRulesGraph.h