Loading [MathJax]/extensions/tex2jax.js
The Gaudi Framework  master (e199b415)
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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 196 of file PrecedenceRulesGraph.h.

Constructor & Destructor Documentation

◆ EntityState()

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

Definition at line 197 of file PrecedenceRulesGraph.h.

198  : m_slot( slot ), m_conditionsEnabled( conditionsEnabled ) {
200  MsgStream log{ msgSvc, "EntityState.Getter" };
201 
202  // Figure if we can discover the data object states
203  m_whiteboard = svcLocator->service<IHiveWhiteBoard>( "EventDataSvc", false );
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  }

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  {
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  {
233 
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.

◆ 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:
EventSlot::eventContext
std::unique_ptr< EventContext > eventContext
Cache for the eventContext.
Definition: EventSlot.h:83
EventContext::valid
bool valid() const
Definition: EventContext.h:54
precedence::EntityState::m_condSvc
SmartIF< ICondSvc > m_condSvc
Definition: PrecedenceRulesGraph.h:253
std::string
STL class.
Gaudi.Configuration.log
log
Definition: Configuration.py:28
precedence::EntityState::m_conditionsEnabled
bool m_conditionsEnabled
Definition: PrecedenceRulesGraph.h:254
check_ParticleID.props
props
Definition: check_ParticleID.py:21
MSG::WARNING
@ WARNING
Definition: IMessageSvc.h:25
IHiveWhiteBoard
Definition: IHiveWhiteBoard.h:27
precedence::EntityState::m_whiteboard
SmartIF< IHiveWhiteBoard > m_whiteboard
Definition: PrecedenceRulesGraph.h:252
AvalancheSchedulerErrorTest.msgSvc
msgSvc
Definition: AvalancheSchedulerErrorTest.py:80
Gaudi::svcLocator
GAUDI_API ISvcLocator * svcLocator()
SmartIF::isValid
bool isValid() const
Allow for check if smart pointer is valid.
Definition: SmartIF.h:72
ICondSvc
Definition: ICondSvc.h:39
EventContext::slot
ContextID_t slot() const
Definition: EventContext.h:51
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:98
SmartIF< IMessageSvc >
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:202
MsgStream
Definition: MsgStream.h:33
std::ostringstream
STL class.
std::ostringstream::str
T str(T... args)
compareRootHistos.state
state
Definition: compareRootHistos.py:496
precedence::EntityState::m_slot
const EventSlot & m_slot
Definition: PrecedenceRulesGraph.h:250
EventSlot::algsStates
AlgsExecutionStates algsStates
Vector of algorithms states.
Definition: EventSlot.h:85