ATLAS Offline Software
CPMTowerCnv_p1.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
7 
8 // Gaudi/Athena include(s):
9 #include "GaudiKernel/MsgStream.h"
10 
11 // Local include(s):
13 
14 using namespace LVL1;
15 
16 /*
17 CPMTowerCnv_p1::CPMTowerCnv_p1()
18  : T_AthenaPoolTPCnvBase< CPMTower, CPMTower_p1 >() {
19 
20 }
21 */
22 
23 void CPMTowerCnv_p1::persToTrans( const CPMTower_p1* persObj, CPMTower* transObj, MsgStream &log ) {
24 
25  //log << MSG::INFO << "Converting CPMTower from persistent state..." << endmsg;
26 
27  //transObj->clear(); // see if I actually need one of these
28 
29  //
30  // Translate the CPMTower
31  //
32  *transObj = CPMTower (persObj->m_phi,
33  persObj->m_eta,
34  persObj->m_em_energy,
35  persObj->m_em_error,
36  persObj->m_had_energy,
37  persObj->m_had_error,
38  persObj->m_peak);
39 
40  if (log.level() <= MSG::DEBUG) log << MSG::DEBUG << "Converted CPMTower from persistent state [OK]" << endmsg;
41 
42  return;
43 
44 }
45 
46 void CPMTowerCnv_p1::transToPers( const CPMTower* transObj, CPMTower_p1* persObj, MsgStream &log ) {
47 
48  //log << MSG::INFO << "Creating persistent state of CPMTower..." << endmsg;
49 
50  persObj->m_phi = transObj->phi();
51  persObj->m_eta = transObj->eta();
52  persObj->m_peak = transObj->peak();
53 
54  persObj->m_em_energy = transObj->emEnergyVec();
55  persObj->m_had_energy = transObj->hadEnergyVec();
56  persObj->m_em_error = transObj->emErrorVec();
57  persObj->m_had_error = transObj->hadErrorVec();
58 
59  if (log.level() <= MSG::DEBUG) log << MSG::DEBUG << "Created persistent state of CPMTower [OK]" << endmsg;
60 
61  return;
62 
63 }
CPMTower_p1
Persistent form of CPMTower using T/P separation.
Definition: CPMTower_p1.h:26
CPMTower_p1::m_em_energy
std::vector< int > m_em_energy
Internal data.
Definition: CPMTower_p1.h:39
LVL1::CPMTower::hadEnergyVec
const std::vector< int > & hadEnergyVec() const
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMTower.h:72
LVL1::CPMTower::eta
double eta() const
returns eta coord
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMTower.h:75
CPMTower_p1::m_peak
int m_peak
Definition: CPMTower_p1.h:45
LVL1::CPMTower::phi
double phi() const
returns phi coord of tower
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMTower.h:78
LVL1::CPMTower::hadErrorVec
const std::vector< int > & hadErrorVec() const
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMTower.h:92
xAOD::CPMTower
CPMTower_v2 CPMTower
Define the latest version of the CPMTower class.
Definition: Event/xAOD/xAODTrigL1Calo/xAODTrigL1Calo/CPMTower.h:16
LVL1
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
Definition: ICMMCPHitsCnvTool.h:18
CPMTowerCnv_p1::transToPers
virtual void transToPers(const LVL1::CPMTower *transObj, CPMTower_p1 *persObj, MsgStream &log)
Definition: CPMTowerCnv_p1.cxx:46
LVL1::CPMTower::peak
int peak() const
return peak positions in ET and error vectors
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMTower.h:84
CPMTower_p1::m_phi
double m_phi
Definition: CPMTower_p1.h:43
LVL1::CPMTower
The CPMTower class contains the TriggerTower information received by the Cluster Processor Modules.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMTower.h:36
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
CPMTower_p1::m_em_error
std::vector< int > m_em_error
Definition: CPMTower_p1.h:41
LVL1::CPMTower::emErrorVec
const std::vector< int > & emErrorVec() const
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMTower.h:91
CPMTower_p1::m_eta
double m_eta
Definition: CPMTower_p1.h:44
CPMTower_p1::m_had_energy
std::vector< int > m_had_energy
Definition: CPMTower_p1.h:40
CPMTowerCnv_p1::persToTrans
virtual void persToTrans(const CPMTower_p1 *persObj, LVL1::CPMTower *transObj, MsgStream &log)
Definition: CPMTowerCnv_p1.cxx:23
CPMTower.h
DEBUG
#define DEBUG
Definition: page_access.h:11
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
LVL1::CPMTower::emEnergyVec
const std::vector< int > & emEnergyVec() const
return references to the vectors containing the ET values.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMTower.h:71
CPMTower_p1::m_had_error
std::vector< int > m_had_error
Definition: CPMTower_p1.h:42
CPMTowerCnv_p1.h