The Gaudi Framework  master (ff829712)
Loading...
Searching...
No Matches
precedence::EntityState Struct Reference

#include </builds/gaudi/Gaudi/GaudiHive/src/PRGraph/PrecedenceRulesGraph.h>

Collaboration diagram for precedence::EntityState:

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 EventSlotm_slot
 
SmartIF< IHiveWhiteBoardm_whiteboard
 
SmartIF< ICondSvcm_condSvc
 
bool m_conditionsEnabled { false }
 

Detailed Description

Definition at line 195 of file PrecedenceRulesGraph.h.

Constructor & Destructor Documentation

◆ EntityState()

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

Definition at line 196 of file PrecedenceRulesGraph.h.

197 : m_slot( slot )
198 , m_whiteboard( svcLocator->service<IHiveWhiteBoard>( "EventDataSvc", false ) )
199 , m_conditionsEnabled( conditionsEnabled ) {
200 SmartIF<IMessageSvc> msgSvc{ svcLocator };
201 MsgStream log{ msgSvc, "EntityState.Getter" };
202
203 // Figure if we can discover the data object states
204 if ( !m_whiteboard.isValid() ) {
205 log << MSG::WARNING << "Failed to locate EventDataSvc: no way to add DO "
206 << "states to the TTT dump " << endmsg;
207 }
208
209 if ( m_conditionsEnabled ) {
210 // Figure if we can discover Condition data object states
211 m_condSvc = svcLocator->service<ICondSvc>( "CondSvc", false );
212 if ( !m_condSvc.isValid() )
213 log << MSG::WARNING << "Failed to locate CondSvc: no way to add Condition DO "
214 << "states to the TTT dump " << endmsg;
215 }
216
217 if ( !m_slot.eventContext->valid() )
218 log << MSG::WARNING << "Event context is invalid: no way to add DO states"
219 << " in the TTT dump" << endmsg;
220 }
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition MsgStream.h:198
virtual SmartIF< IService > & service(const Gaudi::Utils::TypeNameString &typeName, const bool createIf=true)=0
Returns a smart pointer to a service.
GAUDI_API ISvcLocator * svcLocator()
@ WARNING
Definition IMessageSvc.h:22
SmartIF< ICondSvc > m_condSvc
SmartIF< IHiveWhiteBoard > m_whiteboard

Member Function Documentation

◆ operator()() [1/4]

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

Definition at line 223 of file PrecedenceRulesGraph.h.

223 {
224 std::ostringstream oss;
225 oss << m_slot.algsStates[props.m_algoIndex];
226 return oss.str();
227 }

◆ operator()() [2/4]

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

Definition at line 241 of file PrecedenceRulesGraph.h.

241 {
242 std::string state;
243
244 if ( m_condSvc.isValid() && m_slot.eventContext->valid() )
245 state = m_condSvc->isValidID( *( m_slot.eventContext ), props.m_id ) ? "Produced" : "Missing";
246
247 return state;
248 }

◆ operator()() [3/4]

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

Definition at line 231 of file PrecedenceRulesGraph.h.

231 {
232 std::string state;
233
234 if ( m_whiteboard.isValid() && m_slot.eventContext->valid() )
235 if ( m_whiteboard->selectStore( m_slot.eventContext->slot() ).isSuccess() )
236 state = m_whiteboard->exists( props.m_id ) ? "Produced" : "Missing";
237
238 return state;
239 }

◆ operator()() [4/4]

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

Definition at line 229 of file PrecedenceRulesGraph.h.

229{ return ""; }

Member Data Documentation

◆ m_conditionsEnabled

bool precedence::EntityState::m_conditionsEnabled { false }

Definition at line 254 of file PrecedenceRulesGraph.h.

254{ false };

◆ m_condSvc

SmartIF<ICondSvc> precedence::EntityState::m_condSvc

Definition at line 253 of file PrecedenceRulesGraph.h.

◆ m_slot

const EventSlot& precedence::EntityState::m_slot

Definition at line 250 of file PrecedenceRulesGraph.h.

◆ m_whiteboard

SmartIF<IHiveWhiteBoard> precedence::EntityState::m_whiteboard

Definition at line 252 of file PrecedenceRulesGraph.h.


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