ATLAS Offline Software
CMMJetHitsCnv_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 // Gaudi/Athena include(s):
8 #include "GaudiKernel/MsgStream.h"
9 
10 // Local include(s):
11 //#include "TrigT1EventTPCnv/CMMJetHits_p1.h"
13 
14 using namespace LVL1;
15 
16 /*
17 CMMJetHitsCnv_p1::CMMJetHitsCnv_p1()
18  : T_AthenaPoolTPCnvBase< CMMJetHits, CMMJetHits_p1 >() {
19 
20 }
21 */
22 
23 void CMMJetHitsCnv_p1::persToTrans( const CMMJetHits_p1* persObj, CMMJetHits* transObj, MsgStream &log ) {
24 
25  //log << MSG::INFO << "Converting CMMJetHits from persistent state..." << endmsg;
26 
27  //transObj->clear(); // see if I actually need one of these
28 
29  //
30  // Translate the CMMJetHits
31  //
32  *transObj = CMMJetHits (persObj->m_crate,
33  persObj->m_dataID,
34  persObj->m_hits,
35  persObj->m_errors,
36  persObj->m_peak);
37 
38  if (log.level() <= MSG::DEBUG) log << MSG::DEBUG << "Converted CMMJetHits from persistent state [OK]" << endmsg;
39 
40  return;
41 
42 }
43 
44 void CMMJetHitsCnv_p1::transToPers( const CMMJetHits* transObj, CMMJetHits_p1* persObj, MsgStream &log ) {
45 
46  //log << MSG::INFO << "Creating persistent state of CMMJetHits..." << endmsg;
47 
48  persObj->m_crate = transObj->crate();
49  persObj->m_dataID = transObj->dataID();
50  persObj->m_peak = transObj->peak();
51  persObj->m_hits = transObj->HitsVec();
52  persObj->m_errors = transObj->ErrorVec();
53 
54  if (log.level() <= MSG::DEBUG) log << MSG::DEBUG << "Created persistent state of CMMJetHits [OK]" << endmsg;
55 
56  return;
57 
58 }
CMMJetHits_p1::m_hits
std::vector< unsigned int > m_hits
Definition: CMMJetHits_p1.h:36
CMMJetHits_p1::m_errors
std::vector< int > m_errors
Definition: CMMJetHits_p1.h:37
LVL1::CMMJetHits::peak
int peak() const
returns peak slice number
Definition: CMMJetHits.cxx:105
CMMJetHits.h
LVL1::CMMJetHits::crate
int crate() const
Data accessors.
Definition: CMMJetHits.cxx:63
LVL1
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
Definition: ICMMCPHitsCnvTool.h:18
CMMJetHits_p1::m_crate
int m_crate
Destructor.
Definition: CMMJetHits_p1.h:33
CMMJetHitsCnv_p1::transToPers
virtual void transToPers(const LVL1::CMMJetHits *transObj, CMMJetHits_p1 *persObj, MsgStream &log)
Definition: CMMJetHitsCnv_p1.cxx:44
CMMJetHits_p1::m_peak
int m_peak
Definition: CMMJetHits_p1.h:35
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
LVL1::CMMJetHits::dataID
int dataID() const
returns data ID of data
Definition: CMMJetHits.cxx:68
CMMJetHitsCnv_p1.h
CMMJetHits_p1::m_dataID
int m_dataID
Definition: CMMJetHits_p1.h:34
CMMJetHitsCnv_p1::persToTrans
virtual void persToTrans(const CMMJetHits_p1 *persObj, LVL1::CMMJetHits *transObj, MsgStream &log)
Definition: CMMJetHitsCnv_p1.cxx:23
CMMJetHits_p1
T/P separation for TrigT1Calo::CMMJetHits class.
Definition: CMMJetHits_p1.h:19
DEBUG
#define DEBUG
Definition: page_access.h:11
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
xAOD::CMMJetHits
CMMJetHits_v1 CMMJetHits
Define the latest version of the CMMJetHits class.
Definition: Event/xAOD/xAODTrigL1Calo/xAODTrigL1Calo/CMMJetHits.h:14
LVL1::CMMJetHits
CMMJetHits class stores Jet hit multiplicities received by and read out from the Jet CMMs.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMJetHits.h:32
LVL1::CMMJetHits::HitsVec
const std::vector< unsigned int > & HitsVec() const
Multi-slice accessors.
Definition: CMMJetHits.cxx:83
LVL1::CMMJetHits::ErrorVec
const std::vector< int > & ErrorVec() const
returns errors
Definition: CMMJetHits.cxx:88