Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
HiggsAnalysis
CombinedLimit
src
SimpleCacheSentry.cc
Go to the documentation of this file.
1
#include "../interface/SimpleCacheSentry.h"
2
3
SimpleCacheSentry::SimpleCacheSentry
() : _deps(
"deps"
,
"deps"
,this) {}
4
5
SimpleCacheSentry::SimpleCacheSentry
(
const
RooRealVar &var) :
6
_deps(
"deps"
,
"deps"
,this)
7
{
8
addVar
(var);
9
}
10
11
SimpleCacheSentry::SimpleCacheSentry
(
const
RooAbsCollection &vars) :
12
_deps(
"deps"
,
"deps"
,this)
13
{
14
addVars
(vars);
15
}
16
17
18
SimpleCacheSentry::SimpleCacheSentry
(
const
RooAbsArg &func,
const
RooArgSet *obs) :
19
_deps(
"deps"
,
"deps"
,this)
20
{
21
addFunc
(func,obs);
22
}
23
24
SimpleCacheSentry::SimpleCacheSentry
(
const
SimpleCacheSentry
&other,
const
char
*newname) :
25
_deps(
"deps"
,this,other._deps)
26
{
27
}
28
29
void
SimpleCacheSentry::addVars
(
const
RooAbsCollection &vars)
30
{
31
TIterator *iter = vars.createIterator();
32
for
(RooAbsArg *
a
= (RooAbsArg *) iter->Next();
a
!= 0;
a
= (RooAbsArg *) iter->Next()) {
33
if
(
_deps
.containsInstance(*
a
))
continue
;
34
if
(
a
->isDerived())
addFunc
(*
a
);
35
else
_deps
.add(*
a
);
36
}
37
delete
iter;
38
}
39
40
void
SimpleCacheSentry::addFunc
(
const
RooAbsArg &func,
const
RooArgSet *obs)
41
{
42
RooArgSet *
deps
= func.getParameters(obs,
false
);
43
addVars
(*deps);
44
delete
deps
;
45
}
46
47
SimpleCacheSentry::_deps
RooSetProxy _deps
Definition:
SimpleCacheSentry.h:36
SimpleCacheSentry
Definition:
SimpleCacheSentry.h:8
SimpleCacheSentry::SimpleCacheSentry
SimpleCacheSentry()
Definition:
SimpleCacheSentry.cc:3
SimpleCacheSentry::addVars
void addVars(const RooAbsCollection &vars)
Definition:
SimpleCacheSentry.cc:29
SimpleCacheSentry::deps
RooSetProxy & deps()
Definition:
SimpleCacheSentry.h:15
a
double a
Definition:
hdecay.h:121
SimpleCacheSentry::addVar
void addVar(const RooRealVar &var)
Definition:
SimpleCacheSentry.h:17
SimpleCacheSentry::addFunc
void addFunc(const RooAbsArg &func, const RooArgSet *obs=0)
Definition:
SimpleCacheSentry.cc:40
Generated for CMSSW Reference Manual by
1.8.5