ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Calorimeter
CaloIdentifier
src
CaloHelpersTest.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3
*/
4
/*
5
*/
12
13
14
#include "
CaloIdentifier/CaloHelpersTest.h
"
15
#include "
IdDictParser/IdDictParser.h
"
16
17
18
CaloHelpersTest::CaloHelpersTest
()
19
:
m_parser
(
std
::make_unique<
IdDictParser
>())
20
{
21
m_parser
->register_external_entity(
"LArCalorimeter"
,
"IdDictLArCalorimeter.xml"
);
22
IdDictMgr
& idd =
m_parser
->parse(
"IdDictParser/ATLAS_IDS.xml"
);
23
m_em_idHelper
.set_do_neighbours(
false
);
24
if
(
m_em_idHelper
.initialize_from_dictionary(idd) != 0) {
25
std::abort();
26
}
27
28
if
(
m_hec_idHelper
.initialize_from_dictionary(idd) != 0) {
29
std::abort();
30
}
31
32
m_fcal_idHelper
.set_do_neighbours(
false
);
33
if
(
m_fcal_idHelper
.initialize_from_dictionary(idd) != 0) {
34
std::abort();
35
}
36
37
m_minifcal_idHelper
.set_do_neighbours(
false
);
38
if
(
m_minifcal_idHelper
.initialize_from_dictionary(idd) != 0) {
39
std::abort();
40
}
41
42
m_tile_idHelper
.set_do_neighbours(
false
);
43
if
(
m_tile_idHelper
.initialize_from_dictionary(idd) != 0) {
44
std::abort();
45
}
46
47
m_calo_idHelper
= std::make_unique<CaloCell_ID> (&
m_em_idHelper
,
48
&
m_hec_idHelper
,
49
&
m_fcal_idHelper
,
50
&
m_minifcal_idHelper
,
51
&
m_tile_idHelper
);
52
if
(
m_calo_idHelper
->initialize_from_dictionary(idd) != 0) {
53
std::abort();
54
}
55
}
56
57
58
CaloHelpersTest::~CaloHelpersTest
()
59
=
default
;
60
61
62
const
LArEM_ID
&
CaloHelpersTest::emID
()
const
63
{
64
return
m_em_idHelper
;
65
}
66
67
68
const
LArHEC_ID
&
CaloHelpersTest::hecID
()
const
69
{
70
return
m_hec_idHelper
;
71
}
72
73
74
const
LArFCAL_ID
&
CaloHelpersTest::fcalID
()
const
75
{
76
return
m_fcal_idHelper
;
77
}
78
79
80
const
LArMiniFCAL_ID
&
CaloHelpersTest::minifcalID
()
const
81
{
82
return
m_minifcal_idHelper
;
83
}
84
85
86
const
TileID
&
CaloHelpersTest::tileID
()
const
87
{
88
return
m_tile_idHelper
;
89
}
90
91
92
const
CaloCell_ID
&
CaloHelpersTest::caloID
()
const
93
{
94
return
*
m_calo_idHelper
;
95
}
CaloHelpersTest.h
Helper to initialize ID helpers for unit tests.
IdDictParser.h
if
if(pathvar)
Definition
SealSharedLib.cxx:168
CaloCell_ID
Helper class for offline cell identifiers.
Definition
CaloCell_ID.h:34
CaloHelpersTest::m_parser
std::unique_ptr< IdDictParser > m_parser
Definition
CaloHelpersTest.h:51
CaloHelpersTest::minifcalID
const LArMiniFCAL_ID & minifcalID() const
Definition
CaloHelpersTest.cxx:80
CaloHelpersTest::~CaloHelpersTest
~CaloHelpersTest()
CaloHelpersTest::tileID
const TileID & tileID() const
Definition
CaloHelpersTest.cxx:86
CaloHelpersTest::CaloHelpersTest
CaloHelpersTest()
Definition
CaloHelpersTest.cxx:18
CaloHelpersTest::m_hec_idHelper
LArHEC_ID m_hec_idHelper
Definition
CaloHelpersTest.h:53
CaloHelpersTest::hecID
const LArHEC_ID & hecID() const
Definition
CaloHelpersTest.cxx:68
CaloHelpersTest::m_tile_idHelper
TileID m_tile_idHelper
Definition
CaloHelpersTest.h:56
CaloHelpersTest::caloID
const CaloCell_ID & caloID() const
Definition
CaloHelpersTest.cxx:92
CaloHelpersTest::emID
const LArEM_ID & emID() const
Definition
CaloHelpersTest.cxx:62
CaloHelpersTest::m_calo_idHelper
std::unique_ptr< CaloCell_ID > m_calo_idHelper
Definition
CaloHelpersTest.h:57
CaloHelpersTest::m_fcal_idHelper
LArFCAL_ID m_fcal_idHelper
Definition
CaloHelpersTest.h:54
CaloHelpersTest::m_em_idHelper
LArEM_ID m_em_idHelper
Definition
CaloHelpersTest.h:52
CaloHelpersTest::m_minifcal_idHelper
LArMiniFCAL_ID m_minifcal_idHelper
Definition
CaloHelpersTest.h:55
CaloHelpersTest::fcalID
const LArFCAL_ID & fcalID() const
Definition
CaloHelpersTest.cxx:74
IdDictMgr
Definition
IdDictMgr.h:17
IdDictParser
Definition
IdDictParser.h:21
LArEM_ID
Helper class for LArEM offline identifiers.
Definition
LArEM_ID.h:111
LArFCAL_ID
Helper class for LArFCAL offline identifiers.
Definition
LArFCAL_ID.h:49
LArHEC_ID
Helper class for LArHEC offline identifiers.
Definition
LArHEC_ID.h:76
LArMiniFCAL_ID
Helper class for LArMiniFCAL offline identifiers.
Definition
LArMiniFCAL_ID.h:51
TileID
Helper class for TileCal offline identifiers.
Definition
TileID.h:67
std
STL namespace.
Generated on
for ATLAS Offline Software by
1.17.0