ATLAS Offline Software
Loading...
Searching...
No Matches
SCT_SensorsTestAlg.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
14#include "SCT_SensorsTestAlg.h"
15
16//Gaudi includes
17#include "GaudiKernel/StatusCode.h"
18
19// Include STL stuff
20#include <vector>
21
23 ISvcLocator* pSvcLocator) :
24 AthReentrantAlgorithm(name, pSvcLocator) {
25 //nop
26}
27
28//Initialize
30 ATH_MSG_INFO("Calling initialize");
31 ATH_CHECK(m_SensorsTool.retrieve());
32 return StatusCode::SUCCESS;
33}
34
35//Execute
36StatusCode SCT_SensorsTestAlg::execute(const EventContext& ctx) const {
37 //This method is only used to test the summary service, and only used within this package,
38 // so the INFO level messages have no impact on performance of these services when used by clients
39 ATH_MSG_INFO("Calling execute");
40 std::vector<std::string> values;
41 m_SensorsTool->getSensorsData(values, ctx);
42 for (const std::string& value: values) {
43 ATH_MSG_INFO("------------" << value << "------------");
44 }
45 m_SensorsTool->printManufacturers(ctx);
46 return StatusCode::SUCCESS;
47}
48
49//Finalize
51 ATH_MSG_INFO("Calling finalize");
52 return StatusCode::SUCCESS;
53}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_INFO(x)
Header file for SCT_SensorsTestAlg class.
An algorithm that can be simultaneously executed in multiple threads.
SCT_SensorsTestAlg(const std::string &name, ISvcLocator *pSvcLocator)
virtual StatusCode execute(const EventContext &ctx) const override
Gaudi executer.
virtual StatusCode initialize() override
Gaudi initialiser.
ToolHandle< ISCT_SensorsTool > m_SensorsTool
virtual StatusCode finalize() override
Gaudi finaliser.