ATLAS Offline Software
SCT_StripVetoTestAlg.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 #include "SCT_StripVetoTestAlg.h"
14 
15 // Athena includes
17 
18 // STL includes
19 #include <vector>
20 
21 SCT_StripVetoTestAlg::SCT_StripVetoTestAlg(const std::string& name, ISvcLocator* pSvcLocator) :
22  AthReentrantAlgorithm(name, pSvcLocator) {
23 }
24 
25 //Initialize
27  ATH_MSG_INFO("Calling initialize");
28 
29  // Retrieve strip veto tool
30  if (m_stripVetoTool.retrieve().isFailure()) {
31  ATH_MSG_FATAL("Could not retrieve the link masking tool");
32  return StatusCode::FAILURE;
33  }
34 
35  return StatusCode::SUCCESS;
36 }
37 
38 //Execute
39 StatusCode SCT_StripVetoTestAlg::execute(const EventContext& ctx) const {
40  std::vector<Identifier::value_type> stripIds{576522359582752768ULL,
41  576522475009998848ULL,
42  576522475278434304ULL,
43  576522475546869760ULL,
44  576522475815305216ULL,
45  576522475815305216ULL};
46 
47  for (Identifier::value_type stripId : stripIds) {
48  ATH_MSG_INFO("Strip " << stripId << " " << (m_stripVetoTool->isGood(Identifier{stripId}, ctx, InDetConditions::SCT_STRIP) ? "not vetoed" : "vetoed"));
49  }
50 
51  return StatusCode::SUCCESS;
52 }
53 
54 //Finalize
56  ATH_MSG_INFO("Calling finalize");
57  return StatusCode::SUCCESS;
58 }
Identifier::value_type
IDENTIFIER_TYPE value_type
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:39
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
SCT_StripVetoTestAlg::SCT_StripVetoTestAlg
SCT_StripVetoTestAlg(const std::string &name, ISvcLocator *pSvcLocator)
Definition: SCT_StripVetoTestAlg.cxx:21
SCT_StripVetoTestAlg::execute
virtual StatusCode execute(const EventContext &ctx) const override
Definition: SCT_StripVetoTestAlg.cxx:39
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:83
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
InDetHierarchy.h
SCT_StripVetoTestAlg::finalize
virtual StatusCode finalize() override
Definition: SCT_StripVetoTestAlg.cxx:55
SCT_StripVetoTestAlg::initialize
virtual StatusCode initialize() override
Definition: SCT_StripVetoTestAlg.cxx:26
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
SCT_StripVetoTestAlg::m_stripVetoTool
ToolHandle< ISCT_ConditionsTool > m_stripVetoTool
Definition: SCT_StripVetoTestAlg.h:38
SCT_StripVetoTestAlg.h
Class to test SCT_StripVetoTool (header)
InDetConditions::SCT_STRIP
@ SCT_STRIP
Definition: InDetHierarchy.h:14