The Gaudi Framework  master (37c0b60a)
IEvtSelector.h
Go to the documentation of this file.
1 /***********************************************************************************\
2 * (c) Copyright 1998-2024 CERN for the benefit of the LHCb and ATLAS collaborations *
3 * *
4 * This software is distributed under the terms of the Apache version 2 licence, *
5 * copied verbatim in the file "LICENSE". *
6 * *
7 * In applying this licence, CERN does not waive the privileges and immunities *
8 * granted to it by virtue of its status as an Intergovernmental Organization *
9 * or submit itself to any jurisdiction. *
10 \***********************************************************************************/
11 #ifndef GAUDIKERNEL_IEVTSELECTOR_H
12 #define GAUDIKERNEL_IEVTSELECTOR_H 1
13 
14 // Include files
15 #include <GaudiKernel/IInterface.h>
17 #include <GaudiKernel/StatusCode.h>
18 #include <string>
19 
28 class GAUDI_API IEvtSelector : virtual public IInterface {
29 public:
32 
33  class Context {
34  public:
35  virtual ~Context() = default;
36  virtual void* identifier() const = 0;
37  };
38 
44  virtual StatusCode createContext( Context*& c ) const = 0;
45 
53  virtual StatusCode next( Context& c ) const = 0;
54 
60  virtual StatusCode next( Context& c, int jump ) const = 0;
61 
68  virtual StatusCode previous( Context& c ) const = 0;
69 
75  virtual StatusCode previous( Context& c, int jump ) const = 0;
76 
80  virtual StatusCode last( Context& refContext ) const = 0;
81 
87  virtual StatusCode rewind( Context& c ) const = 0;
88 
95  virtual StatusCode createAddress( const Context& c, IOpaqueAddress*& iop ) const = 0;
96 
101  virtual StatusCode releaseContext( Context*& ) const = 0;
102 
109  virtual StatusCode resetCriteria( const std::string& cr, Context& c ) const = 0;
110 };
111 
112 #endif // GAUDIKERNEL_IEVTSELECTOR_H
std::string
STL class.
IEvtSelector::DeclareInterfaceID
DeclareInterfaceID(IEvtSelector, 2, 0)
InterfaceID.
IEvtSelector::next
virtual StatusCode next(Context &c) const =0
Fetch the next event or the first event if it will be use soon after the creation of the context.
IOpaqueAddress
Definition: IOpaqueAddress.h:33
IEvtSelector
Definition: IEvtSelector.h:28
gaudirun.c
c
Definition: gaudirun.py:525
IEvtSelector::last
virtual StatusCode last(Context &refContext) const =0
Access last item in the iteration.
IEvtSelector::previous
virtual StatusCode previous(Context &c, int jump) const =0
Same of previous(Context& c) the possibility to jump the previous n-1 events.
IEvtSelector::Context
Definition: IEvtSelector.h:33
StatusCode.h
IEvtSelector::createAddress
virtual StatusCode createAddress(const Context &c, IOpaqueAddress *&iop) const =0
Create an IOpaqueAddress object from the event fetched.
IEvtSelector::resetCriteria
virtual StatusCode resetCriteria(const std::string &cr, Context &c) const =0
Will set a new criteria for the selection of the next list of events and will change the state of the...
IEvtSelector::rewind
virtual StatusCode rewind(Context &c) const =0
Will set the state of the context in a way that the next event read is the first of the list.
StatusCode
Definition: StatusCode.h:65
IInterface.h
IOpaqueAddress.h
IEvtSelector::next
virtual StatusCode next(Context &c, int jump) const =0
Same of next(const Context&) plus the possibility to jump the next n-1 events.
IEvtSelector::Context::~Context
virtual ~Context()=default
IInterface
Definition: IInterface.h:239
IEvtSelector::previous
virtual StatusCode previous(Context &c) const =0
Fetch the previous event.
IEvtSelector::createContext
virtual StatusCode createContext(Context *&c) const =0
Create and return a context object that will keep track of the state of selection.
IEvtSelector::Context::identifier
virtual void * identifier() const =0
IEvtSelector::releaseContext
virtual StatusCode releaseContext(Context *&) const =0
Release the Context object.
GAUDI_API
#define GAUDI_API
Definition: Kernel.h:81