Loading [MathJax]/extensions/tex2jax.js
ROOT
6.12/07
Reference Guide
ROOT Home Page
Main Page
Tutorials
User's Classes
+
Namespaces
Namespace List
+
Namespace Members
+
All
<
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
<
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Typedefs
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
u
w
x
+
Enumerations
a
e
f
g
m
p
t
w
y
+
Enumerator
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
w
+
All Classes
Class List
Class Index
Class Hierarchy
+
Class Members
+
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Typedefs
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
y
+
Enumerations
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
w
y
+
Enumerator
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
+
Properties
f
+
Related Functions
:
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
+
Files
File List
+
File Members
+
All
1
2
3
4
5
6
7
8
9
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
+
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Typedefs
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
+
Enumerations
c
e
f
i
l
m
p
r
u
x
+
Enumerator
a
c
d
e
f
g
h
i
k
l
n
o
p
r
s
v
w
+
Macros
1
2
3
4
5
6
7
8
9
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Release Notes
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
roofit
roofitcore
src
RooMapCatEntry.cxx
Go to the documentation of this file.
1
/*****************************************************************************
2
* Project: RooFit *
3
* Package: RooFitCore *
4
* @(#)root/roofitcore:$Id$
5
* Authors: *
6
* WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu *
7
* DK, David Kirkby, UC Irvine, dkirkby@uci.edu *
8
* *
9
* Copyright (c) 2000-2005, Regents of the University of California *
10
* and Stanford University. All rights reserved. *
11
* *
12
* Redistribution and use in source and binary forms, *
13
* with or without modification, are permitted according to the terms *
14
* listed in LICENSE (http://roofit.sourceforge.net/license.txt) *
15
*****************************************************************************/
16
17
// -- CLASS DESCRIPTION [AUX] --
18
// RooMapCatEntry is an auxilary class for RooMappedCategory and defines a
19
// a mapping. A mapping consists of a wildcard regular expression, that
20
// can be matched against the input category state label and an output
21
// category state (RooCatType), which should be assign if the match is successfull.
22
23
#include "
RooFit.h
"
24
25
#include "
RooMapCatEntry.h
"
26
#include "
RooMapCatEntry.h
"
27
#include "
TString.h
"
28
29
using namespace
std
;
30
31
ClassImp
(
RooMapCatEntry
);
32
;
33
34
RooMapCatEntry::RooMapCatEntry
(
const
char
*
exp
,
const
RooCatType
* cat) :
35
TNamed
(exp,mangle(exp).Data()), _regexp(mangle(exp),
kTRUE
), _cat(*cat)
36
{
37
}
38
39
40
RooMapCatEntry::RooMapCatEntry
(
const
RooMapCatEntry
& other) :
41
TNamed
(other),
_regexp
(other.
GetTitle
(),
kTRUE
),
_cat
(other.
_cat
)
42
{
43
}
44
45
46
Bool_t
RooMapCatEntry::match
(
const
char
* testPattern)
const
47
{
48
return
(TString(testPattern).
Index
(
_regexp
)>=0) ;
49
}
50
51
52
53
TString
RooMapCatEntry::mangle
(
const
char
*
exp
)
const
54
{
55
// Mangle name : escape regexp character '+'
56
TString t ;
57
const
char
*c =
exp
;
58
while
(*c) {
59
if
(*c==
'+'
) t.Append(
'\\'
) ;
60
t.Append(*c) ;
61
c++ ;
62
}
63
return
t ;
64
}
RooMapCatEntry::_cat
RooCatType _cat
Definition:
RooMapCatEntry.h:44
RooMapCatEntry::RooMapCatEntry
RooMapCatEntry()
Definition:
RooMapCatEntry.h:25
Bool_t
bool Bool_t
Definition:
RtypesCore.h:59
std
STL namespace.
RooMapCatEntry::match
Bool_t match(const char *testPattern) const
Definition:
RooMapCatEntry.cxx:46
TNamed
The TNamed class is the base class for all named ROOT classes.
Definition:
TNamed.h:29
RooCatType
RooCatType is an auxilary class for RooAbsCategory and defines a a single category state...
Definition:
RooCatType.h:22
TString.h
RooMapCatEntry::_regexp
TRegexp _regexp
Definition:
RooMapCatEntry.h:43
RooMapCatEntry.h
RooFit::Index
RooCmdArg Index(RooCategory &icat)
Definition:
RooGlobalFunc.cxx:96
ClassImp
#define ClassImp(name)
Definition:
Rtypes.h:359
RooMapCatEntry::mangle
TString mangle(const char *exp) const
Definition:
RooMapCatEntry.cxx:53
RooMapCatEntry
Definition:
RooMapCatEntry.h:23
RooFit.h
exp
double exp(double)
kTRUE
const Bool_t kTRUE
Definition:
RtypesCore.h:87
TNamed::GetTitle
virtual const char * GetTitle() const
Returns title of object.
Definition:
TNamed.h:48