ATLAS Offline Software
JetElementCnv_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 JetElementCnv_p1::JetElementCnv_p1()
18  : T_AthenaPoolTPCnvBase< JetElement, JetElement_p1 >() {
19 
20 }
21 */
22 
23 void JetElementCnv_p1::persToTrans( const JetElement_p1* persObj, JetElement* transObj, MsgStream &log ) {
24 
25  if (log.level() <= MSG::DEBUG) log << MSG::DEBUG << "Converting JetElement from persistent state..." << endmsg;
26 
27  //
28  // Translate the JetElement
29  //
30  *transObj = JetElement (persObj->m_phi,
31  persObj->m_eta,
32  persObj->m_emEnergy,
33  persObj->m_hadEnergy,
34  persObj->m_key,
35  persObj->m_em_error,
36  persObj->m_had_error,
37  persObj->m_link_error,
38  persObj->m_peak);
39 
40  if (log.level() <= MSG::DEBUG) log << MSG::DEBUG << "Converted JetElement from persistent state [OK]" << endmsg;
41 
42  return;
43 
44 }
45 
46 void JetElementCnv_p1::transToPers( const JetElement* transObj, JetElement_p1* persObj, MsgStream &log ) {
47 
48  if (log.level() <= MSG::DEBUG) log << MSG::DEBUG << "Creating persistent state of JetElement..." << endmsg;
49 
50  persObj->m_eta = transObj->eta();
51  persObj->m_phi = transObj->phi();
52  persObj->m_key = transObj->key();
53  persObj->m_peak = transObj->peak();
54  persObj->m_emEnergy = transObj->emEnergyVec();
55  persObj->m_hadEnergy = transObj->hadEnergyVec();
56  persObj->m_em_error = transObj->emErrorVec();
57  persObj->m_had_error = transObj->hadErrorVec();
58  persObj->m_link_error = transObj->linkErrorVec();
59 
60  if (log.level() <= MSG::DEBUG) log << MSG::DEBUG << "Created persistent state of JetElement [OK]" << endmsg;
61 
62  return;
63 
64 }
JetElement_p1
Persistent form of JetElement using T/P separation.
Definition: JetElement_p1.h:26
LVL1::JetElement::emEnergyVec
const std::vector< int > & emEnergyVec() const
Return data for all slices.
Definition: JetElement.cxx:245
LVL1::JetElement::peak
int peak() const
return triggered slice offset
Definition: JetElement.cxx:240
LVL1
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
Definition: ICMMCPHitsCnvTool.h:18
JetElementCnv_p1::persToTrans
virtual void persToTrans(const JetElement_p1 *persObj, LVL1::JetElement *transObj, MsgStream &log)
Definition: JetElementCnv_p1.cxx:23
JetElement_p1::m_key
unsigned int m_key
Definition: JetElement_p1.h:41
LVL1::JetElement::hadEnergyVec
const std::vector< int > & hadEnergyVec() const
return Had energy vector reference (all timeslices)
Definition: JetElement.cxx:250
LVL1::JetElement
Jet elements are the inputs to the Jet, ETmiss and ETsum triggers.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/JetElement.h:43
xAOD::JetElement
JetElement_v2 JetElement
Define the latest version of the JetElement class.
Definition: Event/xAOD/xAODTrigL1Calo/xAODTrigL1Calo/JetElement.h:16
JetElement_p1::m_had_error
std::vector< int > m_had_error
Definition: JetElement_p1.h:46
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
LVL1::JetElement::key
unsigned int key() const
Error codes and utility information.
Definition: JetElement.cxx:188
JetElement_p1::m_hadEnergy
std::vector< int > m_hadEnergy
Definition: JetElement_p1.h:44
JetElement_p1::m_eta
double m_eta
Definition: JetElement_p1.h:40
LVL1::JetElement::eta
double eta() const
Eta of centre of JetElement.
Definition: JetElement.cxx:82
JetElement_p1::m_phi
double m_phi
Internal data.
Definition: JetElement_p1.h:39
JetElement_p1::m_peak
int m_peak
Definition: JetElement_p1.h:42
JetElementCnv_p1::transToPers
virtual void transToPers(const LVL1::JetElement *transObj, JetElement_p1 *persObj, MsgStream &log)
Definition: JetElementCnv_p1.cxx:46
JetElementCnv_p1.h
JetElement_p1::m_emEnergy
std::vector< int > m_emEnergy
Definition: JetElement_p1.h:43
LVL1::JetElement::hadErrorVec
const std::vector< int > & hadErrorVec() const
return Had error vector reference (all timeslices)
Definition: JetElement.cxx:260
JetElement_p1::m_em_error
std::vector< int > m_em_error
Definition: JetElement_p1.h:45
LVL1::JetElement::phi
double phi() const
Phi of centre of JetElement.
Definition: JetElement.cxx:87
JetElement_p1::m_link_error
std::vector< int > m_link_error
Definition: JetElement_p1.h:47
DEBUG
#define DEBUG
Definition: page_access.h:11
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
LVL1::JetElement::emErrorVec
const std::vector< int > & emErrorVec() const
return Em error vector reference (all timeslices)
Definition: JetElement.cxx:255
LVL1::JetElement::linkErrorVec
const std::vector< int > & linkErrorVec() const
return link error vector reference (all timeslices)
Definition: JetElement.cxx:265
JetElement.h