| The Gaudi Framework v30r0 (c919700c)

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

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

`#include <src/PrecedenceRulesGraph.h>`

Inheritance diagram for precedence::EntityState:
[legend]
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
EventSlot | m_slot
SmartIF< IHiveWhiteBoard > | m_whiteboard
SmartIF< ICondSvc > | m_condSvc
bool | m_conditionsEnabled {false}

## Detailed Description

Definition at line 201 of file PrecedenceRulesGraph.h.

## Constructor & Destructor Documentation

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

Definition at line 202 of file PrecedenceRulesGraph.h.

203 : m_slot( slot ), m_conditionsEnabled( conditionsEnabled )
204 {
205 SmartIF<IMessageSvc> msgSvc{svcLocator};
206 MsgStream log{msgSvc, "EntityState.Getter"};
207
208 // Figure if we can discover the data object states
209 m_whiteboard = svcLocator->service<IHiveWhiteBoard>( "EventDataSvc", false );
210 if ( !m_whiteboard.isValid() ) {
211 log << MSG::WARNING << "Failed to locate EventDataSvc: no way to add DO "
212 << "states to the TTT dump " << endmsg;
213 }
214
215 if ( m_conditionsEnabled ) {
216 // Figure if we can discover Condition data object states
217 m_condSvc = svcLocator->service<ICondSvc>( "CondSvc", false );
218 if ( !m_condSvc.isValid() )
219 log << MSG::WARNING << "Failed to locate CondSvc: no way to add Condition DO "
220 << "states to the TTT dump " << endmsg;
221 }
222
223 if ( !m_slot.eventContext->valid() )
224 log << MSG::WARNING << "Event context is invalid: no way to add DO states"
225 << " in the TTT dump" << endmsg;
226 }
MsgStream
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:24
SmartIF< IMessageSvc >
EventSlot::eventContext
EventContext * eventContext
Cache for the eventContext.
Definition: EventSlot.h:28
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:79
precedence::EntityState::m_condSvc
SmartIF< ICondSvc > m_condSvc
Definition: PrecedenceRulesGraph.h:278
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:279
precedence::EntityState::m_slot
EventSlot m_slot
Definition: PrecedenceRulesGraph.h:275
precedence::EntityState::m_whiteboard
SmartIF< IHiveWhiteBoard > m_whiteboard
Definition: PrecedenceRulesGraph.h:277
SmartIF::isValid
bool isValid() const
Allow for check if smart pointer is valid.
Definition: SmartIF.h:68
MSG::WARNING
Definition: IMessageSvc.h:16
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:209
Gaudi.Configuration.log
log
Definition: Configuration.py:13
EventContext::valid
bool valid() const
Definition: EventContext.h:41

## Member Function Documentation

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

Definition at line 228 of file PrecedenceRulesGraph.h.

229 { // Returns algorithm's FSM state
230 using State = AlgsExecutionStates::State;
231 State state = m_slot.algsStates[props.m_algoIndex];
232 switch ( state ) {
233 case State::INITIAL:
234 return "INITIAL";
235 case State::CONTROLREADY:
236 return "CONTROLREADY";
237 case State::DATAREADY:
238 return "DATAREADY";
239 case State::SCHEDULED:
240 return "SCHEDULED";
241 case State::EVTACCEPTED:
242 return "EVTACCEPTED";
243 case State::EVTREJECTED:
244 return "EVTREJECTED";
245 case State::ERROR:
246 return "ERROR";
247 default:
248 return "UNKNOWN";
249 }
250 }
compareRootHistos.state
state
Definition: compareRootHistos.py:424
EventSlot::algsStates
AlgsExecutionStates algsStates
Vector of algorithms states.
Definition: EventSlot.h:33
precedence::EntityState::m_slot
EventSlot m_slot
Definition: PrecedenceRulesGraph.h:275
MSG::ERROR
Definition: IMessageSvc.h:16
AlgsExecutionStates::State
State
Execution states of the algorithms.
Definition: AlgsExecutionStates.h:32

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

Definition at line 252 of file PrecedenceRulesGraph.h.

252 { return ""; }

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

Definition at line 254 of file PrecedenceRulesGraph.h.

255 {
256 std::string state;
257
258 if ( m_whiteboard.isValid() && m_slot.eventContext->valid() )
259 if ( m_whiteboard->selectStore( m_slot.eventContext->slot() ).isSuccess() )
260 state = m_whiteboard->exists( props.m_id.fullKey() ) ? "Produced" : "Missing";
261
262 return state;
263 }
compareRootHistos.state
state
Definition: compareRootHistos.py:424
EventContext::slot
ContextID_t slot() const
Definition: EventContext.h:40
EventSlot::eventContext
EventContext * eventContext
Cache for the eventContext.
Definition: EventSlot.h:28
IHiveWhiteBoard::exists
virtual bool exists(const DataObjID &)=0
Check if a data object exists in store.
std::string
STL class.
IHiveWhiteBoard::selectStore
virtual StatusCode selectStore(size_t partitionIndex)=0
Activate an given &#39;slot&#39; for all subsequent calls within the same thread id.
precedence::EntityState::m_slot
EventSlot m_slot
Definition: PrecedenceRulesGraph.h:275
precedence::EntityState::m_whiteboard
SmartIF< IHiveWhiteBoard > m_whiteboard
Definition: PrecedenceRulesGraph.h:277
SmartIF::isValid
bool isValid() const
Allow for check if smart pointer is valid.
Definition: SmartIF.h:68
EventContext::valid
bool valid() const
Definition: EventContext.h:41

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

Definition at line 265 of file PrecedenceRulesGraph.h.

266 {
267 std::string state;
268
269 if ( m_condSvc.isValid() && m_slot.eventContext->valid() )
270 state = m_condSvc->isValidID( *( m_slot.eventContext ), props.m_id.fullKey() ) ? "Produced" : "Missing";
271
272 return state;
273 }
compareRootHistos.state
state
Definition: compareRootHistos.py:424
EventSlot::eventContext
EventContext * eventContext
Cache for the eventContext.
Definition: EventSlot.h:28
std::string
STL class.
precedence::EntityState::m_condSvc
SmartIF< ICondSvc > m_condSvc
Definition: PrecedenceRulesGraph.h:278
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
precedence::EntityState::m_slot
EventSlot m_slot
Definition: PrecedenceRulesGraph.h:275
SmartIF::isValid
bool isValid() const
Allow for check if smart pointer is valid.
Definition: SmartIF.h:68
EventContext::valid
bool valid() const
Definition: EventContext.h:41

## Member Data Documentation

bool precedence::EntityState::m_conditionsEnabled {false}

Definition at line 279 of file PrecedenceRulesGraph.h.

SmartIF<ICondSvc> precedence::EntityState::m_condSvc

Definition at line 278 of file PrecedenceRulesGraph.h.

EventSlot precedence::EntityState::m_slot

Definition at line 275 of file PrecedenceRulesGraph.h.

SmartIF<IHiveWhiteBoard> precedence::EntityState::m_whiteboard

Definition at line 277 of file PrecedenceRulesGraph.h.

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

- GaudiHive/src/PrecedenceRulesGraph.h