/
githubmirror
/
cmssw
Обзор
Документация
Войти
/
githubmirror
/
cmssw
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
FWCore/Reflection/interface/reflex.h
41 строка
1 KB
Andrea Bocci
Introduce macros to implement ROOT dictionary annotations
10 янв 2023, 19:30
Не верифицирован
10 янв 2023, 19:30
5cdcd9f
Код
Авторство
О чём код?
#ifndef FWCore_Reflection_interface_reflex_h #define FWCore_Reflection_interface_reflex_h /* These macros can be used to annotate the data members of DataFormats classes * and achieve the same effect of ROOT-style comments or reflex dictionaries: * * private: * int size_; * float* data_; //[size_] * float* transient_; //! * * can be expressed as * * private: * int size_; * float* data_ EDM_REFLEX_SIZE(size_); * float* transient_ EDM_REFLEX_TRANSIENT; * * The main advantage is that - unlike comments - these macros can be used inside * other macros. * * To avoid warning about unrecognised attributes, these macros expand to nothing * unless __CLING__ is defined. */ #include "FWCore/Utilities/interface/stringize.h" #ifdef __CLING__ // Macros used to annotate class members for the generation of ROOT dictionaries #define EDM_REFLEX_TRANSIENT [[clang::annotate("!")]] #define EDM_REFLEX_SIZE(SIZE) [[clang::annotate("[" EDM_STRINGIZE(SIZE) "]")]] #else #define EDM_REFLEX_TRANSIENT #define EDM_REFLEX_SIZE(SIZE) #endif // __CLING__ #endif // FWCore_Reflection_interface_reflex_h