Gaudi Framework, version v20r2

Generated: 18 Jul 2008

EvtSelectorContext Class Reference

#include <EventIterator.h>

Inheritance diagram for EvtSelectorContext:

Inheritance graph
[legend]
Collaboration diagram for EvtSelectorContext:

Collaboration graph
[legend]
List of all members.

Detailed Description

Definition of class EventIterator.

Generic iterator to access event on the persistent store. The iterator interacts with the event selection service.

History: +---------+----------------------------------------------+---------+ | Date | Comment | Who | +---------+----------------------------------------------+---------+ | 3/10/00 | Initial version | M.Frank | +---------+----------------------------------------------+---------+

Author:
Markus Frank
Version:
1.0

Definition at line 32 of file EventIterator.h.

Public Member Functions

 EvtSelectorContext (const IEvtSelector *selector)
 Standard constructor.
virtual ~EvtSelectorContext ()
 Standard Destructor.
virtual EvtSelectorContextoperator= (const EvtSelectorContext &copy)
 Copy constructor.
virtual IDataStreamTool::size_type ID () const
 Stream identifier.
long numEvent () const
 Access counter.
long numStreamEvent () const
 Access counter within stream.
void * identifier () const

Protected Member Functions

void set (const IEvtSelector *sel, IDataStreamTool::size_type id, IEvtSelector::Context *it, IOpaqueAddress *pA)
 Set the address of the iterator.
void set (IEvtSelector::Context *it, IOpaqueAddress *pA)
 Set the address of the iterator.
void set (IOpaqueAddress *pA)
 Set the address of the iterator.
IEvtSelector::Contextcontext () const
 Access "real" iterator.
IDataStreamTool::size_type increaseCounters (bool reset=false)
 Increase counters.
IDataStreamTool::size_type decreaseCounters (bool reset=false)
 Decrease counters.

Protected Attributes

IDataStreamTool::size_type m_streamID
 Stream identifier.
long m_count
 Event counter.
long m_strCount
 Event counter within stream.
const IEvtSelectorm_pSelector
 Pointer to event selector.
IEvtSelector::Contextm_context
 Pointer to "real" iterator.
IOpaqueAddressm_pAddress
 Pointer to opaque address.

Private Member Functions

 EvtSelectorContext (const EvtSelectorContext &copy)
 Copy constructor.

Friends

class EventSelector
class EventCollectionSelector


Constructor & Destructor Documentation

EvtSelectorContext::EvtSelectorContext ( const EvtSelectorContext copy  )  [inline, private]

Copy constructor.

Definition at line 38 of file EventIterator.h.

00039   : IEvtSelector::Context(copy),
00040     m_count(copy.m_count),
00041     m_strCount(copy.m_strCount),
00042     m_pSelector(copy.m_pSelector), 
00043     m_context(copy.m_context),
00044     m_pAddress(copy.m_pAddress)
00045   {
00046   }

EvtSelectorContext::EvtSelectorContext ( const IEvtSelector selector  )  [inline]

Standard constructor.

Definition at line 95 of file EventIterator.h.

00096   : m_streamID(-1),
00097     m_count(-1),
00098     m_strCount(-1),
00099     m_pSelector(selector),
00100     m_context(0),
00101     m_pAddress(0)
00102   {
00103   }

virtual EvtSelectorContext::~EvtSelectorContext (  )  [inline, virtual]

Standard Destructor.

Definition at line 105 of file EventIterator.h.

00105                                 { 
00106   }


Member Function Documentation

void EvtSelectorContext::set ( const IEvtSelector sel,
IDataStreamTool::size_type  id,
IEvtSelector::Context it,
IOpaqueAddress pA 
) [inline, protected]

Set the address of the iterator.

Definition at line 61 of file EventIterator.h.

References m_context, m_pAddress, m_pSelector, m_strCount, and m_streamID.

Referenced by EventSelector::createContext(), EventSelector::firstOfNextStream(), EventSelector::lastOfPreviousStream(), EventSelector::next(), EventSelector::previous(), and EventSelector::rewind().

00061                                                                                                                  {
00062     m_pSelector = sel;
00063     m_context   = it;
00064     m_streamID  = id;
00065     m_pAddress  = pA;
00066     m_strCount  = -1;
00067   }

void EvtSelectorContext::set ( IEvtSelector::Context it,
IOpaqueAddress pA 
) [inline, protected]

Set the address of the iterator.

Definition at line 69 of file EventIterator.h.

References m_context, and m_pAddress.

00069                                                            {
00070     m_context = it;
00071     m_pAddress = pA;
00072   }

void EvtSelectorContext::set ( IOpaqueAddress pA  )  [inline, protected]

Set the address of the iterator.

Definition at line 74 of file EventIterator.h.

References m_pAddress.

