|  | ATLAS Offline Software
    | 
 
 
 
Go to the documentation of this file.
    5 #ifndef CLIDCOMPS_CLASSIDSVC_H 
    6 # define CLIDCOMPS_CLASSIDSVC_H 
   13 #include <unordered_map> 
   19 #include "GaudiKernel/IIncidentListener.h" 
   20 #include "GaudiKernel/IClassIDSvc.h" 
   21 #include "GaudiKernel/Service.h" 
   22 #include "GaudiKernel/DirSearchPath.h" 
   36 class ClassIDSvc : 
public extends<Service, IClassIDSvc, IIncidentListener>
 
   39   typedef std::pair<std::string, std::string> 
TypeName; 
 
   40   typedef std::unordered_map<CLID, TypeName> 
CLIDMap; 
 
   41   typedef std::unordered_map<std::string, CLID> 
NameMap; 
 
   69                                   const std::string& typeInfoName = 
"") 
override;
 
   90   void handle(
const Incident &inc) 
override;
 
  110                                const std::string& typeInfoName);
 
  117   Gaudi::Property<std::vector<std::string>> 
m_DBFiles{
this, 
"CLIDDBFiles", {
"clid.db"},
 
  118     "List of db files with (CLID, class_name) entries. Loaded at init in svc maps. Files are looked up in DATAPATH",
 
  119     "OrderedSet<std::string>"};
 
  122     "Path to clid.db file for writing. By default ('NULL') to not create the file."};
 
  138 #endif // CLIDCOMPS_CLASSIDSVC_H 
  
std::unordered_map< CLID, TypeName > CLIDMap
virtual StatusCode getTypeInfoNameOfID(const CLID &id, std::string &typeInfoName) const override
get user assigned type-info name associated with clID
virtual bool isIDInUse(const CLID &id) const override
check if id is used
std::unordered_map< std::string, CLID > NameMap
StatusCode fillDB()
get clids from CLIDDB and from registry entries
void dump() const
dump to MsgStream contents of in memory DB
void handle(const Incident &inc) override
implement IIncidentListener
virtual StatusCode finalize() override
dump CLIDmap to outputFileName;
DirSearchPath m_clidDBPath
The path is which clid db files are to be searched (DATAPATH)
virtual StatusCode getTypeNameOfID(const CLID &id, std::string &typeName) const override
get type name associated with clID (if any)
::StatusCode StatusCode
StatusCode definition for legacy code.
virtual StatusCode initialize() override
Gaudi Service Implementation.
virtual StatusCode setTypeForID(const CLID &id, const std::string &typeName, const std::string &typeInfoName="") override
associate type name, package info and type-info name with clID
virtual bool isNameInUse(const std::string &name) const override
check if id is used
AthROOTErrorHandlerSvc * svc
bool getRegistryEntries(const std::string &moduleName)
load clid/names from a DLL registry
bool processCLIDDB(const std::string &fileName)
load clid/names from a "db" file
uint32_t CLID
The Class ID type.
virtual StatusCode reinitialize() override
ClassIDSvc(const std::string &name, ISvcLocator *svc)
Standard Constructor.
std::vector< CLID > sortedIDs() const
Return all registered IDs in sorted order.
bool maybeRescan() const
Test to see if anything new has been added to the registry.
a static registry of CLID->typeName entries. NOT for general use. Use ClassIDSvc instead.
StatusCode uncheckedSetTypePackageForID(const CLID &id, const std::string &typeName, const std::string &typeInfoName)
associate type name with clID w/o checking CLID range
Gaudi::Property< std::string > m_outputFileName
a service to manage and verify CLID assignments in athena.
virtual CLID nextAvailableID() const override
get next available CLID
virtual StatusCode getIDOfTypeName(const std::string &typeName, CLID &id) const override
get id associated with type name (if any)
std::lock_guard< mutex_t > lock_t
Gaudi::Property< std::vector< std::string > > m_DBFiles
std::pair< std::string, std::string > TypeName
virtual StatusCode getIDOfTypeInfoName(const std::string &typeInfoName, CLID &id) const override
get id associated with type-info name (if any)