ATLAS Offline Software
McEventSelector.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 //====================================================================
6 // McEventSelector.h
7 //--------------------------------------------------------------------
8 //
9 // Package : McEventSelector
10 //
11 // Description: The McEventSelector component is able
12 // to produce a list of event references given a set of "selection
13 // criteria".
14 //
15 // Author : P. Calafiura
16 // Created : 2/28/00
17 // Changes :
18 //
19 //
20 //====================================================================
21 
22 #ifndef MCEVENTSELECTOR_MCEVENTSELECTOR_H
23 #define MCEVENTSELECTOR_MCEVENTSELECTOR_H 1
24 
25 // Include files
26 #include "GaudiKernel/IEvtSelector.h"
28 #include "Gaudi/Property.h" /*no forward decl: typedef*/
29 
32 
33 // Forward declarations
34 class EventSource;
35 class ISvcLocator;
36 class McContext;
37 
38 //--------------------------------------------------------------------
39 // Event Selector (for single-threaded/serial athena)
40 //--------------------------------------------------------------------
41 
43  virtual public IEvtSelector,
44  virtual public IEvtSelectorSeek {
45 public:
46 
47  virtual StatusCode initialize() override;
48  virtual StatusCode stop() override;
49  virtual StatusCode queryInterface(const InterfaceID& riid,
50  void** ppvInterface) override;
51  virtual StatusCode createContext(Context*& refpCtxt) const override;
52 
53  virtual StatusCode last(Context& refContext) const override;
54  virtual StatusCode next(Context& refCtxt) const override;
55  virtual StatusCode next(Context& refCtxt,int jump) const override;
56  virtual StatusCode previous(Context& refCtxt) const override;
57  virtual StatusCode previous(Context& refCtxt,int jump) const override;
58  virtual StatusCode rewind(Context& refCtxt) const override;
59 
60  virtual StatusCode createAddress(const Context& refCtxt,
61  IOpaqueAddress*&) const override;
62  virtual StatusCode releaseContext(Context*& refCtxt) const override;
63  virtual StatusCode resetCriteria(const std::string& cr,Context& c)const override;
64 
65  virtual StatusCode seek(Context& refCtxt, int) const override;
66  virtual int curEvent (const Context& refCtxt) const override;
67  virtual int size (Context& refCtxt) const override;
68 
70  McEventSelector( const std::string& name, ISvcLocator* svcloc );
71 
72  ~McEventSelector();
73 
74 private:
75  // EventSource* p_eventSource;
76  Gaudi::CheckedProperty<unsigned> m_runNo;
77  Gaudi::CheckedProperty<unsigned long long> m_firstEventNo;
78  Gaudi::CheckedProperty<unsigned long long> m_eventsPerRun;
79  Gaudi::CheckedProperty<unsigned> m_firstLBNo;
80  Gaudi::CheckedProperty<unsigned> m_eventsPerLB;
81  Gaudi::CheckedProperty<unsigned> m_initTimeStamp;
82  Gaudi::Property<unsigned> m_timeStampInterval;
83 
88  Gaudi::Property<bool> m_overrideRunNumber;
89  Gaudi::Property<bool> m_overrideEventNumber;
90  Gaudi::Property<bool> m_overrideLBNumber;
91  Gaudi::Property<bool> m_overrideTimeStamp;
92 
93  mutable McContext *m_ctx;
94 
95 };
96 
97 #endif // MCEVENTCNV_MCEVENTSELECTOR_H
98 
99 
100 
101 
McEventSelector::m_runNo
Gaudi::CheckedProperty< unsigned > m_runNo
Definition: McEventSelector.h:76
McEventSelector::m_eventsPerRun
Gaudi::CheckedProperty< unsigned long long > m_eventsPerRun
Definition: McEventSelector.h:78
McEventSelector::m_overrideLBNumber
Gaudi::Property< bool > m_overrideLBNumber
Definition: McEventSelector.h:90
ATLAS_NOT_THREAD_SAFE
#define ATLAS_NOT_THREAD_SAFE
getNoisyStrip() Find noisy strips from hitmaps and write out into xml/db formats
Definition: checker_macros.h:212
initialize
void initialize()
Definition: run_EoverP.cxx:894
McEventSelector::m_overrideRunNumber
Gaudi::Property< bool > m_overrideRunNumber
Flags to indicate override of run/event/time These are always true and are here for consistency with ...
Definition: McEventSelector.h:88
PixelModuleFeMask_create_db.stop
int stop
Definition: PixelModuleFeMask_create_db.py:76
McEventSelector::m_overrideTimeStamp
Gaudi::Property< bool > m_overrideTimeStamp
Definition: McEventSelector.h:91
McEventSelector::m_timeStampInterval
Gaudi::Property< unsigned > m_timeStampInterval
Definition: McEventSelector.h:82
McEventSelector::m_overrideEventNumber
Gaudi::Property< bool > m_overrideEventNumber
Definition: McEventSelector.h:89
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
IEvtSelectorSeek::seek
virtual StatusCode seek(IEvtSelector::Context &c, int evtnum) const =0
Seek to a given event number.
IEvtSelectorSeek::curEvent
virtual int curEvent(const IEvtSelector::Context &c) const =0
return the current event number.
fillPileUpNoiseLumi.next
next
Definition: fillPileUpNoiseLumi.py:52
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthService
Definition: AthService.h:32
McEventSelector::m_initTimeStamp
Gaudi::CheckedProperty< unsigned > m_initTimeStamp
Definition: McEventSelector.h:81
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
McEventSelector::m_eventsPerLB
Gaudi::CheckedProperty< unsigned > m_eventsPerLB
Definition: McEventSelector.h:80
McEventSelector::m_firstEventNo
Gaudi::CheckedProperty< unsigned long long > m_firstEventNo
Definition: McEventSelector.h:77
AthService.h
IEvtSelectorSeek.h
Extension to IEvtSelector to allow for seeking.
checker_macros.h
Define macros for attributes used to control the static checker.
python.compressB64.c
def c
Definition: compressB64.py:93
McContext
Definition: McEventSelector.cxx:38
McEventSelector::m_ctx
McContext * m_ctx
Definition: McEventSelector.h:93
IEvtSelectorSeek
Abstract interface for seeking for an event selector.
Definition: IEvtSelectorSeek.h:28
Trk::previous
@ previous
Definition: BinningData.h:32
McEventSelector
Definition: McEventSelector.h:44
McEventSelector::m_firstLBNo
Gaudi::CheckedProperty< unsigned > m_firstLBNo
Definition: McEventSelector.h:79