ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
LArCalorimeter
LArCnv
LArCondTPCnv
src
LArMphysOverMcalSubsetCnv_p1.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 "
LArCondTPCnv/LArMphysOverMcalSubsetCnv_p1.h
"
6
7
void
8
LArMphysOverMcalSubsetCnv_p1::persToTrans
(
const
LArMpMcPersType
* persObj,
9
LArMpMcTransType
* transObj,
10
MsgStream &
/*log*/
)
const
11
{
12
transObj->
initialize
(persObj->
m_subset
.
m_febIds
, persObj->
m_subset
.
m_gain
);
13
14
unsigned
int
nfebids = persObj->
m_subset
.
m_febIds
.size();
15
unsigned
index
=0;
16
const
unsigned
int
nChannelsPerFeb = persObj->
m_subset
.
subsetSize
();
17
auto
subsetIt = transObj->
subsetBegin
();
18
for
(
unsigned
int
i = 0; i < nfebids; ++i, ++subsetIt){
19
// Loop over channels in feb
20
for
(
unsigned
int
j = 0; j < nChannelsPerFeb; ++j){
21
subsetIt->second[j].m_data=persObj->
m_values
[
index
];
22
++
index
;
23
}
24
}
25
26
unsigned
int
ncorrs = persObj->
m_subset
.
m_corrChannels
.size();
27
LArMpMcTransType::CorrectionVec
corrs;
28
corrs.resize(ncorrs);
29
30
// Loop over corrections
31
for
(
unsigned
int
i = 0; i < ncorrs; ++i){
32
corrs[i].first = persObj->
m_subset
.
m_corrChannels
[i];
33
corrs[i].second.m_data=persObj->
m_values
[
index
];
34
++
index
;
35
}
36
transObj->
insertCorrections
(std::move (corrs));
37
38
// Copy the rest
39
transObj->
setChannel
(persObj->
m_subset
.
m_channel
);
40
transObj->
setGroupingType
(persObj->
m_subset
.
m_groupingType
);
41
42
return
;
43
}
44
45
46
void
47
LArMphysOverMcalSubsetCnv_p1::transToPers
(
const
LArMpMcTransType
*,
48
LArMpMcPersType
*,
49
MsgStream &log)
const
50
{
51
log << MSG::ERROR <<
"LArMphysOverMcalSubsetCnv_p1::transToPers is obsolete"
<<
endmsg
;
52
return
;
53
}
54
endmsg
#define endmsg
Definition
AnalysisConfig_Ntuple.cxx:54
LArMphysOverMcalSubsetCnv_p1.h
LArMpMcTransType
LArConditionsSubset< LArSingleFloatP > LArMpMcTransType
Definition
LArMphysOverMcalSubsetCnv_p1.h:17
LArMpMcPersType
LArMphysOverMcalSubset_p1 LArMpMcPersType
Definition
LArMphysOverMcalSubsetCnv_p1.h:18
LArConditionsSubset_p1::m_febIds
std::vector< unsigned int > m_febIds
Definition
LArConditionsSubset_p1.h:75
LArConditionsSubset_p1::m_gain
unsigned int m_gain
Definition
LArConditionsSubset_p1.h:78
LArConditionsSubset_p1::m_corrChannels
std::vector< unsigned int > m_corrChannels
Definition
LArConditionsSubset_p1.h:76
LArConditionsSubset_p1::subsetSize
unsigned int subsetSize() const
Definition
LArConditionsSubset_p1.h:82
LArConditionsSubset_p1::m_channel
unsigned int m_channel
Definition
LArConditionsSubset_p1.h:79
LArConditionsSubset_p1::m_groupingType
unsigned int m_groupingType
Definition
LArConditionsSubset_p1.h:80
LArConditionsSubset::initialize
void initialize(const std::vector< FebId > &ids, unsigned int gain)
Initialize with set of FEB ids.
Definition
LArConditionsSubset.h:529
LArConditionsSubset::setGroupingType
void setGroupingType(unsigned int type)
set the type of grouping - defined in LArConditionsContainerBase.h
Definition
LArConditionsSubset.h:575
LArConditionsSubset::subsetBegin
ConstSubsetIt subsetBegin() const
Iterators over subset.
Definition
LArConditionsSubset.h:412
LArConditionsSubset< LArSingleFloatP >::CorrectionVec
std::vector< CorrectionPair > CorrectionVec
Definition
LArConditionsSubset.h:144
LArConditionsSubset::insertCorrections
void insertCorrections(CorrectionVec &&corrs)
Insert a group of corrections.
Definition
LArConditionsSubset.h:593
LArConditionsSubset::setChannel
void setChannel(unsigned int channel)
set the COOL channel number
Definition
LArConditionsSubset.h:567
LArMphysOverMcalSubsetCnv_p1::persToTrans
virtual void persToTrans(const LArMpMcPersType *persObj, LArMpMcTransType *transObj, MsgStream &log) const override
Definition
LArMphysOverMcalSubsetCnv_p1.cxx:8
LArMphysOverMcalSubsetCnv_p1::transToPers
virtual void transToPers(const LArMpMcTransType *transObj, LArMpMcPersType *persObj, MsgStream &log) const override
Definition
LArMphysOverMcalSubsetCnv_p1.cxx:47
LArMphysOverMcalSubset_p1::m_subset
LArConditionsSubset_p1 m_subset
Definition
LArMphysOverMcalSubset_p1.h:34
LArMphysOverMcalSubset_p1::m_values
std::vector< float > m_values
Definition
LArMphysOverMcalSubset_p1.h:35
index
Definition
index.py:1
Generated on
for ATLAS Offline Software by
1.17.0