ROOT logo
/*****************************************************************************
 * Project: RooFit                                                           *
 * Package: RooFitCore                                                       *
 * @(#)root/roofitcore:$Id: RooAbsCategory.cxx 41998 2011-11-15 10:34:40Z moneta $
 * 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
// RooAbsCategory is the common abstract base class for objects that
// represent a discrete value with a finite number of states. Each
// state consist of a label/index pair, which is stored in a
// RooCatType object.
// 
// Implementation of RooAbsCategory may be derived, there no interface
// is provided to modify the contents, nor a public interface to define states.
// END_HTML
//
//

#include "RooFit.h"

#include "Riostream.h"
#include "Riostream.h"
#include <stdlib.h>
#include "TString.h"
#include "TH1.h"
#include "TTree.h"
#include "TLeaf.h"
#include "RooAbsCategory.h"
#include "RooArgSet.h"
#include "Roo1DTable.h"
#include "RooCategory.h"
#include "RooMsgService.h"
#include "RooVectorDataStore.h"

ClassImp(RooAbsCategory) 
;


//_____________________________________________________________________________
RooAbsCategory::RooAbsCategory(const char *name, const char *title) : 
  RooAbsArg(name,title), _value("NULL",0), _treeVar(kFALSE)
{
  // Constructor

  _typeIter = _types.MakeIterator() ;
  setValueDirty() ;  
  setShapeDirty() ;  
}



//_____________________________________________________________________________
RooAbsCategory::RooAbsCategory(const RooAbsCategory& other,const char* name) :
  RooAbsArg(other,name), _value(other._value), _treeVar(other._treeVar) 
{
  // Copy constructor, copies the registered category states from the original.

  _typeIter = _types.MakeIterator() ;

  other._typeIter->Reset() ;
  TObject* obj ;
  while ((obj=other._typeIter->Next())) {
    _types.Add(obj->Clone()) ;
  }

  setValueDirty() ;
  setShapeDirty() ;
}



//_____________________________________________________________________________
RooAbsCategory::~RooAbsCategory()
{
  // Destructor

  // We own the contents of _types 
  delete _typeIter ;
  _types.Delete() ;
}



//_____________________________________________________________________________
Int_t RooAbsCategory::getIndex() const
{
  // Return index number of current state 

  if (isValueDirty() || isShapeDirty()) {
    _value = traceEval() ;

    clearValueDirty() ;
    clearShapeDirty() ;
  }

  return _value.getVal() ;
}



//_____________________________________________________________________________
const char* RooAbsCategory::getLabel() const
{
  // Return label string of current state 

  if (isValueDirty() || isShapeDirty()) {
    _value = traceEval() ;

    clearValueDirty() ;
    clearShapeDirty() ;
  }

  const char* ret = _value.GetName() ;
  // If label is not set, do it now on the fly
  if (ret==0) {
    _value.SetName(lookupType(_value.getVal())->GetName()) ;    
  }
  return _value.GetName() ;
}



//_____________________________________________________________________________
RooCatType RooAbsCategory::traceEval() const
{
  // Recalculate current value and check validity of new result.

  RooCatType value = evaluate() ;
  
  // Standard tracing code goes here
  if (!isValid(value)) {
  }

  // Call optional subclass tracing code
  traceEvalHook(value) ;

  return value ;
}



//_____________________________________________________________________________
TIterator* RooAbsCategory::typeIterator() const
{
  // Return iterator over all defined states

  return _types.MakeIterator() ;
}


//_____________________________________________________________________________
Bool_t RooAbsCategory::operator==(Int_t index) const
{
  // Equality operator with a integer (compares with state index number)

  return (index==getIndex()) ;
}



//_____________________________________________________________________________
Bool_t RooAbsCategory::operator==(const char* label) const
{
  // Equality operator with a string (compares with state label string)

  return !TString(label).CompareTo(getLabel()) ;
}



//_____________________________________________________________________________
Bool_t RooAbsCategory::operator==(const RooAbsArg& other) 
{
  // Equality operator with another RooAbsArg. Only functional
  // is also a RooAbsCategory, will return true if index is the same

  const RooAbsCategory* otherCat = dynamic_cast<const RooAbsCategory*>(&other) ;
  return otherCat ? operator==(otherCat->getIndex()) : kFALSE ;
}



//_____________________________________________________________________________
Bool_t RooAbsCategory::isValidIndex(Int_t index) const
{
  // Check if state with given index is defined

  return lookupType(index,kFALSE)?kTRUE:kFALSE ;
}



//_____________________________________________________________________________
Bool_t RooAbsCategory::isValidLabel(const char* label) const
{
  // Check if state with given name is defined

  return lookupType(label)?kTRUE:kFALSE ;
}



//_____________________________________________________________________________
const RooCatType* RooAbsCategory::defineType(const char* label)
{
  // Define a new state with given name. The lowest available
  // integer number is assigned as index value

  // Find lowest unused index
  Int_t index(-1) ;
  while(lookupType(++index,kFALSE)) ;
  
  // Assign this index to given label 
  return defineType(label,index) ;
}


//_____________________________________________________________________________
const RooCatType* RooAbsCategory::defineTypeUnchecked(const char* label, Int_t index) 
{
  // Internal version of defineType that does not check if type
  // already exists

  Bool_t first = _types.GetEntries()?kFALSE:kTRUE ;
  RooCatType *newType = new RooCatType(label,index) ;
  _types.Add(newType) ;

  if (first) _value = RooCatType(label,index) ;
  setShapeDirty() ;

  return newType ;  
}



//_____________________________________________________________________________
const RooCatType* RooAbsCategory::defineType(const char* label, Int_t index) 
{
  // Define new state with given name and index number.

  if (isValidIndex(index)) {
    coutE(InputArguments) << "RooAbsCategory::defineType(" << GetName() << "): index " 
			  << index << " already assigned" << endl ;
    return 0 ;
  }

  if (isValidLabel(label)) {
    coutE(InputArguments) << "RooAbsCategory::defineType(" << GetName() << "): label " 
			  << label << " already assigned or not allowed" << endl ;
    return 0 ;
  }

  return defineTypeUnchecked(label,index) ;
}



//_____________________________________________________________________________
void RooAbsCategory::clearTypes() 
{
  // Delete all currently defined states

  _types.Delete() ;
  _value = RooCatType("",0) ;
  setShapeDirty() ;
}



//_____________________________________________________________________________
const RooCatType* RooAbsCategory::lookupType(const RooCatType &other, Bool_t printError) const 
{
  // Find our type that matches the specified type, or return 0 for no match.

  RooCatType* type ;
  _typeIter->Reset() ;
  while((type=(RooCatType*)_typeIter->Next())){
    if((*type) == other) return type; // delegate comparison to RooCatType
  }

  if (printError) {
    coutE(InputArguments) << ClassName() << "::" << GetName() << ":lookupType: no match for ";
    if (dologE(InputArguments)) {
      other.printStream(ccoutE(InputArguments),kName|kValue,kSingleLine);
    }
  }
  return 0 ;
}



//_____________________________________________________________________________
const RooCatType* RooAbsCategory::lookupType(Int_t index, Bool_t printError) const
{
  // Find our type corresponding to the specified index, or return 0 for no match.

  RooCatType* type ;
  _typeIter->Reset() ;
  while((type=(RooCatType*)_typeIter->Next())){  
    if((*type) == index) return type; // delegate comparison to RooCatType
  }
  if (printError) {
    coutE(InputArguments) << ClassName() << "::" << GetName() << ":lookupType: no match for index "
			  << index << endl;
  }
  return 0 ;
}



//_____________________________________________________________________________
const RooCatType* RooAbsCategory::lookupType(const char* label, Bool_t printError) const 
{
  // Find our type corresponding to the specified label, or return 0 for no match.
 
  RooCatType* type ;
  _typeIter->Reset() ;
  while((type=(RooCatType*)_typeIter->Next())){  
    if((*type) == label) return type; // delegate comparison to RooCatType
  }

  // Try if label represents integer number
  char* endptr ;
  Int_t idx=strtol(label,&endptr,10)  ;
  if (endptr==label+strlen(label)) {
    _typeIter->Reset() ;
    while((type=(RooCatType*)_typeIter->Next())){  
       if((*type) == idx) return type; // delegate comparison to RooCatType
     }
  }

  if (printError) {
    coutE(InputArguments) << ClassName() << "::" << GetName() << ":lookupType: no match for label "
			  << label << endl;
  }
  return 0 ;
}



//_____________________________________________________________________________
Bool_t RooAbsCategory::isValid() const
{
  // Check if current value is a valid state

  return isValid(_value) ;
}



//_____________________________________________________________________________
Bool_t RooAbsCategory::isValid(const RooCatType& value)  const
{
  // Check if given state is defined for this object

  return isValidIndex(value.getVal()) ;
}



//_____________________________________________________________________________
Roo1DTable* RooAbsCategory::createTable(const char *label)  const
{
  // Create a table matching the shape of this category

  return new Roo1DTable(GetName(),label,*this) ;
}



//_____________________________________________________________________________
Bool_t RooAbsCategory::readFromStream(istream&, Bool_t, Bool_t) 
{
  // Read object contents from stream (dummy for now)

  return kFALSE ;
} 



//_____________________________________________________________________________
void RooAbsCategory::writeToStream(ostream& os, Bool_t compact) const
{
  // Write object contents to ostream 

  if (compact) {
    os << getLabel() ;
  } else {
    os << getLabel() ;
  }
}



//_____________________________________________________________________________
void RooAbsCategory::printValue(ostream& os) const
{
  // Print value (label name)
  os << getLabel() << "(idx = " << getIndex() << ")" << endl ;
}



//_____________________________________________________________________________
void RooAbsCategory::printMultiline(ostream& os, Int_t contents, Bool_t verbose, TString indent) const
{
  // Print info about this object to the specified stream. In addition to the info
  // from RooAbsArg::printStream() we add:
  //
  //     Shape : label, index, defined types

  RooAbsArg::printMultiline(os,contents,verbose,indent);

  os << indent << "--- RooAbsCategory ---" << endl;
  if (_types.GetEntries()==0) {
    os << indent << "  ** No values defined **" << endl;
    return;
  }
  os << indent << "  Value is \"" << getLabel() << "\" (" << getIndex() << ")" << endl;
  os << indent << "  Has the following possible values:" << endl;
  indent.Append("    ");
  RooCatType *type;
  _typeIter->Reset() ;
  while((type=(RooCatType*)_typeIter->Next())) {
    os << indent;
    type->printStream(os,kName|kValue,kSingleLine,indent);
  }
}



//_____________________________________________________________________________
void RooAbsCategory::attachToVStore(RooVectorDataStore& vstore)
{
  // Attach the category index and label to as branches to the given vector store
  RooVectorDataStore::CatVector* cv = vstore.addCategory(this) ;
  cv->setBuffer(&_value) ;  
}




//_____________________________________________________________________________
void RooAbsCategory::attachToTree(TTree& t, Int_t bufSize)
{
  // Attach the category index and label to as branches to the given
  // TTree. The index field will be attached as integer with name
  // <name>_idx, the label field will be attached as char[] with label
  // <name>_lbl.

  // First check if there is an integer branch matching the category name
  TString cleanName(cleanBranchName()) ;
  TBranch* branch = t.GetBranch(cleanName) ;
  if (branch) {

    TString typeName(((TLeaf*)branch->GetListOfLeaves()->At(0))->GetTypeName()) ;
    if (!typeName.CompareTo("Int_t")) {
      // Imported TTree: attach only index field as branch

      coutI(DataHandling) << "RooAbsCategory::attachToTree(" << GetName() << ") TTree branch " << GetName() 
			  << " will be interpreted as category index" << endl ;
      
      t.SetBranchAddress(cleanName,&((Int_t&)_value._value)) ;
      setAttribute("INTIDXONLY_TREE_BRANCH",kTRUE) ;      
      _treeVar = kTRUE ;
      return ;
    } else if (!typeName.CompareTo("UChar_t")) {
      coutI(DataHandling) << "RooAbsReal::attachToTree(" << GetName() << ") TTree UChar_t branch " << GetName() 
			  << " will be interpreted as category index" << endl ;
      t.SetBranchAddress(cleanName,&_byteValue) ;
      setAttribute("UCHARIDXONLY_TREE_BRANCH",kTRUE) ;
      _treeVar = kTRUE ;
      return ;
    } 

    if (branch->GetCompressionLevel()<0) {
      cxcoutD(DataHandling) << "RooAbsCategory::attachToTree(" << GetName() << ") Fixing compression level of branch " << GetName() << endl ;
      branch->SetCompressionLevel(1) ;
    }
  }

  // Native TTree: attach both index and label of category as branches  
  TString idxName(cleanName) ;
  TString lblName(cleanName) ;  
  idxName.Append("_idx") ;
  lblName.Append("_lbl") ;
  
  // First determine if branch is taken
  if ((branch = t.GetBranch(idxName))) {    

    t.SetBranchAddress(idxName,&((Int_t&)_value._value)) ;
    if (branch->GetCompressionLevel()<0) {
      cxcoutD(Contents) << "RooAbsCategory::attachToTree(" << GetName() << ") Fixing compression level of branch " << idxName << endl ;
      branch->SetCompressionLevel(1) ;
    }
    
  } else {    
    TString format(idxName);
    format.Append("/I");
    void* ptr = &(_value._value) ;
    branch = t.Branch(idxName, ptr, (const Text_t*)format, bufSize);
    branch->SetCompressionLevel(1) ;
  }
  
  // First determine if branch is taken
  if ((branch = t.GetBranch(lblName))) {

    t.SetBranchAddress(lblName,_value._label) ;
    if (branch->GetCompressionLevel()<0) {
      cxcoutD(DataHandling) << "RooAbsCategory::attachToTree(" << GetName() << ") Fixing compression level of branch " << lblName << endl ;
      branch->SetCompressionLevel(1) ;
    }

  } else {    
    TString format(lblName);
    format.Append("/C");
    void* ptr = _value._label ;
    branch = t.Branch(lblName, ptr, (const Text_t*)format, bufSize);
    branch->SetCompressionLevel(1) ;
  }

}



//_____________________________________________________________________________
void RooAbsCategory::fillTreeBranch(TTree& t) 
{
  // Fill tree branches associated with current object with current value

  TString idxName(GetName()) ;
  TString lblName(GetName()) ;  
  idxName.Append("_idx") ;
  lblName.Append("_lbl") ;

  // First determine if branch is taken
  TBranch* idxBranch = t.GetBranch(idxName) ;
  TBranch* lblBranch = t.GetBranch(lblName) ;
  if (!idxBranch||!lblBranch) { 
    coutF(DataHandling) << "RooAbsCategory::fillTreeBranch(" << GetName() << ") ERROR: not attached to tree" << endl ;
    assert(0) ;
  }

  idxBranch->Fill() ;
  lblBranch->Fill() ;  
}



//_____________________________________________________________________________
void RooAbsCategory::setTreeBranchStatus(TTree& t, Bool_t active) 
{
  // (De)activate associate tree branch

  TBranch* branch = t.GetBranch(Form("%s_idx",GetName())) ;
  if (branch) { 
    t.SetBranchStatus(Form("%s_idx",GetName()),active?1:0) ;
    t.SetBranchStatus(Form("%s_lbl",GetName()),active?1:0) ;
  }
}



//_____________________________________________________________________________
void RooAbsCategory::syncCache(const RooArgSet*) 
{ 
  // Explicitly synchronize RooAbsCategory internal cache

  getIndex() ; 
}



//_____________________________________________________________________________
void RooAbsCategory::copyCache(const RooAbsArg* source, Bool_t /*valueOnly*/, Bool_t setValDirty) 
{
  // Copy the cached value from given source and raise dirty flag.
  // It is the callers responsability to ensure that the sources
  // cache is clean(valid) before this function is called, e.g. by
  // calling syncCache() on the source.

  RooAbsCategory* other = static_cast<RooAbsCategory*>(const_cast<RooAbsArg*>(source)) ;

  if (!_treeVar) {
    _value = other->_value ;
  } else {
    if (source->getAttribute("INTIDXONLY_TREE_BRANCH")) {
      // Lookup cat state from other-index because label is missing
      const RooCatType* type = lookupType(other->_value._value) ;
      if (type) {
	_value = *type ;
      } else {
	coutE(DataHandling) << "RooAbsCategory::copyCache(" << GetName() 
			    << ") ERROR: index of source arg " << source->GetName() 
			    << " is invalid (" << other->_value._value 
			    << "), value not updated" << endl ;
      }
    } if (source->getAttribute("UCHARIDXONLY_TREE_BRANCH")) {
      // Lookup cat state from other-index because label is missing
      Int_t tmp = other->_byteValue ;
      const RooCatType* type = lookupType(tmp) ;
      if (type) {
	_value = *type ;
      } else {
	coutE(DataHandling) << "RooAbsCategory::copyCache(" << GetName() 
			    << ") ERROR: index of source arg " << source->GetName() 
			    << " is invalid (" << tmp
			    << "), value not updated" << endl ;
      }
    } 
  }

  if (setValDirty) {
    setValueDirty() ;
  }
}



