ATLAS Offline Software
Loading...
Searching...
No Matches
TrkDetDescrUnitTestBase.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3*/
4
6// TrkDetDescrUnitTestBase.cxx, (c) ATLAS Detector software
8
9//TrkDetDescrUnitTests
11
12Trk::TrkDetDescrUnitTestBase::TrkDetDescrUnitTestBase(const std::string& name, ISvcLocator* pSvcLocator):
13 AthAlgorithm(name,pSvcLocator),
14 m_gaussDist(nullptr),
15 m_flatDist(nullptr),
16 m_numTests(100)
17{
18 declareProperty("NumberOfTestsPerEvent", m_numTests);
19}
20
26
28{
29 ATH_MSG_INFO( "Creating random number services, call bookTree() and initializeTest()" );
30
31 // intialize the random number generators
32 m_gaussDist = new Rndm::Numbers(randSvc(), Rndm::Gauss(0.,1.));
33 m_flatDist = new Rndm::Numbers(randSvc(), Rndm::Flat(0.,1.));
34
35 if (bookTree().isFailure()){
36 ATH_MSG_FATAL( "Could not book the TTree object" );
37 return StatusCode::FAILURE;
38 }
39
40 if (initializeTest().isFailure()){
41 ATH_MSG_FATAL( "Could not initialize the test" );
42 return StatusCode::FAILURE;
43 }
44
45 return StatusCode::SUCCESS;
46}
47
49{
50 return runTest();
51}
52
54{
55
56 ATH_MSG_INFO( "finalize()" );
57 return StatusCode::SUCCESS;
58}
59
60StatusCode Trk::TrkDetDescrUnitTestBase::bookTree() { return StatusCode::SUCCESS; }
61
62StatusCode Trk::TrkDetDescrUnitTestBase::initializeTest() { return StatusCode::SUCCESS; }
63
#define ATH_MSG_FATAL(x)
#define ATH_MSG_INFO(x)
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
StatusCode finalize()
standard Athena-Algorithm method
Rndm::Numbers * m_gaussDist
Random Number setup.
StatusCode execute()
standard Athena-Algorithm method
virtual ~TrkDetDescrUnitTestBase()
Default Destructor.
TrkDetDescrUnitTestBase(const std::string &name, ISvcLocator *pSvcLocator)
Standard Athena-Algorithm Constructor.
StatusCode initialize()
standard Athena-Algorithm method
virtual StatusCode runTest()=0