File providing the ClassID_traits traits class. More...
#include <stdint.h>
#include <string>
#include <typeinfo>
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... | |
struct | ClassID_traits< T > |
Typedefs | |
typedef uint32_t | CLID |
The Class ID type. |
File providing the ClassID_traits traits class.
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.