CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
PayloadInspectorModule.h
Go to the documentation of this file.
1 #include <pybind11/pybind11.h>
2 namespace py = pybind11;
3 
4 #define PPCAT_NX(A, B) A##B
5 #define PPCAT(A, B) PPCAT_NX(A, B)
6 #define STRINGIZE_NX(A) #A
7 #define STRINGIZE(A) STRINGIZE_NX(A)
8 
9 #define PAYLOAD_INSPECTOR_MODULE(PAYLOAD_TYPENAME) PYBIND11_MODULE(plugin##PAYLOAD_TYPENAME##_PayloadInspector, m)
10 
11 #define PAYLOAD_INSPECTOR_CLASS(CLASS_NAME) \
12  py::class_<CLASS_NAME, cond::payloadInspector::PlotBase>( \
13  m, \
14  STRINGIZE(PPCAT(plot_, CLASS_NAME))) \
15  .def(py::init<>()) \
16  .def("process", &cond::payloadInspector::PlotBase::process) \
17  .def("payloadType", &cond::payloadInspector::PlotBase::payloadType) \
18  .def("title", &cond::payloadInspector::PlotBase::title) \
19  .def("isSingleIov", &cond::payloadInspector::PlotBase::isSingleIov) \
20  .def("isTwoTags", &cond::payloadInspector::PlotBase::isTwoTags) \
21  .def("data", &cond::payloadInspector::PlotBase::data);