ATLAS Offline Software
CPMHitsCnv_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):
14 
15 using namespace LVL1;
16 
17 /*
18 CPMHitsCnv_p1::CPMHitsCnv_p1()
19  : T_AthenaPoolTPCnvBase< CPMHits, CPMHits_p1 >() {
20 
21 }
22 */
23 
24 void CPMHitsCnv_p1::persToTrans( const CPMHits_p1* persObj, CPMHits* transObj, MsgStream &log ) {
25 
26  //log << MSG::DEBUG << "Converting CPMHits from persistent state..." << endmsg;
27 
28  //transObj->clear(); // see if I actually need one of these
29 
30  //
31  // Translate the CPMHits
32  //
33  *transObj = CPMHits (persObj->m_crate,
34  persObj->m_module,
35  persObj->m_Hits0,
36  persObj->m_Hits1,
37  persObj->m_peak);
38 
39  if (log.level() <= MSG::DEBUG) log << MSG::DEBUG << "Converted CPMHits from persistent state [OK]" << endmsg;
40 
41  return;
42 
43 }
44 
45 void CPMHitsCnv_p1::transToPers( const CPMHits* transObj, CPMHits_p1* persObj, MsgStream &log ) {
46 
47  //log << MSG::INFO << "Creating persistent state of CPMHits..." << endmsg;
48 
49  persObj->m_crate = transObj->crate();
50  persObj->m_module = transObj->module();
51  persObj->m_peak = transObj->peak();
52  persObj->m_Hits0 = transObj->HitsVec0();
53  persObj->m_Hits1 = transObj->HitsVec1();
54 
55  if (log.level() <= MSG::DEBUG) log << MSG::DEBUG << "Created persistent state of CPMHits [OK]" << endmsg;
56 
57  return;
58 
59 }
CPMHits.h
LVL1::CPMHits::HitsVec0
const std::vector< unsigned int > & HitsVec0() const
Multi-slice accessors.
Definition: CPMHits.cxx:81
LVL1::CPMHits
The CPMHits object contains the hit data produced by a given Cluster Processor Module,...
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMHits.h:35
CPMHits_p1::m_peak
int m_peak
Definition: CPMHits_p1.h:35
CPMHits_p1::m_crate
int m_crate
Destructor.
Definition: CPMHits_p1.h:33
LVL1
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
Definition: ICMMCPHitsCnvTool.h:18
CPMHitsCnv_p1.h
CPMHits_p1::m_module
int m_module
Definition: CPMHits_p1.h:34
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
xAOD::CPMHits
CPMHits_v1 CPMHits
Define the latest version of the CPMHits class.
Definition: Event/xAOD/xAODTrigL1Calo/xAODTrigL1Calo/CPMHits.h:14
LVL1::CPMHits::crate
int crate() const
Data accessors.
Definition: CPMHits.cxx:63
CPMHits_p1::m_Hits1
std::vector< unsigned int > m_Hits1
Definition: CPMHits_p1.h:37
LVL1::CPMHits::peak
int peak() const
returns peak slice number
Definition: CPMHits.cxx:101
CPMHits_p1.h
CPMHits_p1
T/P separation for TrigT1Calo::CPMHits class.
Definition: CPMHits_p1.h:19
CPMHits_p1::m_Hits0
std::vector< unsigned int > m_Hits0
Definition: CPMHits_p1.h:36
DEBUG
#define DEBUG
Definition: page_access.h:11
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
LVL1::CPMHits::module
int module() const
returns module number
Definition: CPMHits.cxx:68
CPMHitsCnv_p1::transToPers
virtual void transToPers(const LVL1::CPMHits *transObj, CPMHits_p1 *persObj, MsgStream &log)
Definition: CPMHitsCnv_p1.cxx:45
LVL1::CPMHits::HitsVec1
const std::vector< unsigned int > & HitsVec1() const
Definition: CPMHits.cxx:84
CPMHitsCnv_p1::persToTrans
virtual void persToTrans(const CPMHits_p1 *persObj, LVL1::CPMHits *transObj, MsgStream &log)
Definition: CPMHitsCnv_p1.cxx:24