10#include <boost/python/class.hpp>
18bool isMaskedDeprecated(
const Detector &self) {
19 PyErr_Warn(PyExc_DeprecationWarning,
"'Detector::isMasked' is deprecated, "
20 "use 'DetectorInfo::isMasked' instead.");
25bool isMonitorDeprecated(
const Detector &self) {
26 PyErr_Warn(PyExc_DeprecationWarning,
"'Detector::isMonitor' is deprecated, "
27 "use 'DetectorInfo::isMonitor' instead.");
38 class_<Detector, bases<IDetector, ObjComponent>, boost::noncopyable>(
"Detector", no_init)
39 .def(
"isMasked", &isMaskedDeprecated, arg(
"self"),
40 "Returns the value of the masked flag. True means ignore this "
42 .def(
"isMonitor", &isMonitorDeprecated, arg(
"self"),
43 "Returns True if the detector is marked as a monitor in the IDF");
void export_Detector()
Enables boost.python to automatically "cast" an object up to the appropriate Detector leaf type.
bool isMasked(const size_t index) const
Returns true if the detector is masked.
bool isMonitor(const size_t index) const
Returns true if the detector is a monitor.
This class represents a detector - i.e.
size_t index() const override
Helper for legacy access mode. Returns the index of the detector.
const ParameterMap & parameterMap() const override
Helper for legacy access mode. Returns a reference to the ParameterMap.
Interface class for detector objects.
Object Component class, this class brings together the physical attributes of the component to the po...
const Geometry::DetectorInfo & detectorInfo() const
Only for use by ExperimentInfo. Returns a reference to the DetectorInfo.