From b00a87ad4fcfb405b22f49f5a94c801d2143553d Mon Sep 17 00:00:00 2001
From: Wouter Verkerke <verkerke@nikhef.nl>
Date: Fri, 3 Dec 2010 13:24:49 +0000
Subject: [PATCH]   o RooAbsReal

    - In attachToTree() give error message if attach to unsupport TTree
      data type is attempted (Savannah #73099)


git-svn-id: http://root.cern.ch/svn/root/trunk@37223 27541ba8-7e3a-0410-8455-c3a389f83636
---
 roofit/roofitcore/src/RooAbsReal.cxx | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/roofit/roofitcore/src/RooAbsReal.cxx b/roofit/roofitcore/src/RooAbsReal.cxx
index e54daa8f510..11bde7cc875 100644
--- a/roofit/roofitcore/src/RooAbsReal.cxx
+++ b/roofit/roofitcore/src/RooAbsReal.cxx
@@ -2914,8 +2914,10 @@ void RooAbsReal::attachToTree(TTree& t, Int_t bufSize)
       setAttribute("UNSIGNED_INTEGER_TREE_BRANCH",kTRUE) ;
       _treeVar = kTRUE ;
       t.SetBranchAddress(cleanName,&_uintValue) ;
-    } else {
+    } else if (!typeName.CompareTo("Double_t")) {
       t.SetBranchAddress(cleanName,&_value) ;
+    } else {
+      coutE(InputArguments) << "RooAbsReal::attachToTree(" << GetName() << ") data type " << typeName << " is not supported" << endl ;
     }   
     
     if (branch->GetCompressionLevel()<0) {
-- 
GitLab