ATLAS Offline Software
Loading...
Searching...
No Matches
EventSelectorMuonCalibStream Class Reference

#include <EventSelectorMuonCalibStream.h>

Inheritance diagram for EventSelectorMuonCalibStream:
Collaboration diagram for EventSelectorMuonCalibStream:

Public Member Functions

 EventSelectorMuonCalibStream (const std::string &name, ISvcLocator *svcloc)
 ~EventSelectorMuonCalibStream ()
virtual StatusCode initialize ()
virtual StatusCode createContext (Context *&it) const
virtual StatusCode next (Context &it) const
virtual StatusCode next (Context &it, int jump) const
virtual StatusCode previous (Context &it) const
virtual StatusCode previous (Context &it, int jump) const
virtual StatusCode last (Context &it) const
virtual StatusCode rewind (Context &it) const
virtual StatusCode createAddress (const Context &it, IOpaqueAddress *&iop) const
virtual StatusCode releaseContext (Context *&it) const
virtual StatusCode resetCriteria (const std::string &criteria, Context &context) const

Private Attributes

Gaudi::Property< int > m_SkipEvents {this, "SkipEvents", 0, "Number of events to skip at the beginning"}
ServiceHandle< MuonCalibStreamInputSvcm_eventSource { this, "MuonCalibStreamInputSvc", "MuonCalibStreamFileInputSvc"}
ServiceHandle< IMuonCalibStreamDataProviderSvcm_dataProvider {this, "DataProvider", "MuonCalibStreamDataProviderSvc"}
EventContextMuonCalibStreamm_beginIter
EventContextMuonCalibStreamm_endIter
std::atomic< long > m_NumEvents {0}

Detailed Description

Definition at line 25 of file EventSelectorMuonCalibStream.h.

Constructor & Destructor Documentation

◆ EventSelectorMuonCalibStream()

EventSelectorMuonCalibStream::EventSelectorMuonCalibStream ( const std::string & name,
ISvcLocator * svcloc )

Definition at line 21 of file EventSelectorMuonCalibStream.cxx.

21 :
22 base_class(name, svcloc),
23 m_beginIter(nullptr),
24 m_endIter(nullptr)
25{
26 ATH_MSG_DEBUG("EventSelectorMuonCalibStream constructor");
27}
#define ATH_MSG_DEBUG(x)
EventContextMuonCalibStream * m_endIter
EventContextMuonCalibStream * m_beginIter

◆ ~EventSelectorMuonCalibStream()

EventSelectorMuonCalibStream::~EventSelectorMuonCalibStream ( )

Definition at line 30 of file EventSelectorMuonCalibStream.cxx.

30 {
31 if (m_beginIter) delete m_beginIter;
32 if (m_endIter) delete m_endIter;
33}

Member Function Documentation

◆ createAddress()

StatusCode EventSelectorMuonCalibStream::createAddress ( const Context & it,
IOpaqueAddress *& iop ) const
virtual

Definition at line 125 of file EventSelectorMuonCalibStream.cxx.

125 {
126 ATH_MSG_DEBUG("EventSelectorMuonCalibStream::createAddress");
127 const LVL2_MUON_CALIBRATION::CalibEvent *pre = m_eventSource->currentEvent();
128 m_dataProvider->setNextEvent(pre);
129 ATH_MSG_DEBUG("Calib Event cached in Data Provider ");
130
131 iop = new MuonCalibStreamAddress(ClassID_traits<xAOD::EventInfo>::ID(), "EventInfo", ""); // change to xAOD::EventInfo key
132 //iop = new MuonCalibStreamAddress(ClassID_traits<xAOD::EventInfo>::ID(), "MuonCalibStreamEventInfo", ""); // old key which need the conversion afterwards
133 ATH_MSG_DEBUG("MuonCalibStreamAddress for MuonCalibStreamEventInfo created ");
134
135 return (StatusCode::SUCCESS);
136}
ServiceHandle< IMuonCalibStreamDataProviderSvc > m_dataProvider
ServiceHandle< MuonCalibStreamInputSvc > m_eventSource

◆ createContext()

StatusCode EventSelectorMuonCalibStream::createContext ( Context *& it) const
virtual

Definition at line 53 of file EventSelectorMuonCalibStream.cxx.

53 {
54 it = new EventContextMuonCalibStream(this);
55 return (StatusCode::SUCCESS);
56}

◆ initialize()

StatusCode EventSelectorMuonCalibStream::initialize ( )
virtual

