RooMapCatEntry.h

Go to the documentation of this file.
00001 /*****************************************************************************
00002  * Project: RooFit                                                           *
00003  * Package: RooFitCore                                                       *
00004  *    File: $Id: RooMapCatEntry.h,v 1.13 2007/05/11 09:11:30 verkerke Exp $
00005  * Authors:                                                                  *
00006  *   WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu       *
00007  *   DK, David Kirkby,    UC Irvine,         dkirkby@uci.edu                 *
00008  *                                                                           *
00009  * Copyright (c) 2000-2005, Regents of the University of California          *
00010  *                          and Stanford University. All rights reserved.    *
00011  *                                                                           *
00012  * Redistribution and use in source and binary forms,                        *
00013  * with or without modification, are permitted according to the terms        *
00014  * listed in LICENSE (http://roofit.sourceforge.net/license.txt)             *
00015  *****************************************************************************/
00016 #ifndef ROO_MAP_CAT_ENTRY
00017 #define ROO_MAP_CAT_ENTRY
00018 
00019 #include "Riosfwd.h"
00020 #include "TNamed.h"
00021 #include "TRegexp.h"
00022 #include "RooCatType.h"
00023 
00024 class RooMapCatEntry : public TNamed {
00025 public:
00026   inline RooMapCatEntry() : TNamed(), _regexp(""), _cat() {} 
00027   virtual ~RooMapCatEntry() {} ;
00028   RooMapCatEntry(const char* exp, const RooCatType* cat) ;
00029   RooMapCatEntry(const RooMapCatEntry& other) ;
00030   virtual TObject* Clone(const char* newName=0) const { 
00031         RooMapCatEntry* ca = new RooMapCatEntry(*this); 
00032         if (newName) { ca->SetName(newName) ; }
00033         return ca ;
00034         }
00035 
00036   inline Bool_t ok() { return (_regexp.Status()==TRegexp::kOK) ; }
00037   Bool_t match(const char* testPattern) const ;
00038   inline const RooCatType& outCat() const { return _cat ; }
00039 
00040 protected:
00041 
00042   TString mangle(const char* exp) const ;
00043 
00044   TRegexp _regexp ;
00045   RooCatType _cat ;
00046         
00047   ClassDef(RooMapCatEntry,1) // Utility class, holding a map expression from a index label regexp to a RooCatType
00048 } ;
00049 
00050 
00051 #endif

Generated on Tue Jul 5 14:26:13 2011 for ROOT_528-00b_version by  doxygen 1.5.1