ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
CaloHelpersTest Class Reference

Helper to initialize ID helpers for unit tests. More...

#include <CaloHelpersTest.h>

Collaboration diagram for CaloHelpersTest:

Public Member Functions

 CaloHelpersTest ()
 
 ~CaloHelpersTest ()
 
const LArEM_IDemID () const
 
const LArHEC_IDhecID () const
 
const LArFCAL_IDfcalID () const
 
const LArMiniFCAL_IDminifcalID () const
 
const TileIDtileID () const
 
const CaloCell_IDcaloID () const
 

Private Attributes

std::unique_ptr< IdDictParserm_parser
 
LArEM_ID m_em_idHelper
 
LArHEC_ID m_hec_idHelper
 
LArFCAL_ID m_fcal_idHelper
 
LArMiniFCAL_ID m_minifcal_idHelper
 
TileID m_tile_idHelper
 
std::unique_ptr< CaloCell_IDm_calo_idHelper
 

Detailed Description

Helper to initialize ID helpers for unit tests.

An object of this class can be created in a unit test in order to provide initialized instances of the ID helpers.

Definition at line 37 of file CaloHelpersTest.h.

Constructor & Destructor Documentation

◆ CaloHelpersTest()

CaloHelpersTest::CaloHelpersTest ( )

Definition at line 18 of file CaloHelpersTest.cxx.

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_quiet (true);
26  std::abort();
27  }
28 
31  std::abort();
32  }
33 
37  std::abort();
38  }
39 
43  std::abort();
44  }
45 
49  std::abort();
50  }
51 
52  m_calo_idHelper = std::make_unique<CaloCell_ID> (&m_em_idHelper,
57  m_calo_idHelper->set_quiet (true);
58  if (m_calo_idHelper->initialize_from_dictionary(idd) != 0) {
59  std::abort();
60  }
61 }

◆ ~CaloHelpersTest()

CaloHelpersTest::~CaloHelpersTest ( )
default

Member Function Documentation

◆ caloID()

const CaloCell_ID & CaloHelpersTest::caloID ( ) const

Definition at line 98 of file CaloHelpersTest.cxx.

99 {
100  return *m_calo_idHelper;
101 }

◆ emID()

const LArEM_ID & CaloHelpersTest::emID ( ) const

Definition at line 68 of file CaloHelpersTest.cxx.

69 {
70  return m_em_idHelper;
71 }

◆ fcalID()

const LArFCAL_ID & CaloHelpersTest::fcalID ( ) const

Definition at line 80 of file CaloHelpersTest.cxx.

81 {
82  return m_fcal_idHelper;
83 }

◆ hecID()

const LArHEC_ID & CaloHelpersTest::hecID ( ) const

Definition at line 74 of file CaloHelpersTest.cxx.

75 {
76  return m_hec_idHelper;
77 }

◆ minifcalID()

const LArMiniFCAL_ID & CaloHelpersTest::minifcalID ( ) const

Definition at line 86 of file CaloHelpersTest.cxx.

87 {
88  return m_minifcal_idHelper;
89 }

◆ tileID()

const TileID & CaloHelpersTest::tileID ( ) const

Definition at line 92 of file CaloHelpersTest.cxx.

93 {
94  return m_tile_idHelper;
95 }

Member Data Documentation

◆ m_calo_idHelper

std::unique_ptr<CaloCell_ID> CaloHelpersTest::m_calo_idHelper
private

Definition at line 57 of file CaloHelpersTest.h.

◆ m_em_idHelper

LArEM_ID CaloHelpersTest::m_em_idHelper
private

Definition at line 52 of file CaloHelpersTest.h.

◆ m_fcal_idHelper

LArFCAL_ID CaloHelpersTest::m_fcal_idHelper
private

Definition at line 54 of file CaloHelpersTest.h.

◆ m_hec_idHelper

LArHEC_ID CaloHelpersTest::m_hec_idHelper
private

Definition at line 53 of file CaloHelpersTest.h.

◆ m_minifcal_idHelper

LArMiniFCAL_ID CaloHelpersTest::m_minifcal_idHelper
private

Definition at line 55 of file CaloHelpersTest.h.

◆ m_parser

std::unique_ptr<IdDictParser> CaloHelpersTest::m_parser
private

Definition at line 51 of file CaloHelpersTest.h.

◆ m_tile_idHelper

TileID CaloHelpersTest::m_tile_idHelper
private

Definition at line 56 of file CaloHelpersTest.h.


The documentation for this class was generated from the following files:
CaloHelpersTest::m_calo_idHelper
std::unique_ptr< CaloCell_ID > m_calo_idHelper
Definition: CaloHelpersTest.h:57
LArEM_ID::initialize_from_dictionary
virtual int initialize_from_dictionary(const IdDictMgr &dict_mgr)
initialization from the identifier dictionary
Definition: LArEM_ID.cxx:27
CaloHelpersTest::m_parser
std::unique_ptr< IdDictParser > m_parser
Definition: CaloHelpersTest.h:51
LArHEC_ID::initialize_from_dictionary
virtual int initialize_from_dictionary(const IdDictMgr &dict_mgr)
initialization from the identifier dictionary
Definition: LArHEC_ID.cxx:27
AtlasDetectorID::set_quiet
void set_quiet(bool quiet)
Set flag for suppressing informational output.
Definition: AtlasDetectorID.cxx:753
IdDictMgr
Definition: IdDictDefs.h:32
AtlasDetectorID::set_do_neighbours
virtual void set_do_neighbours(bool do_neighbours) override
Definition: AtlasDetectorID.cxx:743
CaloHelpersTest::m_em_idHelper
LArEM_ID m_em_idHelper
Definition: CaloHelpersTest.h:52
CaloHelpersTest::m_tile_idHelper
TileID m_tile_idHelper
Definition: CaloHelpersTest.h:56
CaloHelpersTest::m_hec_idHelper
LArHEC_ID m_hec_idHelper
Definition: CaloHelpersTest.h:53
CaloHelpersTest::m_fcal_idHelper
LArFCAL_ID m_fcal_idHelper
Definition: CaloHelpersTest.h:54
CaloHelpersTest::m_minifcal_idHelper
LArMiniFCAL_ID m_minifcal_idHelper
Definition: CaloHelpersTest.h:55
TileID::initialize_from_dictionary
virtual int initialize_from_dictionary(const IdDictMgr &dict_mgr)
initialization from the identifier dictionary
Definition: TileID.cxx:33
LArMiniFCAL_ID::initialize_from_dictionary
virtual int initialize_from_dictionary(const IdDictMgr &dict_mgr)
initialization from the identifier dictionary
Definition: LArMiniFCAL_ID.cxx:213
LArFCAL_ID::initialize_from_dictionary
virtual int initialize_from_dictionary(const IdDictMgr &dict_mgr)
initialization from the identifier dictionary
Definition: LArFCAL_ID.cxx:32