Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Find indirect data members #6730

Merged
merged 2 commits into from Dec 2, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion FWCore/Utilities/src/MemberWithDict.cc
Expand Up @@ -7,7 +7,7 @@

namespace edm {

MemberWithDict::MemberWithDict() : dataMember_() {
MemberWithDict::MemberWithDict() : dataMember_(nullptr) {
}

MemberWithDict::MemberWithDict(TDataMember* dataMember) : dataMember_(dataMember) {
Expand Down
11 changes: 10 additions & 1 deletion FWCore/Utilities/src/TypeWithDict.cc
Expand Up @@ -16,6 +16,7 @@
#include "TEnumConstant.h"
#include "TInterpreter.h"
#include "TMethodArg.h"
#include "TRealData.h"
#include "TROOT.h"

#include "boost/thread/tss.hpp"
Expand Down Expand Up @@ -535,7 +536,15 @@ namespace edm {
MemberWithDict
TypeWithDict::dataMemberByName(std::string const& member) const {
if (class_ != nullptr) {
return MemberWithDict(class_->GetDataMember(member.c_str()));
TDataMember* dataMember = class_->GetDataMember(member.c_str());
if(dataMember == nullptr) {
// Look for indirect data members
TRealData* realDataMember = class_->GetRealData(member.c_str());
if(realDataMember != nullptr) {
dataMember = realDataMember->GetDataMember();
}
}
return MemberWithDict(dataMember);
}
if (enum_ != nullptr) {
TClass* cl = enum_->GetClass();
Expand Down