ATLAS Offline Software
Classes | Typedefs
Event/xAOD/xAODCore/xAODCore/ClassID_traits.h File Reference

File providing the ClassID_traits traits class. More...

#include <stdint.h>
#include <string>
#include <typeinfo>
Include dependency graph for Event/xAOD/xAODCore/xAODCore/ClassID_traits.h:

Go to the source code of this file.

Classes

struct  ERROR_you_should_use_the_CLASS_DEF_macro_to_define_CLID_and_VERSION< T >
 Helper used in order to get the clear error message for the developer. More...
 
class  ClassID_traits< T >
 Default, invalid implementation of ClassID_traits. More...
 

Typedefs

typedef uint32_t CLID
 The Class ID type. More...
 

Detailed Description

File providing the ClassID_traits traits class.

Author
Tomasz Bold tomas.nosp@m.z.bo.nosp@m.ld@ce.nosp@m.rn.c.nosp@m.h

In Athena all the EDM classes are identified using an ATLAS specific system that assigns "class IDs" to the different classes. We do this by using the CLASS_DEF macro in the headers of the EDM classes like:

#include "xAODCore/CLASS_DEF.h"
CLASS_DEF( xAOD::ClassName, 123456, 1 )

So made association between the type and identifier is helpful in varous places, trigger among them. It is used in there in order to navigate from the type to the CLID and thanks to that, to RoIs.

Code to do it is ClassID_traits<xAOD::ClassName>::ID() and ClassID_traits<xAOD::ClassName>::typeName(). This functionality is provided below.

To help developers in figurng out that the CLASS_DEF has not been made for a given class, a compile time error is emitted.

Revision
613558
Date
2014-08-26 19:16:16 +0200 (Tue, 26 Aug 2014)

Definition in file Event/xAOD/xAODCore/xAODCore/ClassID_traits.h.

Typedef Documentation

◆ CLID

typedef uint32_t CLID

The Class ID type.

Definition at line 47 of file Event/xAOD/xAODCore/xAODCore/ClassID_traits.h.