/*****************************************************************************
 * Project: RooFit                                                           *
 * Package: RooFitCore                                                       *
 *    File: $Id: RooMapCatEntry.h,v 1.13 2007/05/11 09:11:30 verkerke Exp $
 * Authors:                                                                  *
 *   WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu       *
 *   DK, David Kirkby,    UC Irvine,         dkirkby@uci.edu                 *
 *                                                                           *
 * Copyright (c) 2000-2005, Regents of the University of California          *
 *                          and Stanford University. All rights reserved.    *
 *                                                                           *
 * Redistribution and use in source and binary forms,                        *
 * with or without modification, are permitted according to the terms        *
 * listed in LICENSE (http://roofit.sourceforge.net/license.txt)             *
 *****************************************************************************/
#ifndef ROO_MAP_CAT_ENTRY
#define ROO_MAP_CAT_ENTRY

#include "Riosfwd.h"
#include "TNamed.h"
#include "TRegexp.h"
#include "RooCatType.h"

class RooMapCatEntry : public TNamed {
public:
  inline RooMapCatEntry() : TNamed(), _regexp(""), _cat() {} 
  virtual ~RooMapCatEntry() {} ;
  RooMapCatEntry(const char* exp, const RooCatType* cat) ;
  RooMapCatEntry(const RooMapCatEntry& other) ;
  virtual TObject* Clone(const char* newName=0) const { 
 	RooMapCatEntry* ca = new RooMapCatEntry(*this); 
	if (newName) { ca->SetName(newName) ; }
	return ca ;
	}

  inline Bool_t ok() { return (_regexp.Status()==TRegexp::kOK) ; }
  Bool_t match(const char* testPattern) const ;
  inline const RooCatType& outCat() const { return _cat ; }

protected:

  TString mangle(const char* exp) const ;

  TRegexp _regexp ;
  RooCatType _cat ;
	
  ClassDef(RooMapCatEntry,1) // Utility class, holding a map expression from a index label regexp to a RooCatType
} ;


#endif
 RooMapCatEntry.h:1
 RooMapCatEntry.h:2
 RooMapCatEntry.h:3
 RooMapCatEntry.h:4
 RooMapCatEntry.h:5
 RooMapCatEntry.h:6
 RooMapCatEntry.h:7
 RooMapCatEntry.h:8
 RooMapCatEntry.h:9
 RooMapCatEntry.h:10
 RooMapCatEntry.h:11
 RooMapCatEntry.h:12
 RooMapCatEntry.h:13
 RooMapCatEntry.h:14
 RooMapCatEntry.h:15
 RooMapCatEntry.h:16
 RooMapCatEntry.h:17
 RooMapCatEntry.h:18
 RooMapCatEntry.h:19
 RooMapCatEntry.h:20
 RooMapCatEntry.h:21
 RooMapCatEntry.h:22
 RooMapCatEntry.h:23
 RooMapCatEntry.h:24
 RooMapCatEntry.h:25
 RooMapCatEntry.h:26
 RooMapCatEntry.h:27
 RooMapCatEntry.h:28
 RooMapCatEntry.h:29
 RooMapCatEntry.h:30
 RooMapCatEntry.h:31
 RooMapCatEntry.h:32
 RooMapCatEntry.h:33
 RooMapCatEntry.h:34
 RooMapCatEntry.h:35
 RooMapCatEntry.h:36
 RooMapCatEntry.h:37
 RooMapCatEntry.h:38
 RooMapCatEntry.h:39
 RooMapCatEntry.h:40
 RooMapCatEntry.h:41
 RooMapCatEntry.h:42
 RooMapCatEntry.h:43
 RooMapCatEntry.h:44
 RooMapCatEntry.h:45
 RooMapCatEntry.h:46
 RooMapCatEntry.h:47
 RooMapCatEntry.h:48
 RooMapCatEntry.h:49
 RooMapCatEntry.h:50
 RooMapCatEntry.h:51