ATLAS Offline Software
Loading...
Searching...
No Matches
MuonCalibStreamTestAlg.cxx
Go to the documentation of this file.
2
3#include "GaudiKernel/IDataProviderSvc.h"
4#include "GaudiKernel/ISvcLocator.h"
5#include "GaudiKernel/SmartDataPtr.h"
11
12MuonCalibStreamTestAlg::MuonCalibStreamTestAlg(const std::string &name, ISvcLocator *pSvcLocator) :
13 AthReentrantAlgorithm(name, pSvcLocator) {}
14
16
17 ATH_MSG_INFO("initialize");
18
19 ATH_CHECK(m_eventInfoKey.initialize());
20 ATH_CHECK(m_MdtPrepDataKey.initialize());
21 ATH_CHECK(m_RpcPrepDataKey.initialize());
22 ATH_CHECK(m_TgcPrepDataKey.initialize());
23
24 return StatusCode::SUCCESS;
25}
26
27// Dumps MDT and RPC data; CSC, TGC not so much because code unfinished
28StatusCode MuonCalibStreamTestAlg::execute(const EventContext& ctx) const {
29 ATH_MSG_DEBUG("execute");
30 // verify EventInfo class
32
33 const xAOD::EventInfo* ei = evtInfo.cptr();
34 // Basic info:
35 ATH_MSG_DEBUG( "runNumber = " << ei->runNumber());
36 ATH_MSG_DEBUG( "eventNumber = " << ei->eventNumber() );
37 ATH_MSG_DEBUG( "lumiBlock = " << ei->lumiBlock() );
38 ATH_MSG_DEBUG( "timeStamp = " << ei->timeStamp());
39 ATH_MSG_DEBUG( "pt = " << ei->timeStampNSOffset() ); // special bit for Muon calibration eventInfo
40 ATH_MSG_DEBUG( "bcid = " << ei->bcid() );
41 ATH_MSG_DEBUG( "detectorMask = " << ei->eventTypeBitmask());
42
43 // verify MdtPrepDataContainer
45 ATH_MSG_DEBUG("****** MDT Container size: " << mdtPrds->size());
46 if (mdtPrds->size()) {
48 Muon::MdtPrepDataContainer::const_iterator it_end = mdtPrds->end();
49
50 for (; it != it_end; ++it) {
51 ATH_MSG_DEBUG("MDT ********** Collections size: " << (*it)->size());
52 Muon::MdtPrepDataCollection::const_iterator cit_begin = (*it)->begin();
55 for (; cit != cit_end; ++cit) {
56 const Muon::MdtPrepData *mdt = (*cit);
57 mdt->dump(msg());
58 }
59 }
60 } // end of MDTPrepDataCollections loop
61
62 // verify RpcPrepDataContainer
64 ATH_MSG_DEBUG("****** RPC Container size: " << rpcPrds->size());
65 // If dumping by container
66 if (rpcPrds->size()) {
68 Muon::RpcPrepDataContainer::const_iterator it_end = rpcPrds->end();
69
70 for (; it != it_end; ++it) {
71 ATH_MSG_DEBUG("********** RPC Collections size: " << (*it)->size());
72 Muon::RpcPrepDataCollection::const_iterator cit_begin = (*it)->begin();
75 for (; cit != cit_end; ++cit) {
76 const Muon::RpcPrepData *rpc = (*cit);
77 rpc->dump(msg());
78 }
79 }
80 }
81
82 // verify TGC_Measurements
84 ATH_MSG_DEBUG("****** TGC Container size: " << tgcPrds->size());
85 if (tgcPrds->size()) {
87 Muon::TgcPrepDataContainer::const_iterator it_end = tgcPrds->end();
88
89 for (; it != it_end; ++it) {
90 ATH_MSG_DEBUG("********** TGC Collections size: " << (*it)->size());
91 Muon::TgcPrepDataCollection::const_iterator cit_begin = (*it)->begin();
94 for (; cit != cit_end; ++cit) {
95 const Muon::TgcPrepData *tgc = (*cit);
96 tgc->dump(msg());
97 }
98 }
99 }
100
101 return StatusCode::SUCCESS;
102} // MuonCalibStreamTestAlg::execute()
103
104StatusCode MuonCalibStreamTestAlg::finalize() { return StatusCode::SUCCESS; }
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_INFO(x)
#define ATH_MSG_DEBUG(x)
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid from which a WriteHandle is made.
An algorithm that can be simultaneously executed in multiple threads.
DataModel_detail::const_iterator< DataVector > const_iterator
Definition DataVector.h:838
SG::ReadHandleKey< Muon::TgcPrepDataContainer > m_TgcPrepDataKey
virtual StatusCode initialize() override
Initialize.
virtual StatusCode finalize() override
SG::ReadHandleKey< Muon::MdtPrepDataContainer > m_MdtPrepDataKey
virtual StatusCode execute(const EventContext &ctx) const override
Execute.
MuonCalibStreamTestAlg(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
SG::ReadHandleKey< Muon::RpcPrepDataContainer > m_RpcPrepDataKey
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey
Class to represent measurements from the Monitored Drift Tubes.
Definition MdtPrepData.h:33
virtual MsgStream & dump(MsgStream &stream) const override
Dumps information about the PRD.
Class to represent RPC measurements.
Definition RpcPrepData.h:35
virtual MsgStream & dump(MsgStream &stream) const override
Dumps information about the PRD.
Class to represent TGC measurements.
Definition TgcPrepData.h:32
virtual MsgStream & dump(MsgStream &stream) const override final
Dumps information about the PRD.
const_pointer_type cptr()
Dereference the pointer.
uint32_t lumiBlock() const
The current event's luminosity block number.
uint32_t eventTypeBitmask() const
The event type bitmask.
uint32_t bcid() const
The bunch crossing ID of the event.
uint32_t timeStamp() const
POSIX time in seconds from 1970. January 1st.
uint32_t runNumber() const
The current event's run number.
uint32_t timeStampNSOffset() const
Nanosecond time offset wrt. the time stamp.
uint64_t eventNumber() const
The current event's event number.
EventInfo_v1 EventInfo
Definition of the latest event info version.