![]() |
|
|||
File indexing completed on 2025-02-21 10:00:31
0001 /***********************************************************************************\ 0002 * (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations * 0003 * * 0004 * This software is distributed under the terms of the Apache version 2 licence, * 0005 * copied verbatim in the file "LICENSE". * 0006 * * 0007 * In applying this licence, CERN does not waive the privileges and immunities * 0008 * granted to it by virtue of its status as an Intergovernmental Organization * 0009 * or submit itself to any jurisdiction. * 0010 \***********************************************************************************/ 0011 #ifndef GAUDIKERNEL_IEVTSELECTOR_H 0012 #define GAUDIKERNEL_IEVTSELECTOR_H 1 0013 0014 // Include files 0015 #include "GaudiKernel/IInterface.h" 0016 #include "GaudiKernel/IOpaqueAddress.h" 0017 #include "GaudiKernel/StatusCode.h" 0018 #include <string> 0019 0020 /** @class IEvtSelector IEvtSelector.h GaudiKernel/IEvtSelector.h 0021 0022 The Event Selector Interface. The EventSelector component is able 0023 to produce a list of event given a set of stream specifications. 0024 0025 @author C. Cioffi 0026 @date 14/11/2003 0027 */ 0028 class GAUDI_API IEvtSelector : virtual public IInterface { 0029 public: 0030 /// InterfaceID 0031 DeclareInterfaceID( IEvtSelector, 2, 0 ); 0032 0033 class Context { 0034 public: 0035 virtual ~Context() = default; 0036 virtual void* identifier() const = 0; 0037 }; 0038 0039 /**Create and return a context object that will 0040 keep track of the state of selection. 0041 0042 @param c Reference of a pointer to a Context object. 0043 */ 0044 virtual StatusCode createContext( Context*& c ) const = 0; 0045 0046 /**Fetch the next event or the first event if it will be use soon 0047 after the creation of the context. 0048 It will return StatusCode::FAILURE if there have been problem in the fetching or it 0049 has been reached the end of the list of events. 0050 0051 @param c Reference to the Context object. 0052 */ 0053 virtual StatusCode next( Context& c ) const = 0; 0054 0055 /**Same of next(const Context&) plus the possibility to jump the next n-1 events. 0056 0057 @param c Reference to the Context object. 0058 @param jump The event to jump to from the current event. 0059 */ 0060 virtual StatusCode next( Context& c, int jump ) const = 0; 0061 0062 /**Fetch the previous event. 0063 It will return StatusCode::FAILURE if there have been problem in the fetching or it 0064 has been reached the begin of the list of events. 0065 0066 @param c Reference to the Context object. 0067 */ 0068 virtual StatusCode previous( Context& c ) const = 0; 0069 0070 /**Same of previous(Context& c) the possibility to jump the previous n-1 events. 0071 0072 @param c Reference to the Context object. 0073 @param jump The event to jump to from the current event. 0074 */ 0075 virtual StatusCode previous( Context& c, int jump ) const = 0; 0076 0077 /** Access last item in the iteration 0078 * @param refContext [IN/OUT] Reference to the Context object. 0079 */ 0080 virtual StatusCode last( Context& refContext ) const = 0; 0081 0082 /** Will set the state of the context in a way that the next event read 0083 * is the first of the list. 0084 * 0085 * @param c Reference to the Context object. 0086 */ 0087 virtual StatusCode rewind( Context& c ) const = 0; 0088 0089 /** Create an IOpaqueAddress object from the event fetched. 0090 * 0091 * @param c Reference to the Context object. 0092 * @param iop Refernce pointer to a IOpaqueAddress object 0093 * 0094 */ 0095 virtual StatusCode createAddress( const Context& c, IOpaqueAddress*& iop ) const = 0; 0096 0097 /** Release the Context object. 0098 * 0099 * @param c Reference pointer to the Context object. 0100 */ 0101 virtual StatusCode releaseContext( Context*& ) const = 0; 0102 0103 /** Will set a new criteria for the selection of the next list of events and will change 0104 * the state of the context in a way to point to the new list. 0105 * 0106 * @param cr The new criteria string. 0107 * @param c Reference pointer to the Context object. 0108 */ 0109 virtual StatusCode resetCriteria( const std::string& cr, Context& c ) const = 0; 0110 }; 0111 0112 #endif // GAUDIKERNEL_IEVTSELECTOR_H
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
![]() ![]() |