00074                                   {
00075     m_pAddress = pA;
00076   }

IEvtSelector::Context* EvtSelectorContext::context (  )  const [inline, protected]

Access "real" iterator.

Definition at line 78 of file EventIterator.h.

References m_context.

Referenced by EventSelector::firstOfNextStream(), EventSelector::lastOfPreviousStream(), EventSelector::next(), EventSelector::previous(), and EventSelector::printEvtInfo().

00078                                          {
00079     return m_context;
00080   }

IDataStreamTool::size_type EvtSelectorContext::increaseCounters ( bool  reset = false  )  [inline, protected]

Increase counters.

Definition at line 82 of file EventIterator.h.

References m_count, and m_strCount.

Referenced by EventSelector::next(), and EventSelector::previous().

00082                                                                 {
00083     m_count++;
00084     m_strCount = (reset) ? 0 : m_strCount+1;
00085     return m_count;
00086   }

IDataStreamTool::size_type EvtSelectorContext::decreaseCounters ( bool  reset = false  )  [inline, protected]

Decrease counters.

Definition at line 88 of file EventIterator.h.

References m_count, and m_strCount.

00088                                                                 {
00089     m_count++;
00090     m_strCount = (reset) ? 0 : m_strCount-1;
00091     return m_count;
00092   }

virtual EvtSelectorContext& EvtSelectorContext::operator= ( const EvtSelectorContext copy  )  [inline, virtual]

Copy constructor.

Definition at line 108 of file EventIterator.h.

References m_context, m_count, m_pAddress, m_pSelector, m_strCount, and m_streamID.

00108                                                                           {
00109     m_streamID  = copy.m_streamID;
00110     m_count     = copy.m_count;
00111     m_strCount  = copy.m_strCount;
00112     m_pSelector = copy.m_pSelector;
00113     m_context   = copy.m_context;
00114     m_pAddress  = copy.m_pAddress;
00115     return *this;
00116   }

virtual IDataStreamTool::size_type EvtSelectorContext::ID (  )  const [inline, virtual]

Stream identifier.

Definition at line 118 of file EventIterator.h.

References m_streamID.

Referenced by EventSelector::firstOfNextStream(), EventSelector::lastOfPreviousStream(), EventSelector::next(), EventSelector::previous(), and EventSelector::printEvtInfo().

00118                                                   {
00119     return m_streamID;
00120   }

long EvtSelectorContext::numEvent (  )  const [inline]

Access counter.

Definition at line 122 of file EventIterator.h.

References m_count.

Referenced by EventSelector::printEvtInfo().

00122                             {
00123     return m_count;
00124   }

long EvtSelectorContext::numStreamEvent (  )  const [inline]

Access counter within stream.

Definition at line 126 of file EventIterator.h.

References m_strCount.

Referenced by EventSelector::printEvtInfo().

00126                                   {
00127     return m_strCount;
00128   }

void* EvtSelectorContext::identifier (  )  const [inline, virtual]

Implements IEvtSelector::Context.

Definition at line 129 of file EventIterator.h.

References m_pSelector.

00129                             {
00130     return (void*)m_pSelector;
00131   }


Friends And Related Function Documentation

friend class EventSelector [friend]

Definition at line 34 of file EventIterator.h.

friend class EventCollectionSelector [friend]

Definition at line 35 of file EventIterator.h.


Member Data Documentation

IDataStreamTool::size_type EvtSelectorContext::m_streamID [protected]

Stream identifier.

Definition at line 49 of file EventIterator.h.

Referenced by ID(), operator=(), and set().

long EvtSelectorContext::m_count [protected]

Event counter.

Definition at line 51 of file EventIterator.h.

Referenced by decreaseCounters(), increaseCounters(), numEvent(), and operator=().

long EvtSelectorContext::m_strCount [protected]

Event counter within stream.

Definition at line 53 of file EventIterator.h.

Referenced by decreaseCounters(), increaseCounters(), numStreamEvent(), operator=(), and set().

const IEvtSelector* EvtSelectorContext::m_pSelector [protected]

Pointer to event selector.

Definition at line 55 of file EventIterator.h.

Referenced by identifier(), operator=(), and set().

IEvtSelector::Context* EvtSelectorContext::m_context [protected]

Pointer to "real" iterator.

Definition at line 57 of file EventIterator.h.

Referenced by context(), operator=(), and set().

IOpaqueAddress* EvtSelectorContext::m_pAddress [protected]

Pointer to opaque address.

Definition at line 59 of file EventIterator.h.

Referenced by operator=(), and set().


The documentation for this class was generated from the following file:
Generated at Fri Jul 18 12:07:16 2008 for Gaudi Framework, version v20r2 by Doxygen version 1.5.1 written by Dimitri van Heesch, © 1997-2004