ATLAS Offline Software
LArNoisyROSummaryCnv_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 
7 
9 {
10  log << MSG::DEBUG << " in LArNoisyROSummaryCnv_p1::transToPers " << endmsg;
11 
12  size_t sfebs = trans->get_noisy_febs().size();
13  pers->m_noisy_febs.reserve(sfebs);
14  for (const HWIdentifier& hwid : trans->get_noisy_febs())
15  {
16  pers->m_noisy_febs.push_back (hwid.get_identifier32().get_compact());
17  }
18 
19  pers->m_noisy_preamps.clear();
20  pers->m_noisy_preamps.reserve(trans->get_noisy_preamps().size());
21  for (const std::pair<HWIdentifier, std::vector<int> >& p :
22  trans->get_noisy_preamps())
23  {
24  pers->m_noisy_preamps.emplace_back (p.first.get_identifier32().get_compact(),
25  p.second);
26  }
27 }
28 
30 {
31  log << MSG::DEBUG << " in LArNoisyROSummaryCnv_p1::persToTrans " << endmsg;
32  trans->clear();
33 
34  size_t sfebs = pers->m_noisy_febs.size();
35  for ( size_t i = 0; i < sfebs; i++)
36  {
37  HWIdentifier febId(Identifier32(pers->m_noisy_febs[i]));
38  trans->add_noisy_feb(febId);
39  }
40 
41  size_t spas = pers->m_noisy_preamps.size();
42  for ( size_t i = 0; i < spas; i++)
43  {
44  size_t schan = pers->m_noisy_preamps[i].second.size();
45  for ( size_t j = 0; j < schan; j++ )
46  {
47  HWIdentifier febId(Identifier32(pers->m_noisy_preamps[i].first));
48  trans->add_noisy_preamp(febId,pers->m_noisy_preamps[i].second[j]);
49  }
50  }
51 }
Identifier32
Definition: Identifier32.h:25
LArNoisyROSummary::get_noisy_preamps
const std::vector< std::pair< HWIdentifier, std::vector< int > > > & get_noisy_preamps() const
Definition: LArNoisyROSummary.cxx:136
LArNoisyROSummaryCnv_p1::persToTrans
virtual void persToTrans(const LArNoisyROSummary_p1 *pers, LArNoisyROSummary *trans, MsgStream &log) const override
Definition: LArNoisyROSummaryCnv_p1.cxx:29
LArNoisyROSummaryCnv_p1.h
HWIdentifier
Definition: HWIdentifier.h:13
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
LArNoisyROSummary_p1::m_noisy_febs
std::vector< unsigned int > m_noisy_febs
Definition: LArNoisyROSummary_p1.h:16
lumiFormat.i
int i
Definition: lumiFormat.py:85
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
LArNoisyROSummary::get_noisy_febs
const std::vector< HWIdentifier > & get_noisy_febs() const
Definition: LArNoisyROSummary.cxx:115
LArNoisyROSummary::clear
void clear()
Definition: LArNoisyROSummary.cxx:24
LArNoisyROSummary.h
LArNoisyROSummaryCnv_p1::transToPers
virtual void transToPers(const LArNoisyROSummary *trans, LArNoisyROSummary_p1 *pers, MsgStream &log) const override
Definition: LArNoisyROSummaryCnv_p1.cxx:8
LArNoisyROSummary_p1
Definition: LArNoisyROSummary_p1.h:12
DEBUG
#define DEBUG
Definition: page_access.h:11
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
LArNoisyROSummary::add_noisy_preamp
void add_noisy_preamp(HWIdentifier febid, int channel)
Definition: LArNoisyROSummary.cxx:92
LArNoisyROSummary_p1::m_noisy_preamps
std::vector< std::pair< unsigned int, std::vector< int > > > m_noisy_preamps
Definition: LArNoisyROSummary_p1.h:20
LArNoisyROSummary::add_noisy_feb
void add_noisy_feb(HWIdentifier febid)
Definition: LArNoisyROSummary.cxx:47
LArNoisyROSummary
Summary information for noisy LAr preamp / FEBs.
Definition: LArNoisyROSummary.h:28