Definition at line 36 of file EventSelectorMuonCalibStream.cxx.

36 {
37 ATH_MSG_INFO("EventSelectorMuonCalibStream::initialize");
38
39 // Check MuonCalibStreamCnvSvc
40 ATH_CHECK( m_eventSource.retrieve() );
41
42 ATH_CHECK( m_dataProvider.retrieve() );
43
44 // Create the begin and end iterators for this selector.
45 m_beginIter = new EventContextMuonCalibStream(this);
46 // increment to get the new event in.
47 // ++(*m_beginIter); ???
48 m_endIter = new EventContextMuonCalibStream(0);
49
50 return StatusCode::SUCCESS;
51}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_INFO(x)

◆ last()

StatusCode EventSelectorMuonCalibStream::last ( Context & it) const
virtual

Definition at line 105 of file EventSelectorMuonCalibStream.cxx.

105 {
106 if (it.identifier() == m_endIter->identifier()) {
107 ATH_MSG_DEBUG("last(): Last event in InputStream.");
108 return (StatusCode::SUCCESS);
109 }
110 return (StatusCode::FAILURE);
111}

◆ next() [1/2]

virtual StatusCode EventSelectorMuonCalibStream::next ( Context & it) const
virtual

◆ next() [2/2]

virtual StatusCode EventSelectorMuonCalibStream::next ( Context & it,
int jump ) const
virtual

◆ previous() [1/2]

virtual StatusCode EventSelectorMuonCalibStream::previous ( Context & it) const
virtual

◆ previous() [2/2]

virtual StatusCode EventSelectorMuonCalibStream::previous ( Context & it,
int jump ) const
virtual

◆ releaseContext()

StatusCode EventSelectorMuonCalibStream::releaseContext ( Context *& it) const
virtual

Definition at line 139 of file EventSelectorMuonCalibStream.cxx.

139{ return (StatusCode::SUCCESS); }

◆ resetCriteria()

StatusCode EventSelectorMuonCalibStream::resetCriteria ( const std::string & criteria,
Context & context ) const
virtual

Definition at line 114 of file EventSelectorMuonCalibStream.cxx.

114 {
115 return (StatusCode::SUCCESS);
116}

◆ rewind()

StatusCode EventSelectorMuonCalibStream::rewind ( Context & it) const
virtual

Definition at line 119 of file EventSelectorMuonCalibStream.cxx.

119 {
120 ATH_MSG_ERROR("EventSelectorMuonCalibStream::rewind() not implemented");
121 return (StatusCode::FAILURE);
122}
#define ATH_MSG_ERROR(x)

Member Data Documentation

◆ m_beginIter

EventContextMuonCalibStream* EventSelectorMuonCalibStream::m_beginIter
private

Definition at line 56 of file EventSelectorMuonCalibStream.h.

◆ m_dataProvider

ServiceHandle<IMuonCalibStreamDataProviderSvc> EventSelectorMuonCalibStream::m_dataProvider {this, "DataProvider", "MuonCalibStreamDataProviderSvc"}
private

Definition at line 54 of file EventSelectorMuonCalibStream.h.

54{this, "DataProvider", "MuonCalibStreamDataProviderSvc"};

◆ m_endIter

EventContextMuonCalibStream* EventSelectorMuonCalibStream::m_endIter
private

Definition at line 57 of file EventSelectorMuonCalibStream.h.

◆ m_eventSource

ServiceHandle<MuonCalibStreamInputSvc> EventSelectorMuonCalibStream::m_eventSource { this, "MuonCalibStreamInputSvc", "MuonCalibStreamFileInputSvc"}
private

Definition at line 53 of file EventSelectorMuonCalibStream.h.

53{ this, "MuonCalibStreamInputSvc", "MuonCalibStreamFileInputSvc"};

◆ m_NumEvents

std::atomic<long> EventSelectorMuonCalibStream::m_NumEvents {0}
mutableprivate

Definition at line 59 of file EventSelectorMuonCalibStream.h.

59{0}; // Number of Events read so far.

◆ m_SkipEvents

Gaudi::Property<int> EventSelectorMuonCalibStream::m_SkipEvents {this, "SkipEvents", 0, "Number of events to skip at the beginning"}
private

Definition at line 52 of file EventSelectorMuonCalibStream.h.

52{this, "SkipEvents", 0, "Number of events to skip at the beginning"};

The documentation for this class was generated from the following files: