ATLAS Offline Software
CaloTopoTowerContainerCnv_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 
6 
9 
10 #include <iostream>
11 
14  MsgStream& msg) const
15 {
16  CaloTowerSeg seg;
18  CaloTopoTowerContainer ctmp (seg, true);
19  trans->swap (ctmp);
20 
21  std::vector<unsigned int> reg;
22  for (size_t i = 0; i > pers->m_caloRegions.size(); i++)
23  trans->setCalo (static_cast<CaloCell_ID::SUBCALO> (pers->m_caloRegions[i]));
24 
25  if (msg.level() <= MSG::DEBUG) msg << MSG::DEBUG << "Creating transistent state of Containers..." << endmsg;
26  m_cells.persToTrans(&pers->cells,&trans->m_cells,msg);
28  m_towers.persToTrans(&pers->towers,&trans->m_towers,msg);
29 
33  trans->m_noiseSigma=pers->m_noiseSigma;
35  trans->m_caloSelection=pers->m_caloSelection;
36 }
37 
38 
41  MsgStream& msg) const
42 {
43  m_caloTowerSegCnv.transToPers(&(trans->towerseg()),&(pers->m_towerSeg));
44  std::vector<CaloCell_ID::SUBCALO> reg;
45  (void)trans->getCalos (reg);
46  pers->m_caloRegions.resize (reg.size());
47  for (size_t i = 0; i < reg.size(); i++)
48  pers->m_caloRegions[i] = reg[i];
49 
50  if (msg.level() <= MSG::DEBUG) msg << MSG::DEBUG << "Creating persistent state of Containers..." << endmsg;
51  m_cells.transToPers(&(trans->m_cells),&(pers->cells),msg);
52  m_clusters.transToPers(&(trans->m_clusters),&(pers->clusters),msg);
53  m_towers.transToPers(&(trans->m_towers),&(pers->towers),msg);
57  pers->m_noiseSigma=trans->m_noiseSigma;
59  pers->m_caloSelection=trans->m_caloSelection;
60 }
CaloTopoTowerContainerCnv_p1::m_caloTowerSegCnv
CaloTowerSegCnv_p1 m_caloTowerSegCnv
Definition: CaloTopoTowerContainerCnv_p1.h:47
CaloTopoTowerContainer::swap
void swap(CaloTopoTowerContainer &other)
Swap.
Definition: CaloTopoTowerContainer.cxx:94
CaloTopoTowerContainerCnv_p1.h
CaloTopoTowerContainer::m_cellESignificanceThreshold
float m_cellESignificanceThreshold
Definition: CaloTopoTowerContainer.h:165
CaloTopoTowerContainer::m_minimumClusterEnergy
double m_minimumClusterEnergy
Definition: CaloTopoTowerContainer.h:160
CaloTopoTowerContainer::m_minimumCellEnergy
double m_minimumCellEnergy
Definition: CaloTopoTowerContainer.h:159
CaloTopoTowerContainer_p1::m_cellESignificanceThreshold
float m_cellESignificanceThreshold
Definition: CaloTopoTowerContainer_p1.h:28
CaloTopoTowerContainer::m_clusters
DataLink< CaloClusterContainer > m_clusters
Definition: CaloTopoTowerContainer.h:153
CaloTopoTowerContainer_p1::clusters
DataLink_p1 clusters
Definition: CaloTopoTowerContainer_p1.h:19
CaloTowerSegCnv_p1::persToTrans
void persToTrans(const CaloTowerSeg_p1 *, CaloTowerSeg *) const
Definition: CaloTowerSegCnv_p1.cxx:9
CaloTopoTowerContainerCnv_p1::m_cells
DataLinkCnv_p1< DataLink< CaloCellContainer > > m_cells
Definition: CaloTopoTowerContainerCnv_p1.h:48
CaloTopoTowerContainer_p1::m_noiseSigma
float m_noiseSigma
Definition: CaloTopoTowerContainer_p1.h:27
CaloTopoTowerContainer_p1::m_minimumCellEnergy
double m_minimumCellEnergy
Definition: CaloTopoTowerContainer_p1.h:22
DataLinkCnv_p1::transToPers
virtual void transToPers(const DLink_t *trans, PersDLink_t *pers, MsgStream &log) const override
CaloTopoTowerContainerCnv_p1::m_towers
DataLinkCnv_p1< DataLink< CaloTowerContainer > > m_towers
Definition: CaloTopoTowerContainerCnv_p1.h:50
CaloTopoTowerContainerCnv_p1::m_clusters
DataLinkCnv_p1< DataLink< CaloClusterContainer > > m_clusters
Definition: CaloTopoTowerContainerCnv_p1.h:49
CaloTopoTowerContainer_p1::m_minimumClusterEnergy
double m_minimumClusterEnergy
Definition: CaloTopoTowerContainer_p1.h:23
CaloTopoTowerContainer::m_useCellWeights
bool m_useCellWeights
Definition: CaloTopoTowerContainer.h:161
lumiFormat.i
int i
Definition: lumiFormat.py:85
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
CaloTopoTowerContainerCnv_p1::persToTrans
virtual void persToTrans(const CaloTopoTowerContainer_p1 *, CaloTopoTowerContainer *, MsgStream &msg) const override
Definition: CaloTopoTowerContainerCnv_p1.cxx:12
CaloCell_Base_ID::SUBCALO
SUBCALO
enumeration of sub calorimeters
Definition: CaloCell_Base_ID.h:46
DataLinkCnv_p1::persToTrans
virtual void persToTrans(const PersDLink_t *pers, DLink_t *trans, MsgStream &log) const override
CaloTopoTowerContainerCnv_p1::transToPers
virtual void transToPers(const CaloTopoTowerContainer *, CaloTopoTowerContainer_p1 *, MsgStream &msg) const override
Definition: CaloTopoTowerContainerCnv_p1.cxx:39
CaloTopoTowerContainer
Storable container class for CaloTower.
Definition: CaloTopoTowerContainer.h:51
CaloTopoTowerContainer_p1::towers
DataLink_p1 towers
Definition: CaloTopoTowerContainer_p1.h:20
CaloTowerSegCnv_p1::transToPers
void transToPers(const CaloTowerSeg *, CaloTowerSeg_p1 *) const
Definition: CaloTowerSegCnv_p1.cxx:23
CaloTopoTowerContainer::m_towers
DataLink< CaloTowerContainer > m_towers
Definition: CaloTopoTowerContainer.h:154
CaloTowerContainer::getCalos
size_t getCalos(std::vector< CaloCell_ID::SUBCALO > &theCalos) const
Retrieve the list of used calorimeters.
Definition: CaloTowerContainer.cxx:180
CaloTopoTowerContainer::m_noiseSigma
float m_noiseSigma
Definition: CaloTopoTowerContainer.h:164
CaloTopoTowerContainer::m_caloSelection
bool m_caloSelection
Definition: CaloTopoTowerContainer.h:169
CaloTowerContainer::towerseg
const CaloTowerSeg & towerseg() const
Return a copy of the attached CaloTowerSeg.
Definition: Calorimeter/CaloEvent/CaloEvent/CaloTowerContainer.h:591
CaloTopoTowerContainer.h
CaloTopoTowerContainer_p1::m_caloSelection
bool m_caloSelection
Definition: CaloTopoTowerContainer_p1.h:29
CaloTopoTowerContainer_p1::m_caloRegions
std::vector< unsigned int > m_caloRegions
Definition: CaloTopoTowerContainer_p1.h:16
CaloTopoTowerContainer::m_cells
DataLink< CaloCellContainer > m_cells
Definition: CaloTopoTowerContainer.h:155
CaloTopoTowerContainer_p1::m_towerSeg
CaloTowerSeg_p1 m_towerSeg
Definition: CaloTopoTowerContainer_p1.h:15
CaloTopoTowerContainer_p1::m_useCellWeights
bool m_useCellWeights
Definition: CaloTopoTowerContainer_p1.h:24
DEBUG
#define DEBUG
Definition: page_access.h:11
if
if(febId1==febId2)
Definition: LArRodBlockPhysicsV0.cxx:567
CaloTowerSeg
Data object stores CaloTower segmentation.
Definition: CaloTowerSeg.h:37
CaloTowerContainer::setCalo
void setCalo(const CaloCell_ID::SUBCALO &nCalo)
Adds a calorimeter index to the tower.
Definition: CaloTowerContainer.cxx:169
python.AutoConfigFlags.msg
msg
Definition: AutoConfigFlags.py:7
CaloTopoTowerContainer_p1
Definition: CaloTopoTowerContainer_p1.h:13
CaloTopoTowerContainer_p1.h
CaloTopoTowerContainer_p1::cells
DataLink_p1 cells
Definition: CaloTopoTowerContainer_p1.h:18