ATLAS Offline Software
Loading...
Searching...
No Matches
PyClassIDSvc.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef PYANALYSISCORE_PYCLASSIDSVC_H
6#define PYANALYSISCORE_PYCLASSIDSVC_H
7
13
14#include "GaudiKernel/IClassIDSvc.h"
15#include "GaudiKernel/Bootstrap.h"
16#include "GaudiKernel/ISvcLocator.h"
17#include "GaudiKernel/MsgStream.h"
19
21{
23 static std::string getTypeNameOfID (const unsigned int id)
24 {
25 std::string name;
26 SmartIF<IClassIDSvc> clidSvc{ Gaudi::svcLocator()->service("ClassIDSvc") };
27 CHECK_WITH_CONTEXT( clidSvc.isValid(), "PyClassIDSvc", name );
28
29 CHECK_WITH_CONTEXT( clidSvc->getTypeNameOfID (id, name), "PyClassIDSvc", name );
30
31 return name;
32 }
33};
34
35#endif
36
37
Helpers for checking error return status codes and reporting errors.
#define CHECK_WITH_CONTEXT(...)
Evaluate an expression and check for errors, with an explicitly specified context name.
A wrapper for ClassIDSvc.
static std::string getTypeNameOfID(const unsigned int id)
get type name associated with clID (if any)