| The Gaudi Framework v27r1

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

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

Public Types | Public Member Functions | Static Public Attributes | Private Attributes | List of all members
EventContext Class Reference

This class represents an entry point to all the event specific data. More...

`#include <GaudiKernel/EventContext.h>`

Collaboration diagram for EventContext:
[legend]

## Public Types
typedef size_t | ContextID_t
typedef size_t | ContextEvt_t

## Public Member Functions
| EventContext ()
| EventContext (const ContextEvt_t &e, const ContextID_t &s=INVALID_CONTEXT_ID)
ContextEvt_t | evt () const
ContextID_t | slot () const
bool | valid () const
bool | evtFail () const
IProxyDict * | proxy () const
const EventIDBase & | eventID () const
void | set (const ContextEvt_t &e=0, const ContextID_t &s=INVALID_CONTEXT_ID, const bool f=false)
void | setEvt (const ContextEvt_t &e)
void | setSlot (const ContextID_t &s)
void | setFail (const bool &b=true)
void | setValid (const bool &b=true)
void | setEventID (const EventIDBase &e)
void | setProxy (IProxyDict *prx)
EventContext & | operator= (const EventContext &c)

## Static Public Attributes
static const ContextID_t | INVALID_CONTEXT_ID = std::numeric_limits<ContextID_t>::max()
static const ContextEvt_t | INVALID_CONTEXT_EVT = std::numeric_limits<ContextEvt_t>::max()

## Private Attributes
ContextEvt_t | m_evt_num {INVALID_CONTEXT_EVT}
ContextID_t | m_evt_slot {INVALID_CONTEXT_ID}
bool | m_valid {false}
bool | m_evt_failed {false}
IProxyDict * | m_proxy {0}
EventIDBase | m_eid {}

## Detailed Description

This class represents an entry point to all the event specific data.

It is needed to make the algorithm "aware" of the event it is operating on. This was not needed in the serial version of Gaudi where the assumption of 1-event-at-the-time processing was implicit.

This class has nothing to do with the AlgContextSvc or the Context of the EvtSelector!

Author
  Danilo Piparo, Charles Leggett

Date
  2012

Definition at line 25 of file EventContext.h.

## Member Typedef Documentation

typedef size_t EventContext::ContextEvt_t

Definition at line 28 of file EventContext.h.

typedef size_t EventContext::ContextID_t

Definition at line 27 of file EventContext.h.

## Constructor & Destructor Documentation

EventContext::EventContext | ( |  | ) |
| inline

Definition at line 34 of file EventContext.h.

34 {};

EventContext::EventContext | ( | const ContextEvt_t & | e,
|  | const ContextID_t & | s = `INVALID_CONTEXT_ID`
| ) |  |
| inline

Definition at line 35 of file EventContext.h.

36 :m_evt_num(e), m_evt_slot(s), m_evt_failed(false) {
37 m_valid = (e == INVALID_CONTEXT_EVT || s == INVALID_CONTEXT_ID) ? false: true;
38 }
EventContext::m_valid
bool m_valid
Definition: EventContext.h:97
EventContext::m_evt_slot
ContextID_t m_evt_slot
Definition: EventContext.h:96
EventContext::INVALID_CONTEXT_EVT
static const ContextEvt_t INVALID_CONTEXT_EVT
Definition: EventContext.h:31
EventContext::m_evt_failed
bool m_evt_failed
Definition: EventContext.h:98
EventContext::INVALID_CONTEXT_ID
static const ContextID_t INVALID_CONTEXT_ID
Definition: EventContext.h:30
EventContext::m_evt_num
ContextEvt_t m_evt_num
Definition: EventContext.h:95
gaudirun.s
string s
Definition: gaudirun.py:245

## Member Function Documentation

const EventIDBase& EventContext::eventID | ( |  | ) | const
| inline

Definition at line 45 of file EventContext.h.

45 { return m_eid; }
EventContext::m_eid
EventIDBase m_eid
Definition: EventContext.h:102

ContextEvt_t EventContext::evt | ( |  | ) | const
| inline

Definition at line 40 of file EventContext.h.

40 { return m_evt_num; }
EventContext::m_evt_num
ContextEvt_t m_evt_num
Definition: EventContext.h:95

bool EventContext::evtFail | ( |  | ) | const
| inline

Definition at line 43 of file EventContext.h.

43 { return m_evt_failed; }
EventContext::m_evt_failed
bool m_evt_failed
Definition: EventContext.h:98

EventContext& EventContext::operator= | ( | const EventContext & | c | ) |
| inline

Definition at line 85 of file EventContext.h.

85 {
86 m_evt_num = c.m_evt_num;
87 m_evt_slot = c.m_evt_slot;
88 m_valid = c.m_valid;
89 m_evt_failed = c.m_evt_failed;
90 return *this;
91 }
EventContext::m_valid
bool m_valid
Definition: EventContext.h:97
EventContext::m_evt_slot
ContextID_t m_evt_slot
Definition: EventContext.h:96
EventContext::m_evt_failed
bool m_evt_failed
Definition: EventContext.h:98
EventContext::m_evt_num
ContextEvt_t m_evt_num
Definition: EventContext.h:95

IProxyDict* EventContext::proxy | ( |  | ) | const
| inline

Definition at line 44 of file EventContext.h.

44 { return m_proxy; }
EventContext::m_proxy
IProxyDict * m_proxy
Definition: EventContext.h:100

void EventContext::set | ( | const ContextEvt_t & | e = `0`,
|  | const ContextID_t & | s = `INVALID_CONTEXT_ID`,
|  | const bool | f = `false`
| ) |  |
| inline

