ATLAS Offline Software
Loading...
Searching...
No Matches
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
6
7void
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();
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
46void
49 MsgStream &log) const
50{
51 log << MSG::ERROR << "LArMphysOverMcalSubsetCnv_p1::transToPers is obsolete" << endmsg;
52 return;
53}
54
#define endmsg
LArConditionsSubset< LArSingleFloatP > LArMpMcTransType
LArMphysOverMcalSubset_p1 LArMpMcPersType
std::vector< unsigned int > m_febIds
std::vector< unsigned int > m_corrChannels
unsigned int subsetSize() const
void initialize(const std::vector< FebId > &ids, unsigned int gain)
Initialize with set of FEB ids.
void setGroupingType(unsigned int type)
set the type of grouping - defined in LArConditionsContainerBase.h
ConstSubsetIt subsetBegin() const
Iterators over subset.
std::vector< CorrectionPair > CorrectionVec
void insertCorrections(CorrectionVec &&corrs)
Insert a group of corrections.
void setChannel(unsigned int channel)
set the COOL channel number
virtual void persToTrans(const LArMpMcPersType *persObj, LArMpMcTransType *transObj, MsgStream &log) const override
virtual void transToPers(const LArMpMcTransType *transObj, LArMpMcPersType *persObj, MsgStream &log) const override
Definition index.py:1