File indexing completed on 2025-03-13 08:19:43
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015 #include <DD4hep/detail/SegmentationsInterna.h>
0016 #include <DD4hep/InstanceCount.h>
0017
0018 #include <DDSegmentation/Segmentation.h>
0019
0020 using namespace dd4hep;
0021
0022
0023 SegmentationObject::SegmentationObject(DDSegmentation::Segmentation* s)
0024 : magic(magic_word()), useForHitPosition(0),
0025 detector(0), sensitive(0), segmentation(s)
0026 {
0027 InstanceCount::increment(this);
0028 }
0029
0030
0031 SegmentationObject::~SegmentationObject() {
0032 InstanceCount::decrement(this);
0033 if (segmentation) {
0034 delete segmentation;
0035 }
0036 }
0037
0038
0039 std::string SegmentationObject::fieldDescription() const {
0040 return segmentation->fieldDescription();
0041 }
0042
0043
0044 const std::string& SegmentationObject::name() const {
0045 return segmentation->name();
0046 }
0047
0048 void SegmentationObject::setName(const std::string& value) {
0049 segmentation->setName(value);
0050 }
0051
0052
0053 const std::string& SegmentationObject::type() const {
0054 return segmentation->type();
0055 }
0056
0057
0058 const std::string& SegmentationObject::description() const {
0059 return segmentation->description();
0060 }
0061
0062
0063 const BitFieldCoder* SegmentationObject::decoder() const {
0064 return segmentation->decoder();
0065 }
0066
0067
0068 void SegmentationObject::setDecoder(const BitFieldCoder* ptr_decoder) const {
0069 segmentation->setDecoder(ptr_decoder);
0070 }
0071
0072
0073 DDSegmentation::Parameter SegmentationObject::parameter(const std::string& parameterName) const {
0074 return segmentation->parameter(parameterName);
0075 }
0076
0077
0078 DDSegmentation::Parameters SegmentationObject::parameters() const {
0079 return segmentation->parameters();
0080 }
0081
0082
0083 void SegmentationObject::setParameters(const DDSegmentation::Parameters& params) {
0084 segmentation->setParameters(params);
0085 }
0086
0087
0088 Position SegmentationObject::position(const CellID& cell) const {
0089 return Position(segmentation->position(cell));
0090 }
0091
0092
0093 CellID SegmentationObject::cellID(const Position& local,
0094 const Position& global,
0095 const VolumeID& volID) const {
0096 return segmentation->cellID(local, global, volID);
0097 }
0098
0099
0100 VolumeID SegmentationObject::volumeID(const CellID& cell) const {
0101 return segmentation->volumeID(cell);
0102 }