@@ -35,10 +35,6 @@ when any of the parameters of the input p.d.f. has changed.
3535#include " RooHistPdf.h"
3636#include " RooRealVar.h"
3737
38- using std::string;
39-
40-
41-
4238
4339// //////////////////////////////////////////////////////////////////////////////
4440// / Construct running integral of function '_func' over x_print from
@@ -71,26 +67,17 @@ RooNumRunningInt::RooNumRunningInt(const RooNumRunningInt& other, const char* na
7167 }
7268
7369
74-
75- // //////////////////////////////////////////////////////////////////////////////
76- // / Destructor
77-
78- RooNumRunningInt::~RooNumRunningInt ()
79- {
80- }
81-
82-
8370// //////////////////////////////////////////////////////////////////////////////
8471// / Return unique name for RooAbsCachedPdf cache components
8572// / constructed from input function name
8673
8774const char * RooNumRunningInt::inputBaseName () const
8875{
89- static string ret ;
76+ static std:: string ret ;
9077 ret = func.arg ().GetName () ;
9178 ret += " _NUMRUNINT" ;
9279 return ret.c_str () ;
93- } ;
80+ }
9481
9582
9683
@@ -100,7 +87,7 @@ const char* RooNumRunningInt::inputBaseName() const
10087RooNumRunningInt::RICacheElem::RICacheElem (const RooNumRunningInt &self, const RooArgSet *nset)
10188 : FuncCacheElem(self, nset),
10289 _self(&const_cast <RooNumRunningInt &>(self)),
103- _xx(static_cast <RooRealVar *>( hist()->get()->find(self.x.arg().GetName() )))
90+ _xx(* hist ()->get()->find(self.x.arg().GetName()))
10491{
10592 // Instantiate temp arrays
10693 _ax.resize (hist ()->numEntries ());
@@ -110,7 +97,7 @@ RooNumRunningInt::RICacheElem::RICacheElem(const RooNumRunningInt &self, const R
11097
11198 for (int i=0 ; i<hist ()->numEntries () ; i++) {
11299 hist ()->get (i) ;
113- _ax[i] = _xx->getVal () ;
100+ _ax[i] = static_cast <RooRealVar*>( _xx. first ()) ->getVal () ;
114101 _ay[i] = -1 ;
115102 }
116103
@@ -125,7 +112,7 @@ RooArgList RooNumRunningInt::RICacheElem::containedArgs(Action action)
125112 RooArgList ret ;
126113 ret.add (FuncCacheElem::containedArgs (action)) ;
127114 ret.add (*_self) ;
128- ret.add (* _xx) ;
115+ ret.add (_xx) ;
129116 return ret ;
130117}
131118
@@ -234,8 +221,8 @@ void RooNumRunningInt::RICacheElem::addRange(Int_t ixlo, Int_t ixhi, Int_t nbins
234221void RooNumRunningInt::RICacheElem::addPoint (Int_t ix)
235222{
236223 hist ()->get (ix) ;
237- _self->x = _xx->getVal () ;
238- _ay[ix] = _self->func .arg ().getVal (* _xx) ;
224+ _self->x = static_cast <RooRealVar*>( _xx. first ()) ->getVal () ;
225+ _ay[ix] = _self->func .arg ().getVal (_xx) ;
239226
240227}
241228
@@ -295,5 +282,3 @@ double RooNumRunningInt::evaluate() const
295282 std::cout << " RooNumRunningInt::evaluate(" << GetName () << " )" << std::endl ;
296283 return 0 ;
297284}
298-
299-
0 commit comments