ATLAS Offline Software
CMXCPHitsCnv_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):
12 //#include "TrigT1EventTPCnv/CMXCPHits_p1.h"
14 
15 using namespace LVL1;
16 
17 /*
18 CMXCPHitsCnv_p1::CMXCPHitsCnv_p1()
19  : T_AthenaPoolTPCnvBase< CMXCPHits, CMXCPHits_p1 >() {
20 
21 }
22 */
23 
24 void CMXCPHitsCnv_p1::persToTrans( const CMXCPHits_p1* persObj, CMXCPHits* transObj, MsgStream &log ) {
25 
26  //log << MSG::INFO << "Converting CMXCPHits from persistent state..." << endmsg;
27 
28  //transObj->clear(); // see if I actually need one of these
29 
30  //
31  // Translate the CMXCPHits
32  //
33  *transObj = CMXCPHits (persObj->m_crate,
34  persObj->m_cmx,
35  persObj->m_source,
36  persObj->m_hits0,
37  persObj->m_hits1,
38  persObj->m_error0,
39  persObj->m_error1,
40  persObj->m_peak);
41 
42  if (log.level() <= MSG::DEBUG) log << MSG::DEBUG << "Converted CMXCPHits from persistent state [OK]" << endmsg;
43 
44  return;
45 
46 }
47 
48 void CMXCPHitsCnv_p1::transToPers( const CMXCPHits* transObj, CMXCPHits_p1* persObj, MsgStream &log ) {
49 
50  //log << MSG::INFO << "Creating persistent state of CMXCPHits..." << endmsg;
51 
52  persObj->m_crate = transObj->crate();
53  persObj->m_cmx = transObj->cmx();
54  persObj->m_source = transObj->source();
55  persObj->m_peak = transObj->peak();
56  persObj->m_hits0 = transObj->hitsVec0();
57  persObj->m_hits1 = transObj->hitsVec1();
58  persObj->m_error0 = transObj->errorVec0();
59  persObj->m_error1 = transObj->errorVec1();
60 
61  if (log.level() <= MSG::DEBUG) log << MSG::DEBUG << "Created persistent state of CMXCPHits [OK]" << endmsg;
62 
63  return;
64 
65 }
CMXCPHits_p1::m_peak
int m_peak
Definition: CMXCPHits_p1.h:36
LVL1::CMXCPHits::hitsVec0
const std::vector< unsigned int > & hitsVec0() const
For multi-slice readout.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXCPHits.h:116
LVL1::CMXCPHits::cmx
int cmx() const
returns CMX number (0/1)==(Left/Right)==(Tau/Em?)
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXCPHits.h:86
LVL1::CMXCPHits
Summary of CP (EM/tau) hits produced by the merger modules.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXCPHits.h:24
LVL1::CMXCPHits::errorVec1
const std::vector< int > & errorVec1() const
returns error1
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXCPHits.h:131
LVL1
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
Definition: ICMMCPHitsCnvTool.h:18
CMXCPHits_p1::m_error1
std::vector< int > m_error1
Definition: CMXCPHits_p1.h:40
CMXCPHits_p1::m_source
int m_source
Definition: CMXCPHits_p1.h:35
CMXCPHits_p1::m_hits0
std::vector< unsigned int > m_hits0
Definition: CMXCPHits_p1.h:37
xAOD::CMXCPHits
CMXCPHits_v1 CMXCPHits
Define the latest version of the CMMCPHits class.
Definition: Event/xAOD/xAODTrigL1Calo/xAODTrigL1Calo/CMXCPHits.h:17
CMXCPHitsCnv_p1::persToTrans
virtual void persToTrans(const CMXCPHits_p1 *persObj, LVL1::CMXCPHits *transObj, MsgStream &log)
Definition: CMXCPHitsCnv_p1.cxx:24
CMXCPHitsCnv_p1::transToPers
virtual void transToPers(const LVL1::CMXCPHits *transObj, CMXCPHits_p1 *persObj, MsgStream &log)
Definition: CMXCPHitsCnv_p1.cxx:48
CMXCPHits_p1::m_crate
int m_crate
Destructor.
Definition: CMXCPHits_p1.h:33
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
CMXCPHits_p1::m_error0
std::vector< int > m_error0
Definition: CMXCPHits_p1.h:39
LVL1::CMXCPHits::source
int source() const
returns source of data
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXCPHits.h:91
LVL1::CMXCPHits::peak
int peak() const
returns peak slice number
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXCPHits.h:152
LVL1::CMXCPHits::hitsVec1
const std::vector< unsigned int > & hitsVec1() const
returns hits1
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXCPHits.h:121
CMXCPHits_p1::m_hits1
std::vector< unsigned int > m_hits1
Definition: CMXCPHits_p1.h:38
LVL1::CMXCPHits::crate
int crate() const
Data accessors.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXCPHits.h:81
LVL1::CMXCPHits::errorVec0
const std::vector< int > & errorVec0() const
returns error0
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXCPHits.h:126
DEBUG
#define DEBUG
Definition: page_access.h:11
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
CMXCPHits.h
CMXCPHits_p1::m_cmx
int m_cmx
Definition: CMXCPHits_p1.h:34
CMXCPHitsCnv_p1.h
CMXCPHits_p1
T/P separation for TrigT1Calo::CMXCPHits class.
Definition: CMXCPHits_p1.h:19