ATLAS Offline Software
TriggerTowerCnv_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 TriggerTowerCnv_p1::TriggerTowerCnv_p1()
18  : T_AthenaPoolTPCnvBase< TriggerTower, TriggerTower_p1 >() {
19 
20 }
21 */
22 
23 void TriggerTowerCnv_p1::persToTrans( const TriggerTower_p1* persObj, TriggerTower* transObj, MsgStream &log ) {
24 
25  //log << MSG::INFO << "Converting TriggerTower from persistent state..." << endmsg;
26 
27  //transObj->clear(); // see if I actually need one of these
28 
29  //
30  // Translate the TriggerTower
31  //
32  *transObj = TriggerTower (persObj->m_phi,
33  persObj->m_eta,
34  persObj->m_key,
35  persObj->m_em_adc,
36  persObj->m_em_energy,
37  persObj->m_em_extBCID,
38  persObj->m_em_BCID,
39  persObj->m_em_error,
40  persObj->m_em_peak,
41  persObj->m_em_adc_peak,
42  persObj->m_had_adc,
43  persObj->m_had_energy,
44  persObj->m_had_extBCID,
45  persObj->m_had_BCID,
46  persObj->m_had_error,
47  persObj->m_had_peak,
48  persObj->m_had_adc_peak);
49 
50  if (log.level() <= MSG::DEBUG) log << MSG::DEBUG << "Converted TriggerTower from persistent state [OK]" << endmsg;
51 
52  return;
53 
54 }
55 
56 void TriggerTowerCnv_p1::transToPers( const TriggerTower* transObj, TriggerTower_p1* persObj, MsgStream &log ) {
57 
58  //log << MSG::INFO << "Creating persistent state of TriggerTower..." << endmsg;
59 
60  persObj->m_em_energy = transObj->emLUT();
61  persObj->m_had_energy = transObj->hadLUT();
62  persObj->m_em_adc = transObj->emADC();
63  persObj->m_had_adc = transObj->hadADC();
64  persObj->m_em_BCID = transObj->emBCIDvec();
65  persObj->m_had_BCID = transObj->hadBCIDvec();
66  persObj->m_em_extBCID = transObj->emBCIDext();
67  persObj->m_had_extBCID = transObj->hadBCIDext();
68  persObj->m_phi = transObj->phi();
69  persObj->m_eta = transObj->eta();
70  persObj->m_key = transObj->key();
71  persObj->m_em_error = transObj->emError();
72  persObj->m_had_error = transObj->hadError();
73  persObj->m_em_peak = transObj->emPeak();
74  persObj->m_em_adc_peak = transObj->emADCPeak();
75  persObj->m_had_peak = transObj->hadPeak();
76  persObj->m_had_adc_peak = transObj->hadADCPeak();
77 
78  if (log.level() <= MSG::DEBUG) log << MSG::DEBUG << "Created persistent state of TriggerTower [OK]" << endmsg;
79 
80  return;
81 
82 }
LVL1::TriggerTower::emADC
const std::vector< int > & emADC() const
return references to the vectors containing the ADC digits
Definition: TriggerTower.cxx:118
LVL1::TriggerTower::emPeak
int emPeak() const
return peak positions in LUT and ADC vectors
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/TriggerTower.h:107
LVL1::TriggerTower::phi
double phi() const
returns phi coord of tower
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/TriggerTower.h:97
TriggerTower_p1::m_had_adc_peak
int m_had_adc_peak
Definition: TriggerTower_p1.h:55
LVL1::TriggerTower::key
unsigned int key() const
returns TT key - that is the key the TT had when it was created.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/TriggerTower.h:104
TriggerTower_p1::m_had_peak
int m_had_peak
Definition: TriggerTower_p1.h:54
TriggerTower_p1::m_em_energy
std::vector< int > m_em_energy
Internal data.
Definition: TriggerTower_p1.h:39
LVL1::TriggerTower::emBCIDext
const std::vector< int > & emBCIDext() const
returns vector of BCID words for all EM ADC samples
Definition: TriggerTower.cxx:150
LVL1::TriggerTower::hadADCPeak
int hadADCPeak() const
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/TriggerTower.h:110
TriggerTower_p1::m_phi
double m_phi
Definition: TriggerTower_p1.h:47
LVL1::TriggerTower::hadError
int hadError() const
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/TriggerTower.h:116
LVL1
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
Definition: ICMMCPHitsCnvTool.h:18
TriggerTower_p1::m_had_extBCID
std::vector< int > m_had_extBCID
Definition: TriggerTower_p1.h:46
LVL1::TriggerTower::emError
int emError() const
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/TriggerTower.h:115
LVL1::TriggerTower::hadBCIDext
const std::vector< int > & hadBCIDext() const
returns vector of BCID words for all Had ADC samples
Definition: TriggerTower.cxx:154
TriggerTower_p1::m_eta
double m_eta
Definition: TriggerTower_p1.h:48
TriggerTower_p1::m_key
unsigned int m_key
Definition: TriggerTower_p1.h:49
TriggerTower_p1
Persistent form of TriggerTower using T/P separation.
Definition: TriggerTower_p1.h:26
TriggerTower_p1::m_had_BCID
std::vector< int > m_had_BCID
Definition: TriggerTower_p1.h:44
LVL1::TriggerTower::emLUT
const std::vector< int > & emLUT() const
return references to the vectors containing the final calubrated ET values.
Definition: TriggerTower.cxx:110
TriggerTowerCnv_p1::persToTrans
virtual void persToTrans(const TriggerTower_p1 *persObj, LVL1::TriggerTower *transObj, MsgStream &log)
Definition: TriggerTowerCnv_p1.cxx:23
TriggerTower_p1::m_had_adc
std::vector< int > m_had_adc
Definition: TriggerTower_p1.h:42
LVL1::TriggerTower::hadBCIDvec
const std::vector< int > & hadBCIDvec() const
returns vector of BCID words for all Had LUT samples
Definition: TriggerTower.cxx:147
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
LVL1::TriggerTower::hadPeak
int hadPeak() const
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/TriggerTower.h:109
TriggerTower_p1::m_had_energy
std::vector< int > m_had_energy
Definition: TriggerTower_p1.h:40
TriggerTower_p1::m_em_error
int m_em_error
Definition: TriggerTower_p1.h:50
LVL1::TriggerTower::hadLUT
const std::vector< int > & hadLUT() const
returns had LUT ET
Definition: TriggerTower.cxx:114
LVL1::TriggerTower::hadADC
const std::vector< int > & hadADC() const
returns had adc digits
Definition: TriggerTower.cxx:122
LVL1::TriggerTower
Trigger towers are the inputs to all other parts of the calorimeter trigger.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/TriggerTower.h:45
LVL1::TriggerTower::emBCIDvec
const std::vector< int > & emBCIDvec() const
returns vector of BCID words for all EM LUT samples
Definition: TriggerTower.cxx:143
TriggerTower_p1::m_em_BCID
std::vector< int > m_em_BCID
Definition: TriggerTower_p1.h:43
TriggerTowerCnv_p1::transToPers
virtual void transToPers(const LVL1::TriggerTower *transObj, TriggerTower_p1 *persObj, MsgStream &log)
Definition: TriggerTowerCnv_p1.cxx:56
TriggerTower_p1::m_em_peak
int m_em_peak
Definition: TriggerTower_p1.h:52
TriggerTowerCnv_p1.h
TriggerTower_p1::m_had_error
int m_had_error
Definition: TriggerTower_p1.h:51
TriggerTower_p1::m_em_extBCID
std::vector< int > m_em_extBCID
Definition: TriggerTower_p1.h:45
DEBUG
#define DEBUG
Definition: page_access.h:11
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
TriggerTower_p1::m_em_adc_peak
int m_em_adc_peak
Definition: TriggerTower_p1.h:53
LVL1::TriggerTower::emADCPeak
int emADCPeak() const
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/TriggerTower.h:108
TriggerTower_p1::m_em_adc
std::vector< int > m_em_adc
Definition: TriggerTower_p1.h:41
LVL1::TriggerTower::eta
double eta() const
returns eta coord
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/TriggerTower.h:94
TriggerTower.h
xAOD::TriggerTower
TriggerTower_v2 TriggerTower
Define the latest version of the TriggerTower class.
Definition: Event/xAOD/xAODTrigL1Calo/xAODTrigL1Calo/TriggerTower.h:16