ATLAS Offline Software
ISCT_CalibModuleListTool.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
11 #ifndef ISCT_CalibModuleListTool_h
12 #define ISCT_CalibModuleListTool_h
13 
14 #include "Identifier/Identifier.h"
15 
16 #include "GaudiKernel/IInterface.h"
17 #include "GaudiKernel/IAlgTool.h"
18 #include "GaudiKernel/ToolHandle.h"
19 
20 // STL headers
21 #include <string>
22 #include <vector>
23 #include <set>
24 #include <map>
25 #include <utility>
26 
27 class ISCT_CalibModuleListTool : virtual public IAlgTool {
28  public:
29  //@name Service methods, reimplemented
32  virtual ~ISCT_CalibModuleListTool() = default;
33  static const InterfaceID& interfaceID();
35  virtual StatusCode readModuleList(std::map<Identifier, std::set<Identifier>>& moduleList) const =0;
36 
37  protected:
38  template<class T>
39  std::pair<std::string, bool> retrievedTool(T& tool) const {
40  if (tool.retrieve().isFailure()) return std::make_pair(std::string{"Unable to retrieve "}+tool.name(), false);
41  return std::make_pair("", true);
42  }
43 };
44 
45 inline const InterfaceID& ISCT_CalibModuleListTool::interfaceID() {
46  static const InterfaceID IID{"ISCT_CalibModuleListTool", 1, 0};
47  return IID;
48 }
49 #endif
ISCT_CalibModuleListTool
Definition: ISCT_CalibModuleListTool.h:27
ISCT_CalibModuleListTool::ISCT_CalibModuleListTool
ISCT_CalibModuleListTool()
Definition: ISCT_CalibModuleListTool.h:31
ISCT_CalibModuleListTool::retrievedTool
std::pair< std::string, bool > retrievedTool(T &tool) const
Definition: ISCT_CalibModuleListTool.h:39
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AtlCoolConsole.tool
tool
Definition: AtlCoolConsole.py:453
ISCT_CalibModuleListTool::~ISCT_CalibModuleListTool
virtual ~ISCT_CalibModuleListTool()=default
ISCT_CalibModuleListTool::interfaceID
static const InterfaceID & interfaceID()
Definition: ISCT_CalibModuleListTool.h:45
ISCT_CalibModuleListTool::readModuleList
virtual StatusCode readModuleList(std::map< Identifier, std::set< Identifier >> &moduleList) const =0
TSU::T
unsigned long long T
Definition: L1TopoDataTypes.h:35
WriteBchToCool.moduleList
moduleList
Definition: WriteBchToCool.py:72
Identifier
Definition: IdentifierFieldParser.cxx:14