ATLAS Offline Software
EventSelectorMuonCalibStream.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 #ifndef MUONCALIBSTREAMCNVSVC_EVENTSELECTORMUONCALIBSTREAM_H
5 #define MUONCALIBSTREAMCNVSVC_EVENTSELECTORMUONCALIBSTREAM_H
6 // EventSelectorMuonCalibStream
7 
8 // Include files.
9 #include <map>
10 
13 
15 #include "GaudiKernel/IEvtSelector.h"
16 #include "GaudiKernel/IProperty.h"
17 #include "GaudiKernel/ServiceHandle.h"
18 #include "MuCalDecode/CalibEvent.h"
19 
20 // Forward declarations.
21 class ISvcLocator;
23 
24 // Class EventSelectorMuonCalibStream.
25 class EventSelectorMuonCalibStream : public extends<AthService, IEvtSelector> {
26 public:
27  // Standard Constructor.
28  EventSelectorMuonCalibStream(const std::string &name, ISvcLocator *svcloc);
29 
30  // Standard Destructor.
32 
33  // Implementation of Service base class methods.
34  virtual StatusCode initialize();
35 
36  // Implementation of the IEvtSelector interface methods.
37  virtual StatusCode createContext(Context *&it) const;
38  virtual StatusCode next(Context &it) const;
39  virtual StatusCode next(Context &it, int jump) const;
40  virtual StatusCode previous(Context &it) const;
41  virtual StatusCode previous(Context &it, int jump) const;
42 
43  virtual StatusCode last(Context &it) const;
44  virtual StatusCode rewind(Context &it) const;
45 
46  virtual StatusCode createAddress(const Context &it, IOpaqueAddress *&iop) const;
47  virtual StatusCode releaseContext(Context *&it) const;
48  virtual StatusCode resetCriteria(const std::string &criteria, Context &context) const;
49 
50 private:
51  // property
52  Gaudi::Property<int> m_SkipEvents{this, "SkipEvents", 0, "Number of events to skip at the beginning"};
53  ServiceHandle<MuonCalibStreamInputSvc> m_eventSource{ this, "MuonCalibStreamInputSvc", "MuonCalibStreamFileInputSvc"};
54  ServiceHandle<IMuonCalibStreamDataProviderSvc> m_dataProvider{this, "DataProvider", "MuonCalibStreamDataProviderSvc"};
55 
58 
59  mutable std::atomic<long> m_NumEvents{0}; // Number of Events read so far.
60 };
61 
62 #endif
EventSelectorMuonCalibStream::createContext
virtual StatusCode createContext(Context *&it) const
Definition: EventSelectorMuonCalibStream.cxx:53
EventSelectorMuonCalibStream::next
virtual StatusCode next(Context &it) const
Definition: EventSelectorMuonCalibStream.cxx:59
EventSelectorMuonCalibStream::m_NumEvents
std::atomic< long > m_NumEvents
Definition: EventSelectorMuonCalibStream.h:59
EventSelectorMuonCalibStream::m_SkipEvents
Gaudi::Property< int > m_SkipEvents
Definition: EventSelectorMuonCalibStream.h:52
IMuonCalibStreamDataProviderSvc.h
EventSelectorMuonCalibStream::EventSelectorMuonCalibStream
EventSelectorMuonCalibStream(const std::string &name, ISvcLocator *svcloc)
Definition: EventSelectorMuonCalibStream.cxx:21
skel.it
it
Definition: skel.GENtoEVGEN.py:396
EventSelectorMuonCalibStream::releaseContext
virtual StatusCode releaseContext(Context *&it) const
Definition: EventSelectorMuonCalibStream.cxx:139
EventSelectorMuonCalibStream::initialize
virtual StatusCode initialize()
Definition: EventSelectorMuonCalibStream.cxx:36
EventSelectorMuonCalibStream::previous
virtual StatusCode previous(Context &it) const
Definition: EventSelectorMuonCalibStream.cxx:96
EventSelectorMuonCalibStream::rewind
virtual StatusCode rewind(Context &it) const
Definition: EventSelectorMuonCalibStream.cxx:119
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
EventSelectorMuonCalibStream::~EventSelectorMuonCalibStream
~EventSelectorMuonCalibStream()
Definition: EventSelectorMuonCalibStream.cxx:30
EventSelectorMuonCalibStream
Definition: EventSelectorMuonCalibStream.h:25
EventSelectorMuonCalibStream::last
virtual StatusCode last(Context &it) const
Definition: EventSelectorMuonCalibStream.cxx:105
MuonCalibStreamInputSvc.h
EventSelectorMuonCalibStream::m_beginIter
EventContextMuonCalibStream * m_beginIter
Definition: EventSelectorMuonCalibStream.h:56
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
EventSelectorMuonCalibStream::m_endIter
EventContextMuonCalibStream * m_endIter
Definition: EventSelectorMuonCalibStream.h:57
EventSelectorMuonCalibStream::m_eventSource
ServiceHandle< MuonCalibStreamInputSvc > m_eventSource
Definition: EventSelectorMuonCalibStream.h:53
AthService.h
EventSelectorMuonCalibStream::resetCriteria
virtual StatusCode resetCriteria(const std::string &criteria, Context &context) const
Definition: EventSelectorMuonCalibStream.cxx:114
EventSelectorMuonCalibStream::createAddress
virtual StatusCode createAddress(const Context &it, IOpaqueAddress *&iop) const
Definition: EventSelectorMuonCalibStream.cxx:125
EventContextMuonCalibStream
This class provides the Context for EventSelectorMuonCalibStream.
Definition: EventContextMuonCalibStream.h:23
EventSelectorMuonCalibStream::m_dataProvider
ServiceHandle< IMuonCalibStreamDataProviderSvc > m_dataProvider
Definition: EventSelectorMuonCalibStream.h:54
ServiceHandle< MuonCalibStreamInputSvc >