/*****************************************************************************
 * Project: RooFit                                                           *
 * Package: RooFitCore                                                       *
 * @(#)root/roofitcore:$Id$
 * 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)             *
 *****************************************************************************/

//////////////////////////////////////////////////////////////////////////////
// 
// BEGIN_HTML
// RooCatType is an auxilary class for RooAbsCategory and defines a 
// a single category state. The class holds a string label and an integer 
// index value which define the state
// END_HTML
//

#include "RooFit.h"

#include <stdlib.h>
#include <stdlib.h>
#include "TClass.h"
#include "RooCatType.h"

#include "Riostream.h"


using namespace std;

ClassImp(RooCatType)
;



//_____________________________________________________________________________
void RooCatType::SetName(const Text_t* name) 
{ 
  // Constructor with name argument
  if (strlen(name)>255) {
    std::cout << "RooCatType::SetName warning: label '" << name << "' truncated at 255 chars" << std::endl ;
    _label[255]=0 ;
  }
  strncpy(_label,name,255) ;
}



//_____________________________________________________________________________
void RooCatType::printName(ostream& os) const 
{
  // Print the name of the state
  os << GetName() ;
}



//_____________________________________________________________________________
void RooCatType::printTitle(ostream& os) const 
{
  // Print the title of the state
  os << GetTitle() ;
}



//_____________________________________________________________________________
void RooCatType::printClassName(ostream& os) const 
{
  // Print the class name of the state
  os << IsA()->GetName() ;
}



//_____________________________________________________________________________
void RooCatType::printValue(ostream& os) const
{
  // Print the value (index integer) of the state
  os << getVal() ;
}

 RooCatType.cxx:1
 RooCatType.cxx:2
 RooCatType.cxx:3
 RooCatType.cxx:4
 RooCatType.cxx:5
 RooCatType.cxx:6
 RooCatType.cxx:7
 RooCatType.cxx:8
 RooCatType.cxx:9
 RooCatType.cxx:10
 RooCatType.cxx:11
 RooCatType.cxx:12
 RooCatType.cxx:13
 RooCatType.cxx:14
 RooCatType.cxx:15
 RooCatType.cxx:16
 RooCatType.cxx:17
 RooCatType.cxx:18
 RooCatType.cxx:19
 RooCatType.cxx:20
 RooCatType.cxx:21
 RooCatType.cxx:22
 RooCatType.cxx:23
 RooCatType.cxx:24
 RooCatType.cxx:25
 RooCatType.cxx:26
 RooCatType.cxx:27
 RooCatType.cxx:28
 RooCatType.cxx:29
 RooCatType.cxx:30
 RooCatType.cxx:31
 RooCatType.cxx:32
 RooCatType.cxx:33
 RooCatType.cxx:34
 RooCatType.cxx:35
 RooCatType.cxx:36
 RooCatType.cxx:37
 RooCatType.cxx:38
 RooCatType.cxx:39
 RooCatType.cxx:40
 RooCatType.cxx:41
 RooCatType.cxx:42
 RooCatType.cxx:43
 RooCatType.cxx:44
 RooCatType.cxx:45
 RooCatType.cxx:46
 RooCatType.cxx:47
 RooCatType.cxx:48
 RooCatType.cxx:49
 RooCatType.cxx:50
 RooCatType.cxx:51
 RooCatType.cxx:52
 RooCatType.cxx:53
 RooCatType.cxx:54
 RooCatType.cxx:55
 RooCatType.cxx:56
 RooCatType.cxx:57
 RooCatType.cxx:58
 RooCatType.cxx:59
 RooCatType.cxx:60
 RooCatType.cxx:61
 RooCatType.cxx:62
 RooCatType.cxx:63
 RooCatType.cxx:64
 RooCatType.cxx:65
 RooCatType.cxx:66
 RooCatType.cxx:67
 RooCatType.cxx:68
 RooCatType.cxx:69
 RooCatType.cxx:70
 RooCatType.cxx:71
 RooCatType.cxx:72
 RooCatType.cxx:73
 RooCatType.cxx:74
 RooCatType.cxx:75
 RooCatType.cxx:76
 RooCatType.cxx:77
 RooCatType.cxx:78
 RooCatType.cxx:79
 RooCatType.cxx:80
 RooCatType.cxx:81
 RooCatType.cxx:82
 RooCatType.cxx:83
 RooCatType.cxx:84
 RooCatType.cxx:85
 RooCatType.cxx:86
 RooCatType.cxx:87
 RooCatType.cxx:88
 RooCatType.cxx:89