ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
MuonSpectrometer
MuonCnv
MuonMM_CnvTools
src
MM_RDO_Decoder.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
MM_RDO_Decoder.h
"
6
7
using namespace
Muon
;
8
9
MM_RDO_Decoder::MM_RDO_Decoder
(
const
std::string&
type
,
const
std::string& name,
const
IInterface* parent) :
10
AthAlgTool
(
type
,name,parent),
11
m_mmIdHelper
(nullptr)
12
{
13
declareInterface< Muon::IMM_RDO_Decoder >(
this
);
14
}
15
16
StatusCode
MM_RDO_Decoder::initialize
() {
17
18
ATH_CHECK
(
detStore
()->retrieve(
m_mmIdHelper
,
"MMIDHELPER"
));
19
ATH_CHECK
(
m_calibTool
.retrieve());
20
21
return
StatusCode::SUCCESS;
22
}
23
24
25
std::unique_ptr<MmDigit>
Muon::MM_RDO_Decoder::getDigit
(
const
EventContext& ctx,
26
const
Muon::MM_RawData
* data)
const
{
27
28
// unit conversion
29
const
Identifier
Id = data->identify();
30
int
tdo = data->time();
31
int
pdo = data->charge();
32
uint16_t relBcid = data->relBcid();
33
// MM_RawData has time and charge in counts, need physical units
34
float
charge
{0}, time{0.};
35
m_calibTool
->tdoToTime (ctx, data->timeAndChargeInCounts(), tdo, Id, time , relBcid);
36
m_calibTool
->pdoToCharge(ctx, data->timeAndChargeInCounts(), pdo, Id,
charge
);
37
38
39
// MM_RawData is built using only the first 4 values. The others are now simply filled proper objects.
40
return
std::make_unique<MmDigit>(Id, time,
charge
);
41
}
ATH_CHECK
#define ATH_CHECK
Evaluate an expression and check for errors.
Definition
AthCheckMacros.h:40
charge
double charge(const T &p)
Definition
AtlasPID.h:1003
MM_RDO_Decoder.h
AthAlgTool::AthAlgTool
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
Definition
AthAlgTool.cxx:16
AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore
const ServiceHandle< StoreGateSvc > & detStore() const
Definition
AthCommonDataStore.h:95
Muon::MM_RDO_Decoder::getDigit
std::unique_ptr< MmDigit > getDigit(const EventContext &ctx, const Muon::MM_RawData *data) const override final
Definition
MM_RDO_Decoder.cxx:25
Muon::MM_RDO_Decoder::m_mmIdHelper
const MmIdHelper * m_mmIdHelper
Definition
MM_RDO_Decoder.h:40
Muon::MM_RDO_Decoder::MM_RDO_Decoder
MM_RDO_Decoder(const std::string &type, const std::string &name, const IInterface *parent)
Definition
MM_RDO_Decoder.cxx:9
Muon::MM_RDO_Decoder::initialize
virtual StatusCode initialize() override final
Definition
MM_RDO_Decoder.cxx:16
Muon::MM_RDO_Decoder::m_calibTool
ToolHandle< Muon::INSWCalibTool > m_calibTool
Definition
MM_RDO_Decoder.h:41
Muon::MM_RawData
Temporary class to hold the MM RDO.
Definition
MM_RawData.h:20
Identifier
Definition
IdentifierFieldParser.cxx:14
Muon
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
Definition
TrackSystemController.h:46
type
Generated on
for ATLAS Offline Software by
1.17.0