ATLAS Offline Software
Loading...
Searching...
No Matches
SCT_DCSConditionsTestAlg.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3*/
4
8
9// Include SCT_DCSConditionsTestAlg and Svc
11
12// Include Athena stuff
13#include "Identifier/Identifier.h"
14
16 ISvcLocator* pSvcLocator) :
17 AthReentrantAlgorithm(name, pSvcLocator)
18{ //nop
19}
20
21//----------------------------------------------------------------------
23 // Get the messaging service, print where you are
24 ATH_MSG_INFO("in initialize()");
26
27 return StatusCode::SUCCESS;
28} // SCT_DCSConditionsTestAlg::execute()
29
30//----------------------------------------------------------------------
31StatusCode SCT_DCSConditionsTestAlg::execute(const EventContext& ctx) const {
32 //This method is only used to test the summary service, and only used within this package,
33 // so the INFO level messages have no impact on performance of these services when used by clients
34 ATH_MSG_DEBUG("in execute()");
35
36 bool isgoodworks{false};
37 float gethvworks{0.0};
38 float gettempworks{0.0};
39 bool module{false};
40 bool strip{false};
42
43 try {
44 gettempworks = (m_DCSConditionsTool->sensorTemperature(Identifier{141015041}, ctx, InDetConditions::SCT_STRIP));
45 isgoodworks =(m_DCSConditionsTool->isGood(Identifier{208584704}, ctx, InDetConditions::SCT_SIDE));
46 module = (m_DCSConditionsTool->canReportAbout(InDetConditions::SCT_MODULE));
48 } catch(...) {
49 ATH_MSG_FATAL("Exception caught while trying to the gettemp method");
50 return StatusCode::FAILURE;
51 }
52
53 ATH_MSG_INFO("canReportAbout SCT_MODULE " << module << " SCT_STRIP " << strip);
54 ATH_MSG_INFO("gettemp(141015041,Strip) " << (gettempworks ? "successful" : "failed"));
55 ATH_MSG_INFO("gettemp(141015041,Strip) " << gettempworks);
56
57 try {
58 gethvworks = (m_DCSConditionsTool->modHV(Identifier{141015041}, ctx, InDetConditions::SCT_STRIP));
59 } catch(...) {
60 ATH_MSG_FATAL("Exception caught while trying to the modHV method");
61 return StatusCode::FAILURE;
62 }
63
64 ATH_MSG_INFO("gethv(141015041,Strip) " << (gethvworks ? "successful" : "failed"));
65 ATH_MSG_INFO("gethv(141015041,Strip) " << (m_DCSConditionsTool->modHV(Identifier{141015041}, ctx, InDetConditions::SCT_STRIP)));
66
67 try {
68 isgoodworks = (m_DCSConditionsTool->isGood(Identifier{208584704}, ctx, InDetConditions::SCT_SIDE));
69 isgoodworks = (m_DCSConditionsTool->isGood(Identifier{141015041}, ctx, InDetConditions::SCT_STRIP));
70 } catch(...) {
71 ATH_MSG_FATAL("Exception caught while trying to the isGood method");
72 return StatusCode::FAILURE;
73 }
74
75 ATH_MSG_INFO("isGood(141015041,Strip) " << (isgoodworks ? "successful" : "failed"));
76
77 return StatusCode::SUCCESS;
78} // SCT_DCSConditionsTestAlg::execute()
79
80//----------------------------------------------------------------------
82 // Get the messaging service, print where you are
83 ATH_MSG_INFO("in finalize()");
84 return StatusCode::SUCCESS;
85} // SCT_DCSConditionsTestAlg::finalize()
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_FATAL(x)
#define ATH_MSG_INFO(x)
#define ATH_MSG_DEBUG(x)
An algorithm that can be simultaneously executed in multiple threads.
virtual StatusCode finalize() override final
Gaudi finaliser.
virtual StatusCode execute(const EventContext &ctx) const override final
Gaudi executer.
SCT_DCSConditionsTestAlg(const std::string &name, ISvcLocator *pSvcLocator)
ToolHandle< ISCT_DCSConditionsTool > m_DCSConditionsTool
virtual StatusCode initialize() override final
Gaudi initialiser.