ATLAS Offline Software
Loading...
Searching...
No Matches
SCT_ModuleVetoTestAlg.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3*/
4
13
15
17#include "Identifier/Identifier.h"
18
19SCT_ModuleVetoTestAlg::SCT_ModuleVetoTestAlg(const std::string& name, ISvcLocator* pSvcLocator) :
20 AthReentrantAlgorithm(name, pSvcLocator)
21{
22 //nop
23}
24
25//Initialize
26StatusCode
28 ATH_MSG_INFO("Calling initialize");
29 ATH_CHECK(m_pModuleVetoTool.retrieve());
30 return StatusCode::SUCCESS;
31}
32
33//Execute
34StatusCode
35SCT_ModuleVetoTestAlg::execute(const EventContext& ctx) const {
36 //This method is only used to test the summary service, and only used within this package,
37 // so the INFO level messages have no impact on performance of these services when used by clients
38
39 ATH_MSG_INFO("Calling execute");
40
41 ATH_MSG_INFO("Dummy call to module id 0: module is ");
42 bool result{m_pModuleVetoTool->isGood(Identifier{0}, ctx)};
43 ATH_MSG_INFO((result ? "good" : "bad"));
44
45 ATH_MSG_INFO("Dummy call to module id 1: module is ");
46 result=m_pModuleVetoTool->isGood(Identifier{1}, ctx);
47 ATH_MSG_INFO((result ? "good" : "bad"));
48
49 ATH_MSG_INFO("Dummy call to module id 2: module is ");
50 result=m_pModuleVetoTool->isGood(Identifier{2}, ctx);
51 ATH_MSG_INFO((result ? "good" : "bad"));
52
53 ATH_MSG_INFO("Dummy call to module id 3: module is ");
54 result=m_pModuleVetoTool->isGood(Identifier{3}, ctx);
55 ATH_MSG_INFO((result ? "good" : "bad"));
56
57 ATH_MSG_INFO("Dummy call to module id 151040000: module is ");
58 result=m_pModuleVetoTool->isGood(Identifier{151040000}, ctx);
59 ATH_MSG_INFO((result ? "good" : "bad"));
60
61 ATH_MSG_INFO("Using Identifier Hash method: with number 2137 ");
62 result=m_pModuleVetoTool->isGood(IdentifierHash{2137}, ctx);
63 ATH_MSG_INFO((result ? "good" : "bad"));
64
65 return StatusCode::SUCCESS;
66}
67
68//Finalize
69StatusCode
71 ATH_MSG_INFO("Calling finalize");
72
73 return StatusCode::SUCCESS;
74}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_INFO(x)
Header file for the SCT_ModuleVetoTestAlg class in package SCT_ConditionsAlgorithms.
An algorithm that can be simultaneously executed in multiple threads.
This is a "hash" representation of an Identifier.
SCT_ModuleVetoTestAlg(const std::string &name, ISvcLocator *pSvcLocator)
virtual StatusCode initialize() override
virtual StatusCode finalize() override
virtual StatusCode execute(const EventContext &ctx) const override
ToolHandle< ISCT_ConditionsTool > m_pModuleVetoTool