| The Gaudi Framework v28r2p1 (f1a77ff4)

- 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
IProxyDict * | proxy () const
const EventIDBase & | eventID () const
void | set (const ContextEvt_t &e=0, const ContextID_t &s=INVALID_CONTEXT_ID)
void | setEvt (const ContextEvt_t &e)
void | setSlot (const ContextID_t &s)
void | setValid (const bool &b=true)
void | setEventID (const EventIDBase &e)
void | setProxy (IProxyDict *prx)

## 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}
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) {
37 m_valid = (e == INVALID_CONTEXT_EVT || s == INVALID_CONTEXT_ID) ? false: true;
38 }
EventContext::m_valid
bool m_valid
Definition: EventContext.h:82
EventContext::m_evt_slot
ContextID_t m_evt_slot
Definition: EventContext.h:81
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:80
gaudirun.s
string s
Definition: gaudirun.py:245

## Member Function Documentation

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

Definition at line 44 of file EventContext.h.

44 { return m_eid; }
EventContext::m_eid
EventIDBase m_eid
Definition: EventContext.h:86

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:80

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

Definition at line 43 of file EventContext.h.

43 { return m_proxy; }
EventContext::m_proxy
IProxyDict * m_proxy
Definition: EventContext.h:84

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

Definition at line 46 of file EventContext.h.

46 {
47 m_valid = (e == INVALID_CONTEXT_EVT || s == INVALID_CONTEXT_ID) ? false : true;
48 m_evt_num = e;
49 m_evt_slot = s;
50 }
EventContext::m_valid
bool m_valid
Definition: EventContext.h:82
EventContext::m_evt_slot
ContextID_t m_evt_slot
Definition: EventContext.h:81
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:80
gaudirun.s
string s
Definition: gaudirun.py:245

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

Definition at line 70 of file EventContext.h.

70 {
71 m_eid = e;
72 }
EventContext::m_eid
EventIDBase m_eid
Definition: EventContext.h:86

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

Definition at line 52 of file EventContext.h.

52 {
53 if (e == INVALID_CONTEXT_EVT) setValid(false);
54 m_evt_num = e;
55 }
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:80
EventContext::setValid
void setValid(const bool &b=true)
Definition: EventContext.h:62

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

Definition at line 74 of file EventContext.h.

74 {
75 m_proxy = prx;
76 }
EventContext::m_proxy
IProxyDict * m_proxy
Definition: EventContext.h:84

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

Definition at line 57 of file EventContext.h.

57 {
58 if ( s == INVALID_CONTEXT_ID ) setValid(false);
59 m_evt_slot = s;
60 }
EventContext::m_evt_slot
ContextID_t m_evt_slot
Definition: EventContext.h:81
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:62

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

Definition at line 62 of file EventContext.h.

62 {
63 m_valid = b;
64 if (!m_valid) {
65 m_evt_slot = INVALID_CONTEXT_ID;
66 m_evt_num = INVALID_CONTEXT_EVT;
67 }
68 }
EventContext::m_valid
bool m_valid
Definition: EventContext.h:82
EventContext::m_evt_slot
ContextID_t m_evt_slot
Definition: EventContext.h:81
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:80

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:81

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:82

## 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 86 of file EventContext.h.

ContextEvt_t EventContext::m_evt_num {INVALID_CONTEXT_EVT}
| private

Definition at line 80 of file EventContext.h.

ContextID_t EventContext::m_evt_slot {INVALID_CONTEXT_ID}
| private

Definition at line 81 of file EventContext.h.

IProxyDict* EventContext::m_proxy {0}
| private

Definition at line 84 of file EventContext.h.

bool EventContext::m_valid {false}
| private

Definition at line 82 of file EventContext.h.

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

- GaudiKernel/GaudiKernel/EventContext.h