ROOT
6.10/09
Reference Guide
roofit
roofitcore
inc
RooMapCatEntry.h
Go to the documentation of this file.
1
/*****************************************************************************
2
* Project: RooFit *
3
* Package: RooFitCore *
4
* File: $Id: RooMapCatEntry.h,v 1.13 2007/05/11 09:11:30 verkerke Exp $
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
#ifndef ROO_MAP_CAT_ENTRY
17
#define ROO_MAP_CAT_ENTRY
18
19
#include "
TNamed.h
"
20
#include "
TRegexp.h
"
21
#include "
RooCatType.h
"
22
23
class
RooMapCatEntry
:
public
TNamed
{
24
public
:
25
inline
RooMapCatEntry
() :
TNamed
(),
_regexp
(
""
),
_cat
() {}
26
virtual
~RooMapCatEntry
() {} ;
27
RooMapCatEntry
(
const
char
*
exp
,
const
RooCatType
* cat) ;
28
RooMapCatEntry
(
const
RooMapCatEntry
& other) ;
29
virtual
TObject
*
Clone
(
const
char
* newName=0)
const
{
30
RooMapCatEntry
* ca =
new
RooMapCatEntry
(*
this
);
31
if
(newName) { ca->
SetName
(newName) ; }
32
return
ca ;
33
}
34
35
inline
Bool_t
ok
() {
return
(
_regexp
.
Status
()==
TRegexp::kOK
) ; }
36
Bool_t
match
(
const
char
* testPattern)
const
;
37
inline
const
RooCatType
&
outCat
()
const
{
return
_cat
; }
38
39
protected
:
40
41
TString
mangle
(
const
char
* exp)
const
;
42
43
TRegexp
_regexp
;
44
RooCatType
_cat
;
45
46
ClassDef
(
RooMapCatEntry
,1)
// Utility class, holding a map expression from a index label regexp to a RooCatType
47
} ;
48
49
50
#endif
RooMapCatEntry::_cat
RooCatType _cat
Definition:
RooMapCatEntry.h:44
TNamed::SetName
virtual void SetName(const char *name)
Set the name of the TNamed.
Definition:
TNamed.cxx:131
TRegexp
Regular expression class.
Definition:
TRegexp.h:31
RooMapCatEntry::RooMapCatEntry
RooMapCatEntry()
Definition:
RooMapCatEntry.h:25
TString
Basic string class.
Definition:
TString.h:129
Bool_t
bool Bool_t
Definition:
RtypesCore.h:59
RooMapCatEntry::~RooMapCatEntry
virtual ~RooMapCatEntry()
Definition:
RooMapCatEntry.h:26
RooMapCatEntry::outCat
const RooCatType & outCat() const
Definition:
RooMapCatEntry.h:37
RooMapCatEntry::match
Bool_t match(const char *testPattern) const
Definition:
RooMapCatEntry.cxx:46
TNamed.h
ClassDef
#define ClassDef(name, id)
Definition:
Rtypes.h:297
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
RooMapCatEntry::_regexp
TRegexp _regexp
Definition:
RooMapCatEntry.h:43
TRegexp::kOK
Definition:
TRegexp.h:34
TRegexp.h
RooMapCatEntry::Clone
virtual TObject * Clone(const char *newName=0) const
Make a clone of an object using the Streamer facility.
Definition:
RooMapCatEntry.h:29
RooMapCatEntry::mangle
TString mangle(const char *exp) const
Definition:
RooMapCatEntry.cxx:53
TObject
Mother of all ROOT objects.
Definition:
TObject.h:37
RooMapCatEntry
Definition:
RooMapCatEntry.h:23
TRegexp::Status
EStatVal Status()
Check status of regexp.
Definition:
TRegexp.cxx:231
RooMapCatEntry::ok
Bool_t ok()
Definition:
RooMapCatEntry.h:35
exp
double exp(double)
RooCatType.h