Definition at line 47 of file EventContext.h.

48 {
49 m_valid = (e == INVALID_CONTEXT_EVT || s == INVALID_CONTEXT_ID) ? false : true;
50 m_evt_num = e;
51 m_evt_slot = s;
52 m_evt_failed = f;
53 }
EventContext::m_valid
bool m_valid
Definition: EventContext.h:97
EventContext::m_evt_slot
ContextID_t m_evt_slot
Definition: EventContext.h:96
EventContext::INVALID_CONTEXT_EVT
static const ContextEvt_t INVALID_CONTEXT_EVT
Definition: EventContext.h:31
EventContext::m_evt_failed
bool m_evt_failed
Definition: EventContext.h:98
EventContext::INVALID_CONTEXT_ID
static const ContextID_t INVALID_CONTEXT_ID
Definition: EventContext.h:30
EventContext::m_evt_num
ContextEvt_t m_evt_num
Definition: EventContext.h:95
gaudirun.s
string s
Definition: gaudirun.py:245

void EventContext::setEventID | ( | const EventIDBase & | e | ) |
| inline

Definition at line 77 of file EventContext.h.

77 {
78 m_eid = e;
79 }
EventContext::m_eid
EventIDBase m_eid
Definition: EventContext.h:102

void EventContext::setEvt | ( | const ContextEvt_t & | e | ) |
| inline

Definition at line 55 of file EventContext.h.

55 {
56 if (e == INVALID_CONTEXT_EVT) setValid(false);
57 m_evt_num = e;
58 }
EventContext::INVALID_CONTEXT_EVT
static const ContextEvt_t INVALID_CONTEXT_EVT
Definition: EventContext.h:31
EventContext::m_evt_num
ContextEvt_t m_evt_num
Definition: EventContext.h:95
EventContext::setValid
void setValid(const bool &b=true)
Definition: EventContext.h:69

void EventContext::setFail | ( | const bool & | b = `true` | ) |
| inline

Definition at line 65 of file EventContext.h.

65 {
66 m_evt_failed = b;
67 }
EventContext::m_evt_failed
bool m_evt_failed
Definition: EventContext.h:98

void EventContext::setProxy | ( | IProxyDict * | prx | ) |
| inline

Definition at line 81 of file EventContext.h.

81 {
82 m_proxy = prx;
83 }
EventContext::m_proxy
IProxyDict * m_proxy
Definition: EventContext.h:100

void EventContext::setSlot | ( | const ContextID_t & | s | ) |
| inline

Definition at line 60 of file EventContext.h.

60 {
61 if ( s == INVALID_CONTEXT_ID ) setValid(false);
62 m_evt_slot = s;
63 }
EventContext::m_evt_slot
ContextID_t m_evt_slot
Definition: EventContext.h:96
EventContext::INVALID_CONTEXT_ID
static const ContextID_t INVALID_CONTEXT_ID
Definition: EventContext.h:30
gaudirun.s
string s
Definition: gaudirun.py:245
EventContext::setValid
void setValid(const bool &b=true)
Definition: EventContext.h:69

void EventContext::setValid | ( | const bool & | b = `true` | ) |
| inline

Definition at line 69 of file EventContext.h.

69 {
70 m_valid = b;
71 if (!m_valid) {
72 m_evt_slot = INVALID_CONTEXT_ID;
73 m_evt_num = INVALID_CONTEXT_EVT;
74 }
75 }
EventContext::m_valid
bool m_valid
Definition: EventContext.h:97
EventContext::m_evt_slot
ContextID_t m_evt_slot
Definition: EventContext.h:96
EventContext::INVALID_CONTEXT_EVT
static const ContextEvt_t INVALID_CONTEXT_EVT
Definition: EventContext.h:31
EventContext::INVALID_CONTEXT_ID
static const ContextID_t INVALID_CONTEXT_ID
Definition: EventContext.h:30
EventContext::m_evt_num
ContextEvt_t m_evt_num
Definition: EventContext.h:95

ContextID_t EventContext::slot | ( |  | ) | const
| inline

Definition at line 41 of file EventContext.h.

41 { return m_evt_slot; }
EventContext::m_evt_slot
ContextID_t m_evt_slot
Definition: EventContext.h:96

bool EventContext::valid | ( |  | ) | const
| inline

Definition at line 42 of file EventContext.h.

42 {return m_valid;}
EventContext::m_valid
bool m_valid
Definition: EventContext.h:97

## Member Data Documentation

const ContextEvt_t EventContext::INVALID_CONTEXT_EVT = std::numeric_limits<ContextEvt_t>::max()
| static

Definition at line 31 of file EventContext.h.

const ContextID_t EventContext::INVALID_CONTEXT_ID = std::numeric_limits<ContextID_t>::max()
| static

Definition at line 30 of file EventContext.h.

EventIDBase EventContext::m_eid {}
| private

Definition at line 102 of file EventContext.h.

bool EventContext::m_evt_failed {false}
| private

Definition at line 98 of file EventContext.h.

ContextEvt_t EventContext::m_evt_num {INVALID_CONTEXT_EVT}
| private

Definition at line 95 of file EventContext.h.

ContextID_t EventContext::m_evt_slot {INVALID_CONTEXT_ID}
| private

Definition at line 96 of file EventContext.h.

IProxyDict* EventContext::m_proxy {0}
| private

Definition at line 100 of file EventContext.h.

bool EventContext::m_valid {false}
| private

Definition at line 97 of file EventContext.h.

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

- GaudiKernel/GaudiKernel/EventContext.h