Skip to content
Snippets Groups Projects
Commit eda42de0 authored by Wouter Verkerke's avatar Wouter Verkerke
Browse files

   o RooVectorDataStore

     - In itialize all pointers to zero in RealVector ctor


git-svn-id: http://root.cern.ch/svn/root/trunk@41885 27541ba8-7e3a-0410-8455-c3a389f83636
parent 1dc25b54
Branches
Tags
No related merge requests found
...@@ -129,12 +129,12 @@ public: ...@@ -129,12 +129,12 @@ public:
class RealVector { class RealVector {
public: public:
RealVector(UInt_t initialCapacity=100) : RealVector(UInt_t initialCapacity=100) :
_nativeReal(0), _buf(0), _nativeBuf(0), _vec0(0), _tracker(0) { _nativeReal(0), _real(0), _buf(0), _nativeBuf(0), _vec0(0), _tracker(0) {
_vec.reserve(initialCapacity) ; _vec.reserve(initialCapacity) ;
} }
RealVector(RooAbsReal* arg, UInt_t initialCapacity=100) : RealVector(RooAbsReal* arg, UInt_t initialCapacity=100) :
_nativeReal(arg), _buf(0), _nativeBuf(0), _vec0(0), _tracker(0) { _nativeReal(arg), _real(0), _buf(0), _nativeBuf(0), _vec0(0), _tracker(0) {
_vec.reserve(initialCapacity) ; _vec.reserve(initialCapacity) ;
} }
...@@ -143,7 +143,7 @@ public: ...@@ -143,7 +143,7 @@ public:
} }
RealVector(const RealVector& other, RooAbsReal* real=0) : RealVector(const RealVector& other, RooAbsReal* real=0) :
_vec(other._vec), _nativeReal(real?real:other._nativeReal), _buf(other._buf), _nativeBuf(other._nativeBuf) { _vec(other._vec), _nativeReal(real?real:other._nativeReal), _real(real?real:other._real), _buf(other._buf), _nativeBuf(other._nativeBuf) {
_vec0 = _vec.size()>0 ? &_vec.front() : 0 ; _vec0 = _vec.size()>0 ? &_vec.front() : 0 ;
if (other._tracker) { if (other._tracker) {
_tracker = new RooChangeTracker(Form("track_%s",_nativeReal->GetName()),"tracker",other._tracker->parameters()) ; _tracker = new RooChangeTracker(Form("track_%s",_nativeReal->GetName()),"tracker",other._tracker->parameters()) ;
...@@ -155,6 +155,7 @@ public: ...@@ -155,6 +155,7 @@ public:
RealVector& operator=(const RealVector& other) { RealVector& operator=(const RealVector& other) {
if (&other==this) return *this ; if (&other==this) return *this ;
_nativeReal = other._nativeReal ; _nativeReal = other._nativeReal ;
_real = other._real ;
_buf = other._buf ; _buf = other._buf ;
_nativeBuf = other._nativeBuf ; _nativeBuf = other._nativeBuf ;
_vec = other._vec ; _vec = other._vec ;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment