ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
MuonSpectrometer
MuonCalib
MuonCalibStream
MuonCalibStreamCnv
src
MuonCalibStreamTestAlg.cxx
Go to the documentation of this file.
1
#include "
MuonCalibStreamCnv/MuonCalibStreamTestAlg.h
"
2
3
#include "GaudiKernel/IDataProviderSvc.h"
4
#include "GaudiKernel/ISvcLocator.h"
5
#include "GaudiKernel/SmartDataPtr.h"
6
#include "
MuonPrepRawData/MuonPrepDataContainer.h
"
7
#include "
MuonRDO/CscRawDataContainer.h
"
8
#include "
StoreGate/ReadHandleKey.h
"
9
#include "
StoreGate/WriteHandleKey.h
"
10
#include "
xAODEventInfo/EventInfo.h
"
11
12
MuonCalibStreamTestAlg::MuonCalibStreamTestAlg
(
const
std::string &name, ISvcLocator *pSvcLocator) :
13
AthReentrantAlgorithm
(name, pSvcLocator) {}
14
15
StatusCode
MuonCalibStreamTestAlg::initialize
() {
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
28
StatusCode
MuonCalibStreamTestAlg::execute
(
const
EventContext& ctx)
const
{
29
ATH_MSG_DEBUG
(
"execute"
);
30
// verify EventInfo class
31
SG::ReadHandle<xAOD::EventInfo>
evtInfo(
m_eventInfoKey
, ctx);
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
44
SG::ReadHandle<Muon::MdtPrepDataContainer>
mdtPrds(
m_MdtPrepDataKey
, ctx);
45
ATH_MSG_DEBUG
(
"****** MDT Container size: "
<< mdtPrds->size());
46
if
(mdtPrds->size()) {
47
Muon::MdtPrepDataContainer::const_iterator
it = mdtPrds->begin();
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();
53
Muon::MdtPrepDataCollection::const_iterator
cit_end = (*it)->end();
54
Muon::MdtPrepDataCollection::const_iterator
cit = cit_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
63
SG::ReadHandle<Muon::RpcPrepDataContainer>
rpcPrds(
m_RpcPrepDataKey
, ctx);
64
ATH_MSG_DEBUG
(
"****** RPC Container size: "
<< rpcPrds->size());
65
// If dumping by container
66
if
(rpcPrds->size()) {
67
Muon::RpcPrepDataContainer::const_iterator
it = rpcPrds->begin();
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();
73
Muon::RpcPrepDataCollection::const_iterator
cit_end = (*it)->end();
74
Muon::RpcPrepDataCollection::const_iterator
cit = cit_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
83
SG::ReadHandle<Muon::TgcPrepDataContainer>
tgcPrds(
m_TgcPrepDataKey
, ctx);
84
ATH_MSG_DEBUG
(
"****** TGC Container size: "
<< tgcPrds->size());
85
if
(tgcPrds->size()) {
86
Muon::TgcPrepDataContainer::const_iterator
it = tgcPrds->begin();
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();
92
Muon::TgcPrepDataCollection::const_iterator
cit_end = (*it)->end();
93
Muon::TgcPrepDataCollection::const_iterator
cit = cit_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
104
StatusCode
MuonCalibStreamTestAlg::finalize
() {
return
StatusCode::SUCCESS; }
ATH_CHECK
#define ATH_CHECK
Evaluate an expression and check for errors.
Definition
AthCheckMacros.h:40
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition
AthMsgStreamMacros.h:31
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition
AthMsgStreamMacros.h:29
CscRawDataContainer.h
MuonCalibStreamTestAlg.h
MuonPrepDataContainer.h
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
WriteHandleKey.h
Property holding a SG store/key/clid from which a WriteHandle is made.
AthCommonAlgorithm< Gaudi::Algorithm >::msg
MsgStream & msg() const
Definition
AthCommonMsg.h:24
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition
AthReentrantAlgorithm.h:74
Muon::MuonPrepDataCollection< MdtPrepData >::const_iterator
DataModel_detail::const_iterator< DataVector > const_iterator
Definition
DataVector.h:838
IdentifiableContainerMT::const_iterator
Definition
IdentifiableContainerMT.h:82
MuonCalibStreamTestAlg::m_TgcPrepDataKey
SG::ReadHandleKey< Muon::TgcPrepDataContainer > m_TgcPrepDataKey
Definition
MuonCalibStreamTestAlg.h:40
MuonCalibStreamTestAlg::initialize
virtual StatusCode initialize() override
Initialize.
Definition
MuonCalibStreamTestAlg.cxx:15
MuonCalibStreamTestAlg::finalize
virtual StatusCode finalize() override
Definition
MuonCalibStreamTestAlg.cxx:104
MuonCalibStreamTestAlg::m_MdtPrepDataKey
SG::ReadHandleKey< Muon::MdtPrepDataContainer > m_MdtPrepDataKey
Definition
MuonCalibStreamTestAlg.h:38
MuonCalibStreamTestAlg::execute
virtual StatusCode execute(const EventContext &ctx) const override
Execute.
Definition
MuonCalibStreamTestAlg.cxx:28
MuonCalibStreamTestAlg::MuonCalibStreamTestAlg
MuonCalibStreamTestAlg(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
Definition
MuonCalibStreamTestAlg.cxx:12
MuonCalibStreamTestAlg::m_RpcPrepDataKey
SG::ReadHandleKey< Muon::RpcPrepDataContainer > m_RpcPrepDataKey
Definition
MuonCalibStreamTestAlg.h:39
MuonCalibStreamTestAlg::m_eventInfoKey
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey
Definition
MuonCalibStreamTestAlg.h:37
Muon::MdtPrepData
Class to represent measurements from the Monitored Drift Tubes.
Definition
MdtPrepData.h:33
Muon::MdtPrepData::dump
virtual MsgStream & dump(MsgStream &stream) const override
Dumps information about the PRD.
Definition
MdtPrepData.cxx:87
Muon::RpcPrepData
Class to represent RPC measurements.
Definition
RpcPrepData.h:35
Muon::RpcPrepData::dump
virtual MsgStream & dump(MsgStream &stream) const override
Dumps information about the PRD.
Definition
RpcPrepData.cxx:119
Muon::TgcPrepData
Class to represent TGC measurements.
Definition
TgcPrepData.h:32
Muon::TgcPrepData::dump
virtual MsgStream & dump(MsgStream &stream) const override final
Dumps information about the PRD.
Definition
TgcPrepData.cxx:85
SG::ReadHandle
Definition
StoreGate/StoreGate/ReadHandle.h:67
SG::ReadHandle::cptr
const_pointer_type cptr()
Dereference the pointer.
xAOD::EventInfo_v1::lumiBlock
uint32_t lumiBlock() const
The current event's luminosity block number.
xAOD::EventInfo_v1::eventTypeBitmask
uint32_t eventTypeBitmask() const
The event type bitmask.
xAOD::EventInfo_v1::bcid
uint32_t bcid() const
The bunch crossing ID of the event.
xAOD::EventInfo_v1::timeStamp
uint32_t timeStamp() const
POSIX time in seconds from 1970. January 1st.
xAOD::EventInfo_v1::runNumber
uint32_t runNumber() const
The current event's run number.
xAOD::EventInfo_v1::timeStampNSOffset
uint32_t timeStampNSOffset() const
Nanosecond time offset wrt. the time stamp.
xAOD::EventInfo_v1::eventNumber
uint64_t eventNumber() const
The current event's event number.
xAOD::EventInfo
EventInfo_v1 EventInfo
Definition of the latest event info version.
Definition
IEventInfoCnvTool.h:16
EventInfo.h
Generated on
for ATLAS Offline Software by
1.17.0