ATLAS Offline Software
Loading...
Searching...
No Matches
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
10
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
27class 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
45inline const InterfaceID& ISCT_CalibModuleListTool::interfaceID() {
46 static const InterfaceID IID{"ISCT_CalibModuleListTool", 1, 0};
47 return IID;
48}
49#endif
static const InterfaceID & interfaceID()
virtual ~ISCT_CalibModuleListTool()=default
std::pair< std::string, bool > retrievedTool(T &tool) const
virtual StatusCode readModuleList(std::map< Identifier, std::set< Identifier > > &moduleList) const =0