Hi,
I am trying to use:
https://root.cern/doc/master/classTMVA_1_1Experimental_1_1RReader.html
to read an XML file produced with TMVA. The training used an spectator and when I call the constructor I see:
<FATAL> : Dataset[Default] : You declared 0 spectators in the Reader while there are 1
This RReader
class makes sense to me and it would be nice if it would be able to accept spectators or that this error be bypassed.
Just in case some else has this problem, I managed to remove the spectators from the XML file with:
for BDTXML in `find . -mindepth 2 -name "*.xml" -type f | sort`;do
cat $BDTXML | grep -v "Spectator" > tmp.xml
ORGNAME=$(echo $BDTXML | sed "s|.xml|_original.xml|g")
#echo "mv $BDTXML $ORGNAME"
mv $BDTXML $ORGNAME
#echo "mv tmp.xml $BDTXML"
mv tmp.xml $BDTXML
diff -y -W 200 --suppress-common-lines $ORGNAME $BDTXML
echo ""
done
which should remove the lines with “Spectator” from the XML files in a given subdirectory (-mindepth 2) in the current directory.
I am using this version of ROOT:
/cvmfs/sft.cern.ch/lcg/views/LCG_99/x86_64-centos7-gcc8-opt/bin/root
Cheers.