//_____________________________________________________________________________
const RooCatType* RooAbsCategory::getOrdinal(UInt_t n, const char* /*rangeName*/) const 
{
  // Return state definition of ordinal nth defined state,
  // needed by the generator mechanism.
  
  return (const RooCatType*)_types.At(n);
}



//_____________________________________________________________________________
RooAbsArg *RooAbsCategory::createFundamental(const char* newname) const 
{
  // Create a RooCategory fundamental object with our properties.

  // Add and precalculate new category column 
  RooCategory *fund= new RooCategory(newname?newname:GetName(),GetTitle()) ; 

  // Copy states
  TIterator* tIter = typeIterator() ;
  RooCatType* type ;
  while ((type=(RooCatType*)tIter->Next())) {
    ((RooAbsCategory*)fund)->defineType(type->GetName(),type->getVal()) ;
  }
  delete tIter;

  return fund;
}



//_____________________________________________________________________________
Bool_t RooAbsCategory::isSignType(Bool_t mustHaveZero) const 
{
  // Determine if category has 2 or 3 states with index values -1,0,1

  if (numTypes()>3||numTypes()<2) return kFALSE ;
  if (mustHaveZero&&numTypes()!=3) return kFALSE ;

  Bool_t ret(kTRUE) ;
  TIterator* tIter = typeIterator() ;
  RooCatType* type ;
  while((type=(RooCatType*)tIter->Next())) {
    if (abs(type->getVal())>1) ret=kFALSE ;
  }
  
  delete tIter ;
  return ret ;
}
 RooAbsCategory.cxx:1
 RooAbsCategory.cxx:2
 RooAbsCategory.cxx:3
 RooAbsCategory.cxx:4
 RooAbsCategory.cxx:5
 RooAbsCategory.cxx:6
 RooAbsCategory.cxx:7
 RooAbsCategory.cxx:8
 RooAbsCategory.cxx:9
 RooAbsCategory.cxx:10
 RooAbsCategory.cxx:11
 RooAbsCategory.cxx:12
 RooAbsCategory.cxx:13
 RooAbsCategory.cxx:14
 RooAbsCategory.cxx:15
 RooAbsCategory.cxx:16
 RooAbsCategory.cxx:17
 RooAbsCategory.cxx:18
 RooAbsCategory.cxx:19
 RooAbsCategory.cxx:20
 RooAbsCategory.cxx:21
 RooAbsCategory.cxx:22
 RooAbsCategory.cxx:23
 RooAbsCategory.cxx:24
 RooAbsCategory.cxx:25
 RooAbsCategory.cxx:26
 RooAbsCategory.cxx:27
 RooAbsCategory.cxx:28
 RooAbsCategory.cxx:29
 RooAbsCategory.cxx:30
 RooAbsCategory.cxx:31
 RooAbsCategory.cxx:32
 RooAbsCategory.cxx:33
 RooAbsCategory.cxx:34
 RooAbsCategory.cxx:35
 RooAbsCategory.cxx:36
 RooAbsCategory.cxx:37
 RooAbsCategory.cxx:38
 RooAbsCategory.cxx:39
 RooAbsCategory.cxx:40
 RooAbsCategory.cxx:41
 RooAbsCategory.cxx:42
 RooAbsCategory.cxx:43
 RooAbsCategory.cxx:44
 RooAbsCategory.cxx:45
 RooAbsCategory.cxx:46
 RooAbsCategory.cxx:47
 RooAbsCategory.cxx:48
 RooAbsCategory.cxx:49
 RooAbsCategory.cxx:50
 RooAbsCategory.cxx:51
 RooAbsCategory.cxx:52
 RooAbsCategory.cxx:53
 RooAbsCategory.cxx:54
 RooAbsCategory.cxx:55
 RooAbsCategory.cxx:56
 RooAbsCategory.cxx:57
 RooAbsCategory.cxx:58
 RooAbsCategory.cxx:59
 RooAbsCategory.cxx:60
 RooAbsCategory.cxx:61
 RooAbsCategory.cxx:62
 RooAbsCategory.cxx:63
 RooAbsCategory.cxx:64
 RooAbsCategory.cxx:65
 RooAbsCategory.cxx:66
 RooAbsCategory.cxx:67
 RooAbsCategory.cxx:68
 RooAbsCategory.cxx:69
 RooAbsCategory.cxx:70
 RooAbsCategory.cxx:71
 RooAbsCategory.cxx:72
 RooAbsCategory.cxx:73
 RooAbsCategory.cxx:74
 RooAbsCategory.cxx:75
 RooAbsCategory.cxx:76
 RooAbsCategory.cxx:77
 RooAbsCategory.cxx:78
 RooAbsCategory.cxx:79
 RooAbsCategory.cxx:80
 RooAbsCategory.cxx:81
 RooAbsCategory.cxx:82
 RooAbsCategory.cxx:83
 RooAbsCategory.cxx:84
 RooAbsCategory.cxx:85
 RooAbsCategory.cxx:86
 RooAbsCategory.cxx:87
 RooAbsCategory.cxx:88
 RooAbsCategory.cxx:89
 RooAbsCategory.cxx:90
 RooAbsCategory.cxx:91
 RooAbsCategory.cxx:92
 RooAbsCategory.cxx:93
 RooAbsCategory.cxx:94
 RooAbsCategory.cxx:95
 RooAbsCategory.cxx:96
 RooAbsCategory.cxx:97
 RooAbsCategory.cxx:98
 RooAbsCategory.cxx:99
 RooAbsCategory.cxx:100
 RooAbsCategory.cxx:101
 RooAbsCategory.cxx:102
 RooAbsCategory.cxx:103
 RooAbsCategory.cxx:104
 RooAbsCategory.cxx:105
 RooAbsCategory.cxx:106
 RooAbsCategory.cxx:107
 RooAbsCategory.cxx:108
 RooAbsCategory.cxx:109
 RooAbsCategory.cxx:110
 RooAbsCategory.cxx:111
 RooAbsCategory.cxx:112
 RooAbsCategory.cxx:113
 RooAbsCategory.cxx:114
 RooAbsCategory.cxx:115
 RooAbsCategory.cxx:116
 RooAbsCategory.cxx:117
 RooAbsCategory.cxx:118
 RooAbsCategory.cxx:119
 RooAbsCategory.cxx:120
 RooAbsCategory.cxx:121
 RooAbsCategory.cxx:122
 RooAbsCategory.cxx:123
 RooAbsCategory.cxx:124
 RooAbsCategory.cxx:125
 RooAbsCategory.cxx:126
 RooAbsCategory.cxx:127
 RooAbsCategory.cxx:128
 RooAbsCategory.cxx:129
 RooAbsCategory.cxx:130
 RooAbsCategory.cxx:131
 RooAbsCategory.cxx:132
 RooAbsCategory.cxx:133
 RooAbsCategory.cxx:134
 RooAbsCategory.cxx:135
 RooAbsCategory.cxx:136
 RooAbsCategory.cxx:137
 RooAbsCategory.cxx:138
 RooAbsCategory.cxx:139
 RooAbsCategory.cxx:140
 RooAbsCategory.cxx:141
 RooAbsCategory.cxx:142
 RooAbsCategory.cxx:143
 RooAbsCategory.cxx:144
 RooAbsCategory.cxx:145
 RooAbsCategory.cxx:146
 RooAbsCategory.cxx:147
 RooAbsCategory.cxx:148
 RooAbsCategory.cxx:149
 RooAbsCategory.cxx:150
 RooAbsCategory.cxx:151
 RooAbsCategory.cxx:152
 RooAbsCategory.cxx:153
 RooAbsCategory.cxx:154
 RooAbsCategory.cxx:155
 RooAbsCategory.cxx:156
 RooAbsCategory.cxx:157
 RooAbsCategory.cxx:158
 RooAbsCategory.cxx:159
 RooAbsCategory.cxx:160
 RooAbsCategory.cxx:161
 RooAbsCategory.cxx:162
 RooAbsCategory.cxx:163
 RooAbsCategory.cxx:164
 RooAbsCategory.cxx:165
 RooAbsCategory.cxx:166
 RooAbsCategory.cxx:167
 RooAbsCategory.cxx:168
 RooAbsCategory.cxx:169
 RooAbsCategory.cxx:170
 RooAbsCategory.cxx:171
 RooAbsCategory.cxx:172
 RooAbsCategory.cxx:173
 RooAbsCategory.cxx:174
 RooAbsCategory.cxx:175
 RooAbsCategory.cxx:176
 RooAbsCategory.cxx:177
 RooAbsCategory.cxx:178
 RooAbsCategory.cxx:179
 RooAbsCategory.cxx:180
 RooAbsCategory.cxx:181
 RooAbsCategory.cxx:182
 RooAbsCategory.cxx:183
 RooAbsCategory.cxx:184
 RooAbsCategory.cxx:185
 RooAbsCategory.cxx:186
 RooAbsCategory.cxx:187
 RooAbsCategory.cxx:188
 RooAbsCategory.cxx:189
 RooAbsCategory.cxx:190
 RooAbsCategory.cxx:191
 RooAbsCategory.cxx:192
 RooAbsCategory.cxx:193
 RooAbsCategory.cxx:194
 RooAbsCategory.cxx:195
 RooAbsCategory.cxx:196
 RooAbsCategory.cxx:197
 RooAbsCategory.cxx:198
 RooAbsCategory.cxx:199
 RooAbsCategory.cxx:200
 RooAbsCategory.cxx:201
 RooAbsCategory.cxx:202
 RooAbsCategory.cxx:203
 RooAbsCategory.cxx:204
 RooAbsCategory.cxx:205
 RooAbsCategory.cxx:206
 RooAbsCategory.cxx:207
 RooAbsCategory.cxx:208
 RooAbsCategory.cxx:209
 RooAbsCategory.cxx:210
 RooAbsCategory.cxx:211
 RooAbsCategory.cxx:212
 RooAbsCategory.cxx:213
 RooAbsCategory.cxx:214
 RooAbsCategory.cxx:215
 RooAbsCategory.cxx:216
 RooAbsCategory.cxx:217
 RooAbsCategory.cxx:218
 RooAbsCategory.cxx:219
 RooAbsCategory.cxx:220
 RooAbsCategory.cxx:221
 RooAbsCategory.cxx:222
 RooAbsCategory.cxx:223
 RooAbsCategory.cxx:224
 RooAbsCategory.cxx:225
 RooAbsCategory.cxx:226
 RooAbsCategory.cxx:227
 RooAbsCategory.cxx:228
 RooAbsCategory.cxx:229
 RooAbsCategory.cxx:230
 RooAbsCategory.cxx:231
 RooAbsCategory.cxx:232
 RooAbsCategory.cxx:233
 RooAbsCategory.cxx:234
 RooAbsCategory.cxx:235
 RooAbsCategory.cxx:236
 RooAbsCategory.cxx:237
 RooAbsCategory.cxx:238
 RooAbsCategory.cxx:239
 RooAbsCategory.cxx:240
 RooAbsCategory.cxx:241
 RooAbsCategory.cxx:242
 RooAbsCategory.cxx:243
 RooAbsCategory.cxx:244
 RooAbsCategory.cxx:245
 RooAbsCategory.cxx:246
 RooAbsCategory.cxx:247
 RooAbsCategory.cxx:248
 RooAbsCategory.cxx:249
 RooAbsCategory.cxx:250
 RooAbsCategory.cxx:251
 RooAbsCategory.cxx:252
 RooAbsCategory.cxx:253
 RooAbsCategory.cxx:254
 RooAbsCategory.cxx:255
 RooAbsCategory.cxx:256
 RooAbsCategory.cxx:257
 RooAbsCategory.cxx:258
 RooAbsCategory.cxx:259
 RooAbsCategory.cxx:260
 RooAbsCategory.cxx:261
 RooAbsCategory.cxx:262
 RooAbsCategory.cxx:263
 RooAbsCategory.cxx:264
 RooAbsCategory.cxx:265
 RooAbsCategory.cxx:266
 RooAbsCategory.cxx:267
 RooAbsCategory.cxx:268
 RooAbsCategory.cxx:269
 RooAbsCategory.cxx:270
 RooAbsCategory.cxx:271
 RooAbsCategory.cxx:272
 RooAbsCategory.cxx:273
 RooAbsCategory.cxx:274
 RooAbsCategory.cxx:275
 RooAbsCategory.cxx:276
 RooAbsCategory.cxx:277
 RooAbsCategory.cxx:278
 RooAbsCategory.cxx:279
 RooAbsCategory.cxx:280
 RooAbsCategory.cxx:281
 RooAbsCategory.cxx:282
 RooAbsCategory.cxx:283
 RooAbsCategory.cxx:284
 RooAbsCategory.cxx:285
 RooAbsCategory.cxx:286
 RooAbsCategory.cxx:287
 RooAbsCategory.cxx:288
 RooAbsCategory.cxx:289
 RooAbsCategory.cxx:290
 RooAbsCategory.cxx:291
 RooAbsCategory.cxx:292
 RooAbsCategory.cxx:293
 RooAbsCategory.cxx:294
 RooAbsCategory.cxx:295
 RooAbsCategory.cxx:296
 RooAbsCategory.cxx:297
 RooAbsCategory.cxx:298
 RooAbsCategory.cxx:299
 RooAbsCategory.cxx:300
 RooAbsCategory.cxx:301
 RooAbsCategory.cxx:302
 RooAbsCategory.cxx:303
 RooAbsCategory.cxx:304
 RooAbsCategory.cxx:305
 RooAbsCategory.cxx:306
 RooAbsCategory.cxx:307
 RooAbsCategory.cxx:308
 RooAbsCategory.cxx:309
 RooAbsCategory.cxx:310
 RooAbsCategory.cxx:311
 RooAbsCategory.cxx:312
 RooAbsCategory.cxx:313
 RooAbsCategory.cxx:314
 RooAbsCategory.cxx:315
 RooAbsCategory.cxx:316
 RooAbsCategory.cxx:317
 RooAbsCategory.cxx:318
 RooAbsCategory.cxx:319
 RooAbsCategory.cxx:320
 RooAbsCategory.cxx:321
 RooAbsCategory.cxx:322
 RooAbsCategory.cxx:323
 RooAbsCategory.cxx:324
 RooAbsCategory.cxx:325
 RooAbsCategory.cxx:326
 RooAbsCategory.cxx:327
 RooAbsCategory.cxx:328
 RooAbsCategory.cxx:329
 RooAbsCategory.cxx:330
 RooAbsCategory.cxx:331
 RooAbsCategory.cxx:332
 RooAbsCategory.cxx:333
 RooAbsCategory.cxx:334
 RooAbsCategory.cxx:335
 RooAbsCategory.cxx:336
 RooAbsCategory.cxx:337
 RooAbsCategory.cxx:338
 RooAbsCategory.cxx:339
 RooAbsCategory.cxx:340
 RooAbsCategory.cxx:341
 RooAbsCategory.cxx:342
 RooAbsCategory.cxx:343
 RooAbsCategory.cxx:344
 RooAbsCategory.cxx:345
 RooAbsCategory.cxx:346
 RooAbsCategory.cxx:347
 RooAbsCategory.cxx:348
 RooAbsCategory.cxx:349
 RooAbsCategory.cxx:350
 RooAbsCategory.cxx:351
 RooAbsCategory.cxx:352
 RooAbsCategory.cxx:353
 RooAbsCategory.cxx:354
 RooAbsCategory.cxx:355
 RooAbsCategory.cxx:356
 RooAbsCategory.cxx:357
 RooAbsCategory.cxx:358
 RooAbsCategory.cxx:359
 RooAbsCategory.cxx:360
 RooAbsCategory.cxx:361
 RooAbsCategory.cxx:362
 RooAbsCategory.cxx:363
 RooAbsCategory.cxx:364
 RooAbsCategory.cxx:365
 RooAbsCategory.cxx:366
 RooAbsCategory.cxx:367
 RooAbsCategory.cxx:368
 RooAbsCategory.cxx:369
 RooAbsCategory.cxx:370
 RooAbsCategory.cxx:371
 RooAbsCategory.cxx:372
 RooAbsCategory.cxx:373
 RooAbsCategory.cxx:374
 RooAbsCategory.cxx:375
 RooAbsCategory.cxx:376
 RooAbsCategory.cxx:377
 RooAbsCategory.cxx:378
 RooAbsCategory.cxx:379
 RooAbsCategory.cxx:380
 RooAbsCategory.cxx:381
 RooAbsCategory.cxx:382
 RooAbsCategory.cxx:383
 RooAbsCategory.cxx:384
 RooAbsCategory.cxx:385
 RooAbsCategory.cxx:386
 RooAbsCategory.cxx:387
 RooAbsCategory.cxx:388
 RooAbsCategory.cxx:389
 RooAbsCategory.cxx:390
 RooAbsCategory.cxx:391
 RooAbsCategory.cxx:392
 RooAbsCategory.cxx:393
 RooAbsCategory.cxx:394
 RooAbsCategory.cxx:395
 RooAbsCategory.cxx:396
 RooAbsCategory.cxx:397
 RooAbsCategory.cxx:398
 RooAbsCategory.cxx:399
 RooAbsCategory.cxx:400
 RooAbsCategory.cxx:401
 RooAbsCategory.cxx:402
 RooAbsCategory.cxx:403
 RooAbsCategory.cxx:404
 RooAbsCategory.cxx:405
 RooAbsCategory.cxx:406
 RooAbsCategory.cxx:407
 RooAbsCategory.cxx:408
 RooAbsCategory.cxx:409
 RooAbsCategory.cxx:410
 RooAbsCategory.cxx:411
 RooAbsCategory.cxx:412
 RooAbsCategory.cxx:413
 RooAbsCategory.cxx:414
 RooAbsCategory.cxx:415
 RooAbsCategory.cxx:416
 RooAbsCategory.cxx:417
 RooAbsCategory.cxx:418
 RooAbsCategory.cxx:419
 RooAbsCategory.cxx:420
 RooAbsCategory.cxx:421
 RooAbsCategory.cxx:422
 RooAbsCategory.cxx:423
 RooAbsCategory.cxx:424
 RooAbsCategory.cxx:425
 RooAbsCategory.cxx:426
 RooAbsCategory.cxx:427
 RooAbsCategory.cxx:428
 RooAbsCategory.cxx:429
 RooAbsCategory.cxx:430
 RooAbsCategory.cxx:431
 RooAbsCategory.cxx:432
 RooAbsCategory.cxx:433
 RooAbsCategory.cxx:434
 RooAbsCategory.cxx:435
 RooAbsCategory.cxx:436
 RooAbsCategory.cxx:437
 RooAbsCategory.cxx:438
 RooAbsCategory.cxx:439
 RooAbsCategory.cxx:440
 RooAbsCategory.cxx:441
 RooAbsCategory.cxx:442
 RooAbsCategory.cxx:443
 RooAbsCategory.cxx:444
 RooAbsCategory.cxx:445
 RooAbsCategory.cxx:446
 RooAbsCategory.cxx:447
 RooAbsCategory.cxx:448
 RooAbsCategory.cxx:449
 RooAbsCategory.cxx:450
 RooAbsCategory.cxx:451
 RooAbsCategory.cxx:452
 RooAbsCategory.cxx:453
 RooAbsCategory.cxx:454
 RooAbsCategory.cxx:455
 RooAbsCategory.cxx:456
 RooAbsCategory.cxx:457
 RooAbsCategory.cxx:458
 RooAbsCategory.cxx:459
 RooAbsCategory.cxx:460
 RooAbsCategory.cxx:461
 RooAbsCategory.cxx:462
 RooAbsCategory.cxx:463
 RooAbsCategory.cxx:464
 RooAbsCategory.cxx:465
 RooAbsCategory.cxx:466
 RooAbsCategory.cxx:467
 RooAbsCategory.cxx:468
 RooAbsCategory.cxx:469
 RooAbsCategory.cxx:470
 RooAbsCategory.cxx:471
 RooAbsCategory.cxx:472
 RooAbsCategory.cxx:473
 RooAbsCategory.cxx:474
 RooAbsCategory.cxx:475
 RooAbsCategory.cxx:476
 RooAbsCategory.cxx:477
 RooAbsCategory.cxx:478
 RooAbsCategory.cxx:479
 RooAbsCategory.cxx:480
 RooAbsCategory.cxx:481
 RooAbsCategory.cxx:482
 RooAbsCategory.cxx:483
 RooAbsCategory.cxx:484
 RooAbsCategory.cxx:485
 RooAbsCategory.cxx:486
 RooAbsCategory.cxx:487
 RooAbsCategory.cxx:488
 RooAbsCategory.cxx:489
 RooAbsCategory.cxx:490
 RooAbsCategory.cxx:491
 RooAbsCategory.cxx:492
 RooAbsCategory.cxx:493
 RooAbsCategory.cxx:494
 RooAbsCategory.cxx:495
 RooAbsCategory.cxx:496
 RooAbsCategory.cxx:497
 RooAbsCategory.cxx:498
 RooAbsCategory.cxx:499
 RooAbsCategory.cxx:500
 RooAbsCategory.cxx:501
 RooAbsCategory.cxx:502
 RooAbsCategory.cxx:503
 RooAbsCategory.cxx:504
 RooAbsCategory.cxx:505
 RooAbsCategory.cxx:506
 RooAbsCategory.cxx:507
 RooAbsCategory.cxx:508
 RooAbsCategory.cxx:509
 RooAbsCategory.cxx:510
 RooAbsCategory.cxx:511
 RooAbsCategory.cxx:512
 RooAbsCategory.cxx:513
 RooAbsCategory.cxx:514
 RooAbsCategory.cxx:515
 RooAbsCategory.cxx:516
 RooAbsCategory.cxx:517
 RooAbsCategory.cxx:518
 RooAbsCategory.cxx:519
 RooAbsCategory.cxx:520
 RooAbsCategory.cxx:521
 RooAbsCategory.cxx:522
 RooAbsCategory.cxx:523
 RooAbsCategory.cxx:524
 RooAbsCategory.cxx:525
 RooAbsCategory.cxx:526
 RooAbsCategory.cxx:527
 RooAbsCategory.cxx:528
 RooAbsCategory.cxx:529
 RooAbsCategory.cxx:530
 RooAbsCategory.cxx:531
 RooAbsCategory.cxx:532
 RooAbsCategory.cxx:533
 RooAbsCategory.cxx:534
 RooAbsCategory.cxx:535
 RooAbsCategory.cxx:536
 RooAbsCategory.cxx:537
 RooAbsCategory.cxx:538
 RooAbsCategory.cxx:539
 RooAbsCategory.cxx:540
 RooAbsCategory.cxx:541
 RooAbsCategory.cxx:542
 RooAbsCategory.cxx:543
 RooAbsCategory.cxx:544
 RooAbsCategory.cxx:545
 RooAbsCategory.cxx:546
 RooAbsCategory.cxx:547
 RooAbsCategory.cxx:548
 RooAbsCategory.cxx:549
 RooAbsCategory.cxx:550
 RooAbsCategory.cxx:551
 RooAbsCategory.cxx:552
 RooAbsCategory.cxx:553
 RooAbsCategory.cxx:554
 RooAbsCategory.cxx:555
 RooAbsCategory.cxx:556
 RooAbsCategory.cxx:557
 RooAbsCategory.cxx:558
 RooAbsCategory.cxx:559
 RooAbsCategory.cxx:560
 RooAbsCategory.cxx:561
 RooAbsCategory.cxx:562
 RooAbsCategory.cxx:563
 RooAbsCategory.cxx:564
 RooAbsCategory.cxx:565
 RooAbsCategory.cxx:566
 RooAbsCategory.cxx:567
 RooAbsCategory.cxx:568
 RooAbsCategory.cxx:569
 RooAbsCategory.cxx:570
 RooAbsCategory.cxx:571
 RooAbsCategory.cxx:572
 RooAbsCategory.cxx:573
 RooAbsCategory.cxx:574
 RooAbsCategory.cxx:575
 RooAbsCategory.cxx:576
 RooAbsCategory.cxx:577
 RooAbsCategory.cxx:578
 RooAbsCategory.cxx:579
 RooAbsCategory.cxx:580
 RooAbsCategory.cxx:581
 RooAbsCategory.cxx:582
 RooAbsCategory.cxx:583
 RooAbsCategory.cxx:584
 RooAbsCategory.cxx:585
 RooAbsCategory.cxx:586
 RooAbsCategory.cxx:587
 RooAbsCategory.cxx:588
 RooAbsCategory.cxx:589
 RooAbsCategory.cxx:590
 RooAbsCategory.cxx:591
 RooAbsCategory.cxx:592
 RooAbsCategory.cxx:593
 RooAbsCategory.cxx:594
 RooAbsCategory.cxx:595
 RooAbsCategory.cxx:596
 RooAbsCategory.cxx:597
 RooAbsCategory.cxx:598
 RooAbsCategory.cxx:599
 RooAbsCategory.cxx:600
 RooAbsCategory.cxx:601
 RooAbsCategory.cxx:602
 RooAbsCategory.cxx:603
 RooAbsCategory.cxx:604
 RooAbsCategory.cxx:605
 RooAbsCategory.cxx:606
 RooAbsCategory.cxx:607
 RooAbsCategory.cxx:608
 RooAbsCategory.cxx:609
 RooAbsCategory.cxx:610
 RooAbsCategory.cxx:611
 RooAbsCategory.cxx:612
 RooAbsCategory.cxx:613
 RooAbsCategory.cxx:614
 RooAbsCategory.cxx:615
 RooAbsCategory.cxx:616
 RooAbsCategory.cxx:617
 RooAbsCategory.cxx:618
 RooAbsCategory.cxx:619
 RooAbsCategory.cxx:620
 RooAbsCategory.cxx:621
 RooAbsCategory.cxx:622
 RooAbsCategory.cxx:623
 RooAbsCategory.cxx:624
 RooAbsCategory.cxx:625
 RooAbsCategory.cxx:626
 RooAbsCategory.cxx:627
 RooAbsCategory.cxx:628
 RooAbsCategory.cxx:629
 RooAbsCategory.cxx:630
 RooAbsCategory.cxx:631
 RooAbsCategory.cxx:632
 RooAbsCategory.cxx:633
 RooAbsCategory.cxx:634
 RooAbsCategory.cxx:635
 RooAbsCategory.cxx:636
 RooAbsCategory.cxx:637
 RooAbsCategory.cxx:638
 RooAbsCategory.cxx:639
 RooAbsCategory.cxx:640
 RooAbsCategory.cxx:641
 RooAbsCategory.cxx:642
 RooAbsCategory.cxx:643
 RooAbsCategory.cxx:644
 RooAbsCategory.cxx:645
 RooAbsCategory.cxx:646
 RooAbsCategory.cxx:647
 RooAbsCategory.cxx:648
 RooAbsCategory.cxx:649
 RooAbsCategory.cxx:650
 RooAbsCategory.cxx:651
 RooAbsCategory.cxx:652
 RooAbsCategory.cxx:653
 RooAbsCategory.cxx:654
 RooAbsCategory.cxx:655
 RooAbsCategory.cxx:656
 RooAbsCategory.cxx:657
 RooAbsCategory.cxx:658
 RooAbsCategory.cxx:659
 RooAbsCategory.cxx:660
 RooAbsCategory.cxx:661
 RooAbsCategory.cxx:662
 RooAbsCategory.cxx:663
 RooAbsCategory.cxx:664
 RooAbsCategory.cxx:665
 RooAbsCategory.cxx:666
 RooAbsCategory.cxx:667
 RooAbsCategory.cxx:668
 RooAbsCategory.cxx:669
 RooAbsCategory.cxx:670
 RooAbsCategory.cxx:671
 RooAbsCategory.cxx:672
 RooAbsCategory.cxx:673
 RooAbsCategory.cxx:674
 RooAbsCategory.cxx:675
 RooAbsCategory.cxx:676
 RooAbsCategory.cxx:677
 RooAbsCategory.cxx:678
 RooAbsCategory.cxx:679
 RooAbsCategory.cxx:680
 RooAbsCategory.cxx:681