diff --git a/roofit/roofitcore/inc/RooAbsReal.h b/roofit/roofitcore/inc/RooAbsReal.h index 5d472fd7291a7ad14d1e3b60142333ad8aab826f..74972a7d22f6cd65d2368e1f0b5dabd005f10b64 100644 --- a/roofit/roofitcore/inc/RooAbsReal.h +++ b/roofit/roofitcore/inc/RooAbsReal.h @@ -371,6 +371,7 @@ protected: mutable Float_t _floatValue ; //! Transient cache for floating point values from tree branches mutable Int_t _intValue ; //! Transient cache for integer values from tree branches mutable UChar_t _byteValue ; //! Transient cache for byte values from tree branches + mutable Char_t _sbyteValue ; //! Transient cache for signed byte values from tree branches mutable UInt_t _uintValue ; //! Transient cache for unsigned integer values from tree branches friend class RooAbsPdf ; diff --git a/roofit/roofitcore/src/RooAbsReal.cxx b/roofit/roofitcore/src/RooAbsReal.cxx index 11bde7cc8750abcddb72334eab81a364b3952992..44b20874119ff9389ad08a5ce90b003b20b01453 100644 --- a/roofit/roofitcore/src/RooAbsReal.cxx +++ b/roofit/roofitcore/src/RooAbsReal.cxx @@ -2848,6 +2848,8 @@ void RooAbsReal::copyCache(const RooAbsArg* source, Bool_t /*valueOnly*/) _value = other->_intValue ; } else if (source->getAttribute("BYTE_TREE_BRANCH")) { _value = other->_byteValue ; + } else if (source->getAttribute("SIGNEDBYTE_TREE_BRANCH")) { + _value = other->_sbyteValue ; } else if (source->getAttribute("UNSIGNED_INTEGER_TREE_BRANCH")) { _value = other->_uintValue ; } @@ -2908,6 +2910,12 @@ void RooAbsReal::attachToTree(TTree& t, Int_t bufSize) setAttribute("BYTE_TREE_BRANCH",kTRUE) ; _treeVar = kTRUE ; t.SetBranchAddress(cleanName,&_byteValue) ; + } else if (!typeName.CompareTo("Char_t")) { + coutI(Eval) << "RooAbsReal::attachToTree(" << GetName() << ") TTree Char_t branch " << GetName() + << " will be converted to double precision" << endl ; + setAttribute("SIGNEDBYTE_TREE_BRANCH",kTRUE) ; + _treeVar = kTRUE ; + t.SetBranchAddress(cleanName,&_sbyteValue) ; } else if (!typeName.CompareTo("UInt_t")) { coutI(Eval) << "RooAbsReal::attachToTree(" << GetName() << ") TTree UInt_t branch " << GetName() << " will be converted to double precision" << endl ;