Skip to content
Snippets Groups Projects
Commit 04178a28 authored by Fons Rademakers's avatar Fons Rademakers
Browse files

From Axel:

Handle TSelectorCint properly by invoking ShowMembers on the interpreted
selector, not the TSelectorCint object. Now also interpreted selectors
get their data members automatically set to elements of the output list.


git-svn-id: http://root.cern.ch/svn/root/trunk@34514 27541ba8-7e3a-0410-8455-c3a389f83636
parent 9fed1ebf
No related branches found
No related tags found
No related merge requests found
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
#include "TMemberInspector.h" #include "TMemberInspector.h"
#include "TProofDebug.h" #include "TProofDebug.h"
#include "TSelector.h" #include "TSelector.h"
#include "TSelectorCint.h"
namespace { namespace {
...@@ -191,7 +192,15 @@ Bool_t TOutputListSelectorDataMap::Init(TSelector* sel) ...@@ -191,7 +192,15 @@ Bool_t TOutputListSelectorDataMap::Init(TSelector* sel)
char parent[1024]; char parent[1024];
parent[0] = 0; parent[0] = 0;
TCollectDataMembers cdm(*this); TCollectDataMembers cdm(*this);
if (!sel->IsA()->CallShowMembers(sel, cdm, parent)) { TClass* cl = sel->IsA();
if (cl->InheritsFrom(TSelectorCint::Class())) {
// we don't want to set TSelectorCint's data members, but
// the data members that it represents!
TSelectorCint* selCINT = dynamic_cast<TSelectorCint*>(sel);
cl = selCINT->GetInterpretedClass();
sel = selCINT->GetInterpretedSelector();
}
if (!cl->CallShowMembers(sel, cdm, parent)) {
// failed to map // failed to map
PDB(kOutput,1) Warning("Init","Failed to determine mapping!"); PDB(kOutput,1) Warning("Init","Failed to determine mapping!");
return kFALSE; return kFALSE;
...@@ -226,7 +235,15 @@ Bool_t TOutputListSelectorDataMap::SetDataMembers(TSelector* sel) const ...@@ -226,7 +235,15 @@ Bool_t TOutputListSelectorDataMap::SetDataMembers(TSelector* sel) const
char parent[1024]; char parent[1024];
parent[0] = 0; parent[0] = 0;
TSetSelDataMembers ssdm(*this, fMap, output); TSetSelDataMembers ssdm(*this, fMap, output);
Bool_t res = sel->IsA()->CallShowMembers(sel, ssdm, parent); TClass* cl = sel->IsA();
if (cl->InheritsFrom(TSelectorCint::Class())) {
// we don't want to set TSelectorCint's data members, but
// the data members that it represents!
TSelectorCint* selCINT = dynamic_cast<TSelectorCint*>(sel);
cl = selCINT->GetInterpretedClass();
sel = selCINT->GetInterpretedSelector();
}
Bool_t res = cl->CallShowMembers(sel, ssdm, parent);
PDB(kOutput,1) Info("SetDataMembers()","%s, set %d data members.", PDB(kOutput,1) Info("SetDataMembers()","%s, set %d data members.",
(res ? "success" : "failure"), ssdm.GetNumSet()); (res ? "success" : "failure"), ssdm.GetNumSet());
return res; return res;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment