From a15863ef8d3167574d559e22a0d3d676f23e9baa Mon Sep 17 00:00:00 2001 From: Frank Gaede <frank.gaede@desy.de> Date: Mon, 5 Aug 2013 08:03:10 +0000 Subject: [PATCH] - added method fieldDescription() to return description string --- DDCore/include/DD4hep/IDDescriptor.h | 3 ++- DDCore/src/IDDescriptor.cpp | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/DDCore/include/DD4hep/IDDescriptor.h b/DDCore/include/DD4hep/IDDescriptor.h index 88c588f6c..ea860384f 100644 --- a/DDCore/include/DD4hep/IDDescriptor.h +++ b/DDCore/include/DD4hep/IDDescriptor.h @@ -81,9 +81,10 @@ namespace DD4hep { IDDescriptor() : Ref_t() {} /// Constructor to be used when reading the already parsed object template <typename Q> IDDescriptor(const Handle<Q>& e) : Ref_t(e) {} - /// Initializing constructor IDDescriptor(const std::string& description); + // the string description of all fields + std::string fieldDescription() const ; /// The total number of encoding bits for this descriptor unsigned maxBit() const; /// Access the field-id container diff --git a/DDCore/src/IDDescriptor.cpp b/DDCore/src/IDDescriptor.cpp index 726642dd9..8ca79a8a7 100644 --- a/DDCore/src/IDDescriptor.cpp +++ b/DDCore/src/IDDescriptor.cpp @@ -99,6 +99,11 @@ string IDDescriptor::toString() const { return "----"; } +std::string IDDescriptor::fieldDescription() const { + BitField64* bf = data<Object>() ; + return bf->fieldDescription() ; +} + /// The total number of encoding bits for this descriptor unsigned IDDescriptor::maxBit() const { return data<Object>()->highestBit(); -- GitLab