ATLAS Offline Software
Control/SGTools/SGTools/exceptions.h
Go to the documentation of this file.
1 // This file's extension implies that it's C, but it's really -*- C++ -*-.
2 
3 /*
4  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
5 */
14 #ifndef SGTOOLS_EXCEPTIONS_H
15 #define SGTOOLS_EXCEPTIONS_H
16 
17 
18 #include "CxxUtils/sgkey_t.h"
19 #include "GaudiKernel/ClassID.h"
20 #include <typeinfo>
21 #include <stdexcept>
22 #include <string>
23 
24 
25 namespace SG {
26 
27 
34  : public std::bad_cast
35 {
36 public:
42  ExcBadDataProxyCast (CLID id, const std::type_info& tid);
43 
44 
45  // Needed for c++98 compatibility.
46  ~ExcBadDataProxyCast() throw() {}
47 
48 
52  virtual const char* what() const throw();
53 
54 
55 private:
57  std::string m_what;
58 };
59 
60 
66 [[noreturn]]
67 void throwExcBadDataProxyCast (CLID id, const std::type_info& tid);
68 
69 
79  : public std::runtime_error
80 {
81 public:
89  ExcProxyCollision (CLID id, const std::string& key,
90  CLID primary_id, const std::string& primary_key);
91 };
92 
93 
101  : public std::runtime_error
102 {
103 public:
112  ExcSgkeyCollision (const std::string& new_key, CLID new_clid,
113  const std::string& old_key, CLID old_clid,
114  sgkey_t sgkey);
115 };
116 
117 
118 } // namespace SG
119 
120 
121 #endif // not SGTOOLS_EXCEPTIONS_H
SG::ExcBadDataProxyCast::what
virtual const char * what() const
Return the message for this exception.
Definition: Control/SGTools/src/exceptions.cxx:45
common.sgkey
def sgkey(tool)
Definition: common.py:1028
SG
Forward declaration.
Definition: CaloCellPacker_400_500.h:32
SG::ExcBadDataProxyCast::ExcBadDataProxyCast
ExcBadDataProxyCast(CLID id, const std::type_info &tid)
Constructor.
Definition: Control/SGTools/src/exceptions.cxx:36
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:562
SG::ExcBadDataProxyCast
Exception — Bad cast of DataProxy with CLID.
Definition: Control/SGTools/SGTools/exceptions.h:35
SG::ExcBadDataProxyCast::m_what
std::string m_what
The message for this exception.
Definition: Control/SGTools/SGTools/exceptions.h:57
SG::ExcSgkeyCollision
Exception — sgkey hash collision.
Definition: Control/SGTools/SGTools/exceptions.h:102
CLID
uint32_t CLID
The Class ID type.
Definition: Event/xAOD/xAODCore/xAODCore/ClassID_traits.h:47
private
#define private
Definition: DetDescrConditionsDict_dict_fixes.cxx:13
SG::sgkey_t
uint32_t sgkey_t
Type used for hashed StoreGate key+CLID pairs.
Definition: CxxUtils/CxxUtils/sgkey_t.h:32
sgkey_t.h
Define the type used for hashed StoreGate key+CLID pairs.
SG::throwExcBadDataProxyCast
void throwExcBadDataProxyCast(CLID id, const std::type_info &tid)
Throw an ExcBadDataProxyCast exception.
Definition: Control/SGTools/src/exceptions.cxx:56
SG::ExcProxyCollision
Exception — Proxy collision for clid/key.
Definition: Control/SGTools/SGTools/exceptions.h:80
SG::ExcBadDataProxyCast::~ExcBadDataProxyCast
~ExcBadDataProxyCast()
Definition: Control/SGTools/SGTools/exceptions.h:46
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37