ROOT logo
/*****************************************************************************
 * Project: RooFit                                                           *
 * Package: RooFitCore                                                       *
 * @(#)root/roofitcore:$Id: RooDataSet.cxx 31847 2009-12-11 11:07:46Z wouter $
 * 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
// RooDataSet is a container class to hold unbinned data. Each data point
// in N-dimensional space is represented by a RooArgSet of RooRealVar, RooCategory 
// or RooStringVar objects 
// END_HTML
//

#include "RooFit.h"

#include "Riostream.h"
#include "Riostream.h"
#include <fstream>
#include "TTree.h"
#include "TH2.h"
#include "TDirectory.h"
#include "RooDataSet.h"
#include "RooPlot.h"
#include "RooAbsReal.h"
#include "Roo1DTable.h"
#include "RooCategory.h"
#include "RooFormulaVar.h"
#include "RooArgList.h"
#include "RooAbsRealLValue.h"
#include "RooRealVar.h"
#include "RooDataHist.h"
#include "RooMsgService.h"
#include "RooCmdConfig.h"
#include "RooHist.h"
#include "TROOT.h"
#include "TFile.h"
#include "RooTreeDataStore.h"
#include "RooCompositeDataStore.h"
#include "RooTreeData.h"
#include <string>
using namespace std ;

#if (__GNUC__==3&&__GNUC_MINOR__==2&&__GNUC_PATCHLEVEL__==3)
char* operator+( streampos&, char* );
#endif

ClassImp(RooDataSet)
;


//_____________________________________________________________________________
RooDataSet::RooDataSet() : _wgtVar(0) 
{
  // Default constructor for persistence
}





//_____________________________________________________________________________
RooDataSet::RooDataSet(const char* name, const char* title, const RooArgSet& vars, RooCmdArg arg1, RooCmdArg arg2, RooCmdArg arg3,
		       RooCmdArg arg4,RooCmdArg arg5,RooCmdArg arg6,RooCmdArg arg7,RooCmdArg arg8)  :
  RooAbsData(name,title,RooArgSet(vars,(RooAbsArg*)RooCmdConfig::decodeObjOnTheFly("RooDataSet::RooDataSet", "IndexCat",0,0,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8)))
{
  // Construct an unbinned dataset from a RooArgSet defining the dimensions of the data space. Optionally, data
  // can be imported at the time of construction.
  //
  // This constructor takes the following optional arguments
  //
  // Import(TTree*)              -- Import contents of given TTree. Only braches of the TTree that have names
  //                                corresponding to those of the RooAbsArgs that define the RooDataSet are
  //                                imported. 
  // ImportFromFile(const char* fileName, const char* treeName) -- Import tree with given name from file with given name.
  //
  // Import(RooDataSet&)         -- Import contents of given RooDataSet. Only observables that are common with
  //                                the definition of this dataset will be imported
  //
  // Index(RooCategory&)         -- Prepare import of datasets into a N+1 dimensional RooDataSet
  //                                where the extra discrete dimension labels the source of the imported histogram.
  //                              
  // Import(const char*,         -- Import a dataset to be associated with the given state name of the index category
  //              RooDataSet&)      specified in Index(). If the given state name is not yet defined in the index
  //                                category it will be added on the fly. The import command can be specified
  //                                multiple times. 
  //
  // Link(const char*, RooDataSet&) -- Link contents of supplied RooDataSet to this dataset for given index category state name.
  //                                   In this mode, no data is copied and the linked dataset must be remain live for the duration
  //                                   of this dataset. Note that link is active for both reading and writing, so modifications
  //                                   to the aggregate dataset will also modify its components. Link() and Import() are mutually exclusive.
  //
  //                              
  // Cut(const char*)            -- Apply the given cut specification when importing data
  // Cut(RooFormulaVar&)         
  //
  // CutRange(const char*)       -- Only accept events in the observable range with the given name
  //
  // WeightVar(const char*)      -- Interpret the given variable as event weight rather than as observable
  // WeightVar(const RooAbsArg&) 
  //
  // StoreError(const RooArgSet&)     -- Store symmetric error along with value for given subset of observables
  // StoreAsymError(const RooArgSet&) -- Store asymmetric error along with value for given subset of observables
  //

  // Define configuration for this method
  RooCmdConfig pc(Form("RooDataSet::ctor(%s)",GetName())) ;
  pc.defineObject("impTree","ImportTree",0) ;
  pc.defineObject("impData","ImportData",0) ;
  pc.defineObject("indexCat","IndexCat",0) ;
  pc.defineObject("impSliceData","ImportDataSlice",0,0,kTRUE) ; // array
  pc.defineString("impSliceState","ImportDataSlice",0,"",kTRUE) ; // array
  pc.defineObject("lnkSliceData","LinkDataSlice",0,0,kTRUE) ; // array
  pc.defineString("lnkSliceState","LinkDataSlice",0,"",kTRUE) ; // array
  pc.defineString("cutSpec","CutSpec",0,"") ; 
  pc.defineObject("cutVar","CutVar",0) ;
  pc.defineString("cutRange","CutRange",0,"") ;
  pc.defineString("wgtVarName","WeightVarName",0,"") ;
  pc.defineString("fname","ImportFromFile",0,"") ;
  pc.defineString("tname","ImportFromFile",1,"") ;
  pc.defineObject("wgtVar","WeightVar",0) ;
  pc.defineSet("errorSet","StoreError",0) ;
  pc.defineSet("asymErrSet","StoreAsymError",0) ;
  pc.defineMutex("ImportTree","ImportData","ImportDataSlice","LinkDataSlice","ImportFromFile") ;
  pc.defineMutex("CutSpec","CutVar") ;
  pc.defineMutex("WeightVarName","WeightVar") ;
  pc.defineDependency("ImportDataSlice","IndexCat") ;
  pc.defineDependency("LinkDataSlice","IndexCat") ;

  
  RooLinkedList l ;
  l.Add((TObject*)&arg1) ;  l.Add((TObject*)&arg2) ;  
  l.Add((TObject*)&arg3) ;  l.Add((TObject*)&arg4) ;
  l.Add((TObject*)&arg5) ;  l.Add((TObject*)&arg6) ;  
  l.Add((TObject*)&arg7) ;  l.Add((TObject*)&arg8) ;

  // Process & check varargs 
  pc.process(l) ;
  if (!pc.ok(kTRUE)) {
    assert(0) ;
    return ;
  }

  // Extract relevant objects
  TTree* impTree = static_cast<TTree*>(pc.getObject("impTree")) ;
  RooDataSet* impData = static_cast<RooDataSet*>(pc.getObject("impData")) ;
  RooFormulaVar* cutVar = static_cast<RooFormulaVar*>(pc.getObject("cutVar")) ;
  const char* cutSpec = pc.getString("cutSpec","",kTRUE) ;
  const char* cutRange = pc.getString("cutRange","",kTRUE) ;
  const char* wgtVarName = pc.getString("wgtVarName","",kTRUE) ;
  RooRealVar* wgtVar = static_cast<RooRealVar*>(pc.getObject("wgtVar")) ;
  const char* impSliceNames = pc.getString("impSliceState","",kTRUE) ;
  const RooLinkedList& impSliceData = pc.getObjectList("impSliceData") ;
  const char* lnkSliceNames = pc.getString("lnkSliceState","",kTRUE) ;
  const RooLinkedList& lnkSliceData = pc.getObjectList("lnkSliceData") ;
  RooCategory* indexCat = static_cast<RooCategory*>(pc.getObject("indexCat")) ;
  RooArgSet* errorSet = pc.getSet("errorSet") ;
  RooArgSet* asymErrorSet = pc.getSet("asymErrSet") ;
  const char* fname = pc.getString("fname") ;
  const char* tname = pc.getString("tname") ;


  // Case 1 --- Link multiple dataset as slices
  if (lnkSliceNames) {

    // Make import mapping if index category is specified
    map<string,RooAbsData*> hmap ;  
    if (indexCat) {
      char tmp[1024] ;
      strcpy(tmp,lnkSliceNames) ;
      char* token = strtok(tmp,",") ;
      TIterator* hiter = lnkSliceData.MakeIterator() ;
      while(token) {
	hmap[token] = (RooAbsData*) hiter->Next() ;
	token = strtok(0,",") ;
      }
      delete hiter ;
    }
    
    // Lookup name of weight variable if it was specified by object reference
    if (wgtVar) {
      wgtVarName = wgtVar->GetName() ;
    }
        
    appendToDir(this,kTRUE) ;
    
    // Initialize RooDataSet with optional weight variable
    initialize(0) ;
    
    map<string,RooAbsDataStore*> storeMap ;
    RooCategory* icat = (RooCategory*) _vars.find(indexCat->GetName()) ;
    for (map<string,RooAbsData*>::iterator hiter = hmap.begin() ; hiter!=hmap.end() ; ++hiter) {
      // Define state labels in index category (both in provided indexCat and in internal copy in dataset)
      if (!indexCat->lookupType(hiter->first.c_str())) {
	indexCat->defineType(hiter->first.c_str()) ;
	coutI(InputArguments) << "RooDataSet::ctor(" << GetName() << ") defining state \"" << hiter->first << "\" in index category " << indexCat->GetName() << endl ;
      }
      if (!icat->lookupType(hiter->first.c_str())) {	
	icat->defineType(hiter->first.c_str()) ;
	  }
      icat->setLabel(hiter->first.c_str()) ;
      storeMap[icat->getLabel()]=hiter->second->store() ;
    }

    // Create composite datastore
    _dstore = new RooCompositeDataStore(name,title,_vars,*icat,storeMap) ;
        
  } else {

    // Create empty datastore 
    RooTreeDataStore* tstore = new RooTreeDataStore(name,title,_vars,wgtVarName) ;
    _dstore = tstore ;
    
    
    // Make import mapping if index category is specified
    map<string,RooDataSet*> hmap ;  
    if (indexCat) {
      char tmp[1024] ;
      strcpy(tmp,impSliceNames) ;
      char* token = strtok(tmp,",") ;
      TIterator* hiter = impSliceData.MakeIterator() ;
      while(token) {
	hmap[token] = (RooDataSet*) hiter->Next() ;
	token = strtok(0,",") ;
      }
      delete hiter ;
    }
    
    // process StoreError requests
    if (errorSet) {
      RooArgSet* intErrorSet = (RooArgSet*) _vars.selectCommon(*errorSet) ;
      intErrorSet->setAttribAll("StoreError") ;
      TIterator* iter = intErrorSet->createIterator() ;
      RooAbsArg* arg ;
      while((arg=(RooAbsArg*)iter->Next())) {
	arg->attachToTree(tstore->tree()) ;
      }
      delete iter ;
      delete intErrorSet ;
    }
    if (asymErrorSet) {
      RooArgSet* intAsymErrorSet = (RooArgSet*) _vars.selectCommon(*asymErrorSet) ;
      intAsymErrorSet->setAttribAll("StoreAsymError") ;
      TIterator* iter = intAsymErrorSet->createIterator() ;
      RooAbsArg* arg ;
      while((arg=(RooAbsArg*)iter->Next())) {
	arg->attachToTree(tstore->tree()) ;
      }
      delete iter ;
      delete intAsymErrorSet ;
    }
    
    // Lookup name of weight variable if it was specified by object reference
    if (wgtVar) {
      wgtVarName = wgtVar->GetName() ;
    }
    
    
    appendToDir(this,kTRUE) ;
    
    // Initialize RooDataSet with optional weight variable
    if (wgtVarName && *wgtVarName) {
      // Use the supplied weight column
      initialize(wgtVarName) ;    
    } else {
      if (impData && impData->_wgtVar && vars.find(impData->_wgtVar->GetName())) {
	// Use the weight column of the source data set
	initialize(impData->_wgtVar->GetName()) ;

      } else if (indexCat) {

	RooDataSet* firstDS = hmap.begin()->second ;
	if (firstDS->_wgtVar && vars.find(firstDS->_wgtVar->GetName())) {
	  initialize(firstDS->_wgtVar->GetName()) ;      
	} else {
	  initialize(0) ;
	}
      } else {
	initialize(0) ;
      }
    }
    
    // Import one or more datasets with a cut specification
    if (cutSpec && *cutSpec) {
      
      // Create a RooFormulaVar cut from given cut expression
      if (indexCat) {

	// Case 2a --- Import multiple RooDataSets as slices with cutspec
	RooCategory* icat = (RooCategory*) _vars.find(indexCat->GetName()) ;
	for (map<string,RooDataSet*>::iterator hiter = hmap.begin() ; hiter!=hmap.end() ; ++hiter) {
	  // Define state labels in index category (both in provided indexCat and in internal copy in dataset)
	  if (!indexCat->lookupType(hiter->first.c_str())) {
	    indexCat->defineType(hiter->first.c_str()) ;
	    coutI(InputArguments) << "RooDataSet::ctor(" << GetName() << ") defining state \"" << hiter->first << "\" in index category " << indexCat->GetName() << endl ;
	  }
	  if (!icat->lookupType(hiter->first.c_str())) {	
	    icat->defineType(hiter->first.c_str()) ;
	  }
	  icat->setLabel(hiter->first.c_str()) ;
	  
	  RooFormulaVar cutVarTmp(cutSpec,cutSpec,hiter->second->_vars) ;
	  tstore->loadValues(hiter->second->store(),&cutVarTmp,cutRange) ;
	}
	
      } else if (impData) {

	// Case 3a --- Import RooDataSet with cutspec
	RooFormulaVar cutVarTmp(cutSpec,cutSpec,impData->_vars) ;
	tstore->loadValues(impData->store(),&cutVarTmp,cutRange);
      } else if (impTree) {

	// Case 4a --- Import TTree from memory with cutspec
	RooFormulaVar cutVarTmp(cutSpec,cutSpec,_vars) ;
	tstore->loadValues(impTree,&cutVarTmp,cutRange);      
      } else if (fname && strlen(fname)) {

	// Case 5a --- Import TTree from file with cutspec
	TFile *f = TFile::Open(fname) ;
	if (!f) {
	  coutE(InputArguments) << "RooDataSet::ctor(" << GetName() << ") ERROR file '" << fname << "' cannot be opened or does not exist" << endl ;	  
	  throw string(Form("RooDataSet::ctor(%s) ERROR file %s cannot be opened or does not exist",GetName(),fname)) ;
	}
	TTree* t = dynamic_cast<TTree*>(f->Get(tname)) ;
	if (!t) {
	  coutE(InputArguments) << "RooDataSet::ctor(" << GetName() << ") ERROR file '" << fname << "' does not contain a TTree named '" << tname << "'" << endl ;
	  throw string(Form("RooDataSet::ctor(%s) ERROR file %s does not contain a TTree named %s",GetName(),fname,tname)) ;
	}
	RooFormulaVar cutVarTmp(cutSpec,cutSpec,_vars) ;
	tstore->loadValues(t,&cutVarTmp,cutRange);      	
	f->Close() ;

      }
      
      // Import one or more datasets with a cut formula
    } else if (cutVar) {
      
      if (indexCat) {
	
	// Case 2b --- Import multiple RooDataSets as slices with cutvar

	RooCategory* icat = (RooCategory*) _vars.find(indexCat->GetName()) ;
	for (map<string,RooDataSet*>::iterator hiter = hmap.begin() ; hiter!=hmap.end() ; ++hiter) {
	  // Define state labels in index category (both in provided indexCat and in internal copy in dataset)
	  if (!indexCat->lookupType(hiter->first.c_str())) {
	    indexCat->defineType(hiter->first.c_str()) ;
	    coutI(InputArguments) << "RooDataSet::ctor(" << GetName() << ") defining state \"" << hiter->first << "\" in index category " << indexCat->GetName() << endl ;
	  }
	  if (!icat->lookupType(hiter->first.c_str())) {	
	    icat->defineType(hiter->first.c_str()) ;
	  }
	  icat->setLabel(hiter->first.c_str()) ;
	  tstore->loadValues(hiter->second->store(),cutVar,cutRange) ;
	}
	
	
      } else if (impData) {
	// Case 3b --- Import RooDataSet with cutvar
	tstore->loadValues(impData->store(),cutVar,cutRange);
      } else if (impTree) {
	// Case 4b --- Import TTree from memory with cutvar
	tstore->loadValues(impTree,cutVar,cutRange);
      } else if (fname && strlen(fname)) {
	// Case 5b --- Import TTree from file with cutvar
	TFile *f = TFile::Open(fname) ;
	if (!f) {
	  coutE(InputArguments) << "RooDataSet::ctor(" << GetName() << ") ERROR file '" << fname << "' cannot be opened or does not exist" << endl ;	  
	  throw string(Form("RooDataSet::ctor(%s) ERROR file %s cannot be opened or does not exist",GetName(),fname)) ;
	}
	TTree* t = dynamic_cast<TTree*>(f->Get(tname)) ;
	if (!t) {
	  coutE(InputArguments) << "RooDataSet::ctor(" << GetName() << ") ERROR file '" << fname << "' does not contain a TTree named '" << tname << "'" << endl ;
	  throw string(Form("RooDataSet::ctor(%s) ERROR file %s does not contain a TTree named %s",GetName(),fname,tname)) ;
	}
	tstore->loadValues(t,cutVar,cutRange);      	
	f->Close() ;
      }
      
      // Import one or more datasets without cuts
    } else {
      
      if (indexCat) {
	
	RooCategory* icat = (RooCategory*) _vars.find(indexCat->GetName()) ;
	for (map<string,RooDataSet*>::iterator hiter = hmap.begin() ; hiter!=hmap.end() ; ++hiter) {
	  // Define state labels in index category (both in provided indexCat and in internal copy in dataset)
	  if (!indexCat->lookupType(hiter->first.c_str())) {
	    indexCat->defineType(hiter->first.c_str()) ;
	    coutI(InputArguments) << "RooDataSet::ctor(" << GetName() << ") defining state \"" << hiter->first << "\" in index category " << indexCat->GetName() << endl ;
	  }
	  if (!icat->lookupType(hiter->first.c_str())) {	
	    icat->defineType(hiter->first.c_str()) ;
	  }
	  icat->setLabel(hiter->first.c_str()) ;
	  // Case 2c --- Import multiple RooDataSets as slices
	  tstore->loadValues(hiter->second->store(),0,cutRange) ;
	}
	
	
      } else if (impData) {
	// Case 3c --- Import RooDataSet
	tstore->loadValues(impData->store(),0,cutRange);
      } else if (impTree) {
	// Case 4c --- Import TTree from memort
	tstore->loadValues(impTree,0,cutRange);
      } else if (fname && strlen(fname)) {
	// Case 5c --- Import TTree from file
	TFile *f = TFile::Open(fname) ;
	if (!f) {
	  coutE(InputArguments) << "RooDataSet::ctor(" << GetName() << ") ERROR file '" << fname << "' cannot be opened or does not exist" << endl ;	  
	  throw string(Form("RooDataSet::ctor(%s) ERROR file %s cannot be opened or does not exist",GetName(),fname)) ;
	}
	TTree* t = dynamic_cast<TTree*>(f->Get(tname)) ;
	if (!t) {
	  coutE(InputArguments) << "RooDataSet::ctor(" << GetName() << ") ERROR file '" << fname << "' does not contain a TTree named '" << tname << "'" << endl ;
	  throw string(Form("RooDataSet::ctor(%s) ERROR file %s does not contain a TTree named %s",GetName(),fname,tname)) ;
	}
	tstore->loadValues(t,0,cutRange);      	
	f->Close() ;
      }
    }
    
  }
}



//_____________________________________________________________________________
RooDataSet::RooDataSet(const char *name, const char *title, const RooArgSet& vars, const char* wgtVarName) :
  RooAbsData(name,title,vars)
{
  // Constructor of an empty data set from a RooArgSet defining the dimensions
  // of the data space.

  _dstore = new RooTreeDataStore(name,title,_vars,wgtVarName) ;

  appendToDir(this,kTRUE) ;
  initialize(wgtVarName) ;
}


//_____________________________________________________________________________
RooDataSet::RooDataSet(const char *name, const char *title, RooDataSet *dset, 
		       const RooArgSet& vars, const char *cuts, const char* wgtVarName) :
  RooAbsData(name,title,vars)
{
  // Constructor of a data set from (part of) an existing data
  // set. The dimensions of the data set are defined by the 'vars'
  // RooArgSet, which can be identical to 'dset' dimensions, or a
  // subset thereof. The 'cuts' string is an optional RooFormula
  // expression and can be used to select the subset of the data
  // points in 'dset' to be copied. The cut expression can refer to
  // any variable in the source dataset. For cuts involving variables
  // other than those contained in the source data set, such as
  // intermediate formula objects, use the equivalent constructor
  // accepting RooFormulaVar reference as cut specification
  //
  // For most uses the RooAbsData::reduce() wrapper function, which
  // uses this constructor, is the most convenient way to create a
  // subset of an existing data
  //

  // Initialize datastore
  _dstore = new RooTreeDataStore(name,title,_vars,*dset->_dstore,cuts,wgtVarName) ;

  appendToDir(this,kTRUE) ;
  
  if (wgtVarName) {
    // Use the supplied weight column
    initialize(wgtVarName) ;    
  } else {
    if (dset->_wgtVar && vars.find(dset->_wgtVar->GetName())) {
      // Use the weight column of the source data set
      initialize(dset->_wgtVar->GetName()) ;
    } else {
      initialize(0) ;
    }
  }

}


//_____________________________________________________________________________
RooDataSet::RooDataSet(const char *name, const char *title, RooDataSet *dset, 
		       const RooArgSet& vars, const RooFormulaVar& cutVar, const char* wgtVarName) :
  RooAbsData(name,title,vars)
{
  // Constructor of a data set from (part of) an existing data
  // set. The dimensions of the data set are defined by the 'vars'
  // RooArgSet, which can be identical to 'dset' dimensions, or a
  // subset thereof. The 'cutVar' formula variable is used to select
  // the subset of data points to be copied.  For subsets without
  // selection on the data points, or involving cuts operating
  // exclusively and directly on the data set dimensions, the
  // equivalent constructor with a string based cut expression is
  // recommended.
  //
  // For most uses the RooAbsData::reduce() wrapper function, which
  // uses this constructor, is the most convenient way to create a
  // subset of an existing data

  // Initialize datastore
  _dstore = new RooTreeDataStore(name,title,_vars,*dset->_dstore,cutVar,wgtVarName) ;

  appendToDir(this,kTRUE) ;

  if (wgtVarName) {
    // Use the supplied weight column
    initialize(wgtVarName) ;    
  } else {
    if (dset->_wgtVar && vars.find(dset->_wgtVar->GetName())) {
      // Use the weight column of the source data set
      initialize(dset->_wgtVar->GetName()) ;
    } else {
      initialize(0) ;
    }
  }
}




//_____________________________________________________________________________
RooDataSet::RooDataSet(const char *name, const char *title, TTree *intree, 
		       const RooArgSet& vars, const RooFormulaVar& cutVar, const char* wgtVarName) :
  RooAbsData(name,title,vars)
{
  // Constructor of a data set from (part of) an ROOT TTRee. The dimensions
  // of the data set are defined by the 'vars' RooArgSet. For each dimension
  // specified, the TTree must have a branch with the same name. For category
  // branches, this branch should contain the numeric index value. Real dimensions
  // can be constructed from either 'Double_t' or 'Float_t' tree branches. In the
  // latter case, an automatic conversion is applied.
  //
  // The 'cutVar' formula variable
  // is used to select the subset of data points to be copied.
  // For subsets without selection on the data points, or involving cuts
  // operating exclusively and directly on the data set dimensions, the equivalent
  // constructor with a string based cut expression is recommended.

  // Initialize datastore
  _dstore = new RooTreeDataStore(name,title,_vars,*intree,cutVar,wgtVarName) ;

  appendToDir(this,kTRUE) ;

  initialize(wgtVarName) ;
}



//_____________________________________________________________________________
RooDataSet::RooDataSet(const char *name, const char *title, TTree *intree, 
		       const RooArgSet& vars, const char *selExpr, const char* wgtVarName) :
  RooAbsData(name,title,vars)
{
  // Constructor of a data set from (part of) an ROOT TTRee. The dimensions
  // of the data set are defined by the 'vars' RooArgSet. For each dimension
  // specified, the TTree must have a branch with the same name. For category
  // branches, this branch should contain the numeric index value. Real dimensions
  // can be constructed from either 'Double_t' or 'Float_t' tree branches. In the
  // latter case, an automatic conversion is applied.
  //
  // The 'cuts' string is an optional
  // RooFormula expression and can be used to select the subset of the data points 
  // in 'dset' to be copied. The cut expression can refer to any variable in the
  // vars argset. For cuts involving variables other than those contained in
  // the vars argset, such as intermediate formula objects, use the 
  // equivalent constructor accepting RooFormulaVar reference as cut specification
  //

  // Initialize datastore
  _dstore = new RooTreeDataStore(name,title,_vars,*intree,selExpr,wgtVarName) ;

  appendToDir(this,kTRUE) ;

  initialize(wgtVarName) ;
}



//_____________________________________________________________________________
RooDataSet::RooDataSet(RooDataSet const & other, const char* newname) :
  RooAbsData(other,newname), RooDirItem()
{
  // Copy constructor

  appendToDir(this,kTRUE) ;
  initialize(other._wgtVar?other._wgtVar->GetName():0) ;
}

//_____________________________________________________________________________
RooDataSet::RooDataSet(const char *name, const char *title, RooDataSet *dset, 
		       const RooArgSet& vars, const RooFormulaVar* cutVar, const char* cutRange,
		       Int_t nStart, Int_t nStop, Bool_t copyCache, const char* wgtVarName) :
  RooAbsData(name,title,vars)
{
  // Protected constructor for internal use only

  _dstore = new RooTreeDataStore(name,title,*dset->_dstore,_vars,cutVar,cutRange,nStart,nStop,copyCache,wgtVarName) ;
  _cachedVars.add(_dstore->cachedVars()) ;

  appendToDir(this,kTRUE) ;
  initialize(dset->_wgtVar?dset->_wgtVar->GetName():0) ;
}


//_____________________________________________________________________________
RooArgSet RooDataSet::addWgtVar(const RooArgSet& origVars, const RooAbsArg* wgtVar)
{
  // Helper function for constructor that adds optional weight variable to construct
  // total set of observables

  RooArgSet tmp(origVars) ;
  if (wgtVar) tmp.add(*wgtVar) ;
  return tmp ;
}




//_____________________________________________________________________________
RooAbsData* RooDataSet::cacheClone(const RooAbsArg* newCacheOwner, const RooArgSet* newCacheVars, const char* newName) 
{
  // Return a clone of this dataset containing only the cached variables

  RooDataSet* dset = new RooDataSet(newName?newName:GetName(),GetTitle(),this,_vars,(RooFormulaVar*)0,0,0,2000000000,kTRUE,_wgtVar?_wgtVar->GetName():0) ;  
  //if (_wgtVar) dset->setWeightVar(_wgtVar->GetName()) ;

  RooArgSet* selCacheVars = (RooArgSet*) newCacheVars->selectCommon(dset->_cachedVars) ;
  dset->attachCache(newCacheOwner, *selCacheVars) ;
  delete selCacheVars ;

  return dset ;
}



//_____________________________________________________________________________
RooAbsData* RooDataSet::emptyClone(const char* newName, const char* newTitle, const RooArgSet* vars) const 
{
  // Return an empty clone of this dataset. If vars is not null, only the variables in vars
  // are added to the definition of the empty clone

  // If variables are given, be sure to include weight variable if it exists and is not included
  RooArgSet vars2 ;
  if (vars) {
    vars2.add(*vars) ;
    if (_wgtVar && !vars2.find(_wgtVar->GetName())) {
      vars2.add(*_wgtVar) ;
    }
  } else {
    vars2.add(_vars) ;
  }

  RooDataSet* dset = new RooDataSet(newName?newName:GetName(),newTitle?newTitle:GetTitle(),vars2,_wgtVar?_wgtVar->GetName():0) ; 
  //if (_wgtVar) dset->setWeightVar(_wgtVar->GetName()) ;
  return dset ;
}



//_____________________________________________________________________________
void RooDataSet::initialize(const char* wgtVarName) 
{
  // Initialize the dataset. If wgtVarName is not null, interpret the observable
  // with that name as event weight

  _varsNoWgt.removeAll() ;
  _varsNoWgt.add(_vars) ;
  _wgtVar = 0 ;
  if (wgtVarName) {
    RooAbsArg* wgt = _varsNoWgt.find(wgtVarName) ;
    if (!wgt) {
      coutW(DataHandling) << "RooDataSet::RooDataSet(" << GetName() << ") WARNING: designated weight variable " 
			  << wgtVarName << " not found in set of variables, no weighting will be assigned" << endl ;
    } else if (!dynamic_cast<RooRealVar*>(wgt)) {
      coutW(DataHandling) << "RooDataSet::RooDataSet(" << GetName() << ") WARNING: designated weight variable " 
			  << wgtVarName << " is not of type RooRealVar, no weighting will be assigned" << endl ;
    } else {
      _varsNoWgt.remove(*wgt) ;
      _wgtVar = (RooRealVar*) wgt ;
    }
  }
}



//_____________________________________________________________________________
RooAbsData* RooDataSet::reduceEng(const RooArgSet& varSubset, const RooFormulaVar* cutVar, const char* cutRange, 
				  Int_t nStart, Int_t nStop, Bool_t copyCache)
{
  // Implementation of RooAbsData virtual method that drives the RooAbsData::reduce() methods
  checkInit() ;

  RooArgSet tmp(varSubset) ;
  if (_wgtVar) {
    tmp.add(*_wgtVar) ;
  }
  RooDataSet* ret =  new RooDataSet(GetName(), GetTitle(), this, tmp, cutVar, cutRange, nStart, nStop, copyCache,_wgtVar?_wgtVar->GetName():0) ;
  
  // WVE - propagate optional weight variable
  //       check behaviour in plotting.
//   if (_wgtVar) {
//     ret->setWeightVar(_wgtVar->GetName()) ;
//   }
  return ret ;
}



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

  removeFromDir(this) ;
}



//_____________________________________________________________________________
RooDataHist* RooDataSet::binnedClone(const char* newName, const char* newTitle) const 
{
  // Return binned clone of this dataset

  TString title, name ;
  if (newName) {
    name = newName ;
  } else {
    name = Form("%s_binned",GetName()) ;
  }
  if (newTitle) {
    title = newTitle ;
  } else {
    title = Form("%s_binned",GetTitle()) ;
  }

  return new RooDataHist(name,title,*get(),*this) ;
}



//_____________________________________________________________________________
Double_t RooDataSet::weight() const 
{
  // Return event weight of current event

  return store()->weight() ; 
}




//_____________________________________________________________________________
void RooDataSet::weightError(Double_t& lo, Double_t& hi, ErrorType etype) const 
{
  store()->weightError(lo,hi,etype) ;
}



//_____________________________________________________________________________
Double_t RooDataSet::weightError(ErrorType etype) const 
{
  return store()->weightError(etype) ;
}



//_____________________________________________________________________________
const RooArgSet* RooDataSet::get(Int_t index) const
{
  // Return RooArgSet with coordinates of event 'index' 
  const RooArgSet* ret  = RooAbsData::get(index) ;
  return ret ? &_varsNoWgt : 0 ;
}



//_____________________________________________________________________________
Double_t RooDataSet::sumEntries(const char* cutSpec, const char* cutRange) const 
{
  // Return the sum of weights in all entries matching cutSpec (if specified)
  // and in named range cutRange (if specified)

  // Setup RooFormulaVar for cutSpec if it is present
  RooFormula* select = 0 ;
  if (cutSpec) {
    select = new RooFormula("select",cutSpec,*get()) ;
  }

  // Otherwise sum the weights in the event
  Double_t sumw(0) ;
  Int_t i ;
  for (i=0 ; i<numEntries() ; i++) {
    get(i) ;
    if (select && select->eval()==0.) continue ;
    if (cutRange && !_vars.allInRange(cutRange)) continue ;
    sumw += weight() ;
  }

  if (select) delete select ;

  return sumw ;  
}




//_____________________________________________________________________________
Bool_t RooDataSet::isWeighted() const
{ 
    // Return true if dataset contains weighted events
    return store()->isWeighted() ;
}



//_____________________________________________________________________________
Bool_t RooDataSet::isNonPoissonWeighted() const
{
  // Returns true if histogram contains bins with entries with a non-integer weight

  // Return false if we have no weights
  if (!_wgtVar) return kFALSE ;
  
  // Now examine individual weights
  for (int i=0 ; i<numEntries() ; i++) {
    get(i) ;
    if (fabs(weight()-Int_t(weight()))>1e-10) return kTRUE ;
  }
  // If sum of weights is less than number of events there are negative (integer) weights
  if (sumEntries()<numEntries()) return kTRUE ;

  return kFALSE ;
}




//_____________________________________________________________________________
const RooArgSet* RooDataSet::get() const 
{ 
  // Return a RooArgSet with the coordinates of the current event
  return &_varsNoWgt ; 
} 



//_____________________________________________________________________________
void RooDataSet::add(const RooArgSet& data, Double_t wgt, Double_t wgtError) 
{
  // Add a data point, with its coordinates specified in the 'data' argset, to the data set. 
  // Any variables present in 'data' but not in the dataset will be silently ignored
  //
  checkInit() ;
  _varsNoWgt = data;
  if (_wgtVar) {
    _wgtVar->setVal(wgt) ;
    if (wgtError!=0.) {
      _wgtVar->setError(wgtError) ;
    }
  }
  fill();
}




//_____________________________________________________________________________
void RooDataSet::add(const RooArgSet& indata, Double_t inweight, Double_t weightErrorLo, Double_t weightErrorHi) 
{
  // Add a data point, with its coordinates specified in the 'data' argset, to the data set. 
  // Any variables present in 'data' but not in the dataset will be silently ignored
  //
  checkInit() ;

  _varsNoWgt = indata;
  if (_wgtVar) {
    _wgtVar->setVal(inweight) ;
    _wgtVar->setAsymError(weightErrorLo,weightErrorHi) ;
  }
  fill();
}





//_____________________________________________________________________________
void RooDataSet::addFast(const RooArgSet& data, Double_t wgt, Double_t wgtError) 
{
  // Add a data point, with its coordinates specified in the 'data' argset, to the data set. 
  // Layout and size of input argument data is ASSUMED to be the same as RooArgSet returned
  // RooDataSet::get()
  //

  checkInit() ;
  _varsNoWgt.assignFast(data);
  if (_wgtVar) {
    _wgtVar->setVal(wgt) ;
    if (wgtError!=0.) {
      _wgtVar->setError(wgtError) ;
    }
  }
  fill();
}



//_____________________________________________________________________________
Bool_t RooDataSet::merge(RooDataSet* data1, RooDataSet* data2, RooDataSet* data3, 
			 RooDataSet* data4, RooDataSet* data5, RooDataSet* data6) 
{
  checkInit() ;
  list<RooDataSet*> dsetList ;
  if (data1) dsetList.push_back(data1) ;
  if (data2) dsetList.push_back(data2) ;
  if (data3) dsetList.push_back(data3) ;
  if (data4) dsetList.push_back(data4) ;
  if (data5) dsetList.push_back(data5) ;
  if (data6) dsetList.push_back(data6) ;
  return merge(dsetList) ;
}



//_____________________________________________________________________________
Bool_t RooDataSet::merge(list<RooDataSet*>dsetList)
{
  // Merge columns of supplied data set(s) with this data set.  All
  // data sets must have equal number of entries.  In case of
  // duplicate columns the column of the last dataset in the list
  // prevails


  checkInit() ;
  // Sanity checks: data sets must have the same size
  for (list<RooDataSet*>::iterator iter = dsetList.begin() ; iter != dsetList.end() ; iter++) {
    if (numEntries()!=(*iter)->numEntries()) {
      coutE(InputArguments) << "RooDataSet::merge(" << GetName() << ") ERROR: datasets have different size" << endl ;
      return kTRUE ;    
    }
  }

  // Extend vars with elements of other dataset
  list<RooAbsDataStore*> dstoreList ;
  for (list<RooDataSet*>::iterator iter = dsetList.begin() ; iter != dsetList.end() ; iter++) {
    _vars.addClone((*iter)->_vars,kTRUE) ;
    dstoreList.push_back((*iter)->store()) ;
  }

  // Merge data stores
  RooAbsDataStore* mergedStore = _dstore->merge(_vars,dstoreList) ;
  mergedStore->SetName(_dstore->GetName()) ;
  mergedStore->SetTitle(_dstore->GetTitle()) ;

  // Replace current data store with merged store
  delete _dstore ;
  _dstore = mergedStore ;

  initialize(_wgtVar?_wgtVar->GetName():0) ;
  return kFALSE ;
}


//_____________________________________________________________________________
void RooDataSet::append(RooDataSet& data) 
{
  // Add all data points of given data set to this data set.
  // Observable in 'data' that are not in this dataset
  // with not be transferred
  checkInit() ;
  _dstore->append(*data._dstore) ;
}



//_____________________________________________________________________________
RooAbsArg* RooDataSet::addColumn(RooAbsArg& var, Bool_t adjustRange) 
{
  // Add a column with the values of the given (function) argument
  // to this dataset. The function value is calculated for each
  // event using the observable values of each event in case the
  // function depends on variables with names that are identical
  // to the observable names in the dataset

  checkInit() ;
  RooAbsArg* ret = _dstore->addColumn(var,adjustRange) ;
  _vars.addOwned(*ret) ;
  initialize(_wgtVar?_wgtVar->GetName():0) ;
  return ret ;
}


//_____________________________________________________________________________
RooArgSet* RooDataSet::addColumns(const RooArgList& varList) 
{
  // Add a column with the values of the given list of (function)
  // argument to this dataset. Each function value is calculated for
  // each event using the observable values of the event in case the
  // function depends on variables with names that are identical to
  // the observable names in the dataset

  checkInit() ;
  RooArgSet* ret = _dstore->addColumns(varList) ;  
  _vars.addOwned(*ret) ;
  initialize(_wgtVar?_wgtVar->GetName():0) ;
  return ret ;
}



//_____________________________________________________________________________
TH2F* RooDataSet::createHistogram(const RooAbsRealLValue& var1, const RooAbsRealLValue& var2, const char* cuts, const char *name) const
{
  // Create a TH2F histogram of the distribution of the specified variable
  // using this dataset. Apply any cuts to select which events are used.
  // The variable being plotted can either be contained directly in this
  // dataset, or else be a function of the variables in this dataset.
  // The histogram will be created using RooAbsReal::createHistogram() with
  // the name provided (with our dataset name prepended).
  checkInit() ;
  return createHistogram(var1, var2, var1.getBins(), var2.getBins(), cuts, name);
}



//_____________________________________________________________________________
TH2F* RooDataSet::createHistogram(const RooAbsRealLValue& var1, const RooAbsRealLValue& var2, 
				  Int_t nx, Int_t ny, const char* cuts, const char *name) const
{
  // Create a TH2F histogram of the distribution of the specified variable
  // using this dataset. Apply any cuts to select which events are used.
  // The variable being plotted can either be contained directly in this
  // dataset, or else be a function of the variables in this dataset.
  // The histogram will be created using RooAbsReal::createHistogram() with
  // the name provided (with our dataset name prepended).

  checkInit() ;
  static Int_t counter(0) ;

  Bool_t ownPlotVarX(kFALSE) ;
  // Is this variable in our dataset?
  RooAbsReal* plotVarX= (RooAbsReal*)_vars.find(var1.GetName());
  if(0 == plotVarX) {
    // Is this variable a client of our dataset?
    if (!var1.dependsOn(_vars)) {
      coutE(InputArguments) << GetName() << "::createHistogram: Argument " << var1.GetName() 
			    << " is not in dataset and is also not dependent on data set" << endl ;
      return 0 ; 
    }

    // Clone derived variable 
    plotVarX = (RooAbsReal*) var1.Clone()  ;
    ownPlotVarX = kTRUE ;

    //Redirect servers of derived clone to internal ArgSet representing the data in this set
    plotVarX->redirectServers(const_cast<RooArgSet&>(_vars)) ;
  }

  Bool_t ownPlotVarY(kFALSE) ;
  // Is this variable in our dataset?
  RooAbsReal* plotVarY= (RooAbsReal*)_vars.find(var2.GetName());
  if(0 == plotVarY) {
    // Is this variable a client of our dataset?
    if (!var2.dependsOn(_vars)) {
      coutE(InputArguments) << GetName() << "::createHistogram: Argument " << var2.GetName() 
			    << " is not in dataset and is also not dependent on data set" << endl ;
      return 0 ; 
    }

    // Clone derived variable 
    plotVarY = (RooAbsReal*) var2.Clone()  ;
    ownPlotVarY = kTRUE ;

    //Redirect servers of derived clone to internal ArgSet representing the data in this set
    plotVarY->redirectServers(const_cast<RooArgSet&>(_vars)) ;
  }

  // Create selection formula if selection cuts are specified
  RooFormula* select = 0;
  if(0 != cuts && strlen(cuts)) {
    select=new RooFormula(cuts,cuts,_vars);
    if (!select || !select->ok()) {
      delete select;
      return 0 ;
    }
  }
  
  TString histName(name);
  histName.Prepend("_");
  histName.Prepend(fName);
  histName.Append("_") ;
  histName.Append(Form("%08x",counter++)) ;

  // create the histogram
  TH2F* histogram=new TH2F(histName.Data(), "Events", nx, var1.getMin(), var1.getMax(), 
                                                      ny, var2.getMin(), var2.getMax());
  if(!histogram) {
    coutE(DataHandling) << fName << "::createHistogram: unable to create a new histogram" << endl;
    return 0;
  }

  // Dump contents  
  Int_t nevent= numEntries() ;
  for(Int_t i=0; i < nevent; ++i) 
  {
    get(i);
    
    if (select && select->eval()==0) continue ;
    histogram->Fill(plotVarX->getVal(), plotVarY->getVal()) ;
  }

  if (ownPlotVarX) delete plotVarX ;
  if (ownPlotVarY) delete plotVarY ;
  if (select) delete select ;

  return histogram ;
}





//_____________________________________________________________________________
RooPlot* RooDataSet::plotOnXY(RooPlot* frame, const RooCmdArg& arg1, const RooCmdArg& arg2,
			      const RooCmdArg& arg3, const RooCmdArg& arg4,
			      const RooCmdArg& arg5, const RooCmdArg& arg6,
			      const RooCmdArg& arg7, const RooCmdArg& arg8) const 
{
  // Special plot method for 'X-Y' datasets used in Chi^2 fitting. These datasets 
  // have one observable (X) and have weights (Y) and associated errors.
  //
  // Contents options
  // ---------------------
  // YVar(RooRealVar& var)           -- Designate specified observable as 'y' variable
  //                                    If not specified, the event weight will be the y variable
  // Histogram drawing options
  // -------------------------
  // DrawOption(const char* opt)     -- Select ROOT draw option for resulting TGraph object
  // LineStyle(Int_t style)          -- Select line style by ROOT line style code, default is solid
  // LineColor(Int_t color)          -- Select line color by ROOT color code, default is black
  // LineWidth(Int_t width)          -- Select line with in pixels, default is 3
  // MarkerStyle(Int_t style)        -- Select the ROOT marker style, default is 21
  // MarkerColor(Int_t color)        -- Select the ROOT marker color, default is black
  // MarkerSize(Double_t size)       -- Select the ROOT marker size
  // Rescale(Double_t factor)        -- Apply global rescaling factor to histogram
  //
  //
  // Misc. other options
  // -------------------
  // Name(const chat* name)          -- Give curve specified name in frame. Useful if curve is to be referenced later
  // Invisible(Bool_t flag)          -- Add curve to frame, but do not display. Useful in combination AddTo()
  // 

  checkInit() ;

  RooLinkedList argList ;
  argList.Add((TObject*)&arg1) ;  argList.Add((TObject*)&arg2) ;  
  argList.Add((TObject*)&arg3) ;  argList.Add((TObject*)&arg4) ;
  argList.Add((TObject*)&arg5) ;  argList.Add((TObject*)&arg6) ;  
  argList.Add((TObject*)&arg7) ;  argList.Add((TObject*)&arg8) ;

  // Process named arguments
  RooCmdConfig pc(Form("RooDataSet::plotOnXY(%s)",GetName())) ;
  pc.defineString("drawOption","DrawOption",0,"P") ;
  pc.defineString("histName","Name",0,"") ;
  pc.defineInt("lineColor","LineColor",0,-999) ;
  pc.defineInt("lineStyle","LineStyle",0,-999) ;
  pc.defineInt("lineWidth","LineWidth",0,-999) ;
  pc.defineInt("markerColor","MarkerColor",0,-999) ;
  pc.defineInt("markerStyle","MarkerStyle",0,8) ;
  pc.defineDouble("markerSize","MarkerSize",0,-999) ;
  pc.defineInt("fillColor","FillColor",0,-999) ;
  pc.defineInt("fillStyle","FillStyle",0,-999) ;
  pc.defineInt("histInvisible","Invisible",0,0) ;
  pc.defineDouble("scaleFactor","Rescale",0,1.) ;
  pc.defineObject("xvar","XVar",0,0) ;
  pc.defineObject("yvar","YVar",0,0) ;

  
  // Process & check varargs 
  pc.process(argList) ;
  if (!pc.ok(kTRUE)) {
    return frame ;
  }
  
  // Extract values from named arguments
  const char* drawOptions = pc.getString("drawOption") ;
  Int_t histInvisible = pc.getInt("histInvisible") ;
  const char* histName = pc.getString("histName",0,kTRUE) ;
  Double_t scaleFactor = pc.getDouble("scaleFactor") ;

  RooRealVar* xvar = (RooRealVar*) _vars.find(frame->getPlotVar()->GetName()) ;

  // Determine Y variable (default is weight, if present)
  RooRealVar* yvar = (RooRealVar*)(pc.getObject("yvar")) ;

  // Sanity check. XY plotting only applies to weighted datasets if no YVar is specified
  if (!_wgtVar && !yvar) {
    coutE(InputArguments) << "RooDataSet::plotOnXY(" << GetName() << ") ERROR: no YVar() argument specified and dataset is not weighted" << endl ;
    return 0 ;
  }
  
  RooRealVar* dataY = yvar ? (RooRealVar*) _vars.find(yvar->GetName()) : 0 ;
  if (yvar && !dataY) {
    coutE(InputArguments) << "RooDataSet::plotOnXY(" << GetName() << ") ERROR on YVar() argument, dataset does not contain a variable named " << yvar->GetName() << endl ;
    return 0 ;
  }


  // Make RooHist representing XY contents of data
  RooHist* graph = new RooHist ;
  if (histName) {
    graph->SetName(histName) ;
  } else {
    graph->SetName(Form("hxy_%s",GetName())) ;
  }
  
  for (int i=0 ; i<numEntries() ; i++) {
    get(i) ;
    Double_t x = xvar->getVal() ;
    Double_t exlo = xvar->getErrorLo() ;
    Double_t exhi = xvar->getErrorHi() ;
    Double_t y,eylo,eyhi ;
    if (!dataY) {
      y = weight() ;
      weightError(eylo,eyhi) ;
    } else {
      y = dataY->getVal() ;
      eylo = dataY->getErrorLo() ;
      eyhi = dataY->getErrorHi() ;
    }
    graph->addBinWithXYError(x,y,-1*exlo,exhi,-1*eylo,eyhi,scaleFactor) ;
  }

  // Adjust style options according to named arguments
  Int_t lineColor   = pc.getInt("lineColor") ;
  Int_t lineStyle   = pc.getInt("lineStyle") ;
  Int_t lineWidth   = pc.getInt("lineWidth") ;
  Int_t markerColor = pc.getInt("markerColor") ;
  Int_t markerStyle = pc.getInt("markerStyle") ;
  Size_t markerSize  = pc.getDouble("markerSize") ;
  Int_t fillColor = pc.getInt("fillColor") ;
  Int_t fillStyle = pc.getInt("fillStyle") ;

  if (lineColor!=-999) graph->SetLineColor(lineColor) ;
  if (lineStyle!=-999) graph->SetLineStyle(lineStyle) ;
  if (lineWidth!=-999) graph->SetLineWidth(lineWidth) ;
  if (markerColor!=-999) graph->SetMarkerColor(markerColor) ;
  if (markerStyle!=-999) graph->SetMarkerStyle(markerStyle) ;
  if (markerSize!=-999) graph->SetMarkerSize(markerSize) ;
  if (fillColor!=-999) graph->SetFillColor(fillColor) ;
  if (fillStyle!=-999) graph->SetFillStyle(fillStyle) ;

  // Add graph to frame
  frame->addPlotable(graph,drawOptions,histInvisible) ;
 
  return frame ;
}




//_____________________________________________________________________________
RooDataSet *RooDataSet::read(const char *fileList, const RooArgList &varList,
			     const char *verbOpt, const char* commonPath, 
			     const char* indexCatName) {
  // Read given list of ascii files, and construct a data set, using the given
  // ArgList as structure definition.
  //
  // Multiple file names in fileList should be comma separated. Each
  // file is optionally prefixed with 'commonPath' if such a path is
  // provided
  //
  // The arglist specifies the dimensions of the dataset to be built
  // and describes the order in which these dimensions appear in the
  // ascii files to be read. 
  //
  // Each line in the ascii file should contain N white space separated
  // tokens, with N the number of args in 'variables'. Any text beyond
  // N tokens will be ignored with a warning message.
  // [ NB: This format is written by RooArgList::writeToStream() ]
  // 
  // If the value of any of the variables on a given line exceeds the
  // fit range associated with that dimension, the entire line will be
  // ignored. A warning message is printed in each case, unless the
  // 'Q' verbose option is given. (Option 'D' will provide additional
  // debugging information) The number of events read and skipped
  // is always summarized at the end.
  //
  // When multiple files are read, a RooCategory arg in 'variables' can 
  // optionally be designated to hold information about the source file 
  // of each data point. This feature is enabled by giving the name
  // of the (already existing) category variable in 'indexCatName'
  //
  // If no further information is given a label name 'fileNNN' will
  // be assigned to each event, where NNN is the sequential number of
  // the source file in 'fileList'.
  // 
  // Alternatively it is possible to override the default label names
  // of the index category by specifying them in the fileList string:
  // When instead of "file1.txt,file2.txt" the string 
  // "file1.txt:FOO,file2.txt:BAR" is specified, a state named "FOO"
  // is assigned to the index category for each event originating from
  // file1.txt. The labels FOO,BAR may be predefined in the index 
  // category via defineType(), but don't have to be
  //
  // Finally, one can also assign the same label to multiple files,
  // either by specifying "file1.txt:FOO,file2,txt:FOO,file3.txt:BAR"
  // or "file1.txt,file2.txt:FOO,file3.txt:BAR"
  //

  // Make working copy of variables list 
  RooArgList variables(varList) ;

  // Append blinding state category to variable list if not already there
  Bool_t ownIsBlind(kTRUE) ;
  RooAbsArg* blindState = variables.find("blindState") ;
  if (!blindState) {
    blindState = new RooCategory("blindState","Blinding State") ;
    variables.add(*blindState) ;
  } else {
    ownIsBlind = kFALSE ;    
    if (blindState->IsA()!=RooCategory::Class()) {
      oocoutE((TObject*)0,DataHandling) << "RooDataSet::read: ERROR: variable list already contains" 
			  << "a non-RooCategory blindState member" << endl ;
      return 0 ;
    }
    oocoutW((TObject*)0,DataHandling) << "RooDataSet::read: WARNING: recycling existing "
			<< "blindState category in variable list" << endl ;
  }
  RooCategory* blindCat = (RooCategory*) blindState ;

  // Configure blinding state category
  blindCat->setAttribute("Dynamic") ;
  blindCat->defineType("Normal",0) ;
  blindCat->defineType("Blind",1) ;

  // parse the option string
  TString opts= verbOpt;
  opts.ToLower();
  Bool_t verbose= !opts.Contains("q");
  Bool_t debug= opts.Contains("d");

  RooDataSet *data= new RooDataSet("dataset", fileList, variables);
  if (ownIsBlind) { variables.remove(*blindState) ; delete blindState ; }
  if(!data) {
    oocoutE((TObject*)0,DataHandling) << "RooDataSet::read: unable to create a new dataset"
			<< endl;
    return 0;
  }

  // Redirect blindCat to point to the copy stored in the data set
  blindCat = (RooCategory*) data->_vars.find("blindState") ;

  // Find index category, if requested
  RooCategory *indexCat     = 0;
  //RooCategory *indexCatOrig = 0;
  if (indexCatName) { 
    RooAbsArg* tmp = 0;
    tmp = data->_vars.find(indexCatName) ;
    if (!tmp) {
      oocoutE((TObject*)0,DataHandling) << "RooDataSet::read: no index category named " 
			  << indexCatName << " in supplied variable list" << endl ;
      return 0 ;
    }
    if (tmp->IsA()!=RooCategory::Class()) {
      oocoutE((TObject*)0,DataHandling) << "RooDataSet::read: variable " << indexCatName 
			  << " is not a RooCategory" << endl ;
      return 0 ;
    }
    indexCat = (RooCategory*)tmp ;
    
    // Prevent RooArgSet from attempting to read in indexCat
    indexCat->setAttribute("Dynamic") ;
  }


  Int_t outOfRange(0) ;

  // Make local copy of file list for tokenizing 
  char fileList2[10240] ;
  strcpy(fileList2,fileList) ;
  
  // Loop over all names in comma separated list
  char *filename = strtok(fileList2,", ") ;
  Int_t fileSeqNum(0) ;
  while (filename) {
    // Determine index category number, if this option is active
    if (indexCat) {

      // Find and detach optional file category name 
      char *catname = strchr(filename,':') ;

      if (catname) {
	// Use user category name if provided
	*catname=0 ;
	catname++ ;

	const RooCatType* type = indexCat->lookupType(catname,kFALSE) ;
	if (type) {
	  // Use existing category index
	  indexCat->setIndex(type->getVal()) ;
	} else {
	  // Register cat name
	  indexCat->defineType(catname,fileSeqNum) ;
	  indexCat->setIndex(fileSeqNum) ;
	}
      } else {
	// Assign autogenerated name
	char newLabel[128] ;
	sprintf(newLabel,"file%03d",fileSeqNum) ;
	if (indexCat->defineType(newLabel,fileSeqNum)) {
	  oocoutE((TObject*)0,DataHandling) << "RooDataSet::read: Error, cannot register automatic type name " << newLabel 
			      << " in index category " << indexCat->GetName() << endl ;
	  return 0 ;
	}	
	// Assign new category number
	indexCat->setIndex(fileSeqNum) ;
      }
    }

    oocoutI((TObject*)0,DataHandling) << "RooDataSet::read: reading file " << filename << endl ;

    // Prefix common path 
    TString fullName(commonPath) ;
    fullName.Append(filename) ;
    ifstream file(fullName) ;

    if(!file.good()) {
      oocoutW((TObject*)0,DataHandling) << "RooDataSet::read: unable to open '"
	   << filename << "', skipping" << endl;
    }
    
//  Double_t value;
    Int_t line(0) ;
    Bool_t haveBlindString(false) ;

    while(file.good() && !file.eof()) {
      line++;
      if(debug) oocxcoutD((TObject*)0,DataHandling) << "reading line " << line << endl;

      // process comment lines
      if (file.peek() == '#')
	{
	  if(debug) oocxcoutD((TObject*)0,DataHandling) << "skipping comment on line " << line << endl;	    
	}
      else {	

	// Skip empty lines 
	// if(file.peek() == '\n') { file.get(); }

	// Read single line
	Bool_t readError = variables.readFromStream(file,kTRUE,verbose) ;
	data->_vars = variables ;
// 	Bool_t readError = data->_vars.readFromStream(file,kTRUE,verbose) ;

	// Stop at end of file or on read error
	if(file.eof()) break ;	
	if(!file.good()) {
	  oocoutE((TObject*)0,DataHandling) << "RooDataSet::read(static): read error at line " << line << endl ;
	  break;
	}	

	if (readError) {
	  outOfRange++ ;
	  continue ;
	}
	blindCat->setIndex(haveBlindString) ;
	data->fill(); // store this event
      }
    }

    file.close();

    // get next file name 
    filename = strtok(0," ,") ;
    fileSeqNum++ ;
  }

  if (indexCat) {
    // Copy dynamically defined types from new data set to indexCat in original list
    RooCategory* origIndexCat = (RooCategory*) variables.find(indexCatName) ;
    TIterator* tIter = indexCat->typeIterator() ;
    RooCatType* type = 0;
      while ((type=(RooCatType*)tIter->Next())) {
	origIndexCat->defineType(type->GetName(),type->getVal()) ;
      }
  }
  oocoutI((TObject*)0,DataHandling) << "RooDataSet::read: read " << data->numEntries()
				    << " events (ignored " << outOfRange << " out of range events)" << endl;
  return data;
}




//_____________________________________________________________________________
Bool_t RooDataSet::write(const char* filename)
{
  // Write the contents of this dataset to an ASCII file with the specified name
  // Each event will be written as a single line containing the written values
  // of each observable in the order they were declared in the dataset and
  // separated by whitespaces

  checkInit() ;

  // Open file for writing 
  ofstream ofs(filename) ;
  if (ofs.fail()) {
    coutE(DataHandling) << "RooDataSet::write(" << GetName() << ") cannot create file " << filename << endl ;
    return kTRUE ;
  }

  // Write all lines as arglist in compact mode
  coutI(DataHandling) << "RooDataSet::write(" << GetName() << ") writing ASCII file " << filename << endl ;
  Int_t i ;
  for (i=0 ; i<numEntries() ; i++) {
    RooArgList list(*get(i),"line") ;
    list.writeToStream(ofs,kTRUE) ;
  }

  if (ofs.fail()) {
    coutW(DataHandling) << "RooDataSet::write(" << GetName() << "): WARNING error(s) have occured in writing" << endl ;
  }
  return ofs.fail() ;
}



//_____________________________________________________________________________
void RooDataSet::printMultiline(ostream& os, Int_t contents, Bool_t verbose, TString indent) const 
{
  // Print info about this dataset to the specified output stream.
  //
  //   Standard: number of entries
  //      Shape: list of variables we define & were generated with

  checkInit() ;
  RooAbsData::printMultiline(os,contents,verbose,indent) ;
  if (_wgtVar) {
    os << indent << "  Dataset variable \"" << _wgtVar->GetName() << "\" is interpreted as the event weight" << endl ;
  }
}


//_____________________________________________________________________________
void RooDataSet::printValue(ostream& os) const 
{
  // Print value of the dataset, i.e. the sum of weights contained in the dataset
  os << numEntries() << " entries" ;
  if (isWeighted()) {
    os << " (" << sumEntries() << " weighted)" ;
  }
}



//_____________________________________________________________________________
void RooDataSet::printArgs(ostream& os) const 
{
  // Print argument of dataset, i.e. the observable names

  os << "[" ;    
  TIterator* iter = _varsNoWgt.createIterator() ;
  RooAbsArg* arg ;
  Bool_t first(kTRUE) ;
  while((arg=(RooAbsArg*)iter->Next())) {
    if (first) {
      first=kFALSE ;
    } else {
      os << "," ;
    }
    os << arg->GetName() ;
  }
  if (_wgtVar) {
    os << ",weight:" << _wgtVar->GetName() ;
  }
  os << "]" ;
  delete iter ;
}



//_____________________________________________________________________________
void RooDataSet::setWeightVar(const char*)
{
  coutF(InputArguments) << "RooDataSet::setWeightVar(" << GetName() << ") ERROR: method setWeightVar is deprecated. Specify weight variable instead in dataset constructor using WeightVar() argument" << endl ;
  throw string("ERROR: RooDataSet::setWeightVar() is deprecated. Specify weight variable in RooDataSet constructor instead using WeightVar()") ;
}




//_____________________________________________________________________________
void RooDataSet::SetName(const char *name) 
{
  // Change the name of this dataset into the given name

  if (_dir) _dir->GetList()->Remove(this);
  TNamed::SetName(name) ;
  if (_dir) _dir->GetList()->Add(this);
}


//_____________________________________________________________________________
void RooDataSet::SetNameTitle(const char *name, const char* title) 
{
  // Change the title of this dataset into the given name

  if (_dir) _dir->GetList()->Remove(this);
  TNamed::SetNameTitle(name,title) ;
  if (_dir) _dir->GetList()->Add(this);
}


//______________________________________________________________________________
void RooDataSet::Streamer(TBuffer &R__b)
{
   // Stream an object of class RooDataSet.
   if (R__b.IsReading()) {

     UInt_t R__s, R__c;
     Version_t R__v = R__b.ReadVersion(&R__s, &R__c);

     if (R__v>1) {

       // Use new-style streaming for version >1
       R__b.ReadClassBuffer(RooDataSet::Class(),this,R__v,R__s,R__c);

     } else {

       // Legacy dataset conversion happens here. Legacy RooDataSet inherits from RooTreeData
       // which in turn inherits from RooAbsData. Manually stream RooTreeData contents on 
       // file here and convert it into a RooTreeDataStore which is installed in the 
       // new-style RooAbsData base class

       // --- This is the contents of the streamer code of RooTreeData version 1 ---
       UInt_t R__s1, R__c1;
       Version_t R__v1 = R__b.ReadVersion(&R__s1, &R__c1); if (R__v1) { }
       
       RooAbsData::Streamer(R__b);
       TTree* X_tree(0) ; R__b >> X_tree;
       RooArgSet X_truth ; X_truth.Streamer(R__b);
       TString X_blindString ; X_blindString.Streamer(R__b);
       R__b.CheckByteCount(R__s1, R__c1, RooTreeData::Class());
       // --- End of RooTreeData-v1 streamer
       
       // Construct RooTreeDataStore from X_tree and complete initialization of new-style RooAbsData
       _dstore = new RooTreeDataStore(X_tree,_vars) ;
       _dstore->SetName(GetName()) ;
       _dstore->SetTitle(GetTitle()) ;
       _dstore->checkInit() ;       

       // This is the contents of the streamer code of RooDataSet version 1
       RooDirItem::Streamer(R__b);
       _varsNoWgt.Streamer(R__b);
       R__b >> _wgtVar;
       R__b.CheckByteCount(R__s, R__c, RooDataSet::IsA());

       
     }
   } else {
      R__b.WriteClassBuffer(RooDataSet::Class(),this);
   }
}

 RooDataSet.cxx:1
 RooDataSet.cxx:2
 RooDataSet.cxx:3
 RooDataSet.cxx:4
 RooDataSet.cxx:5
 RooDataSet.cxx:6
 RooDataSet.cxx:7
 RooDataSet.cxx:8
 RooDataSet.cxx:9
 RooDataSet.cxx:10
 RooDataSet.cxx:11
 RooDataSet.cxx:12
 RooDataSet.cxx:13
 RooDataSet.cxx:14
 RooDataSet.cxx:15
 RooDataSet.cxx:16
 RooDataSet.cxx:17
 RooDataSet.cxx:18
 RooDataSet.cxx:19
 RooDataSet.cxx:20
 RooDataSet.cxx:21
 RooDataSet.cxx:22
 RooDataSet.cxx:23
 RooDataSet.cxx:24
 RooDataSet.cxx:25
 RooDataSet.cxx:26
 RooDataSet.cxx:27
 RooDataSet.cxx:28
 RooDataSet.cxx:29
 RooDataSet.cxx:30
 RooDataSet.cxx:31
 RooDataSet.cxx:32
 RooDataSet.cxx:33
 RooDataSet.cxx:34
 RooDataSet.cxx:35
 RooDataSet.cxx:36
 RooDataSet.cxx:37
 RooDataSet.cxx:38
 RooDataSet.cxx:39
 RooDataSet.cxx:40
 RooDataSet.cxx:41
 RooDataSet.cxx:42
 RooDataSet.cxx:43
 RooDataSet.cxx:44
 RooDataSet.cxx:45
 RooDataSet.cxx:46
 RooDataSet.cxx:47
 RooDataSet.cxx:48
 RooDataSet.cxx:49
 RooDataSet.cxx:50
 RooDataSet.cxx:51
 RooDataSet.cxx:52
 RooDataSet.cxx:53
 RooDataSet.cxx:54
 RooDataSet.cxx:55
 RooDataSet.cxx:56
 RooDataSet.cxx:57
 RooDataSet.cxx:58
 RooDataSet.cxx:59
 RooDataSet.cxx:60
 RooDataSet.cxx:61
 RooDataSet.cxx:62
 RooDataSet.cxx:63
 RooDataSet.cxx:64
 RooDataSet.cxx:65
 RooDataSet.cxx:66
 RooDataSet.cxx:67
 RooDataSet.cxx:68
 RooDataSet.cxx:69
 RooDataSet.cxx:70
 RooDataSet.cxx:71
 RooDataSet.cxx:72
 RooDataSet.cxx:73
 RooDataSet.cxx:74
 RooDataSet.cxx:75
 RooDataSet.cxx:76
 RooDataSet.cxx:77
 RooDataSet.cxx:78
 RooDataSet.cxx:79
 RooDataSet.cxx:80
 RooDataSet.cxx:81
 RooDataSet.cxx:82
 RooDataSet.cxx:83
 RooDataSet.cxx:84
 RooDataSet.cxx:85
 RooDataSet.cxx:86
 RooDataSet.cxx:87
 RooDataSet.cxx:88
 RooDataSet.cxx:89
 RooDataSet.cxx:90
 RooDataSet.cxx:91
 RooDataSet.cxx:92
 RooDataSet.cxx:93
 RooDataSet.cxx:94
 RooDataSet.cxx:95
 RooDataSet.cxx:96
 RooDataSet.cxx:97
 RooDataSet.cxx:98
 RooDataSet.cxx:99
 RooDataSet.cxx:100
 RooDataSet.cxx:101
 RooDataSet.cxx:102
 RooDataSet.cxx:103
 RooDataSet.cxx:104
 RooDataSet.cxx:105
 RooDataSet.cxx:106
 RooDataSet.cxx:107
 RooDataSet.cxx:108
 RooDataSet.cxx:109
 RooDataSet.cxx:110
 RooDataSet.cxx:111
 RooDataSet.cxx:112
 RooDataSet.cxx:113
 RooDataSet.cxx:114
 RooDataSet.cxx:115
 RooDataSet.cxx:116
 RooDataSet.cxx:117
 RooDataSet.cxx:118
 RooDataSet.cxx:119
 RooDataSet.cxx:120
 RooDataSet.cxx:121
 RooDataSet.cxx:122
 RooDataSet.cxx:123
 RooDataSet.cxx:124
 RooDataSet.cxx:125
 RooDataSet.cxx:126
 RooDataSet.cxx:127
 RooDataSet.cxx:128
 RooDataSet.cxx:129
 RooDataSet.cxx:130
 RooDataSet.cxx:131
 RooDataSet.cxx:132
 RooDataSet.cxx:133
 RooDataSet.cxx:134
 RooDataSet.cxx:135
 RooDataSet.cxx:136
 RooDataSet.cxx:137
 RooDataSet.cxx:138
 RooDataSet.cxx:139
 RooDataSet.cxx:140
 RooDataSet.cxx:141
 RooDataSet.cxx:142
 RooDataSet.cxx:143
 RooDataSet.cxx:144
 RooDataSet.cxx:145
 RooDataSet.cxx:146
 RooDataSet.cxx:147
 RooDataSet.cxx:148
 RooDataSet.cxx:149
 RooDataSet.cxx:150
 RooDataSet.cxx:151
 RooDataSet.cxx:152
 RooDataSet.cxx:153
 RooDataSet.cxx:154
 RooDataSet.cxx:155
 RooDataSet.cxx:156
 RooDataSet.cxx:157
 RooDataSet.cxx:158
 RooDataSet.cxx:159
 RooDataSet.cxx:160
 RooDataSet.cxx:161
 RooDataSet.cxx:162
 RooDataSet.cxx:163
 RooDataSet.cxx:164
 RooDataSet.cxx:165
 RooDataSet.cxx:166
 RooDataSet.cxx:167
 RooDataSet.cxx:168
 RooDataSet.cxx:169
 RooDataSet.cxx:170
 RooDataSet.cxx:171
 RooDataSet.cxx:172
 RooDataSet.cxx:173
 RooDataSet.cxx:174
 RooDataSet.cxx:175
 RooDataSet.cxx:176
 RooDataSet.cxx:177
 RooDataSet.cxx:178
 RooDataSet.cxx:179
 RooDataSet.cxx:180
 RooDataSet.cxx:181
 RooDataSet.cxx:182
 RooDataSet.cxx:183
 RooDataSet.cxx:184
 RooDataSet.cxx:185
 RooDataSet.cxx:186
 RooDataSet.cxx:187
 RooDataSet.cxx:188
 RooDataSet.cxx:189
 RooDataSet.cxx:190
 RooDataSet.cxx:191
 RooDataSet.cxx:192
 RooDataSet.cxx:193
 RooDataSet.cxx:194
 RooDataSet.cxx:195
 RooDataSet.cxx:196
 RooDataSet.cxx:197
 RooDataSet.cxx:198
 RooDataSet.cxx:199
 RooDataSet.cxx:200
 RooDataSet.cxx:201
 RooDataSet.cxx:202
 RooDataSet.cxx:203
 RooDataSet.cxx:204
 RooDataSet.cxx:205
 RooDataSet.cxx:206
 RooDataSet.cxx:207
 RooDataSet.cxx:208
 RooDataSet.cxx:209
 RooDataSet.cxx:210
 RooDataSet.cxx:211
 RooDataSet.cxx:212
 RooDataSet.cxx:213
 RooDataSet.cxx:214
 RooDataSet.cxx:215
 RooDataSet.cxx:216
 RooDataSet.cxx:217
 RooDataSet.cxx:218
 RooDataSet.cxx:219
 RooDataSet.cxx:220
 RooDataSet.cxx:221
 RooDataSet.cxx:222
 RooDataSet.cxx:223
 RooDataSet.cxx:224
 RooDataSet.cxx:225
 RooDataSet.cxx:226
 RooDataSet.cxx:227
 RooDataSet.cxx:228
 RooDataSet.cxx:229
 RooDataSet.cxx:230
 RooDataSet.cxx:231
 RooDataSet.cxx:232
 RooDataSet.cxx:233
 RooDataSet.cxx:234
 RooDataSet.cxx:235
 RooDataSet.cxx:236
 RooDataSet.cxx:237
 RooDataSet.cxx:238
 RooDataSet.cxx:239
 RooDataSet.cxx:240
 RooDataSet.cxx:241
 RooDataSet.cxx:242
 RooDataSet.cxx:243
 RooDataSet.cxx:244
 RooDataSet.cxx:245
 RooDataSet.cxx:246
 RooDataSet.cxx:247
 RooDataSet.cxx:248
 RooDataSet.cxx:249
 RooDataSet.cxx:250
 RooDataSet.cxx:251
 RooDataSet.cxx:252
 RooDataSet.cxx:253
 RooDataSet.cxx:254
 RooDataSet.cxx:255
 RooDataSet.cxx:256
 RooDataSet.cxx:257
 RooDataSet.cxx:258
 RooDataSet.cxx:259
 RooDataSet.cxx:260
 RooDataSet.cxx:261
 RooDataSet.cxx:262
 RooDataSet.cxx:263
 RooDataSet.cxx:264
 RooDataSet.cxx:265
 RooDataSet.cxx:266
 RooDataSet.cxx:267
 RooDataSet.cxx:268
 RooDataSet.cxx:269
 RooDataSet.cxx:270
 RooDataSet.cxx:271
 RooDataSet.cxx:272
 RooDataSet.cxx:273
 RooDataSet.cxx:274
 RooDataSet.cxx:275
 RooDataSet.cxx:276
 RooDataSet.cxx:277
 RooDataSet.cxx:278
 RooDataSet.cxx:279
 RooDataSet.cxx:280
 RooDataSet.cxx:281
 RooDataSet.cxx:282
 RooDataSet.cxx:283
 RooDataSet.cxx:284
 RooDataSet.cxx:285
 RooDataSet.cxx:286
 RooDataSet.cxx:287
 RooDataSet.cxx:288
 RooDataSet.cxx:289
 RooDataSet.cxx:290
 RooDataSet.cxx:291
 RooDataSet.cxx:292
 RooDataSet.cxx:293
 RooDataSet.cxx:294
 RooDataSet.cxx:295
 RooDataSet.cxx:296
 RooDataSet.cxx:297
 RooDataSet.cxx:298
 RooDataSet.cxx:299
 RooDataSet.cxx:300
 RooDataSet.cxx:301
 RooDataSet.cxx:302
 RooDataSet.cxx:303
 RooDataSet.cxx:304
 RooDataSet.cxx:305
 RooDataSet.cxx:306
 RooDataSet.cxx:307
 RooDataSet.cxx:308
 RooDataSet.cxx:309
 RooDataSet.cxx:310
 RooDataSet.cxx:311
 RooDataSet.cxx:312
 RooDataSet.cxx:313
 RooDataSet.cxx:314
 RooDataSet.cxx:315
 RooDataSet.cxx:316
 RooDataSet.cxx:317
 RooDataSet.cxx:318
 RooDataSet.cxx:319
 RooDataSet.cxx:320
 RooDataSet.cxx:321
 RooDataSet.cxx:322
 RooDataSet.cxx:323
 RooDataSet.cxx:324
 RooDataSet.cxx:325
 RooDataSet.cxx:326
 RooDataSet.cxx:327
 RooDataSet.cxx:328
 RooDataSet.cxx:329
 RooDataSet.cxx:330
 RooDataSet.cxx:331
 RooDataSet.cxx:332
 RooDataSet.cxx:333
 RooDataSet.cxx:334
 RooDataSet.cxx:335
 RooDataSet.cxx:336
 RooDataSet.cxx:337
 RooDataSet.cxx:338
 RooDataSet.cxx:339
 RooDataSet.cxx:340
 RooDataSet.cxx:341
 RooDataSet.cxx:342
 RooDataSet.cxx:343
 RooDataSet.cxx:344
 RooDataSet.cxx:345
 RooDataSet.cxx:346
 RooDataSet.cxx:347
 RooDataSet.cxx:348
 RooDataSet.cxx:349
 RooDataSet.cxx:350
 RooDataSet.cxx:351
 RooDataSet.cxx:352
 RooDataSet.cxx:353
 RooDataSet.cxx:354
 RooDataSet.cxx:355
 RooDataSet.cxx:356
 RooDataSet.cxx:357
 RooDataSet.cxx:358
 RooDataSet.cxx:359
 RooDataSet.cxx:360
 RooDataSet.cxx:361
 RooDataSet.cxx:362
 RooDataSet.cxx:363
 RooDataSet.cxx:364
 RooDataSet.cxx:365
 RooDataSet.cxx:366
 RooDataSet.cxx:367
 RooDataSet.cxx:368
 RooDataSet.cxx:369
 RooDataSet.cxx:370
 RooDataSet.cxx:371
 RooDataSet.cxx:372
 RooDataSet.cxx:373
 RooDataSet.cxx:374
 RooDataSet.cxx:375
 RooDataSet.cxx:376
 RooDataSet.cxx:377
 RooDataSet.cxx:378
 RooDataSet.cxx:379
 RooDataSet.cxx:380
 RooDataSet.cxx:381
 RooDataSet.cxx:382
 RooDataSet.cxx:383
 RooDataSet.cxx:384
 RooDataSet.cxx:385
 RooDataSet.cxx:386
 RooDataSet.cxx:387
 RooDataSet.cxx:388
 RooDataSet.cxx:389
 RooDataSet.cxx:390
 RooDataSet.cxx:391
 RooDataSet.cxx:392
 RooDataSet.cxx:393
 RooDataSet.cxx:394
 RooDataSet.cxx:395
 RooDataSet.cxx:396
 RooDataSet.cxx:397
 RooDataSet.cxx:398
 RooDataSet.cxx:399
 RooDataSet.cxx:400
 RooDataSet.cxx:401
 RooDataSet.cxx:402
 RooDataSet.cxx:403
 RooDataSet.cxx:404
 RooDataSet.cxx:405
 RooDataSet.cxx:406
 RooDataSet.cxx:407
 RooDataSet.cxx:408
 RooDataSet.cxx:409
 RooDataSet.cxx:410
 RooDataSet.cxx:411
 RooDataSet.cxx:412
 RooDataSet.cxx:413
 RooDataSet.cxx:414
 RooDataSet.cxx:415
 RooDataSet.cxx:416
 RooDataSet.cxx:417
 RooDataSet.cxx:418
 RooDataSet.cxx:419
 RooDataSet.cxx:420
 RooDataSet.cxx:421
 RooDataSet.cxx:422
 RooDataSet.cxx:423
 RooDataSet.cxx:424
 RooDataSet.cxx:425
 RooDataSet.cxx:426
 RooDataSet.cxx:427
 RooDataSet.cxx:428
 RooDataSet.cxx:429
 RooDataSet.cxx:430
 RooDataSet.cxx:431
 RooDataSet.cxx:432
 RooDataSet.cxx:433
 RooDataSet.cxx:434
 RooDataSet.cxx:435
 RooDataSet.cxx:436
 RooDataSet.cxx:437
 RooDataSet.cxx:438
 RooDataSet.cxx:439
 RooDataSet.cxx:440
 RooDataSet.cxx:441
 RooDataSet.cxx:442
 RooDataSet.cxx:443
 RooDataSet.cxx:444
 RooDataSet.cxx:445
 RooDataSet.cxx:446
 RooDataSet.cxx:447
 RooDataSet.cxx:448
 RooDataSet.cxx:449
 RooDataSet.cxx:450
 RooDataSet.cxx:451
 RooDataSet.cxx:452
 RooDataSet.cxx:453
 RooDataSet.cxx:454
 RooDataSet.cxx:455
 RooDataSet.cxx:456
 RooDataSet.cxx:457
 RooDataSet.cxx:458
 RooDataSet.cxx:459
 RooDataSet.cxx:460
 RooDataSet.cxx:461
 RooDataSet.cxx:462
 RooDataSet.cxx:463
 RooDataSet.cxx:464
 RooDataSet.cxx:465
 RooDataSet.cxx:466
 RooDataSet.cxx:467
 RooDataSet.cxx:468
 RooDataSet.cxx:469
 RooDataSet.cxx:470
 RooDataSet.cxx:471
 RooDataSet.cxx:472
 RooDataSet.cxx:473
 RooDataSet.cxx:474
 RooDataSet.cxx:475
 RooDataSet.cxx:476
 RooDataSet.cxx:477
 RooDataSet.cxx:478
 RooDataSet.cxx:479
 RooDataSet.cxx:480
 RooDataSet.cxx:481
 RooDataSet.cxx:482
 RooDataSet.cxx:483
 RooDataSet.cxx:484
 RooDataSet.cxx:485
 RooDataSet.cxx:486
 RooDataSet.cxx:487
 RooDataSet.cxx:488
 RooDataSet.cxx:489
 RooDataSet.cxx:490
 RooDataSet.cxx:491
 RooDataSet.cxx:492
 RooDataSet.cxx:493
 RooDataSet.cxx:494
 RooDataSet.cxx:495
 RooDataSet.cxx:496
 RooDataSet.cxx:497
 RooDataSet.cxx:498
 RooDataSet.cxx:499
 RooDataSet.cxx:500
 RooDataSet.cxx:501
 RooDataSet.cxx:502
 RooDataSet.cxx:503
 RooDataSet.cxx:504
 RooDataSet.cxx:505
 RooDataSet.cxx:506
 RooDataSet.cxx:507
 RooDataSet.cxx:508
 RooDataSet.cxx:509
 RooDataSet.cxx:510
 RooDataSet.cxx:511
 RooDataSet.cxx:512
 RooDataSet.cxx:513
 RooDataSet.cxx:514
 RooDataSet.cxx:515
 RooDataSet.cxx:516
 RooDataSet.cxx:517
 RooDataSet.cxx:518
 RooDataSet.cxx:519
 RooDataSet.cxx:520
 RooDataSet.cxx:521
 RooDataSet.cxx:522
 RooDataSet.cxx:523
 RooDataSet.cxx:524
 RooDataSet.cxx:525
 RooDataSet.cxx:526
 RooDataSet.cxx:527
 RooDataSet.cxx:528
 RooDataSet.cxx:529
 RooDataSet.cxx:530
 RooDataSet.cxx:531
 RooDataSet.cxx:532
 RooDataSet.cxx:533
 RooDataSet.cxx:534
 RooDataSet.cxx:535
 RooDataSet.cxx:536
 RooDataSet.cxx:537
 RooDataSet.cxx:538
 RooDataSet.cxx:539
 RooDataSet.cxx:540
 RooDataSet.cxx:541
 RooDataSet.cxx:542
 RooDataSet.cxx:543
 RooDataSet.cxx:544
 RooDataSet.cxx:545
 RooDataSet.cxx:546
 RooDataSet.cxx:547
 RooDataSet.cxx:548
 RooDataSet.cxx:549
 RooDataSet.cxx:550
 RooDataSet.cxx:551
 RooDataSet.cxx:552
 RooDataSet.cxx:553
 RooDataSet.cxx:554
 RooDataSet.cxx:555
 RooDataSet.cxx:556
 RooDataSet.cxx:557
 RooDataSet.cxx:558
 RooDataSet.cxx:559
 RooDataSet.cxx:560
 RooDataSet.cxx:561
 RooDataSet.cxx:562
 RooDataSet.cxx:563
 RooDataSet.cxx:564
 RooDataSet.cxx:565
 RooDataSet.cxx:566
 RooDataSet.cxx:567
 RooDataSet.cxx:568
 RooDataSet.cxx:569
 RooDataSet.cxx:570
 RooDataSet.cxx:571
 RooDataSet.cxx:572
 RooDataSet.cxx:573
 RooDataSet.cxx:574
 RooDataSet.cxx:575
 RooDataSet.cxx:576
 RooDataSet.cxx:577
 RooDataSet.cxx:578
 RooDataSet.cxx:579
 RooDataSet.cxx:580
 RooDataSet.cxx:581
 RooDataSet.cxx:582
 RooDataSet.cxx:583
 RooDataSet.cxx:584
 RooDataSet.cxx:585
 RooDataSet.cxx:586
 RooDataSet.cxx:587
 RooDataSet.cxx:588
 RooDataSet.cxx:589
 RooDataSet.cxx:590
 RooDataSet.cxx:591
 RooDataSet.cxx:592
 RooDataSet.cxx:593
 RooDataSet.cxx:594
 RooDataSet.cxx:595
 RooDataSet.cxx:596
 RooDataSet.cxx:597
 RooDataSet.cxx:598
 RooDataSet.cxx:599
 RooDataSet.cxx:600
 RooDataSet.cxx:601
 RooDataSet.cxx:602
 RooDataSet.cxx:603
 RooDataSet.cxx:604
 RooDataSet.cxx:605
 RooDataSet.cxx:606
 RooDataSet.cxx:607
 RooDataSet.cxx:608
 RooDataSet.cxx:609
 RooDataSet.cxx:610
 RooDataSet.cxx:611
 RooDataSet.cxx:612
 RooDataSet.cxx:613
 RooDataSet.cxx:614
 RooDataSet.cxx:615
 RooDataSet.cxx:616
 RooDataSet.cxx:617
 RooDataSet.cxx:618
 RooDataSet.cxx:619
 RooDataSet.cxx:620
 RooDataSet.cxx:621
 RooDataSet.cxx:622
 RooDataSet.cxx:623
 RooDataSet.cxx:624
 RooDataSet.cxx:625
 RooDataSet.cxx:626
 RooDataSet.cxx:627
 RooDataSet.cxx:628
 RooDataSet.cxx:629
 RooDataSet.cxx:630
 RooDataSet.cxx:631
 RooDataSet.cxx:632
 RooDataSet.cxx:633
 RooDataSet.cxx:634
 RooDataSet.cxx:635
 RooDataSet.cxx:636
 RooDataSet.cxx:637
 RooDataSet.cxx:638
 RooDataSet.cxx:639
 RooDataSet.cxx:640
 RooDataSet.cxx:641
 RooDataSet.cxx:642
 RooDataSet.cxx:643
 RooDataSet.cxx:644
 RooDataSet.cxx:645
 RooDataSet.cxx:646
 RooDataSet.cxx:647
 RooDataSet.cxx:648
 RooDataSet.cxx:649
 RooDataSet.cxx:650
 RooDataSet.cxx:651
 RooDataSet.cxx:652
 RooDataSet.cxx:653
 RooDataSet.cxx:654
 RooDataSet.cxx:655
 RooDataSet.cxx:656
 RooDataSet.cxx:657
 RooDataSet.cxx:658
 RooDataSet.cxx:659
 RooDataSet.cxx:660
 RooDataSet.cxx:661
 RooDataSet.cxx:662
 RooDataSet.cxx:663
 RooDataSet.cxx:664
 RooDataSet.cxx:665
 RooDataSet.cxx:666
 RooDataSet.cxx:667
 RooDataSet.cxx:668
 RooDataSet.cxx:669
 RooDataSet.cxx:670
 RooDataSet.cxx:671
 RooDataSet.cxx:672
 RooDataSet.cxx:673
 RooDataSet.cxx:674
 RooDataSet.cxx:675
 RooDataSet.cxx:676
 RooDataSet.cxx:677
 RooDataSet.cxx:678
 RooDataSet.cxx:679
 RooDataSet.cxx:680
 RooDataSet.cxx:681
 RooDataSet.cxx:682
 RooDataSet.cxx:683
 RooDataSet.cxx:684
 RooDataSet.cxx:685
 RooDataSet.cxx:686
 RooDataSet.cxx:687
 RooDataSet.cxx:688
 RooDataSet.cxx:689
 RooDataSet.cxx:690
 RooDataSet.cxx:691
 RooDataSet.cxx:692
 RooDataSet.cxx:693
 RooDataSet.cxx:694
 RooDataSet.cxx:695
 RooDataSet.cxx:696
 RooDataSet.cxx:697
 RooDataSet.cxx:698
 RooDataSet.cxx:699
 RooDataSet.cxx:700
 RooDataSet.cxx:701
 RooDataSet.cxx:702
 RooDataSet.cxx:703
 RooDataSet.cxx:704
 RooDataSet.cxx:705
 RooDataSet.cxx:706
 RooDataSet.cxx:707
 RooDataSet.cxx:708
 RooDataSet.cxx:709
 RooDataSet.cxx:710
 RooDataSet.cxx:711
 RooDataSet.cxx:712
 RooDataSet.cxx:713
 RooDataSet.cxx:714
 RooDataSet.cxx:715
 RooDataSet.cxx:716
 RooDataSet.cxx:717
 RooDataSet.cxx:718
 RooDataSet.cxx:719
 RooDataSet.cxx:720
 RooDataSet.cxx:721
 RooDataSet.cxx:722
 RooDataSet.cxx:723
 RooDataSet.cxx:724
 RooDataSet.cxx:725
 RooDataSet.cxx:726
 RooDataSet.cxx:727
 RooDataSet.cxx:728
 RooDataSet.cxx:729
 RooDataSet.cxx:730
 RooDataSet.cxx:731
 RooDataSet.cxx:732
 RooDataSet.cxx:733
 RooDataSet.cxx:734
 RooDataSet.cxx:735
 RooDataSet.cxx:736
 RooDataSet.cxx:737
 RooDataSet.cxx:738
 RooDataSet.cxx:739
 RooDataSet.cxx:740
 RooDataSet.cxx:741
 RooDataSet.cxx:742
 RooDataSet.cxx:743
 RooDataSet.cxx:744
 RooDataSet.cxx:745
 RooDataSet.cxx:746
 RooDataSet.cxx:747
 RooDataSet.cxx:748
 RooDataSet.cxx:749
 RooDataSet.cxx:750
 RooDataSet.cxx:751
 RooDataSet.cxx:752
 RooDataSet.cxx:753
 RooDataSet.cxx:754
 RooDataSet.cxx:755
 RooDataSet.cxx:756
 RooDataSet.cxx:757
 RooDataSet.cxx:758
 RooDataSet.cxx:759
 RooDataSet.cxx:760
 RooDataSet.cxx:761
 RooDataSet.cxx:762
 RooDataSet.cxx:763
 RooDataSet.cxx:764
 RooDataSet.cxx:765
 RooDataSet.cxx:766
 RooDataSet.cxx:767
 RooDataSet.cxx:768
 RooDataSet.cxx:769
 RooDataSet.cxx:770
 RooDataSet.cxx:771
 RooDataSet.cxx:772
 RooDataSet.cxx:773
 RooDataSet.cxx:774
 RooDataSet.cxx:775
 RooDataSet.cxx:776
 RooDataSet.cxx:777
 RooDataSet.cxx:778
 RooDataSet.cxx:779
 RooDataSet.cxx:780
 RooDataSet.cxx:781
 RooDataSet.cxx:782
 RooDataSet.cxx:783
 RooDataSet.cxx:784
 RooDataSet.cxx:785
 RooDataSet.cxx:786
 RooDataSet.cxx:787
 RooDataSet.cxx:788
 RooDataSet.cxx:789
 RooDataSet.cxx:790
 RooDataSet.cxx:791
 RooDataSet.cxx:792
 RooDataSet.cxx:793
 RooDataSet.cxx:794
 RooDataSet.cxx:795
 RooDataSet.cxx:796
 RooDataSet.cxx:797
 RooDataSet.cxx:798
 RooDataSet.cxx:799
 RooDataSet.cxx:800
 RooDataSet.cxx:801
 RooDataSet.cxx:802
 RooDataSet.cxx:803
 RooDataSet.cxx:804
 RooDataSet.cxx:805
 RooDataSet.cxx:806
 RooDataSet.cxx:807
 RooDataSet.cxx:808
 RooDataSet.cxx:809
 RooDataSet.cxx:810
 RooDataSet.cxx:811
 RooDataSet.cxx:812
 RooDataSet.cxx:813
 RooDataSet.cxx:814
 RooDataSet.cxx:815
 RooDataSet.cxx:816
 RooDataSet.cxx:817
 RooDataSet.cxx:818
 RooDataSet.cxx:819
 RooDataSet.cxx:820
 RooDataSet.cxx:821
 RooDataSet.cxx:822
 RooDataSet.cxx:823
 RooDataSet.cxx:824
 RooDataSet.cxx:825
 RooDataSet.cxx:826
 RooDataSet.cxx:827
 RooDataSet.cxx:828
 RooDataSet.cxx:829
 RooDataSet.cxx:830
 RooDataSet.cxx:831
 RooDataSet.cxx:832
 RooDataSet.cxx:833
 RooDataSet.cxx:834
 RooDataSet.cxx:835
 RooDataSet.cxx:836
 RooDataSet.cxx:837
 RooDataSet.cxx:838
 RooDataSet.cxx:839
 RooDataSet.cxx:840
 RooDataSet.cxx:841
 RooDataSet.cxx:842
 RooDataSet.cxx:843
 RooDataSet.cxx:844
 RooDataSet.cxx:845
 RooDataSet.cxx:846
 RooDataSet.cxx:847
 RooDataSet.cxx:848
 RooDataSet.cxx:849
 RooDataSet.cxx:850
 RooDataSet.cxx:851
 RooDataSet.cxx:852
 RooDataSet.cxx:853
 RooDataSet.cxx:854
 RooDataSet.cxx:855
 RooDataSet.cxx:856
 RooDataSet.cxx:857
 RooDataSet.cxx:858
 RooDataSet.cxx:859
 RooDataSet.cxx:860
 RooDataSet.cxx:861
 RooDataSet.cxx:862
 RooDataSet.cxx:863
 RooDataSet.cxx:864
 RooDataSet.cxx:865
 RooDataSet.cxx:866
 RooDataSet.cxx:867
 RooDataSet.cxx:868
 RooDataSet.cxx:869
 RooDataSet.cxx:870
 RooDataSet.cxx:871
 RooDataSet.cxx:872
 RooDataSet.cxx:873
 RooDataSet.cxx:874
 RooDataSet.cxx:875
 RooDataSet.cxx:876
 RooDataSet.cxx:877
 RooDataSet.cxx:878
 RooDataSet.cxx:879
 RooDataSet.cxx:880
 RooDataSet.cxx:881
 RooDataSet.cxx:882
 RooDataSet.cxx:883
 RooDataSet.cxx:884
 RooDataSet.cxx:885
 RooDataSet.cxx:886
 RooDataSet.cxx:887
 RooDataSet.cxx:888
 RooDataSet.cxx:889
 RooDataSet.cxx:890
 RooDataSet.cxx:891
 RooDataSet.cxx:892
 RooDataSet.cxx:893
 RooDataSet.cxx:894
 RooDataSet.cxx:895
 RooDataSet.cxx:896
 RooDataSet.cxx:897
 RooDataSet.cxx:898
 RooDataSet.cxx:899
 RooDataSet.cxx:900
 RooDataSet.cxx:901
 RooDataSet.cxx:902
 RooDataSet.cxx:903
 RooDataSet.cxx:904
 RooDataSet.cxx:905
 RooDataSet.cxx:906
 RooDataSet.cxx:907
 RooDataSet.cxx:908
 RooDataSet.cxx:909
 RooDataSet.cxx:910
 RooDataSet.cxx:911
 RooDataSet.cxx:912
 RooDataSet.cxx:913
 RooDataSet.cxx:914
 RooDataSet.cxx:915
 RooDataSet.cxx:916
 RooDataSet.cxx:917
 RooDataSet.cxx:918
 RooDataSet.cxx:919
 RooDataSet.cxx:920
 RooDataSet.cxx:921
 RooDataSet.cxx:922
 RooDataSet.cxx:923
 RooDataSet.cxx:924
 RooDataSet.cxx:925
 RooDataSet.cxx:926
 RooDataSet.cxx:927
 RooDataSet.cxx:928
 RooDataSet.cxx:929
 RooDataSet.cxx:930
 RooDataSet.cxx:931
 RooDataSet.cxx:932
 RooDataSet.cxx:933
 RooDataSet.cxx:934
 RooDataSet.cxx:935
 RooDataSet.cxx:936
 RooDataSet.cxx:937
 RooDataSet.cxx:938
 RooDataSet.cxx:939
 RooDataSet.cxx:940
 RooDataSet.cxx:941
 RooDataSet.cxx:942
 RooDataSet.cxx:943
 RooDataSet.cxx:944
 RooDataSet.cxx:945
 RooDataSet.cxx:946
 RooDataSet.cxx:947
 RooDataSet.cxx:948
 RooDataSet.cxx:949
 RooDataSet.cxx:950
 RooDataSet.cxx:951
 RooDataSet.cxx:952
 RooDataSet.cxx:953
 RooDataSet.cxx:954
 RooDataSet.cxx:955
 RooDataSet.cxx:956
 RooDataSet.cxx:957
 RooDataSet.cxx:958
 RooDataSet.cxx:959
 RooDataSet.cxx:960
 RooDataSet.cxx:961
 RooDataSet.cxx:962
 RooDataSet.cxx:963
 RooDataSet.cxx:964
 RooDataSet.cxx:965
 RooDataSet.cxx:966
 RooDataSet.cxx:967
 RooDataSet.cxx:968
 RooDataSet.cxx:969
 RooDataSet.cxx:970
 RooDataSet.cxx:971
 RooDataSet.cxx:972
 RooDataSet.cxx:973
 RooDataSet.cxx:974
 RooDataSet.cxx:975
 RooDataSet.cxx:976
 RooDataSet.cxx:977
 RooDataSet.cxx:978
 RooDataSet.cxx:979
 RooDataSet.cxx:980
 RooDataSet.cxx:981
 RooDataSet.cxx:982
 RooDataSet.cxx:983
 RooDataSet.cxx:984
 RooDataSet.cxx:985
 RooDataSet.cxx:986
 RooDataSet.cxx:987
 RooDataSet.cxx:988
 RooDataSet.cxx:989
 RooDataSet.cxx:990
 RooDataSet.cxx:991
 RooDataSet.cxx:992
 RooDataSet.cxx:993
 RooDataSet.cxx:994
 RooDataSet.cxx:995
 RooDataSet.cxx:996
 RooDataSet.cxx:997
 RooDataSet.cxx:998
 RooDataSet.cxx:999
 RooDataSet.cxx:1000
 RooDataSet.cxx:1001
 RooDataSet.cxx:1002
 RooDataSet.cxx:1003
 RooDataSet.cxx:1004
 RooDataSet.cxx:1005
 RooDataSet.cxx:1006
 RooDataSet.cxx:1007
 RooDataSet.cxx:1008
 RooDataSet.cxx:1009
 RooDataSet.cxx:1010
 RooDataSet.cxx:1011
 RooDataSet.cxx:1012
 RooDataSet.cxx:1013
 RooDataSet.cxx:1014
 RooDataSet.cxx:1015
 RooDataSet.cxx:1016
 RooDataSet.cxx:1017
 RooDataSet.cxx:1018
 RooDataSet.cxx:1019
 RooDataSet.cxx:1020
 RooDataSet.cxx:1021
 RooDataSet.cxx:1022
 RooDataSet.cxx:1023
 RooDataSet.cxx:1024
 RooDataSet.cxx:1025
 RooDataSet.cxx:1026
 RooDataSet.cxx:1027
 RooDataSet.cxx:1028
 RooDataSet.cxx:1029
 RooDataSet.cxx:1030
 RooDataSet.cxx:1031
 RooDataSet.cxx:1032
 RooDataSet.cxx:1033
 RooDataSet.cxx:1034
 RooDataSet.cxx:1035
 RooDataSet.cxx:1036
 RooDataSet.cxx:1037
 RooDataSet.cxx:1038
 RooDataSet.cxx:1039
 RooDataSet.cxx:1040
 RooDataSet.cxx:1041
 RooDataSet.cxx:1042
 RooDataSet.cxx:1043
 RooDataSet.cxx:1044
 RooDataSet.cxx:1045
 RooDataSet.cxx:1046
 RooDataSet.cxx:1047
 RooDataSet.cxx:1048
 RooDataSet.cxx:1049
 RooDataSet.cxx:1050
 RooDataSet.cxx:1051
 RooDataSet.cxx:1052
 RooDataSet.cxx:1053
 RooDataSet.cxx:1054
 RooDataSet.cxx:1055
 RooDataSet.cxx:1056
 RooDataSet.cxx:1057
 RooDataSet.cxx:1058
 RooDataSet.cxx:1059
 RooDataSet.cxx:1060
 RooDataSet.cxx:1061
 RooDataSet.cxx:1062
 RooDataSet.cxx:1063
 RooDataSet.cxx:1064
 RooDataSet.cxx:1065
 RooDataSet.cxx:1066
 RooDataSet.cxx:1067
 RooDataSet.cxx:1068
 RooDataSet.cxx:1069
 RooDataSet.cxx:1070
 RooDataSet.cxx:1071
 RooDataSet.cxx:1072
 RooDataSet.cxx:1073
 RooDataSet.cxx:1074
 RooDataSet.cxx:1075
 RooDataSet.cxx:1076
 RooDataSet.cxx:1077
 RooDataSet.cxx:1078
 RooDataSet.cxx:1079
 RooDataSet.cxx:1080
 RooDataSet.cxx:1081
 RooDataSet.cxx:1082
 RooDataSet.cxx:1083
 RooDataSet.cxx:1084
 RooDataSet.cxx:1085
 RooDataSet.cxx:1086
 RooDataSet.cxx:1087
 RooDataSet.cxx:1088
 RooDataSet.cxx:1089
 RooDataSet.cxx:1090
 RooDataSet.cxx:1091
 RooDataSet.cxx:1092
 RooDataSet.cxx:1093
 RooDataSet.cxx:1094
 RooDataSet.cxx:1095
 RooDataSet.cxx:1096
 RooDataSet.cxx:1097
 RooDataSet.cxx:1098
 RooDataSet.cxx:1099
 RooDataSet.cxx:1100
 RooDataSet.cxx:1101
 RooDataSet.cxx:1102
 RooDataSet.cxx:1103
 RooDataSet.cxx:1104
 RooDataSet.cxx:1105
 RooDataSet.cxx:1106
 RooDataSet.cxx:1107
 RooDataSet.cxx:1108
 RooDataSet.cxx:1109
 RooDataSet.cxx:1110
 RooDataSet.cxx:1111
 RooDataSet.cxx:1112
 RooDataSet.cxx:1113
 RooDataSet.cxx:1114
 RooDataSet.cxx:1115
 RooDataSet.cxx:1116
 RooDataSet.cxx:1117
 RooDataSet.cxx:1118
 RooDataSet.cxx:1119
 RooDataSet.cxx:1120
 RooDataSet.cxx:1121
 RooDataSet.cxx:1122
 RooDataSet.cxx:1123
 RooDataSet.cxx:1124
 RooDataSet.cxx:1125
 RooDataSet.cxx:1126
 RooDataSet.cxx:1127
 RooDataSet.cxx:1128
 RooDataSet.cxx:1129
 RooDataSet.cxx:1130
 RooDataSet.cxx:1131
 RooDataSet.cxx:1132
 RooDataSet.cxx:1133
 RooDataSet.cxx:1134
 RooDataSet.cxx:1135
 RooDataSet.cxx:1136
 RooDataSet.cxx:1137
 RooDataSet.cxx:1138
 RooDataSet.cxx:1139
 RooDataSet.cxx:1140
 RooDataSet.cxx:1141
 RooDataSet.cxx:1142
 RooDataSet.cxx:1143
 RooDataSet.cxx:1144
 RooDataSet.cxx:1145
 RooDataSet.cxx:1146
 RooDataSet.cxx:1147
 RooDataSet.cxx:1148
 RooDataSet.cxx:1149
 RooDataSet.cxx:1150
 RooDataSet.cxx:1151
 RooDataSet.cxx:1152
 RooDataSet.cxx:1153
 RooDataSet.cxx:1154
 RooDataSet.cxx:1155
 RooDataSet.cxx:1156
 RooDataSet.cxx:1157
 RooDataSet.cxx:1158
 RooDataSet.cxx:1159
 RooDataSet.cxx:1160
 RooDataSet.cxx:1161
 RooDataSet.cxx:1162
 RooDataSet.cxx:1163
 RooDataSet.cxx:1164
 RooDataSet.cxx:1165
 RooDataSet.cxx:1166
 RooDataSet.cxx:1167
 RooDataSet.cxx:1168
 RooDataSet.cxx:1169
 RooDataSet.cxx:1170
 RooDataSet.cxx:1171
 RooDataSet.cxx:1172
 RooDataSet.cxx:1173
 RooDataSet.cxx:1174
 RooDataSet.cxx:1175
 RooDataSet.cxx:1176
 RooDataSet.cxx:1177
 RooDataSet.cxx:1178
 RooDataSet.cxx:1179
 RooDataSet.cxx:1180
 RooDataSet.cxx:1181
 RooDataSet.cxx:1182
 RooDataSet.cxx:1183
 RooDataSet.cxx:1184
 RooDataSet.cxx:1185
 RooDataSet.cxx:1186
 RooDataSet.cxx:1187
 RooDataSet.cxx:1188
 RooDataSet.cxx:1189
 RooDataSet.cxx:1190
 RooDataSet.cxx:1191
 RooDataSet.cxx:1192
 RooDataSet.cxx:1193
 RooDataSet.cxx:1194
 RooDataSet.cxx:1195
 RooDataSet.cxx:1196
 RooDataSet.cxx:1197
 RooDataSet.cxx:1198
 RooDataSet.cxx:1199
 RooDataSet.cxx:1200
 RooDataSet.cxx:1201
 RooDataSet.cxx:1202
 RooDataSet.cxx:1203
 RooDataSet.cxx:1204
 RooDataSet.cxx:1205
 RooDataSet.cxx:1206
 RooDataSet.cxx:1207
 RooDataSet.cxx:1208
 RooDataSet.cxx:1209
 RooDataSet.cxx:1210
 RooDataSet.cxx:1211
 RooDataSet.cxx:1212
 RooDataSet.cxx:1213
 RooDataSet.cxx:1214
 RooDataSet.cxx:1215
 RooDataSet.cxx:1216
 RooDataSet.cxx:1217
 RooDataSet.cxx:1218
 RooDataSet.cxx:1219
 RooDataSet.cxx:1220
 RooDataSet.cxx:1221
 RooDataSet.cxx:1222
 RooDataSet.cxx:1223
 RooDataSet.cxx:1224
 RooDataSet.cxx:1225
 RooDataSet.cxx:1226
 RooDataSet.cxx:1227
 RooDataSet.cxx:1228
 RooDataSet.cxx:1229
 RooDataSet.cxx:1230
 RooDataSet.cxx:1231
 RooDataSet.cxx:1232
 RooDataSet.cxx:1233
 RooDataSet.cxx:1234
 RooDataSet.cxx:1235
 RooDataSet.cxx:1236
 RooDataSet.cxx:1237
 RooDataSet.cxx:1238
 RooDataSet.cxx:1239
 RooDataSet.cxx:1240
 RooDataSet.cxx:1241
 RooDataSet.cxx:1242
 RooDataSet.cxx:1243
 RooDataSet.cxx:1244
 RooDataSet.cxx:1245
 RooDataSet.cxx:1246
 RooDataSet.cxx:1247
 RooDataSet.cxx:1248
 RooDataSet.cxx:1249
 RooDataSet.cxx:1250
 RooDataSet.cxx:1251
 RooDataSet.cxx:1252
 RooDataSet.cxx:1253
 RooDataSet.cxx:1254
 RooDataSet.cxx:1255
 RooDataSet.cxx:1256
 RooDataSet.cxx:1257
 RooDataSet.cxx:1258
 RooDataSet.cxx:1259
 RooDataSet.cxx:1260
 RooDataSet.cxx:1261
 RooDataSet.cxx:1262
 RooDataSet.cxx:1263
 RooDataSet.cxx:1264
 RooDataSet.cxx:1265
 RooDataSet.cxx:1266
 RooDataSet.cxx:1267
 RooDataSet.cxx:1268
 RooDataSet.cxx:1269
 RooDataSet.cxx:1270
 RooDataSet.cxx:1271
 RooDataSet.cxx:1272
 RooDataSet.cxx:1273
 RooDataSet.cxx:1274
 RooDataSet.cxx:1275
 RooDataSet.cxx:1276
 RooDataSet.cxx:1277
 RooDataSet.cxx:1278
 RooDataSet.cxx:1279
 RooDataSet.cxx:1280
 RooDataSet.cxx:1281
 RooDataSet.cxx:1282
 RooDataSet.cxx:1283
 RooDataSet.cxx:1284
 RooDataSet.cxx:1285
 RooDataSet.cxx:1286
 RooDataSet.cxx:1287
 RooDataSet.cxx:1288
 RooDataSet.cxx:1289
 RooDataSet.cxx:1290
 RooDataSet.cxx:1291
 RooDataSet.cxx:1292
 RooDataSet.cxx:1293
 RooDataSet.cxx:1294
 RooDataSet.cxx:1295
 RooDataSet.cxx:1296
 RooDataSet.cxx:1297
 RooDataSet.cxx:1298
 RooDataSet.cxx:1299
 RooDataSet.cxx:1300
 RooDataSet.cxx:1301
 RooDataSet.cxx:1302
 RooDataSet.cxx:1303
 RooDataSet.cxx:1304
 RooDataSet.cxx:1305
 RooDataSet.cxx:1306
 RooDataSet.cxx:1307
 RooDataSet.cxx:1308
 RooDataSet.cxx:1309
 RooDataSet.cxx:1310
 RooDataSet.cxx:1311
 RooDataSet.cxx:1312
 RooDataSet.cxx:1313
 RooDataSet.cxx:1314
 RooDataSet.cxx:1315
 RooDataSet.cxx:1316
 RooDataSet.cxx:1317
 RooDataSet.cxx:1318
 RooDataSet.cxx:1319
 RooDataSet.cxx:1320
 RooDataSet.cxx:1321
 RooDataSet.cxx:1322
 RooDataSet.cxx:1323
 RooDataSet.cxx:1324
 RooDataSet.cxx:1325
 RooDataSet.cxx:1326
 RooDataSet.cxx:1327
 RooDataSet.cxx:1328
 RooDataSet.cxx:1329
 RooDataSet.cxx:1330
 RooDataSet.cxx:1331
 RooDataSet.cxx:1332
 RooDataSet.cxx:1333
 RooDataSet.cxx:1334
 RooDataSet.cxx:1335
 RooDataSet.cxx:1336
 RooDataSet.cxx:1337
 RooDataSet.cxx:1338
 RooDataSet.cxx:1339
 RooDataSet.cxx:1340
 RooDataSet.cxx:1341
 RooDataSet.cxx:1342
 RooDataSet.cxx:1343
 RooDataSet.cxx:1344
 RooDataSet.cxx:1345
 RooDataSet.cxx:1346
 RooDataSet.cxx:1347
 RooDataSet.cxx:1348
 RooDataSet.cxx:1349
 RooDataSet.cxx:1350
 RooDataSet.cxx:1351
 RooDataSet.cxx:1352
 RooDataSet.cxx:1353
 RooDataSet.cxx:1354
 RooDataSet.cxx:1355
 RooDataSet.cxx:1356
 RooDataSet.cxx:1357
 RooDataSet.cxx:1358
 RooDataSet.cxx:1359
 RooDataSet.cxx:1360
 RooDataSet.cxx:1361
 RooDataSet.cxx:1362
 RooDataSet.cxx:1363
 RooDataSet.cxx:1364
 RooDataSet.cxx:1365
 RooDataSet.cxx:1366
 RooDataSet.cxx:1367
 RooDataSet.cxx:1368
 RooDataSet.cxx:1369
 RooDataSet.cxx:1370
 RooDataSet.cxx:1371
 RooDataSet.cxx:1372
 RooDataSet.cxx:1373
 RooDataSet.cxx:1374
 RooDataSet.cxx:1375
 RooDataSet.cxx:1376
 RooDataSet.cxx:1377
 RooDataSet.cxx:1378
 RooDataSet.cxx:1379
 RooDataSet.cxx:1380
 RooDataSet.cxx:1381
 RooDataSet.cxx:1382
 RooDataSet.cxx:1383
 RooDataSet.cxx:1384
 RooDataSet.cxx:1385
 RooDataSet.cxx:1386
 RooDataSet.cxx:1387
 RooDataSet.cxx:1388
 RooDataSet.cxx:1389
 RooDataSet.cxx:1390
 RooDataSet.cxx:1391
 RooDataSet.cxx:1392
 RooDataSet.cxx:1393
 RooDataSet.cxx:1394
 RooDataSet.cxx:1395
 RooDataSet.cxx:1396
 RooDataSet.cxx:1397
 RooDataSet.cxx:1398
 RooDataSet.cxx:1399
 RooDataSet.cxx:1400
 RooDataSet.cxx:1401
 RooDataSet.cxx:1402
 RooDataSet.cxx:1403
 RooDataSet.cxx:1404
 RooDataSet.cxx:1405
 RooDataSet.cxx:1406
 RooDataSet.cxx:1407
 RooDataSet.cxx:1408
 RooDataSet.cxx:1409
 RooDataSet.cxx:1410
 RooDataSet.cxx:1411
 RooDataSet.cxx:1412
 RooDataSet.cxx:1413
 RooDataSet.cxx:1414
 RooDataSet.cxx:1415
 RooDataSet.cxx:1416
 RooDataSet.cxx:1417
 RooDataSet.cxx:1418
 RooDataSet.cxx:1419
 RooDataSet.cxx:1420
 RooDataSet.cxx:1421
 RooDataSet.cxx:1422
 RooDataSet.cxx:1423
 RooDataSet.cxx:1424
 RooDataSet.cxx:1425
 RooDataSet.cxx:1426
 RooDataSet.cxx:1427
 RooDataSet.cxx:1428
 RooDataSet.cxx:1429
 RooDataSet.cxx:1430
 RooDataSet.cxx:1431
 RooDataSet.cxx:1432
 RooDataSet.cxx:1433
 RooDataSet.cxx:1434
 RooDataSet.cxx:1435
 RooDataSet.cxx:1436
 RooDataSet.cxx:1437
 RooDataSet.cxx:1438
 RooDataSet.cxx:1439
 RooDataSet.cxx:1440
 RooDataSet.cxx:1441
 RooDataSet.cxx:1442
 RooDataSet.cxx:1443
 RooDataSet.cxx:1444
 RooDataSet.cxx:1445
 RooDataSet.cxx:1446
 RooDataSet.cxx:1447
 RooDataSet.cxx:1448
 RooDataSet.cxx:1449
 RooDataSet.cxx:1450
 RooDataSet.cxx:1451
 RooDataSet.cxx:1452
 RooDataSet.cxx:1453
 RooDataSet.cxx:1454
 RooDataSet.cxx:1455
 RooDataSet.cxx:1456
 RooDataSet.cxx:1457
 RooDataSet.cxx:1458
 RooDataSet.cxx:1459
 RooDataSet.cxx:1460
 RooDataSet.cxx:1461
 RooDataSet.cxx:1462
 RooDataSet.cxx:1463
 RooDataSet.cxx:1464
 RooDataSet.cxx:1465
 RooDataSet.cxx:1466
 RooDataSet.cxx:1467
 RooDataSet.cxx:1468
 RooDataSet.cxx:1469
 RooDataSet.cxx:1470
 RooDataSet.cxx:1471
 RooDataSet.cxx:1472
 RooDataSet.cxx:1473
 RooDataSet.cxx:1474
 RooDataSet.cxx:1475
 RooDataSet.cxx:1476
 RooDataSet.cxx:1477
 RooDataSet.cxx:1478
 RooDataSet.cxx:1479
 RooDataSet.cxx:1480
 RooDataSet.cxx:1481
 RooDataSet.cxx:1482
 RooDataSet.cxx:1483
 RooDataSet.cxx:1484
 RooDataSet.cxx:1485
 RooDataSet.cxx:1486
 RooDataSet.cxx:1487
 RooDataSet.cxx:1488
 RooDataSet.cxx:1489
 RooDataSet.cxx:1490
 RooDataSet.cxx:1491
 RooDataSet.cxx:1492
 RooDataSet.cxx:1493
 RooDataSet.cxx:1494
 RooDataSet.cxx:1495
 RooDataSet.cxx:1496
 RooDataSet.cxx:1497
 RooDataSet.cxx:1498
 RooDataSet.cxx:1499
 RooDataSet.cxx:1500
 RooDataSet.cxx:1501
 RooDataSet.cxx:1502
 RooDataSet.cxx:1503
 RooDataSet.cxx:1504
 RooDataSet.cxx:1505
 RooDataSet.cxx:1506
 RooDataSet.cxx:1507
 RooDataSet.cxx:1508
 RooDataSet.cxx:1509
 RooDataSet.cxx:1510
 RooDataSet.cxx:1511
 RooDataSet.cxx:1512
 RooDataSet.cxx:1513
 RooDataSet.cxx:1514
 RooDataSet.cxx:1515
 RooDataSet.cxx:1516
 RooDataSet.cxx:1517
 RooDataSet.cxx:1518
 RooDataSet.cxx:1519
 RooDataSet.cxx:1520
 RooDataSet.cxx:1521
 RooDataSet.cxx:1522
 RooDataSet.cxx:1523
 RooDataSet.cxx:1524
 RooDataSet.cxx:1525
 RooDataSet.cxx:1526
 RooDataSet.cxx:1527
 RooDataSet.cxx:1528
 RooDataSet.cxx:1529
 RooDataSet.cxx:1530
 RooDataSet.cxx:1531
 RooDataSet.cxx:1532
 RooDataSet.cxx:1533
 RooDataSet.cxx:1534
 RooDataSet.cxx:1535
 RooDataSet.cxx:1536
 RooDataSet.cxx:1537
 RooDataSet.cxx:1538
 RooDataSet.cxx:1539
 RooDataSet.cxx:1540
 RooDataSet.cxx:1541
 RooDataSet.cxx:1542
 RooDataSet.cxx:1543
 RooDataSet.cxx:1544
 RooDataSet.cxx:1545
 RooDataSet.cxx:1546
 RooDataSet.cxx:1547
 RooDataSet.cxx:1548
 RooDataSet.cxx:1549
 RooDataSet.cxx:1550
 RooDataSet.cxx:1551
 RooDataSet.cxx:1552
 RooDataSet.cxx:1553
 RooDataSet.cxx:1554
 RooDataSet.cxx:1555
 RooDataSet.cxx:1556
 RooDataSet.cxx:1557
 RooDataSet.cxx:1558
 RooDataSet.cxx:1559
 RooDataSet.cxx:1560
 RooDataSet.cxx:1561
 RooDataSet.cxx:1562
 RooDataSet.cxx:1563
 RooDataSet.cxx:1564
 RooDataSet.cxx:1565
 RooDataSet.cxx:1566
 RooDataSet.cxx:1567
 RooDataSet.cxx:1568
 RooDataSet.cxx:1569
 RooDataSet.cxx:1570
 RooDataSet.cxx:1571
 RooDataSet.cxx:1572
 RooDataSet.cxx:1573
 RooDataSet.cxx:1574
 RooDataSet.cxx:1575
 RooDataSet.cxx:1576
 RooDataSet.cxx:1577
 RooDataSet.cxx:1578
 RooDataSet.cxx:1579
 RooDataSet.cxx:1580
 RooDataSet.cxx:1581
 RooDataSet.cxx:1582
 RooDataSet.cxx:1583
 RooDataSet.cxx:1584
 RooDataSet.cxx:1585
 RooDataSet.cxx:1586
 RooDataSet.cxx:1587
 RooDataSet.cxx:1588
 RooDataSet.cxx:1589
 RooDataSet.cxx:1590
 RooDataSet.cxx:1591
 RooDataSet.cxx:1592
 RooDataSet.cxx:1593
 RooDataSet.cxx:1594
 RooDataSet.cxx:1595
 RooDataSet.cxx:1596
 RooDataSet.cxx:1597
 RooDataSet.cxx:1598
 RooDataSet.cxx:1599
 RooDataSet.cxx:1600
 RooDataSet.cxx:1601
 RooDataSet.cxx:1602
 RooDataSet.cxx:1603
 RooDataSet.cxx:1604
 RooDataSet.cxx:1605
 RooDataSet.cxx:1606
 RooDataSet.cxx:1607
 RooDataSet.cxx:1608
 RooDataSet.cxx:1609
 RooDataSet.cxx:1610
 RooDataSet.cxx:1611
 RooDataSet.cxx:1612
 RooDataSet.cxx:1613
 RooDataSet.cxx:1614
 RooDataSet.cxx:1615
 RooDataSet.cxx:1616
 RooDataSet.cxx:1617
 RooDataSet.cxx:1618
 RooDataSet.cxx:1619
 RooDataSet.cxx:1620
 RooDataSet.cxx:1621
 RooDataSet.cxx:1622
 RooDataSet.cxx:1623
 RooDataSet.cxx:1624
 RooDataSet.cxx:1625
 RooDataSet.cxx:1626
 RooDataSet.cxx:1627
 RooDataSet.cxx:1628
 RooDataSet.cxx:1629
 RooDataSet.cxx:1630
 RooDataSet.cxx:1631
 RooDataSet.cxx:1632
 RooDataSet.cxx:1633
 RooDataSet.cxx:1634
 RooDataSet.cxx:1635
 RooDataSet.cxx:1636
 RooDataSet.cxx:1637
 RooDataSet.cxx:1638
 RooDataSet.cxx:1639
 RooDataSet.cxx:1640
 RooDataSet.cxx:1641
 RooDataSet.cxx:1642
 RooDataSet.cxx:1643
 RooDataSet.cxx:1644
 RooDataSet.cxx:1645
 RooDataSet.cxx:1646
 RooDataSet.cxx:1647
 RooDataSet.cxx:1648
 RooDataSet.cxx:1649
 RooDataSet.cxx:1650
 RooDataSet.cxx:1651
 RooDataSet.cxx:1652
 RooDataSet.cxx:1653
 RooDataSet.cxx:1654
 RooDataSet.cxx:1655
 RooDataSet.cxx:1656
 RooDataSet.cxx:1657
 RooDataSet.cxx:1658
 RooDataSet.cxx:1659
 RooDataSet.cxx:1660
 RooDataSet.cxx:1661
 RooDataSet.cxx:1662
 RooDataSet.cxx:1663
 RooDataSet.cxx:1664
 RooDataSet.cxx:1665
 RooDataSet.cxx:1666
 RooDataSet.cxx:1667
 RooDataSet.cxx:1668
 RooDataSet.cxx:1669
 RooDataSet.cxx:1670
 RooDataSet.cxx:1671
 RooDataSet.cxx:1672
 RooDataSet.cxx:1673
 RooDataSet.cxx:1674
 RooDataSet.cxx:1675
 RooDataSet.cxx:1676
 RooDataSet.cxx:1677
 RooDataSet.cxx:1678
 RooDataSet.cxx:1679
 RooDataSet.cxx:1680