doxy: helper script prints top-level gPad
authordberzano <dario.berzano@cern.ch>
Thu, 5 Feb 2015 19:11:08 +0000 (20:11 +0100)
committerdberzano <dario.berzano@cern.ch>
Tue, 10 Feb 2015 15:21:12 +0000 (16:21 +0100)
doxygen/alidoxyimg.sh

index 485403e..11c122c 100755 (executable)
@@ -24,7 +24,11 @@ base=${1%.*}
 ext='png'
 
 aliroot -b "$1" <<EOF
-gPad->Print("$base.$ext");
+TVirtualPad *topPad = gPad;
+while (topPad->GetMother() != topPad) {
+  topPad = topPad->GetMother();
+}
+topPad->Print("$base.$ext");
 EOF
 
 if [[ ! -e "${base}.${ext}" ]] ; then