#include "RooFit.h"
#include "RooMapCatEntry.h"
#include "RooMapCatEntry.h"
#include "TString.h"
ClassImp(RooMapCatEntry)
;
RooMapCatEntry::RooMapCatEntry(const char* exp, const RooCatType* cat) :
TNamed(exp,mangle(exp).Data()), _regexp(mangle(exp),kTRUE), _cat(*cat)
{
}
RooMapCatEntry::RooMapCatEntry(const RooMapCatEntry& other) :
TNamed(other), _regexp(other.GetTitle(),kTRUE), _cat(other._cat)
{
}
Bool_t RooMapCatEntry::match(const char* testPattern) const
{
return (TString(testPattern).Index(_regexp)>=0) ;
}
TString RooMapCatEntry::mangle(const char* exp) const
{
TString t ;
const char *c = exp ;
while(*c) {
if (*c=='+') t.Append('\\') ;
t.Append(*c) ;
c++ ;
}
return t ;
}
Last update: Thu Jan 17 08:45:11 2008
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.