ATLAS Offline Software
LArCalorimeter
LArCnv
LArTPCnv
src
LArRawChannelCnv_p1.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
LArRawEvent/LArRawChannel.h
"
6
#include "
CaloIdentifier/CaloGain.h
"
7
#include "
LArTPCnv/LArRawChannelCnv_p1.h
"
8
9
// LArRawChannelCnv_p1, used for T/P separation
10
// author R.Seuster <seuster@cern.ch>
11
12
void
LArRawChannelCnv_p1::transToPers
(
const
LArRawChannel
*
/*trans*/
,
LArRawChannel_p1
*
/*pers*/
, MsgStream &
/*log*/
)
const
13
{
14
// No longer used
15
}
16
17
void
LArRawChannelCnv_p1::persToTrans
(
const
LArRawChannel_p1
* pers,
LArRawChannel
* trans, MsgStream &
/*log*/
)
const
18
{
19
union
{
20
int
m_quality ;
21
uint16_t
m_qualProv[2];
22
} qprov{};
23
24
// FIXME: persistent data is machine-dependent!
25
int
q
= pers->
m_qualityandgain
& 0xFFFF;
26
if
(
q
==65535) {
27
qprov.m_quality = 0xA50000;
28
}
29
else
{
30
qprov.m_quality = 0x20A50000 |
q
;
31
}
32
33
*trans =
LArRawChannel
(
HWIdentifier
(
Identifier32
(pers->
m_channelID
)),
34
pers->
m_energy
,
35
pers->
m_time
,
36
qprov.m_qualProv[0],
// quality
37
qprov.m_qualProv[1],
// provenance
38
(
CaloGain::CaloGain
)((pers->
m_qualityandgain
>>16)&0xF)
39
);
40
}
41
LArRawChannel_p1::m_qualityandgain
int m_qualityandgain
Definition:
LArRawChannel_p1.h:34
Identifier32
Definition:
Identifier32.h:25
LArRawChannel_p1::m_time
int m_time
Definition:
LArRawChannel_p1.h:32
HWIdentifier
Definition:
HWIdentifier.h:13
LArRawChannelCnv_p1.h
xAOD::uint16_t
setWord1 uint16_t
Definition:
eFexEMRoI_v1.cxx:93
LArRawChannel
Liquid Argon ROD output object base class.
Definition:
LArRawChannel.h:40
LArRawChannelCnv_p1::persToTrans
virtual void persToTrans(const LArRawChannel_p1 *pers, LArRawChannel *trans, MsgStream &log) const override
Definition:
LArRawChannelCnv_p1.cxx:17
LArRawChannel.h
CaloGain::CaloGain
CaloGain
Definition:
CaloGain.h:11
LArRawChannel_p1::m_channelID
unsigned int m_channelID
Definition:
LArRawChannel_p1.h:30
extractSporadic.q
list q
Definition:
extractSporadic.py:98
LArRawChannelCnv_p1::transToPers
virtual void transToPers(const LArRawChannel *trans, LArRawChannel_p1 *pers, MsgStream &log) const override
Definition:
LArRawChannelCnv_p1.cxx:12
LArRawChannel_p1
persistent class for LArRawChannel, version p1.
Definition:
LArRawChannel_p1.h:14
LArRawChannel_p1::m_energy
int m_energy
Definition:
LArRawChannel_p1.h:31
CaloGain.h
Generated on Sun Dec 22 2024 21:13:41 for ATLAS Offline Software by
1.8.18