ATLAS Offline Software
Loading...
Searching...
No Matches
TrkExUnitTestBase.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
6// TrkExUnitTestBase.cxx, (c) ATLAS Detector software
8
9// TrkExUnitTests
10#include <memory>
11
13
14
16 ATH_MSG_INFO("Creating random number services, call bookTree() and initializeTest()");
17
18 // intialize the random number generators
19 m_gaussDist = std::make_unique<Rndm::Numbers>(randSvc(), Rndm::Gauss(0., 1.));
20 m_flatDist = std::make_unique<Rndm::Numbers>(randSvc(), Rndm::Flat(0., 1.));
21 m_landauDist = std::make_unique<Rndm::Numbers>(randSvc(), Rndm::Landau(0., 1.));
22
23 if (bookTree().isFailure()) {
24 ATH_MSG_FATAL("Could not book the TTree object");
25 return StatusCode::FAILURE;
26 }
27
28 if (initializeTest().isFailure()) {
29 ATH_MSG_FATAL("Could not initialize the test");
30 return StatusCode::FAILURE;
31 }
32
33 return StatusCode::SUCCESS;
34}
35
37 if (m_scanMode) return runScan();
38
39 return runTest();
40}
41
42StatusCode Trk::TrkExUnitTestBase::bookTree() {return StatusCode::SUCCESS;}
43
44StatusCode Trk::TrkExUnitTestBase::initializeTest() {return StatusCode::SUCCESS;}
#define ATH_MSG_FATAL(x)
#define ATH_MSG_INFO(x)
BooleanProperty m_scanMode
enable scan mode
std::unique_ptr< Rndm::Numbers > m_gaussDist
Random Number setup.
virtual StatusCode bookTree()
virtual StatusCode runTest()=0
virtual StatusCode runScan()=0
virtual StatusCode initializeTest()
StatusCode initialize()
standard Athena-Algorithm method
std::unique_ptr< Rndm::Numbers > m_flatDist
std::unique_ptr< Rndm::Numbers > m_landauDist
StatusCode execute()
standard Athena-Algorithm method