ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
MuonSpectrometer
MuonCnv
MuonEventAthenaPool
src
CscRawDataCnv_p3.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
MuonRDO/CscRawData.h
"
6
#include "
CscRawDataCnv_p3.h
"
7
#include "GaudiKernel/GaudiException.h"
8
#include <TString.h>
// for Form
9
10
void
11
CscRawDataCnv_p3::transToPers
(
const
CscRawData
*
trans
,
CscRawData_p3
* pers, MsgStream &)
12
{
13
pers->
m_amps
=
trans
->samples();
14
pers->
m_address
=
trans
->address();
15
pers->
m_id
=
trans
->identify();
16
pers->
m_time
=
trans
->time();
17
pers->
m_rpuID
=
trans
->rpuID();
18
pers->
m_width
=
trans
->width();
19
pers->
m_isTimeComputed
=
trans
->isTimeComputed();
20
if
(
m_idHelp
) {
21
// translate the transient (positional) hash into a geometrical hash as expected by the p3 persistent data format
22
IdContext
context =
m_idHelp
->cscIdHelper().channel_context();
23
Identifier
id;
24
IdentifierHash
geoHash;
25
if
(!
m_idHelp
->cscIdHelper().get_id(
trans
->hashId(),
id
, &context)) {
26
if
(!
m_idHelp
->cscIdHelper().get_channel_hash(
id
, geoHash)) pers->
m_hashId
= geoHash;
27
}
28
}
else
{
29
throw
std::runtime_error(Form(
"File: %s, Line: %d\nCscRawDataCnv_p3::transToPers() - No MuonIdHelperSvc present (needed for channel hash conversion)"
, __FILE__, __LINE__));
30
}
31
}
32
33
void
34
CscRawDataCnv_p3::persToTrans
(
const
CscRawData_p3
* pers,
CscRawData
*
trans
, MsgStream &)
35
{
36
*
trans
=
CscRawData
(pers->
m_amps
,
37
pers->
m_address
,
38
pers->
m_id
,
39
pers->
m_rpuID
,
40
pers->
m_width
);
41
// translate the persistent p3 (geometrical) hash into a positional hash (as expected by the transient data format)
42
trans
->setHashID(pers->
m_hashId
);
43
44
if
(pers->
m_isTimeComputed
)
45
trans
->setTime (pers->
m_time
);
46
}
CscRawDataCnv_p3.h
CscRawData.h
CscRawData
CscRawData
Definition
MuonEventAthenaPoolTPCnv.cxx:59
CscRawDataCnv_p3::transToPers
virtual void transToPers(const CscRawData *transObj, CscRawData_p3 *persObj, MsgStream &log)
Definition
CscRawDataCnv_p3.cxx:11
CscRawDataCnv_p3::persToTrans
virtual void persToTrans(const CscRawData_p3 *persObj, CscRawData *transObj, MsgStream &log)
Definition
CscRawDataCnv_p3.cxx:34
CscRawDataCnv_p3::m_idHelp
Muon::IMuonIdHelperSvc * m_idHelp
Definition
CscRawDataCnv_p3.h:29
CscRawData_p3
Definition
CscRawData_p3.h:17
CscRawData_p3::m_address
uint32_t m_address
online identifier of the first strip in the ROD cluster
Definition
CscRawData_p3.h:40
CscRawData_p3::m_time
uint16_t m_time
online peaking time of the first strip: this is 0 if failed to compute time in the ROD
Definition
CscRawData_p3.h:49
CscRawData_p3::m_isTimeComputed
bool m_isTimeComputed
failed to compute the time in the ROD or not - if failure m_time = 0
Definition
CscRawData_p3.h:55
CscRawData_p3::m_amps
std::vector< uint16_t > m_amps
in common with _p1
Definition
CscRawData_p3.h:38
CscRawData_p3::m_id
uint16_t m_id
online identifier of the collection in which this strip is
Definition
CscRawData_p3.h:42
CscRawData_p3::m_hashId
uint32_t m_hashId
offline hash identifier of the first strip in the online cluster
Definition
CscRawData_p3.h:57
CscRawData_p3::m_rpuID
uint16_t m_rpuID
SPU -Sparsifier Processing Unit - identifier in which this strip is.
Definition
CscRawData_p3.h:51
CscRawData_p3::m_width
uint16_t m_width
number of consecutive strips forming the on-line cluster
Definition
CscRawData_p3.h:53
CscRawData
Class to hold the electronic output for a single CSC readout channel: n sampling ADC data + the addre...
Definition
CscRawData.h:21
IdContext
This class saves the "context" of an expanded identifier (ExpandedIdentifier) for compact or hash ver...
Definition
IdContext.h:26
IdentifierHash
This is a "hash" representation of an Identifier.
Definition
IdentifierHash.h:25
trans
TH1F * trans(TH1F *h, bool t=false)
Definition
comparitor.cxx:186
Identifier
Definition
IdentifierFieldParser.cxx:14
Generated on
for ATLAS Offline Software by
1.17.0