BDTEventWrapper.h   BDTEventWrapper.h 
/************************************************************************** ******** /************************************************************************** ********
* Project: TMVA - a Root-integrated toolkit for multivariate data analysis * * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
* Package: TMVA * * Package: TMVA *
* Class : BDTEventWrapper * * Class : BDTEventWrapper *
* Web : http://tmva.sourceforge.net * * Web : http://tmva.sourceforge.net *
* * * *
* Description: * * Description: *
* * * *
* * * *
* Author: Doug Schouten (dschoute@sfu.ca) * * Author: Doug Schouten (dschoute@sfu.ca) *
* * * *
* *
* Copyright (c) 2007: * * Copyright (c) 2007: *
* CERN, Switzerland * * CERN, Switzerland *
* MPI-K Heidelberg, Germany *
* U. of Texas at Austin, USA * * U. of Texas at Austin, USA *
* * * *
* Redistribution and use in source and binary forms, with or without * * Redistribution and use in source and binary forms, with or without *
* modification, are permitted according to the terms listed in LICENSE * * modification, are permitted according to the terms listed in LICENSE *
* (http://tmva.sourceforge.net/LICENSE) * * (http://tmva.sourceforge.net/LICENSE) *
************************************************************************** ********/ ************************************************************************** ********/
#ifndef ROOT_TMVA_BDTEventWrapper #ifndef ROOT_TMVA_BDTEventWrapper
#define ROOT_TMVA_BDTEventWrapper #define ROOT_TMVA_BDTEventWrapper
#ifndef ROOT_Event
#include "Event.h" #include "Event.h"
#endif
namespace TMVA { namespace TMVA {
class BDTEventWrapper{ class BDTEventWrapper{
public:
BDTEventWrapper(const Event*); public:
~BDTEventWrapper();
BDTEventWrapper( const Event* );
// Require '<' operator to use std::sort algorithms on collection of Ev ~BDTEventWrapper();
ents
bool operator <(const BDTEventWrapper& other) const; // Require '<' operator to use std::sort algorithms on collection of
Events
// Set the accumulated weight, for sorted signal/background events Bool_t operator <( const BDTEventWrapper& other ) const;
/**
* @param fType - true for signal, false for background // Set the accumulated weight, for sorted signal/background events
* @param weight - the total weight /**
*/ * @param fType - true for signal, false for background
void SetCumulativeWeight(bool type, Double_t weight); * @param weight - the total weight
*/
// Get the accumulated weight void SetCumulativeWeight( Bool_t type, Double_t weight );
/**
* @param fType - true for signal, false for background // Get the accumulated weight
* @return the cumulative weight for sorted signal/background events /**
*/ * @param fType - true for signal, false for background
Double_t GetCumulativeWeight(bool type) const; * @return the cumulative weight for sorted signal/background events
*/
// Set the index of the variable to compare on Double_t GetCumulativeWeight( Bool_t type ) const;
/**
* @param iVar - index of the variable in fEvent to use // Set the index of the variable to compare on
*/ /**
inline static void SetVarIndex(Int_t iVar) { * @param iVar - index of the variable in fEvent to use
if( iVar >= 0 ) fVarIndex = iVar; */
} inline static void SetVarIndex( Int_t iVar ) { if (iVar >= 0) fVarInd
ex = iVar; }
// Return the value of variable fVarIndex for this event
/** // Return the value of variable fVarIndex for this event
* @return value of variable fVarIndex for this event /**
*/ * @return value of variable fVarIndex for this event
inline Double_t GetVal() const { */
return fEvent->GetVal(fVarIndex); inline Double_t GetVal() const { return fEvent->GetVal(fVarIndex); }
} const Event* operator*() const { return fEvent; }
const Event* operator*() const { return fEvent; } private:
private: static Int_t fVarIndex; // index of the variable to sort on
static Int_t fVarIndex; // index of the variable to sort on const Event* fEvent; // pointer to the event
const Event* fEvent; // pointer to the event
Double_t fBkgWeight; // cumulative background weight for splittin
Double_t fBkgWeight; // cumulative background weight for splitting g
Double_t fSigWeight; // same for the signal weights Double_t fSigWeight; // same for the signal weights
}; };
} }
inline bool TMVA::BDTEventWrapper::operator<(const BDTEventWrapper& other) inline Bool_t TMVA::BDTEventWrapper::operator<( const BDTEventWrapper& othe
const { r ) const
return GetVal() < other.GetVal(); {
return GetVal() < other.GetVal();
} }
#endif #endif
 End of changes. 7 change blocks. 
53 lines changed or deleted 55 lines changed or added


 BasicMinimumError.h   BasicMinimumError.h 
// @(#)root/minuit2:$Id: BasicMinimumError.h 20880 2007-11-19 11:23:41Z rdm $ // @(#)root/minuit2:$Id: BasicMinimumError.h 29242 2009-06-26 11:01:45Z bru n $
// Authors: M. Winkler, F. James, L. Moneta, A. Zsenei 2003-2005 // Authors: M. Winkler, F. James, L. Moneta, A. Zsenei 2003-2005
/********************************************************************** /**********************************************************************
* * * *
* Copyright (c) 2005 LCG ROOT Math team, CERN/PH-SFT * * Copyright (c) 2005 LCG ROOT Math team, CERN/PH-SFT *
* * * *
**********************************************************************/ **********************************************************************/
#ifndef ROOT_Minuit2_BasicMinimumError #ifndef ROOT_Minuit2_BasicMinimumError
#define ROOT_Minuit2_BasicMinimumError #define ROOT_Minuit2_BasicMinimumError
skipping to change at line 59 skipping to change at line 59
BasicMinimumError(unsigned int n) : BasicMinimumError(unsigned int n) :
fMatrix(MnAlgebraicSymMatrix(n)), fDCovar(1.), fValid(false), fPosDef(f alse), fMadePosDef(false), fHesseFailed(false), fInvertFailed(false), fAvai lable(false) {} fMatrix(MnAlgebraicSymMatrix(n)), fDCovar(1.), fValid(false), fPosDef(f alse), fMadePosDef(false), fHesseFailed(false), fInvertFailed(false), fAvai lable(false) {}
BasicMinimumError(const MnAlgebraicSymMatrix& mat, double dcov) : BasicMinimumError(const MnAlgebraicSymMatrix& mat, double dcov) :
fMatrix(mat), fDCovar(dcov), fValid(true), fPosDef(true), fMadePosDef(f alse), fHesseFailed(false), fInvertFailed(false), fAvailable(true) {} fMatrix(mat), fDCovar(dcov), fValid(true), fPosDef(true), fMadePosDef(f alse), fHesseFailed(false), fInvertFailed(false), fAvailable(true) {}
BasicMinimumError(const MnAlgebraicSymMatrix& mat, MnHesseFailed) : BasicMinimumError(const MnAlgebraicSymMatrix& mat, MnHesseFailed) :
fMatrix(mat), fDCovar(1.), fValid(false), fPosDef(false), fMadePosDef(f alse), fHesseFailed(true), fInvertFailed(false), fAvailable(true) {} fMatrix(mat), fDCovar(1.), fValid(false), fPosDef(false), fMadePosDef(f alse), fHesseFailed(true), fInvertFailed(false), fAvailable(true) {}
BasicMinimumError(const MnAlgebraicSymMatrix& mat, MnMadePosDef) : BasicMinimumError(const MnAlgebraicSymMatrix& mat, MnMadePosDef) :
fMatrix(mat), fDCovar(1.), fValid(false), fPosDef(false), fMadePosDef(t rue), fHesseFailed(false), fInvertFailed(false), fAvailable(true) {} fMatrix(mat), fDCovar(1.), fValid(true), fPosDef(false), fMadePosDef(tr ue), fHesseFailed(false), fInvertFailed(false), fAvailable(true) {}
BasicMinimumError(const MnAlgebraicSymMatrix& mat, MnInvertFailed) : BasicMinimumError(const MnAlgebraicSymMatrix& mat, MnInvertFailed) :
fMatrix(mat), fDCovar(1.), fValid(false), fPosDef(true), fMadePosDef(fa lse), fHesseFailed(false), fInvertFailed(true), fAvailable(true) {} fMatrix(mat), fDCovar(1.), fValid(false), fPosDef(true), fMadePosDef(fa lse), fHesseFailed(false), fInvertFailed(true), fAvailable(true) {}
BasicMinimumError(const MnAlgebraicSymMatrix& mat, MnNotPosDef) : BasicMinimumError(const MnAlgebraicSymMatrix& mat, MnNotPosDef) :
fMatrix(mat), fDCovar(1.), fValid(false), fPosDef(false), fMadePosDef(f alse), fHesseFailed(false), fInvertFailed(false), fAvailable(true) {} fMatrix(mat), fDCovar(1.), fValid(false), fPosDef(false), fMadePosDef(f alse), fHesseFailed(false), fInvertFailed(false), fAvailable(true) {}
~BasicMinimumError() {} ~BasicMinimumError() {}
BasicMinimumError(const BasicMinimumError& e) : fMatrix(e.fMatrix), fDCov ar(e.fDCovar), fValid(e.fValid), fPosDef(e.fPosDef), fMadePosDef(e.fMadePos Def), fHesseFailed(e.fHesseFailed), fInvertFailed(e.fInvertFailed), fAvaila ble(e.fAvailable) {} BasicMinimumError(const BasicMinimumError& e) : fMatrix(e.fMatrix), fDCov ar(e.fDCovar), fValid(e.fValid), fPosDef(e.fPosDef), fMadePosDef(e.fMadePos Def), fHesseFailed(e.fHesseFailed), fInvertFailed(e.fInvertFailed), fAvaila ble(e.fAvailable) {}
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 BernsteinCorrection.h   BernsteinCorrection.h 
skipping to change at line 44 skipping to change at line 44
const char* dataName, const char* dataName,
TH1F*, TH1F*, TH1F*, TH1F*,
Int_t degree, Int_t degree,
Int_t nToys=500); Int_t nToys=500);
private: private:
Double_t fMaxCorrection; // maximum correction factor at any point Double_t fMaxCorrection; // maximum correction factor at any point
Double_t fTolerance; // probability to add an unecessary term Double_t fTolerance; // probability to add an unecessary term
protected: protected:
ClassDef(BernsteinCorrection,1) ClassDef(BernsteinCorrection,1) // A utility to add polynomial corrrect ion terms to a model to improve the description of data.
}; };
} }
#endif #endif
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 BinData.h   BinData.h 
// @(#)root/mathcore:$Id: BinData.h 27169 2009-01-16 09:46:05Z moneta $ // @(#)root/mathcore:$Id: BinData.h 28946 2009-06-11 15:39:14Z moneta $
// Author: L. Moneta Wed Aug 30 11:15:23 2006 // Author: L. Moneta Wed Aug 30 11:15:23 2006
/********************************************************************** /**********************************************************************
* * * *
* Copyright (c) 2006 LCG ROOT Math Team, CERN/PH-SFT * * Copyright (c) 2006 LCG ROOT Math Team, CERN/PH-SFT *
* * * *
* * * *
**********************************************************************/ **********************************************************************/
// Header file for class BinData // Header file for class BinData
skipping to change at line 50 skipping to change at line 50
- coordinate, values, error on values and coordinates (for ef fective least square fits) : kCoordError - coordinate, values, error on values and coordinates (for ef fective least square fits) : kCoordError
- corrdinate, values, error on coordinates and asymmettric er ror on valyes : kAsymError - corrdinate, values, error on coordinates and asymmettric er ror on valyes : kAsymError
In addition there is the option to construct Bindata copying the data in (using the DataVector class) In addition there is the option to construct Bindata copying the data in (using the DataVector class)
or using pointer to external data (DataWrapper) class. or using pointer to external data (DataWrapper) class.
In general is found to be more efficient to copy the data. In general is found to be more efficient to copy the data.
In case of really large data sets for limiting memory consump tion then the other option can be used In case of really large data sets for limiting memory consump tion then the other option can be used
Specialized constructor exists for data up to 3 dimensions. Specialized constructor exists for data up to 3 dimensions.
When the data are copying in the number of points can be set later (or re-set) using Initialize and When the data are copying in the number of points can be set later (or re-set) using Initialize and
the data are pushed in (one by one) using the Add method. the data are inserted one by one using the Add method.
It is mandatory to set the size before using the Add method.
@ingroup FitData @ingroup FitData
*/ */
class BinData : public FitData { class BinData : public FitData {
public : public :
enum ErrorType { kNoError, kValueError, kCoordError, kAsymError }; enum ErrorType { kNoError, kValueError, kCoordError, kAsymError };
 End of changes. 2 change blocks. 
2 lines changed or deleted 3 lines changed or added


 BinarySearchTree.h   BinarySearchTree.h 
// @(#)root/tmva $Id: BinarySearchTree.h 23334 2008-04-19 18:38:57Z brun $ // @(#)root/tmva $Id: BinarySearchTree.h 29122 2009-06-22 06:51:30Z brun $
// Author: Andreas Hoecker, Joerg Stelzer, Helge Voss, Kai Voss // Author: Andreas Hoecker, Joerg Stelzer, Helge Voss, Kai Voss
/************************************************************************** ******** /************************************************************************** ********
* Project: TMVA - a Root-integrated toolkit for multivariate data analysis * * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
* Package: TMVA * * Package: TMVA *
* Class : BinarySearchTree * * Class : BinarySearchTree *
* Web : http://tmva.sourceforge.net * * Web : http://tmva.sourceforge.net *
* * * *
* Description: * * Description: *
* BinarySearchTree incl. volume Search method * * BinarySearchTree incl. volume Search method *
* * * *
* Authors (alphabetical): * * Authors (alphabetical): *
* Andreas Hoecker <Andreas.Hocker@cern.ch> - CERN, Switzerland * * Andreas Hoecker <Andreas.Hocker@cern.ch> - CERN, Switzerland *
* Joerg Stelzer <Joerg.Stelzer@cern.ch> - CERN, Switzerland *
* Helge Voss <Helge.Voss@cern.ch> - MPI-K Heidelberg, German y * * Helge Voss <Helge.Voss@cern.ch> - MPI-K Heidelberg, German y *
* Kai Voss <Kai.Voss@cern.ch> - U. of Victoria, Canada * * Kai Voss <Kai.Voss@cern.ch> - U. of Victoria, Canada *
* * * *
* Copyright (c) 2005: * * Copyright (c) 2005: *
* CERN, Switzerland * * CERN, Switzerland *
* U. of Victoria, Canada * * U. of Victoria, Canada *
* MPI-K Heidelberg, Germany * * MPI-K Heidelberg, Germany *
* LAPP, Annecy, France * * LAPP, Annecy, France *
* * * *
* Redistribution and use in source and binary forms, with or without * * Redistribution and use in source and binary forms, with or without *
skipping to change at line 40 skipping to change at line 41
#define ROOT_TMVA_BinarySearchTree #define ROOT_TMVA_BinarySearchTree
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// // // //
// BinarySearchTree // // BinarySearchTree //
// // // //
// A simple Binary search tree including volume search method // // A simple Binary search tree including volume search method //
// // // //
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
#include "Riostream.h"
#include <vector> #include <vector>
#include <queue> #include <queue>
#ifndef ROOT_time
#include "time.h" #include "time.h"
#endif
#ifndef ROOT_TMVA_Volume #ifndef ROOT_TMVA_Volume
#include "TMVA/Volume.h" #include "TMVA/Volume.h"
#endif #endif
#ifndef ROOT_TMVA_BinaryTree #ifndef ROOT_TMVA_BinaryTree
#include "TMVA/BinaryTree.h" #include "TMVA/BinaryTree.h"
#endif #endif
#ifndef ROOT_TMVA_BinarySearchTreeNode #ifndef ROOT_TMVA_BinarySearchTreeNode
#include "TMVA/BinarySearchTreeNode.h" #include "TMVA/BinarySearchTreeNode.h"
#endif #endif
#ifndef ROOT_TMVA_VariableInfo
#include "TMVA/VariableInfo.h"
#endif
class TString; class TString;
class TTree; class TTree;
// ------------------------------------------------------------------------ ----- // ------------------------------------------------------------------------ -----
// the binary search tree // the binary search tree
using std::vector;
using std::queue;
namespace TMVA { namespace TMVA {
class DataSet; class DataSet;
class Event; class Event;
class MethodBase; // class MethodBase;
class BinarySearchTree : public BinaryTree { class BinarySearchTree : public BinaryTree {
public: public:
// constructor // constructor
BinarySearchTree( void ); BinarySearchTree( void );
// copy constructor // copy constructor
BinarySearchTree (const BinarySearchTree &b); BinarySearchTree (const BinarySearchTree &b);
// destructor // destructor
virtual ~BinarySearchTree( void ); virtual ~BinarySearchTree( void );
virtual Node * CreateNode() { return new BinarySearchTreeNode(); } virtual Node * CreateNode( UInt_t ) const { return new BinarySearchTr
eeNode(); }
virtual Node * CreateNode(const std::vector<TMVA::VariableInfo> * vI) virtual BinaryTree* CreateTree() const { return new BinarySearchTree(
{ ); }
TMVA::Event *ev = new TMVA::Event(*vI, kFALSE); virtual const char* ClassName() const { return "BinarySearchTree"; }
return new BinarySearchTreeNode(ev);
}
// Searches for a node with the specified data // Searches for a node with the specified data
// by calling the private, recursive, function for searching // by calling the private, recursive, function for searching
BinarySearchTreeNode* Search( Event * event ) const; BinarySearchTreeNode* Search( Event * event ) const;
// Adds an item to the tree, // Adds an item to the tree,
void Insert( const Event * ); void Insert( const Event * );
//get sum of weights of the nodes; //get sum of weights of the nodes;
Double_t GetSumOfWeights( void ) const; Double_t GetSumOfWeights( void ) const;
//get sum of weights of the nodes of given type;
Double_t GetSumOfWeights( Int_t theType ) const;
//set the periode (number of variables) //set the periode (number of variables)
inline void SetPeriode( Int_t p ) { fPeriod = p; } void SetPeriode( Int_t p ) { fPeriod = p; }
// return periode (number of variables) // return periode (number of variables)
inline UInt_t GetPeriode( void ) const { return fPeriod; } UInt_t GetPeriode( void ) const { return fPeriod; }
// counts events (weights) within a given volume // counts events (weights) within a given volume
Double_t SearchVolume( Volume*, std::vector<const TMVA::BinarySearchT reeNode*>* events = 0 ); Double_t SearchVolume( Volume*, std::vector<const TMVA::BinarySearchT reeNode*>* events = 0 );
// create the search tree from the events in a TTree
// using the variables specified in the calling Method
Double_t Fill( const TMVA::MethodBase& callingMethod, TTree* theTree,
Int_t theType );
// Create the search tree from the event collection // Create the search tree from the event collection
// using ONLY the variables specified in "theVars" // using ONLY the variables specified in "theVars"
Double_t Fill( vector<TMVA::Event*>, vector<Int_t> theVars, Int_t the Type = -1 ); Double_t Fill( const std::vector<TMVA::Event*>& events, const std::ve ctor<Int_t>& theVars, Int_t theType = -1 );
// create the search tree from the events in a TTree // create the search tree from the events in a TTree
// using ALL the variables specified included in the Event // using ALL the variables specified included in the Event
Double_t Fill( vector<TMVA::Event*> theTree, Int_t theType = -1 ); Double_t Fill( const std::vector<TMVA::Event*>& events, Int_t theType = -1 );
void NormalizeTree (); void NormalizeTree ();
void CalcStatistics( TMVA::Node* n = 0 ); void CalcStatistics( TMVA::Node* n = 0 );
void Clear ( TMVA::Node* n = 0 ); void Clear ( TMVA::Node* n = 0 );
// access to mean for signal and background for each variable // access to mean for signal and background for each variable
Float_t Mean(Types::ESBType sb, UInt_t var ) { return fMeans[sb==Type s::kSignal?0:1][var]; } Float_t Mean(Types::ESBType sb, UInt_t var ) { return fMeans[sb==Type s::kSignal?0:1][var]; }
// access to RMS for signal and background for each variable // access to RMS for signal and background for each variable
Float_t RMS(Types::ESBType sb, UInt_t var ) { return fRMS[sb==Types:: kSignal?0:1][var]; } Float_t RMS(Types::ESBType sb, UInt_t var ) { return fRMS[sb==Types:: kSignal?0:1][var]; }
// access to Minimum for signal and background for each variable // access to Minimum for signal and background for each variable
Float_t Min(Types::ESBType sb, UInt_t var ) { return fMin[sb==Types:: kSignal?0:1][var]; } Float_t Min(Types::ESBType sb, UInt_t var ) { return fMin[sb==Types:: kSignal?0:1][var]; }
// access to Maximum for signal and background for each variable // access to Maximum for signal and background for each variable
Float_t Max(Types::ESBType sb, UInt_t var ) { return fMax[sb==Types:: kSignal?0:1][var]; } Float_t Max(Types::ESBType sb, UInt_t var ) { return fMax[sb==Types:: kSignal?0:1][var]; }
Int_t SearchVolumeWithMaxLimit( TMVA::Volume*, std::vector<const TMVA ::BinarySearchTreeNode*>* events = 0, Int_t = -1); Int_t SearchVolumeWithMaxLimit( TMVA::Volume*, std::vector<const TMVA ::BinarySearchTreeNode*>* events = 0, Int_t = -1);
// access to RMS for each variable
Float_t RMS(UInt_t var ) { return fRMS[0][var]; } // attention! class
0 is taken as signal!
void SetNormalize( Bool_t norm ) { fCanNormalize = norm; } void SetNormalize( Bool_t norm ) { fCanNormalize = norm; }
private: private:
// add a new node to the tree (as daughter) // add a new node to the tree (as daughter)
void Insert( const Event*, Node* ); void Insert( const Event*, Node* );
// recursively search the nodes for Event // recursively search the nodes for Event
BinarySearchTreeNode* Search( Event*, Node *) const ; BinarySearchTreeNode* Search( Event*, Node *) const ;
//check of Event variables lie with the volumde //check of Event variables lie with the volumde
Bool_t InVolume (const std::vector<Float_t>&, Volume* ) const; Bool_t InVolume (const std::vector<Float_t>&, Volume* ) const;
// //
void DestroyNode ( BinarySearchTreeNode* );
void NormalizeTree( vector< pair< Double_t, const TMVA::Event* > void NormalizeTree( std::vector< std::pair< Double_t, const TMVA:
>::iterator, :Event* > >::iterator,
vector< pair< Double_t, const TMVA::Event* > std::vector< std::pair< Double_t, const TMVA:
>::iterator, UInt_t ); :Event* > >::iterator, UInt_t );
// recursive search through daughter nodes in weight counting // recursive search through daughter nodes in weight counting
Double_t SearchVolume( Node*, Volume*, Int_t, Double_t SearchVolume( Node*, Volume*, Int_t,
std::vector<const TMVA::BinarySearchTreeNode*> * events ); std::vector<const TMVA::BinarySearchTreeNode*> * events );
UInt_t fPeriod; // periode (number of event variables) UInt_t fPeriod; // periode (number of event variables)
UInt_t fCurrentDepth; // internal variable, counting the depth o f the tree during insertion UInt_t fCurrentDepth; // internal variable, counting the depth o f the tree during insertion
Bool_t fStatisticsIsValid; // flag if last stat calculation is still valid, set to false if new node is insert Bool_t fStatisticsIsValid; // flag if last stat calculation is still valid, set to false if new node is insert
std::vector<Float_t> fMeans[2]; // mean for signal and back ground for each variable std::vector<Float_t> fMeans[2]; // mean for signal and back ground for each variable
std::vector<Float_t> fRMS[2]; // RMS for signal and backg round for each variable std::vector<Float_t> fRMS[2]; // RMS for signal and backg round for each variable
 End of changes. 18 change blocks. 
26 lines changed or deleted 29 lines changed or added


 BinarySearchTreeNode.h   BinarySearchTreeNode.h 
// @(#)root/tmva $Id: BinarySearchTreeNode.h 23334 2008-04-19 18:38:57Z bru n $ // @(#)root/tmva $Id: BinarySearchTreeNode.h 29195 2009-06-24 10:39:49Z bru n $
// Author: Andreas Hoecker, Joerg Stelzer, Helge Voss, Kai Voss // Author: Andreas Hoecker, Joerg Stelzer, Helge Voss, Kai Voss
/************************************************************************** ******** /************************************************************************** ********
* Project: TMVA - a Root-integrated toolkit for multivariate data analysis * * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
* Package: TMVA * * Package: TMVA *
* Classes: Node, NodeID * * Classes: Node, NodeID *
* Web : http://tmva.sourceforge.net * * Web : http://tmva.sourceforge.net *
* * * *
* Description: * * Description: *
* Node for the BinarySearch * * Node for the BinarySearch *
* * * *
* Authors (alphabetical): * * Authors (alphabetical): *
* Andreas Hoecker <Andreas.Hocker@cern.ch> - CERN, Switzerland * * Andreas Hoecker <Andreas.Hocker@cern.ch> - CERN, Switzerland *
* Xavier Prudent <prudent@lapp.in2p3.fr> - LAPP, France *
* Helge Voss <Helge.Voss@cern.ch> - MPI-K Heidelberg, German y * * Helge Voss <Helge.Voss@cern.ch> - MPI-K Heidelberg, German y *
* Kai Voss <Kai.Voss@cern.ch> - U. of Victoria, Canada * * Kai Voss <Kai.Voss@cern.ch> - U. of Victoria, Canada *
* * * *
* Copyright (c) 2005: * * Copyright (c) 2005: *
* CERN, Switzerland * * CERN, Switzerland *
* U. of Victoria, Canada * * U. of Victoria, Canada *
* MPI-K Heidelberg, Germany * * MPI-K Heidelberg, Germany *
* LAPP, Annecy, France * * LAPP, Annecy, France *
* * * *
* Redistribution and use in source and binary forms, with or without * * Redistribution and use in source and binary forms, with or without *
skipping to change at line 41 skipping to change at line 40
#define ROOT_TMVA_BinarySearchTreeNode #define ROOT_TMVA_BinarySearchTreeNode
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// // // //
// BinarySearchTreeNode // // BinarySearchTreeNode //
// // // //
// Node for the BinarySearch Tree // // Node for the BinarySearch Tree //
// // // //
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
#include <iosfwd>
#include <vector> #include <vector>
#ifndef ROOT_Rtypes
#include "Rtypes.h" #include "Rtypes.h"
#endif
#ifndef ROOT_TMVA_Node #ifndef ROOT_TMVA_Node
#include "TMVA/Node.h" #include "TMVA/Node.h"
#endif #endif
namespace TMVA { namespace TMVA {
class Event; class Event;
class MsgLogger;
// a class used to identify a Node; (needed for recursive reading from t ext file) // a class used to identify a Node; (needed for recursive reading from t ext file)
// (currently it is NOT UNIQUE... but could eventually made it // (currently it is NOT UNIQUE... but could eventually made it
// a node in the tree structure // a node in the tree structure
class BinarySearchTreeNode : public Node { class BinarySearchTreeNode : public Node {
public: public:
// constructor of a node for the search tree // constructor of a node for the search tree
BinarySearchTreeNode( const Event* e = NULL ); BinarySearchTreeNode( const Event* e = NULL );
skipping to change at line 74 skipping to change at line 74
// constructor of a daughter node as a daughter of 'p' // constructor of a daughter node as a daughter of 'p'
BinarySearchTreeNode( BinarySearchTreeNode* parent, char pos ); BinarySearchTreeNode( BinarySearchTreeNode* parent, char pos );
// copy constructor // copy constructor
BinarySearchTreeNode ( const BinarySearchTreeNode &n, BinarySearchTreeNode ( const BinarySearchTreeNode &n,
BinarySearchTreeNode* parent = NULL); BinarySearchTreeNode* parent = NULL);
// destructor // destructor
virtual ~BinarySearchTreeNode (); virtual ~BinarySearchTreeNode ();
virtual Node* CreateNode() const { return new BinarySearchTreeNode();
}
// test event if it decends the tree at this node to the right // test event if it decends the tree at this node to the right
virtual Bool_t GoesRight( const Event& ) const; virtual Bool_t GoesRight( const Event& ) const;
// test event if it decends the tree at this node to the left // test event if it decends the tree at this node to the left
virtual Bool_t GoesLeft ( const Event& ) const; virtual Bool_t GoesLeft ( const Event& ) const;
// test event if it is equal to the event that "makes the node" (just for the "search tree" // test event if it is equal to the event that "makes the node" (just for the "search tree"
virtual Bool_t EqualsMe ( const Event& ) const; virtual Bool_t EqualsMe ( const Event& ) const;
// set index of variable used for discrimination at this node // set index of variable used for discrimination at this node
inline void SetSelector( Short_t i) { fSelector = i; } inline void SetSelector( Short_t i) { fSelector = i; }
// return index of variable used for discrimination at this node // return index of variable used for discrimination at this node
inline Short_t GetSelector() const { return fSelector; } inline Short_t GetSelector() const { return fSelector; }
const std::vector<Float_t> & GetEventV() const { return fEventV; } const std::vector<Float_t> & GetEventV() const { return fEventV; }
Float_t GetWeight() const { return fWeight; } Float_t GetWeight() const { return fWeight; }
Bool_t IsSignal() const { return fIsSignal; } Bool_t IsSignal() const { return (fClass == 0)
; }
const std::vector<Float_t> & GetTargets() const { return fTargets; }
// printout of the node // printout of the node
virtual void Print( ostream& os ) const; virtual void Print( std::ostream& os ) const;
// recursive printout of the node and it daughters // recursive printout of the node and it daughters
virtual void PrintRec( ostream& os ) const; virtual void PrintRec( std::ostream& os ) const;
virtual void AddAttributesToNode(void* node) const;
virtual void AddContentToNode(std::stringstream& s) const;
private: private:
// Read the data block // Read the data block
virtual Bool_t ReadDataRecord( istream& is ); virtual void ReadAttributes(void* node);
virtual Bool_t ReadDataRecord( std::istream& is );
virtual void ReadContent(std::stringstream& s);
std::vector<Float_t> fEventV; std::vector<Float_t> fEventV;
std::vector<Float_t> fTargets;
Float_t fWeight; Float_t fWeight;
Bool_t fIsSignal; // Float_t fIsSignal;
Int_t fClass;
Short_t fSelector; // index of variable used in node select ion (decision tree) Short_t fSelector; // index of variable used in node select ion (decision tree)
ClassDef(BinarySearchTreeNode,0) // Node for the BinarySearchTree ClassDef(BinarySearchTreeNode,0) // Node for the BinarySearchTree
}; };
} // namespace TMVA } // namespace TMVA
#endif #endif
 End of changes. 13 change blocks. 
10 lines changed or deleted 23 lines changed or added


 BinaryTree.h   BinaryTree.h 
// @(#)root/tmva $Id: BinaryTree.h 21630 2008-01-10 19:40:44Z brun $ // @(#)root/tmva $Id: BinaryTree.h 29195 2009-06-24 10:39:49Z brun $
// Author: Andreas Hoecker, Joerg Stelzer, Helge Voss, Kai Voss // Author: Andreas Hoecker, Joerg Stelzer, Helge Voss, Kai Voss
/************************************************************************** ******** /************************************************************************** ********
* Project: TMVA - a Root-integrated toolkit for multivariate data analysis * * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
* Package: TMVA * * Package: TMVA *
* Class : BinaryTree * * Class : BinaryTree *
* Web : http://tmva.sourceforge.net * * Web : http://tmva.sourceforge.net *
* * * *
* Description: * * Description: *
* BinaryTree: A base class for BinarySearch- or Decision-Trees * * BinaryTree: A base class for BinarySearch- or Decision-Trees *
* * * *
* Authors (alphabetical): * * Authors (alphabetical): *
* Andreas Hoecker <Andreas.Hocker@cern.ch> - CERN, Switzerland * * Andreas Hoecker <Andreas.Hocker@cern.ch> - CERN, Switzerland *
* Xavier Prudent <prudent@lapp.in2p3.fr> - LAPP, France *
* Helge Voss <Helge.Voss@cern.ch> - MPI-K Heidelberg, German y * * Helge Voss <Helge.Voss@cern.ch> - MPI-K Heidelberg, German y *
* Kai Voss <Kai.Voss@cern.ch> - U. of Victoria, Canada * * Kai Voss <Kai.Voss@cern.ch> - U. of Victoria, Canada *
* * * *
* Copyright (c) 2005: * * Copyright (c) 2005: *
* CERN, Switzerland * * CERN, Switzerland *
* U. of Victoria, Canada * * U. of Victoria, Canada *
* MPI-K Heidelberg, Germany * * MPI-K Heidelberg, Germany *
* LAPP, Annecy, France *
* * * *
* Redistribution and use in source and binary forms, with or without * * Redistribution and use in source and binary forms, with or without *
* modification, are permitted according to the terms listed in LICENSE * * modification, are permitted according to the terms listed in LICENSE *
* (http://tmva.sourceforge.net/LICENSE) * * (http://tmva.sourceforge.net/LICENSE) *
************************************************************************** ********/ ************************************************************************** ********/
#ifndef ROOT_TMVA_BinaryTree #ifndef ROOT_TMVA_BinaryTree
#define ROOT_TMVA_BinaryTree #define ROOT_TMVA_BinaryTree
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// // // //
// BinaryTree // // BinaryTree //
// // // //
// Base class for BinarySearch and Decision Trees // // Base class for BinarySearch and Decision Trees //
// // // //
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
#include <iosfwd>
#ifndef ROOT_TROOT
#include "TROOT.h" #include "TROOT.h"
#endif
#ifndef ROOT_TMVA_Node #ifndef ROOT_TMVA_Node
#include "TMVA/Node.h" #include "TMVA/Node.h"
#endif #endif
#ifndef ROOT_TMVA_Event
#include "TMVA/Event.h"
#endif
#ifndef ROOT_TMVA_MsgLogger
#include "TMVA/MsgLogger.h"
#endif
// ------------------------------------------------------------------------ ----- // ------------------------------------------------------------------------ -----
// the actual tree class // the actual tree class
// Handles allocation, deallocation, and sorting of nodes. // Handles allocation, deallocation, and sorting of nodes.
// the Tree consists of a "root-node" wich might have 0 to 2 daughther nod es // the Tree consists of a "root-node" wich might have 0 to 2 daughther nod es
namespace TMVA { namespace TMVA {
class BinaryTree; class BinaryTree;
class MsgLogger;
ostream& operator<< ( ostream& os, const BinaryTree& tree ); ostream& operator<< ( ostream& os, const BinaryTree& tree );
istream& operator>> ( istream& istr, BinaryTree& tree ); istream& operator>> ( istream& istr, BinaryTree& tree );
class BinaryTree { class BinaryTree {
friend ostream& operator<< ( ostream& os, const BinaryTree& tree ); friend ostream& operator<< ( ostream& os, const BinaryTree& tree );
friend istream& operator>> ( istream& istr, BinaryTree& tree ); friend istream& operator>> ( istream& istr, BinaryTree& tree );
public: public:
// or a tree with Root node "n", any daughters of this node are autom atically in the tree // or a tree with Root node "n", any daughters of this node are autom atically in the tree
BinaryTree( void ); BinaryTree( void );
virtual ~BinaryTree(); virtual ~BinaryTree();
virtual Node* CreateNode() = 0; virtual Node* CreateNode(UInt_t size=0) const = 0;
virtual BinaryTree* CreateTree() const = 0;
static BinaryTree* CreateFromXML(void* node);
virtual const char* ClassName() const = 0;
// set the root node of the tree // set the root node of the tree
void SetRoot( Node* r ) { fRoot = r; } void SetRoot( Node* r ) { fRoot = r; }
// Retrieves the address of the root node // Retrieves the address of the root node
Node* GetRoot() const { return fRoot; } Node* GetRoot() const { return fRoot; }
// get number of Nodes in the Tree as counted while booking the nodes ; // get number of Nodes in the Tree as counted while booking the nodes ;
UInt_t GetNNodes() const { return fNNodes; } UInt_t GetNNodes() const { return fNNodes; }
// count the number of Nodes in the Tree by looping through the tree and updates // count the number of Nodes in the Tree by looping through the tree and updates
// the stored number. (e.g. useful when pruning, as the number count is updated when // the stored number. (e.g. useful when pruning, as the number count is updated when
// building the tree. // building the tree.
UInt_t CountNodes( Node* n = NULL ); UInt_t CountNodes( Node* n = NULL );
UInt_t GetTotalTreeDepth() const { return fDepth; } UInt_t GetTotalTreeDepth() const { return fDepth; }
void SetTotalTreeDepth( Int_t depth ) { fDepth = depth;}; void SetTotalTreeDepth( Int_t depth ) { fDepth = depth; }
void SetTotalTreeDepth( Node* n = NULL ); void SetTotalTreeDepth( Node* n = NULL );
Node* GetLeftDaughter ( Node* n); Node* GetLeftDaughter ( Node* n);
Node* GetRightDaughter( Node* n); Node* GetRightDaughter( Node* n);
void Print( ostream& os ) const; virtual void Print( ostream& os ) const;
void Read ( istream& istr ); virtual void Read ( istream& istr );
virtual void* AddXMLTo(void* parent) const;
virtual void ReadXML(void* node);
private: private:
Node* fRoot; //the root node of the tree Node* fRoot; //the root node of the tree
// the tree only has it's root node, the "daughters" are taken car // the tree only has it's root node, the "daughters" are taken car
// of by the "node" properties of the "root" // of by the "node" properties of the "root"
protected: protected:
// delete a node (and the corresponding event if owned by the tree) // delete a node (and the corresponding event if owned by the tree)
void DeleteNode( Node* ); void DeleteNode( Node* );
Int_t fNNodes; // total number of nodes in the tree (c ounted) UInt_t fNNodes; // total number of nodes in the tree (c ounted)
UInt_t fDepth; // maximal depth in tree reached UInt_t fDepth; // maximal depth in tree reached
mutable MsgLogger fLogger; // message loggera mutable MsgLogger* fLogger; // message loggera
MsgLogger& Log() const { return *fLogger; }
ClassDef(BinaryTree,0) // Base class for BinarySearch and Decision Tr ees ClassDef(BinaryTree,0) // Base class for BinarySearch and Decision Tr ees
}; };
} // namespace TMVA } // namespace TMVA
#endif #endif
 End of changes. 12 change blocks. 
16 lines changed or deleted 18 lines changed or added


 Bytes.h   Bytes.h 
/* @(#)root/base:$Id: Bytes.h 20877 2007-11-19 11:17:07Z rdm $ */ /* @(#)root/base:$Id: Bytes.h 28501 2009-05-08 15:19:47Z rdm $ */
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
#ifndef ROOT_Bytes #ifndef ROOT_Bytes
skipping to change at line 476 skipping to change at line 476
#endif #endif
} }
inline ULong_t host2net(ULong_t x) inline ULong_t host2net(ULong_t x)
{ {
#ifdef R__B64 #ifdef R__B64
# if defined(R__USEASMSWAP) # if defined(R__USEASMSWAP)
return Rbswap_64(x); return Rbswap_64(x);
# else # else
char sw[sizeof(ULong_t)]; char sw[sizeof(ULong_t)];
*(ULong_t *)sw = x; void *tmp = sw;
*(ULong_t *)tmp = x;
char *sb = (char *)&x; char *sb = (char *)&x;
sb[0] = sw[7]; sb[0] = sw[7];
sb[1] = sw[6]; sb[1] = sw[6];
sb[2] = sw[5]; sb[2] = sw[5];
sb[3] = sw[4]; sb[3] = sw[4];
sb[4] = sw[3]; sb[4] = sw[3];
sb[5] = sw[2]; sb[5] = sw[2];
sb[6] = sw[1]; sb[6] = sw[1];
sb[7] = sw[0]; sb[7] = sw[0];
skipping to change at line 500 skipping to change at line 501
return (ULong_t)host2net((UInt_t) x); return (ULong_t)host2net((UInt_t) x);
#endif #endif
} }
inline ULong64_t host2net(ULong64_t x) inline ULong64_t host2net(ULong64_t x)
{ {
#if defined(R__USEASMSWAP) #if defined(R__USEASMSWAP)
return Rbswap_64(x); return Rbswap_64(x);
#else #else
char sw[sizeof(ULong64_t)]; char sw[sizeof(ULong64_t)];
*(ULong64_t *)sw = x; void *tmp = sw;
*(ULong64_t *)tmp = x;
char *sb = (char *)&x; char *sb = (char *)&x;
sb[0] = sw[7]; sb[0] = sw[7];
sb[1] = sw[6]; sb[1] = sw[6];
sb[2] = sw[5]; sb[2] = sw[5];
sb[3] = sw[4]; sb[3] = sw[4];
sb[4] = sw[3]; sb[4] = sw[3];
sb[5] = sw[2]; sb[5] = sw[2];
sb[6] = sw[1]; sb[6] = sw[1];
sb[7] = sw[0]; sb[7] = sw[0];
skipping to change at line 545 skipping to change at line 547
// Use a union to allow strict-aliasing // Use a union to allow strict-aliasing
union { union {
volatile ULong64_t l; volatile ULong64_t l;
volatile Double_t d; volatile Double_t d;
} u; } u;
u.d = x; u.d = x;
u.l = Rbswap_64(u.l); u.l = Rbswap_64(u.l);
return u.d; return u.d;
# else # else
char sw[sizeof(Double_t)]; char sw[sizeof(Double_t)];
*(Double_t *)sw = x; void *tmp = sw;
*(Double_t *)tmp = x;
char *sb = (char *)&x; char *sb = (char *)&x;
sb[0] = sw[7]; sb[0] = sw[7];
sb[1] = sw[6]; sb[1] = sw[6];
sb[2] = sw[5]; sb[2] = sw[5];
sb[3] = sw[4]; sb[3] = sw[4];
sb[4] = sw[3]; sb[4] = sw[3];
sb[5] = sw[2]; sb[5] = sw[2];
sb[6] = sw[1]; sb[6] = sw[1];
sb[7] = sw[0]; sb[7] = sw[0];
 End of changes. 4 change blocks. 
4 lines changed or deleted 7 lines changed or added


 CCPruner.h   CCPruner.h 
skipping to change at line 60 skipping to change at line 60
/* #ifndef ROOT_TMVA_DecisionTreeNode */ /* #ifndef ROOT_TMVA_DecisionTreeNode */
/* #include "TMVA/DecisionTreeNode.h" */ /* #include "TMVA/DecisionTreeNode.h" */
/* #endif */ /* #endif */
#ifndef ROOT_TMVA_Event #ifndef ROOT_TMVA_Event
#include "TMVA/Event.h" #include "TMVA/Event.h"
#endif #endif
namespace TMVA { namespace TMVA {
class DecisionTreeNode; class DecisionTreeNode;
class SeparationBase; class SeparationBase;
class CCPruner{ class CCPruner {
public: public:
typedef std::vector<Event*> EventList; typedef std::vector<Event*> EventList;
CCPruner( DecisionTree* t_max, CCPruner( DecisionTree* t_max,
const EventList* validationSample = NULL, const EventList* validationSample,
SeparationBase* qualityIndex = NULL ); SeparationBase* qualityIndex = NULL );
~CCPruner( );
// set the pruning strength parameter alpha (if alpha < 0, the optimal CCPruner( DecisionTree* t_max,
alpha is calculated) const DataSet* validationSample,
void SetPruneStrength( Float_t alpha = -1.0 ); SeparationBase* qualityIndex = NULL );
void Optimize( ); ~CCPruner( );
// return the list of pruning locations to define the optimal subtree T // set the pruning strength parameter alpha (if alpha < 0, the optima
' of T_max l alpha is calculated)
std::vector<TMVA::DecisionTreeNode*> GetOptimalPruneSequence( ) const; void SetPruneStrength( Float_t alpha = -1.0 );
// return the quality index from the validation sample for the optimal void Optimize( );
subtree T'
inline Float_t GetOptimalQualityIndex( ) const { return (fOptimalK >= 0
&& fQualityIndexList.size() > 0 ?
fQualityIndexList[fOpt
imalK] : -1.0); }
// return the prune strength (=alpha) corresponding to the prune sequen // return the list of pruning locations to define the optimal subtree
ce T' of T_max
inline Float_t GetOptimalPruneStrength( ) const { return (fOptimalK >= std::vector<TMVA::DecisionTreeNode*> GetOptimalPruneSequence( ) const
0 && fPruneStrengthList.size() > 0 ? ;
fPruneStrengthList[fO
ptimalK] : -1.0); }
private: // return the quality index from the validation sample for the optima
Float_t fAlpha; //! regularization parameter in CC pruning l subtree T'
const EventList* fValidationSample; //! the event sample to select inline Float_t GetOptimalQualityIndex( ) const { return (fOptimalK >=
the optimally-pruned tree 0 && fQualityIndexList.size() > 0 ?
SeparationBase* fQualityIndex; //! the quality index used to calcu fQualityInde
late R(t), R(T) = sum[t in ~T]{ R(t) } xList[fOptimalK] : -1.0); }
Bool_t fOwnQIndex; //! flag indicates if fQualityIndex is
owned by this
DecisionTree* fTree; //! (pruned) decision tree // return the prune strength (=alpha) corresponding to the prune sequ
ence
inline Float_t GetOptimalPruneStrength( ) const { return (fOptimalK >
= 0 && fPruneStrengthList.size() > 0 ?
fPruneStren
gthList[fOptimalK] : -1.0); }
std::vector<TMVA::DecisionTreeNode*> fPruneSequence; //! map of weakest private:
links (i.e., branches to prune) -> pruning index Float_t fAlpha; //! regularization parameter in CC pruni
std::vector<Float_t> fPruneStrengthList; //! map of alpha -> pruning i ng
ndex const EventList* fValidationSample; //! the event sample to selec
std::vector<Float_t> fQualityIndexList; //! map of R(T) -> pruning in t the optimally-pruned tree
dex const DataSet* fValidationDataSet; //! the event sample to sele
ct the optimally-pruned tree
SeparationBase* fQualityIndex; //! the quality index used to cal
culate R(t), R(T) = sum[t in ~T]{ R(t) }
Bool_t fOwnQIndex; //! flag indicates if fQualityIndex
is owned by this
Int_t fOptimalK; //! index of the optimal tree DecisionTree* fTree; //! (pruned) decision tree
in the pruned tree sequence
Bool_t fDebug; //! debug flag std::vector<TMVA::DecisionTreeNode*> fPruneSequence; //! map of weake
}; st links (i.e., branches to prune) -> pruning index
std::vector<Float_t> fPruneStrengthList; //! map of alpha -> pruning
index
std::vector<Float_t> fQualityIndexList; //! map of R(T) -> pruning
index
Int_t fOptimalK; //! index of the optimal tr
ee in the pruned tree sequence
Bool_t fDebug; //! debug flag
};
} }
inline void TMVA::CCPruner::SetPruneStrength( Float_t alpha ) { inline void TMVA::CCPruner::SetPruneStrength( Float_t alpha ) {
fAlpha = (alpha > 0 ? alpha : 0.0); fAlpha = (alpha > 0 ? alpha : 0.0);
} }
#endif #endif
 End of changes. 12 change blocks. 
47 lines changed or deleted 56 lines changed or added


 CCTreeWrapper.h   CCTreeWrapper.h 
skipping to change at line 36 skipping to change at line 36
#ifndef ROOT_TMVA_Event #ifndef ROOT_TMVA_Event
#include "TMVA/Event.h" #include "TMVA/Event.h"
#endif #endif
#ifndef ROOT_TMVA_SeparationBase #ifndef ROOT_TMVA_SeparationBase
#include "TMVA/SeparationBase.h" #include "TMVA/SeparationBase.h"
#endif #endif
#ifndef ROOT_TMVA_DecisionTree #ifndef ROOT_TMVA_DecisionTree
#include "TMVA/DecisionTree.h" #include "TMVA/DecisionTree.h"
#endif #endif
#ifndef ROOT_TMVA_DataSet
#include "TMVA/DataSet.h"
#endif
namespace TMVA { namespace TMVA {
class CCTreeWrapper { class CCTreeWrapper {
public:
typedef std::vector<Event*> EventList; public:
///////////////////////////////////////////////////////////// typedef std::vector<Event*> EventList;
// CCTreeNode - a light wrapper of a decision tree node //
// // /////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////// // CCTreeNode - a light wrapper of a decision tree node //
class CCTreeNode : virtual public Node { // //
public: /////////////////////////////////////////////////////////////
CCTreeNode( DecisionTreeNode* n = NULL );
virtual ~CCTreeNode( ); class CCTreeNode : virtual public Node {
// set |~T_t|, the number of terminal descendants of node t public:
inline void SetNLeafDaughters( Int_t N ) { fNLeafDaughters = (N > 0 ?
N : 0); } CCTreeNode( DecisionTreeNode* n = NULL );
virtual ~CCTreeNode( );
// return |~T_t|
inline Int_t GetNLeafDaughters() const { return fNLeafDaughters; } virtual Node* CreateNode() const { return new CCTreeNode(); }
// set R(t), the node resubstitution estimate (Gini, misclassificatio // set |~T_t|, the number of terminal descendants of node t
n, etc.) for the node t inline void SetNLeafDaughters( Int_t N ) { fNLeafDaughters = (N >
inline void SetNodeResubstitutionEstimate( Double_t R ) { fNodeResubs 0 ? N : 0); }
titutionEstimate = (R >= 0 ? R : 0.0); }
// return |~T_t|
// return R(t) for node t inline Int_t GetNLeafDaughters() const { return fNLeafDaughters; }
inline Double_t GetNodeResubstitutionEstimate( ) const { return fNode
ResubstitutionEstimate; } // set R(t), the node resubstitution estimate (Gini, misclassifica
tion, etc.) for the node t
// set R(T_t) = sum[t' in ~T_t]{ R(t) }, the resubstitution estimate inline void SetNodeResubstitutionEstimate( Double_t R ) { fNodeRes
for the branch rooted at ubstitutionEstimate = (R >= 0 ? R : 0.0); }
// node t (it is an estimate because it is calculated from the traini
ng dataset, i.e., the original tree) // return R(t) for node t
inline void SetResubstitutionEstimate( Double_t R ) { fResubstitution inline Double_t GetNodeResubstitutionEstimate( ) const { return fN
Estimate = (R >= 0 ? R : 0.0); } odeResubstitutionEstimate; }
// return R(T_t) for node t // set R(T_t) = sum[t' in ~T_t]{ R(t) }, the resubstitution estima
inline Double_t GetResubstitutionEstimate( ) const { return fResubsti te for the branch rooted at
tutionEstimate; } // node t (it is an estimate because it is calculated from the tra
ining dataset, i.e., the original tree)
// set the critical point of alpha inline void SetResubstitutionEstimate( Double_t R ) { fResubstitut
// R(t) - R(T_t) ionEstimate = (R >= 0 ? R : 0.0); }
// alpha_c < ------------- := g(t)
// |~T_t| - 1 // return R(T_t) for node t
// which is the value of alpha such that the branch rooted at node t inline Double_t GetResubstitutionEstimate( ) const { return fResub
is pruned stitutionEstimate; }
inline void SetAlphaC( Double_t alpha ) { fAlphaC = alpha; }
// set the critical point of alpha
// get the critical alpha value for this node // R(t) - R(T_t)
inline Double_t GetAlphaC( ) const { return fAlphaC; } // alpha_c < ------------- := g(t)
// |~T_t| - 1
// set the minimum critical alpha value for descendants of node t ( G // which is the value of alpha such that the branch rooted at node
(t) = min(alpha_c, g(t_l), g(t_r)) ) t is pruned
inline void SetMinAlphaC( Double_t alpha ) { fMinAlphaC = alpha; } inline void SetAlphaC( Double_t alpha ) { fAlphaC = alpha; }
// get the minimum critical alpha value // get the critical alpha value for this node
inline Double_t GetMinAlphaC( ) const { return fMinAlphaC; } inline Double_t GetAlphaC( ) const { return fAlphaC; }
// get the pointer to the wrapped DT node // set the minimum critical alpha value for descendants of node t
inline DecisionTreeNode* GetDTNode( ) const { return fDTNode; } ( G(t) = min(alpha_c, g(t_l), g(t_r)) )
inline void SetMinAlphaC( Double_t alpha ) { fMinAlphaC = alpha; }
// get pointers to children, mother in the CC tree
inline CCTreeNode* GetLeftDaughter( ) { return dynamic_cast<CCTreeNod // get the minimum critical alpha value
e*>(GetLeft()); } inline Double_t GetMinAlphaC( ) const { return fMinAlphaC; }
inline CCTreeNode* GetRightDaughter( ) { return dynamic_cast<CCTreeNo
de*>(GetRight()); } // get the pointer to the wrapped DT node
inline CCTreeNode* GetMother( ) { return dynamic_cast<CCTreeNode*>(Ge inline DecisionTreeNode* GetDTNode( ) const { return fDTNode; }
tParent()); }
// get pointers to children, mother in the CC tree
// initialize a node from a data record inline CCTreeNode* GetLeftDaughter( ) { return dynamic_cast<CCTree
virtual Bool_t ReadDataRecord( std::istream& in ); Node*>(GetLeft()); }
inline CCTreeNode* GetRightDaughter( ) { return dynamic_cast<CCTre
// printout of the node (can be read in with ReadDataRecord) eNode*>(GetRight()); }
virtual void Print( ostream& os ) const; inline CCTreeNode* GetMother( ) { return dynamic_cast<CCTreeNode*>
(GetParent()); }
// recursive printout of the node and its daughters
virtual void PrintRec ( ostream& os ) const; // printout of the node (can be read in with ReadDataRecord)
virtual void Print( ostream& os ) const;
// test event if it decends the tree at this node to the right
inline virtual Bool_t GoesRight( const Event& e ) const { return (Get // recursive printout of the node and its daughters
DTNode() != NULL ? virtual void PrintRec ( ostream& os ) const;
GetD
TNode()->GoesRight(e) : false); } virtual void AddAttributesToNode(void* node) const;
virtual void AddContentToNode(std::stringstream& s) const;
// test event if it decends the tree at this node to the left
inline virtual Bool_t GoesLeft ( const Event& e ) const { return (Get // test event if it decends the tree at this node to the right
DTNode() != NULL ? inline virtual Bool_t GoesRight( const Event& e ) const { return (
GetD GetDTNode() != NULL ?
TNode()->GoesLeft(e) : false); }
GetDTNode()->GoesRight(e) : false); }
private:
Int_t fNLeafDaughters; //! number of terminal descendants // test event if it decends the tree at this node to the left
Double_t fNodeResubstitutionEstimate; //! R(t) = misclassification ra inline virtual Bool_t GoesLeft ( const Event& e ) const { return (
te for node t GetDTNode() != NULL ?
Double_t fResubstitutionEstimate; //! R(T_t) = sum[t' in ~T_t]{ R(t)
} GetDTNode()->GoesLeft(e) : false); }
Double_t fAlphaC; //! critical point, g(t) = alpha_c(t)
Double_t fMinAlphaC; //! G(t), minimum critical point of t and its de private:
scendants
DecisionTreeNode* fDTNode; //! pointer to wrapped node in the decisio // initialize a node from a data record
n tree virtual void ReadAttributes(void* node);
}; virtual Bool_t ReadDataRecord( std::istream& in );
virtual void ReadContent(std::stringstream& s);
CCTreeWrapper( DecisionTree* T, SeparationBase* qualityIndex );
~CCTreeWrapper( ); Int_t fNLeafDaughters; //! number of terminal descendants
Double_t fNodeResubstitutionEstimate; //! R(t) = misclassification
// return the decision tree output for an event rate for node t
Double_t CheckEvent( const TMVA::Event & e, Bool_t useYesNoLeaf = false Double_t fResubstitutionEstimate; //! R(T_t) = sum[t' in ~T_t]{ R(
); t) }
// return the misclassification rate of a pruned tree for a validation Double_t fAlphaC; //! critical point, g(t) = alpha_c(t)
event sample Double_t fMinAlphaC; //! G(t), minimum critical point of t and its
Double_t TestTreeQuality( const EventList* validationSample ); descendants
DecisionTreeNode* fDTNode; //! pointer to wrapped node in the deci
// remove the branch rooted at node t sion tree
void PruneNode( CCTreeNode* t ); };
// initialize the node t and all its descendants
void InitTree( CCTreeNode* t ); CCTreeWrapper( DecisionTree* T, SeparationBase* qualityIndex );
~CCTreeWrapper( );
// return the root node for this tree
CCTreeNode* GetRoot() { return fRoot; } // return the decision tree output for an event
private: Double_t CheckEvent( const TMVA::Event & e, Bool_t useYesNoLeaf = fal
SeparationBase* fQualityIndex; //! pointer to the used quality index c se );
alculator // return the misclassification rate of a pruned tree for a validatio
DecisionTree* fDTParent; //! pointer to underlying DecisionTree n event sample
CCTreeNode* fRoot; //! the root node of the (wrapped) deci Double_t TestTreeQuality( const EventList* validationSample );
sion Tree Double_t TestTreeQuality( const DataSet* validationSample );
};
// remove the branch rooted at node t
void PruneNode( CCTreeNode* t );
// initialize the node t and all its descendants
void InitTree( CCTreeNode* t );
// return the root node for this tree
CCTreeNode* GetRoot() { return fRoot; }
private:
SeparationBase* fQualityIndex; //! pointer to the used quality index
calculator
DecisionTree* fDTParent; //! pointer to underlying DecisionTre
e
CCTreeNode* fRoot; //! the root node of the (wrapped) de
cision Tree
};
} }
#endif #endif
 End of changes. 2 change blocks. 
127 lines changed or deleted 146 lines changed or added


 ClassBuilder.h   ClassBuilder.h 
// @(#)root/reflex:$Id: ClassBuilder.h 22732 2008-03-19 10:41:52Z pcanal $ // @(#)root/reflex:$Id: ClassBuilder.h 28992 2009-06-15 09:20:22Z axel $
// Author: Stefan Roiser 2004 // Author: Stefan Roiser 2004
// Copyright CERN, CH-1211 Geneva 23, 2004-2006, All rights reserved. // Copyright CERN, CH-1211 Geneva 23, 2004-2006, All rights reserved.
// //
// Permission to use, copy, modify, and distribute this software for any // Permission to use, copy, modify, and distribute this software for any
// purpose is hereby granted without fee, provided that this copyright and // purpose is hereby granted without fee, provided that this copyright and
// permissions notice appear in all copies and derivatives. // permissions notice appear in all copies and derivatives.
// //
// This software is provided "as is" without express or implied warranty. // This software is provided "as is" without express or implied warranty.
#ifndef Reflex_ClassBuilder #ifndef Reflex_ClassBuilder
#define Reflex_ClassBuilder #define Reflex_ClassBuilder
// Include files // Include files
#include "Reflex/Kernel.h" #include "Reflex/Kernel.h"
#include "Reflex/Tools.h" #include "Reflex/Tools.h"
#include "Reflex/Builder/TypeBuilder.h" #include "Reflex/Builder/TypeBuilder.h"
#include "Reflex/Member.h" #include "Reflex/Member.h"
#include "Reflex/Callback.h" #include "Reflex/Callback.h"
// Forward declaration for 'friendship' purpose.
namespace Cint { namespace Internal {} }
namespace Reflex { namespace Reflex {
// forward declarations // forward declarations
class Class; class Class;
class ClassBuilder;
template <typename C> class ClassBuilderT;
/** /**
* @class ClassBuilderImpl ClassBuilder.h Reflex/Builder/ClassBuilder.h * @class ClassBuilderImpl ClassBuilder.h Reflex/Builder/ClassBuilder.h
* @author Stefan Roiser * @author Stefan Roiser
* @date 30/3/2004 * @date 30/3/2004
* @ingroup RefBld * @ingroup RefBld
*/ */
class RFLX_API ClassBuilderImpl { class RFLX_API ClassBuilderImpl {
public: public:
skipping to change at line 102 skipping to change at line 107
* @size Size of the class * @size Size of the class
*/ */
void SetSizeOf(size_t size); void SetSizeOf(size_t size);
/* /*
* ToType will return the currently produced Type (class) * ToType will return the currently produced Type (class)
* @return the type currently being built * @return the type currently being built
*/ */
Type ToType(); Type ToType();
private: protected:
friend class ClassBuilder;
template <class C> friend class ClassBuilderT;
/**
* EnableCallback Enable or disable the callback call in the destruct
or
* @param enable true to enable callback call, false to disable call
back call
*/
void EnableCallback(bool enable = true);
private:
/** current class being built */ /** current class being built */
Class * fClass; Class * fClass;
/** last added MemberAt */ /** last added MemberAt */
Member fLastMember; Member fLastMember;
/** flag, true if this is truly building a new class */
bool fNewClass;
/** flag, fire callback in destructor */
bool fCallbackEnabled;
}; // class ClassBuilderImpl }; // class ClassBuilderImpl
/** /**
* @class ClassBuilder ClassBuilder.h Reflex/Builder/ClassBuilder.h * @class ClassBuilder ClassBuilder.h Reflex/Builder/ClassBuilder.h
* @author Stefan Roiser * @author Stefan Roiser
* @date 24/5/2004 * @date 24/5/2004
* @ingroup RefBld * @ingroup RefBld
*/ */
class RFLX_API ClassBuilder { class RFLX_API ClassBuilder {
skipping to change at line 193 skipping to change at line 215
* @size Size of the class * @size Size of the class
*/ */
ClassBuilder & SetSizeOf(size_t size); ClassBuilder & SetSizeOf(size_t size);
/* /*
* ToType will return the currently produced Type (class) * ToType will return the currently produced Type (class)
* @return the type currently being built * @return the type currently being built
*/ */
Type ToType(); Type ToType();
private: protected:
#ifdef G__COMMON_H
friend int ::G__search_tagname(const char*, int);
friend void Cint::Internal::G__set_stdio();
friend void Cint::Internal::G__create_bytecode_arena();
#endif
/**
* EnableCallback Enable or disable the callback call in the destruct
or
* @param enable true to enable callback call, false to disable call
back call
*/
ClassBuilder& EnableCallback(bool enable = true);
private:
ClassBuilderImpl fClassBuilderImpl; ClassBuilderImpl fClassBuilderImpl;
}; // class ClassBuilder }; // class ClassBuilder
/** /**
* @class ClassBuilderT ClassBuilder.h Reflex/Builder/ClassBuilder.h * @class ClassBuilderT ClassBuilder.h Reflex/Builder/ClassBuilder.h
* @author Stefan Roiser * @author Stefan Roiser
* @date 30/3/2004 * @date 30/3/2004
* @ingroup RefBld * @ingroup RefBld
skipping to change at line 313 skipping to change at line 349
* @size Size of the class * @size Size of the class
*/ */
ClassBuilderT & SetSizeOf(size_t size); ClassBuilderT & SetSizeOf(size_t size);
/* /*
* ToType will return the currently produced Type (class) * ToType will return the currently produced Type (class)
* @return the type currently being built * @return the type currently being built
*/ */
Type ToType(); Type ToType();
protected:
/**
* EnableCallback Enable or disable the callback call in the destruct
or
* @param enable true to enable callback call, false to disable call
back call
*/
ClassBuilderT & EnableCallback(bool enable = true );
private: private:
ClassBuilderImpl fClassBuilderImpl; ClassBuilderImpl fClassBuilderImpl;
}; // class ClassBuilderT }; // class ClassBuilderT
} // namespace Reflex } // namespace Reflex
//_________________________________________________________________________ _____ //_________________________________________________________________________ _____
template<typename C, typename B> inline Reflex::ClassBuilder& Reflex::Class Builder::AddBase(unsigned int modifiers) template<typename C, typename B> inline Reflex::ClassBuilder& Reflex::Class Builder::AddBase(unsigned int modifiers)
skipping to change at line 516 skipping to change at line 560
P value ) P value )
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
{ {
fClassBuilderImpl.AddProperty(key , value); fClassBuilderImpl.AddProperty(key , value);
return * this; return * this;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
template < class C > template < class C >
inline Reflex::ClassBuilderT<C> & inline Reflex::ClassBuilderT<C> &
Reflex::ClassBuilderT<C>::EnableCallback(bool enable /* = true */ )
//-------------------------------------------------------------------------
------
{
fClassBuilderImpl.EnableCallback(enable);
return * this;
}
//-------------------------------------------------------------------------
------
template < class C >
inline Reflex::ClassBuilderT<C> &
Reflex::ClassBuilderT<C>::SetSizeOf(size_t size) { Reflex::ClassBuilderT<C>::SetSizeOf(size_t size) {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
fClassBuilderImpl.SetSizeOf(size); fClassBuilderImpl.SetSizeOf(size);
return *this; return *this;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
template < class C > inline Reflex::Type template < class C > inline Reflex::Type
Reflex::ClassBuilderT<C>::ToType() { Reflex::ClassBuilderT<C>::ToType() {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
 End of changes. 8 change blocks. 
3 lines changed or deleted 65 lines changed or added


 CollectionProxy.h   CollectionProxy.h 
// @(#)root/reflex:$Id: CollectionProxy.h 27278 2009-01-28 14:02:41Z axel $ // @(#)root/reflex:$Id: CollectionProxy.h 28800 2009-06-03 20:14:03Z pcanal $
// Author: Markus Frank 2004 // Author: Markus Frank 2004
// Copyright CERN, CH-1211 Geneva 23, 2004-2006, All rights reserved. // Copyright CERN, CH-1211 Geneva 23, 2004-2006, All rights reserved.
// //
// Permission to use, copy, modify, and distribute this software for any // Permission to use, copy, modify, and distribute this software for any
// purpose is hereby granted without fee, provided that this copyright and // purpose is hereby granted without fee, provided that this copyright and
// permissions notice appear in all copies and derivatives. // permissions notice appear in all copies and derivatives.
// //
// This software is provided "as is" without express or implied warranty. // This software is provided "as is" without express or implied warranty.
skipping to change at line 447 skipping to change at line 447
return CFTGenerator<MapInsert<stdext::hash_map<K,T,R,A> > >::Gener ate(); return CFTGenerator<MapInsert<stdext::hash_map<K,T,R,A> > >::Gener ate();
} }
}; };
// Specialization for stdext::hash_multimap // Specialization for stdext::hash_multimap
template <class K, class T, class R, class A> struct Proxy< stdext::hash _multimap<K,T,R,A> > { template <class K, class T, class R, class A> struct Proxy< stdext::hash _multimap<K,T,R,A> > {
static CollFuncTable* Generate() { static CollFuncTable* Generate() {
return CFTGenerator<MapInsert<stdext::hash_multimap<K,T,R,A> > >:: Generate(); return CFTGenerator<MapInsert<stdext::hash_multimap<K,T,R,A> > >:: Generate();
} }
}; };
#endif #endif
// Specialization for std::bitset
template <typename B> struct StdBitSetHelper {};
#ifndef __CINT__
template <typename Bitset_t> struct CollType<StdBitSetHelper<Bitset_t> >
: public Address<const bool &>
{
typedef Bitset_t Cont_t;
typedef std::pair<size_t,bool> Iter_t;
typedef bool Value_t;
typedef Environ<Iter_t> Env_t;
typedef Env_t *PEnv_t;
typedef Cont_t *PCont_t;
typedef Value_t *PValue_t;
virtual ~CollType() {}
static inline PCont_t object(void* ptr) {
return PCont_t(PEnv_t(ptr)->fObject);
}
static void* size(void* env) {
PEnv_t e = PEnv_t(env);
e->fSize = PCont_t(e->fObject)->size();
return &e->fSize;
}
static void* clear(void* env) {
object(env)->reset();
return 0;
}
static void* first(void* env) {
PEnv_t e = PEnv_t(env);
PCont_t c = PCont_t(e->fObject);
e->fIterator.first = 0;
e->fIterator.second = c->size() > 0 ? c->test(e->fIterator.first)
: false ; // Iterator actually hold the value.
e->fSize = c->size();
return 0;
}
static void* next(void* env) {
PEnv_t e = PEnv_t(env);
PCont_t c = PCont_t(e->fObject);
for (; e->fIdx > 0 && e->fIterator.first != c->size(); ++(e->fIter
ator.first), --e->fIdx){ }
e->fIterator.second = (e->fIterator.first != c->size()) ? c->test(
e->fIterator.first) : false;
return 0;
}
static void* construct(void*) {
// Nothing to construct.
return 0;
}
static void* collect(void* env) {
PEnv_t e = PEnv_t(env);
PCont_t c = PCont_t(e->fObject);
PValue_t m = PValue_t(e->fStart); // 'start' is a buffer outside t
he container.
for (size_t i=0; i != c->size(); ++i, ++m )
*m = c->test(i);
return 0;
}
static void* destruct(void*) {
// Nothing to destruct.
return 0;
}
};
template <typename Bitset_t>
struct Pushback<StdBitSetHelper<Bitset_t> > : public CollType<StdBitSet
Helper<Bitset_t> > {
typedef Bitset_t Cont_t;
typedef bool Iter_t;
typedef bool Value_t;
typedef Environ<Iter_t> Env_t;
typedef Env_t *PEnv_t;
typedef Cont_t *PCont_t;
typedef Value_t *PValue_t;
static void* resize(void* env) {
PEnv_t e = PEnv_t(env);
e->fIdx = 0;
return 0;
}
static void* feed(void* env) {
PEnv_t e = PEnv_t(env);
PCont_t c = PCont_t(e->fObject);
PValue_t m = PValue_t(e->fStart); // Here start is actually a 'buf
fer' outside the container.
for (size_t i=0; i<e->fSize; ++i, ++m)
c->set(i,*m);
return 0;
}
static int value_offset() {
return 0;
}
};
#endif
template <typename B> struct Proxy< StdBitSetHelper< B > > {
static CollFuncTable* Generate() {
return CFTGenerator<Pushback< StdBitSetHelper< B > > >::Generate()
;
}
};
} }
#endif // Reflex_CollectionProxy #endif // Reflex_CollectionProxy
 End of changes. 2 change blocks. 
1 lines changed or deleted 105 lines changed or added


 CombinedCalculator.h   CombinedCalculator.h 
// @(#)root/roostats:$Id: CombinedCalculator.h 28306 2009-04-21 10:04:57Z m oneta $ // @(#)root/roostats:$Id: CombinedCalculator.h 28963 2009-06-12 15:47:45Z w outer $
// Author: Kyle Cranmer, Lorenzo Moneta, Gregory Schott, Wouter Verkerke // Author: Kyle Cranmer, Lorenzo Moneta, Gregory Schott, Wouter Verkerke
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2008, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2008, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
#ifndef ROOSTATS_CombinedCalculator #ifndef ROOSTATS_CombinedCalculator
skipping to change at line 145 skipping to change at line 145
// Get the size of the test (eg. rate of Type I error) // Get the size of the test (eg. rate of Type I error)
virtual Double_t Size() const {return fSize;} virtual Double_t Size() const {return fSize;}
// Get the Confidence level for the test // Get the Confidence level for the test
virtual Double_t ConfidenceLevel() const {return 1.-fSize;} virtual Double_t ConfidenceLevel() const {return 1.-fSize;}
// set a workspace that owns all the necessary components for the ana lysis // set a workspace that owns all the necessary components for the ana lysis
virtual void SetWorkspace(RooWorkspace & ws) { virtual void SetWorkspace(RooWorkspace & ws) {
if (!fWS) if (!fWS)
fWS = &ws; fWS = &ws;
else{ else{
RooMsgService::instance().setGlobalKillBelow(RooMsgService::ERR OR) ; RooMsgService::instance().setGlobalKillBelow(RooFit::ERROR) ;
fWS->merge(ws); fWS->merge(ws);
RooMsgService::instance().setGlobalKillBelow(RooMsgService::DEB UG) ; RooMsgService::instance().setGlobalKillBelow(RooFit::DEBUG) ;
} }
} }
// Set the DataSet, add to the the workspace if not already there // Set the DataSet, add to the the workspace if not already there
virtual void SetData(RooAbsData & data) { virtual void SetData(RooAbsData & data) {
if (!fWS) { if (!fWS) {
fWS = new RooWorkspace(); fWS = new RooWorkspace();
fOwnsWorkspace = true; fOwnsWorkspace = true;
} }
if (! fWS->data( data.GetName() ) ){ if (! fWS->data( data.GetName() ) ){
RooMsgService::instance().setGlobalKillBelow(RooMsgService::ERR OR) ; RooMsgService::instance().setGlobalKillBelow(RooFit::ERROR) ;
fWS->import(data); fWS->import(data);
RooMsgService::instance().setGlobalKillBelow(RooMsgService::DEB UG) ; RooMsgService::instance().setGlobalKillBelow(RooFit::DEBUG) ;
} }
SetData( data.GetName() ); SetData( data.GetName() );
}; };
// Set the Pdf, add to the the workspace if not already there // Set the Pdf, add to the the workspace if not already there
virtual void SetPdf(RooAbsPdf& pdf) { virtual void SetPdf(RooAbsPdf& pdf) {
if (!fWS) if (!fWS)
fWS = new RooWorkspace(); fWS = new RooWorkspace();
if (! fWS->pdf( pdf.GetName() ) ){ if (! fWS->pdf( pdf.GetName() ) ){
RooMsgService::instance().setGlobalKillBelow(RooMsgService::ERR OR) ; RooMsgService::instance().setGlobalKillBelow(RooFit::ERROR) ;
fWS->import(pdf); fWS->import(pdf);
RooMsgService::instance().setGlobalKillBelow(RooMsgService::DEB UG) ; RooMsgService::instance().setGlobalKillBelow(RooFit::DEBUG) ;
} }
SetPdf( pdf.GetName() ); SetPdf( pdf.GetName() );
} }
// Set the Pdf, add to the the workspace if not already there // Set the Pdf, add to the the workspace if not already there
virtual void SetCommonPdf(RooAbsPdf& pdf) { SetPdf(pdf);} virtual void SetCommonPdf(RooAbsPdf& pdf) { SetPdf(pdf);}
// Set the Pdf, add to the the workspace if not already there // Set the Pdf, add to the the workspace if not already there
virtual void SetNullPdf(RooAbsPdf& pdf) { SetPdf(pdf);} virtual void SetNullPdf(RooAbsPdf& pdf) { SetPdf(pdf);}
// Set the Pdf, add to the the workspace if not already there // Set the Pdf, add to the the workspace if not already there
virtual void SetAlternatePdf(RooAbsPdf& pdf) { SetPdf(pdf);} virtual void SetAlternatePdf(RooAbsPdf& pdf) { SetPdf(pdf);}
 End of changes. 7 change blocks. 
7 lines changed or deleted 7 lines changed or added


 ConfidenceBelt.h   ConfidenceBelt.h 
skipping to change at line 18 skipping to change at line 18
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
#ifndef RooStats_ConfidenceBelt #ifndef RooStats_ConfidenceBelt
#define RooStats_ConfidenceBelt #define RooStats_ConfidenceBelt
#ifndef ROO_ARG_SET #ifndef ROO_ARG_SET
#include "RooArgSet.h" #include "RooArgSet.h"
#endif #endif
#ifndef ROO_TREE_DATA #ifndef ROO_TREE_DATA
#include "RooTreeData.h" #include "RooAbsData.h"
#endif #endif
#ifndef RooStats_ConfInterval #ifndef RooStats_ConfInterval
#include "RooStats/ConfInterval.h" #include "RooStats/ConfInterval.h"
#endif #endif
#include "RooStats/SamplingDistribution.h" #include "RooStats/SamplingDistribution.h"
#include "TRef.h" #include "TRef.h"
#include <vector> #include <vector>
#include <map> #include <map>
using namespace std; using namespace std;
namespace RooStats { namespace RooStats {
/////////////////////////// ///////////////////////////
class SamplingSummaryLookup { class SamplingSummaryLookup : public TObject {
typedef pair<Double_t, Double_t> AcceptanceCriteria; // defined by Conf idence level, leftside tail probability typedef pair<Double_t, Double_t> AcceptanceCriteria; // defined by Conf idence level, leftside tail probability
typedef map<Int_t, AcceptanceCriteria> LookupTable; // map ( Index, ( C L, leftside tail prob) ) typedef map<Int_t, AcceptanceCriteria> LookupTable; // map ( Index, ( C L, leftside tail prob) )
public: public:
SamplingSummaryLookup() {} SamplingSummaryLookup() {}
virtual ~SamplingSummaryLookup() {} virtual ~SamplingSummaryLookup() {}
void Add(Double_t cl, Double_t leftside){ void Add(Double_t cl, Double_t leftside){
// add cl,leftside pair to lookup table // add cl,leftside pair to lookup table
skipping to change at line 101 skipping to change at line 101
} }
private: private:
LookupTable fLookupTable; // map ( Index, ( CL, leftside tail prob) ) LookupTable fLookupTable; // map ( Index, ( CL, leftside tail prob) )
protected: protected:
ClassDef(SamplingSummaryLookup,1) // A simple class used by Confidence Belt ClassDef(SamplingSummaryLookup,1) // A simple class used by Confidence Belt
}; };
/////////////////////////// ///////////////////////////
class AcceptanceRegion { class AcceptanceRegion : public TObject{
public: public:
AcceptanceRegion() {} AcceptanceRegion() {}
virtual ~AcceptanceRegion() {} virtual ~AcceptanceRegion() {}
AcceptanceRegion(Int_t lu, Double_t ll, Double_t ul){ AcceptanceRegion(Int_t lu, Double_t ll, Double_t ul){
fLookupIndex = lu; fLookupIndex = lu;
fLowerLimit = ll; fLowerLimit = ll;
fUpperLimit = ul; fUpperLimit = ul;
} }
Int_t GetLookupIndex(){return fLookupIndex;} Int_t GetLookupIndex(){return fLookupIndex;}
skipping to change at line 126 skipping to change at line 126
Int_t fLookupIndex; // want a small footprint reference to the RooArgSe t for particular parameter point Int_t fLookupIndex; // want a small footprint reference to the RooArgSe t for particular parameter point
Double_t fLowerLimit; // lower limit on test statistic Double_t fLowerLimit; // lower limit on test statistic
Double_t fUpperLimit; // upper limit on test statistic Double_t fUpperLimit; // upper limit on test statistic
protected: protected:
ClassDef(AcceptanceRegion,1) // A simple class for acceptance regions used for ConfidenceBelt ClassDef(AcceptanceRegion,1) // A simple class for acceptance regions used for ConfidenceBelt
}; };
/////////////////////////// ///////////////////////////
class SamplingSummary { class SamplingSummary : public TObject {
public: public:
SamplingSummary() {} SamplingSummary() {}
virtual ~SamplingSummary() {} virtual ~SamplingSummary() {}
SamplingSummary(AcceptanceRegion& ar){ SamplingSummary(AcceptanceRegion& ar){
AddAcceptanceRegion(ar); AddAcceptanceRegion(ar);
} }
Int_t GetParameterPointIndex(){return fParameterPointIndex;} Int_t GetParameterPointIndex(){return fParameterPointIndex;}
SamplingDistribution* GetSamplingDistribution(){ SamplingDistribution* GetSamplingDistribution(){
return (SamplingDistribution*) fSamplingDistribution.GetObject(); // dereference TRef return (SamplingDistribution*) fSamplingDistribution.GetObject(); // dereference TRef
} }
skipping to change at line 164 skipping to change at line 164
ClassDef(SamplingSummary,1) // A summary of acceptance regions for con fidence belt ClassDef(SamplingSummary,1) // A summary of acceptance regions for con fidence belt
}; };
///////////////////////////////////////// /////////////////////////////////////////
class ConfidenceBelt : public TNamed { class ConfidenceBelt : public TNamed {
private: private:
SamplingSummaryLookup fSamplingSummaryLookup; SamplingSummaryLookup fSamplingSummaryLookup;
vector<SamplingSummary> fSamplingSummaries; // composite of several Acc eptanceRegions vector<SamplingSummary> fSamplingSummaries; // composite of several Acc eptanceRegions
RooTreeData* fParameterPoints; // either a histogram (RooDataHist) or a tree (RooDataSet) RooAbsData* fParameterPoints; // either a histogram (RooDataHist) or a tree (RooDataSet)
public: public:
// constructors,destructors // constructors,destructors
ConfidenceBelt(); ConfidenceBelt();
ConfidenceBelt(const char* name); ConfidenceBelt(const char* name);
ConfidenceBelt(const char* name, const char* title); ConfidenceBelt(const char* name, const char* title);
ConfidenceBelt(const char* name, RooTreeData&); ConfidenceBelt(const char* name, RooAbsData&);
ConfidenceBelt(const char* name, const char* title, RooTreeData&); ConfidenceBelt(const char* name, const char* title, RooAbsData&);
virtual ~ConfidenceBelt(); virtual ~ConfidenceBelt();
// add after creating a region // add after creating a region
void AddAcceptanceRegion(RooArgSet&, AcceptanceRegion region, Double_t cl=-1., Double_t leftside=-1.); void AddAcceptanceRegion(RooArgSet&, AcceptanceRegion region, Double_t cl=-1., Double_t leftside=-1.);
// add without creating a region, more useful for clients // add without creating a region, more useful for clients
void AddAcceptanceRegion(RooArgSet&, Double_t lower, Double_t upper, Do uble_t cl=-1., Double_t leftside=-1.); void AddAcceptanceRegion(RooArgSet& point, Int_t dataSetIndex, Double_t lower, Double_t upper, Double_t cl=-1., Double_t leftside=-1.);
AcceptanceRegion* GetAcceptanceRegion(RooArgSet&, Double_t cl=-1., Doub le_t leftside=-1.); AcceptanceRegion* GetAcceptanceRegion(RooArgSet&, Double_t cl=-1., Doub le_t leftside=-1.);
Double_t GetAcceptanceRegionMin(RooArgSet&, Double_t cl=-1., Double_t l eftside=-1.); Double_t GetAcceptanceRegionMin(RooArgSet&, Double_t cl=-1., Double_t l eftside=-1.);
Double_t GetAcceptanceRegionMax(RooArgSet&, Double_t cl=-1., Double_t l eftside=-1.); Double_t GetAcceptanceRegionMax(RooArgSet&, Double_t cl=-1., Double_t l eftside=-1.);
vector<Double_t> ConfidenceLevels() const ; vector<Double_t> ConfidenceLevels() const ;
// Method to return lower limit on a given parameter // Method to return lower limit on a given parameter
// Double_t LowerLimit(RooRealVar& param) ; // could provide, but misl eading? // Double_t LowerLimit(RooRealVar& param) ; // could provide, but misl eading?
// Double_t UpperLimit(RooRealVar& param) ; // could provide, but misleading? // Double_t UpperLimit(RooRealVar& param) ; // could provide, but misleading?
 End of changes. 7 change blocks. 
8 lines changed or deleted 8 lines changed or added


 Config.h   Config.h 
// @(#)root/tmva $Id: Config.h 26050 2008-11-01 09:18:41Z brun $ // @(#)root/tmva $Id: Config.h 29195 2009-06-24 10:39:49Z brun $
// Author: Andreas Hoecker, Joerg Stelzer, Fredrik Tegenfeldt, Helge Voss // Author: Andreas Hoecker, Joerg Stelzer, Fredrik Tegenfeldt, Helge Voss
/************************************************************************** ******** /************************************************************************** ********
* Project: TMVA - a Root-integrated toolkit for multivariate data analysis * * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
* Package: TMVA * * Package: TMVA *
* Class : Config * * Class : Config *
* Web : http://tmva.sourceforge.net * * Web : http://tmva.sourceforge.net *
* * * *
* Description: * * Description: *
* GLobal configuration settings (singleton) * * GLobal configuration settings (singleton) *
skipping to change at line 32 skipping to change at line 32
* MPI-K Heidelberg, Germany * * MPI-K Heidelberg, Germany *
* * * *
* Redistribution and use in source and binary forms, with or without * * Redistribution and use in source and binary forms, with or without *
* modification, are permitted according to the terms listed in LICENSE * * modification, are permitted according to the terms listed in LICENSE *
* (http://mva.sourceforge.net/license.txt) * * (http://mva.sourceforge.net/license.txt) *
************************************************************************** ********/ ************************************************************************** ********/
#ifndef ROOT_TMVA_Config #ifndef ROOT_TMVA_Config
#define ROOT_TMVA_Config #define ROOT_TMVA_Config
//////////////////////////////////////////////////////////////////////////
// //
// Config //
// //
// Singleton class for global configuration settings used by TMVA //
// //
//////////////////////////////////////////////////////////////////////////
#ifndef ROOT_Rtypes
#include "Rtypes.h" #include "Rtypes.h"
#endif
#ifndef ROOT_TString
#include "TString.h" #include "TString.h"
#ifndef ROOT_TMVA_MsgLogger
#include "TMVA/MsgLogger.h"
#endif #endif
namespace TMVA { namespace TMVA {
class MsgLogger;
class Config { class Config {
public: public:
static Config& Instance() { return fgConfigPtr ? *fgConfigPtr : *(fgC onfigPtr = new Config()); } static Config& Instance() { return fgConfigPtr ? *fgConfigPtr : *(fgC onfigPtr = new Config()); }
virtual ~Config(); static void DestroyInstance() { if (fgConfigPtr != 0) { delete fgC onfigPtr; fgConfigPtr = 0; } }
Bool_t UseColor() { return fUseColoredConsole; } Bool_t UseColor() const { return fUseColoredConsole; }
void SetUseColor( Bool_t uc ) { fUseColoredConsole = uc; } void SetUseColor( Bool_t uc ) { fUseColoredConsole = uc; }
Bool_t IsSilent() { return fSilent; } Bool_t IsSilent() const { return fSilent; }
void SetSilent( Bool_t s ) { fSilent = s; } void SetSilent( Bool_t s ) { fSilent = s; }
Bool_t WriteOptionsReference() { return fWriteOptionsReference; } Bool_t WriteOptionsReference() const { return fWriteOptionsReference; }
void SetWriteOptionsReference( Bool_t w ) { fWriteOptionsReference = w; } void SetWriteOptionsReference( Bool_t w ) { fWriteOptionsReference = w; }
Bool_t DrawProgressBar() const { return fDrawProgressBar; }
void SetDrawProgressBar( Bool_t d ) { fDrawProgressBar = d; }
public: public:
class VariablePlotting; class VariablePlotting;
class IONames; class IONames;
VariablePlotting& GetVariablePlotting() { return fVariablePlotting; } VariablePlotting& GetVariablePlotting() { return fVariablePlotting; }
IONames& GetIONames() { return fIONames; } IONames& GetIONames() { return fIONames; }
// publicly accessible global settings // publicly accessible global settings
class VariablePlotting { class VariablePlotting {
// data collection class to configure plotting of variables // data collection class to configure plotting of variables
public: public:
Float_t fTimesRMS; Float_t fTimesRMS;
Int_t fNbins1D; Int_t fNbins1D;
Int_t fNbins2D; Int_t fNbins2D;
Int_t fMaxNumOfAllowedVariablesForScatterPlots; Int_t fMaxNumOfAllowedVariablesForScatterPlots;
Int_t fNbinsXOfROCCurve; Int_t fNbinsXOfROCCurve;
} fVariablePlotting; // Customisable plotting properties } fVariablePlotting; // Customisable plotting properties
// for file names and similar // for file names and similar
class IONames { class IONames {
public: public:
TString fWeightFileDir; TString fWeightFileDir;
TString fWeightFileExtension; TString fWeightFileExtension;
TString fOptionsReferenceFileDir; TString fOptionsReferenceFileDir;
} fIONames; // Customisable weight file properties } fIONames; // Customisable weight file properties
private: private:
// private constructor // private constructor
Config(); Config();
virtual ~Config();
static Config* fgConfigPtr; static Config* fgConfigPtr;
private: private:
Bool_t fUseColoredConsole; // coloured standard output Bool_t fUseColoredConsole; // coloured standard output
Bool_t fSilent; // no output at all Bool_t fSilent; // no output at all
Bool_t fWriteOptionsReference; // if set true: Configurable objects w rite file with option reference Bool_t fWriteOptionsReference; // if set true: Configurable objects w rite file with option reference
Bool_t fDrawProgressBar; // draw progress bar to indicate train ing evolution
mutable MsgLogger fLogger; // message logger mutable MsgLogger* fLogger; // message logger
MsgLogger& Log() const { return *fLogger; }
ClassDef(Config,0) // Singleton class for global configuration settin gs ClassDef(Config,0) // Singleton class for global configuration settin gs
}; };
// global accessor // global accessor
Config& gConfig(); Config& gConfig();
} }
#endif #endif
 End of changes. 16 change blocks. 
9 lines changed or deleted 28 lines changed or added


 Configurable.h   Configurable.h 
// @(#)root/tmva $Id: Configurable.h 26050 2008-11-01 09:18:41Z brun $ // @(#)root/tmva $Id: Configurable.h 29195 2009-06-24 10:39:49Z brun $
// Author: Andreas Hoecker, Joerg Stelzer, Helge Voss // Author: Andreas Hoecker, Joerg Stelzer, Helge Voss
/************************************************************************** ******** /************************************************************************** ********
* Project: TMVA - a Root-integrated toolkit for multivariate data analysis * * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
* Package: TMVA * * Package: TMVA *
* Class : Configurable * * Class : Configurable *
* Web : http://tmva.sourceforge.net * * Web : http://tmva.sourceforge.net *
* * * *
* Description: * * Description: *
* Base class for all classes with option parsing * * Base class for all classes with option parsing *
skipping to change at line 38 skipping to change at line 38
#define ROOT_TMVA_Configurable #define ROOT_TMVA_Configurable
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// // // //
// Configurable // // Configurable //
// // // //
// Base class for all classes with option parsing // // Base class for all classes with option parsing //
// // // //
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
#include <ostream> #ifndef ROOT_TObject
#include "TObject.h" #include "TObject.h"
#endif
#ifndef ROOT_TList
#include "TList.h" #include "TList.h"
#ifndef ROOT_TMVA_MsgLogger
#include "TMVA/MsgLogger.h"
#endif #endif
#ifndef ROOT_TMVA_Option #ifndef ROOT_TMVA_Option
#include "TMVA/Option.h" #include "TMVA/Option.h"
#endif #endif
namespace TMVA { namespace TMVA {
class MsgLogger; class Configurable : public TObject {
class Configurable : public virtual TObject {
public: public:
// constructur // constructur
Configurable( const TString& theOption = "" ); Configurable( const TString& theOption = "" );
// default destructur // default destructur
virtual ~Configurable(); virtual ~Configurable();
// parse the internal option string // parse the internal option string
void ParseOptions( Bool_t verbose = kTRUE); virtual void ParseOptions();
// print list of defined options // print list of defined options
void PrintOptions() const; void PrintOptions() const;
virtual const char* GetName() const { return GetConfigName(); } virtual const char* GetName() const { return GetConfigName(); }
const char* GetConfigName() const { return fConfigName; } const char* GetConfigName() const { return fConfigName; }
const char* GetConfigDescription() const { return fConfigDescription; } const char* GetConfigDescription() const { return fConfigDescription; }
void SetConfigName ( const char* n ) { fConfigName = TSt ring(n); } void SetConfigName ( const char* n ) { fConfigName = TSt ring(n); }
void SetConfigDescription( const char* d ) { fConfigDescription = TSt ring(d); } void SetConfigDescription( const char* d ) { fConfigDescription = TSt ring(d); }
skipping to change at line 92 skipping to change at line 89
// Add a predefined value to the last declared option // Add a predefined value to the last declared option
template<class T> template<class T>
void AddPreDefVal(const T&); void AddPreDefVal(const T&);
void CheckForUnusedOptions() const; void CheckForUnusedOptions() const;
const TString& GetOptions() const { return fOptions; } const TString& GetOptions() const { return fOptions; }
void SetOptions(const TString& s) { fOptions = s; } void SetOptions(const TString& s) { fOptions = s; }
void WriteOptionsToStream ( std::ostream& o, const TString& prefix )
const;
void ReadOptionsFromStream( istream& istr );
void AddOptionsXMLTo( void* parent ) const;
void ReadOptionsFromXML( void* node );
protected: protected:
Bool_t LooseOptionCheckingEnabled() const { return fLooseOptionChecki ngEnabled; } Bool_t LooseOptionCheckingEnabled() const { return fLooseOptionChecki ngEnabled; }
void EnableLooseOptions( Bool_t b = kTRUE ) { fLooseOptionCheckingE nabled = b; } void EnableLooseOptions( Bool_t b = kTRUE ) { fLooseOptionCheckingE nabled = b; }
void WriteOptionsToStream ( std::ostream& o, const TString& p refix ) const;
void WriteOptionsReferenceToFile(); void WriteOptionsReferenceToFile();
void ReadOptionsFromStream ( istream& istr );
void ResetSetFlag(); void ResetSetFlag();
const TString& GetReferenceFile() const { return fReferenceFile; } const TString& GetReferenceFile() const { return fReferenceFile; }
private: private:
// splits the option string at ':' and fills the list 'loo' with the primitive strings // splits the option string at ':' and fills the list 'loo' with the primitive strings
void SplitOptions(const TString& theOpt, TList& loo) const; void SplitOptions(const TString& theOpt, TList& loo) const;
TString fOptions; // options string TString fOptions; //! options string
Bool_t fLooseOptionCheckingEnabled; // checker for option Bool_t fLooseOptionCheckingEnabled; //! checker for option
string string
// classes and method related to easy and flexible option parsing // classes and method related to easy and flexible option parsing
OptionBase* fLastDeclaredOption; // last declared option OptionBase* fLastDeclaredOption; //! last declared option
TList fListOfOptions; // option list TList fListOfOptions; //! option list
TString fConfigName; // the name of this configurable TString fConfigName; // the name of this configurable
TString fConfigDescription; // description of this configurable TString fConfigDescription; // description of this configurable
TString fReferenceFile; // reference file for options writi ng TString fReferenceFile; // reference file for options writi ng
public: protected:
// the mutable declaration is needed to use the logger in const metho ds // the mutable declaration is needed to use the logger in const metho ds
mutable MsgLogger fLogger; // message logger MsgLogger& Log() const { return *fLogger; }
public:
// set message type
void SetMsgType( EMsgType t ) { fLogger->SetMinType(t); }
private: private:
mutable MsgLogger* fLogger; //! message logger
template <class T> template <class T>
void AssignOpt( const TString& name, T& valAssign ) const; void AssignOpt( const TString& name, T& valAssign ) const;
public: public:
ClassDef(Configurable,0) // Virtual base class for all TMVA method ClassDef(Configurable,0) // Virtual base class for all TMVA method
}; };
} // namespace TMVA } // namespace TMVA
// Template Declarations go here // Template Declarations go here
//______________________________________________________________________ //______________________________________________________________________
template <class T> template <class T>
TMVA::OptionBase* TMVA::Configurable::DeclareOptionRef( T& ref, const TStri ng& name, const TString& desc) TMVA::OptionBase* TMVA::Configurable::DeclareOptionRef( T& ref, const TStri ng& name, const TString& desc)
skipping to change at line 176 skipping to change at line 186
} }
//______________________________________________________________________ //______________________________________________________________________
template <class T> template <class T>
void TMVA::Configurable::AssignOpt(const TString& name, T& valAssign) const void TMVA::Configurable::AssignOpt(const TString& name, T& valAssign) const
{ {
// assign an option // assign an option
TObject* opt = fListOfOptions.FindObject(name); TObject* opt = fListOfOptions.FindObject(name);
if (opt!=0) valAssign = ((Option<T>*)opt)->Value(); if (opt!=0) valAssign = ((Option<T>*)opt)->Value();
else else
fLogger << kFATAL << "Option \"" << name Log() << kFATAL << "Option \"" << name
<< "\" not declared, please check the syntax of your option s << "\" not declared, please check the syntax of your option str
tring" << Endl; ing" << Endl;
} }
#endif #endif
 End of changes. 17 change blocks. 
22 lines changed or deleted 33 lines changed or added


 CrossEntropy.h   CrossEntropy.h 
// @(#)root/tmva $Id: CrossEntropy.h 20882 2007-11-19 11:31:26Z rdm $ // @(#)root/tmva $Id: CrossEntropy.h 29122 2009-06-22 06:51:30Z brun $
// Author: Andreas Hoecker, Joerg Stelzer, Helge Voss, Kai Voss // Author: Andreas Hoecker, Joerg Stelzer, Helge Voss, Kai Voss
/************************************************************************** ******** /************************************************************************** ********
* Project: TMVA - a Root-integrated toolkit for multivariate data analysis * * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
* Package: TMVA * * Package: TMVA *
* Class : CrossEntropy * * Class : CrossEntropy *
* Web : http://tmva.sourceforge.net * * Web : http://tmva.sourceforge.net *
* * * *
* Description: Implementation of the CrossEntropy as separation criterion * * Description: Implementation of the CrossEntropy as separation criterion *
* * * *
* Authors (alphabetical): * * Authors (alphabetical): *
* Andreas Hoecker <Andreas.Hocker@cern.ch> - CERN, Switzerland * * Andreas Hoecker <Andreas.Hocker@cern.ch> - CERN, Switzerland *
* Xavier Prudent <prudent@lapp.in2p3.fr> - LAPP, France *
* Helge Voss <Helge.Voss@cern.ch> - MPI-K Heidelberg, German y * * Helge Voss <Helge.Voss@cern.ch> - MPI-K Heidelberg, German y *
* Kai Voss <Kai.Voss@cern.ch> - U. of Victoria, Canada * * Kai Voss <Kai.Voss@cern.ch> - U. of Victoria, Canada *
* * * *
* Copyright (c) 2005: * * Copyright (c) 2005: *
* CERN, Switzerland * * CERN, Switzerland *
* U. of Victoria, Canada * * U. of Victoria, Canada *
* Heidelberg U., Germany * * Heidelberg U., Germany *
* LAPP, Annecy, France *
* * * *
* Redistribution and use in source and binary forms, with or without * * Redistribution and use in source and binary forms, with or without *
* modification, are permitted according to the terms listed in LICENSE * * modification, are permitted according to the terms listed in LICENSE *
* (http://tmva.sourceforge.net/LICENSE) * * (http://tmva.sourceforge.net/LICENSE) *
************************************************************************** ********/ ************************************************************************** ********/
#ifndef ROOT_TMVA_CrossEntropy #ifndef ROOT_TMVA_CrossEntropy
#define ROOT_TMVA_CrossEntropy #define ROOT_TMVA_CrossEntropy
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
 End of changes. 3 change blocks. 
3 lines changed or deleted 1 lines changed or added


 DataSet.h   DataSet.h 
// @(#)root/tmva $Id: DataSet.h 26050 2008-11-01 09:18:41Z brun $ // @(#)root/tmva $Id: DataSet.h 29195 2009-06-24 10:39:49Z brun $
// Author: Andreas Hoecker, Joerg Stelzer, Helge Voss // Author: Andreas Hoecker, Joerg Stelzer, Helge Voss
/************************************************************************** ******** /************************************************************************** ********
* Project: TMVA - a Root-integrated toolkit for multivariate data analysis * * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
* Package: TMVA * * Package: TMVA *
* Class : DataSet * * Class : DataSet *
* Web : http://tmva.sourceforge.net * * Web : http://tmva.sourceforge.net *
* * * *
* Description: * * Description: *
* Contains all the data information * * Contains all the data information *
skipping to change at line 39 skipping to change at line 39
#define ROOT_TMVA_DataSet #define ROOT_TMVA_DataSet
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// // // //
// DataSet // // DataSet //
// // // //
// Class that contains all the data information // // Class that contains all the data information //
// // // //
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
#include <vector>
#include <map>
#include <string>
#ifndef ROOT_TObject
#include "TObject.h" #include "TObject.h"
#endif
#ifndef ROOT_TString
#include "TString.h" #include "TString.h"
#endif
#ifndef ROOT_TTree
#include "TTree.h" #include "TTree.h"
#endif
#ifndef ROOT_TCut
#include "TCut.h" #include "TCut.h"
#include "TTreeFormula.h" #endif
#include "TMatrixD.h" #ifndef ROOT_TMatrixDfwd
#include "TMatrixDfwd.h"
#endif
#ifndef ROOT_TPrincipal
#include "TPrincipal.h" #include "TPrincipal.h"
#endif
#ifndef ROOT_TRandom3
#include "TRandom3.h"
#endif
#ifndef ROOT_TMVA_Types #ifndef ROOT_TMVA_Types
#include "TMVA/Types.h" #include "TMVA/Types.h"
#endif #endif
#ifndef ROOT_TMVA_VariableInfo #ifndef ROOT_TMVA_VariableInfo
#include "TMVA/VariableInfo.h" #include "TMVA/VariableInfo.h"
#endif #endif
#ifndef ROOT_TMVA_Event
#include "TMVA/Event.h"
#endif
#ifndef ROOT_TMVA_MsgLogger
#include "TMVA/MsgLogger.h"
#endif
#ifndef ROOT_TMVA_VariableTransformBase
#include "TMVA/VariableTransformBase.h"
#endif
namespace TMVA { namespace TMVA {
class TreeInfo { class Event;
class DataSetInfo;
class MsgLogger;
class Results;
class DataSet {
public: public:
TreeInfo( TTree* tr, Double_t weight=1.0, Types::ETreeType tt = Types DataSet(const DataSetInfo&);
::kMaxTreeType ) virtual ~DataSet();
: fTree(tr), fWeight(weight), fTreeType(tt) {}
~TreeInfo() {}
TTree* GetTree() const { return fTree; }
Double_t GetWeight() const { return fWeight; }
Types::ETreeType GettreeType() const { return fTreeType; }
private: void AddEvent( Event *, Types::ETreeType );
TTree* fTree; //! pointer to the tree Long64_t GetNEvents( Types::ETreeType type = Types::kMaxTreeType ) c
Double_t fWeight; //! weight for the tree onst;
Types::ETreeType fTreeType; //! tree is for training/testing/both Long64_t GetNTrainingEvents() const { return GetNEvents
}; (Types::kTraining); }
Long64_t GetNTestEvents() const { return GetNEvents
(Types::kTesting); }
Event* GetEvent() const;
Event* GetEvent ( Long64_t ievt ) const { fCurrentEventIdx
= ievt; return GetEvent(); }
Event* GetTrainingEvent( Long64_t ievt ) const { return GetEvent(i
evt, Types::kTraining); }
Event* GetTestEvent ( Long64_t ievt ) const { return GetEvent(i
evt, Types::kTesting); }
Event* GetEvent ( Long64_t ievt, Types::ETreeType type ) co
nst {
fCurrentTreeIdx = TreeIndex(type); fCurrentEventIdx = ievt; return
GetEvent();
}
UInt_t GetNVariables() const;
UInt_t GetNTargets() const;
UInt_t GetNSpectators() const;
void SetCurrentEvent( Long64_t ievt ) const { fCurrentEv
entIdx = ievt; }
void SetCurrentType ( Types::ETreeType type ) const { fCurrentTr
eeIdx = TreeIndex(type); }
Types::ETreeType GetCurrentType() const;
void SetEventCollection( std::vector<Event*>*,
Types::ETreeType );
const std::vector<Event*>& GetEventCollection( Types::ETreeType type
= Types::kMaxTreeType ) const;
const TTree* GetEventCollectionAsTree();
Long64_t GetNEvtSigTest();
Long64_t GetNEvtBkgdTest();
Long64_t GetNEvtSigTrain();
Long64_t GetNEvtBkgdTrain();
Bool_t HasNegativeEventWeights() const { return fHasNegativeEventW
eights; }
Results* GetResults ( const TString &,
Types::ETreeType type,
Types::EAnalysisType analysistype );
void SetVerbose( Bool_t ) {}
// sets the number of blocks to which the training set is divided,
// some of which are given to the Validation sample. As default they
belong all to Training set.
void DivideTrainingSet( UInt_t blockNum );
// sets a certrain block from the origin training set to belong to ei
ther Training or Validation set
void MoveTrainingBlock( Int_t blockInd,Types::ETreeType dest, Bo
ol_t applyChanges = kTRUE );
void IncrementNClassEvents( Int_t type, UInt_t classNumber );
Long64_t GetNClassEvents ( Int_t type, UInt_t classNumber );
void ClearNClassEvents ( Int_t type );
TTree* GetTree( Types::ETreeType type );
// accessors for random and importance sampling
void InitSampling( Float_t fraction, Float_t weight, UInt_t seed
= 0 );
void EventResult( Bool_t successful, Long64_t evtNumber = -1 );
void CreateSampling() const;
class DataSet { UInt_t TreeIndex(Types::ETreeType type) const;
public: private:
// data members
DataSet(); DataSet();
virtual ~DataSet(); void DestroyCollection( Types::ETreeType type, Bool_t deleteEvents );
const char* GetName() const { return "DataSet"; } const DataSetInfo& fdsi; //! datasetinfo that created this dataset
// the tree data std::vector<Event*>::iterator fEvtCollIt;
void AddSignalTree ( TTree* tr, Double_t weight=1.0, Types::ET std::vector< std::vector<Event*>* > fEventCollection; //! list of ev
reeType tt = Types::kMaxTreeType ); ents for training/testing/...
void AddBackgroundTree( TTree* tr, Double_t weight=1.0, Types::ET
reeType tt = Types::kMaxTreeType );
UInt_t NSignalTrees() const { return fTreeCollection
[Types::kSignal].size(); }
UInt_t NBackgroundTrees() const { return fTreeCollection
[Types::kBackground].size(); }
const TreeInfo& SignalTreeInfo(Int_t i) const { return fTreeColl
ection[Types::kSignal][i]; }
const TreeInfo& BackgroundTreeInfo(Int_t i) const { return fTreeColl
ection[Types::kBackground][i]; }
void ClearSignalTreeList() { fTreeCollection[Types::kSignal].
clear(); }
void ClearBackgroundTreeList() { fTreeCollection[Types::kBackgrou
nd].clear(); }
// the variable data
void AddVariable( const TString& expression, char varType='F', vo
id* external = 0 );
void AddVariable( const TString& expression, Double_t min, Double
_t max, char varType, void* external = 0 );
std::vector<VariableInfo>& GetVariableInfos() { return fVariables; }
UInt_t GetNVariables() const { return fVariables.siz
e(); }
char GetVarType(Int_t i) const { return fVariables[i].
GetVarType(); }
Int_t FindVar(const TString& var) const;
const TString& GetExpression(Int_t i) const { return fVariables[
i].GetExpression(); }
const TString& GetInternalVarName(Int_t i) const { return fVariables[
i].GetInternalVarName(); }
// the cut
void SetCuts( const TString& scut, const TString& bcut ) { SetCuts(TC
ut(scut), TCut(bcut)); }
void SetCuts( const TCut& scut, const TCut& bcut ) { fCutSig =
scut; fCutBkg = bcut; }
void SetMultiCut( const TString& cut ) { SetMultiCut(TCut(cut)); }
void SetMultiCut( const TCut& cut ) { fMultiCut = cut; }
const TCut& CutSig() const { return fCutSig; }
const TCut& CutBkg() const { return fCutBkg; }
const char* CutSigS() const { return fCutSig.GetTitle(); }
const char* CutBkgS() const { return fCutBkg.GetTitle(); }
Bool_t HasCuts() const { return TString(CutSig()) != "" || TStri
ng(CutBkg()) != ""; }
// the internal trees
TTree* GetTrainingTree() const { return fTrainingTree; }
TTree* GetTestTree() const { return fTestTree; }
TTree* GetMultiCutTestTree() const { return fMultiCutTestTree; }
void SetTrainingTree (TTree* tr) { fTrainingTree = tr; }
void SetTestTree (TTree* tr) { fTestTree = tr; }
void SetMultiCutTestTree(TTree* tr) { fMultiCutTestTree = tr; }
// ROOT stuff
TDirectory* LocalRootDir() const { return fLocalRootDir; }
TDirectory* BaseRootDir() const { return fBaseRootDir; }
void SetBaseRootDir(TDirectory* dir) { fBaseRootDir = dir; }
void SetLocalRootDir(TDirectory* dir) { fLocalRootDir = dir; }
// data preparation
// prepare input tree for training
void PrepareForTrainingAndTesting( const TString & splitOpt );
// auxiliary functions to compute correlations
void GetCorrelationMatrix( Bool_t isSignal, TMatrixDBase* mat );
void GetCovarianceMatrix ( Bool_t isSignal, TMatrixDBase*, Bool_t nor
m = kFALSE );
void SetVerbose( Bool_t v=kTRUE ) { fVerbose = v; }
// finds transformation in map
VariableTransformBase* FindTransform( Types::EVariableTransform trans
form ) const;
// finds transformation in map or creates new one
VariableTransformBase* GetTransform( Types::EVariableTransform transf
orm );
// event reading
Bool_t ReadEvent ( TTree* tr, Long64_t evidx ) const;
Bool_t ReadTrainingEvent( Long64_t evidx ) const { return ReadEvent(G
etTrainingTree(), evidx ); }
Bool_t ReadTestEvent ( Long64_t evidx ) const { return ReadEvent(G
etTestTree(), evidx ); }
TMVA::Event& GetEvent() { if (fEvent==0) fEvent = new TMVA::Event(fVa
riables); return *fEvent; }
UInt_t GetCurrentEvtIdx() const { return fCurrentEvtIdx; } // the cur
rent event (to avoid reading of the same event)
const TMVA::Event& GetEvent() const { return *fEvent; } // Warning, t
his requires an existing event object
// correlation matrix
const TMatrixD* CorrelationMatrix( Types::ESBType sigbgd ) const { re
turn fDecorrMatrix[sigbgd]; }
// the weight
void SetSignalWeightExpression ( const TString& expr ) { fWeightEx
p[Types::kSignal] = expr; }
void SetBackgroundWeightExpression( const TString& expr ) { fWeightEx
p[Types::kBackground] = expr; }
Bool_t HasNegativeEventWeights() const { return fHasNegativeEventWeig
hts; }
// some dataset stats
Int_t GetNEvtTrain() const { return fDataStats[Types::kTraining][
Types::kSBBoth]; }
Int_t GetNEvtSigTrain() const { return fDataStats[Types::kTraining][
Types::kSignal]; }
Int_t GetNEvtBkgdTrain() const { return fDataStats[Types::kTraining][
Types::kBackground]; }
Int_t GetNEvtTest() const { return fDataStats[Types::kTesting][T
ypes::kSBBoth]; }
Int_t GetNEvtSigTest() const { return fDataStats[Types::kTesting][T
ypes::kSignal]; }
Int_t GetNEvtBkgdTest() const { return fDataStats[Types::kTesting][T
ypes::kBackground]; }
// resets branch addresses to current event
void ResetBranchAndEventAddresses( TTree* );
void ResetCurrentTree() { fCurrentTree = 0; }
private:
void ChangeToNewTree( TTree* tr, Int_t sb ); std::vector< std::map< TString, Results* > > fResults; //! [
void PrintCorrelationMatrix( TTree* theTree ); train/test/...][method-identifier]
// verbosity mutable UInt_t fCurrentTreeIdx;
Bool_t Verbose() { return fVerbose; } mutable Long64_t fCurrentEventIdx;
// event sampling
std::vector<Char_t> fSampling; // random or
importance sampling (not all events are taken) !! Bool_t are stored ( no v
ector<bool> taken for speed (performance) issues )
std::vector<Int_t> fSamplingNEvents; // number of
events which should be sampled
std::vector<Float_t> fSamplingWeight; // weight ch
ange factor [weight is indicating if sampling is random (1.0) or importance
(<1.0)]
mutable std::vector< std::vector< std::pair< Float_t, Long64_t >* > >
fSamplingEventList; // weights and indices for sampling
mutable std::vector< std::vector< std::pair< Float_t, Long64_t >* > >
fSamplingSelected; // selected events
TRandom3 *fSamplingRandom; // random ge
nerator for sampling
// further things
std::vector< std::vector<Long64_t> > fClassEvents; //! number o
f events of class 0,1,2,... in training[0]
// and testi
ng[1] (+validation, trainingoriginal)
Bool_t fHasNegativeEventWeights; // true if a
t least one signal or bkg event has negative weight
mutable MsgLogger* fLogger; // message logger
MsgLogger& Log() const { return *fLogger; }
std::vector<Char_t> fBlockBelongToTraining; // when divi
ding the dataset to blocks, sets whether
// the certa
in block is in the Training set or else
// in the va
lidation set
// boolean a
re stored, taken vector<Char_t> for performance reasons (instead of vector<
Bool_t>)
Long64_t fTrainingBlockSize; // block siz
e into which the training dataset is divided
// data members void ApplyTrainingBlockDivision();
void ApplyTrainingSetDivision();
};
}
// ROOT stuff //_______________________________________________________________________
TDirectory* fLocalRootDir; //! the current directo inline UInt_t TMVA::DataSet::TreeIndex(Types::ETreeType type) const
ry, where things are created {
TDirectory* fBaseRootDir; //! the base directory, switch (type) {
usually the root dir of a ROOT-file case Types::kMaxTreeType : return fCurrentTreeIdx;
case Types::kTraining : return 0;
// input trees case Types::kTesting : return 1;
std::vector<TMVA::TreeInfo> fTreeCollection[2]; //! list of sign case Types::kValidation : return 2;
al and background trees/weights case Types::kTrainingOriginal : return 3;
default : return fCurrentTreeIdx;
// expressions/formulas }
std::vector<TMVA::VariableInfo> fVariables; //! list of varia }
ble expressions/internal names
std::vector<TString> fVariableStrings; //! list of variable ex
pressions
std::vector<TTreeFormula*> fInputVarFormulas; // local formulas of th
e same
TCut fCutSig; // the pretraining cut
TCut fCutBkg; // the pretraining cut
TCut fMultiCut; // phase-space cut
TTreeFormula* fCutSigF; // the pretraining cut
as formula
TTreeFormula* fCutBkgF; // the pretraining cut
as formula
TTree* fTrainingTree; //! tree used for train
ing
TTree* fTestTree; //! tree used for testi
ng
TTree* fMultiCutTestTree; //! tree used for testi
ng of multicut method
// data stats
UInt_t fDataStats[Types::kMaxTreeType][Types::kMa
xSBType]; //! statistics of the dataset for training/test tree
TMatrixD* fDecorrMatrix[2]; //! Decorrelation ma
trix [signal/background]
std::map<TMVA::Types::EVariableTransform,TMVA::VariableTransformBase*
> fVarTransforms; //! Registered variable transformations
// verbosity
Bool_t fVerbose; //! Verbosity
// the event
mutable TMVA::Event* fEvent; //! the event
mutable TTree* fCurrentTree; //! the tree, events ar
e currently read from
mutable UInt_t fCurrentEvtIdx; //! the current event (
to avoid reading of the same event)
// the weight
TString fWeightExp[2]; //! the input formula s
tring that is the weight
TTreeFormula* fWeightFormula[2]; //! local weight formul
a
Bool_t fExplicitTrainTest[2]; //! if set to true t //_______________________________________________________________________
he user has specified training and testing data explicitly inline TMVA::Types::ETreeType TMVA::DataSet::GetCurrentType() const
Bool_t fHasNegativeEventWeights; // true if at lea {
st one signal or bkg event has negative weight switch (fCurrentTreeIdx) {
case 0: return Types::kTraining;
case 1: return Types::kTesting;
case 2: return Types::kValidation;
case 3: return Types::kTrainingOriginal;
}
return Types::kMaxTreeType;
}
mutable MsgLogger fLogger; //! message logger //_______________________________________________________________________
inline Long64_t TMVA::DataSet::GetNEvents(Types::ETreeType type) const
{
Int_t treeIdx = TreeIndex(type);
if (fSampling.size() > UInt_t(treeIdx) && fSampling.at(treeIdx)) {
return fSamplingSelected.at(treeIdx).size();
}
return GetEventCollection(type).size();
}
}; //_______________________________________________________________________
inline const std::vector<TMVA::Event*>& TMVA::DataSet::GetEventCollection(
TMVA::Types::ETreeType type ) const
{
return *(fEventCollection.at(TreeIndex(type)));
} }
#endif #endif
 End of changes. 25 change blocks. 
228 lines changed or deleted 192 lines changed or added


 DataVector.h   DataVector.h 
// @(#)root/mathcore:$Id: DataVector.h 27169 2009-01-16 09:46:05Z moneta $ // @(#)root/mathcore:$Id: DataVector.h 28946 2009-06-11 15:39:14Z moneta $
// Author: L. Moneta Wed Aug 30 11:15:23 2006 // Author: L. Moneta Wed Aug 30 11:15:23 2006
/********************************************************************** /**********************************************************************
* * * *
* Copyright (c) 2006 LCG ROOT Math Team, CERN/PH-SFT * * Copyright (c) 2006 LCG ROOT Math Team, CERN/PH-SFT *
* * * *
* * * *
**********************************************************************/ **********************************************************************/
// Header file for class DataVector // Header file for class DataVector
skipping to change at line 65 skipping to change at line 65
FitData() {} FitData() {}
/// dummy virtual destructor /// dummy virtual destructor
virtual ~FitData() {} virtual ~FitData() {}
/// construct passing options and default data range /// construct passing options and default data range
FitData(const DataOptions & opt) : FitData(const DataOptions & opt) :
fOptions(opt) fOptions(opt)
{} {}
/// construct passing range and default options
FitData(const DataRange & range) :
fRange(range)
{}
/// construct passing options and data range /// construct passing options and data range
FitData (const DataOptions & opt, const DataRange & range) : FitData (const DataOptions & opt, const DataRange & range) :
fOptions(opt), fOptions(opt),
fRange(range) fRange(range)
{} {}
/** /**
access to options access to options
*/ */
const DataOptions & Opt() const { return fOptions; } const DataOptions & Opt() const { return fOptions; }
DataOptions & Opt() { return fOptions; } DataOptions & Opt() { return fOptions; }
/** /**
access to range access to range
*/ */
const DataRange & Range() const { return fRange; } const DataRange & Range() const { return fRange; }
// range cannot be modified afterwards
// since fit method functions use all data
/** /**
define a max size to avoid allocating too large arrays define a max size to avoid allocating too large arrays
*/ */
static unsigned int MaxSize() { static unsigned int MaxSize() {
return (unsigned int) (-1) / sizeof (double); return (unsigned int) (-1) / sizeof (double);
} }
private: private:
DataOptions fOptions; DataOptions fOptions;
skipping to change at line 181 skipping to change at line 189
// // usefule typedef's of DataVector // // usefule typedef's of DataVector
// class BinPoint; // class BinPoint;
// // declaration for various type of data vectors // // declaration for various type of data vectors
// typedef DataVector<ROOT::Fit::BinPoint> BinData ; // typedef DataVector<ROOT::Fit::BinPoint> BinData ;
// typedef DataVector<ROOT::Fit::BinPoint>::const_iterator BinData Iterator; // typedef DataVector<ROOT::Fit::BinPoint>::const_iterator BinData Iterator;
/** /**
class maintaining a pointer to external data class maintaining a pointer to external data
Using this class avoids copying the data when performing a fit Using this class avoids copying the data when performing a fit
NOTE: this class is not thread-safe and should not be used in parallel f its
@ingroup FitData @ingroup FitData
*/ */
class DataWrapper { class DataWrapper {
public: public:
/** /**
specialized constructor for 1D data without errors and values specialized constructor for 1D data without errors and values
skipping to change at line 283 skipping to change at line 292
// use size_t for dim to avoid allocating huge vector on 64 bits when dim=-1 // use size_t for dim to avoid allocating huge vector on 64 bits when dim=-1
fDim(dim), fDim(dim),
fValues(val), fValues(val),
fErrors(eval), fErrors(eval),
fCoords(std::vector<const double * >(coordItr, coordItr+dim) ), fCoords(std::vector<const double * >(coordItr, coordItr+dim) ),
fErrCoords(std::vector<const double * >(errItr, errItr+dim) ), fErrCoords(std::vector<const double * >(errItr, errItr+dim) ),
fX(std::vector<double>(dim) ), fX(std::vector<double>(dim) ),
fErr(std::vector<double>(dim) ) fErr(std::vector<double>(dim) )
{ } { }
// destructor
~DataWrapper() {
//printf("Delete Data wrapper\n");
// no operations
}
// use default copy constructor and assignment operator // use default copy constructor and assignment operator
// copy the pointer of the data not the data // copy the pointer of the data not the data
const double * Coords(unsigned int ipoint) const { const double * Coords(unsigned int ipoint) const {
for (unsigned int i = 0; i < fDim; ++i) { for (unsigned int i = 0; i < fDim; ++i) {
const double * x = fCoords[i]; const double * x = fCoords[i];
assert (x != 0); assert (x != 0);
fX[i] = x[ipoint]; fX[i] = x[ipoint];
} }
return &fX.front(); return &fX.front();
 End of changes. 5 change blocks. 
1 lines changed or deleted 16 lines changed or added


 DebuggingTestStat.h   DebuggingTestStat.h 
skipping to change at line 73 skipping to change at line 73
// Get the TestStatistic // Get the TestStatistic
virtual const RooAbsArg* GetTestStatistic() const {return fTestStati stic;} virtual const RooAbsArg* GetTestStatistic() const {return fTestStati stic;}
private: private:
RooRealVar* fTestStatistic; RooRealVar* fTestStatistic;
TRandom* fRand; TRandom* fRand;
protected: protected:
ClassDef(DebuggingTestStat,1) ClassDef(DebuggingTestStat,1) // A concrete implementation of the T estStatistic interface, useful for debugging.
}; };
} }
#endif #endif
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 DecisionTree.h   DecisionTree.h 
// @(#)root/tmva $Id: DecisionTree.h 26050 2008-11-01 09:18:41Z brun $ // @(#)root/tmva $Id: DecisionTree.h 29122 2009-06-22 06:51:30Z brun $
// Author: Andreas Hoecker, Joerg Stelzer, Helge Voss, Kai Voss // Author: Andreas Hoecker, Joerg Stelzer, Helge Voss, Kai Voss
/************************************************************************** ******** /************************************************************************** ********
* Project: TMVA - a Root-integrated toolkit for multivariate data analysis * * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
* Package: TMVA * * Package: TMVA *
* Class : DecisionTree * * Class : DecisionTree *
* Web : http://tmva.sourceforge.net * * Web : http://tmva.sourceforge.net *
* * * *
* Description: * * Description: *
* Implementation of a Decision Tree * * Implementation of a Decision Tree *
* * * *
* Authors (alphabetical): * * Authors (alphabetical): *
* Andreas Hoecker <Andreas.Hocker@cern.ch> - CERN, Switzerland * * Andreas Hoecker <Andreas.Hocker@cern.ch> - CERN, Switzerland *
* Xavier Prudent <prudent@lapp.in2p3.fr> - LAPP, France *
* Helge Voss <Helge.Voss@cern.ch> - MPI-K Heidelberg, German y * * Helge Voss <Helge.Voss@cern.ch> - MPI-K Heidelberg, German y *
* Kai Voss <Kai.Voss@cern.ch> - U. of Victoria, Canada * * Kai Voss <Kai.Voss@cern.ch> - U. of Victoria, Canada *
* * * *
* Copyright (c) 2005: * * Copyright (c) 2005: *
* CERN, Switzerland * * CERN, Switzerland *
* U. of Victoria, Canada * * U. of Victoria, Canada *
* MPI-K Heidelberg, Germany * * MPI-K Heidelberg, Germany *
* LAPP, Annecy, France *
* * * *
* Redistribution and use in source and binary forms, with or without * * Redistribution and use in source and binary forms, with or without *
* modification, are permitted according to the terms listed in LICENSE * * modification, are permitted according to the terms listed in LICENSE *
* (http://mva.sourceforge.net/license.txt) * * (http://mva.sourceforge.net/license.txt) *
* * * *
************************************************************************** ********/ ************************************************************************** ********/
#ifndef ROOT_TMVA_DecisionTree #ifndef ROOT_TMVA_DecisionTree
#define ROOT_TMVA_DecisionTree #define ROOT_TMVA_DecisionTree
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// // // //
// DecisionTree // // DecisionTree //
// // // //
// Implementation of a Decision Tree // // Implementation of a Decision Tree //
// // // //
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
#ifndef ROOT_TH2
#include "TH2.h" #include "TH2.h"
#include "TRandom.h" #endif
#include "TRandom2.h"
#ifndef ROOT_TMVA_Types
#include "TMVA/Types.h"
#endif
#ifndef ROOT_TMVA_DecisionTreeNode #ifndef ROOT_TMVA_DecisionTreeNode
#include "TMVA/DecisionTreeNode.h" #include "TMVA/DecisionTreeNode.h"
#endif #endif
#ifndef ROOT_TMVA_BinarySearchTree #ifndef ROOT_TMVA_BinaryTree
#include "TMVA/BinaryTree.h" #include "TMVA/BinaryTree.h"
#endif #endif
#ifndef ROOT_TMVA_BinarySearchTree #ifndef ROOT_TMVA_BinarySearchTree
#include "TMVA/BinarySearchTree.h" #include "TMVA/BinarySearchTree.h"
#endif #endif
#ifndef ROOT_TMVA_SeparationBase #ifndef ROOT_TMVA_SeparationBase
#include "TMVA/SeparationBase.h" #include "TMVA/SeparationBase.h"
#endif #endif
#ifndef ROOT_TMVA_RegressionVariance
#include "TMVA/RegressionVariance.h"
#endif
using std::vector; class TRandom3;
namespace TMVA { namespace TMVA {
class Event; class Event;
class DecisionTree : public BinaryTree { class DecisionTree : public BinaryTree {
private:
static const Int_t fgRandomSeed; // set nonzero for debugging and zer
o for random seeds
public: public:
typedef std::vector<TMVA::Event*> EventList;
// the constructur needed for the "reading" of the decision tree from weight files // the constructur needed for the "reading" of the decision tree from weight files
DecisionTree( void ); DecisionTree( void );
// the constructur for a decsion tree from a root node
DecisionTree( DecisionTreeNode *n );
// the constructur needed for constructing the decision tree via trai ning with events // the constructur needed for constructing the decision tree via trai ning with events
DecisionTree( SeparationBase *sepType,Int_t minSize, DecisionTree( SeparationBase *sepType, Int_t minSize,
Int_t nCuts, SeparationBase *qtype=NULL, Int_t nCuts,
Bool_t randomisedTree=kFALSE, Int_t useNvars=0, Int_t i Bool_t randomisedTree=kFALSE, Int_t useNvars=0,
Seed=0); UInt_t nNodesMax=999999, UInt_t nMaxDepth=9999999,
Int_t iSeed=fgRandomSeed, Float_t purityLimit=0.5,
Int_t treeID = 0);
// copy constructor // copy constructor
DecisionTree (const DecisionTree &d); DecisionTree (const DecisionTree &d);
virtual ~DecisionTree( void ); virtual ~DecisionTree( void );
virtual Node * CreateNode() { return new DecisionTreeNode(); } virtual Node * CreateNode(UInt_t) const { return new DecisionTreeNode
(); }
virtual BinaryTree* CreateTree() const { return new DecisionTree(); }
virtual const char* ClassName() const { return "DecisionTree"; }
// building of a tree by recursivly splitting the nodes // building of a tree by recursivly splitting the nodes
Int_t BuildTree( vector<TMVA::Event*> & eventSample,
DecisionTreeNode *node = NULL );
UInt_t BuildTree( const EventList & eventSample,
DecisionTreeNode *node = NULL);
// determine the way how a node is split (which variable, which cut v alue) // determine the way how a node is split (which variable, which cut v alue)
Double_t TrainNode( vector<TMVA::Event*> & eventSample, DecisionTree
Node *node ) { return TrainNodeFast( eventSample, node ); } Float_t TrainNode( const EventList & eventSample, DecisionTreeNode *
Double_t TrainNodeFast( vector<TMVA::Event*> & eventSample, Decision node ) { return TrainNodeFast( eventSample, node ); }
TreeNode *node ); Float_t TrainNodeFast( const EventList & eventSample, DecisionTreeNo
Double_t TrainNodeFull( vector<TMVA::Event*> & eventSample, Decision de *node );
TreeNode *node ); Float_t TrainNodeFull( const EventList & eventSample, DecisionTreeNo
de *node );
// fill at tree with a given structure already (just see how many sig na/bkgr // fill at tree with a given structure already (just see how many sig na/bkgr
// events end up in each node // events end up in each node
void FillTree( vector<TMVA::Event*> & eventSample);
void FillTree( EventList & eventSample);
// fill the existing the decision tree structure by filling event // fill the existing the decision tree structure by filling event
// in from the top node and see where they happen to end up // in from the top node and see where they happen to end up
void FillEvent( TMVA::Event & event, void FillEvent( TMVA::Event & event,
TMVA::DecisionTreeNode *node ); TMVA::DecisionTreeNode *node );
// returns: 1 = Signal (right), -1 = Bkg (left) // returns: 1 = Signal (right), -1 = Bkg (left)
Double_t CheckEvent( const TMVA::Event & , Bool_t UseYesNoLeaf = kFAL
SE ); Double_t CheckEvent( const TMVA::Event & , Bool_t UseYesNoLeaf = kFAL
SE ) const;
TMVA::DecisionTreeNode* GetEventNode(const TMVA::Event & e) const;
// return the individual relative variable importance // return the individual relative variable importance
vector< Double_t > GetVariableImportance(); std::vector< Double_t > GetVariableImportance();
Double_t GetVariableImportance(Int_t ivar);
Double_t GetVariableImportance(UInt_t ivar);
// clear the tree nodes (their S/N, Nevents etc), just keep the struc ture of the tree // clear the tree nodes (their S/N, Nevents etc), just keep the struc ture of the tree
void ClearTree(); void ClearTree();
// set pruning method // set pruning method
enum EPruneMethod { kExpectedErrorPruning=0, kCostComplexityPruning, kNoPruning }; enum EPruneMethod { kExpectedErrorPruning=0, kCostComplexityPruning, kNoPruning };
void SetPruneMethod( EPruneMethod m = kCostComplexityPruning ) { fPru neMethod = m; } void SetPruneMethod( EPruneMethod m = kCostComplexityPruning ) { fPru neMethod = m; }
// recursive pruning of the tree // recursive pruning of the tree, validation sample required for auto
void PruneTree(); matic pruning
Double_t PruneTree( EventList* validationSample = NULL );
// manage the pruning strength parameter (iff < 0 -> automate the pru ning process)
void SetPruneStrength( Double_t p ) { fPruneStrength = p; } void SetPruneStrength( Double_t p ) { fPruneStrength = p; }
Double_t GetPruneStrength( ) const { return fPruneStrength; }
// apply pruning validation sample to a decision tree
void ApplyValidationSample( const EventList* validationSample ) const
;
// return the misclassification rate of a pruned tree
Double_t TestPrunedTreeQuality( const DecisionTreeNode* dt = NULL, In
t_t mode=0 ) const;
// pass a single validation event throught a pruned decision tree
void CheckEventWithPrunedTree( const TMVA::Event& ) const;
// calculate the normalization factor for a pruning validation sample
Float_t GetSumWeights( const EventList* validationSample ) const;
void SetNodePurityLimit( Double_t p ) { fNodePurityLimit = p; } void SetNodePurityLimit( Double_t p ) { fNodePurityLimit = p; }
Double_t GetNodePurityLimit( ) const { return fNodePurityLimit; } Float_t GetNodePurityLimit( ) const { return fNodePurityLimit; }
void DescendTree( DecisionTreeNode *n = NULL ); void DescendTree( DecisionTreeNode *n = NULL );
void SetParentTreeInNodes( DecisionTreeNode *n = NULL ); void SetParentTreeInNodes( DecisionTreeNode *n = NULL );
DecisionTreeNode* GetLeftDaughter( DecisionTreeNode *n ); DecisionTreeNode* GetLeftDaughter( DecisionTreeNode *n );
DecisionTreeNode* GetRightDaughter( DecisionTreeNode *n ); DecisionTreeNode* GetRightDaughter( DecisionTreeNode *n );
// retrieve node from the tree. Its position (up to a maximal tree de pth of 64) // retrieve node from the tree. Its position (up to a maximal tree de pth of 64)
// is coded as a sequence of left-right moves starting from the root, coded as // is coded as a sequence of left-right moves starting from the root, coded as
// 0-1 bit patterns stored in the "long-integer" together with the de pth // 0-1 bit patterns stored in the "long-integer" together with the de pth
DecisionTreeNode* GetNode( ULong_t sequence, UInt_t depth ); DecisionTreeNode* GetNode( ULong_t sequence, UInt_t depth );
void CleanTree(DecisionTreeNode *node=NULL); UInt_t CleanTree(DecisionTreeNode *node=NULL);
void PruneTreeEEP(DecisionTreeNode *node);
void PruneTreeCC();
void PruneNode(TMVA::DecisionTreeNode *node); void PruneNode(TMVA::DecisionTreeNode *node);
UInt_t CountLeafNodes(TMVA::DecisionTreeNode *n = NULL); // prune a node from the tree without deleting its descendants; allow
s one to
// effectively prune a tree many times without making deep copies
void PruneNodeInPlace( TMVA::DecisionTreeNode* node );
private: UInt_t CountLeafNodes(TMVA::DecisionTreeNode *n = NULL);
Double_t GetNodeError(DecisionTreeNode *node); void SetTreeID(Int_t treeID){fTreeID = treeID;};
Int_t GetTreeID(){return fTreeID;};
Double_t GetSubTreeError(DecisionTreeNode *node); Bool_t DoRegression() const { return fAnalysisType == Types::kRegress
ion; }
void SetAnalysisType (Types::EAnalysisType t) { fAnalysisType = t;}
Types::EAnalysisType GetAnalysisType ( void ) { return fAnalysisType;
}
private:
// utility functions // utility functions
// calculates the min and max values for each variable in event sampl
e
void FindMinAndMax(vector<TMVA::Event*> & eventSample,
vector<Double_t> & min,
vector<Double_t> & max);
// set up the grid for the cut scan
void SetCutPoints(vector<Double_t> & cut_points,
Double_t xmin,
Double_t xmax,
Int_t num_gridpoints);
// calculate the Purity out of the number of sig and bkg events colle cted // calculate the Purity out of the number of sig and bkg events colle cted
// from individual samples. // from individual samples.
// calculates the purity S/(S+B) of a given event sample // calculates the purity S/(S+B) of a given event sample
Double_t SamplePurity(vector<Event*> eventSample); Float_t SamplePurity(EventList eventSample);
Int_t fNvars; // number of variables used to separate S and B UInt_t fNvars; // number of variables used to separate S and B
Int_t fNCuts; // number of grid point in variable cut sc ans Int_t fNCuts; // number of grid point in variable cut sc ans
SeparationBase *fSepType; // the separation crition SeparationBase *fSepType; // the separation crition
RegressionVariance *fRegType; // the separation crition used in Regr ession
Double_t fMinSize; // min number of events in node Float_t fMinSize; // min number of events in node
Double_t fMinSepGain; // min number of separation gain to perfor Float_t fMinSepGain; // min number of separation gain to perfor
m node splitting m node splitting
Bool_t fUseSearchTree; // cut scan done with binary trees or simp le event loop. Bool_t fUseSearchTree; // cut scan done with binary trees or simp le event loop.
Double_t fPruneStrength; // a parameter to set the "amount" of prun ing..needs to be adjusted Double_t fPruneStrength; // a parameter to set the "amount" of prun ing..needs to be adjusted
EPruneMethod fPruneMethod; // method used for prunig EPruneMethod fPruneMethod; // method used for prunig
Double_t fNodePurityLimit;// purity limit to decide whether a node i s signal Float_t fNodePurityLimit;// purity limit to decide whether a node i s signal
Bool_t fRandomisedTree; // choose at each node splitting a random set of variables Bool_t fRandomisedTree; // choose at each node splitting a random set of variables
Int_t fUseNvars; // the number of variables used in randomi sed trees; Int_t fUseNvars; // the number of variables used in randomi sed trees;
TRandom2 *fMyTrandom; // random number generator for randomised trees TRandom3 *fMyTrandom; // random number generator for randomised trees
std::vector< Double_t > fVariableImportance; // the relative importan ce of the different variables std::vector< Double_t > fVariableImportance; // the relative importan ce of the different variables
SeparationBase *fQualityIndex; // separation/quality criterio for CC UInt_t fNNodesMax; // max # of nodes
-pruning UInt_t fMaxDepth; // max depth
static const Int_t fgDebugLevel = 0; // debug level determining some printout/control plots etc. static const Int_t fgDebugLevel = 0; // debug level determining some printout/control plots etc.
Int_t fTreeID; // just an ID number given to the tree.. ma
kes debugging easier as tree knows who he is.
Types::EAnalysisType fAnalysisType; // kClassification(=0=false) o
r kRegression(=1=true)
ClassDef(DecisionTree,0) // implementation of a Deci sion Tree ClassDef(DecisionTree,0) // implementation of a Decisio n Tree
}; };
} // namespace TMVA } // namespace TMVA
#endif #endif
 End of changes. 41 change blocks. 
61 lines changed or deleted 97 lines changed or added


 DecisionTreeNode.h   DecisionTreeNode.h 
// @(#)root/tmva $Id: DecisionTreeNode.h 21079 2007-11-27 20:08:49Z brun $ // @(#)root/tmva $Id: DecisionTreeNode.h 29195 2009-06-24 10:39:49Z brun $
// Author: Andreas Hoecker, Joerg Stelzer, Helge Voss, Kai Voss // Author: Andreas Hoecker, Joerg Stelzer, Helge Voss, Kai Voss
/************************************************************************** ******** /************************************************************************** ********
* Project: TMVA - a Root-integrated toolkit for multivariate data analysis * * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
* Package: TMVA * * Package: TMVA *
* Class : DecisionTreeNode * * Class : DecisionTreeNode *
* Web : http://tmva.sourceforge.net * * Web : http://tmva.sourceforge.net *
* * * *
* Description: * * Description: *
* Node for the Decision Tree * * Node for the Decision Tree *
* * * *
* Authors (alphabetical): * * Authors (alphabetical): *
* Andreas Hoecker <Andreas.Hocker@cern.ch> - CERN, Switzerland * * Andreas Hoecker <Andreas.Hocker@cern.ch> - CERN, Switzerland *
* Xavier Prudent <prudent@lapp.in2p3.fr> - LAPP, France *
* Helge Voss <Helge.Voss@cern.ch> - MPI-K Heidelberg, German y * * Helge Voss <Helge.Voss@cern.ch> - MPI-K Heidelberg, German y *
* Kai Voss <Kai.Voss@cern.ch> - U. of Victoria, Canada * * Kai Voss <Kai.Voss@cern.ch> - U. of Victoria, Canada *
* * * *
* Copyright (c) 2005: * * Copyright (c) 2005: *
* CERN, Switzerland * * CERN, Switzerland *
* U. of Victoria, Canada * * U. of Victoria, Canada *
* MPI-K Heidelberg, Germany * * MPI-K Heidelberg, Germany *
* LAPP, Annecy, France *
* * * *
* Redistribution and use in source and binary forms, with or without * * Redistribution and use in source and binary forms, with or without *
* modification, are permitted according to the terms listed in LICENSE * * modification, are permitted according to the terms listed in LICENSE *
* (http://tmva.sourceforge.net/LICENSE) * * (http://tmva.sourceforge.net/LICENSE) *
************************************************************************** ********/ ************************************************************************** ********/
#ifndef ROOT_TMVA_DecisionTreeNode #ifndef ROOT_TMVA_DecisionTreeNode
#define ROOT_TMVA_DecisionTreeNode #define ROOT_TMVA_DecisionTreeNode
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
skipping to change at line 45 skipping to change at line 43
// DecisionTreeNode // // DecisionTreeNode //
// // // //
// Node for the Decision Tree // // Node for the Decision Tree //
// // // //
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
#ifndef ROOT_TMVA_Node #ifndef ROOT_TMVA_Node
#include "TMVA/Node.h" #include "TMVA/Node.h"
#endif #endif
using std::string; #include <vector>
#include <map>
namespace TMVA { namespace TMVA {
class Event; class Event;
class MsgLogger;
class DecisionTreeNode: public Node { class DecisionTreeNode: public Node {
public: public:
// constructor of an essentially "empty" node floating in space // constructor of an essentially "empty" node floating in space
DecisionTreeNode (); DecisionTreeNode ();
// constructor of a daughter node as a daughter of 'p' // constructor of a daughter node as a daughter of 'p'
DecisionTreeNode (Node* p, char pos); DecisionTreeNode (Node* p, char pos);
// copy constructor // copy constructor
DecisionTreeNode (const DecisionTreeNode &n, DecisionTreeNode* parent = NULL); DecisionTreeNode (const DecisionTreeNode &n, DecisionTreeNode* parent = NULL);
virtual ~DecisionTreeNode(){} virtual ~DecisionTreeNode(){}
virtual Node* CreateNode() const { return new DecisionTreeNode(); }
// test event if it decends the tree at this node to the right // test event if it decends the tree at this node to the right
virtual Bool_t GoesRight( const Event & ) const; virtual Bool_t GoesRight( const Event & ) const;
// test event if it decends the tree at this node to the left // test event if it decends the tree at this node to the left
virtual Bool_t GoesLeft ( const Event & ) const; virtual Bool_t GoesLeft ( const Event & ) const;
// set index of variable used for discrimination at this node // set index of variable used for discrimination at this node
void SetSelector( Short_t i) { fSelector = i; } void SetSelector( Short_t i) { fSelector = i; }
// return index of variable used for discrimination at this node // return index of variable used for discrimination at this node
Short_t GetSelector() const { return fSelector; } Short_t GetSelector() const { return fSelector; }
// set the cut value applied at this node // set the cut value applied at this node
void SetCutValue ( Double_t c ) { fCutValue = c; } void SetCutValue ( Float_t c ) { fCutValue = c; }
// return the cut value applied at this node // return the cut value applied at this node
Double_t GetCutValue ( void ) const { return fCutValue; } Float_t GetCutValue ( void ) const { return fCutValue; }
// set true: if event variable > cutValue ==> signal , false otherwis e // set true: if event variable > cutValue ==> signal , false otherwis e
void SetCutType( Bool_t t ) { fCutType = t; } void SetCutType( Bool_t t ) { fCutType = t; }
// return kTRUE: Cuts select signal, kFALSE: Cuts select bkg // return kTRUE: Cuts select signal, kFALSE: Cuts select bkg
Bool_t GetCutType( void ) const { return fCutType; } Bool_t GetCutType( void ) const { return fCutType; }
// set node type: 1 signal node, -1 bkg leave, 0 intermediate Node // set node type: 1 signal node, -1 bkg leave, 0 intermediate Node
void SetNodeType( Int_t t ) { fNodeType = t;} void SetNodeType( Int_t t ) { fNodeType = t;}
// return node type: 1 signal node, -1 bkg leave, 0 intermediate Node // return node type: 1 signal node, -1 bkg leave, 0 intermediate Node
Int_t GetNodeType( void ) const { return fNodeType; } Int_t GetNodeType( void ) const { return fNodeType; }
//return S/(S+B) (purity) at this node (from training) //return S/(S+B) (purity) at this node (from training)
Double_t GetPurity( void ) const ; Float_t GetPurity( void ) const ;
//set the response of the node (for regression)
void SetResponse( Float_t r ) { fResponse = r;}
//return the response of the node (for regression)
Float_t GetResponse( void ) const { return fResponse;}
//set the RMS of the response of the node (for regression)
void SetRMS( Float_t r ) { fRMS = r;}
//return the RMS of the response of the node (for regression)
Float_t GetRMS( void ) const { return fRMS;}
// set the sum of the signal weights in the node // set the sum of the signal weights in the node
void SetNSigEvents( Double_t s ) { fNSigEvents = s; } void SetNSigEvents( Float_t s ) { fNSigEvents = s; }
// set the sum of the backgr weights in the node // set the sum of the backgr weights in the node
void SetNBkgEvents( Double_t b ) { fNBkgEvents = b; } void SetNBkgEvents( Float_t b ) { fNBkgEvents = b; }
// set the number of events that entered the node (during training) // set the number of events that entered the node (during training)
void SetNEvents( Double_t nev ){ fNEvents =nev ; } void SetNEvents( Float_t nev ){ fNEvents =nev ; }
// set the sum of the unweighted signal events in the node // set the sum of the unweighted signal events in the node
void SetNSigEvents_unweighted( Double_t s ) { fNSigEvents_unweighted = s; } void SetNSigEvents_unweighted( Float_t s ) { fNSigEvents_unweighted = s; }
// set the sum of the unweighted backgr events in the node // set the sum of the unweighted backgr events in the node
void SetNBkgEvents_unweighted( Double_t b ) { fNBkgEvents_unweighted = b; } void SetNBkgEvents_unweighted( Float_t b ) { fNBkgEvents_unweighted = b; }
// set the number of unweighted events that entered the node (during training) // set the number of unweighted events that entered the node (during training)
void SetNEvents_unweighted( Double_t nev ){ fNEvents_unweighted =nev ; } void SetNEvents_unweighted( Float_t nev ){ fNEvents_unweighted =nev ; }
// increment the sum of the signal weights in the node // increment the sum of the signal weights in the node
void IncrementNSigEvents( Double_t s ) { fNSigEvents += s; } void IncrementNSigEvents( Float_t s ) { fNSigEvents += s; }
// increment the sum of the backgr weights in the node // increment the sum of the backgr weights in the node
void IncrementNBkgEvents( Double_t b ) { fNBkgEvents += b; } void IncrementNBkgEvents( Float_t b ) { fNBkgEvents += b; }
// increment the number of events that entered the node (during train ing) // increment the number of events that entered the node (during train ing)
void IncrementNEvents( Double_t nev ){ fNEvents +=nev ; } void IncrementNEvents( Float_t nev ){ fNEvents +=nev ; }
// increment the sum of the signal weights in the node // increment the sum of the signal weights in the node
void IncrementNSigEvents_unweighted( ) { fNSigEvents_unweighted += 1; } void IncrementNSigEvents_unweighted( ) { fNSigEvents_unweighted += 1; }
// increment the sum of the backgr weights in the node // increment the sum of the backgr weights in the node
void IncrementNBkgEvents_unweighted( ) { fNBkgEvents_unweighted += 1; } void IncrementNBkgEvents_unweighted( ) { fNBkgEvents_unweighted += 1; }
// increment the number of events that entered the node (during train ing) // increment the number of events that entered the node (during train ing)
void IncrementNEvents_unweighted( ){ fNEvents_unweighted +=1 ; } void IncrementNEvents_unweighted( ){ fNEvents_unweighted +=1 ; }
// return the sum of the signal weights in the node // return the sum of the signal weights in the node
Double_t GetNSigEvents( void ) const { return fNSigEvents; } Float_t GetNSigEvents( void ) const { return fNSigEvents; }
// return the sum of the backgr weights in the node // return the sum of the backgr weights in the node
Double_t GetNBkgEvents( void ) const { return fNBkgEvents; } Float_t GetNBkgEvents( void ) const { return fNBkgEvents; }
// return the number of events that entered the node (during trainin g) // return the number of events that entered the node (during trainin g)
Double_t GetNEvents( void ) const { return fNEvents; } Float_t GetNEvents( void ) const { return fNEvents; }
// return the sum of unweighted signal weights in the node // return the sum of unweighted signal weights in the node
Double_t GetNSigEvents_unweighted( void ) const { return fNSigEvents _unweighted; } Float_t GetNSigEvents_unweighted( void ) const { return fNSigEvents_ unweighted; }
// return the sum of unweighted backgr weights in the node // return the sum of unweighted backgr weights in the node
Double_t GetNBkgEvents_unweighted( void ) const { return fNBkgEvents _unweighted; } Float_t GetNBkgEvents_unweighted( void ) const { return fNBkgEvents_ unweighted; }
// return the number of unweighted events that entered the node (dur ing training) // return the number of unweighted events that entered the node (dur ing training)
Double_t GetNEvents_unweighted( void ) const { return fNEvents_unwei ghted; } Float_t GetNEvents_unweighted( void ) const { return fNEvents_unweig hted; }
// set the choosen index, measure of "purity" (separation between S a nd B) AT this node // set the choosen index, measure of "purity" (separation between S a nd B) AT this node
void SetSeparationIndex( Double_t sep ){ fSeparationIndex =sep ; } void SetSeparationIndex( Float_t sep ){ fSeparationIndex =sep ; }
// return the separation index AT this node // return the separation index AT this node
Double_t GetSeparationIndex( void ) const { return fSeparationIndex; } Float_t GetSeparationIndex( void ) const { return fSeparationIndex; }
// set the separation, or information gained BY this nodes selection // set the separation, or information gained BY this nodes selection
void SetSeparationGain( Double_t sep ){ fSeparationGain =sep ; } void SetSeparationGain( Float_t sep ){ fSeparationGain =sep ; }
// return the gain in separation obtained by this nodes selection // return the gain in separation obtained by this nodes selection
Double_t GetSeparationGain( void ) const { return fSeparationGain; } Float_t GetSeparationGain( void ) const { return fSeparationGain; }
// printout of the node // printout of the node
virtual void Print( ostream& os ) const; virtual void Print( ostream& os ) const;
//recursively print the node and its daughters (--> print the 'tree') // recursively print the node and its daughters (--> print the 'tree' )
virtual void PrintRec( ostream& os ) const; virtual void PrintRec( ostream& os ) const;
//recursively clear the nodes content (S/N etc, but not the cut crite virtual void AddAttributesToNode(void* node) const;
ria) virtual void AddContentToNode(std::stringstream& s) const;
// recursively clear the nodes content (S/N etc, but not the cut crit
eria)
void ClearNodeAndAllDaughters(); void ClearNodeAndAllDaughters();
// get pointers to children, mother in the tree
inline DecisionTreeNode* GetLeftDaughter( ) { return dynamic_cast<Dec
isionTreeNode*>(GetLeft()); }
inline DecisionTreeNode* GetRightDaughter( ) { return dynamic_cast<De
cisionTreeNode*>(GetRight()); }
inline DecisionTreeNode* GetMother( ) { return dynamic_cast<DecisionT
reeNode*>(GetParent()); }
inline const DecisionTreeNode* GetLeftDaughter( ) const { return dyna
mic_cast<DecisionTreeNode*>(GetLeft()); }
inline const DecisionTreeNode* GetRightDaughter( ) const { return dyn
amic_cast<DecisionTreeNode*>(GetRight()); }
inline const DecisionTreeNode* GetMother( ) const { return dynamic_ca
st<DecisionTreeNode*>(GetParent()); }
ULong_t GetSequence() const {return fSequence;} ULong_t GetSequence() const {return fSequence;}
void SetSequence(ULong_t s) {fSequence=s;} void SetSequence(ULong_t s) {fSequence=s;}
// the node resubstitution estimate, R(t), for Cost Complexity prunin
g
inline void SetNodeR( Double_t r ) { fNodeR = r; }
inline Double_t GetNodeR( ) const { return fNodeR; }
// the resubstitution estimate, R(T_t), of the tree rooted at this no
de
inline void SetSubTreeR( Double_t r ) { fSubTreeR = r; }
inline Double_t GetSubTreeR( ) const { return fSubTreeR; }
// R(t) - R(T_t)
// the critical point alpha = -------------
// |~T_t| - 1
inline void SetAlpha( Double_t alpha ) { fAlpha = alpha; }
inline Double_t GetAlpha( ) const { return fAlpha; }
// the minimum alpha in the tree rooted at this node
inline void SetAlphaMinSubtree( Double_t g ) { fG = g; }
inline Double_t GetAlphaMinSubtree( ) const { return fG; }
// number of terminal nodes in the subtree rooted here
inline void SetNTerminal( Int_t n ) { fNTerminal = n; }
inline Int_t GetNTerminal( ) const { return fNTerminal; }
// number of background/signal events from the pruning validation sam
ple
inline void SetNBValidation( Double_t b ) { fNB = b; }
inline void SetNSValidation( Double_t s ) { fNS = s; }
inline Double_t GetNBValidation( ) const { return fNB; }
inline Double_t GetNSValidation( ) const { return fNS; }
inline void SetSumTarget(Float_t t) {fSumTarget = t; }
inline void SetSumTarget2(Float_t t2){fSumTarget2 = t2; }
inline void AddToSumTarget(Float_t t) {fSumTarget += t; }
inline void AddToSumTarget2(Float_t t2){fSumTarget2 += t2; }
inline Float_t GetSumTarget() const {return fSumTarget; }
inline Float_t GetSumTarget2() const {return fSumTarget2; }
// reset the pruning validation data
void ResetValidationData( );
// flag indicates whether this node is terminal
inline Bool_t IsTerminal() const { return fIsTerminalNode;
}
inline void SetTerminal( Bool_t s = kTRUE ) { fIsTerminalNode = s;
}
void PrintPrune( ostream& os ) const ;
void PrintRecPrune( ostream& os ) const;
void SetCC(Double_t cc) {fCC = cc;};
Double_t GetCC() const {return fCC;};
Float_t GetSampleMin(UInt_t ivar) const;
Float_t GetSampleMax(UInt_t ivar) const;
void SetSampleMin(UInt_t ivar, Float_t xmin);
void SetSampleMax(UInt_t ivar, Float_t xmax);
private: private:
Bool_t ReadDataRecord( istream& is ); virtual void ReadAttributes(void* node);
virtual Bool_t ReadDataRecord( istream& is );
virtual void ReadContent(std::stringstream& s);
Double_t fNodeR; // node resubstitution estimate, R(t)
Double_t fSubTreeR; // R(T) = Sum(R(t) : t in ~T)
Double_t fAlpha; // critical alpha for this node
Double_t fG; // minimum alpha in subtree rooted at this
node
Int_t fNTerminal; // number of terminal nodes in subtree roo
ted at this node
Double_t fNB; // sum of weights of background events fro
m the pruning sample in this node
Double_t fNS; // ditto for the signal events
Double_t fCutValue; // cut value appplied on this node to disc Float_t fSumTarget; // sum of weight*target used for the calc
riminate bkg against sig ulatio of the variance (regression)
Float_t fSumTarget2; // sum of weight*target^2 used for the cal
culatio of the variance (regression)
Float_t fCutValue; // cut value appplied on this node to disc
riminate bkg against sig
Bool_t fCutType; // true: if event variable > cutValue ==> signal , false otherwise Bool_t fCutType; // true: if event variable > cutValue ==> signal , false otherwise
Short_t fSelector; // index of variable used in node selectio n (decision tree) Short_t fSelector; // index of variable used in node selectio n (decision tree)
Double_t fNSigEvents; // sum of weights of signal event in the n Float_t fNSigEvents; // sum of weights of signal event in the n
ode ode
Double_t fNBkgEvents; // sum of weights of backgr event in the n Float_t fNBkgEvents; // sum of weights of backgr event in the n
ode ode
Double_t fNEvents; // number of events in that entered the no Float_t fNEvents; // number of events in that entered the no
de (during training) de (during training)
Double_t fNSigEvents_unweighted; // sum of signal event in the n Float_t fNSigEvents_unweighted; // sum of signal event in the n
ode ode
Double_t fNBkgEvents_unweighted; // sum of backgr event in the n Float_t fNBkgEvents_unweighted; // sum of backgr event in the n
ode ode
Double_t fNEvents_unweighted; // number of events in that ent Float_t fNEvents_unweighted; // number of events in that ent
ered the node (during training) ered the node (during training)
Double_t fSeparationIndex; // measure of "purity" (separation between Float_t fSeparationIndex; // measure of "purity" (separation between
S and B) AT this node S and B) AT this node
Double_t fSeparationGain; // measure of "purity", separation, or inf Float_t fSeparationGain; // measure of "purity", separation, or inf
ormation gained BY this nodes selection ormation gained BY this nodes selection
Float_t fResponse; // response value in case of regression
Float_t fRMS; // response RMS of the regression node
Int_t fNodeType; // Type of node: -1 == Bkg-leaf, 1 == Sign al-leaf, 0 = internal Int_t fNodeType; // Type of node: -1 == Bkg-leaf, 1 == Sign al-leaf, 0 = internal
ULong_t fSequence; // bit coded left right sequence to reach the node ULong_t fSequence; // bit coded left right sequence to reach the node
Bool_t fIsTerminalNode; //! flag to set node as terminal (i.e.,
without deleting its descendants)
Double_t fCC; // debug variable for cost complexity prui
ng .. temporary bla
std::vector< Float_t > fSampleMin; // the minima for each ivar of th
e sample on the node during training
std::vector< Float_t > fSampleMax; // the maxima for each ivar of th
e sample on the node during training
static MsgLogger* fgLogger; // static because there is a huge numb er of nodes... static MsgLogger* fgLogger; // static because there is a huge numb er of nodes...
ClassDef(DecisionTreeNode,0) // Node for the Decision Tree ClassDef(DecisionTreeNode,0) // Node for the Decision Tree
}; };
} // namespace TMVA } // namespace TMVA
#endif #endif
 End of changes. 37 change blocks. 
52 lines changed or deleted 172 lines changed or added


 Dinv.h   Dinv.h 
// @(#)root/smatrix:$Id: Dinv.h 26866 2008-12-12 10:50:07Z moneta $ // @(#)root/smatrix:$Id: Dinv.h 28954 2009-06-12 09:36:34Z moneta $
// Authors: T. Glebe, L. Moneta 2005 // Authors: T. Glebe, L. Moneta 2005
#ifndef ROOT_Math_Dinv #ifndef ROOT_Math_Dinv
#define ROOT_Math_Dinv #define ROOT_Math_Dinv
// ******************************************************************** // ********************************************************************
// //
// source: // source:
// //
// type: source code // type: source code
// //
skipping to change at line 38 skipping to change at line 38
// changes: // changes:
// 03 Apr 2001 (TG) creation // 03 Apr 2001 (TG) creation
// //
// ******************************************************************** // ********************************************************************
#ifdef OLD_IMPL #ifdef OLD_IMPL
#include "Math/Dfactir.h" #include "Math/Dfactir.h"
#include "Math/Dfinv.h" #include "Math/Dfinv.h"
#include "Math/Dsinv.h" #include "Math/Dsinv.h"
#endif #endif
#ifndef ROOT_Math_CholeskyDecomp
#include "Math/CholeskyDecomp.h"
#endif
// #ifndef ROOT_Math_QRDecomposition
// #include "Math/QRDecomposition.h"
// #endif
namespace ROOT { namespace ROOT {
namespace Math { namespace Math {
/** /**
Matrix Inverter class Matrix Inverter class
Class to specialize calls to Dinv. Dinv computes the inverse of a squar e Class to specialize calls to Dinv. Dinv computes the inverse of a squar e
matrix if dimension idim and order n. The content of the matrix will be matrix if dimension idim and order n. The content of the matrix will be
replaced by its inverse. In case the inversion fails, the matrix conten t is replaced by its inverse. In case the inversion fails, the matrix conten t is
destroyed. Invert specializes Dinv by the matrix order. E.g. if the ord er destroyed. Invert specializes Dinv by the matrix order. E.g. if the ord er
skipping to change at line 315 skipping to change at line 323
public: public:
/// ///
template <class MatrixRep> template <class MatrixRep>
static bool Dinv(MatrixRep& rhs); static bool Dinv(MatrixRep& rhs);
template <class T> template <class T>
static bool Dinv(MatRepSym<T,5> & rhs); static bool Dinv(MatRepSym<T,5> & rhs);
}; };
// inverter for Cholesky
// works only for symmetric matrices and will produce a
// compilation error otherwise
template <unsigned int idim>
class CholInverter {
public:
///
template <class MatrixRep>
static bool Dinv(MatrixRep&) {
STATIC_CHECK( false, Error_cholesky_SMatrix_type_is_not_symmetric );
return false;
}
template <class T>
inline static bool Dinv(MatRepSym<T,idim> & rhs) {
CholeskyDecomp<T, idim> decomp(rhs);
return decomp.Invert(rhs);
}
};
} // namespace Math } // namespace Math
} // namespace ROOT } // namespace ROOT
#ifndef ROOT_Math_CramerInversion_icc #ifndef ROOT_Math_CramerInversion_icc
#include "CramerInversion.icc" #include "CramerInversion.icc"
#endif #endif
#ifndef ROOT_Math_CramerInversionSym_icc #ifndef ROOT_Math_CramerInversionSym_icc
#include "CramerInversionSym.icc" #include "CramerInversionSym.icc"
#endif #endif
 End of changes. 3 change blocks. 
1 lines changed or deleted 29 lines changed or added


 EnumBuilder.h   EnumBuilder.h 
// @(#)root/reflex:$Id: EnumBuilder.h 22729 2008-03-19 10:20:10Z pcanal $ // @(#)root/reflex:$Id: EnumBuilder.h 28992 2009-06-15 09:20:22Z axel $
// Author: Stefan Roiser 2004 // Author: Stefan Roiser 2004
// Copyright CERN, CH-1211 Geneva 23, 2004-2006, All rights reserved. // Copyright CERN, CH-1211 Geneva 23, 2004-2006, All rights reserved.
// //
// Permission to use, copy, modify, and distribute this software for any // Permission to use, copy, modify, and distribute this software for any
// purpose is hereby granted without fee, provided that this copyright and // purpose is hereby granted without fee, provided that this copyright and
// permissions notice appear in all copies and derivatives. // permissions notice appear in all copies and derivatives.
// //
// This software is provided "as is" without express or implied warranty. // This software is provided "as is" without express or implied warranty.
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 Event.h   Event.h 
// @(#)root/tmva $Id: Event.h 21630 2008-01-10 19:40:44Z brun $ // @(#)root/tmva $Id: Event.h 29205 2009-06-24 19:33:19Z brun $
// Author: Andreas Hoecker, Joerg Stelzer, Helge Voss // Author: Andreas Hoecker, Joerg Stelzer, Helge Voss
/************************************************************************** ******** /************************************************************************** ********
* Project: TMVA - a Root-integrated toolkit for multivariate data analysis * * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
* Package: TMVA * * Package: TMVA *
* Class : Event * * Class : Event *
* Web : http://tmva.sourceforge.net * * Web : http://tmva.sourceforge.net *
* * * *
* Description: * * Description: *
* Event container * * Event container *
skipping to change at line 29 skipping to change at line 29
* CERN, Switzerland * * CERN, Switzerland *
* U. of Victoria, Canada * * U. of Victoria, Canada *
* MPI-K Heidelberg, Germany * * MPI-K Heidelberg, Germany *
* LAPP, Annecy, France * * LAPP, Annecy, France *
* * * *
* Redistribution and use in source and binary forms, with or without * * Redistribution and use in source and binary forms, with or without *
* modification, are permitted according to the terms listed in LICENSE * * modification, are permitted according to the terms listed in LICENSE *
* (http://mva.sourceforge.net/license.txt) * * (http://mva.sourceforge.net/license.txt) *
************************************************************************** ********/ ************************************************************************** ********/
//////////////////////////////////////////////////////////////////////////
//
// Event
//
// Storage class for an event. It is used by all TMVA methods
// during the training. Events are collected in Dataset
//
//////////////////////////////////////////////////////////////////////////
#ifndef ROOT_TMVA_Event #ifndef ROOT_TMVA_Event
#define ROOT_TMVA_Event #define ROOT_TMVA_Event
#include <iosfwd>
#include <vector> #include <vector>
#ifndef ROOT_Rtypes #ifndef ROOT_Rtypes
#include "Rtypes.h" #include "Rtypes.h"
#endif #endif
#ifndef ROOT_TMVA_VariableInfo #ifndef ROOT_TMVA_Types
#include "TMVA/VariableInfo.h" #include "TMVA/Types.h"
#endif #endif
class TTree;
class TBranch;
namespace TMVA { namespace TMVA {
class Event; class Event;
ostream& operator<<( ostream& os, const Event& event ); std::ostream& operator<<( std::ostream& os, const Event& event );
ostream& operator<<( ostream& os, const Event* event ); std::ostream& operator<<( std::ostream& os, const Event* event );
class Event { class Event {
friend ostream& operator<<( ostream& os, const Event& event ); friend std::ostream& operator<<( std::ostream& os, const Event& event
friend ostream& operator<<( ostream& os, const Event* event ); );
friend std::ostream& operator<<( std::ostream& os, const Event* event
);
public: public:
Event( const std::vector<TMVA:: VariableInfo>&, Bool_t AllowExternalL // constructors
inks = kTRUE ); Event();
Event( const Event& ); Event( const Event& );
~Event(); explicit Event( const std::vector<Float_t>&,
const std::vector<Float_t>& targetValues,
const std::vector<Float_t>& spectatorValues,
UInt_t theClass = 0, Float_t weight = 1.0, Float_t bo
ostweight = 1.0 );
explicit Event( const std::vector<Float_t>&,
const std::vector<Float_t>& targetValues,
UInt_t theClass = 0, Float_t weight = 1.0, Float_t bo
ostweight = 1.0 );
explicit Event( const std::vector<Float_t>&,
UInt_t theClass, Float_t weight = 1.0, Float_t boostw
eight = 1.0 );
explicit Event( const std::vector<Float_t*>*& );
void SetBranchAddresses(TTree* tr); ~Event();
std::vector<TBranch*>& Branches() { return fBranches; }
Bool_t IsSignal() const { return (fType==1); } // accessors
Float_t GetWeight() const { return fWeight*fBoostWeight; } Bool_t IsSignal() const { return (fClass==fSignalClass); }
Float_t GetBoostWeight() const { return fBoostWeight; } // deprecated: use <DataSetInfo>.IsSignal( Event* )
Int_t Type() const { return fType; }
void SetWeight(Float_t w) { fWeight=w; }
void SetBoostWeight(Float_t w) { fBoostWeight=w; }
void SetType(Int_t t) { fType=t; }
void SetType(Types::ESBType t) { fType=(t==Types::kSignal)?1:0; }
void SetVal(UInt_t ivar, Float_t val);
void SetValFloatNoCheck(UInt_t ivar, Float_t val) { *((Float_t*)fV
arPtr[ivar]) = val; }
void CopyVarValues( const Event& other ); Float_t GetWeight() const { return fWeight*fBoostWeight; }
Float_t GetOriginalWeight() const { return fWeight; }
Float_t GetBoostWeight() const { return TMath::Max(Float_t(0.0001)
,fBoostWeight); }
UInt_t GetType() const { return GetClass(); } // better u
se GetClass()
UInt_t GetClass() const { return fClass; }
UInt_t Type() const { return fClass; } // backward com
patible -> to be removed
UInt_t GetNVariables() const { return fValues.size(); }
UInt_t GetNTargets() const { return fTargets.size(); }
UInt_t GetNSpectators() const { return fSpectators.size(); }
UInt_t GetNVars() const { return fValues.size(); } // back
ward compatible -> to be removed
Float_t GetVal(UInt_t ivar) const;
Int_t GetSignalClass() const { return fSignalClass; } // interme
diate solution to keep IsSignal() of Event working
const std::vector<Float_t>& GetValues() const;
Float_t GetValue ( UInt_t ivar) const { return GetVal( ivar
); }
void ScaleWeight ( Float_t s ) { fWeight*=s; }
void SetWeight ( Float_t w ) { fWeight=w; }
void SetBoostWeight ( Float_t w ) { fBoostWeight=w; }
void ScaleBoostWeight ( Float_t s ) { fBoostWeight *= s; }
void SetType ( Int_t t ) { SetClass(t); }
void SetClass ( UInt_t t ) { fClass=t; }
void SetType ( Types::ESBType t ) { fClass=(t==Types::kS
ignal) ? 1 : 0; }
void SetVal ( UInt_t ivar, Float_t val );
void SetValFloatNoCheck( UInt_t ivar, Float_t val ) { fValues[ivar
] = val; }
void SetSignalClass ( UInt_t cls ){ fSignalClass = cls; } // in
termediate solution to keep IsSignal() of Event working. TODO: remove IsSig
nal() from Event
void SetTarget( UInt_t itgt, Float_t value ) {
if (fTargets.size() <= itgt) fTargets.resize( itgt+1 );
fTargets.at(itgt) = value;
}
std::vector<Float_t>& GetTargets() const { return fTarget
s; }
Float_t GetTarget( UInt_t itgt ) const { return fTarget
s.at(itgt); }
void SetSpectator( UInt_t ivar, Float_t value ) {
if (fSpectators.size() <= ivar) fSpectators.resize( ivar+1 );
fSpectators.at(ivar) = value;
}
std::vector<Float_t>& GetSpectators() const { return fSpec
tators; }
Float_t GetSpectator( UInt_t ivar) const { return fSpec
tators.at(ivar); }
Char_t GetVarType (UInt_t ivar) const { return fVariables[iva static void ClearDynamicVariables();
r].GetVarType(); }
Bool_t IsInt (UInt_t ivar) const { return (fVariables[iv
ar].GetVarType()=='I'); }
Bool_t IsFloat (UInt_t ivar) const { return (fVariables[iv
ar].GetVarType()=='F'); }
Float_t GetVal (UInt_t ivar) const;
Float_t GetValFloat(UInt_t ivar) const { return *((Float_t*)fV
arPtr[ivar]); }
UInt_t GetNVars() const { return fVariables.siz
e(); }
Float_t GetValueNormalized(UInt_t ivar) const;
void* GetExternalLink(UInt_t ivar) const { return fVariables[iva
r].GetExternalLink(); }
void Print(std::ostream & o) const; void CopyVarValues( const Event& other );
void Print ( std::ostream & o ) const;
private: private:
void InitPointers(bool AllowExternalLink = kTRUE); mutable std::vector<Float_t> fValues; // the event values
static std::vector<Float_t*>* fgValuesDynamic; // the event values
mutable std::vector<Float_t> fTargets; // target values for
regression
const std::vector<TMVA::VariableInfo>& fVariables; // the variables mutable std::vector<Float_t> fSpectators; // "visisting" var
void ** fVarPtr; // array containing values iables which are never used for any calculation
// Int_t * fVarPtrI; // integer value
Float_t* fVarPtrF; // float value
Int_t fType; // signal or background type
Float_t fWeight; // event weight (product of global and in
dividual weights)
Float_t fBoostWeight; // internal weight to be set by boosting
algorithm
UInt_t fCountI; // the number of Integer variables
UInt_t fCountF; // the number of Float variables
std::vector<TBranch*> fBranches; // TTree branches UInt_t fClass; // signal or backgro
und type: signal=1, background=0
Float_t fWeight; // event weight (pro
duct of global and individual weights)
Float_t fBoostWeight; // internal weight t
o be set by boosting algorithm
Bool_t fDynamic; // is set when the d
ynamic values are taken
static Int_t fgCount; // count instances of Event UInt_t fSignalClass; // intermediate solu tion to keep IsSignal() of Event working. TODO: remove IsSignal() from Even t
static Int_t fgCount; // count instances o f Event
}; };
} }
#endif #endif
 End of changes. 21 change blocks. 
66 lines changed or deleted 107 lines changed or added


 Factory.h   Factory.h 
// @(#)root/tmva $Id: Factory.h 23334 2008-04-19 18:38:57Z brun $ // @(#)root/mathcore:$Id: Factory.h 21503 2007-12-19 17:34:54Z moneta $
// Author: Andreas Hoecker, Joerg Stelzer, Helge Voss, Kai Voss // Author: L. Moneta Fri Dec 22 14:43:33 2006
/************************************************************************** /**********************************************************************
******** * *
* Project: TMVA - a Root-integrated toolkit for multivariate data analysis * Copyright (c) 2006 LCG ROOT Math Team, CERN/PH-SFT *
* * *
* Package: TMVA * *
* **********************************************************************/
* Class : Factory
* // Header file for class Factory
* Web : http://tmva.sourceforge.net
* #ifndef ROOT_Math_Factory
* #define ROOT_Math_Factory
*
* Description:
*
* This is the main MVA steering class: it creates (books) all MVA met
hods, *
* and guides them through the training, testing and evaluation phases
. *
*
*
* Authors (alphabetical):
*
* Andreas Hoecker <Andreas.Hocker@cern.ch> - CERN, Switzerland
*
* Xavier Prudent <prudent@lapp.in2p3.fr> - LAPP, France
*
* Helge Voss <Helge.Voss@cern.ch> - MPI-K Heidelberg, German
y *
* Kai Voss <Kai.Voss@cern.ch> - U. of Victoria, Canada
*
*
*
* Copyright (c) 2005:
*
* CERN, Switzerland
*
* U. of Victoria, Canada
*
* MPI-K Heidelberg, Germany
*
* LAPP, Annecy, France
*
*
*
* Redistribution and use in source and binary forms, with or without
*
* modification, are permitted according to the terms listed in LICENSE
*
* (http://tmva.sourceforge.net/LICENSE)
*
**************************************************************************
********/
#ifndef ROOT_TMVA_Factory
#define ROOT_TMVA_Factory
//////////////////////////////////////////////////////////////////////////
// //
// Factory //
// //
// This is the main MVA steering class: it creates all MVA methods, //
// and guides them through the training, testing and evaluation //
// phases //
// //
//////////////////////////////////////////////////////////////////////////
#include <string> #include <string>
#include <vector>
#include <map>
#include "TCut.h"
#ifndef ROOT_TMVA_Configurable
#include "TMVA/Configurable.h"
#endif
#ifndef ROOT_TMVA_Types
#include "TMVA/Types.h"
#endif
#ifndef ROOT_TMVA_DataSet
#include "TMVA/DataSet.h"
#endif
#ifndef ROOT_TMVA_MsgLogger
#include "TMVA/MsgLogger.h"
#endif
class TFile;
class TTree;
class TNtuple;
class TTreeFormula;
class TDirectory;
namespace TMVA {
class IMethod;
class Factory : public Configurable {
public:
// no default constructor
Factory( TString theJobName, TFile* theTargetFile, TString theOption
= "" );
// default destructor
virtual ~Factory();
virtual const char* GetName() const { return "Factory"; }
/*
* Create signal and background trees from individual ascii files
* note that the format of the file must be the following:
*
* myVar1/D:myVar2[2]/F:myVar3/I:myString/S
* 3.1415 6.24 56.14 18 UmmmYeah
* 4.31534 7.4555 9.1466 8 OhWell
* ...
* The first line says to make a tree with 4 branches.
* The 1st branch will be called "myVar1" and will contain a Double
_t.
* The 2nd branch will be called "myVar2" and will contain a TArray
F.
* The 3rd branch will be called "myVar3" and will contain an Int_t
.
* The 4th branch will be called "myString" and will contain a TObjSt
ring.
*/
Bool_t SetInputTrees( TString signalFileName, TString backgroundFileN
ame,
Double_t signalWeight=1.0, Double_t backgroundW
eight=1.0 );
Bool_t SetInputTrees( TTree* inputTree, TCut SigCut, TCut BgCut = ""
);
// add events to training and testing trees
void AddSignalTrainingEvent ( std::vector<Double_t>& event, Double
_t weight = 1.0 );
void AddBackgroundTrainingEvent( std::vector<Double_t>& event, Double
_t weight = 1.0 );
void AddSignalTestEvent ( std::vector<Double_t>& event, Double
_t weight = 1.0 );
void AddBackgroundTestEvent ( std::vector<Double_t>& event, Double
_t weight = 1.0 );
// Set input trees at once
Bool_t SetInputTrees( TTree* signal, TTree* background,
Double_t signalWeight=1.0, Double_t backgroundW
eight=1.0 );
// set signal tree
void AddSignalTree( TTree* signal, Double_t weight=1.0, Types::ETreeT
ype treetype = Types::kMaxTreeType );
void AddSignalTree( TTree* signal, Double_t weight, const TString& tr
eetype );
// ... depreciated, kept for backwards compatibility
void SetSignalTree( TTree* signal, Double_t weight=1.0 );
// set background tree
void AddBackgroundTree( TTree* background, Double_t weight=1.0, Types
::ETreeType treetype = Types::kMaxTreeType );
void AddBackgroundTree( TTree* background, Double_t weight, const TSt
ring & treetype );
// ... depreciated, kept for backwards compatibility
void SetBackgroundTree( TTree* background, Double_t weight=1.0 );
// set input variable
void SetInputVariables( std::vector<TString>* theVariables );
void AddVariable( const TString& expression, char type='F',
Double_t min = 0, Double_t max = 0 ) {
Data().AddVariable( expression, min, max, type );
}
void SetWeightExpression( const TString& variable ) {
SetSignalWeightExpression ( variable );
SetBackgroundWeightExpression( variable );
}
void SetSignalWeightExpression( const TString& variable ) {
Data().SetSignalWeightExpression(variable);
}
void SetBackgroundWeightExpression( const TString& variable ) {
Data().SetBackgroundWeightExpression(variable);
}
// prepare input tree for training
void PrepareTrainingAndTestTree( const TCut& cut,
Int_t Ntrain, Int_t Ntest = -1 );
void PrepareTrainingAndTestTree( const TCut& cut,
Int_t NsigTrain, Int_t NbkgTrain, In
t_t NsigTest, Int_t NbkgTest,
const TString& otherOpt );
void PrepareTrainingAndTestTree( const TCut& cut, const TString& spli
tOpt );
void PrepareTrainingAndTestTree( const TCut& sigcut, const TCut& bkgc
ut, const TString& splitOpt );
Bool_t BookMethod( TString theMethodName, TString methodTitle, TStrin
g theOption = "" );
Bool_t BookMethod( Types::EMVA theMethod, TString methodTitle, TStri
ng theOption = "" );
Bool_t BookMethod( TMVA::Types::EMVA theMethod, TString methodTitle,
TString methodOption,
TMVA::Types::EMVA theCommittee, TString committeeO
ption = "" );
// training for all booked methods
void TrainAllMethods( void );
// testing
void TestAllMethods( void );
// performance evaluation
void EvaluateAllMethods( void );
void EvaluateAllVariables( TString options = "" );
// delete all methods and reset the method vector
void DeleteAllMethods( void );
// accessors
IMethod* GetMethod( const TString& title ) const;
Bool_t Verbose( void ) const { return fVerbose; }
void SetVerbose( Bool_t v=kTRUE ) { fVerbose = v; Data().SetVerbose(V
erbose()); }
// make ROOT-independent C++ class for classifier response
// (classifier-specific implementation)
// If no classifier name is given, help messages for all booked
// classifiers are printed
virtual void MakeClass( const TString& methodTitle = "" ) const;
// prints classifier-specific hepl messages, dedicated to
// help with the optimisation and configuration options tuning.
// If no classifier name is given, help messages for all booked
// classifiers are printed
void PrintHelpMessage( const TString& methodTitle = "" ) const;
protected:
// TString GetDefaultName() const { return TString("default"); }
CHGFT
// void CheckMethodTitle( TString & title ) { if (title.Length()
==0) title=GetDefaultName(); } CHGFT
DataSet& Data() const { return *fDataSet; }
DataSet& Data() { return *fDataSet; }
private:
// the beautiful greeting message
void Greetings();
// cd to local directory
DataSet* fDataSet; // the dataset
TFile* fTargetFile; // ROOT output file
TString fOptions; // option string given by const
ruction (presently only "V")
Bool_t fVerbose; // verbose mode
std::vector<TTreeFormula*> fInputVarFormulas; // local forulas of the
same
std::vector<IMethod*> fMethods; // all MVA methods
TString fJobName; // jobname, used as ext
ension in weight file names
// flag determining the way training and test data are assigned to Fa
ctory
enum DataAssignType { kUndefined = 0, kAssignTrees, kAssignEvents };
DataAssignType fDataAssignType; // flags for data
assigning
Bool_t fSuspendDATVerification; // do not tempora
rily verify
// AssignType can only be event-wise OR tree-wise
Bool_t VerifyDataAssignType ( DataAssignType );
void CreateEventAssignTrees( TTree*&, const TString& name );
void SetInputTreesFromEventAssignTrees();
TTree* fTrainSigAssignTree; // tree for training
events
TTree* fTrainBkgAssignTree; // tree for training
events
TTree* fTestSigAssignTree; // tree for test even
ts
TTree* fTestBkgAssignTree; // tree for test even
ts
Int_t fATreeType; // type of event (sig
= 1, background = 0)
Float_t fATreeWeight; // weight of the even
t
Float_t* fATreeEvent; // event variables
// local directory for each MVA in output target, used to store
// specific monitoring histograms (e.g., reference distributions of l
ikelihood method)
TDirectory* fLocalTDir;
protected: namespace ROOT {
namespace Math {
class Minimizer;
//_________________________________________________________________________
__
/**
Factory class holding static functions to create the interfaces like RO
OT::Math::Minimizer
via the Plugin Manager
*/
class Factory {
public:
/**
static method to create the corrisponding Minimizer given the string
*/
static ROOT::Math::Minimizer * CreateMinimizer(const std::string & minim
izerType = "Minuit2", const std::string & algoType = "Migrad");
};
ClassDef(Factory,0) // The factory creates all MVA methods, and perf } // end namespace Fit
orms their training and testing
};
} // namespace TMVA } // end namespace ROOT
#endif #endif /* ROOT_Fit_MinimizerFactory */
 End of changes. 7 change blocks. 
297 lines changed or deleted 38 lines changed or added


 FeldmanCousins.h   FeldmanCousins.h 
skipping to change at line 25 skipping to change at line 25
#include "Rtypes.h" #include "Rtypes.h"
#endif #endif
#ifndef ROOSTATS_IntervalCalculator #ifndef ROOSTATS_IntervalCalculator
#include "RooStats/IntervalCalculator.h" #include "RooStats/IntervalCalculator.h"
#endif #endif
#include "RooStats/ToyMCSampler.h" #include "RooStats/ToyMCSampler.h"
#include "RooStats/ConfidenceBelt.h" #include "RooStats/ConfidenceBelt.h"
#include "RooTreeData.h" #include "RooAbsData.h"
#include "RooWorkspace.h" #include "RooWorkspace.h"
#include "RooAbsPdf.h" #include "RooAbsPdf.h"
#include "RooArgSet.h" #include "RooArgSet.h"
#include "TList.h" #include "TList.h"
class RooAbsData; class RooAbsData;
namespace RooStats { namespace RooStats {
class ConfInterval; class ConfInterval;
class FeldmanCousins : public IntervalCalculator { class FeldmanCousins : public IntervalCalculator {
public: public:
FeldmanCousins(); FeldmanCousins();
virtual ~FeldmanCousins() {} virtual ~FeldmanCousins();
// Main interface to get a ConfInterval (will be a PointSetInterval) // Main interface to get a ConfInterval (will be a PointSetInterval)
virtual ConfInterval* GetInterval() const; virtual ConfInterval* GetInterval() const;
// Get the size of the test (eg. rate of Type I error) // Get the size of the test (eg. rate of Type I error)
virtual Double_t Size() const {return fSize;} virtual Double_t Size() const {return fSize;}
// Get the Confidence level for the test // Get the Confidence level for the test
virtual Double_t ConfidenceLevel() const {return 1.-fSize;} virtual Double_t ConfidenceLevel() const {return 1.-fSize;}
// set a workspace that owns all the necessary components for the ana lysis // set a workspace that owns all the necessary components for the ana lysis
virtual void SetWorkspace(RooWorkspace& ws) {fWS = &ws;} virtual void SetWorkspace(RooWorkspace& ws) {
if(fOwnsWorkspace && fWS) delete fWS;
fOwnsWorkspace = false;
fWS = &ws;
}
// Set the DataSet, add to the the workspace if not already there // Set the DataSet, add to the the workspace if not already there
virtual void SetData(RooAbsData& data) { virtual void SetData(RooAbsData& data) {
if(&data){ if (!fWS) {
fWS->import(data); fWS = new RooWorkspace();
fDataName = data.GetName(); fOwnsWorkspace = true;
fWS->Print(); }
} if (! fWS->data(data.GetName()) ) {
RooMsgService::instance().setGlobalKillBelow(RooFit::ERROR) ;
fWS->import(data);
RooMsgService::instance().setGlobalKillBelow(RooFit::DEBUG) ;
}
SetData(data.GetName());
} }
// Set the Pdf, add to the the workspace if not already there // Set the Pdf, add to the the workspace if not already there
virtual void SetPdf(RooAbsPdf& pdf) { virtual void SetPdf(RooAbsPdf& pdf) {
if(&pdf){ if (!fWS)
fWS->import(pdf); fWS = new RooWorkspace();
fPdfName = pdf.GetName(); if (! fWS->pdf( pdf.GetName() ))
} {
RooMsgService::instance().setGlobalKillBelow(RooFit::ERROR) ;
fWS->import(pdf);
RooMsgService::instance().setGlobalKillBelow(RooFit::DEBUG) ;
}
SetPdf(pdf.GetName());
} }
// specify the name of the dataset in the workspace to be used // specify the name of the dataset in the workspace to be used
virtual void SetData(const char* name) {fDataName = name;} virtual void SetData(const char* name) {fDataName = name;}
// specify the name of the PDF in the workspace to be used // specify the name of the PDF in the workspace to be used
virtual void SetPdf(const char* name) {fPdfName = name;} virtual void SetPdf(const char* name) {fPdfName = name;}
// specify the parameters of interest in the interval // specify the parameters of interest in the interval
virtual void SetParameters(RooArgSet& set) {fPOI = &set;} virtual void SetParameters(RooArgSet& set) {fPOI = &set;}
// specify the nuisance parameters (eg. the rest of the parameters) // specify the nuisance parameters (eg. the rest of the parameters)
virtual void SetNuisanceParameters(RooArgSet& set) {fNuisParams = &se t;} virtual void SetNuisanceParameters(RooArgSet& set) {fNuisParams = &se t;}
// set the size of the test (rate of Type I error) ( Eg. 0.05 for a 9 5% Confidence Interval) // set the size of the test (rate of Type I error) ( Eg. 0.05 for a 9 5% Confidence Interval)
virtual void SetTestSize(Double_t size) {fSize = size;} virtual void SetTestSize(Double_t size) {fSize = size;}
// set the confidence level for the interval (eg. 0.95 for a 95% Conf idence Interval) // set the confidence level for the interval (eg. 0.95 for a 95% Conf idence Interval)
virtual void SetConfidenceLevel(Double_t cl) {fSize = 1.-cl;} virtual void SetConfidenceLevel(Double_t cl) {fSize = 1.-cl;}
RooTreeData* GetPointsToScan() { RooAbsData* GetPointsToScan() {
if(!fPointsToTest) CreateParameterPoints(); if(!fPointsToTest) CreateParameterPoints();
return fPointsToTest; return fPointsToTest;
} }
ConfidenceBelt* GetConfidenceBelt() {return fConfBelt;} ConfidenceBelt* GetConfidenceBelt() {return fConfBelt;}
void UseAdaptiveSampling(bool flag=true){fAdaptiveSampling=flag;} void UseAdaptiveSampling(bool flag=true){fAdaptiveSampling=flag;}
void SetNBins(Int_t bins) {fNbins = bins;} void SetNBins(Int_t bins) {fNbins = bins;}
void FluctuateNumDataEntries(bool flag=true){fFluctuateData = flag;} void FluctuateNumDataEntries(bool flag=true){fFluctuateData = flag;}
void SaveBeltToFile(bool flag=true){
fSaveBeltToFile = flag;
if(flag) fCreateBelt = true;
}
void CreateConfBelt(bool flag=true){fCreateBelt = flag;}
private: private:
// initializes fPointsToTest data member (mutable) // initializes fPointsToTest data member (mutable)
void CreateParameterPoints() const; void CreateParameterPoints() const;
// initializes fTestStatSampler data member (mutable) // initializes fTestStatSampler data member (mutable)
void CreateTestStatSampler() const; void CreateTestStatSampler() const;
Double_t fSize; // size of the test (eg. specified rate of Type I err or) Double_t fSize; // size of the test (eg. specified rate of Type I err or)
RooWorkspace* fWS; // a workspace that owns all the components to be used by the calculator RooWorkspace* fWS; // a workspace that owns all the components to be used by the calculator
Bool_t fOwnsWorkspace; // flag if this object owns its workspace Bool_t fOwnsWorkspace; // flag if this object owns its workspace
const char* fPdfName; // name of common PDF in workspace const char* fPdfName; // name of common PDF in workspace
const char* fDataName; // name of data set in workspace const char* fDataName; // name of data set in workspace
RooArgSet* fPOI; // RooArgSet specifying parameters of interest for interval RooArgSet* fPOI; // RooArgSet specifying parameters of interest for interval
RooArgSet* fNuisParams;// RooArgSet specifying nuisance parameters f or interval RooArgSet* fNuisParams;// RooArgSet specifying nuisance parameters f or interval
mutable ToyMCSampler* fTestStatSampler; // the test statistic sampler mutable ToyMCSampler* fTestStatSampler; // the test statistic sampler
mutable RooTreeData* fPointsToTest; // points to perform the construc tion mutable RooAbsData* fPointsToTest; // points to perform the construct ion
mutable ConfidenceBelt* fConfBelt; mutable ConfidenceBelt* fConfBelt;
bool fAdaptiveSampling; // controls use of adaptive sampling algorith m bool fAdaptiveSampling; // controls use of adaptive sampling algorith m
Int_t fNbins; // number of samples per variable Int_t fNbins; // number of samples per variable
Bool_t fFluctuateData; // tell ToyMCSampler to fluctuate number of e ntries in dataset Bool_t fFluctuateData; // tell ToyMCSampler to fluctuate number of e ntries in dataset
Bool_t fDoProfileConstruction; // instead of full construction over n
uisance parametrs, do profile
bool fSaveBeltToFile; // controls use if ConfidenceBelt should be sav
ed to a TFile
bool fCreateBelt; // controls use if ConfidenceBelt should be saved t
o a TFile
protected: protected:
ClassDef(FeldmanCousins,1) // Interface for tools setting limits (p roducing confidence intervals) ClassDef(FeldmanCousins,1) // Interface for tools setting limits (p roducing confidence intervals)
}; };
} }
#endif #endif
 End of changes. 10 change blocks. 
14 lines changed or deleted 42 lines changed or added


 FitConfig.h   FitConfig.h 
// @(#)root/mathcore:$Id: FitConfig.h 26508 2008-11-28 14:22:29Z moneta $ // @(#)root/mathcore:$Id: FitConfig.h 28946 2009-06-11 15:39:14Z moneta $
// Author: L. Moneta Thu Sep 21 16:21:29 2006 // Author: L. Moneta Thu Sep 21 16:21:29 2006
/********************************************************************** /**********************************************************************
* * * *
* Copyright (c) 2006 LCG ROOT Math Team, CERN/PH-SFT * * Copyright (c) 2006 LCG ROOT Math Team, CERN/PH-SFT *
* * * *
* * * *
**********************************************************************/ **********************************************************************/
// Header file for class FitConfig // Header file for class FitConfig
skipping to change at line 56 skipping to change at line 56
*/ */
class FitConfig { class FitConfig {
public: public:
/** /**
Default constructor Default constructor
*/ */
FitConfig (unsigned int npar = 0); FitConfig (unsigned int npar = 0);
/*
Copy constructor
*/
FitConfig(const FitConfig & rhs);
/** /**
Destructor Destructor
*/ */
~FitConfig (); ~FitConfig ();
/*
Assignment operator
*/
FitConfig & operator= (const FitConfig & rhs);
/** /**
get the parameter settings for the i-th parameter (const method) get the parameter settings for the i-th parameter (const method)
*/ */
const ParameterSettings & ParSettings(unsigned int i) const { return fSe ttings.at(i); } const ParameterSettings & ParSettings(unsigned int i) const { return fSe ttings.at(i); }
/** /**
get the parameter settings for the i-th parameter (non-const method) get the parameter settings for the i-th parameter (non-const method)
*/ */
ParameterSettings & ParSettings(unsigned int i) { return fSettings.at(i) ; } ParameterSettings & ParSettings(unsigned int i) { return fSettings.at(i) ; }
skipping to change at line 140 skipping to change at line 150
const std::string & MinimizerAlgoType() const { return fMinimAlgoType; } const std::string & MinimizerAlgoType() const { return fMinimAlgoType; }
/** /**
flag to check if resulting errors are be normalized according to chi2 /ndf flag to check if resulting errors are be normalized according to chi2 /ndf
*/ */
bool NormalizeErrors() const { return fNormErrors; } bool NormalizeErrors() const { return fNormErrors; }
///do analysis for parabolic errors ///do analysis for parabolic errors
bool ParabErrors() const { return fParabErrors; } bool ParabErrors() const { return fParabErrors; }
///do minos errros analysis on all parameters ///do minos errros analysis on the parameters
bool MinosErrors() const { return fMinosErrors; } bool MinosErrors() const { return fMinosErrors; }
/// return vector of parameter indeces for which the Minos Error will be
computed
const std::vector<unsigned int> & MinosParams() const { return fMinosPar
ams; }
/** /**
set the option to normalize the error on the result according to chi 2/ndf set the option to normalize the error on the result according to chi 2/ndf
*/ */
void SetNormErrors(bool on) { fNormErrors= on; } void SetNormErrors(bool on = true) { fNormErrors= on; }
///set parabolic erros ///set parabolic erros
void SetParabErrors(bool on) { fParabErrors = on; } void SetParabErrors(bool on = true) { fParabErrors = on; }
///set Minos erros ///set Minos erros
void SetMinosErrors(bool on) { fMinosErrors = on; } void SetMinosErrors(bool on = true) { fMinosErrors = on; }
/// set parameter indeces for running Minos
/// this can be used for running Minos on a subset of parameters - other
wise is run on all of them
/// if MinosErrors() is set
void SetMinosErrors(const std::vector<unsigned int> & paramInd ) {
fMinosErrors = true;
fMinosParams = paramInd;
}
/** /**
static function to control default minimizer type and algorithm static function to control default minimizer type and algorithm
*/ */
static void SetDefaultMinimizer(const char * type, const char * algo = 0 ); static void SetDefaultMinimizer(const char * type, const char * algo = 0 );
protected: protected:
private: private:
bool fNormErrors; // flag for error normalization bool fNormErrors; // flag for error normalization
bool fParabErrors; // get correct parabolic errors estimate (call Hess e after minimizing) bool fParabErrors; // get correct parabolic errors estimate (call Hess e after minimizing)
bool fMinosErrors; // do full error analysis using Minos bool fMinosErrors; // do full error analysis using Minos
std::vector<ROOT::Fit::ParameterSettings> fSettings; // vector with the parameter settings std::vector<ROOT::Fit::ParameterSettings> fSettings; // vector with the parameter settings
std::vector<unsigned int> fMinosParams; // vector with the parameter indeces for running Minos
std::string fMinimizerType; // minimizer type (MINUIT, MINUIT2, etc..) std::string fMinimizerType; // minimizer type (MINUIT, MINUIT2, etc..)
std::string fMinimAlgoType; // algorithm type (MIGRAD, SIMPLEX, etc..) std::string fMinimAlgoType; // algorithm type (MIGRAD, SIMPLEX, etc..)
MinimizerControlParams fMinimizerOpts; //minimizer control parameters MinimizerControlParams fMinimizerOpts; //minimizer control parameters
}; };
} // end namespace Fit } // end namespace Fit
} // end namespace ROOT } // end namespace ROOT
 End of changes. 9 change blocks. 
5 lines changed or deleted 30 lines changed or added


 FitResult.h   FitResult.h 
// @(#)root/mathcore:$Id: FitResult.h 26866 2008-12-12 10:50:07Z moneta $ // @(#)root/mathcore:$Id: FitResult.h 28957 2009-06-12 13:40:04Z moneta $
// Author: L. Moneta Wed Aug 30 11:05:34 2006 // Author: L. Moneta Wed Aug 30 11:05:34 2006
/********************************************************************** /**********************************************************************
* * * *
* Copyright (c) 2006 LCG ROOT Math Team, CERN/PH-SFT * * Copyright (c) 2006 LCG ROOT Math Team, CERN/PH-SFT *
* * * *
* * * *
**********************************************************************/ **********************************************************************/
// Header file for class FitResult // Header file for class FitResult
skipping to change at line 24 skipping to change at line 24
#define ROOT_Fit_FitResult #define ROOT_Fit_FitResult
#ifndef ROOT_Fit_IFunctionfwd #ifndef ROOT_Fit_IFunctionfwd
#include "Math/IFunctionfwd.h" #include "Math/IFunctionfwd.h"
#endif #endif
#ifndef ROOT_Fit_IParamFunctionfwd #ifndef ROOT_Fit_IParamFunctionfwd
#include "Math/IParamFunctionfwd.h" #include "Math/IParamFunctionfwd.h"
#endif #endif
#include <vector> #include <vector>
#include <map>
#include <string> #include <string>
#include <cmath> #include <cmath>
#include <cassert> #include <cassert>
namespace ROOT { namespace ROOT {
namespace Math { namespace Math {
class Minimizer; class Minimizer;
} }
skipping to change at line 60 skipping to change at line 61
public: public:
typedef ROOT::Math::IParamMultiFunction IModelFunction; typedef ROOT::Math::IParamMultiFunction IModelFunction;
/** /**
Default constructor for an empty (non valid) fit result Default constructor for an empty (non valid) fit result
*/ */
FitResult (); FitResult ();
/** /**
Construct from a Minimizer instance Construct from a Minimizer instance after fitting
Run also Minos if requested from the configuration
*/ */
FitResult(ROOT::Math::Minimizer & min, const FitConfig & fconfig, const IModelFunction * f, bool isValid, unsigned int sizeOfData = 0, bool binFit = true, const ROOT::Math::IMultiGenFunction * chi2func = 0, bool minosErr = false, unsigned int ncalls = 0); FitResult(ROOT::Math::Minimizer & min, const FitConfig & fconfig, const IModelFunction * f, bool isValid, unsigned int sizeOfData = 0, bool binFit = true, const ROOT::Math::IMultiGenFunction * chi2func = 0, unsigned int nc alls = 0);
/** /**
Copy constructor. Copy constructor.
*/ */
FitResult(const FitResult &); FitResult(const FitResult &);
/** /**
Assignment operator Assignment operator
*/ */
FitResult & operator = (const FitResult & rhs); FitResult & operator = (const FitResult & rhs);
/** /**
Destructor Destructor
*/ */
~FitResult (); ~FitResult ();
public: public:
/**
Update the fit result with a new minimization status
To be run only if same fit is performed with same configuration
Note that in this case MINOS is not re-run. If one wants to run also
MINOS
a new result must be created
*/
bool Update(const ROOT::Math::Minimizer & min, bool isValid, unsigned in
t ncalls = 0 );
/** minimization quantities **/ /** minimization quantities **/
/// minimizer type /// minimizer type
const std::string & MinimizerType() const { return fMinimType; } const std::string & MinimizerType() const { return fMinimType; }
/// True if fit successful, otherwise false. /// True if fit successful, otherwise false.
bool IsValid() const { return fValid; } bool IsValid() const { return fValid; }
/// True if a fit result does not exist (even invalid) with parameter va lues /// True if a fit result does not exist (even invalid) with parameter va lues
bool IsEmpty() const { return (fParams.size() == 0); } bool IsEmpty() const { return (fParams.size() == 0); }
skipping to change at line 139 skipping to change at line 149
const std::vector<double> & Parameters() const { return fParams; } const std::vector<double> & Parameters() const { return fParams; }
/// parameter value by index /// parameter value by index
double Value(unsigned int i) const { return fParams[i]; } double Value(unsigned int i) const { return fParams[i]; }
/// parameter error by index /// parameter error by index
double Error(unsigned int i) const { double Error(unsigned int i) const {
return (i < fErrors.size() ) ? fErrors[i] : 0; return (i < fErrors.size() ) ? fErrors[i] : 0;
} }
// /// Minos Errors /// set the Minos errors for parameter i (called by the Fitter class whe
// const std::vector<std::pair<double, double> > MinosErrors() const; n running Minos)
void SetMinosError(unsigned int i, double elow, double eup);
/// lower Minos error /// lower Minos error. If Minos has not run for parameter i return the p
double LowerError(unsigned int i) const { arabolic error
return (i < fMinosErrors.size() ) ? fMinosErrors[i].first : fErrors[i double LowerError(unsigned int i) const;
];
}
/// upper Minos error /// upper Minos error. If Minos has not run for parameter i return the p
double UpperError(unsigned int i) const { arabolic error
return (i < fMinosErrors.size() ) ? fMinosErrors[i].second : fErrors[ double UpperError(unsigned int i) const;
i];
}
/// parameter global correlation coefficient /// parameter global correlation coefficient
double GlobalCC(unsigned int i) const { double GlobalCC(unsigned int i) const {
return (i < fGlobalCC.size() ) ? fGlobalCC[i] : -1; return (i < fGlobalCC.size() ) ? fGlobalCC[i] : -1;
} }
/// retrieve covariance matrix element /// retrieve covariance matrix element
double CovMatrix (unsigned int i, unsigned int j) const { double CovMatrix (unsigned int i, unsigned int j) const {
if ( i >= fErrors.size() || j >= fErrors.size() ) return 0; if ( i >= fErrors.size() || j >= fErrors.size() ) return 0;
if (fCovMatrix.size() == 0) return 0; // no matrix is available in ca se of non-valid fits if (fCovMatrix.size() == 0) return 0; // no matrix is available in ca se of non-valid fits
skipping to change at line 175 skipping to change at line 181
} }
/// retrieve correlation elements /// retrieve correlation elements
double Correlation(unsigned int i, unsigned int j ) const { double Correlation(unsigned int i, unsigned int j ) const {
if ( i >= fErrors.size() || j >= fErrors.size() ) return 0; if ( i >= fErrors.size() || j >= fErrors.size() ) return 0;
if (fCovMatrix.size() == 0) return 0; // no matrix is available in ca se of non-valid fits if (fCovMatrix.size() == 0) return 0; // no matrix is available in ca se of non-valid fits
double tmp = CovMatrix(i,i)*CovMatrix(j,j); double tmp = CovMatrix(i,i)*CovMatrix(j,j);
return ( tmp > 0) ? CovMatrix(i,j)/ std::sqrt(tmp) : 0; return ( tmp > 0) ? CovMatrix(i,j)/ std::sqrt(tmp) : 0;
} }
/// fill covariance matrix elements using a generic symmetric matrix cla ss implementing operator(i,j) /// fill covariance matrix elements using a generic matrix class impleme nting operator(i,j)
/// the matrix must be previously allocates with right size (npar * npar ) /// the matrix must be previously allocates with right size (npar * npar )
template<class Matrix> template<class Matrix>
void GetCovarianceMatrix(Matrix & mat) { void GetCovarianceMatrix(Matrix & mat) const {
int npar = fErrors.size(); unsigned int npar = fErrors.size();
assert(fCovMatrix.size() == npar*(npar+1)/2); assert(fCovMatrix.size() == npar*(npar+1)/2);
for (int i = 0; i< npar; ++i) { for (unsigned int i = 0; i< npar; ++i) {
for (int j = 0; j<=i; ++i) { for (unsigned int j = 0; j<=i; ++j) {
mat(i,j) = fCovMatrix[j + i*(i+1)/2 ]; mat(i,j) = fCovMatrix[j + i*(i+1)/2 ];
if (i != j) mat(j,i) = mat(i,j);
} }
} }
} }
/// fill a correlation matrix elements using a generic symmetric matrix class implementing operator(i,j) /// fill a correlation matrix elements using a generic symmetric matrix class implementing operator(i,j)
/// the matrix must be previously allocates with right size (npar * npar ) /// the matrix must be previously allocates with right size (npar * npar )
template<class Matrix> template<class Matrix>
void GetCorrelationMatrix(Matrix & mat) { void GetCorrelationMatrix(Matrix & mat) const {
int npar = fErrors.size(); unsigned int npar = fErrors.size();
assert(fCovMatrix.size() == npar*(npar+1)/2); assert(fCovMatrix.size() == npar*(npar+1)/2);
for (int i = 0; i< npar; ++i) { for (unsigned int i = 0; i< npar; ++i) {
for (int j = 0; j<=i; ++i) { for (unsigned int j = 0; j<=i; ++j) {
double tmp = fCovMatrix[i * (i +3)/2 ] * fCovMatrix[ j * (j+3)/ 2 ]; double tmp = fCovMatrix[i * (i +3)/2 ] * fCovMatrix[ j * (j+3)/ 2 ];
if (tmp < 0) if (tmp < 0)
mat(i,j) = 0; mat(i,j) = 0;
else else
mat(i,j) = fCovMatrix[j + i*(i+1)/2 ] / std::sqrt(tmp); mat(i,j) = fCovMatrix[j + i*(i+1)/2 ] / std::sqrt(tmp);
if (i != j) mat(j,i) = mat(i,j);
} }
} }
} }
/** /**
get confidence intervals for an array of n points x. get confidence intervals for an array of n points x.
stride1 indicates the stride in the coordinate space while stride2 th e stride in dimension space. stride1 indicates the stride in the coordinate space while stride2 th e stride in dimension space.
For 1-dim points : stride1=1, stride2=1 For 1-dim points : stride1=1, stride2=1
for multi-dim points arranged as (x0,x1,...,xN,y0,....yN) st ride1=1 stride2=n for multi-dim points arranged as (x0,x1,...,xN,y0,....yN) st ride1=1 stride2=n
for multi-dim points arraged as (x0,y0,..,x1,y1,...,xN,yN,..) st ride1=ndim, stride2=1 for multi-dim points arraged as (x0,y0,..,x1,y1,...,xN,yN,..) st ride1=ndim, stride2=1
skipping to change at line 234 skipping to change at line 244
/// get index for parameter name (return -1 if not found) /// get index for parameter name (return -1 if not found)
int Index(const std::string & name) const; int Index(const std::string & name) const;
///normalize errors using chi2/ndf for chi2 fits ///normalize errors using chi2/ndf for chi2 fits
void NormalizeErrors(); void NormalizeErrors();
/// flag to chek if errors are normalized /// flag to chek if errors are normalized
bool NormalizedErrors() { return fNormalized; } bool NormalizedErrors() { return fNormalized; }
/// get confidence level given an array of x data points
/// print the result and optionaly covariance matrix and correlations /// print the result and optionaly covariance matrix and correlations
void Print(std::ostream & os, bool covmat = false) const; void Print(std::ostream & os, bool covmat = false) const;
///print error matrix and correlations ///print error matrix and correlations
void PrintCovMatrix(std::ostream & os) const; void PrintCovMatrix(std::ostream & os) const;
/// query if a parameter is bound /// query if a parameter is bound
bool IsParameterBound(unsigned int ipar) const; bool IsParameterBound(unsigned int ipar) const;
/// query if a parameter is fixed /// query if a parameter is fixed
skipping to change at line 278 skipping to change at line 286
double fVal; // minimum function value double fVal; // minimum function value
double fEdm; // expected distance from mimimum double fEdm; // expected distance from mimimum
double fChi2; // fit chi2 value (different than fval in case of chi2 fits) double fChi2; // fit chi2 value (different than fval in case of chi2 fits)
IModelFunction * fFitFunc; // model function resulting from the fit. It is given by Fitter but it is managed by FitResult IModelFunction * fFitFunc; // model function resulting from the fit. It is given by Fitter but it is managed by FitResult
std::vector<unsigned int> fFixedParams; // list of fixed parameters std::vector<unsigned int> fFixedParams; // list of fixed parameters
std::vector<unsigned int> fBoundParams; // list of limited parameters std::vector<unsigned int> fBoundParams; // list of limited parameters
std::vector<double> fParams; // parameter values. Size is total number of parameters std::vector<double> fParams; // parameter values. Size is total number of parameters
std::vector<double> fErrors; // errors std::vector<double> fErrors; // errors
std::vector<double> fCovMatrix; // covariance matrix (size is n par*(npar+1)/2) where npar is total parameters std::vector<double> fCovMatrix; // covariance matrix (size is n par*(npar+1)/2) where npar is total parameters
std::vector<double> fGlobalCC; // global Correlation coefficie nt std::vector<double> fGlobalCC; // global Correlation coefficie nt
std::vector<std::pair<double,double> > fMinosErrors; // vector contain s the two Minos errors std::map<unsigned int, std::pair<double,double> > fMinosErrors; // map contains the two Minos errors
std::string fMinimType; // string indicating type of minimi zer std::string fMinimType; // string indicating type of minimi zer
std::vector<std::string> fParNames; // parameter names (only with FCN o nly fites, when fFitFunc=0) std::vector<std::string> fParNames; // parameter names (only with FCN o nly fites, when fFitFunc=0)
}; };
} // end namespace Fit } // end namespace Fit
} // end namespace ROOT } // end namespace ROOT
#endif /* ROOT_Fit_FitResult */ #endif /* ROOT_Fit_FitResult */
 End of changes. 17 change blocks. 
27 lines changed or deleted 38 lines changed or added


 Fitter.h   Fitter.h 
// @(#)root/mathcore:$Id: Fitter.h 26866 2008-12-12 10:50:07Z moneta $ // @(#)root/mathcore:$Id: Fitter.h 28946 2009-06-11 15:39:14Z moneta $
// Author: L. Moneta Wed Aug 30 11:05:19 2006 // Author: L. Moneta Wed Aug 30 11:05:19 2006
/********************************************************************** /**********************************************************************
* * * *
* Copyright (c) 2006 LCG ROOT Math Team, CERN/PH-SFT * * Copyright (c) 2006 LCG ROOT Math Team, CERN/PH-SFT *
* * * *
* * * *
**********************************************************************/ **********************************************************************/
// Header file for class Fitter // Header file for class Fitter
skipping to change at line 217 skipping to change at line 217
/** /**
get fit result get fit result
*/ */
const FitResult & Result() const { const FitResult & Result() const {
assert( fResult.get() ); assert( fResult.get() );
return *fResult; return *fResult;
} }
/** /**
perform an error analysis on the result using the Hessian
Errors are obtaied from the inverse of the Hessian matrix
To be called only after fitting and when a minimizer supporting the H
essian calculations is used
otherwise an error (false) is returned.
A new FitResult with the Hessian result will be produced
*/
bool CalculateHessErrors();
/**
perform an error analysis on the result using MINOS
To be called only after fitting and when a minimizer supporting MINOS
is used
otherwise an error (false) is returned.
The result will be appended in the fit result class
Optionally a vector of parameter indeces can be passed for selecting
the parameters to analyse using FitConfig::SetMinosErrors
*/
bool CalculateMinosErrors();
/**
access to the fit configuration (const method) access to the fit configuration (const method)
*/ */
const FitConfig & Config() const { return fConfig; } const FitConfig & Config() const { return fConfig; }
/** /**
access to the configuration (non const method) access to the configuration (non const method)
*/ */
FitConfig & Config() { return fConfig; } FitConfig & Config() { return fConfig; }
/** /**
 End of changes. 2 change blocks. 
1 lines changed or deleted 22 lines changed or added


 FitterBase.h   FitterBase.h 
// @(#)root/tmva $Id: FitterBase.h 20882 2007-11-19 11:31:26Z rdm $ // @(#)root/tmva $Id: FitterBase.h 29195 2009-06-24 10:39:49Z brun $
// Author: Andreas Hoecker, Peter Speckmayer, Joerg Stelzer, Helge Voss // Author: Andreas Hoecker, Peter Speckmayer, Joerg Stelzer, Helge Voss
/************************************************************************** ******** /************************************************************************** ********
* Project: TMVA - a Root-integrated toolkit for multivariate data analysis * * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
* Package: TMVA * * Package: TMVA *
* Class : FitterBase * * Class : FitterBase *
* Web : http://tmva.sourceforge.net * * Web : http://tmva.sourceforge.net *
* * * *
* Description: * * Description: *
* Base class for TMVA fitters * * Base class for TMVA fitters *
skipping to change at line 40 skipping to change at line 40
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// // // //
// FitterBase // // FitterBase //
// // // //
// Baseclass for TMVA fitters // // Baseclass for TMVA fitters //
// // // //
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
#include<vector> #include<vector>
#ifndef ROOT_TObject
#include "TObject.h" #include "TObject.h"
#endif
#ifndef ROOT_TString
#include "TString.h" #include "TString.h"
#ifndef ROOT_TMVA_MsgLogger
#include "TMVA/MsgLogger.h"
#endif #endif
#ifndef ROOT_TMVA_Configurable #ifndef ROOT_TMVA_Configurable
#include "TMVA/Configurable.h" #include "TMVA/Configurable.h"
#endif #endif
namespace TMVA { namespace TMVA {
class Interval; class Interval;
class IFitterTarget; class IFitterTarget;
class MsgLogger;
class FitterBase : public Configurable { class FitterBase : public Configurable {
public: public:
FitterBase( IFitterTarget& target, const TString& name, const std::ve ctor<TMVA::Interval*> ranges, FitterBase( IFitterTarget& target, const TString& name, const std::ve ctor<TMVA::Interval*> ranges,
const TString& theOption ); const TString& theOption );
virtual ~FitterBase() {} virtual ~FitterBase() {}
skipping to change at line 85 skipping to change at line 87
protected: protected:
// need to implement option declaration // need to implement option declaration
virtual void DeclareOptions() = 0; virtual void DeclareOptions() = 0;
IFitterTarget& fFitterTarget; // pointer to targ et of fitting procedure IFitterTarget& fFitterTarget; // pointer to targ et of fitting procedure
const std::vector<TMVA::Interval*> fRanges; // allowed interva ls const std::vector<TMVA::Interval*> fRanges; // allowed interva ls
Int_t fNpars; // number of param eters Int_t fNpars; // number of param eters
mutable MsgLogger fLogger; // message logger mutable MsgLogger* fLogger; // message logger
MsgLogger& Log() const { return *fLogger; }
TString fClassName; // remove TMVA:: f rom TObject name TString fClassName; // remove TMVA:: f rom TObject name
ClassDef(FitterBase,0) // Baseclass for fitters ClassDef(FitterBase,0) // Baseclass for fitters
}; };
} // namespace TMVA } // namespace TMVA
#endif #endif
 End of changes. 7 change blocks. 
5 lines changed or deleted 9 lines changed or added


 FumiliStandardChi2FCN.h   FumiliStandardChi2FCN.h 
// @(#)root/minuit2:$Id: FumiliStandardChi2FCN.h 20880 2007-11-19 11:23:41Z rdm $ // @(#)root/minuit2:$Id: FumiliStandardChi2FCN.h 29198 2009-06-24 13:05:43Z brun $
// Authors: M. Winkler, F. James, L. Moneta, A. Zsenei 2003-2005 // Authors: M. Winkler, F. James, L. Moneta, A. Zsenei 2003-2005
/********************************************************************** /**********************************************************************
* * * *
* Copyright (c) 2005 LCG ROOT Math team, CERN/PH-SFT * * Copyright (c) 2005 LCG ROOT Math team, CERN/PH-SFT *
* * * *
**********************************************************************/ **********************************************************************/
#ifndef ROOT_Minuit2_FumiliStandardChi2FCN #ifndef ROOT_Minuit2_FumiliStandardChi2FCN
#define ROOT_Minuit2_FumiliStandardChi2FCN #define ROOT_Minuit2_FumiliStandardChi2FCN
skipping to change at line 83 skipping to change at line 83
// correct for variance == 0 // correct for variance == 0
fInvErrors.resize(n); fInvErrors.resize(n);
for (unsigned int i = 0; i < n; ++i) for (unsigned int i = 0; i < n; ++i)
{ {
x[0] = pos[i]; x[0] = pos[i];
fPositions.push_back(x); fPositions.push_back(x);
// PAW/ROOT hack : use 1 for 0 entries bins // PAW/ROOT hack : use 1 for 0 entries bins
if (mvar[i] == 0) if (mvar[i] == 0)
fInvErrors[i] = 1; fInvErrors[i] = 1;
else else
fInvErrors[i] = 1.0/sqrt(mvar[i]); fInvErrors[i] = 1.0/std::sqrt(mvar[i]);
} }
} }
/** /**
Constructor which initializes the multi-dimensional model function. Constructor which initializes the multi-dimensional model function.
@param modelFCN the model function used for describing the data. @param modelFCN the model function used for describing the data.
skipping to change at line 124 skipping to change at line 124
fPositions = pos; fPositions = pos;
// correct for variance == 0 // correct for variance == 0
unsigned int n = mvar.size(); unsigned int n = mvar.size();
fInvErrors.resize(n); fInvErrors.resize(n);
for (unsigned int i = 0; i < n; ++i) for (unsigned int i = 0; i < n; ++i)
{ {
// PAW/ROOT hack : use 1 for 0 entries bins // PAW/ROOT hack : use 1 for 0 entries bins
if (mvar[i] == 0) if (mvar[i] == 0)
fInvErrors[i] = 1; fInvErrors[i] = 1;
else else
fInvErrors[i] = 1.0/sqrt(mvar[i]); fInvErrors[i] = 1.0/std::sqrt(mvar[i]);
} }
} }
~FumiliStandardChi2FCN() {} ~FumiliStandardChi2FCN() {}
/** /**
Evaluates the model function for the different measurement points and Evaluates the model function for the different measurement points and
the Parameter values supplied, calculates a figure-of-merit for each the Parameter values supplied, calculates a figure-of-merit for each
 End of changes. 3 change blocks. 
3 lines changed or deleted 3 lines changed or added


 FunctionBuilder.h   FunctionBuilder.h 
// @(#)root/reflex:$Id: FunctionBuilder.h 22729 2008-03-19 10:20:10Z pcanal $ // @(#)root/reflex:$Id: FunctionBuilder.h 28992 2009-06-15 09:20:22Z axel $
// Author: Stefan Roiser 2004 // Author: Stefan Roiser 2004
// Copyright CERN, CH-1211 Geneva 23, 2004-2006, All rights reserved. // Copyright CERN, CH-1211 Geneva 23, 2004-2006, All rights reserved.
// //
// Permission to use, copy, modify, and distribute this software for any // Permission to use, copy, modify, and distribute this software for any
// purpose is hereby granted without fee, provided that this copyright and // purpose is hereby granted without fee, provided that this copyright and
// permissions notice appear in all copies and derivatives. // permissions notice appear in all copies and derivatives.
// //
// This software is provided "as is" without express or implied warranty. // This software is provided "as is" without express or implied warranty.
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 GSLMinimizer.h   GSLMinimizer.h 
// @(#)root/mathmore:$Id: GSLMinimizer.h 26866 2008-12-12 10:50:07Z moneta $ // @(#)root/mathmore:$Id: GSLMinimizer.h 29068 2009-06-17 16:28:51Z moneta $
// Author: L. Moneta Wed Oct 18 11:48:00 2006 // Author: L. Moneta Wed Oct 18 11:48:00 2006
/********************************************************************** /**********************************************************************
* * * *
* Copyright (c) 2006 LCG ROOT Math Team, CERN/PH-SFT * * Copyright (c) 2006 LCG ROOT Math Team, CERN/PH-SFT *
* * * *
* This library is free software; you can redistribute it and/or * * This library is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License * * modify it under the terms of the GNU General Public License *
* as published by the Free Software Foundation; either version 2 * * as published by the Free Software Foundation; either version 2 *
* of the License, or (at your option) any later version. * * of the License, or (at your option) any later version. *
skipping to change at line 42 skipping to change at line 42
#endif #endif
#ifndef ROOT_Math_IFunctionfwd #ifndef ROOT_Math_IFunctionfwd
#include "Math/IFunctionfwd.h" #include "Math/IFunctionfwd.h"
#endif #endif
#ifndef ROOT_Math_IParamFunctionfwd #ifndef ROOT_Math_IParamFunctionfwd
#include "Math/IParamFunctionfwd.h" #include "Math/IParamFunctionfwd.h"
#endif #endif
#ifndef ROOT_Math_MinimizerVariable
#include "Math/MinimizerVariable.h"
#endif
#include <vector> #include <vector>
#include <map>
#include <string> #include <string>
namespace ROOT { namespace ROOT {
namespace Math { namespace Math {
/** /**
enumeration specifying the types of GSL minimizers enumeration specifying the types of GSL minimizers
@ingroup MultiMin @ingroup MultiMin
*/ */
enum EGSLMinimizerType { enum EGSLMinimizerType {
kConjugateFR, kConjugateFR,
kConjugatePR, kConjugatePR,
kVectorBFGS, kVectorBFGS,
kVectorBFGS2, kVectorBFGS2,
kSteepestDescent kSteepestDescent
}; };
class GSLMultiMinimizer; class GSLMultiMinimizer;
} class MinimTransformFunction;
namespace Math {
//_________________________________________________________________________ ____________ //_________________________________________________________________________ ____________
/** /**
GSLMinimizer class. GSLMinimizer class.
Implementation of the ROOT::Math::Minimizer interface using the GSL mult i-dimensional Implementation of the ROOT::Math::Minimizer interface using the GSL mult i-dimensional
minimization algorithms. minimization algorithms.
See <A HREF="http://www.gnu.org/software/gsl/manual/html_node/Multidimen sional-Minimization.html">GSL doc</A> See <A HREF="http://www.gnu.org/software/gsl/manual/html_node/Multidimen sional-Minimization.html">GSL doc</A>
from more info on the GSL minimization algorithms. from more info on the GSL minimization algorithms.
skipping to change at line 129 skipping to change at line 132
/// set the function to minimize /// set the function to minimize
virtual void SetFunction(const ROOT::Math::IMultiGenFunction & func); virtual void SetFunction(const ROOT::Math::IMultiGenFunction & func);
/// set gradient the function to minimize /// set gradient the function to minimize
virtual void SetFunction(const ROOT::Math::IMultiGradFunction & func); virtual void SetFunction(const ROOT::Math::IMultiGradFunction & func);
/// set free variable /// set free variable
virtual bool SetVariable(unsigned int ivar, const std::string & name, do uble val, double step); virtual bool SetVariable(unsigned int ivar, const std::string & name, do uble val, double step);
#ifdef LATER
/// set lower limit variable (override if minimizer supports them ) /// set lower limit variable (override if minimizer supports them )
virtual bool SetLowerLimitedVariable(unsigned int ivar , const std::str ing & name , double val , double step , double lower ); virtual bool SetLowerLimitedVariable(unsigned int ivar , const std::str ing & name , double val , double step , double lower );
/// set upper limit variable (override if minimizer supports them ) /// set upper limit variable (override if minimizer supports them )
virtual bool SetUpperLimitedVariable(unsigned int ivar , const std::stri ng & name , double val , double step , double upper ); virtual bool SetUpperLimitedVariable(unsigned int ivar , const std::stri ng & name , double val , double step , double upper );
/// set upper/lower limited variable (override if minimizer supports the m ) /// set upper/lower limited variable (override if minimizer supports the m )
virtual bool SetLimitedVariable(unsigned int ivar , const std::string & name , double val , double step , double /* lower */, double /* upper */); virtual bool SetLimitedVariable(unsigned int ivar , const std::string & name , double val , double step , double /* lower */, double /* upper */);
/// set fixed variable (override if minimizer supports them ) /// set fixed variable (override if minimizer supports them )
virtual bool SetFixedVariable(unsigned int /* ivar */, const std::string & /* name */, double /* val */); virtual bool SetFixedVariable(unsigned int /* ivar */, const std::string & /* name */, double /* val */);
#endif
/// set the value of an existing variable /// set the value of an existing variable
virtual bool SetVariableValue(unsigned int ivar, double val ); virtual bool SetVariableValue(unsigned int ivar, double val );
/// set the values of all existing variables (array must be dimensioned to the size of existing parameters) /// set the values of all existing variables (array must be dimensioned to the size of existing parameters)
virtual bool SetVariableValues(const double * x); virtual bool SetVariableValues(const double * x);
/// method to perform the minimization /// method to perform the minimization
virtual bool Minimize(); virtual bool Minimize();
/// return minimum function value /// return minimum function value
virtual double MinValue() const { return fMinVal; } virtual double MinValue() const { return fMinVal; }
skipping to change at line 164 skipping to change at line 165
virtual const double * X() const { return &fValues.front(); } virtual const double * X() const { return &fValues.front(); }
/// return pointer to gradient values at the minimum /// return pointer to gradient values at the minimum
virtual const double * MinGradient() const; virtual const double * MinGradient() const;
/// number of function calls to reach the minimum /// number of function calls to reach the minimum
virtual unsigned int NCalls() const { return 0; } // not yet ipl. virtual unsigned int NCalls() const { return 0; } // not yet ipl.
/// this is <= Function().NDim() which is the total /// this is <= Function().NDim() which is the total
/// number of variables (free+ constrained ones) /// number of variables (free+ constrained ones)
virtual unsigned int NDim() const { return fDim; } virtual unsigned int NDim() const { return fValues.size(); }
/// number of free variables (real dimension of the problem) /// number of free variables (real dimension of the problem)
/// this is <= Function().NDim() which is the total /// this is <= Function().NDim() which is the total number of free param
virtual unsigned int NFree() const { return fDim; } eters
virtual unsigned int NFree() const { return fObjFunc->NDim(); }
/// minimizer provides error and error matrix /// minimizer provides error and error matrix
virtual bool ProvidesError() const { return false; } virtual bool ProvidesError() const { return false; }
/// return errors at the minimum /// return errors at the minimum
virtual const double * Errors() const { virtual const double * Errors() const {
return 0; return 0;
} }
/** return covariance matrices elements /** return covariance matrices elements
skipping to change at line 190 skipping to change at line 191
The ordering of the variables is the same as in errors The ordering of the variables is the same as in errors
*/ */
virtual double CovMatrix(unsigned int , unsigned int ) const { return 0; } virtual double CovMatrix(unsigned int , unsigned int ) const { return 0; }
/// minos error for variable i, return false if Minos failed /// minos error for variable i, return false if Minos failed
virtual bool GetMinosError(unsigned int , double & /* errLow */ , double & /* errUp */ ) { return false; } virtual bool GetMinosError(unsigned int , double & /* errLow */ , double & /* errUp */ ) { return false; }
/// return reference to the objective function /// return reference to the objective function
///virtual const ROOT::Math::IGenFunction & Function() const; ///virtual const ROOT::Math::IGenFunction & Function() const;
// method of only GSL minimizer (not inherited from interface)
/// return pointer to used objective gradient function
const ROOT::Math::IMultiGradFunction * ObjFunction() const { return fObj
Func; }
/// return transformation function (NULL if not having a transformation)
const ROOT::Math::MinimTransformFunction * TransformFunction() const;
protected: protected:
private: private:
// dimension of the function to be minimized // dimension of the function to be minimized
unsigned int fDim; unsigned int fDim;
ROOT::Math::GSLMultiMinimizer * fGSLMultiMin; ROOT::Math::GSLMultiMinimizer * fGSLMultiMin;
const ROOT::Math::IMultiGradFunction * fObjFunc; const ROOT::Math::IMultiGradFunction * fObjFunc;
double fMinVal; double fMinVal;
double fLSTolerance; // Line Search Tolerance double fLSTolerance; // Line Search Tolerance
std::vector<double> fValues; std::vector<double> fValues;
//mutable std::vector<double> fErrors; //mutable std::vector<double> fErrors;
std::vector<double> fSteps; std::vector<double> fSteps;
std::vector<std::string> fNames; std::vector<std::string> fNames;
std::vector<ROOT::Math::EMinimVariableType> fVarTypes; // vector specif
yng the type of variables
std::map< unsigned int, std::pair<double, double> > fBounds; // map spec
ifying the bound using as key the parameter index
}; };
} // end namespace Fit } // end namespace Fit
} // end namespace ROOT } // end namespace ROOT
#endif /* ROOT_Math_GSLMinimizer */ #endif /* ROOT_Math_GSLMinimizer */
 End of changes. 10 change blocks. 
9 lines changed or deleted 24 lines changed or added


 GSLNLSMinimizer.h   GSLNLSMinimizer.h 
// @(#)root/mathmore:$Id: GSLNLSMinimizer.h 26866 2008-12-12 10:50:07Z mone ta $ // @(#)root/mathmore:$Id: GSLNLSMinimizer.h 29104 2009-06-19 13:41:05Z mone ta $
// Author: L. Moneta Wed Dec 20 17:16:32 2006 // Author: L. Moneta Wed Dec 20 17:16:32 2006
/********************************************************************** /**********************************************************************
* * * *
* Copyright (c) 2006 LCG ROOT Math Team, CERN/PH-SFT * * Copyright (c) 2006 LCG ROOT Math Team, CERN/PH-SFT *
* * * *
* This library is free software; you can redistribute it and/or * * This library is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License * * modify it under the terms of the GNU General Public License *
* as published by the Free Software Foundation; either version 2 * * as published by the Free Software Foundation; either version 2 *
* of the License, or (at your option) any later version. * * of the License, or (at your option) any later version. *
skipping to change at line 42 skipping to change at line 42
#endif #endif
#ifndef ROOT_Math_IFunctionfwd #ifndef ROOT_Math_IFunctionfwd
#include "Math/IFunctionfwd.h" #include "Math/IFunctionfwd.h"
#endif #endif
#ifndef ROOT_Math_IParamFunctionfwd #ifndef ROOT_Math_IParamFunctionfwd
#include "Math/IParamFunctionfwd.h" #include "Math/IParamFunctionfwd.h"
#endif #endif
#ifndef ROOT_Math_FitMethodFunction
#include "Math/FitMethodFunction.h" #include "Math/FitMethodFunction.h"
//#include "Math/Derivator.h" #endif
#ifndef ROOT_Math_MinimizerVariable
#include "Math/MinimizerVariable.h"
#endif
#include <vector>
#include <map>
#include <string>
namespace ROOT { namespace ROOT {
namespace Math { namespace Math {
class GSLMultiFit; class GSLMultiFit;
//_________________________________________________________________________ _______ //_________________________________________________________________________ _______
/** /**
LSResidualFunc class description. LSResidualFunc class description.
skipping to change at line 180 skipping to change at line 189
/// set the function to minimize /// set the function to minimize
virtual void SetFunction(const ROOT::Math::IMultiGenFunction & func); virtual void SetFunction(const ROOT::Math::IMultiGenFunction & func);
/// set gradient the function to minimize /// set gradient the function to minimize
virtual void SetFunction(const ROOT::Math::IMultiGradFunction & func); virtual void SetFunction(const ROOT::Math::IMultiGradFunction & func);
/// set free variable /// set free variable
virtual bool SetVariable(unsigned int ivar, const std::string & name, do uble val, double step); virtual bool SetVariable(unsigned int ivar, const std::string & name, do uble val, double step);
#ifdef LATER /// set lower limited variable
/// set lower limit variable (override if minimizer supports them )
virtual bool SetLowerLimitedVariable(unsigned int ivar , const std::str ing & name , double val , double step , double lower ); virtual bool SetLowerLimitedVariable(unsigned int ivar , const std::str ing & name , double val , double step , double lower );
/// set upper limit variable (override if minimizer supports them ) /// set upper limited variable
virtual bool SetUpperLimitedVariable(unsigned int ivar , const std::stri ng & name , double val , double step , double upper ); virtual bool SetUpperLimitedVariable(unsigned int ivar , const std::stri ng & name , double val , double step , double upper );
/// set upper/lower limited variable (override if minimizer supports the /// set upper/lower limited variable
m ) virtual bool SetLimitedVariable(unsigned int ivar , const std::string &
virtual bool SetLimitedVariable(unsigned int ivar , const std::string & name , double val , double step , double lower , double upper );
name , double val , double step , double /* lower */, double /* upper */); /// set fixed variable
/// set fixed variable (override if minimizer supports them ) virtual bool SetFixedVariable(unsigned int ivar , const std::string & na
virtual bool SetFixedVariable(unsigned int /* ivar */, const std::string me , double val );
& /* name */, double /* val */);
#endif
/// set the value of an existing variable /// set the value of an existing variable
virtual bool SetVariableValue(unsigned int ivar, double val ); virtual bool SetVariableValue(unsigned int ivar, double val );
/// set the values of all existing variables (array must be dimensioned to the size of existing parameters) /// set the values of all existing variables (array must be dimensioned to the size of existing parameters)
virtual bool SetVariableValues(const double * x); virtual bool SetVariableValues(const double * x);
/// method to perform the minimization /// method to perform the minimization
virtual bool Minimize(); virtual bool Minimize();
/// return minimum function value /// return minimum function value
virtual double MinValue() const { return fMinVal; } virtual double MinValue() const { return fMinVal; }
/// return expected distance reached from the minimum /// return expected distance reached from the minimum
virtual double Edm() const { return 0; } // not impl. } virtual double Edm() const { return fEdm; } // not impl. }
/// return pointer to X values at the minimum /// return pointer to X values at the minimum
virtual const double * X() const { return &fValues.front(); } virtual const double * X() const { return &fValues.front(); }
/// return pointer to gradient values at the minimum /// return pointer to gradient values at the minimum
virtual const double * MinGradient() const; virtual const double * MinGradient() const;
/// number of function calls to reach the minimum /// number of function calls to reach the minimum
virtual unsigned int NCalls() const { return 0; } // not yet ipl. virtual unsigned int NCalls() const { return 0; } // not yet ipl.
/// this is <= Function().NDim() which is the total /// this is <= Function().NDim() which is the total
/// number of variables (free+ constrained ones) /// number of variables (free+ constrained ones)
virtual unsigned int NDim() const { return fDim; } virtual unsigned int NDim() const { return fDim; }
/// number of free variables (real dimension of the problem) /// number of free variables (real dimension of the problem)
/// this is <= Function().NDim() which is the total /// this is <= Function().NDim() which is the total
virtual unsigned int NFree() const { return fDim; } virtual unsigned int NFree() const { return fNFree; }
/// minimizer provides error and error matrix /// minimizer provides error and error matrix
virtual bool ProvidesError() const { return true; } virtual bool ProvidesError() const { return true; }
/// return errors at the minimum /// return errors at the minimum
virtual const double * Errors() const { return &fErrors.front(); } virtual const double * Errors() const { return &fErrors.front(); }
// { // {
// static std::vector<double> err; // static std::vector<double> err;
// err.resize(fDim); // err.resize(fDim);
// return &err.front(); // return &err.front();
skipping to change at line 249 skipping to change at line 256
/// minos error for variable i, return false if Minos failed /// minos error for variable i, return false if Minos failed
virtual bool GetMinosError(unsigned int , double & /* errLow */ , double & /* errUp */ ) { return false; } virtual bool GetMinosError(unsigned int , double & /* errLow */ , double & /* errUp */ ) { return false; }
/// return reference to the objective function /// return reference to the objective function
///virtual const ROOT::Math::IGenFunction & Function() const; ///virtual const ROOT::Math::IGenFunction & Function() const;
protected: protected:
private: private:
// dimension of the function to be minimized unsigned int fDim; // dimension of the function to be minimized
unsigned int fDim; unsigned int fNFree; // dimension of the internal function to be mi
// number of fit points (residuals) nimized
unsigned int fSize; unsigned int fSize; // number of fit points (residuals)
ROOT::Math::GSLMultiFit * fGSLMultiFit; // pointer to GSL multi f it solver ROOT::Math::GSLMultiFit * fGSLMultiFit; // pointer to GSL multi f it solver
const ROOT::Math::IMultiGenFunction * fObjFunc; // pointer to Least square function const ROOT::Math::FitMethodFunction * fObjFunc; // pointer to Least square function
double fMinVal; // minimum function value double fMinVal; // minimum function value
double fEdm; // edm value
double fLSTolerance; // Line Search Tolerance double fLSTolerance; // Line Search Tolerance
std::vector<double> fValues; std::vector<double> fValues;
std::vector<double> fErrors; std::vector<double> fErrors;
const double * fCovMatrix; // pointer to cov matrix (stored in f GSLMultiFit) std::vector<double> fCovMatrix; // cov matrix (stored as c ov[ i * dim + j]
std::vector<double> fSteps; std::vector<double> fSteps;
std::vector<std::string> fNames; std::vector<std::string> fNames;
std::vector<LSResidualFunc> fResiduals; //! transient Vector of the re sidual functions std::vector<LSResidualFunc> fResiduals; //! transient Vector of the re sidual functions
std::vector<ROOT::Math::EMinimVariableType> fVarTypes; // vector specif
yng the type of variables
std::map< unsigned int, std::pair<double, double> > fBounds; // map spec
ifying the bound using as key the parameter index
}; };
} // end namespace Math } // end namespace Math
} // end namespace ROOT } // end namespace ROOT
#endif /* ROOT_Math_GSLNLSMinimizer */ #endif /* ROOT_Math_GSLNLSMinimizer */
 End of changes. 13 change blocks. 
21 lines changed or deleted 33 lines changed or added


 GSLSimAnMinimizer.h   GSLSimAnMinimizer.h 
// @(#)root/mathmore:$Id: GSLSimAnMinimizer.h 26866 2008-12-12 10:50:07Z mo neta $ // @(#)root/mathmore:$Id: GSLSimAnMinimizer.h 29068 2009-06-17 16:28:51Z mo neta $
// Author: L. Moneta Wed Dec 20 17:16:32 2006 // Author: L. Moneta Wed Dec 20 17:16:32 2006
/********************************************************************** /**********************************************************************
* * * *
* Copyright (c) 2006 LCG ROOT Math Team, CERN/PH-SFT * * Copyright (c) 2006 LCG ROOT Math Team, CERN/PH-SFT *
* * * *
* This library is free software; you can redistribute it and/or * * This library is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License * * modify it under the terms of the GNU General Public License *
* as published by the Free Software Foundation; either version 2 * * as published by the Free Software Foundation; either version 2 *
* of the License, or (at your option) any later version. * * of the License, or (at your option) any later version. *
skipping to change at line 46 skipping to change at line 46
#endif #endif
#ifndef ROOT_Math_IParamFunctionfwd #ifndef ROOT_Math_IParamFunctionfwd
#include "Math/IParamFunctionfwd.h" #include "Math/IParamFunctionfwd.h"
#endif #endif
#ifndef ROOT_Math_GSLSimAnnealing #ifndef ROOT_Math_GSLSimAnnealing
#include "Math/GSLSimAnnealing.h" #include "Math/GSLSimAnnealing.h"
#endif #endif
#ifndef ROOT_Math_MinimizerVariable
#include "Math/MinimizerVariable.h"
#endif
#include <vector>
#include <map>
namespace ROOT { namespace ROOT {
namespace Math { namespace Math {
class MinimTransformFunction;
//_________________________________________________________________________ ____________ //_________________________________________________________________________ ____________
/** /**
GSLSimAnMinimizer class for minimization using simulated annealing GSLSimAnMinimizer class for minimization using simulated annealing
using the algorithm from using the algorithm from
<A HREF="http://www.gnu.org/software/gsl/manual/html_node/Simulated-Anne aling.html"> <A HREF="http://www.gnu.org/software/gsl/manual/html_node/Simulated-Anne aling.html">
GSL</A>. GSL</A>.
It implements the ROOT::Minimizer interface and It implements the ROOT::Minimizer interface and
a plug-in (name "GSLSimAn") exists to instantiate this class via the plu g-in manager a plug-in (name "GSLSimAn") exists to instantiate this class via the plu g-in manager
@ingroup Min1D @ingroup Min1D
skipping to change at line 105 skipping to change at line 114
/// set gradient the function to minimize /// set gradient the function to minimize
virtual void SetFunction(const ROOT::Math::IMultiGradFunction & func); virtual void SetFunction(const ROOT::Math::IMultiGradFunction & func);
/// set free variable /// set free variable
virtual bool SetVariable(unsigned int ivar, const std::string & name, do uble val, double step); virtual bool SetVariable(unsigned int ivar, const std::string & name, do uble val, double step);
/// set fixed variable (override if minimizer supports them ) /// set fixed variable (override if minimizer supports them )
virtual bool SetFixedVariable(unsigned int /* ivar */, const std::string & /* name */, double /* val */); virtual bool SetFixedVariable(unsigned int /* ivar */, const std::string & /* name */, double /* val */);
#ifdef LATER
/// set lower limit variable (override if minimizer supports them ) /// set lower limit variable (override if minimizer supports them )
virtual bool SetLowerLimitedVariable(unsigned int ivar , const std::str ing & name , double val , double step , double lower ); virtual bool SetLowerLimitedVariable(unsigned int ivar , const std::str ing & name , double val , double step , double lower );
/// set upper limit variable (override if minimizer supports them ) /// set upper limit variable (override if minimizer supports them )
virtual bool SetUpperLimitedVariable(unsigned int ivar , const std::stri ng & name , double val , double step , double upper ); virtual bool SetUpperLimitedVariable(unsigned int ivar , const std::stri ng & name , double val , double step , double upper );
/// set upper/lower limited variable (override if minimizer supports the m ) /// set upper/lower limited variable (override if minimizer supports the m )
virtual bool SetLimitedVariable(unsigned int ivar , const std::string & name , double val , double step , double /* lower */, double /* upper */); virtual bool SetLimitedVariable(unsigned int ivar , const std::string & name , double val , double step , double /* lower */, double /* upper */);
#endif
/// set the value of an existing variable /// set the value of an existing variable
virtual bool SetVariableValue(unsigned int ivar, double val ); virtual bool SetVariableValue(unsigned int ivar, double val );
/// set the values of all existing variables (array must be dimensioned to the size of the existing parameters) /// set the values of all existing variables (array must be dimensioned to the size of the existing parameters)
virtual bool SetVariableValues(const double * x); virtual bool SetVariableValues(const double * x);
/// method to perform the minimization /// method to perform the minimization
virtual bool Minimize(); virtual bool Minimize();
/// return minimum function value /// return minimum function value
skipping to change at line 167 skipping to change at line 174
/// minos error for variable i, return false if Minos failed /// minos error for variable i, return false if Minos failed
virtual bool GetMinosError(unsigned int , double & /* errLow */ , double & /* errUp */ ) { return false; } virtual bool GetMinosError(unsigned int , double & /* errLow */ , double & /* errUp */ ) { return false; }
/// return reference to the objective function /// return reference to the objective function
///virtual const ROOT::Math::IGenFunction & Function() const; ///virtual const ROOT::Math::IGenFunction & Function() const;
protected: protected:
private: private:
// dimension of the function to be minimized unsigned int fDim; // dimension of the function to be minimized
unsigned int fDim; bool fOwnFunc; // flag to indicate if objective function is manag
// number of fixed variables ed
unsigned int fNFix;
ROOT::Math::GSLSimAnnealing fSolver; ROOT::Math::GSLSimAnnealing fSolver;
const ROOT::Math::IMultiGenFunction * fObjFunc; const ROOT::Math::IMultiGenFunction * fObjFunc;
double fMinVal; double fMinVal; // minimum values
mutable std::vector<double> fValues; mutable std::vector<double> fValues;
std::vector<double> fSteps; std::vector<double> fSteps;
std::vector<std::string> fNames; std::vector<std::string> fNames;
std::vector<bool> fVarFix; std::vector<ROOT::Math::EMinimVariableType> fVarTypes; // vector specif
yng the type of variables
std::map< unsigned int, std::pair<double, double> > fBounds; // map spec
ifying the bound using as key the parameter index
}; };
} // end namespace Math } // end namespace Math
} // end namespace ROOT } // end namespace ROOT
#endif /* ROOT_Math_GSLSimAnMinimizer */ #endif /* ROOT_Math_GSLSimAnMinimizer */
 End of changes. 8 change blocks. 
9 lines changed or deleted 18 lines changed or added


 G__ci.h   G__ci.h 
skipping to change at line 772 skipping to change at line 772
* *
* Other parameters can be changed while keeping DLL binary compatibility. * Other parameters can be changed while keeping DLL binary compatibility.
* *
**************************************************************************/ **************************************************************************/
#ifdef G__LONGBUF #ifdef G__LONGBUF
#define G__LONGLINE 4096 /* Length of expression */ #define G__LONGLINE 4096 /* Length of expression */
#define G__ONELINE 4096 /* Length of subexpression,parameter,argument */ #define G__ONELINE 4096 /* Length of subexpression,parameter,argument */
#define G__ONELINEDICT 8 /* Length of subexpression,parameter,argument */ #define G__ONELINEDICT 8 /* Length of subexpression,parameter,argument */
#define G__MAXNAME 4096 /* Variable name */ #define G__MAXNAME 4096 /* Variable name */
#else #else
#define G__LONGLINE 1024 /* Length of expression */ #define G__LONGLINE 2048 /* Length of expression */
#define G__ONELINE 512 /* Length of subexpression,parameter,argument #define G__ONELINE 1024 /* Length of subexpression,parameter,argument
*/ */
#define G__MAXNAME 256 /* Variable name */ #define G__MAXNAME 512 /* Variable name */
#define G__ONELINEDICT 8 /* Length of subexpression,parameter,argument */ #define G__ONELINEDICT 8 /* Length of subexpression,parameter,argument */
#endif #endif
#define G__LARGEBUF 6000 /* big temp buffer */ #define G__LARGEBUF 6000 /* big temp buffer */
#define G__MAXFILE 2000 /* Max interpreted source file */ #define G__MAXFILE 2000 /* Max interpreted source file */
#define G__MAXFILENAME 1024 /* Max interpreted source file name length */ #define G__MAXFILENAME 1024 /* Max interpreted source file name length */
#define G__MAXPARA 100 /* Number of argument for G__main(argc,argv) */ #define G__MAXPARA 100 /* Number of argument for G__main(argc,argv) */
#define G__MAXARG 100 /* Number of argument for G__init_cint(char *) */ #define G__MAXARG 100 /* Number of argument for G__init_cint(char *) */
#define G__MAXFUNCPARA 40 /* Function argument */ #define G__MAXFUNCPARA 40 /* Function argument */
#define G__MAXVARDIM 10 /* Array dimension */ #define G__MAXVARDIM 10 /* Array dimension */
#define G__LENPOST 10 /* length of file name extention */ #define G__LENPOST 10 /* length of file name extention */
skipping to change at line 974 skipping to change at line 974
#define G__Muint(buf) (*(unsigned int*)(&buf.obj.i)) #define G__Muint(buf) (*(unsigned int*)(&buf.obj.i))
#define G__Mulong(buf) (*(unsigned long*)(&buf.obj.i)) #define G__Mulong(buf) (*(unsigned long*)(&buf.obj.i))
/************************************************************************** /**************************************************************************
* include file flags * include file flags
**************************************************************************/ **************************************************************************/
#define G__USERHEADER 1 #define G__USERHEADER 1
#define G__SYSHEADER 2 #define G__SYSHEADER 2
#ifndef G__ANSI #ifndef G__ANSI
#if (__GNUC__>=3) /* ||defined(__SUNPRO_CC)||defined(__SUNPRO_C) */ #if (__GNUC__>=3) || defined(_STLPORT_VERSION)
#define G__ANSI #define G__ANSI
#endif #endif
#endif #endif
/* #define G__ANSI */ /* #define G__ANSI */
#ifdef __cplusplus #ifdef __cplusplus
#ifndef G__ANSI #ifndef G__ANSI
#define G__ANSI #define G__ANSI
#endif #endif
skipping to change at line 2498 skipping to change at line 2498
/***********************************************************************/ /***********************************************************************/
#if defined(__cplusplus) && !defined(__CINT__) #if defined(__cplusplus) && !defined(__CINT__)
// Helper class to avoid compiler warning about casting function pointer // Helper class to avoid compiler warning about casting function pointer
// to void pointer. // to void pointer.
class G__func2void { class G__func2void {
typedef void (*funcptr_t)(); typedef void (*funcptr_t)();
union funcptr_and_voidptr { union funcptr_and_voidptr {
typedef void (*funcptr_t)(); typedef void (*funcptr_t)();
void *read;
funcptr_t write; funcptr_and_voidptr(void *val) : _read(val) {}
void *_read;
funcptr_t _write;
}; };
funcptr_and_voidptr _tmp; funcptr_and_voidptr _tmp;
public: public:
template <typename T> template <typename T>
G__func2void( T vfp ) { G__func2void( T vfp ) : _tmp(0) {
_tmp.write = ( funcptr_t )vfp; _tmp._write = ( funcptr_t )vfp;
} }
operator void* () const { operator void* () const {
return _tmp.read; return _tmp._read;
} }
}; };
#endif #endif
#endif /* __MAKECINT__ */ #endif /* __MAKECINT__ */
/************************************************************************** /**************************************************************************
* endif #ifndef G__MAKECINT * endif #ifndef G__MAKECINT
**************************************************************************/ **************************************************************************/
#endif /* G__CI_H */ #endif /* G__CI_H */
 End of changes. 5 change blocks. 
10 lines changed or deleted 13 lines changed or added


 GeneticAlgorithm.h   GeneticAlgorithm.h 
// @(#)root/tmva $Id: GeneticAlgorithm.h 20882 2007-11-19 11:31:26Z rdm $ // @(#)root/tmva $Id: GeneticAlgorithm.h 29195 2009-06-24 10:39:49Z brun $
// Author: Peter Speckmayer // Author: Peter Speckmayer
/************************************************************************** ******** /************************************************************************** ********
* Project: TMVA - a Root-integrated toolkit for multivariate data analysis * * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
* Package: TMVA * * Package: TMVA *
* Class : GeneticAlgorithm * * Class : GeneticAlgorithm *
* Web : http://tmva.sourceforge.net * * Web : http://tmva.sourceforge.net *
* * * *
* Description: * * Description: *
* Base definition for genetic algorithm * * Base definition for genetic algorithm *
skipping to change at line 49 skipping to change at line 49
#ifndef ROOT_TMVA_IFitterTarget #ifndef ROOT_TMVA_IFitterTarget
#include "TMVA/IFitterTarget.h" #include "TMVA/IFitterTarget.h"
#endif #endif
#ifndef ROOT_TMVA_GeneticPopulation #ifndef ROOT_TMVA_GeneticPopulation
#include "TMVA/GeneticPopulation.h" #include "TMVA/GeneticPopulation.h"
#endif #endif
#ifndef ROOT_TMVA_Types #ifndef ROOT_TMVA_Types
#include "TMVA/Types.h" #include "TMVA/Types.h"
#endif #endif
#ifndef ROOT_TMVA_MsgLogger
#include "TMVA/MsgLogger.h"
#endif
namespace TMVA { namespace TMVA {
class IFitterTarget; class IFitterTarget;
class Interval; class Interval;
class MsgLogger;
class GeneticAlgorithm { class GeneticAlgorithm {
public: public:
GeneticAlgorithm( IFitterTarget& target, Int_t populationSize, GeneticAlgorithm( IFitterTarget& target, Int_t populationSize,
const std::vector<TMVA::Interval*>& ranges, UInt_t seed = 0 ); const std::vector<TMVA::Interval*>& ranges, UInt_t seed = 0 );
virtual ~GeneticAlgorithm() {} virtual ~GeneticAlgorithm();
void Init(); void Init();
virtual Bool_t HasConverged(Int_t steps = 10, Double_t ratio = 0.1) ; virtual Bool_t HasConverged(Int_t steps = 10, Double_t ratio = 0.1) ;
virtual Double_t SpreadControl(Int_t steps, Int_t ofSteps, virtual Double_t SpreadControl(Int_t steps, Int_t ofSteps,
Double_t factor); Double_t factor);
virtual Double_t NewFitness(Double_t oldValue, Double_t newValue); virtual Double_t NewFitness(Double_t oldValue, Double_t newValue);
virtual Double_t CalculateFitness(); virtual Double_t CalculateFitness();
Double_t DoRenewFitness();
virtual Double_t RenewFitness(std::vector < Double_t > factors,
std::vector < Double_t > results);
virtual void Evolution(); virtual void Evolution();
void Finalize();
GeneticPopulation& GetGeneticPopulation() { return fPopulation; } GeneticPopulation& GetGeneticPopulation() { return fPopulation; }
Double_t GetSpread() const { return fSpread; } Double_t GetSpread() const { return fSpread; }
void SetSpread(Double_t s) { fSpread = s; }
void SetSpread(Double_t s) { fSpread = s; } void SetMakeCopies(Bool_t s) { fMakeCopies = s; }
Bool_t GetMakeCopies() { return fMakeCopies; }
Int_t fConvCounter; // converging? ... keeps track of the number of improvements Int_t fConvCounter; // converging? ... keeps track of the number of improvements
protected: protected:
IFitterTarget& fFitterTarget; // the fitter target IFitterTarget& fFitterTarget; // the fitter target
GeneticPopulation fPopulation; // contains and controls the "ind ividual"
Double_t fConvValue; // keeps track of the quantity of improvement Double_t fConvValue; // keeps track of the quantity of improvement
// spread-control (stepsize) // spread-control (stepsize)
// successList keeps track of the improvements to be able // successList keeps track of the improvements to be able
std::deque<Int_t> fSuccessList; // to adjust the stepSize std::deque<Int_t> fSuccessList; // to adjust the stepSize
Double_t fLastResult; // remembers the last obtained re sult (for internal use) Double_t fLastResult; // remembers the last obtained re sult (for internal use)
Double_t fSpread; // regulates the spread of the va lue change at mutation (sigma) Double_t fSpread; // regulates the spread of the va lue change at mutation (sigma)
Bool_t fMirror; // new values for mutation are mi rror-mapped if outside of constraints Bool_t fMirror; // new values for mutation are mi rror-mapped if outside of constraints
Bool_t fSexual; // allow sexual recombination of individual
Bool_t fFirstTime; // if true its the first time, so no evolution yet Bool_t fFirstTime; // if true its the first time, so no evolution yet
Bool_t fMakeCopies; // if true, the population will m
ake copies of the first individuals
// avoid for speed performance.
Int_t fPopulationSize; // the size of the population Int_t fPopulationSize; // the size of the population
const std::vector<TMVA::Interval*>& fRanges; // parameter ranges const std::vector<TMVA::Interval*>& fRanges; // parameter ranges
mutable MsgLogger fLogger; // message logger GeneticPopulation fPopulation; // contains and controls the "ind
ividual"
Double_t fBestFitness;
mutable MsgLogger* fLogger; // message logger
MsgLogger& Log() const { return *fLogger; }
ClassDef(GeneticAlgorithm, 0) // Genetic algorithm controller ClassDef(GeneticAlgorithm, 0) // Genetic algorithm controller
}; };
} // namespace TMVA } // namespace TMVA
#endif #endif
 End of changes. 13 change blocks. 
13 lines changed or deleted 16 lines changed or added


 GeneticGenes.h   GeneticGenes.h 
// @(#)root/tmva $Id: GeneticGenes.h 20882 2007-11-19 11:31:26Z rdm $ // @(#)root/tmva $Id: GeneticGenes.h 29122 2009-06-22 06:51:30Z brun $
// Author: Peter Speckmayer // Author: Peter Speckmayer
/************************************************************************** ******** /************************************************************************** ********
* Project: TMVA - a Root-integrated toolkit for multivariate data analysis * * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
* Package: TMVA * * Package: TMVA *
* Class : GeneticGenes * * Class : GeneticGenes *
* Web : http://tmva.sourceforge.net * * Web : http://tmva.sourceforge.net *
* * * *
* Description: * * Description: *
* Genes definition for genetic algorithm * * Genes definition for genetic algorithm *
skipping to change at line 36 skipping to change at line 36
#define ROOT_TMVA_GeneticGenes #define ROOT_TMVA_GeneticGenes
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// // // //
// GeneticGenes // // GeneticGenes //
// // // //
// Genes definition for genetic algorithm // // Genes definition for genetic algorithm //
// // // //
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
#ifndef ROOT_Rtypes
#include "Rtypes.h" #include "Rtypes.h"
#endif
#include <vector> #include <vector>
namespace TMVA { namespace TMVA {
class GeneticGenes { class GeneticGenes {
public: public:
GeneticGenes() {} GeneticGenes():fFitness(0) {}
GeneticGenes( std::vector<Double_t> & f ); GeneticGenes( std::vector<Double_t> & f );
virtual ~GeneticGenes() {} virtual ~GeneticGenes() {}
void Clear();
void ClearResults();
std::vector<Double_t>& GetFactors() { return fFactors; } std::vector<Double_t>& GetFactors() { return fFactors; }
std::vector<Double_t>& GetResults() { return fResults; }
void SetFitness(Double_t fitness) { fFitness = fitness; }
Double_t GetFitness() { return fFitness; }
friend Bool_t operator <(const GeneticGenes&, const GeneticGenes&);
private: private:
std::vector<Double_t> fFactors; // stores the factors (coefficients) of one individual std::vector<Double_t> fFactors; // stores the factors (coefficients) of one individual
std::vector<Double_t> fResults; // stores the fitness-results of this individual Double_t fFitness;
ClassDef(GeneticGenes,0) // Genes definition for genetic algorithm ClassDef(GeneticGenes,0) // Genes definition for genetic algorithm
}; };
Bool_t operator <(const GeneticGenes&, const GeneticGenes&);
} // namespace TMVA } // namespace TMVA
#endif #endif
 End of changes. 8 change blocks. 
7 lines changed or deleted 12 lines changed or added


 GeneticPopulation.h   GeneticPopulation.h 
// @(#)root/tmva $Id: GeneticPopulation.h 23334 2008-04-19 18:38:57Z brun $ // @(#)root/tmva $Id: GeneticPopulation.h 29195 2009-06-24 10:39:49Z brun $
// Author: Peter Speckmayer // Author: Peter Speckmayer
/************************************************************************** ******** /************************************************************************** ********
* Project: TMVA - a Root-integrated toolkit for multivariate data analysis * * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
* Package: TMVA * * Package: TMVA *
* Class : GeneticPopulation * * Class : GeneticPopulation *
* Web : http://tmva.sourceforge.net * * Web : http://tmva.sourceforge.net *
* * * *
* Description: * * Description: *
* Population definition for genetic algorithm * * Population definition for genetic algorithm *
skipping to change at line 38 skipping to change at line 38
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// // // //
// GeneticPopulation // // GeneticPopulation //
// // // //
// Population definition for genetic algorithm // // Population definition for genetic algorithm //
// // // //
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
#include <string> #include <string>
#include <vector> #include <vector>
#include <map>
#ifndef ROOT_Riosfwd
#include "Riosfwd.h"
#endif
#ifndef ROOT_TMVA_GeneticGenes #ifndef ROOT_TMVA_GeneticGenes
#include "TMVA/GeneticGenes.h" #include "TMVA/GeneticGenes.h"
#endif #endif
#ifndef ROOT_TMVA_Interval #ifndef ROOT_TMVA_Interval
#include "TMVA/Interval.h" #include "TMVA/Interval.h"
#endif #endif
#ifndef ROOT_TMVA_GeneticRange #ifndef ROOT_TMVA_GeneticRange
#include "TMVA/GeneticRange.h" #include "TMVA/GeneticRange.h"
#endif #endif
#ifndef ROOT_TMVA_MsgLogger
#include "TMVA/MsgLogger.h"
#endif
class TH1F; class TH1F;
namespace TMVA { namespace TMVA {
class MsgLogger;
class GeneticPopulation { class GeneticPopulation {
public: public:
GeneticPopulation(); GeneticPopulation(const std::vector<Interval*>& ranges, Int_t size, U Int_t seed = 0);
virtual ~GeneticPopulation(); virtual ~GeneticPopulation();
typedef std::pair<const Double_t, GeneticGenes > entry;
void SetRandomSeed( UInt_t seed = 0); void SetRandomSeed( UInt_t seed = 0);
void CreatePopulation( Int_t size );
void AddPopulation( GeneticPopulation *genePool );
void AddPopulation( GeneticPopulation &genePool );
void TrimPopulation();
void GiveHint( std::vector< Double_t >& hint, Double_t fitness = 0 );
void MakeChildren(); void MakeChildren();
void MakeCopies( int number );
GeneticGenes MakeSex( GeneticGenes male, GeneticGenes female );
void MakeMutants( Double_t probability = 30, Bool_t near = kFALSE,
Double_t spread = 0.1, Bool_t mirror = kFALSE );
void Mutate( Double_t probability = 20, Int_t startIndex = 0, Bool_t near = kFALSE, void Mutate( Double_t probability = 20, Int_t startIndex = 0, Bool_t near = kFALSE,
Double_t spread = 0.1, Bool_t mirror = kFALSE ); Double_t spread = 0.1, Bool_t mirror = kFALSE );
GeneticGenes Mutate( GeneticGenes individual, Double_t probability,
Bool_t near,
Double_t spread, Bool_t mirror );
void NextGeneration();
void AddFactor( Interval *interval );
GeneticGenes* GetGenes();
GeneticGenes* GetGenes( Int_t index ); GeneticGenes* GetGenes( Int_t index );
Int_t GetPopulationSize() const { return fGenePool.size(); }
void ClearResults( ); std::vector<TMVA::GeneticGenes>& GetGenePool() { return fGenePool; }
void Reset(); std::vector<TMVA::GeneticRange*>& GetRanges() { return fRanges; }
Bool_t SetFitness( GeneticGenes *g, Double_t fitness, Bool_t add =
kTRUE );
Double_t GetFitness( Int_t index );
Double_t GetFitness( );
void Print( Int_t untilIndex = -1 ); void Print( Int_t untilIndex = -1 );
void Print( ostream & out, Int_t utilIndex = -1 ); void Print( ostream & out, Int_t utilIndex = -1 );
TH1F* VariableDistribution( Int_t varNumber, Int_t bins, Int_t min, I nt_t max ); TH1F* VariableDistribution( Int_t varNumber, Int_t bins, Int_t min, I nt_t max );
std::vector< Double_t > VariableDistribution( Int_t varNumber ); std::vector< Double_t > VariableDistribution( Int_t varNumber );
Double_t GetCounterFitness() const { return fCounterFitness; } // To keep compatibility: These methods might be reimplemented
Int_t GetPopulationSize() const { return fPopulationSize; } // or just eliminated later on. They are used by the
// GeneticFitter class.
std::multimap<Double_t, GeneticGenes>* GetGenePool() const { retur void MakeCopies( int number );
n fGenePool; } void NextGeneration() {}
std::multimap<Double_t, GeneticGenes>* GetNewGenePool() const { retur void AddPopulation( GeneticPopulation *strangers );
n fNewGenePool; } void AddPopulation( GeneticPopulation &strangers );
std::vector<TMVA::GeneticRange*>& GetRanges() { retur void TrimPopulation();
n fRanges; } void GiveHint( std::vector< Double_t >& hint, Double_t fitness = 0 );
void Sort();
private: private:
GeneticGenes MakeSex( GeneticGenes male, GeneticGenes female );
private:
std::vector<TMVA::GeneticGenes> fGenePool; // the "genePool" wher
e the individuals of the current generation are stored
std::vector<TMVA::GeneticRange*> fRanges; // contains the ranges
inbetween the values of the coefficients have to be
Double_t fCounterFitness; // internal use TRandom3*fRandomGenerator; // random Generator for this population
Int_t fPopulationSize; // population si
ze
std::multimap<Double_t, GeneticGenes>* fGenePool; // the "genePool mutable MsgLogger* fLogger; // message logger
" where the individuals of the current generation are stored MsgLogger& Log() const { return *fLogger; }
std::multimap<Double_t, GeneticGenes>* fNewGenePool; // the genePool
where the offspring individuals are stored
std::vector<GeneticRange*> fRanges; // contains the
ranges inbetween the values of the coefficients have to be
std::multimap<Double_t, GeneticGenes>::iterator fCounter; // an inter
nal counter
TRandom *fRandomGenerator; // random Generator for this population
mutable MsgLogger fLogger; // message log ger Int_t fPopulationSizeLimit;
ClassDef(GeneticPopulation,0) //Population definition for genetic alg orithm ClassDef(GeneticPopulation,0) //Population definition for genetic alg orithm
}; };
} // namespace TMVA } // namespace TMVA
#endif #endif
 End of changes. 19 change blocks. 
53 lines changed or deleted 32 lines changed or added


 GeneticRange.h   GeneticRange.h 
// @(#)root/tmva $Id: GeneticRange.h 20882 2007-11-19 11:31:26Z rdm $ // @(#)root/tmva $Id: GeneticRange.h 29122 2009-06-22 06:51:30Z brun $
// Author: Peter Speckmayer // Author: Peter Speckmayer
/************************************************************************** ******** /************************************************************************** ********
* Project: TMVA - a Root-integrated toolkit for multivariate data analysis * * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
* Package: TMVA * * Package: TMVA *
* Class : GeneticRange * * Class : GeneticRange *
* Web : http://tmva.sourceforge.net * * Web : http://tmva.sourceforge.net *
* * * *
* Description: * * Description: *
* Range definition for genetic algorithm * * Range definition for genetic algorithm *
skipping to change at line 36 skipping to change at line 36
#define ROOT_TMVA_GeneticRange #define ROOT_TMVA_GeneticRange
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// // // //
// GeneticRange // // GeneticRange //
// // // //
// Range definition for genetic algorithm // // Range definition for genetic algorithm //
// // // //
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
#include "TRandom.h" #ifndef ROOT_TMVA_Interval
#include "Interval.h" #include "TMVA/Interval.h"
#endif
class TRandom3;
namespace TMVA { namespace TMVA {
class GeneticRange { class GeneticRange {
public: public:
GeneticRange( TRandom *rnd, Interval *interval ); GeneticRange( TRandom3* rnd, Interval *interval );
virtual ~GeneticRange(); virtual ~GeneticRange();
Double_t Random( Bool_t near = kFALSE, Double_t value=0, Double_t spr ead=0.1, Bool_t mirror=kFALSE ); Double_t Random( Bool_t near = kFALSE, Double_t value=0, Double_t spr ead=0.1, Bool_t mirror=kFALSE );
Double_t RandomDiscrete(); Double_t RandomDiscrete();
Double_t GetFrom() { return fFrom; } Double_t GetFrom() { return fFrom; }
Double_t GetTo() { return fTo; } Double_t GetTo() { return fTo; }
Double_t GetTotalLength() { return fTotalLength; } Double_t GetTotalLength() { return fTotalLength; }
private: private:
skipping to change at line 70 skipping to change at line 73
Interval *fInterval; // holds the complete information of the int erval Interval *fInterval; // holds the complete information of the int erval
Double_t fTotalLength; // the distance between the lower and upper c onstraints Double_t fTotalLength; // the distance between the lower and upper c onstraints
// maps the values thrown outside of the ]from,to] interval back to t he interval // maps the values thrown outside of the ]from,to] interval back to t he interval
// the values which leave the range on the from-side, are mapped in t o the to-side // the values which leave the range on the from-side, are mapped in t o the to-side
Double_t ReMap( Double_t val ); Double_t ReMap( Double_t val );
// same as before, but the values leaving the allowed range, are mirr ored into the range. // same as before, but the values leaving the allowed range, are mirr ored into the range.
Double_t ReMapMirror( Double_t val ); Double_t ReMapMirror( Double_t val );
TRandom *fRandomGenerator; // the randomGenerator for calculating th e new values TRandom3* fRandomGenerator; // the randomGenerator for calculating t he new values
ClassDef(GeneticRange,0) // Range definition for genetic algorithm ClassDef(GeneticRange,0) // Range definition for genetic algorithm
}; };
} // namespace TMVA } // namespace TMVA
#endif #endif
 End of changes. 4 change blocks. 
5 lines changed or deleted 8 lines changed or added


 GiniIndex.h   GiniIndex.h 
// @(#)root/tmva $Id: GiniIndex.h 20882 2007-11-19 11:31:26Z rdm $ // @(#)root/tmva $Id: GiniIndex.h 29122 2009-06-22 06:51:30Z brun $
// Author: Andreas Hoecker, Joerg Stelzer, Helge Voss, Kai Voss // Author: Andreas Hoecker, Joerg Stelzer, Helge Voss, Kai Voss
/************************************************************************** ******** /************************************************************************** ********
* Project: TMVA - a Root-integrated toolkit for multivariate data analysis * * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
* Package: TMVA * * Package: TMVA *
* Class : GiniIndex * * Class : GiniIndex *
* Web : http://tmva.sourceforge.net * * Web : http://tmva.sourceforge.net *
* * * *
* Description: Implementation of the GiniIndex as separation criterion * * Description: Implementation of the GiniIndex as separation criterion *
* Large Gini Indices (maximum 0.5) mean , that the sample is well * * Large Gini Indices (maximum 0.5) mean , that the sample is well *
skipping to change at line 25 skipping to change at line 25
* Gini(Sample M) = 1 - (c(1)/N)^2 - (c(2)/N)^2 .... - (c(k)/N )^2 * * Gini(Sample M) = 1 - (c(1)/N)^2 - (c(2)/N)^2 .... - (c(k)/N )^2 *
* Where: M is a smaple of whatever N elements (events) * * Where: M is a smaple of whatever N elements (events) *
* that belong to K different classes * * that belong to K different classes *
* c(k) is the number of elements that belong to class k * * c(k) is the number of elements that belong to class k *
* for just Signal and Background classes this boils down to: * * for just Signal and Background classes this boils down to: *
* Gini(Sample) = 2s*b/(s+b)^2 * * Gini(Sample) = 2s*b/(s+b)^2 *
* * * *
* * * *
* Authors (alphabetical): * * Authors (alphabetical): *
* Andreas Hoecker <Andreas.Hocker@cern.ch> - CERN, Switzerland * * Andreas Hoecker <Andreas.Hocker@cern.ch> - CERN, Switzerland *
* Xavier Prudent <prudent@lapp.in2p3.fr> - LAPP, France *
* Helge Voss <Helge.Voss@cern.ch> - MPI-K Heidelberg, German y * * Helge Voss <Helge.Voss@cern.ch> - MPI-K Heidelberg, German y *
* Kai Voss <Kai.Voss@cern.ch> - U. of Victoria, Canada * * Kai Voss <Kai.Voss@cern.ch> - U. of Victoria, Canada *
* * * *
* Copyright (c) 2005: * * Copyright (c) 2005: *
* CERN, Switzerland * * CERN, Switzerland *
* U. of Victoria, Canada * * U. of Victoria, Canada *
* Heidelberg U., Germany * * Heidelberg U., Germany *
* LAPP, Annecy, France *
* * * *
* Redistribution and use in source and binary forms, with or without * * Redistribution and use in source and binary forms, with or without *
* modification, are permitted according to the terms listed in LICENSE * * modification, are permitted according to the terms listed in LICENSE *
* (http://ttmva.sourceforge.net/LICENSE) * * (http://ttmva.sourceforge.net/LICENSE) *
************************************************************************** ********/ ************************************************************************** ********/
#ifndef ROOT_TMVA_GiniIndex #ifndef ROOT_TMVA_GiniIndex
#define ROOT_TMVA_GiniIndex #define ROOT_TMVA_GiniIndex
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
 End of changes. 3 change blocks. 
3 lines changed or deleted 1 lines changed or added


 HybridCalculator.h   HybridCalculator.h 
// @(#)root/roostats:$Id: HybridCalculator.h 26964 2008-12-16 16:30:01Z mon eta $ // @(#)root/roostats:$Id: HybridCalculator.h 29107 2009-06-19 14:26:42Z mon eta $
/************************************************************************* /*************************************************************************
* Project: RooStats * * Project: RooStats *
* Package: RooFit/RooStats * * Package: RooFit/RooStats *
* Authors: * * Authors: *
* Kyle Cranmer, Lorenzo Moneta, Gregory Schott, Wouter Verkerke * * Kyle Cranmer, Lorenzo Moneta, Gregory Schott, Wouter Verkerke *
************************************************************************* *************************************************************************
* Copyright (C) 1995-2008, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2008, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
skipping to change at line 47 skipping to change at line 47
/// Constructor with only name and title /// Constructor with only name and title
HybridCalculator(const char *name = 0, HybridCalculator(const char *name = 0,
const char *title = 0); const char *title = 0);
/// Constructor for HybridCalculator /// Constructor for HybridCalculator
HybridCalculator(const char *name, HybridCalculator(const char *name,
const char *title, const char *title,
RooAbsPdf& sb_model, RooAbsPdf& sb_model,
RooAbsPdf& b_model, RooAbsPdf& b_model,
RooArgList& observables, RooArgList& observables,
RooArgSet& nuisance_parameters, RooArgSet* nuisance_parameters = 0,
RooAbsPdf& prior_pdf); RooAbsPdf* prior_pdf = 0);
/// Constructor for HybridCalculator using a data set and pdf instan ces /// Constructor for HybridCalculator using a data set and pdf instan ces
HybridCalculator(RooAbsData& data, HybridCalculator(RooAbsData& data,
RooAbsPdf& sb_model, RooAbsPdf& sb_model,
RooAbsPdf& b_model, RooAbsPdf& b_model,
RooArgSet* nuisance_parameters, RooArgSet* nuisance_parameters = 0,
RooAbsPdf* prior_pdf); RooAbsPdf* prior_pdf = 0);
/// Constructor for HybridCalculator using name, title, a data set an d pdf instances /// Constructor for HybridCalculator using name, title, a data set an d pdf instances
HybridCalculator(const char *name, HybridCalculator(const char *name,
const char *title, const char *title,
RooAbsData& data, RooAbsData& data,
RooAbsPdf& sb_model, RooAbsPdf& sb_model,
RooAbsPdf& b_model, RooAbsPdf& b_model,
RooArgSet* nuisance_parameters, RooArgSet* nuisance_parameters = 0,
RooAbsPdf* prior_pdf); RooAbsPdf* prior_pdf = 0);
private: // not yet available private: // not yet available
/// Constructor for HybridCalculator using name, title, a workspace a nd pdf names /// Constructor for HybridCalculator using name, title, a workspace a nd pdf names
HybridCalculator(RooWorkspace & wks, HybridCalculator(RooWorkspace & wks,
const char* data, const char* data,
const char* sb_model, const char* sb_model,
const char* b_model, const char* b_model,
RooArgSet* nuisance_parameters, RooArgSet* nuisance_parameters,
const char* prior_pdf); const char* prior_pdf);
skipping to change at line 150 skipping to change at line 150
// set number of toy MC // set number of toy MC
void SetNumberOfToys(unsigned int ntoys) { fNToys = ntoys; } void SetNumberOfToys(unsigned int ntoys) { fNToys = ntoys; }
// control use of the pdf for the nuisance parameter and marginalize them // control use of the pdf for the nuisance parameter and marginalize them
void UseNuisance(bool on = true) { fUsePriorPdf = on; } void UseNuisance(bool on = true) { fUsePriorPdf = on; }
void SetTestStatistics(int index); void SetTestStatistics(int index);
HybridResult* Calculate(TH1& data, unsigned int nToys, bool usePriors ) const; HybridResult* Calculate(TH1& data, unsigned int nToys, bool usePriors ) const;
HybridResult* Calculate(RooTreeData& data, unsigned int nToys, bool u sePriors) const; HybridResult* Calculate(RooAbsData& data, unsigned int nToys, bool us ePriors) const;
HybridResult* Calculate(unsigned int nToys, bool usePriors) const; HybridResult* Calculate(unsigned int nToys, bool usePriors) const;
void PrintMore(const char* options) const; void PrintMore(const char* options) const;
private: private:
void RunToys(std::vector<double>& bVals, std::vector<double>& sbVals, unsigned int nToys, bool usePriors) const; void RunToys(std::vector<double>& bVals, std::vector<double>& sbVals, unsigned int nToys, bool usePriors) const;
// check input parameters before performing the calculation // check input parameters before performing the calculation
bool DoCheckInputs() const; bool DoCheckInputs() const;
// initialize all the data and pdf by using a workspace as input // initialize all the data and pdf by using a workspace as input
bool DoInitializeFromWS(); bool DoInitializeFromWS();
 End of changes. 5 change blocks. 
8 lines changed or deleted 8 lines changed or added


 IFitterTarget.h   IFitterTarget.h 
// @(#)root/tmva $Id: IFitterTarget.h 23334 2008-04-19 18:38:57Z brun $ // @(#)root/tmva $Id: IFitterTarget.h 29122 2009-06-22 06:51:30Z brun $
// Author: Andreas Hoecker, Peter Speckmayer // Author: Andreas Hoecker, Peter Speckmayer
/************************************************************************** ******** /************************************************************************** ********
* Project: TMVA - a Root-integrated toolkit for multivariate data analysis * * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
* Package: TMVA * * Package: TMVA *
* Class : IFitterTarget * * Class : IFitterTarget *
* Web : http://tmva.sourceforge.net * * Web : http://tmva.sourceforge.net *
* * * *
* Description: * * Description: *
* Interface for generic fitter * * Interface for generic fitter *
skipping to change at line 55 skipping to change at line 55
class IFitterTarget { class IFitterTarget {
public: public:
IFitterTarget(); IFitterTarget();
virtual ~IFitterTarget() {} virtual ~IFitterTarget() {}
virtual Double_t EstimatorFunction( std::vector<Double_t>& parameters ) = 0; virtual Double_t EstimatorFunction( std::vector<Double_t>& parameters ) = 0;
// function to notify the FitterTarget of the progress status of the
fitter
// sender : "GA", "MC", ...
// progress : "init", "iteration", "last", "stop"
virtual void ProgressNotifier ( TString /*sender*/, TString /* pr
ogress */ ) {}
private: private:
ClassDef(IFitterTarget,0) // base class for a fitter "target" ClassDef(IFitterTarget,0) // base class for a fitter "target"
}; };
} // namespace TMVA } // namespace TMVA
#endif #endif
 End of changes. 2 change blocks. 
1 lines changed or deleted 8 lines changed or added


 IMethod.h   IMethod.h 
// @(#)root/tmva $Id: IMethod.h 26050 2008-11-01 09:18:41Z brun $ // @(#)root/tmva $Id: IMethod.h 29122 2009-06-22 06:51:30Z brun $
// Author: Andreas Hoecker, Joerg Stelzer, Helge Voss, Kai Voss // Author: Andreas Hoecker, Joerg Stelzer, Helge Voss, Kai Voss
/************************************************************************** ******** /************************************************************************** ********
* Project: TMVA - a Root-integrated toolkit for multivariate data analysis * * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
* Package: TMVA * * Package: TMVA *
* Class : IMethod * * Class : IMethod *
* Web : http://tmva.sourceforge.net * * Web : http://tmva.sourceforge.net *
* * * *
* Description: * * Description: *
* Interface for all concrete MVA method implementations * * Interface for all concrete MVA method implementations *
skipping to change at line 41 skipping to change at line 41
#define ROOT_TMVA_IMethod #define ROOT_TMVA_IMethod
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// // // //
// IMethod // // IMethod //
// // // //
// Interface for all concrete MVA method implementations // // Interface for all concrete MVA method implementations //
// // // //
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
#ifndef ROOT_TObject
#include "TObject.h" #include "TObject.h"
#endif
#ifndef ROOT_TString
#include "TString.h"
#endif
#include <iosfwd>
#ifndef ROOT_TMVA_Types #ifndef ROOT_Rtypes
#include "TMVA/Types.h" #include "Rtypes.h"
#endif #endif
class TString;
namespace TMVA { namespace TMVA {
class Ranking; class Ranking;
class MethodBoost;
class IMethod : public virtual TObject { class IMethod {
public: public:
// default constructur // default constructur
IMethod() : TObject() {} IMethod() {}
// default destructur // default destructur
virtual ~IMethod() {} virtual ~IMethod() {}
// ------- virtual member functions to be implemented by each MVA met hod // ------- virtual member functions to be implemented by each MVA met hod
// the name of the method
virtual const char *GetName() const = 0;
// calculate the MVA value // calculate the MVA value - some methods may return a per-event erro
virtual Double_t GetMvaValue() = 0; r estimate (unless: *err = -1)
virtual Double_t GetMvaValue( Double_t* err = 0 ) = 0;
// training method // training method
virtual void Train( void ) = 0; virtual void Train( void ) = 0;
// write weights to output stream // write weights to output stream
virtual void WriteWeightsToStream( std::ostream& ) const = 0; virtual void WriteWeightsToStream( std::ostream& ) const = 0;
// read weights from output stream // read weights from output stream
virtual void ReadWeightsFromStream( std::istream& ) = 0; virtual void ReadWeightsFromStream( std::istream& ) = 0;
// write method specific monitoring histograms to target file // write method specific monitoring histograms to target file
virtual void WriteMonitoringHistosToFile( void ) const = 0; virtual void WriteMonitoringHistosToFile( void ) const = 0;
// make ROOT-independent C++ class for classifier response // make ROOT-independent C++ class for classifier response
virtual void MakeClass( const TString& classFileName = "" ) const = 0 ; virtual void MakeClass( const TString& classFileName = TString("") ) const = 0;
// create ranking // create ranking
virtual const Ranking* CreateRanking() = 0; virtual const Ranking* CreateRanking() = 0;
// print help message // print help message
virtual void PrintHelpMessage() const = 0; virtual void PrintHelpMessage() const = 0;
// get specific help message from classifer // perfrom extra actions during the boosting at different stages
virtual void GetHelpMessage() const = 0; virtual Bool_t MonitorBoost( MethodBoost* boost) = 0;
virtual void Init() = 0;
virtual void DeclareOptions() = 0;
virtual void ProcessOptions() = 0;
protected: protected:
// make ROOT-independent C++ class for classifier response (classifie r-specific implementation) // make ROOT-independent C++ class for classifier response (classifie r-specific implementation)
virtual void MakeClassSpecific( std::ostream&, const TString& ) const = 0; virtual void MakeClassSpecific( std::ostream&, const TString& ) const = 0;
// get specific help message from classifer
virtual void GetHelpMessage() const = 0;
ClassDef(IMethod,0) // Method Interface ClassDef(IMethod,0) // Method Interface
}; };
} // namespace TMVA } // namespace TMVA
#endif #endif
 End of changes. 13 change blocks. 
10 lines changed or deleted 29 lines changed or added


 IMetric.h   IMetric.h 
// @(#)root/tmva $Id: IMetric.h 21630 2008-01-10 19:40:44Z brun $ // @(#)root/tmva $Id: IMetric.h 29122 2009-06-22 06:51:30Z brun $
// Author: Peter Speckmayer // Author: Peter Speckmayer
/************************************************************************** ******** /************************************************************************** ********
* Project: TMVA - a Root-integrated toolkit for multivariate data analysis * * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
* Package: TMVA * * Package: TMVA *
* Class : IMetric * * Class : IMetric *
* Web : http://tmva.sourceforge.net * * Web : http://tmva.sourceforge.net *
* * * *
* Description: * * Description: *
* Fitter using a Genetic Algorithm * * Fitter using a Genetic Algorithm *
skipping to change at line 30 skipping to change at line 30
* Redistribution and use in source and binary forms, with or without * * Redistribution and use in source and binary forms, with or without *
* modification, are permitted according to the terms listed in LICENSE * * modification, are permitted according to the terms listed in LICENSE *
* (http://tmva.sourceforge.net/LICENSE) * * (http://tmva.sourceforge.net/LICENSE) *
************************************************************************** ********/ ************************************************************************** ********/
#ifndef ROOT_TMVA_IMetric #ifndef ROOT_TMVA_IMetric
#define ROOT_TMVA_IMetric #define ROOT_TMVA_IMetric
#include <vector> #include <vector>
#ifndef ROOT_Rtypes
#include "Rtypes.h" #include "Rtypes.h"
#endif
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// // // //
// IMetric // // IMetric //
// // // //
// Interface for a metric, depending on the implementation the meaning // // distance between two points in parameter space //
// of distance in space changes. //
// // // //
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
namespace TMVA { namespace TMVA {
class IMetric { class IMetric {
public: public:
IMetric(); IMetric();
 End of changes. 5 change blocks. 
4 lines changed or deleted 5 lines changed or added


 Integrator.h   Integrator.h 
// @(#)root/mathmore:$Id: Integrator.h 24403 2008-06-20 08:31:10Z moneta $ // @(#)root/mathmore:$Id: Integrator.h 28946 2009-06-11 15:39:14Z moneta $
// Authors: L. Moneta, M. Slawinska 10/2007 // Authors: L. Moneta, M. Slawinska 10/2007
/********************************************************************** /**********************************************************************
* * * *
* Copyright (c) 2007 ROOT Foundation, CERN/PH-SFT * * Copyright (c) 2007 ROOT Foundation, CERN/PH-SFT *
* * * *
* * * *
**********************************************************************/ **********************************************************************/
// Header file for class Integrator // Header file for class Integrator
skipping to change at line 150 skipping to change at line 150
// template methods for generic functors // template methods for generic functors
/** /**
method to set the a generic integration function method to set the a generic integration function
@param f integration function. The function type must implement the a ssigment operator, <em> double operator() ( double x ) </em> @param f integration function. The function type must implement the a ssigment operator, <em> double operator() ( double x ) </em>
*/ */
template<class Function> template<class Function>
inline void SetFunction(Function f); inline void SetFunction(const Function & f);
/** /**
set one dimensional function for 1D integration set one dimensional function for 1D integration
*/ */
void SetFunction (const IGenFunction &f, bool copy = false) { void SetFunction (const IGenFunction &f, bool copy = false) {
if (fIntegrator) fIntegrator->SetFunction(f,copy); if (fIntegrator) fIntegrator->SetFunction(f,copy);
} }
/** /**
skipping to change at line 178 skipping to change at line 178
// integration methods using a function // integration methods using a function
/** /**
evaluate the Integral of a function f over the defined interval (a,b ) evaluate the Integral of a function f over the defined interval (a,b )
@param f integration function. The function type must be a C++ calla ble object implementing operator()(double x) @param f integration function. The function type must be a C++ calla ble object implementing operator()(double x)
@param a lower value of the integration interval @param a lower value of the integration interval
@param b upper value of the integration interval @param b upper value of the integration interval
*/ */
template<class Function> template<class Function>
double Integral(Function f, double a, double b); double Integral(const Function & f, double a, double b);
/** /**
evaluate the Integral of a function f over the defined interval (a,b ) evaluate the Integral of a function f over the defined interval (a,b )
@param f integration function. The function type must implement the mathlib::IGenFunction interface @param f integration function. The function type must implement the mathlib::IGenFunction interface
@param a lower value of the integration interval @param a lower value of the integration interval
@param b upper value of the integration interval @param b upper value of the integration interval
*/ */
double Integral(const IGenFunction & f, double a, double b) { double Integral(const IGenFunction & f, double a, double b) {
SetFunction(f,false); SetFunction(f,false);
return Integral(a,b); return Integral(a,b);
} }
/** /**
evaluate the Integral of a function f over the infinite interval (-in f,+inf) evaluate the Integral of a function f over the infinite interval (-in f,+inf)
@param f integration function. The function type must be a C++ calla ble object implementing operator()(double x) @param f integration function. The function type must be a C++ calla ble object implementing operator()(double x)
*/ */
template<class Function> template<class Function>
double Integral(Function f); double Integral(const Function & f);
/** /**
evaluate the Integral of a function f over the infinite interval (-in f,+inf) evaluate the Integral of a function f over the infinite interval (-in f,+inf)
@param f integration function. The function type must implement the m athlib::IGenFunction interface @param f integration function. The function type must implement the m athlib::IGenFunction interface
*/ */
double Integral(const IGenFunction & f) { double Integral(const IGenFunction & f) {
SetFunction(f,false); SetFunction(f,false);
return Integral(); return Integral();
} }
/** /**
evaluate the Integral of a function f over the semi-infinite interval (a,+inf) evaluate the Integral of a function f over the semi-infinite interval (a,+inf)
@param f integration function. The function type must be a C++ callab le object implementing operator()(double x) @param f integration function. The function type must be a C++ callab le object implementing operator()(double x)
@param a lower value of the integration interval @param a lower value of the integration interval
*/ */
template<class Function> template<class Function>
double IntegralUp(Function f, double a); double IntegralUp(const Function & f, double a);
/** /**
evaluate the Integral of a function f over the semi-infinite interval (a,+inf) evaluate the Integral of a function f over the semi-infinite interval (a,+inf)
@param f integration function. The function type must implement the m athlib::IGenFunction interface @param f integration function. The function type must implement the m athlib::IGenFunction interface
@param a lower value of the integration interval @param a lower value of the integration interval
*/ */
double IntegralUp(const IGenFunction & f, double a ) { double IntegralUp(const IGenFunction & f, double a ) {
SetFunction(f,false); SetFunction(f,false);
return IntegralUp(a); return IntegralUp(a);
} }
/** /**
evaluate the Integral of a function f over the over the semi-infinite interval (-inf,b) evaluate the Integral of a function f over the over the semi-infinite interval (-inf,b)
@param f integration function. The function type must be a C++ callab le object implementing operator()(double x) @param f integration function. The function type must be a C++ callab le object implementing operator()(double x)
@param b upper value of the integration interval @param b upper value of the integration interval
*/ */
template<class Function> template<class Function>
double IntegralLow(Function f, double b); double IntegralLow(const Function & f, double b);
/** /**
evaluate the Integral of a function f over the over the semi-infinite interval (-inf,b) evaluate the Integral of a function f over the over the semi-infinite interval (-inf,b)
@param f integration function. The function type must implement the m athlib::IGenFunction interface @param f integration function. The function type must implement the m athlib::IGenFunction interface
@param b upper value of the integration interval @param b upper value of the integration interval
*/ */
double IntegralLow(const IGenFunction & f, double b ) { double IntegralLow(const IGenFunction & f, double b ) {
SetFunction(f,false); SetFunction(f,false);
return IntegralLow(b); return IntegralLow(b);
} }
/** /**
evaluate the Integral of a function f with known singular points over the defined Integral (a,b) evaluate the Integral of a function f with known singular points over the defined Integral (a,b)
@param f integration function. The function type must be a C++ callab le object implementing operator()(double x) @param f integration function. The function type must be a C++ callab le object implementing operator()(double x)
@param pts vector containing both the function singular points and th e lower/upper edges of the interval. The vector must have as first element the lower edge of the integration Integral ( \a a) and last element the upp er value. @param pts vector containing both the function singular points and th e lower/upper edges of the interval. The vector must have as first element the lower edge of the integration Integral ( \a a) and last element the upp er value.
*/ */
template<class Function> template<class Function>
double Integral(Function f, const std::vector<double> & pts ); double Integral(const Function & f, const std::vector<double> & pts );
/** /**
evaluate the Integral of a function f with known singular points over the defined Integral (a,b) evaluate the Integral of a function f with known singular points over the defined Integral (a,b)
@param f integration function. The function type must implement the m athlib::IGenFunction interface @param f integration function. The function type must implement the m athlib::IGenFunction interface
@param pts vector containing both the function singular points and th e lower/upper edges of the interval. The vector must have as first element the lower edge of the integration Integral ( \a a) and last element the upp er value. @param pts vector containing both the function singular points and th e lower/upper edges of the interval. The vector must have as first element the lower edge of the integration Integral ( \a a) and last element the upp er value.
*/ */
double Integral(const IGenFunction & f, const std::vector<double> & pts ) { double Integral(const IGenFunction & f, const std::vector<double> & pts ) {
SetFunction(f,false); SetFunction(f,false);
return Integral(pts); return Integral(pts);
skipping to change at line 273 skipping to change at line 273
/** /**
evaluate the Cauchy principal value of the integral of a function f over the defined interval (a,b) with a singularity at c evaluate the Cauchy principal value of the integral of a function f over the defined interval (a,b) with a singularity at c
@param f integration function. The function type must be a C++ callab le object implementing operator()(double x) @param f integration function. The function type must be a C++ callab le object implementing operator()(double x)
@param a lower value of the integration interval @param a lower value of the integration interval
@param b upper value of the integration interval @param b upper value of the integration interval
@param c position of singularity @param c position of singularity
*/ */
template<class Function> template<class Function>
double IntegralCauchy(Function f, double a, double b, double c); double IntegralCauchy(const Function & f, double a, double b, double c);
/** /**
evaluate the Cauchy principal value of the integral of a function f over the defined interval (a,b) with a singularity at c evaluate the Cauchy principal value of the integral of a function f over the defined interval (a,b) with a singularity at c
@param f integration function. The function type must implement the mathlib::IGenFunction interface @param f integration function. The function type must implement the mathlib::IGenFunction interface
@param a lower value of the integration interval @param a lower value of the integration interval
@param b upper value of the integration interval @param b upper value of the integration interval
@param c position of singularity @param c position of singularity
*/ */
double IntegralCauchy(const IGenFunction & f, double a, double b, double c) { double IntegralCauchy(const IGenFunction & f, double a, double b, double c) {
skipping to change at line 401 skipping to change at line 401
} // namespace Math } // namespace Math
} // namespace ROOT } // namespace ROOT
#ifndef __CINT__ #ifndef __CINT__
#ifndef ROOT_Math_WrappedFunction #ifndef ROOT_Math_WrappedFunction
#include "Math/WrappedFunction.h" #include "Math/WrappedFunction.h"
#endif #endif
template<class Function> template<class Function>
void ROOT::Math::IntegratorOneDim::SetFunction(Function f) { void ROOT::Math::IntegratorOneDim::SetFunction(const Function & f) {
ROOT::Math::WrappedFunction<Function> wf(f); ROOT::Math::WrappedFunction<const Function &> wf(f);
// need to copy the wrapper function, the instance created here will be d eleted after SetFunction() // need to copy the wrapper function, the instance created here will be d eleted after SetFunction()
if (fIntegrator) fIntegrator->SetFunction(wf, true); if (fIntegrator) fIntegrator->SetFunction(wf, true);
} }
template<class Function> template<class Function>
double ROOT::Math::IntegratorOneDim::Integral(Function f, double a, double double ROOT::Math::IntegratorOneDim::Integral(const Function & f, double a,
b) { double b) {
ROOT::Math::WrappedFunction<Function> wf(f); ROOT::Math::WrappedFunction<const Function &> wf(f);
SetFunction(wf,false); // no copy is needed in this case SetFunction(wf,false); // no copy is needed in this case
return Integral(a,b); return Integral(a,b);
} }
template<class Function> template<class Function>
double ROOT::Math::IntegratorOneDim::Integral(Function f) { double ROOT::Math::IntegratorOneDim::Integral(const Function & f) {
ROOT::Math::WrappedFunction<Function> wf(f); ROOT::Math::WrappedFunction<const Function &> wf(f);
SetFunction(wf,false); // no copy is needed in this case SetFunction(wf,false); // no copy is needed in this case
return Integral(); return Integral();
} }
template<class Function> template<class Function>
double ROOT::Math::IntegratorOneDim::IntegralLow(Function f, double x) { double ROOT::Math::IntegratorOneDim::IntegralLow(const Function & f, doubl
ROOT::Math::WrappedFunction<Function> wf(f); e x) {
ROOT::Math::WrappedFunction<const Function &> wf(f);
SetFunction(wf,false); // no copy is needed in this case SetFunction(wf,false); // no copy is needed in this case
return IntegralLow(x); return IntegralLow(x);
} }
template<class Function> template<class Function>
double ROOT::Math::IntegratorOneDim::IntegralUp(Function f, double x) { double ROOT::Math::IntegratorOneDim::IntegralUp(const Function & f, double
ROOT::Math::WrappedFunction<Function> wf(f); x) {
ROOT::Math::WrappedFunction<const Function &> wf(f);
SetFunction(wf,false); // no copy is needed in this case SetFunction(wf,false); // no copy is needed in this case
return IntegralUp(x); return IntegralUp(x);
} }
template<class Function> template<class Function>
double ROOT::Math::IntegratorOneDim::Integral(Function f, const std::vector double ROOT::Math::IntegratorOneDim::Integral(const Function & f, const std
<double> & pts) { ::vector<double> & pts) {
ROOT::Math::WrappedFunction<Function> wf(f); ROOT::Math::WrappedFunction<const Function &> wf(f);
SetFunction(wf,false); // no copy is needed in this case SetFunction(wf,false); // no copy is needed in this case
return Integral(pts); return Integral(pts);
} }
template<class Function> template<class Function>
double ROOT::Math::IntegratorOneDim::IntegralCauchy(Function f, double a, d double ROOT::Math::IntegratorOneDim::IntegralCauchy(const Function & f, dou
ouble b, double c) { ble a, double b, double c) {
ROOT::Math::WrappedFunction<Function> wf(f); ROOT::Math::WrappedFunction<const Function & > wf(f);
SetFunction(wf,false); // no copy is needed in this case SetFunction(wf,false); // no copy is needed in this case
return IntegralCauchy(a,b,c); return IntegralCauchy(a,b,c);
} }
#endif #endif
#endif /* ROOT_Math_Integrator */ #endif /* ROOT_Math_Integrator */
 End of changes. 15 change blocks. 
25 lines changed or deleted 27 lines changed or added


 IntegratorMultiDim.h   IntegratorMultiDim.h 
skipping to change at line 92 skipping to change at line 92
@param f integration function (generic function implementin ope rator()(const double *) @param f integration function (generic function implementin ope rator()(const double *)
@param dim function dimension @param dim function dimension
@param type integration type (adaptive, MC methods, etc..) @param type integration type (adaptive, MC methods, etc..)
@param absTol desired absolute Error @param absTol desired absolute Error
@param relTol desired relative Error @param relTol desired relative Error
@param ncall number of function calls (apply only to MC integratioo n methods) @param ncall number of function calls (apply only to MC integratioo n methods)
*/ */
#ifdef LATER #ifdef LATER
template<class Function> template<class Function>
IntegratorMultiDim(Function &f, unsigned int dim, IntegrationMultiDim::T ype type = IntegrationMultiDim::kADAPTIVE, double absTol = 1.E-9, double re lTol = 1E-6, unsigned int ncall = 100000) { IntegratorMultiDim(const Function & f, unsigned int dim, IntegrationMult iDim::Type type = IntegrationMultiDim::kADAPTIVE, double absTol = 1.E-9, do uble relTol = 1E-6, unsigned int ncall = 100000) {
fIntegrator = CreateIntegrator(type, absTol, relTol, ncall); fIntegrator = CreateIntegrator(type, absTol, relTol, ncall);
SetFunction(f, dim); SetFunction(f, dim);
} }
#endif #endif
/// destructor /// destructor
virtual ~IntegratorMultiDim() { virtual ~IntegratorMultiDim() {
if (fIntegrator) delete fIntegrator; if (fIntegrator) delete fIntegrator;
} }
skipping to change at line 136 skipping to change at line 136
double Integral(Function f, unsigned int dim, const double* xmin, const double * xmax) { double Integral(Function f, unsigned int dim, const double* xmin, const double * xmax) {
SetFunction(f,dim); SetFunction(f,dim);
return Integral(xmin, xmax); return Integral(xmin, xmax);
} }
/** /**
set integration function using a generic function implementing the o perator()(double *x) set integration function using a generic function implementing the o perator()(double *x)
The dimension of the function is in this case required The dimension of the function is in this case required
*/ */
template <class Function> template <class Function>
void SetFunction(Function f, unsigned int dim) { void SetFunction(const Function & f, unsigned int dim) {
ROOT::Math::WrappedMultiFunction<Function> wf(f, dim); ROOT::Math::WrappedMultiFunction<Function> wf(f, dim);
SetFunction(wf); SetFunction(wf);
} }
void SetFunction(const IMultiGenFunction &f) { void SetFunction(const IMultiGenFunction &f) {
if (fIntegrator) fIntegrator->SetFunction(f); if (fIntegrator) fIntegrator->SetFunction(f);
} }
/// return result of last integration /// return result of last integration
double Result() const { return fIntegrator == 0 ? 0 : fIntegrator->Resul t(); } double Result() const { return fIntegrator == 0 ? 0 : fIntegrator->Resul t(); }
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 Interval.h   Interval.h 
// @(#)root/tmva $Id: Interval.h 20882 2007-11-19 11:31:26Z rdm $ // @(#)root/tmva $Id: Interval.h 29195 2009-06-24 10:39:49Z brun $
// Author: Peter Speckmayer // Author: Peter Speckmayer
/************************************************************************** ******** /************************************************************************** ********
* Project: TMVA - a Root-integrated toolkit for multivariate data analysis * * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
* Package: TMVA * * Package: TMVA *
* Class : Interval * * Class : Interval *
* Web : http://tmva.sourceforge.net * * Web : http://tmva.sourceforge.net *
* * * *
* Description: * * Description: *
* Generic range definition (used, eg, in genetic algorithm) * * Generic range definition (used, eg, in genetic algorithm) *
skipping to change at line 39 skipping to change at line 39
// // // //
// Interval // // Interval //
// // // //
// Interval definition, continuous and discrete // // Interval definition, continuous and discrete //
// // // //
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
#ifndef ROOT_Rtypes #ifndef ROOT_Rtypes
#include "Rtypes.h" #include "Rtypes.h"
#endif #endif
#ifndef ROOT_TMVA_MsgLogger
#include "TMVA/MsgLogger.h"
#endif
class TRandom; class TRandom3;
namespace TMVA { namespace TMVA {
class MsgLogger;
class Interval { class Interval {
public: public:
Interval( Double_t min, Double_t max, Int_t nbins = 0 ); Interval( Double_t min, Double_t max, Int_t nbins = 0 );
Interval( const Interval& other ); Interval( const Interval& other );
virtual ~Interval(); virtual ~Interval();
// accessors // accessors
Double_t GetMin() const { return fMin; } Double_t GetMin() const { return fMin; }
Double_t GetMax() const { return fMax; } Double_t GetMax() const { return fMax; }
Double_t GetWidth() const { return fMax - fMin; } Double_t GetWidth() const { return fMax - fMin; }
Int_t GetNbins() const { return fNbins; } Int_t GetNbins() const { return fNbins; }
Double_t GetMean() const { return (fMax + fMin)/2; } Double_t GetMean() const { return (fMax + fMin)/2; }
Double_t GetRndm( TRandom& ) const; Double_t GetRndm( TRandom3& ) const;
Double_t GetElement( Int_t position ) const; Double_t GetElement( Int_t position ) const;
void SetMax( Double_t m ) { fMax = m; } void SetMax( Double_t m ) { fMax = m; }
void SetMin( Double_t m ) { fMin = m; } void SetMin( Double_t m ) { fMin = m; }
private: private:
mutable MsgLogger fLogger; // message logger
Double_t fMin, fMax; // the constraints of the Interval Double_t fMin, fMax; // the constraints of the Interval
Int_t fNbins; // when >0 : number of bins (discrete interva l); when =0 continuous interval Int_t fNbins; // when >0 : number of bins (discrete interva l); when =0 continuous interval
mutable MsgLogger* fLogger; // message logger
MsgLogger& Log() const { return *fLogger; }
ClassDef(Interval,0) // Interval definition, continous and discret e ClassDef(Interval,0) // Interval definition, continous and discret e
}; };
} // namespace TMVA } // namespace TMVA
#endif #endif
 End of changes. 7 change blocks. 
8 lines changed or deleted 8 lines changed or added


 KDEKernel.h   KDEKernel.h 
// @(#)root/tmva $Id: KDEKernel.h 20882 2007-11-19 11:31:26Z rdm $ // @(#)root/tmva $Id: KDEKernel.h 29195 2009-06-24 10:39:49Z brun $
// Author: Asen Christov // Author: Asen Christov
/************************************************************************** ******** /************************************************************************** ********
* Project: TMVA - a Root-integrated toolkit for multivariate data analysis * * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
* Package: TMVA * * Package: TMVA *
* Class : KDEKernel * * Class : KDEKernel *
* Web : http://tmva.sourceforge.net * * Web : http://tmva.sourceforge.net *
* * * *
* Description: * * Description: *
* The Probability Density Functions (PDFs) used for the Likelihood an alysis * * The Probability Density Functions (PDFs) used for the Likelihood an alysis *
skipping to change at line 40 skipping to change at line 40
#define ROOT_TMVA_KDEKernel #define ROOT_TMVA_KDEKernel
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// // // //
// KDEKernel // // KDEKernel //
// // // //
// KDE Kernel for "smoothing" the PDFs // // KDE Kernel for "smoothing" the PDFs //
// // // //
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
#ifndef ROOT_TMVA_MsgLogger
#include "TMVA/MsgLogger.h"
#endif
class TH1; class TH1;
class TH1F; class TH1F;
class TF1; class TF1;
namespace TMVA { namespace TMVA {
class MsgLogger;
class KDEKernel { class KDEKernel {
public: public:
enum EKernelType { kNone = 0, kGauss = 1 }; enum EKernelType { kNone = 0, kGauss = 1 };
enum EKernelIter { kNonadaptiveKDE = 1, kAdaptiveKDE = 2 }; enum EKernelIter { kNonadaptiveKDE = 1, kAdaptiveKDE = 2 };
enum EKernelBorder { kNoTreatment = 1, kKernelRenorm = 2, kSampleMirr or = 3 }; enum EKernelBorder { kNoTreatment = 1, kKernelRenorm = 2, kSampleMirr or = 3 };
public: public:
skipping to change at line 88 skipping to change at line 86
Float_t fUpperEdge; // the upper edge of the PDF Float_t fUpperEdge; // the upper edge of the PDF
Float_t fFineFactor; // fine tuning factor for Adaptive KDE: factor to multiply the "width" of the Kernel function Float_t fFineFactor; // fine tuning factor for Adaptive KDE: factor to multiply the "width" of the Kernel function
TF1 *fKernel_integ; // the integral of the Kernel funct ion TF1 *fKernel_integ; // the integral of the Kernel funct ion
EKernelBorder fKDEborder; // The method to take care about "b order" effects EKernelBorder fKDEborder; // The method to take care about "b order" effects
TH1F *fHist; // copy of input histogram TH1F *fHist; // copy of input histogram
TH1F *fFirstIterHist; // histogram to be filled in the h idden iteration TH1F *fFirstIterHist; // histogram to be filled in the h idden iteration
TH1F *fSigmaHist; // contains the Sigmas Widths for a daptive KDE TH1F *fSigmaHist; // contains the Sigmas Widths for a daptive KDE
Bool_t fHiddenIteration; // Defines if whats currently runni ng is the Bool_t fHiddenIteration; // Defines if whats currently runni ng is the
// (first) hidden iteration when doing adaptive KDE // (first) hidden iteration when doing adaptive KDE
mutable MsgLogger fLogger; //! message logger mutable MsgLogger* fLogger; // message logger
MsgLogger& Log() const { return *fLogger; }
ClassDef(KDEKernel,0) // Kernel density estimator for PDF smoothing ClassDef(KDEKernel,0) // Kernel density estimator for PDF smoothing
};// namespace TMVA };// namespace TMVA
} }
#endif // KDEKernel_H #endif // KDEKernel_H
 End of changes. 4 change blocks. 
6 lines changed or deleted 5 lines changed or added


 Kernel.h   Kernel.h 
// @(#)root/reflex:$Id: Kernel.h 28064 2009-04-02 13:31:29Z axel $ // @(#)root/reflex:$Id: Kernel.h 29112 2009-06-20 04:39:31Z pcanal $
// Author: Stefan Roiser 2004 // Author: Stefan Roiser 2004
// Copyright CERN, CH-1211 Geneva 23, 2004-2006, All rights reserved. // Copyright CERN, CH-1211 Geneva 23, 2004-2006, All rights reserved.
// //
// Permission to use, copy, modify, and distribute this software for any // Permission to use, copy, modify, and distribute this software for any
// purpose is hereby granted without fee, provided that this copyright and // purpose is hereby granted without fee, provided that this copyright and
// permissions notice appear in all copies and derivatives. // permissions notice appear in all copies and derivatives.
// //
// This software is provided "as is" without express or implied warranty. // This software is provided "as is" without express or implied warranty.
skipping to change at line 116 skipping to change at line 116
#define LONGLONG_MIN 0x8000000000000000LL #define LONGLONG_MIN 0x8000000000000000LL
#endif #endif
#ifndef ULONGLONG_MAX #ifndef ULONGLONG_MAX
#define ULONGLONG_MAX 0xFFFFFFFFFFFFFFFFLL #define ULONGLONG_MAX 0xFFFFFFFFFFFFFFFFLL
#endif #endif
#ifndef ULONGLONG_MIN #ifndef ULONGLONG_MIN
#define ULONGLONG_MIN 0x0000000000000000LL #define ULONGLONG_MIN 0x0000000000000000LL
#endif #endif
// Include files // Include files
#include <stdlib.h>
#include <string.h>
#include <string> #include <string>
#include <cstring> #include <cstring>
#include <vector> #include <vector>
#include <utility> #include <utility>
#include <exception> #include <exception>
namespace Reflex { namespace Reflex {
#if 0 #if 0
// The definition of Reflex::longlong is now removed. // The definition of Reflex::longlong is now removed.
skipping to change at line 207 skipping to change at line 209
RFLX_API const PropertyList & PropertyList(); RFLX_API const PropertyList & PropertyList();
RFLX_API const Member & Member(); RFLX_API const Member & Member();
RFLX_API const MemberTemplate & MemberTemplate(); RFLX_API const MemberTemplate & MemberTemplate();
RFLX_API const Scope & Scope(); RFLX_API const Scope & Scope();
template< class T > inline const T & Get() { template< class T > inline const T & Get() {
static T t; static T t;
return t; return t;
} }
} }
/** some general information about the Reflex package */ /** The Reflex instance ensures the setup of the databases
and provides access to some general information about the Reflex pac
kage */
class RFLX_API Instance { class RFLX_API Instance {
public: public:
/** default constructor */ /** default constructor */
Instance(); Instance();
/** destructor */ /** destructor */
~Instance(); ~Instance();
/** return true if Reflex has shutdown (end of process) */
static bool HasShutdown();
private: private:
void Shutdown(); Instance(Instance* createSingleton);
static Instance& CreateReflexInstance();
static Instance* fgSingleton;
static bool fgHasShutdown;
void Shutdown();
/** default constructor */
}; // struct Reflex }; // struct Reflex
/** the Name of the package - used for messages */ /** the Name of the package - used for messages */
RFLX_API const std::string & Argv0(); // returns "Reflex"; RFLX_API const std::string & Argv0(); // returns "Reflex";
// these defines are used for the modifiers they are used in the followi ng // these defines are used for the modifiers they are used in the followi ng
// classes // classes
// BA = BASE // BA = BASE
// CL = CLASS // CL = CLASS
// FU = FUNCTION // FU = FUNCTION
 End of changes. 7 change blocks. 
4 lines changed or deleted 16 lines changed or added


 LikelihoodInterval.h   LikelihoodInterval.h 
// @(#)root/roostats:$Id: LikelihoodInterval.h 26434 2008-11-24 21:29:32Z m oneta $ // @(#)root/roostats:$Id: LikelihoodInterval.h 29107 2009-06-19 14:26:42Z m oneta $
// Author: Kyle Cranmer, Lorenzo Moneta, Gregory Schott, Wouter Verkerke // Author: Kyle Cranmer, Lorenzo Moneta, Gregory Schott, Wouter Verkerke
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2008, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2008, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
#ifndef RooStats_LikelihoodInterval #ifndef RooStats_LikelihoodInterval
skipping to change at line 53 skipping to change at line 53
// do we want it to return list of parameters // do we want it to return list of parameters
virtual RooArgSet* GetParameters() const; virtual RooArgSet* GetParameters() const;
// check if parameters are correct. (dummy implementation to start) // check if parameters are correct. (dummy implementation to start)
Bool_t CheckParameters(RooArgSet&) const ; Bool_t CheckParameters(RooArgSet&) const ;
// Method to return lower limit on a given parameter // Method to return lower limit on a given parameter
Double_t LowerLimit(RooRealVar& param) ; Double_t LowerLimit(RooRealVar& param) ;
Double_t UpperLimit(RooRealVar& param) ; Double_t UpperLimit(RooRealVar& param) ;
RooAbsReal* GetLikelihoodRatio() {return fLikelihoodRatio;}
private: private:
RooArgSet* fParameters; // parameters of interest for this interval RooArgSet* fParameters; // parameters of interest for this interval
RooAbsReal* fLikelihoodRatio; // likelihood ratio function used to ma ke contours RooAbsReal* fLikelihoodRatio; // likelihood ratio function used to ma ke contours
Double_t fConfidenceLevel; // Requested confidence level (eg. 0.95 fo r 95% CL) Double_t fConfidenceLevel; // Requested confidence level (eg. 0.95 fo r 95% CL)
ClassDef(LikelihoodInterval,1) // Concrete implementation of a ConfI nterval based on a likelihood ratio ClassDef(LikelihoodInterval,1) // Concrete implementation of a ConfI nterval based on a likelihood ratio
}; };
} }
 End of changes. 2 change blocks. 
1 lines changed or deleted 3 lines changed or added


 LogLikelihoodFCN.h   LogLikelihoodFCN.h 
// @(#)root/mathcore:$Id: LogLikelihoodFCN.h 26541 2008-12-01 10:00:52Z mon eta $ // @(#)root/mathcore:$Id: LogLikelihoodFCN.h 28946 2009-06-11 15:39:14Z mon eta $
// Author: L. Moneta Fri Aug 17 14:29:24 2007 // Author: L. Moneta Fri Aug 17 14:29:24 2007
/********************************************************************** /**********************************************************************
* * * *
* Copyright (c) 2007 LCG ROOT Math Team, CERN/PH-SFT * * Copyright (c) 2007 LCG ROOT Math Team, CERN/PH-SFT *
* * * *
* * * *
**********************************************************************/ **********************************************************************/
// Header file for class LogLikelihoodFCN // Header file for class LogLikelihoodFCN
skipping to change at line 95 skipping to change at line 95
/** /**
Dummy Assignment operator (private) Dummy Assignment operator (private)
*/ */
LogLikelihoodFCN & operator = (const LogLikelihoodFCN & rhs) { LogLikelihoodFCN & operator = (const LogLikelihoodFCN & rhs) {
return *this; return *this;
} }
public: public:
/// clone the function (need to return Base for Windows) /// clone the function (need to return Base for Windows)
BaseFunction * Clone() const { return new LogLikelihoodFCN(fData,fFunc) ; } virtual BaseFunction * Clone() const { return new LogLikelihoodFCN(fDat a,fFunc); }
//using BaseObjFunction::operator(); //using BaseObjFunction::operator();
// effective points used in the fit // effective points used in the fit
unsigned int NFitPoints() const { return fNEffPoints; } virtual unsigned int NFitPoints() const { return fNEffPoints; }
/// i-th likelihood contribution and its gradient /// i-th likelihood contribution and its gradient
double DataElement(const double * x, unsigned int i, double * g) const { virtual double DataElement(const double * x, unsigned int i, double * g) const {
return FitUtil::EvaluatePdf(fFunc, fData, x, i, g); return FitUtil::EvaluatePdf(fFunc, fData, x, i, g);
} }
// need to be virtual to be instantited // need to be virtual to be instantited
virtual void Gradient(const double *x, double *g) const { virtual void Gradient(const double *x, double *g) const {
// evaluate the chi2 gradient // evaluate the chi2 gradient
FitUtil::EvaluateLogLGradient(fFunc, fData, x, g, fNEffPoints); FitUtil::EvaluateLogLGradient(fFunc, fData, x, g, fNEffPoints);
} }
/// get type of fit method function /// get type of fit method function
skipping to change at line 129 skipping to change at line 129
/// access to const reference to the model function /// access to const reference to the model function
virtual const IModelFunction & ModelFunction() const { return fFunc; } virtual const IModelFunction & ModelFunction() const { return fFunc; }
protected: protected:
private: private:
/** /**
Evaluation of the function (required by interface) Evaluation of the function (required by interface)
*/ */
double DoEval (const double * x) const { virtual double DoEval (const double * x) const {
this->UpdateNCalls(); this->UpdateNCalls();
#ifdef ROOT_FIT_PARALLEL #ifdef ROOT_FIT_PARALLEL
return FitUtilParallel::EvaluateLogL(fFunc, fData, x, fNEffPoints); return FitUtilParallel::EvaluateLogL(fFunc, fData, x, fNEffPoints);
#else #else
return FitUtil::EvaluateLogL(fFunc, fData, x, fNEffPoints); return FitUtil::EvaluateLogL(fFunc, fData, x, fNEffPoints);
#endif #endif
} }
// for derivatives // for derivatives
 End of changes. 5 change blocks. 
5 lines changed or deleted 5 lines changed or added


 MatrixFunctions.h   MatrixFunctions.h 
// @(#)root/smatrix:$Id: MatrixFunctions.h 22920 2008-04-01 10:01:06Z monet a $ // @(#)root/smatrix:$Id: MatrixFunctions.h 28954 2009-06-12 09:36:34Z monet a $
// Authors: T. Glebe, L. Moneta 2005 // Authors: T. Glebe, L. Moneta 2005
#ifndef ROOT_Math_MatrixFunctions #ifndef ROOT_Math_MatrixFunctions
#define ROOT_Math_MatrixFunctions #define ROOT_Math_MatrixFunctions
// ******************************************************************** // ********************************************************************
// //
// source: // source:
// //
// type: source code // type: source code
// //
skipping to change at line 929 skipping to change at line 929
SMatrix<T,D1,D2> tmp; SMatrix<T,D1,D2> tmp;
for (unsigned int i=0; i< D1; ++i) for (unsigned int i=0; i< D1; ++i)
for (unsigned int j=0; j< D2; ++j) for (unsigned int j=0; j< D2; ++j)
tmp(i,j) = lhs.apply(i) * rhs.apply(j); tmp(i,j) = lhs.apply(i) * rhs.apply(j);
return tmp; return tmp;
} }
#endif #endif
// solving a positive defined symmetric linear system using Choleski decomp
ositions
// matrix will be decomposed and the returned vector will be overwritten in
vec
// If the user wants to pass const objects need to copy the matrices
// It will work only for symmetric matrices
template <class T, unsigned int D>
bool SolveChol( SMatrix<T, D, D, MatRepSym<T, D> > & mat, SVector<T, D> &
vec ) {
CholeskyDecomp<T, D> decomp(mat);
return decomp.Solve(vec);
}
/// same function as before but not overwriting the matrix and returning a
copy of the vector
/// (this is the slow version)
template <class T, unsigned int D>
SVector<T,D> SolveChol( const SMatrix<T, D, D, MatRepSym<T, D> > & mat, c
onst SVector<T, D> & vec, int & ifail ) {
SMatrix<T, D, D, MatRepSym<T, D> > atmp(mat);
SVector<T,D> vret(vec);
bool ok = SolveChol( atmp, vret);
ifail = (ok) ? 0 : -1;
return vret;
}
} // namespace Math } // namespace Math
} // namespace ROOT } // namespace ROOT
#endif /* ROOT_Math_MatrixFunctions */ #endif /* ROOT_Math_MatrixFunctions */
 End of changes. 2 change blocks. 
1 lines changed or deleted 27 lines changed or added


 MessageTypes.h   MessageTypes.h 
/* @(#)root/base:$Id: MessageTypes.h 25874 2008-10-18 09:13:59Z rdm $ */ /* @(#)root/base:$Id: MessageTypes.h 28362 2009-04-27 14:20:39Z rdm $ */
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
#ifndef ROOT_MessageTypes #ifndef ROOT_MessageTypes
skipping to change at line 95 skipping to change at line 95
kPROOF_LIB_INC_PATH = 1045, //a list of lib/inc paths follows kPROOF_LIB_INC_PATH = 1045, //a list of lib/inc paths follows
kPROOF_WORKERLISTS = 1046, //an action on any of the worker l ist follows kPROOF_WORKERLISTS = 1046, //an action on any of the worker l ist follows
kPROOF_DATASET_STATUS = 1047, //status of data set preparation b efore processing kPROOF_DATASET_STATUS = 1047, //status of data set preparation b efore processing
kPROOF_OUTPUTOBJECT = 1048, //output object follows kPROOF_OUTPUTOBJECT = 1048, //output object follows
kPROOF_SETENV = 1049, //buffer with env vars to set kPROOF_SETENV = 1049, //buffer with env vars to set
kPROOF_REALTIMELOG = 1050, //switch on/off real-time retrieva l of log messages kPROOF_REALTIMELOG = 1050, //switch on/off real-time retrieva l of log messages
kPROOF_VERSARCHCOMP = 1051, //String with worker version/archi tecture/compiler follows kPROOF_VERSARCHCOMP = 1051, //String with worker version/archi tecture/compiler follows
kPROOF_ENDINIT = 1052, //signals end of initialization on worker kPROOF_ENDINIT = 1052, //signals end of initialization on worker
kPROOF_TOUCH = 1053, //touch the client admin file kPROOF_TOUCH = 1053, //touch the client admin file
kPROOF_FORK = 1054, //ask the worker to clone itself kPROOF_FORK = 1054, //ask the worker to clone itself
kPROOF_GOASYNC = 1055, //Switch to asynchronous mode
//---- ROOTD message opcodes (2000 - 2099) //---- ROOTD message opcodes (2000 - 2099)
kROOTD_USER = 2000, //user id follows kROOTD_USER = 2000, //user id follows
kROOTD_PASS = 2001, //passwd follows kROOTD_PASS = 2001, //passwd follows
kROOTD_AUTH = 2002, //authorization status (to client) kROOTD_AUTH = 2002, //authorization status (to client)
kROOTD_FSTAT = 2003, //filename follows kROOTD_FSTAT = 2003, //filename follows
kROOTD_OPEN = 2004, //filename follows + mode kROOTD_OPEN = 2004, //filename follows + mode
kROOTD_PUT = 2005, //offset, number of bytes and buff er kROOTD_PUT = 2005, //offset, number of bytes and buff er
kROOTD_GET = 2006, //offset, number of bytes kROOTD_GET = 2006, //offset, number of bytes
kROOTD_FLUSH = 2007, //flush file kROOTD_FLUSH = 2007, //flush file
 End of changes. 2 change blocks. 
1 lines changed or deleted 2 lines changed or added


 MethodANNBase.h   MethodANNBase.h 
// @(#)root/tmva $Id: MethodANNBase.h 21630 2008-01-10 19:40:44Z brun $ // @(#)root/tmva $Id: MethodANNBase.h 29122 2009-06-22 06:51:30Z brun $
// Author: Andreas Hoecker, Matt Jachowski // Author: Andreas Hoecker, Matt Jachowski
/************************************************************************** ******** /************************************************************************** ********
* Project: TMVA - a Root-integrated toolkit for multivariate data analysis * * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
* Package: TMVA * * Package: TMVA *
* Class : MethodANNBase * * Class : MethodANNBase *
* Web : http://tmva.sourceforge.net * * Web : http://tmva.sourceforge.net *
* * * *
* Description: * * Description: *
* Artificial neural network base class for the discrimination of sign al * * Artificial neural network base class for the discrimination of sign al *
* from background. * * from background. *
* * * *
* Authors (alphabetical): * * Authors (alphabetical): *
* Andreas Hoecker <Andreas.Hocker@cern.ch> - CERN, Switzerland * * Andreas Hoecker <Andreas.Hocker@cern.ch> - CERN, Switzerland *
* Matt Jachowski <jachowski@stanford.edu> - Stanford University, US A * * Matt Jachowski <jachowski@stanford.edu> - Stanford University, US A *
* Joerg Stelzer <Joerg.Stelzer@cern.ch> - CERN, Switzerland * * Joerg Stelzer <Joerg.Stelzer@cern.ch> - CERN, Switzerland *
* * * *
* Small changes (regression):
*
* Krzysztof Danielowski <danielow@cern.ch> - IFJ PAN & AGH, Poland
*
* Kamil Kraszewski <kalq@cern.ch> - IFJ PAN & UJ , Poland
*
* Maciej Kruk <mkruk@cern.ch> - IFJ PAN & AGH, Poland
*
*
*
* Copyright (c) 2005: * * Copyright (c) 2005: *
* CERN, Switzerland * * CERN, Switzerland *
* * * *
* Redistribution and use in source and binary forms, with or without * * Redistribution and use in source and binary forms, with or without *
* modification, are permitted according to the terms listed in LICENSE * * modification, are permitted according to the terms listed in LICENSE *
* (http://tmva.sourceforge.net/LICENSE) * * (http://tmva.sourceforge.net/LICENSE) *
************************************************************************** ********/ ************************************************************************** ********/
#ifndef ROOT_TMVA_MethodANNBase #ifndef ROOT_TMVA_MethodANNBase
#define ROOT_TMVA_MethodANNBase #define ROOT_TMVA_MethodANNBase
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// // // //
// MethodANNBase // // MethodANNBase //
// // // //
// Base class for all TMVA methods using artificial neural networks // // Base class for all TMVA methods using artificial neural networks //
// // // //
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
#ifndef ROOT_TString
#include "TString.h" #include "TString.h"
#endif
#include <vector> #include <vector>
#ifndef ROOT_TTree
#include "TTree.h" #include "TTree.h"
#endif
#ifndef ROOT_TObjArray
#include "TObjArray.h" #include "TObjArray.h"
#endif
#ifndef ROOT_TRandom3
#include "TRandom3.h" #include "TRandom3.h"
#endif
#ifndef ROOT_TMVA_MethodBase #ifndef ROOT_TMVA_MethodBase
#include "TMVA/MethodBase.h" #include "TMVA/MethodBase.h"
#endif #endif
#ifndef ROOT_TMVA_TActivation #ifndef ROOT_TMVA_TActivation
#include "TMVA/TActivation.h" #include "TMVA/TActivation.h"
#endif #endif
#ifndef ROOT_TMVA_TNeuron #ifndef ROOT_TMVA_TNeuron
#include "TMVA/TNeuron.h" #include "TMVA/TNeuron.h"
#endif #endif
skipping to change at line 64 skipping to change at line 77
#include "TMVA/TNeuronInput.h" #include "TMVA/TNeuronInput.h"
#endif #endif
namespace TMVA { namespace TMVA {
class MethodANNBase : public MethodBase { class MethodANNBase : public MethodBase {
public: public:
// constructors dictated by subclassing off of MethodBase // constructors dictated by subclassing off of MethodBase
MethodANNBase( const TString& jobName, const TString& methodTitle, Da MethodANNBase( const TString& jobName,
taSet& theData, Types::EMVA methodType,
const TString& theOption, TDirectory* theTargetDir ); const TString& methodTitle,
DataSetInfo& theData,
const TString& theOption,
TDirectory* theTargetDir );
MethodANNBase( DataSet& theData, const TString& theWeightFile, MethodANNBase( Types::EMVA methodType,
DataSetInfo& theData,
const TString& theWeightFile,
TDirectory* theTargetDir ); TDirectory* theTargetDir );
virtual ~MethodANNBase(); virtual ~MethodANNBase();
// this does the real initialization work // this does the real initialization work
void InitANNBase(); void InitANNBase();
// setters for subclasses // setters for subclasses
void SetActivation(TActivation* activation) { void SetActivation(TActivation* activation) {
if (fActivation != NULL) delete fActivation; fActivation = activat ion; if (fActivation != NULL) delete fActivation; fActivation = activat ion;
} }
void SetNeuronInputCalculator(TNeuronInput* inputCalculator) { void SetNeuronInputCalculator(TNeuronInput* inputCalculator) {
if (fInputCalculator != NULL) delete fInputCalculator; if (fInputCalculator != NULL) delete fInputCalculator;
fInputCalculator = inputCalculator; fInputCalculator = inputCalculator;
} }
// this will have to be overridden by every subclass // this will have to be overridden by every subclass
virtual void Train() = 0; virtual void Train() = 0;
// print network, for debugging // print network, for debugging
virtual void PrintNetwork(); virtual void PrintNetwork() const;
using MethodBase::WriteWeightsToStream; using MethodBase::WriteWeightsToStream;
using MethodBase::ReadWeightsFromStream; using MethodBase::ReadWeightsFromStream;
// write weights to file // write weights to file
virtual void WriteWeightsToStream( ostream& o ) const; virtual void WriteWeightsToStream( ostream& o ) const;
void AddWeightsXMLTo( void* parent ) const;
void ReadWeightsFromXML( void* wghtnode );
// read weights from file // read weights from file
virtual void ReadWeightsFromStream( istream& istr ); virtual void ReadWeightsFromStream( istream& istr );
// calculate the MVA value // calculate the MVA value
virtual Double_t GetMvaValue(); virtual Double_t GetMvaValue( Double_t* err = 0 );
virtual const std::vector<Float_t> &GetRegressionValues();
// write method specific histos to target file // write method specific histos to target file
virtual void WriteMonitoringHistosToFile() const; virtual void WriteMonitoringHistosToFile() const;
// ranking of input variables // ranking of input variables
const Ranking* CreateRanking(); const Ranking* CreateRanking();
// the option handling methods // the option handling methods
virtual void DeclareOptions(); virtual void DeclareOptions();
virtual void ProcessOptions(); virtual void ProcessOptions();
Bool_t Debug() const { return fgDEBUG; } Bool_t Debug() const { return fgDEBUG; }
protected: protected:
virtual void MakeClassSpecific( std::ostream&, const TString& ) const ; virtual void MakeClassSpecific( std::ostream&, const TString& ) const ;
vector<Int_t>* ParseLayoutString(TString layerSpec); std::vector<Int_t>* ParseLayoutString( TString layerSpec );
virtual void BuildNetwork(vector<Int_t>* layout, vector<Double_t>* we virtual void BuildNetwork( std::vector<Int_t>* layout, std::ve
ights=NULL); ctor<Double_t>* weights=NULL,
void ForceNetworkInputs(Int_t ignoreIndex=-1); Bool_t fromFile = kFALSE );
void ForceNetworkInputs( const Event* ev, Int_t ignoreIndex = -1
);
Double_t GetNetworkOutput() { return GetOutputNeuron()->GetActivation Value(); } Double_t GetNetworkOutput() { return GetOutputNeuron()->GetActivation Value(); }
// debugging utilities // debugging utilities
void PrintMessage(TString message, Bool_t force=kFALSE) const; void PrintMessage( TString message, Bool_t force = kFALSE ) const
void ForceNetworkCalculations(); ;
void WaitForKeyboard(); void ForceNetworkCalculations();
void WaitForKeyboard();
// accessors // accessors
Int_t NumCycles() { return fNcycles; } Int_t NumCycles() { return fNcycles; }
TNeuron* GetInputNeuron(Int_t index) { return (TNeuron*)fInputLayer-> TNeuron* GetInputNeuron(Int_t index) { return (TNeuron*)fInputL
At(index); } ayer->At(index); }
TNeuron* GetOutputNeuron() { return fOutputNeuron; } TNeuron* GetOutputNeuron( Int_t index = 0) { return fOutputNeurons.at
(index); }
// protected variables // protected variables
TObjArray* fNetwork; // TObjArray of TObjArrays representing n etwork TObjArray* fNetwork; // TObjArray of TObjArrays representing n etwork
TObjArray* fSynapses; // array of pointers to synapses, no stru ctural data TObjArray* fSynapses; // array of pointers to synapses, no stru ctural data
TActivation* fActivation; // activation function to be used for hid den layers TActivation* fActivation; // activation function to be used for hid den layers
TActivation* fIdentity; // activation for input and output layers TActivation* fIdentity; // activation for input and output layers
TRandom3* frgen; // random number generator for various us es TRandom3* frgen; // random number generator for various us es
TNeuronInput* fInputCalculator; // input calculator for all neurons TNeuronInput* fInputCalculator; // input calculator for all neurons
// monitoring histograms // monitoring histograms
TH1F* fEstimatorHistTrain; // monitors convergence of training sample TH1F* fEstimatorHistTrain; // monitors convergence of training sample
TH1F* fEstimatorHistTest; // monitors convergence of independent tes t sample TH1F* fEstimatorHistTest; // monitors convergence of independent tes t sample
// the neuronal network can be initialized after the analysis type ha
s been set.
void SetAnalysisType( Types::EAnalysisType type );
private: private:
// helper functions for building network // helper functions for building network
void BuildLayers(std::vector<Int_t>* layout); void BuildLayers(std::vector<Int_t>* layout, Bool_t from_file = false );
void BuildLayer(Int_t numNeurons, TObjArray* curLayer, TObjArray* pre vLayer, void BuildLayer(Int_t numNeurons, TObjArray* curLayer, TObjArray* pre vLayer,
Int_t layerIndex, Int_t numLayers); Int_t layerIndex, Int_t numLayers, Bool_t from_file = false);
void AddPreLinks(TNeuron* neuron, TObjArray* prevLayer); void AddPreLinks(TNeuron* neuron, TObjArray* prevLayer);
// helper functions for weight initialization // helper functions for weight initialization
void InitWeights(); void InitWeights();
void ForceWeights(std::vector<Double_t>* weights); void ForceWeights(std::vector<Double_t>* weights);
// helper functions for deleting network // helper functions for deleting network
void DeleteNetwork(); void DeleteNetwork();
void DeleteNetworkLayer(TObjArray*& layer); void DeleteNetworkLayer(TObjArray*& layer);
// debugging utilities // debugging utilities
void PrintLayer(TObjArray* layer); void PrintLayer(TObjArray* layer) const;
void PrintNeuron(TNeuron* neuron); void PrintNeuron(TNeuron* neuron) const;
// private variables // private variables
Int_t fNcycles; // number of epochs to train Int_t fNcycles; // number of epochs to train
TString fNeuronType; // name of neuron activation function cl ass TString fNeuronType; // name of neuron activation function cl ass
TString fNeuronInputType; // name of neuron input calculator class TString fNeuronInputType; // name of neuron input calculator class
TObjArray* fInputLayer; // cache this for fast access TObjArray* fInputLayer; // cache this for fast access
TNeuron* fOutputNeuron; // cache this for fast access std::vector<TNeuron*> fOutputNeurons; // cache this for fast acc ess
TString fLayerSpec; // layout specification option TString fLayerSpec; // layout specification option
// some static flags // some static flags
static const Bool_t fgDEBUG = kTRUE; // debug flag static const Bool_t fgDEBUG = kTRUE; // debug flag
static const Bool_t fgFIXED_SEED = kTRUE; // fix rand generator seed static const Bool_t fgFIXED_SEED = kFALSE; // fix rand generator see d
ClassDef(MethodANNBase,0) // Base class for TMVA ANNs ClassDef(MethodANNBase,0) // Base class for TMVA ANNs
}; };
} // namespace TMVA } // namespace TMVA
#endif #endif
 End of changes. 22 change blocks. 
23 lines changed or deleted 58 lines changed or added


 MethodBDT.h   MethodBDT.h 
// @(#)root/tmva $Id: MethodBDT.h 27912 2009-03-22 09:59:04Z pcanal $ // @(#)root/tmva $Id: MethodBDT.h 29226 2009-06-25 15:18:50Z brun $
// Author: Andreas Hoecker, Joerg Stelzer, Helge Voss, Kai Voss // Author: Andreas Hoecker, Joerg Stelzer, Helge Voss, Kai Voss
/************************************************************************** ******** /************************************************************************** ********
* Project: TMVA - a Root-integrated toolkit for multivariate data analysis * * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
* Package: TMVA * * Package: TMVA *
* Class : MethodBDT (Boosted Decision Trees) * * Class : MethodBDT (Boosted Decision Trees) *
* Web : http://tmva.sourceforge.net * * Web : http://tmva.sourceforge.net *
* * * *
* Description: * * Description: *
* Analysis of Boosted Decision Trees * * Analysis of Boosted Decision Trees *
* * * *
* Authors (alphabetical): * * Authors (alphabetical): *
* Andreas Hoecker <Andreas.Hocker@cern.ch> - CERN, Switzerland * * Andreas Hoecker <Andreas.Hocker@cern.ch> - CERN, Switzerland *
* Xavier Prudent <prudent@lapp.in2p3.fr> - LAPP, France *
* Helge Voss <Helge.Voss@cern.ch> - MPI-K Heidelberg, German y * * Helge Voss <Helge.Voss@cern.ch> - MPI-K Heidelberg, German y *
* Kai Voss <Kai.Voss@cern.ch> - U. of Victoria, Canada * * Kai Voss <Kai.Voss@cern.ch> - U. of Victoria, Canada *
* Doug Schouten <dschoute@sfu.ca> - Simon Fraser U., Canada *
* * * *
* Copyright (c) 2005: * * Copyright (c) 2005: *
* CERN, Switzerland * * CERN, Switzerland *
* U. of Victoria, Canada * * U. of Victoria, Canada *
* MPI-K Heidelberg, Germany * * MPI-K Heidelberg, Germany *
* LAPP, Annecy, France *
* * * *
* Redistribution and use in source and binary forms, with or without * * Redistribution and use in source and binary forms, with or without *
* modification, are permitted according to the terms listed in LICENSE * * modification, are permitted according to the terms listed in LICENSE *
* (http://tmva.sourceforge.net/LICENSE) * * (http://tmva.sourceforge.net/LICENSE) *
************************************************************************** ********/ ************************************************************************** ********/
#ifndef ROOT_TMVA_MethodBDT #ifndef ROOT_TMVA_MethodBDT
#define ROOT_TMVA_MethodBDT #define ROOT_TMVA_MethodBDT
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// // // //
// MethodBDT // // MethodBDT //
// // // //
// Analysis of Boosted Decision Trees // // Analysis of Boosted Decision Trees //
// // // //
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
#include <vector> #include <vector>
#ifndef ROOT_TH2
#include "TH2.h" #include "TH2.h"
#endif
#ifndef ROOT_TTree
#include "TTree.h" #include "TTree.h"
#endif
#ifndef ROOT_TMVA_MethodBase #ifndef ROOT_TMVA_MethodBase
#include "TMVA/MethodBase.h" #include "TMVA/MethodBase.h"
#endif #endif
#ifndef ROOT_TMVA_DecisionTree #ifndef ROOT_TMVA_DecisionTree
#include "TMVA/DecisionTree.h" #include "TMVA/DecisionTree.h"
#endif #endif
#ifndef ROOT_TMVA_Event #ifndef ROOT_TMVA_Event
#include "TMVA/Event.h" #include "TMVA/Event.h"
#endif #endif
namespace TMVA { namespace TMVA {
class SeparationBase; class SeparationBase;
class MethodBDT : public MethodBase { class MethodBDT : public MethodBase {
public: public:
// MethodBDT (Boosted Decision Trees) options:
// format and syntax of option string: "nTrees:BoostType:SeparationTy
pe:
// nEventsMin:dummy:
// nCuts:SignalFraction"
// nTrees: number of trees in the forest to be created
// BoostType: the boosting type for the trees in the forest (Ad
aBoost e.t.c..)
// SeparationType the separation criterion applied in the node spli
tting
// nEventsMin: the minimum number of events in a node (leaf crit
eria, stop splitting)
// nCuts: the number of steps in the optimisation of the cut for a n
ode
// SignalFraction: scale parameter of the number of Bkg events
// applied to the training sample to simulate differ
ent initial purity
// of your data sample.
// UseYesNoLeaf decide if the classification is done simply by th
e node type, or the S/B
// (from the training) in the leaf node
// UseWeightedTrees use average classification from the trees, or hav
e the individual trees
// trees in the forest weighted (e.g. log(boostweigh
t) from AdaBoost
//
// known SeparationTypes are:
// - MisClassificationError
// - GiniIndex
// - CrossEntropy
// known BoostTypes are:
// - AdaBoost
// - Bagging
// constructor for training and reading // constructor for training and reading
MethodBDT( const TString& jobName, MethodBDT( const TString& jobName,
const TString& methodTitle, const TString& methodTitle,
DataSet& theData, DataSetInfo& theData,
const TString& theOption = "", const TString& theOption = "",
TDirectory* theTargetDir = 0 ); TDirectory* theTargetDir = 0 );
// constructor for calculating BDT-MVA using previously generatad dec ision trees // constructor for calculating BDT-MVA using previously generatad dec ision trees
MethodBDT( DataSet& theData, MethodBDT( DataSetInfo& theData,
const TString& theWeightFile, const TString& theWeightFile,
TDirectory* theTargetDir = NULL ); TDirectory* theTargetDir = NULL );
virtual ~MethodBDT( void ); virtual ~MethodBDT( void );
virtual Bool_t HasAnalysisType( Types::EAnalysisType type, UInt_t num
berClasses, UInt_t numberTargets );
// write all Events from the Tree into a vector of Events, that are // write all Events from the Tree into a vector of Events, that are
// more easily manipulated // more easily manipulated
void InitEventSample(); void InitEventSample();
// training method // training method
void Train( void ); void Train( void );
using MethodBase::WriteWeightsToStream; using MethodBase::WriteWeightsToStream;
using MethodBase::ReadWeightsFromStream; using MethodBase::ReadWeightsFromStream;
// write weights to file // write weights to file
void WriteWeightsToStream( ostream& o ) const; void WriteWeightsToStream( ostream& o ) const;
void AddWeightsXMLTo( void* parent ) const;
// read weights from file // read weights from file
void ReadWeightsFromStream( istream& istr ); void ReadWeightsFromStream( istream& istr );
void ReadWeightsFromXML(void* parent);
// write method specific histos to target file // write method specific histos to target file
void WriteMonitoringHistosToFile( void ) const; void WriteMonitoringHistosToFile( void ) const;
// calculate the MVA value // calculate the MVA value
Double_t GetMvaValue(); Double_t GetMvaValue( Double_t* err = 0);
Double_t GetMvaValue( Double_t* err , UInt_t useNTrees );
// regression response
const std::vector<Float_t>& GetRegressionValues();
// apply the boost algorithm to a tree in the collection // apply the boost algorithm to a tree in the collection
Double_t Boost( std::vector<Event*>, DecisionTree *dt, Int_t iTree ); Double_t Boost( std::vector<Event*>, DecisionTree *dt, Int_t iTree );
// ranking of input variables // ranking of input variables
const Ranking* CreateRanking(); const Ranking* CreateRanking();
// the option handling methods // the option handling methods
void DeclareOptions(); void DeclareOptions();
void ProcessOptions(); void ProcessOptions();
// get the forest // get the forest
inline const std::vector<TMVA::DecisionTree*> & GetForest() const; inline const std::vector<TMVA::DecisionTree*> & GetForest() const;
// get the forest // get the forest
inline const std::vector<Event*> & GetTrainingEvents() const; inline const std::vector<Event*> & GetTrainingEvents() const;
inline const std::vector<double> & GetBoostWeights() const; inline const std::vector<double> & GetBoostWeights() const;
//return the individual relative variable importance //return the individual relative variable importance
std::vector<Double_t> GetVariableImportance(); std::vector<Double_t> GetVariableImportance();
Double_t GetVariableImportance(UInt_t ivar); Double_t GetVariableImportance(UInt_t ivar);
Double_t PruneTree( DecisionTree *dt, Int_t itree); Double_t TestTreeQuality( DecisionTree *dt );
Double_t TestTreeQuality( DecisionTree *dt );
// make ROOT-independent C++ class for classifier response (classifier // make ROOT-independent C++ class for classifier response (classifie
-specific implementation) r-specific implementation)
void MakeClassSpecific( std::ostream&, const TString& ) const; void MakeClassSpecific( std::ostream&, const TString& ) const;
// header and auxiliary classes // header and auxiliary classes
void MakeClassSpecificHeader( std::ostream&, const TString& ) const; void MakeClassSpecificHeader( std::ostream&, const TString& ) const;
void MakeClassInstantiateNode( DecisionTreeNode *n, std::ostream& fout void MakeClassInstantiateNode( DecisionTreeNode *n, std::ostream& fou
, t,
const TString& className ) const; const TString& className ) const;
void GetHelpMessage() const; void GetHelpMessage() const;
private: private:
// Init used in the various constructors
void Init( void );
// boosting algorithm (adaptive boosting) // boosting algorithm (adaptive boosting)
Double_t AdaBoost( std::vector<Event*>, DecisionTree *dt ); Double_t AdaBoost( std::vector<Event*>, DecisionTree *dt );
// boosting as a random re-weighting // boosting as a random re-weighting
Double_t Bagging( std::vector<Event*>, Int_t iTree ); Double_t Bagging( std::vector<Event*>, Int_t iTree );
// boosting special for regression
Double_t RegBoost( std::vector<Event*>, DecisionTree *dt );
// adaboost adapted to regression
Double_t AdaBoostR2( std::vector<Event*>, DecisionTree *dt );
// binomial likelihood gradient boost for classification
// (see Friedman: "Greedy Function Approximation: a Gradient Boosting
Machine"
// Technical report, Dept. of Statistics, Stanford University)
Double_t GradBoost( std::vector<Event*>, DecisionTree *dt );
void InitGradBoost( std::vector<Event*>);
void UpdateTargets( std::vector<Event*>);
Double_t GetGradBoostMVA(TMVA::Event& e, UInt_t nTrees);
void GetRandomSubSample();
std::vector<Event*> fEventSample; // the training eve nts std::vector<Event*> fEventSample; // the training eve nts
std::vector<Event*> fValidationSample;// the Validation e vents std::vector<Event*> fValidationSample;// the Validation e vents
std::vector<Event*> fSubSample; // subsample for ba gged grad boost
Int_t fNTrees; // number of decisi on trees requested Int_t fNTrees; // number of decisi on trees requested
std::vector<DecisionTree*> fForest; // the collection o f decision trees std::vector<DecisionTree*> fForest; // the collection o f decision trees
std::vector<double> fBoostWeights; // the weights appl ied in the individual boosts std::vector<double> fBoostWeights; // the weights appl ied in the individual boosts
TString fBoostType; // string specifyin g the boost type TString fBoostType; // string specifyin g the boost type
Double_t fAdaBoostBeta; // beta parameter f or AdaBoost algorithm Double_t fAdaBoostBeta; // beta parameter f or AdaBoost algorithm
TString fAdaBoostR2Loss; // loss type used i
n AdaBoostR2 (Linear,Quadratic or Exponential)
Double_t fShrinkage; // learning rate fo
r gradient boost;
Bool_t fBaggedGradBoost; // turn bagging in
combination with grad boost on/off
Double_t fSampleFraction; // fraction of even
ts used for bagged grad boost
//options for the decision Tree //options for the decision Tree
SeparationBase *fSepType; // the separation u sed in node splitting SeparationBase *fSepType; // the separation u sed in node splitting
TString fSepTypeS; // the separation ( option string) used in node splitting TString fSepTypeS; // the separation ( option string) used in node splitting
Int_t fNodeMinEvents; // min number of ev ents in node Int_t fNodeMinEvents; // min number of ev ents in node
Int_t fNCuts; // grid used in cut applied in node splitting Int_t fNCuts; // grid used in cut applied in node splitting
Bool_t fUseYesNoLeaf; // use sig or bkg c lassification in leave nodes or sig/bkg Bool_t fUseYesNoLeaf; // use sig or bkg c lassification in leave nodes or sig/bkg
Double_t fNodePurityLimit; // purity limit for sig/bkg nodes Double_t fNodePurityLimit; // purity limit for sig/bkg nodes
Bool_t fUseWeightedTrees;// use average clas sification from the trees, or have the individual trees trees in the forest weighted (e.g. log(boostweight) from AdaBoost Bool_t fUseWeightedTrees;// use average clas sification from the trees, or have the individual trees trees in the forest weighted (e.g. log(boostweight) from AdaBoost
UInt_t fNNodesMax; // max # of nodes
// Init used in the various constructors UInt_t fMaxDepth; // max depth
void InitBDT( void );
//some histograms for monitoring //some histograms for monitoring
TH1F* fBoostWeightHist; // weights applied
in boosting
TH1F* fBoostWeightVsTree;// weights applie
d in boosting vs tree number
TH1F* fErrFractHist; // error fraction
vs tree number
TH1I* fNodesBeforePruningVsTree; // nNode
sBeforePruning vs tree number
TH1I* fNodesAfterPruningVsTree; // nNode
sAfterPruning vs tree number
TTree* fMonitorNtuple; // monitoring ntup le TTree* fMonitorNtuple; // monitoring ntup le
Int_t fITree; // ntuple var: ith tree Int_t fITree; // ntuple var: ith tree
Double_t fBoostWeight; // ntuple var: boo st weight Double_t fBoostWeight; // ntuple var: boo st weight
Double_t fErrorFraction; // ntuple var: mis classification error fraction Double_t fErrorFraction; // ntuple var: mis classification error fraction
Double_t fPruneStrength; // a parameter to set the "amount" of pruning..needs to be adjusted Double_t fPruneStrength; // a parameter to set the "amount" of pruning..needs to be adjusted
DecisionTree::EPruneMethod fPruneMethod; // method used for prunig DecisionTree::EPruneMethod fPruneMethod; // method used for prunig
TString fPruneMethodS; // prune method op tion String TString fPruneMethodS; // prune method op tion String
Bool_t fPruneBeforeBoost;// flag to prune b efore boosting Bool_t fPruneBeforeBoost;// flag to prune b efore boosting
Double_t fFValidationEvents; // fraction o f events to use for pruning
Bool_t fAutomatic; // use user given prune strength or automatically determined one using a validation sample Bool_t fAutomatic; // use user given prune strength or automatically determined one using a validation sample
Bool_t fNoNegWeightsInTraining; // ignore n egative event weights in the training
Bool_t fRandomisedTrees; // choose a random subset of possible cut variables at each node during training Bool_t fRandomisedTrees; // choose a random subset of possible cut variables at each node during training
Double_t fSampleSizeFraction; // relative siz UInt_t fUseNvars; // the number of v
e of bagged event sample to original sample size ariables used in the randomised tree splitting
Int_t fUseNvars; // the number of v UInt_t fUseNTrainEvents; // number of rando
ariables used in the randomised tree splitting mly picked training events used in randomised (and bagged) trees
std::vector<Double_t> fVariableImportance; // the relative importance of the different variables std::vector<Double_t> fVariableImportance; // the relative importance of the different variables
Double_t fDeltaPruneStrength; // step size in pruning, is adjusted according to experience of previous trees
// debugging flags // debugging flags
static const Int_t fgDebugLevel = 0; // debug level determining some printout/control plots etc. static const Int_t fgDebugLevel = 0; // debug level determining some printout/control plots etc.
ClassDef(MethodBDT,0) // Analysis of Boosted Decision Trees ClassDef(MethodBDT,0) // Analysis of Boosted Decision Trees
}; };
} // namespace TMVA } // namespace TMVA
const std::vector<TMVA::DecisionTree*>& TMVA::MethodBDT::GetForest() const { return fForest; } const std::vector<TMVA::DecisionTree*>& TMVA::MethodBDT::GetForest() const { return fForest; }
const std::vector<TMVA::Event*>& TMVA::MethodBDT::GetTrainingEvents( ) const { return fEventSample; } const std::vector<TMVA::Event*>& TMVA::MethodBDT::GetTrainingEvents( ) const { return fEventSample; }
const std::vector<double>& TMVA::MethodBDT::GetBoostWeights() const { return fBoostWeights; } const std::vector<double>& TMVA::MethodBDT::GetBoostWeights() const { return fBoostWeights; }
#endif #endif
 End of changes. 34 change blocks. 
76 lines changed or deleted 68 lines changed or added


 MethodBase.h   MethodBase.h 
// @(#)root/tmva $Id: MethodBase.h 23334 2008-04-19 18:38:57Z brun $ // @(#)root/tmva $Id: MethodBase.h 29122 2009-06-22 06:51:30Z brun $
// Author: Andreas Hoecker, Joerg Stelzer, Helge Voss, Kai Voss // Author: Andreas Hoecker, Joerg Stelzer, Helge Voss, Kai Voss
/************************************************************************** ******** /************************************************************************** ********
* Project: TMVA - a Root-integrated toolkit for multivariate data analysis * * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
* Package: TMVA * * Package: TMVA *
* Class : MethodBase * * Class : MethodBase *
* Web : http://tmva.sourceforge.net * * Web : http://tmva.sourceforge.net *
* * * *
* Description: * * Description: *
* Virtual base class for all MVA method * * Virtual base class for all MVA method *
* * * *
* Authors (alphabetical): * * Authors (alphabetical): *
* Andreas Hoecker <Andreas.Hocker@cern.ch> - CERN, Switzerland * * Andreas Hoecker <Andreas.Hocker@cern.ch> - CERN, Switzerland *
* Peter Speckmayer <peter.speckmayer@cern.ch> - CERN, Switzerland *
* Joerg Stelzer <Joerg.Stelzer@cern.ch> - CERN, Switzerland * * Joerg Stelzer <Joerg.Stelzer@cern.ch> - CERN, Switzerland *
* Helge Voss <Helge.Voss@cern.ch> - MPI-K Heidelberg, German y * * Helge Voss <Helge.Voss@cern.ch> - MPI-K Heidelberg, German y *
* Kai Voss <Kai.Voss@cern.ch> - U. of Victoria, Canada * * Kai Voss <Kai.Voss@cern.ch> - U. of Victoria, Canada *
* * * *
* Copyright (c) 2005: * * Copyright (c) 2005: *
* CERN, Switzerland * * CERN, Switzerland *
* U. of Victoria, Canada * * U. of Victoria, Canada *
* MPI-K Heidelberg, Germany * * MPI-K Heidelberg, Germany *
* LAPP, Annecy, France * * LAPP, Annecy, France *
* * * *
skipping to change at line 47 skipping to change at line 48
// Virtual base class for all TMVA method // // Virtual base class for all TMVA method //
// // // //
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
#include <iosfwd> #include <iosfwd>
#include <vector> #include <vector>
#ifndef ROOT_TMVA_IMethod #ifndef ROOT_TMVA_IMethod
#include "TMVA/IMethod.h" #include "TMVA/IMethod.h"
#endif #endif
#ifndef ROOT_TMVA_Tools
#include "TMVA/Tools.h"
#endif
#ifndef ROOT_TMVA_Configurable #ifndef ROOT_TMVA_Configurable
#include "TMVA/Configurable.h" #include "TMVA/Configurable.h"
#endif #endif
#ifndef ROOT_TMVA_Types #ifndef ROOT_TMVA_Types
#include "TMVA/Types.h" #include "TMVA/Types.h"
#endif #endif
#ifndef ROOT_TMVA_VariableTransformBase
#include "TMVA/VariableTransformBase.h"
#endif
#ifndef ROOT_TMVA_DataSet #ifndef ROOT_TMVA_DataSet
#include "TMVA/DataSet.h" #include "TMVA/DataSet.h"
#endif #endif
#ifndef ROOT_TMVA_Event
#include "TMVA/Event.h"
#endif
#ifndef ROOT_TMVA_TransformationHandler
#include "TMVA/TransformationHandler.h"
#endif
class TGraph; class TGraph;
class TTree; class TTree;
class TDirectory; class TDirectory;
class TSpline; class TSpline;
namespace TMVA { namespace TMVA {
class Ranking; class Ranking;
class MsgLogger;
class PDF; class PDF;
class TSpline1; class TSpline1;
class MethodCuts; class MethodCuts;
class MethodBoost;
class DataSetInfo;
class MethodBase : public IMethod, public Configurable { class MethodBase : virtual public IMethod, public Configurable {
public: public:
enum EWeightFileType { kROOT=0, kTEXT }; enum EWeightFileType { kROOT=0, kTEXT };
// default constructur // default constructur
MethodBase( const TString& jobName, MethodBase( const TString& jobName,
Types::EMVA methodType,
const TString& methodTitle, const TString& methodTitle,
DataSet& theData, DataSetInfo& dsi,
const TString& theOption = "", const TString& theOption = "",
TDirectory* theBaseDir = 0 ); TDirectory* theBaseDir = 0 );
// constructor used for Testing + Application of the MVA, only (no tr aining), // constructor used for Testing + Application of the MVA, only (no tr aining),
// using given weight file // using given weight file
MethodBase( DataSet& theData, MethodBase( Types::EMVA methodType,
DataSetInfo& dsi,
const TString& weightFile, const TString& weightFile,
TDirectory* theBaseDir = 0 ); TDirectory* theBaseDir = 0 );
// default destructur // default destructur
virtual ~MethodBase(); virtual ~MethodBase();
// declaration, processing and checking of configuration options
void SetupMethod();
void ProcessSetup();
virtual void CheckSetup(); // may be overwritten by derived class
es
// ---------- main training and testing methods --------------------- --------- // ---------- main training and testing methods --------------------- ---------
// prepare tree branch with the method's discriminating variable // prepare tree branch with the method's discriminating variable
virtual void AddClassifierToTestTree( TTree* theTestTree ); void AddOutput( Types::ETreeType type, Types::EAnalysisTy
pe analysisType ) {
if (analysisType == Types::kRegression) AddRegressionOutput( type
);
else { AddClassifierOutput( type ); if (HasMVAPdfs()) AddClassifie
rOutputProb( type ); }
}
// performs classifier training // performs classifier training
// calls methods Train() implemented by derived classes // calls methods Train() implemented by derived classes
void TrainMethod(); void TrainMethod();
virtual void Train() = 0; virtual void Train() = 0;
// store and retrieve time used for training
void SetTrainTime( Double_t trainTime ) { fTrainTime = tr
ainTime; }
Double_t GetTrainTime() const { return fTrainTime; }
// store and retrieve time used for testing
void SetTestTime ( Double_t testTime ) { fTestTime = test
Time; }
Double_t GetTestTime () const { return fTestTime; }
// performs classifier testing // performs classifier testing
virtual void Test( TTree* theTestTree = 0 ); virtual void TestClassification();
// classifier response // performs regression testing
virtual Double_t GetMvaValue() = 0; virtual void TestRegression( Double_t& bias, Double_t& biasT,
Double_t& dev, Double_t& devT,
Double_t& rms, Double_t& rmsT,
Double_t& mInf, Double_t& mInfT, //
mutual information
Double_t& corr,
Types::ETreeType type );
// classifier response - some methods may return a per-event error es
timate (unless: *err = -1)
virtual Double_t GetMvaValue( Double_t* err = 0 ) = 0;
// options treatment
virtual void Init() = 0;
virtual void DeclareOptions() = 0;
virtual void ProcessOptions() = 0;
// regression response
virtual const std::vector<Float_t>& GetRegressionValues() {
std::vector<Float_t>* ptr = new std::vector<Float_t>(0);
return (*ptr);
}
// probability of classifier response (mvaval) to be signal // probability of classifier response (mvaval) to be signal (requires "CreateMvaPdf" option set)
virtual Double_t GetProba( Double_t mvaVal, Double_t ap_sig ); virtual Double_t GetProba( Double_t mvaVal, Double_t ap_sig );
// Rarity of classifier response (signal or background (default) is u niform in [0,1]) // Rarity of classifier response (signal or background (default) is u niform in [0,1])
virtual Double_t GetRarity( Double_t mvaVal, Types::ESBType reftype = Types::kBackground ) const; virtual Double_t GetRarity( Double_t mvaVal, Types::ESBType reftype = Types::kBackground ) const;
// create ranking // create ranking
virtual const Ranking* CreateRanking() = 0; virtual const Ranking* CreateRanking() = 0;
// perfrom extra actions during the boosting at different stages
virtual Bool_t MonitorBoost(MethodBoost* /*booster*/) {return kFALS
E;};
// make ROOT-independent C++ class // make ROOT-independent C++ class
virtual void MakeClass( const TString& classFileName = "" ) const; virtual void MakeClass( const TString& classFileName = TString("" ) ) const;
// print help message // print help message
void PrintHelpMessage() const; void PrintHelpMessage() const;
// streamer methods for training information (creates "weight" files) -------- // streamer methods for training information (creates "weight" files) --------
void WriteStateToFile () const; // meta data characterising the method
void WriteStateToStream ( std::ostream& tf, Bool_t isClass = kFALSE ) void WriteStateToFile () const;
const; void WriteStateToStream ( std::ostream& tf, Bool_t isCl
void WriteStateToStream ( TFile& rf ) const; ass = kFALSE ) const; // obsolete
void ReadStateFromFile (); void WriteStateToStream ( TFile& rf ) const;
void ReadStateFromStream( std::istream& tf ); // obsolete
void ReadStateFromStream( TFile& rf ); void WriteStateToXML ( void* parent ) const;
virtual void WriteWeightsToStream ( std::ostream& tf ) const = 0; void ReadStateFromFile ();
virtual void WriteWeightsToStream ( TFile& /*rf*/ ) const {} void ReadStateFromStream ( std::istream& tf );
virtual void ReadWeightsFromStream( std::istream& tf ) = 0; // obsolete
virtual void ReadWeightsFromStream( TFile& /*rf*/ ) {} void ReadStateFromStream ( TFile& rf );
// obsolete
void ReadStateFromXML ( void* parent );
// the variable information
void WriteVarsToStream ( std::ostream& o, const TStrin
g& prefix = "" ) const; // obsolete
void AddVarsXMLTo ( void* parent ) const;
void AddTargetsXMLTo ( void* parent ) const;
void ReadVarsFromStream ( std::istream& istr );
// obsolete
void ReadVariablesFromXML ( void* varnode );
void ReadTargetsFromXML ( void* tarnode );
// the actual "weights"
virtual void WriteWeightsToStream ( std::ostream& ) const = 0;
// obsolete
virtual void WriteWeightsToStream ( TFile& ) const {}
// obsolete
virtual void AddWeightsXMLTo ( void* parent ) const = 0;
virtual void ReadWeightsFromStream( std::istream& ) = 0;
// obsolete
virtual void ReadWeightsFromStream( TFile& ) {}
// obsolete
virtual void ReadWeightsFromXML ( void* wghtnode ) = 0;
// ------------------------------------------------------------------ --------- // ------------------------------------------------------------------ ---------
// write evaluation histograms into target file // write evaluation histograms into target file
virtual void WriteEvaluationHistosToFile(); virtual void WriteEvaluationHistosToFile();
// write classifier-specific monitoring information to target file // write classifier-specific monitoring information to target file
virtual void WriteMonitoringHistosToFile() const; virtual void WriteMonitoringHistosToFile() const;
// ---------- public evaluation methods ----------------------------- --------- // ---------- public evaluation methods ----------------------------- ---------
// individual initialistion for testing of each method // individual initialistion for testing of each method
// overload this one for individual initialisation of the testing, // overload this one for individual initialisation of the testing,
// it is then called automatically within the global "TestInit" // it is then called automatically within the global "TestInit"
// variables (and private menber functions) for the Evaluation: // variables (and private menber functions) for the Evaluation:
// get the effiency. It fills a histogram for efficiency/vs/bkg // get the effiency. It fills a histogram for efficiency/vs/bkg
// and returns the one value fo the efficiency demanded for // and returns the one value fo the efficiency demanded for
// in the TString argument. (Watch the string format) // in the TString argument. (Watch the string format)
virtual Double_t GetEfficiency( TString, TTree*, Double_t& err ); virtual Double_t GetEfficiency( const TString&, Types::ETreeType, Dou
virtual Double_t GetTrainingEfficiency( TString ); ble_t& err );
virtual Double_t GetSignificance() const; virtual Double_t GetTrainingEfficiency(const TString& );
virtual Double_t GetMaximumSignificance( Double_t SignalEvents, Doub virtual Double_t GetSignificance() const;
le_t BackgroundEvents, virtual Double_t GetROCIntegral(PDF *pdfS=0, PDF *pdfB=0) const;
Double_t& optimal_significa virtual Double_t GetMaximumSignificance( Double_t SignalEvents, Doubl
nce_value ) const; e_t BackgroundEvents,
virtual Double_t GetSeparation( TH1*, TH1* ) const; Double_t& optimal_significan
virtual Double_t GetSeparation( PDF* pdfS = 0, PDF* pdfB = 0 ) const ce_value ) const;
; virtual Double_t GetSeparation( TH1*, TH1* ) const;
virtual Double_t GetSeparation( PDF* pdfS = 0, PDF* pdfB = 0 ) const;
// ---------- public accessors -------------------------------------- --------- // ---------- public accessors -------------------------------------- ---------
// classifier naming (a lot of names ... aren't they ;-) // classifier naming (a lot of names ... aren't they ;-)
const TString& GetJobName () const { return fJobName; } const TString& GetJobName () const { return fJobName; }
const TString& GetMethodName () const { return fMethodName; } const TString& GetMethodName () const { return fMethodName; }
const TString& GetMethodTitle() const { return fMethodTitle; } TString GetMethodTypeName() const { return Types::Instance()
Types::EMVA GetMethodType () const { return fMethodType; } .GetMethodName(fMethodType); }
const char* GetName () const { return GetMethodName().Data() Types::EMVA GetMethodType () const { return fMethodType; }
; } // same as methodname (overwrites for TObject) const char* GetName () const { return fMethodName.Data(
const TString& GetTestvarName() const { return fTestvar; } ); }
const TString GetProbaName () const { return fTestvar + "_Proba"; } const TString& GetTestvarName () const { return fTestvar; }
const TString GetProbaName () const { return fTestvar + "_Prob
void SetMethodName ( TString methodName ) { fMethodName = method a"; }
Name; } TString GetWeightFileName() const;
void SetMethodTitle( TString methodTitle ) { fMethodTitle = method
Title; } virtual Bool_t HasAnalysisType( Types::EAnalysisType type, UInt_t n
void SetMethodType ( Types::EMVA methodType ) { fMethodType = method umberClasses, UInt_t numberTargets ) = 0;
Type; }
// build classifier name in Test tree // build classifier name in Test tree
// MVA prefix (e.g., "TMVA_") // MVA prefix (e.g., "TMVA_")
void SetTestvarPrefix( TString prefix ) { fTestvarPrefix = prefix void SetTestvarPrefix( TString prefix ) { fTestvarP
; } refix = prefix; }
void SetTestvarName( const TString & v="" ) { fTestvar = (v=="")?(fTe void SetTestvarName ( const TString & v="" ) { fTestvar
stvarPrefix + GetMethodTitle()):v; } = (v=="") ? (fTestvarPrefix + GetMethodName()) : v; }
// number of input variable used by classifier // number of input variable used by classifier
Int_t GetNvar() const { return fNvar; } UInt_t GetNvar() const { return DataInfo().GetNVariab
les(); }
UInt_t GetNVariables() const { return DataInfo().GetNVariab
les(); }
UInt_t GetNTargets() const { return DataInfo().GetNTarget
s(); };
// internal names and expressions of input variables // internal names and expressions of input variables
const TString& GetInputVar( int i ) const { return Data().GetInternal const TString& GetInputVar ( Int_t i ) const { return DataInfo().G
VarName(i); } etVariableInfo(i).GetInternalName(); }
const TString& GetInputExp( int i ) const { return Data().GetExpressi const TString& GetInputLabel( Int_t i ) const { return DataInfo().G
on(i); } etVariableInfo(i).GetLabel(); }
const TString& GetInputTitle( Int_t i ) const { return DataInfo().G
etVariableInfo(i).GetTitle(); }
// normalisation and limit accessors // normalisation and limit accessors
Double_t GetRMS( Int_t ivar ) const { return GetVarTransform Double_t GetMean( Int_t ivar ) const { return GetTransformati
().Variable(ivar).GetRMS(); } onHandler().GetMean(ivar); }
Double_t GetXmin( Int_t ivar ) const { return GetVarTransform Double_t GetRMS ( Int_t ivar ) const { return GetTransformati
().Variable(ivar).GetMin(); } onHandler().GetRMS(ivar); }
Double_t GetXmax( Int_t ivar ) const { return GetVarTransform Double_t GetXmin( Int_t ivar ) const { return GetTransformati
().Variable(ivar).GetMax(); } onHandler().GetMin(ivar); }
Double_t GetXmax( Int_t ivar ) const { return GetTransformati
onHandler().GetMax(ivar); }
// sets the minimum requirement on the MVA output to declare an event signal-like // sets the minimum requirement on the MVA output to declare an event signal-like
Double_t GetSignalReferenceCut() const { return fSignalReferenceCut; } Double_t GetSignalReferenceCut() const { return fSignalRefere nceCut; }
// retrieve variable transformer // sets the minimum requirement on the MVA output to declare an event
VariableTransformBase& GetVarTransform() const { return *fVarTransfor signal-like
m; } void SetSignalReferenceCut( Double_t cut ) { fSignalRefer
enceCut = cut; }
// pointers to ROOT directories // pointers to ROOT directories
TDirectory* BaseDir() const; TDirectory* BaseDir() const;
TDirectory* MethodBaseDir() const; TDirectory* MethodBaseDir() const;
void SetMethodDir ( TDirectory* methodDir ) { fBaseDir =
fMethodBaseDir = methodDir; }
// the TMVA versions can be checked using // the TMVA version can be obtained and checked using
// if (GetTrainingTMVAVersionCode()>TMVA_VERSION(3,7,2)) {...} // if (GetTrainingTMVAVersionCode()>TMVA_VERSION(3,7,2)) {...}
// or // or
// if (GetTrainingROOTVersionCode()>ROOT_VERSION(5,15,5)) {...} // if (GetTrainingROOTVersionCode()>ROOT_VERSION(5,15,5)) {...}
UInt_t GetTrainingTMVAVersionCode() const { return fTMVATrainingVe UInt_t GetTrainingTMVAVersionCode() const { return fTMVAT
rsion; } rainingVersion; }
UInt_t GetTrainingROOTVersionCode() const { return fROOTTrainingVe UInt_t GetTrainingROOTVersionCode() const { return fROOTT
rsion; } rainingVersion; }
TString GetTrainingTMVAVersionString() const; TString GetTrainingTMVAVersionString() const;
TString GetTrainingROOTVersionString() const; TString GetTrainingROOTVersionString() const;
TransformationHandler& GetTransformationHandler() { return fTr
ansformation; }
const TransformationHandler& GetTransformationHandler() const { retu
rn fTransformation; }
// ---------- event accessors --------------------------------------- --------- // ---------- event accessors --------------------------------------- ---------
// returns reference to data set // returns reference to data set
DataSet& Data() const { return fData; } DataSetInfo& DataInfo() const { return fDataSetInfo; }
// event reference and update // event reference and update
Event& GetEvent() const { return GetVarTransform().GetEvent(); } UInt_t GetNEvents () const { return Data()->GetNEvents
Bool_t ReadEvent( TTree* tr, UInt_t ievt, Types::ESBType type = Typ (); }
es::kMaxSBType ) const; const Event* GetEvent () const;
const Event* GetEvent ( const TMVA::Event* ev ) const;
// read test and training events from data set const Event* GetEvent ( Long64_t ievt ) const;
Bool_t ReadTrainingEvent( UInt_t ievt, Types::ESBType type = Types: const Event* GetEvent ( Long64_t ievt , Types::ETreeType t
:kMaxSBType ) const; ype ) const;
Bool_t ReadTestEvent ( UInt_t ievt, Types::ESBType type = Types: const Event* GetTrainingEvent( Long64_t ievt ) const;
:kMaxSBType ) const; const Event* GetTestingEvent ( Long64_t ievt ) const;
const std::vector<Event*>& GetEventCollection( Types::ETreeType type
// event properties );
Bool_t IsSignalEvent() const { return GetEvent().IsSignal(); }
Double_t GetEventVal ( Int_t ivar ) const;
Double_t GetEventValNormalised(Int_t ivar) const;
Double_t GetEventWeight() const { return GetEvent().GetWeight(); }
// ---------- public auxiliary methods ------------------------------ --------- // ---------- public auxiliary methods ------------------------------ ---------
// this method is used to decide whether an event is signal- or backg round-like // this method is used to decide whether an event is signal- or backg round-like
// the reference cut "xC" is taken to be where // the reference cut "xC" is taken to be where
// Int_[-oo,xC] { PDF_S(x) dx } = Int_[xC,+oo] { PDF_B(x) dx } // Int_[-oo,xC] { PDF_S(x) dx } = Int_[xC,+oo] { PDF_B(x) dx }
virtual Bool_t IsSignalLike() { return GetMvaValue() > GetSignalRefer virtual Bool_t IsSignalLike() { return GetMvaValue() > GetSign
enceCut() ? kTRUE : kFALSE; } alReferenceCut() ? kTRUE : kFALSE; }
DataSet* Data() const { return DataInfo().GetDataSet(); }
Bool_t HasMVAPdfs() const { return fHasMVAPdfs; }
virtual void SetAnalysisType( Types::EAnalysisType type ) {
fAnalysisType = type; }
Types::EAnalysisType GetAnalysisType() const { return fAnalysisType;
}
Bool_t DoRegression() const { return fAnalysisType ==
Types::kRegression; }
protected: protected:
// ---------- protected acccessors ---------------------------------- --------- // ---------- protected acccessors ---------------------------------- ---------
TDirectory* LocalTDir() const { return Data().LocalRootDir(); } //TDirectory* LocalTDir() const { return Data().LocalRootDir(); }
// weight file name and directory (given by global config variable) // weight file name and directory (given by global config variable)
void SetWeightFileName( TString ); void SetWeightFileName( TString );
TString GetWeightFileName() const;
TString GetWeightFileDir() const { return fFileDir; } const TString& GetWeightFileDir() const { return fFileDir; }
void SetWeightFileDir( TString fileDir ); void SetWeightFileDir( TString fileDir );
// are input variables normalised ? // are input variables normalised ?
Bool_t IsNormalised() const { return fNormalise; } Bool_t IsNormalised() const { return fNormalise; }
void SetNormalised( Bool_t norm ) { fNormalise = norm; } void SetNormalised( Bool_t norm ) { fNormalise = norm; }
// set number of input variables (only used by MethodCuts, could perh aps be removed) // set number of input variables (only used by MethodCuts, could perh aps be removed)
void SetNvar( Int_t n ) { fNvar = n; } // void SetNvar( Int_t n ) { fNvar = n; }
// the type of the variable transformation required for the data set
of this classifier
Types::EVariableTransform GetVariableTransform() const { return fVari
ableTransform; }
// sets the minimum requirement on the MVA output to declare an event
signal-like
void SetSignalReferenceCut( Double_t cut ) { fSignalReferenceCut
= cut; }
// verbose and help flags // verbose and help flags
Bool_t Verbose() const { return fVerbose; } Bool_t Verbose() const { return fVerbose; }
Bool_t Help () const { return fHelp; } Bool_t Help () const { return fHelp; }
// ---------- protected event and tree accessors -------------------- --------- // ---------- protected event and tree accessors -------------------- ---------
// names of input variables (if the original names are expressions, t hey are // names of input variables (if the original names are expressions, t hey are
// transformed into regexps) // transformed into regexps)
const TString& GetInternalVarName( Int_t ivar ) const { return (*fInp const TString& GetInternalVarName( Int_t ivar ) const { return (*fI
utVars)[ivar]; } nputVars)[ivar]; }
const TString& GetOriginalVarName( Int_t ivar ) const { return Data() const TString& GetOriginalVarName( Int_t ivar ) const { return Data
.GetExpression(ivar); } Info().GetVariableInfo(ivar).GetExpression(); }
// accessing training and test trees Bool_t HasTrainingTree() const { return Data()->GetNTrainin
Bool_t HasTrainingTree() const { return Data().GetTrainingTree() != gEvents() != 0; }
0; }
TTree* GetTrainingTree() const {
if (GetVariableTransform() != Types::kNone) {
fLogger << kFATAL << "Trying to access correlated Training tree
in method "
<< GetMethodName() << Endl;
}
return Data().GetTrainingTree();
}
TTree* GetTestTree() const {
if (GetVariableTransform() != Types::kNone) {
fLogger << kFATAL << "Trying to access correlated Training tree
in method "
<< GetMethodName() << Endl;
}
return Data().GetTestTree();
}
// ---------- protected auxiliary methods --------------------------- --------- // ---------- protected auxiliary methods --------------------------- ---------
// declaration and processing of configuration options protected:
virtual void DeclareOptions();
virtual void ProcessOptions();
// make ROOT-independent C++ class for classifier response (classifie r-specific implementation) // make ROOT-independent C++ class for classifier response (classifie r-specific implementation)
virtual void MakeClassSpecific( std::ostream&, const TString& = "" ) const {} virtual void MakeClassSpecific( std::ostream&, const TString& = " " ) const {}
// header and auxiliary classes // header and auxiliary classes
virtual void MakeClassSpecificHeader( std::ostream&, const TString& = "" ) const {} virtual void MakeClassSpecificHeader( std::ostream&, const TStrin g& = "" ) const {}
// static pointer to this object - required for ROOT finder (to be so lved differently) // static pointer to this object - required for ROOT finder (to be so lved differently)
static MethodBase* GetThisBase() { return fgThisBase; } static MethodBase* GetThisBase() { return fgThisBase; }
// some basic statistical analysis // some basic statistical analysis
void Statistics( Types::ETreeType treeType, const TString& theVarName , void Statistics( Types::ETreeType treeType, const TString& theVarName ,
Double_t&, Double_t&, Double_t&, Double_t&, Double_t&, Double_t&,
Double_t&, Double_t&, Double_t&, Bool_t norm = kFALS Double_t&, Double_t&, Double_t& );
E );
// series of sanity checks on input tree (eg, do all the variables re
ally
// exist in tree, etc)
Bool_t CheckSanity( TTree* theTree = 0 );
// if TRUE, write weights only to text files // if TRUE, write weights only to text files
Bool_t TxtWeightsOnly() const { return fTxtWeightsOnly; } Bool_t TxtWeightsOnly() const { return fTxtWeightsOnly; }
protected:
// access to event information that needs method-specific information
Float_t GetTWeight( const Event* ev ) const {
return (fIgnoreNegWeightsInTraining && (ev->GetWeight() < 0)) ? 0.
: ev->GetWeight();
}
private: private:
// ---------- private definitions ----------------------------------- --------- // ---------- private definitions ----------------------------------- ---------
// Initialisation
void InitBase();
void DeclareBaseOptions();
void ProcessBaseOptions();
// used in efficiency computation // used in efficiency computation
enum ECutOrientation { kNegative = -1, kPositive = +1 }; enum ECutOrientation { kNegative = -1, kPositive = +1 };
ECutOrientation GetCutOrientation() const { return fCutOrientation; } ECutOrientation GetCutOrientation() const { return fCutOrientation; }
// ---------- private acccessors ------------------------------------ --------- // ---------- private acccessors ------------------------------------ ---------
// reset required for RootFinder // reset required for RootFinder
void ResetThisBase() { fgThisBase = this; } void ResetThisBase() { fgThisBase = this; }
// ---------- private auxiliary methods ----------------------------- --------- // ---------- private auxiliary methods ----------------------------- ---------
// Initialisation
void Init();
// PDFs for classifier response (required to compute signal probabili ty and Rarity) // PDFs for classifier response (required to compute signal probabili ty and Rarity)
void CreateMVAPdfs(); void CreateMVAPdfs();
Bool_t HasMVAPdfs() const { return fHasMVAPdfs; }
// for root finder // for root finder
static Double_t IGetEffForRoot( Double_t ); // interface static Double_t IGetEffForRoot( Double_t ); // interface
Double_t GetEffForRoot ( Double_t ); // implementation Double_t GetEffForRoot ( Double_t ); // implementation
// used for file parsing // used for file parsing
Bool_t GetLine(std::istream& fin, char * buf ); Bool_t GetLine( std::istream& fin, char * buf );
// fill test tree with classification or regression results
virtual void AddClassifierOutput ( Types::ETreeType type );
virtual void AddClassifierOutputProb( Types::ETreeType type );
virtual void AddRegressionOutput ( Types::ETreeType type );
// ========== class members ========================================= ========= // ========== class members ========================================= =========
private:
void AddInfoItem( void* gi, const TString& name, const TS
tring& value) const;
protected: protected:
// direct accessors // direct accessors
Ranking* fRanking; // pointer to ranking object ( Ranking* fRanking; // pointer to ranking ob
created by derived classifiers) ject (created by derived classifiers)
std::vector<TString>* fInputVars; // vector of input variab std::vector<TString>* fInputVars; // vector of input varia
les used in MVA bles used in MVA
// histogram binning // histogram binning
Int_t fNbins; // number of bins in represent Int_t fNbins; // number of bins in rep
ative histograms resentative histograms
Int_t fNbinsH; // number of bins in evaluatio Int_t fNbinsH; // number of bins in eva
n histograms luation histograms
Types::EAnalysisType fAnalysisType; // method-mode : true --
> regression, false --> classification
std::vector<Float_t>* fRegressionReturnVal; // holds the return-valu
e for the regression
Bool_t IsConstructedFromWeightFile() const { return fConstr
uctedFromWeightFile; }
private: private:
// MethodCuts redefines some of the evaluation variables and histogra ms -> must access private members // MethodCuts redefines some of the evaluation variables and histogra ms -> must access private members
friend class MethodCuts; friend class MethodCuts;
// data sets // data sets
DataSet& fData; //! the data set DataSetInfo& fDataSetInfo; //! the data set information ( sometimes needed)
Double_t fSignalReferenceCut; // minimum requirement on the MVA output to declare an event signal-like Double_t fSignalReferenceCut; // minimum requirement on the MVA output to declare an event signal-like
Types::ESBType fVariableTransformType; // this is the event type ( sig or bgd) assumed for variable transform Types::ESBType fVariableTransformType; // this is the event type ( sig or bgd) assumed for variable transform
// naming and versioning // naming and versioning
TString fJobName; // name of job -> user defined , appears in weight files TString fJobName; // name of job -> user defined , appears in weight files
TString fMethodName; // name of the method (set in derived class) TString fMethodName; // name of the method (set in derived class)
Types::EMVA fMethodType; // type of method (set in deri ved class) Types::EMVA fMethodType; // type of method (set in deri ved class)
TString fMethodTitle; // user-defined title for meth
od (used for weight-file names)
TString fTestvar; // variable used in evaluation
, etc (mostly the MVA)
TString fTestvarPrefix; // 'MVA_' prefix of MVA variab le TString fTestvarPrefix; // 'MVA_' prefix of MVA variab le
TString fTestvar; // variable used in evaluation , etc (mostly the MVA)
UInt_t fTMVATrainingVersion; // TMVA version used for train ing UInt_t fTMVATrainingVersion; // TMVA version used for train ing
UInt_t fROOTTrainingVersion; // ROOT version used for train ing UInt_t fROOTTrainingVersion; // ROOT version used for train ing
Bool_t fNormalise; // normalise input variables Bool_t fNormalise; // normalise input variables
Bool_t fConstructedFromWeightFile; // is it obtained from w
Int_t fNvar; // number of input variables eight file?
// Directory structure: fMethodBaseDir/fBaseDir // Directory structure: fMethodBaseDir/fBaseDir
// where the first directory name is defined by the method type // where the first directory name is defined by the method type
// and the second is user supplied (the title given in Factory::BookM ethod()) // and the second is user supplied (the title given in Factory::BookM ethod())
TDirectory* fBaseDir; // base directory for the inst ance, needed to know where to jump back from localDir TDirectory* fBaseDir; // base directory for the inst ance, needed to know where to jump back from localDir
TDirectory* fMethodBaseDir; // base directory for the meth mutable TDirectory* fMethodBaseDir; // base directory for the meth
od od
TString fParentDir; // method parent name, like bo
oster name
TString fFileDir; // unix sub-directory for weig ht files (default: "weights") TString fFileDir; // unix sub-directory for weig ht files (default: "weights")
TString fWeightFile; // weight file name TString fWeightFile; // weight file name
private: private:
TH1* fHistS_plotbin; // MVA plots used for graphics TH1* fEffS; // efficiency histogram for ro
representation (signal) otfinder
TH1* fHistB_plotbin; // MVA plots used for graphics
representation (background)
TH1* fHistTrS_plotbin; // same plots as above for tra
ining sample (check for overtraining)
TH1* fHistTrB_plotbin; // same plots as above for tra
ining sample (check for overtraining)
TH1* fProbaS_plotbin; // P(MVA) plots used for graph
ics representation (signal)
TH1* fProbaB_plotbin; // P(MVA) plots used for graph
ics representation (background)
TH1* fRarityS_plotbin; // R(MVA) plots used for graph
ics representation (signal)
TH1* fRarityB_plotbin; // R(MVA) plots used for graph
ics representation (background)
TH1* fHistS_highbin; // MVA plots used for efficien
cy calculations (signal)
TH1* fHistB_highbin; // MVA plots used for efficien
cy calculations (background)
TH1* fEffS; // efficiency plot (signal)
TH1* fEffB; // efficiency plot (background
)
TH1* fEffBvsS; // background efficiency versu
s signal efficiency
TH1* fRejBvsS; // background rejection (=1-ef
f.) versus signal efficiency
TH1* finvBeffvsSeff; // inverse background eff (1/e
ff.) versus signal efficiency
TH1* fTrainEffS; // Training efficiency plot (s
ignal)
TH1* fTrainEffB; // Training efficiency plot (b
ackground)
TH1* fTrainEffBvsS; // Training background efficie
ncy versus signal efficiency
TH1* fTrainRejBvsS; // Training background rejecti
on (=1-eff.) versus signal efficiency
Int_t fNbinsMVAPdf; // number of bins used in hist PDF* fDefaultPDF; // default PDF definitions
ogram that creates PDF
Int_t fNsmoothMVAPdf; // number of times a histogram
is smoothed before creating the PDF
PDF* fMVAPdfS; // signal MVA PDF PDF* fMVAPdfS; // signal MVA PDF
PDF* fMVAPdfB; // background MVA PDF PDF* fMVAPdfB; // background MVA PDF
TGraph* fGraphS; // graphs used for splines for
efficiency (signal)
TGraph* fGraphB; // graphs used for splines for
efficiency (background)
TGraph* fGrapheffBvsS; // graphs used for splines for
signal eff. versus background eff.
PDF* fSplS; // PDFs of MVA distribution (s ignal) PDF* fSplS; // PDFs of MVA distribution (s ignal)
PDF* fSplB; // PDFs of MVA distribution (b ackground) PDF* fSplB; // PDFs of MVA distribution (b ackground)
TSpline* fSpleffBvsS; // splines for signal eff. ver sus background eff. TSpline* fSpleffBvsS; // splines for signal eff. ver sus background eff.
TGraph* fGraphTrainS; // graphs used for splines for
training efficiency (signal)
TGraph* fGraphTrainB; // graphs used for splines for
training efficiency (background)
TGraph* fGraphTrainEffBvsS; // graphs used for splines for
training signal eff. versus background eff.
PDF* fSplTrainS; // PDFs of training MVA distri bution (signal) PDF* fSplTrainS; // PDFs of training MVA distri bution (signal)
PDF* fSplTrainB; // PDFs of training MVA distri bution (background) PDF* fSplTrainB; // PDFs of training MVA distri bution (background)
TSpline* fSplTrainEffBvsS; // splines for training signal eff. versus background eff. TSpline* fSplTrainEffBvsS; // splines for training signal eff. versus background eff.
private: private:
// basic statistics quantities of MVA // basic statistics quantities of MVA
Double_t fMeanS; // mean (signal) Double_t fMeanS; // mean (signal)
Double_t fMeanB; // mean (background) Double_t fMeanB; // mean (background)
Double_t fRmsS; // RMS (signal) Double_t fRmsS; // RMS (signal)
Double_t fRmsB; // RMS (background) Double_t fRmsB; // RMS (background)
Double_t fXmin; // minimum (signal and backgro und) Double_t fXmin; // minimum (signal and backgro und)
Double_t fXmax; // maximum (signal and backgro und) Double_t fXmax; // maximum (signal and backgro und)
// variable preprocessing // variable preprocessing
Bool_t fUseDecorr; // kept for b Bool_t fUseDecorr; // kept for backward c
ackward compatibility ompatibility
Types::EVariableTransform fVariableTransform; // Decorrelat TString fVarTransformString; // labels variable tra
ion, PCA, etc. nsform method
VariableTransformBase* fVarTransform; // the variab TString fVariableTransformTypeString; // labels variable tra
le transformer nsform type
TString fVarTransformString; // labels var
iable transform method TransformationHandler fTransformation; // the list of transfo
TString fVariableTransformTypeString; // labels var rmations
iable transform type
// help and verbosity // help and verbosity
Bool_t fVerbose; // verbose flag Bool_t fVerbose; // verbose flag
TString fVerbosityLevelString; // verbosity level (user inp ut string) TString fVerbosityLevelString; // verbosity level (user inp ut string)
EMsgType fVerbosityLevel; // verbosity level EMsgType fVerbosityLevel; // verbosity level
Bool_t fHelp; // help flag Bool_t fHelp; // help flag
Bool_t fHasMVAPdfs; // MVA Pdfs are created for th Bool_t fHasMVAPdfs; // MVA Pdfs are created for
is classifier this classifier
Bool_t fTxtWeightsOnly; // if TRUE, write weights only
to text files Bool_t fIgnoreNegWeightsInTraining;// If true, events with
negative weights are not used in training
protected:
Bool_t IgnoreEventsWithNegWeightsInTraining() const { retur
n fIgnoreNegWeightsInTraining; }
Bool_t fTxtWeightsOnly; // if TRUE, write weights on
ly to text files
// for signal/background
UInt_t fSignalClass; // index of the Signal-class
UInt_t fBackgroundClass; // index of the Background-c
lass
private: private:
// timing variables
Double_t fTrainTime; // for timing measurements
Double_t fTestTime; // for timing measurements
// orientation of cut: depends on signal and background mean values // orientation of cut: depends on signal and background mean values
ECutOrientation fCutOrientation; // +1 if Sig>Bkg, -1 otherwise ECutOrientation fCutOrientation; // +1 if Sig>Bkg, -1 otherwise
// for root finder // for root finder
TSpline1* fSplRefS; // helper splines for RootFind er (signal) TSpline1* fSplRefS; // helper splines for RootFind er (signal)
TSpline1* fSplRefB; // helper splines for RootFind er (background) TSpline1* fSplRefB; // helper splines for RootFind er (background)
TSpline1* fSplTrainRefS; // helper splines for RootFind er (signal) TSpline1* fSplTrainRefS; // helper splines for RootFind er (signal)
TSpline1* fSplTrainRefB; // helper splines for RootFind er (background) TSpline1* fSplTrainRefB; // helper splines for RootFind er (background)
mutable std::vector<const std::vector<Event*>*> fEventCollections; //
if the method needs the complete event-collection, the transformed event c
oll. ist stored here.
public:
Bool_t fSetupCompleted; // is method setup
private: private:
// this carrier // this carrier
static MethodBase* fgThisBase; // this pointer static MethodBase* fgThisBase; // this pointer
protected: protected:
// the mutable declaration is needed to use the logger in const metho
ds
mutable MsgLogger fLogger; // message logger
ClassDef(MethodBase,0) // Virtual base class for all TMVA method ClassDef(MethodBase,0) // Virtual base class for all TMVA method
}; };
} // namespace TMVA } // namespace TMVA
// ========== INLINE FUNCTIONS ============================================ ============= // ========== INLINE FUNCTIONS ============================================ =============
//_______________________________________________________________________ //_______________________________________________________________________
inline Bool_t TMVA::MethodBase::ReadEvent( TTree* tr, UInt_t ievt, Types::E SBType type ) const inline const TMVA::Event* TMVA::MethodBase::GetEvent( const TMVA::Event* ev ) const
{ {
// read event into memory placeholder return GetTransformationHandler().Transform(ev);
if (type == Types::kMaxSBType) type = fVariableTransformType;
fVarTransform->ReadEvent(tr, ievt, type);
return kTRUE;
} }
//_______________________________________________________________________ inline const TMVA::Event* TMVA::MethodBase::GetEvent() const
inline Bool_t TMVA::MethodBase::ReadTrainingEvent( UInt_t ievt, Types::ESBT
ype type ) const
{ {
// read training event into memory placeholder return GetTransformationHandler().Transform(Data()->GetEvent());
return ReadEvent( Data().GetTrainingTree(), ievt, type );
} }
//_______________________________________________________________________ inline const TMVA::Event* TMVA::MethodBase::GetEvent( Long64_t ievt ) const
inline Bool_t TMVA::MethodBase::ReadTestEvent( UInt_t ievt, Types::ESBType
type ) const
{ {
// read test event into memory placeholder return GetTransformationHandler().Transform(Data()->GetEvent(ievt));
return ReadEvent( Data().GetTestTree(), ievt, type );
} }
//_______________________________________________________________________ inline const TMVA::Event* TMVA::MethodBase::GetEvent( Long64_t ievt, Types:
inline Double_t TMVA::MethodBase::GetEventVal( Int_t ivar ) const :ETreeType type ) const
{ {
// return event value for variable "ivar" return GetTransformationHandler().Transform(Data()->GetEvent(ievt, type)
if (IsNormalised()) return GetEventValNormalised(ivar); );
else return GetEvent().GetVal(ivar);
} }
//_______________________________________________________________________ inline const std::vector<TMVA::Event*>& TMVA::MethodBase::GetEventCollectio
inline Double_t TMVA::MethodBase::GetEventValNormalised(Int_t ivar) const n( Types::ETreeType type)
{
if (GetTransformationHandler().GetTransformationList().GetEntries() <= 0
) {
return (Data()->GetEventCollection(type));
}
Int_t idx = Data()->TreeIndex(type);
if (fEventCollections.at(idx) == 0) {
fEventCollections.at(idx) = &(Data()->GetEventCollection(type));
fEventCollections.at(idx) = GetTransformationHandler().CalcTransforma
tions(*(fEventCollections.at(idx)),kTRUE);
}
return *(fEventCollections.at(idx));
}
inline const TMVA::Event* TMVA::MethodBase::GetTrainingEvent( Long64_t ievt
) const
{
return GetEvent(ievt, Types::kTraining);
}
inline const TMVA::Event* TMVA::MethodBase::GetTestingEvent( Long64_t ievt
) const
{ {
// normalises input variables return GetEvent(ievt, Types::kTesting);
return gTools().NormVariable( GetEvent().GetVal(ivar), GetXmin(ivar), Ge
tXmax(ivar) );
} }
//_______________________________________________________________________ //_______________________________________________________________________
inline TString TMVA::MethodBase::GetTrainingTMVAVersionString() const inline TString TMVA::MethodBase::GetTrainingTMVAVersionString() const
{ {
// calculates the TMVA version string from the training version code on the fly // calculates the TMVA version string from the training version code on the fly
UInt_t a = GetTrainingTMVAVersionCode() & 0xff0000; a>>=16; UInt_t a = GetTrainingTMVAVersionCode() & 0xff0000; a>>=16;
UInt_t b = GetTrainingTMVAVersionCode() & 0x00ff00; b>>=8; UInt_t b = GetTrainingTMVAVersionCode() & 0x00ff00; b>>=8;
UInt_t c = GetTrainingTMVAVersionCode() & 0x0000ff; UInt_t c = GetTrainingTMVAVersionCode() & 0x0000ff;
 End of changes. 86 change blocks. 
291 lines changed or deleted 362 lines changed or added


 MethodBayesClassifier.h   MethodBayesClassifier.h 
// @(#)root/tmva $Id: MethodBayesClassifier.h 21630 2008-01-10 19:40:44Z br un $ // @(#)root/tmva $Id: MethodBayesClassifier.h 29122 2009-06-22 06:51:30Z br un $
// Author: Abhishek Narain // Author: Abhishek Narain
/************************************************************************** ******** /************************************************************************** ********
* Project: TMVA - a Root-integrated toolkit for multivariate data analysis * * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
* Package: TMVA * * Package: TMVA *
* Class : MethodBayesClassifier * * Class : MethodBayesClassifier *
* Web : http://tmva.sourceforge.net * * Web : http://tmva.sourceforge.net *
* * * *
* Description: * * Description: *
* Bayesian Classifier * * Bayesian Classifier *
skipping to change at line 42 skipping to change at line 42
// // // //
// MethodBayesClassifier // // MethodBayesClassifier //
// // // //
// Description... // // Description... //
// // // //
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
#ifndef ROOT_TMVA_MethodBase #ifndef ROOT_TMVA_MethodBase
#include "TMVA/MethodBase.h" #include "TMVA/MethodBase.h"
#endif #endif
#ifndef ROOT_TMVA_Types
#include "TMVA/Types.h"
#endif
namespace TMVA { namespace TMVA {
class MethodBayesClassifier : public MethodBase { class MethodBayesClassifier : public MethodBase {
public: public:
MethodBayesClassifier( const TString& jobName, MethodBayesClassifier( const TString& jobName,
const TString& methodTitle, const TString& methodTitle,
DataSet& theData, DataSetInfo& theData,
const TString& theOption = "", const TString& theOption = "",
TDirectory* theTargetDir = 0 ); TDirectory* theTargetDir = 0 );
MethodBayesClassifier( DataSet& theData, MethodBayesClassifier( DataSetInfo& theData,
const TString& theWeightFile, const TString& theWeightFile,
TDirectory* theTargetDir = NULL ); TDirectory* theTargetDir = NULL );
virtual ~MethodBayesClassifier( void ); virtual ~MethodBayesClassifier( void );
virtual Bool_t HasAnalysisType( Types::EAnalysisType type, UInt_t num
berClasses, UInt_t numberTargets );
// training method // training method
void Train( void ); void Train( void );
using MethodBase::WriteWeightsToStream; using MethodBase::WriteWeightsToStream;
using MethodBase::ReadWeightsFromStream; using MethodBase::ReadWeightsFromStream;
// write weights to file // write weights to file
void WriteWeightsToStream( ostream& o ) const; void WriteWeightsToStream( ostream& o ) const;
void AddWeightsXMLTo( void* parent ) const;
// read weights from file // read weights from file
void ReadWeightsFromStream( istream& istr ); void ReadWeightsFromStream( istream& istr );
void ReadWeightsFromXML ( void* /*wghtnode*/ ) {}
// calculate the MVA value // calculate the MVA value
Double_t GetMvaValue(); Double_t GetMvaValue( Double_t* err = 0 );
void InitBayesClassifier( void ); void Init( void );
// ranking of input variables // ranking of input variables
const Ranking* CreateRanking() { return 0; } const Ranking* CreateRanking() { return 0; }
protected: protected:
// make ROOT-independent C++ class for classifier response (classifie r-specific implementation) // make ROOT-independent C++ class for classifier response (classifie r-specific implementation)
void MakeClassSpecific( std::ostream&, const TString& ) const; void MakeClassSpecific( std::ostream&, const TString& ) const;
// get help message text // get help message text
 End of changes. 9 change blocks. 
5 lines changed or deleted 13 lines changed or added


 MethodCFMlpANN.h   MethodCFMlpANN.h 
// @(#)root/tmva $Id: MethodCFMlpANN.h 21630 2008-01-10 19:40:44Z brun $ // @(#)root/tmva $Id: MethodCFMlpANN.h 29122 2009-06-22 06:51:30Z brun $
// Author: Andreas Hoecker, Joerg Stelzer, Helge Voss, Kai Voss // Author: Andreas Hoecker, Joerg Stelzer, Helge Voss, Kai Voss
/************************************************************************** ******** /************************************************************************** ********
* Project: TMVA - a Root-integrated toolkit for multivariate data analysis * * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
* Package: TMVA * * Package: TMVA *
* Class : MethodCFMlpANN * * Class : MethodCFMlpANN *
* Web : http://tmva.sourceforge.net * * Web : http://tmva.sourceforge.net *
* * * *
* Description: * * Description: *
* Interface for Clermond-Ferrand artificial neural network. * * Interface for Clermond-Ferrand artificial neural network. *
skipping to change at line 86 skipping to change at line 86
#define ROOT_TMVA_MethodCFMlpANN #define ROOT_TMVA_MethodCFMlpANN
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// // // //
// MethodCFMlpANN // // MethodCFMlpANN //
// // // //
// Interface for Clermond-Ferrand artificial neural network // // Interface for Clermond-Ferrand artificial neural network //
// // // //
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
#include <iosfwd>
#ifndef ROOT_TMVA_MethodBase #ifndef ROOT_TMVA_MethodBase
#include "TMVA/MethodBase.h" #include "TMVA/MethodBase.h"
#endif #endif
#ifndef ROOT_TMVA_MethodCFMlpANN_Utils #ifndef ROOT_TMVA_MethodCFMlpANN_Utils
#include "TMVA/MethodCFMlpANN_Utils.h" #include "TMVA/MethodCFMlpANN_Utils.h"
#endif #endif
#ifndef ROOT_TMVA_TMatrix #ifndef ROOT_TMVA_TMatrixFfwd
#include "TMatrix.h" #ifndef ROOT_TMatrixFfwd
#include "TMatrixFfwd.h"
#endif
#endif #endif
namespace TMVA { namespace TMVA {
class MethodCFMlpANN : public MethodBase, MethodCFMlpANN_Utils { class MethodCFMlpANN : public MethodBase, MethodCFMlpANN_Utils {
public: public:
MethodCFMlpANN( const TString& jobName, MethodCFMlpANN( const TString& jobName,
const TString& methodTitle, const TString& methodTitle,
DataSet& theData, DataSetInfo& theData,
const TString& theOption = "3000:N-1:N-2", const TString& theOption = "3000:N-1:N-2",
TDirectory* theTargetDir = 0 ); TDirectory* theTargetDir = 0 );
MethodCFMlpANN( DataSet& theData, MethodCFMlpANN( DataSetInfo& theData,
const TString& theWeightFile, const TString& theWeightFile,
TDirectory* theTargetDir = NULL ); TDirectory* theTargetDir = NULL );
virtual ~MethodCFMlpANN( void ); virtual ~MethodCFMlpANN( void );
virtual Bool_t HasAnalysisType( Types::EAnalysisType type, UInt_t num
berClasses, UInt_t /*numberTargets*/ );
// training method // training method
void Train( void ); void Train( void );
using MethodBase::WriteWeightsToStream; using MethodBase::WriteWeightsToStream;
using MethodBase::ReadWeightsFromStream; using MethodBase::ReadWeightsFromStream;
// write weights to file // write weights to file
void WriteWeightsToStream( ostream& o ) const; void WriteWeightsToStream( ostream& o ) const;
void AddWeightsXMLTo( void* parent ) const;
// read weights from file // read weights from file
void ReadWeightsFromStream( istream& istr ); void ReadWeightsFromStream( istream& istr );
void ReadWeightsFromXML( void* wghtnode );
// calculate the MVA value // calculate the MVA value
Double_t GetMvaValue(); Double_t GetMvaValue( Double_t* err = 0 );
// data accessors for external functions // data accessors for external functions
Double_t GetData ( Int_t isel, Int_t ivar ) const { return (*fData)(i sel, ivar); } Double_t GetData ( Int_t isel, Int_t ivar ) const { return (*fData)(i sel, ivar); }
Int_t GetClass( Int_t ivar ) const { return (*fClass)[ ivar]; } Int_t GetClass( Int_t ivar ) const { return (*fClass)[ ivar]; }
// static pointer to this object (required for external functions // static pointer to this object (required for external functions
static MethodCFMlpANN* This( void ) { return fgThis; } static MethodCFMlpANN* This( void ) { return fgThis; }
// ranking of input variables // ranking of input variables
const Ranking* CreateRanking() { return 0; } const Ranking* CreateRanking() { return 0; }
skipping to change at line 164 skipping to change at line 171
void PrintWeights( std::ostream & o ) const; void PrintWeights( std::ostream & o ) const;
// the option handling methods // the option handling methods
void DeclareOptions(); void DeclareOptions();
void ProcessOptions(); void ProcessOptions();
static MethodCFMlpANN* fgThis; // this carrier static MethodCFMlpANN* fgThis; // this carrier
// LUTs // LUTs
TMatrix *fData; // the (data,var) string TMatrixF *fData; // the (data,var) string
vector<Int_t> *fClass; // the event class (1=signal, 2=background) std::vector<Int_t> *fClass; // the event class (1=signal, 2=backgr
ound)
Int_t fNlayers; // number of layers (including input and ou tput layers) Int_t fNlayers; // number of layers (including input and ou tput layers)
Int_t fNcycles; // number of training cycles Int_t fNcycles; // number of training cycles
Int_t* fNodes; // number of nodes per layer Int_t* fNodes; // number of nodes per layer
// additional member variables for the independent NN::Evaluation pha se // additional member variables for the independent NN::Evaluation pha se
Double_t** fYNN; // weights Double_t** fYNN; // weights
TString fLayerSpec; // the hidden layer specification string TString fLayerSpec; // the hidden layer specification string
// auxiliary member functions // auxiliary member functions
Double_t EvalANN( vector<Double_t>&, Bool_t& isOK ); Double_t EvalANN( std::vector<Double_t>&, Bool_t& isOK );
void NN_ava ( Double_t* ); void NN_ava ( Double_t* );
Double_t NN_fonc( Int_t, Double_t ) const; Double_t NN_fonc( Int_t, Double_t ) const;
// default initialisation // default initialisation
void InitCFMlpANN( void ); void Init( void );
ClassDef(MethodCFMlpANN,0) // Interface for Clermond-Ferrand artifici al neural network ClassDef(MethodCFMlpANN,0) // Interface for Clermond-Ferrand artifici al neural network
}; };
} // namespace TMVA } // namespace TMVA
#endif #endif
 End of changes. 12 change blocks. 
11 lines changed or deleted 20 lines changed or added


 MethodCFMlpANN_Utils.h   MethodCFMlpANN_Utils.h 
// @(#)root/tmva $Id: MethodCFMlpANN_Utils.h 23334 2008-04-19 18:38:57Z bru n $ // @(#)root/tmva $Id: MethodCFMlpANN_Utils.h 29122 2009-06-22 06:51:30Z bru n $
// Author: Andreas Hoecker, Joerg Stelzer, Helge Voss, Kai Voss // Author: Andreas Hoecker, Joerg Stelzer, Helge Voss, Kai Voss
/************************************************************************** ******** /************************************************************************** ********
* Project: TMVA - a Root-integrated toolkit for multivariate data analysis * * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
* Package: TMVA * * Package: TMVA *
* Class : MethodCFMlpANN_utils * * Class : MethodCFMlpANN_utils *
* Web : http://tmva.sourceforge.net * * Web : http://tmva.sourceforge.net *
* * * *
* Reference for the original FORTRAN version "mlpl3.F": * * Reference for the original FORTRAN version "mlpl3.F": *
* Authors : J. Proriol and contributions from ALEPH-Clermont-Fd * * Authors : J. Proriol and contributions from ALEPH-Clermont-Fd *
skipping to change at line 42 skipping to change at line 42
* (http://tmva.sourceforge.net/LICENSE) * * (http://tmva.sourceforge.net/LICENSE) *
************************************************************************** ********/ ************************************************************************** ********/
#ifndef ROOT_TMVA_MethodCFMlpANN_Utils #ifndef ROOT_TMVA_MethodCFMlpANN_Utils
#define ROOT_TMVA_MethodCFMlpANN_Utils #define ROOT_TMVA_MethodCFMlpANN_Utils
#ifndef ROOT_TMVA_MethodCFMlpANN_def #ifndef ROOT_TMVA_MethodCFMlpANN_def
#include "TMVA/MethodCFMlpANN_def.h" #include "TMVA/MethodCFMlpANN_def.h"
#endif #endif
#ifndef ROOT_TObject #ifndef ROOT_Rtypes
#include "TObject.h" #include "Rtypes.h"
#endif #endif
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// // // //
// MethodCFMlpANN_Utils // // MethodCFMlpANN_Utils //
// // // //
// Implementation of Clermond-Ferrand artificial neural network // // Implementation of Clermond-Ferrand artificial neural network //
// // // //
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
skipping to change at line 79 skipping to change at line 79
void Entree_new( Int_t *, char *, Int_t *ntrain, Int_t *ntest, void Entree_new( Int_t *, char *, Int_t *ntrain, Int_t *ntest,
Int_t *numlayer, Int_t *nodes, Int_t *numcycle, Int_t *numlayer, Int_t *nodes, Int_t *numcycle,
Int_t ); Int_t );
virtual Int_t DataInterface( Double_t*, Double_t*, Int_t*, Int_t*, In t_t*, Int_t*, virtual Int_t DataInterface( Double_t*, Double_t*, Int_t*, Int_t*, In t_t*, Int_t*,
Double_t*, Int_t*, Int_t* ) = 0; Double_t*, Int_t*, Int_t* ) = 0;
Double_t Fdecroi(Int_t *i__); Double_t Fdecroi(Int_t *i__);
Double_t Sen3a(void); Double_t Sen3a(void);
void Wini(); void Wini ();
void En_avant(Int_t *ievent); void En_avant (Int_t *ievent);
void En_avant2(Int_t *ievent); void En_avant2 (Int_t *ievent);
void En_arriere(Int_t *ievent); void En_arriere(Int_t *ievent);
void Leclearn(Int_t *ktest, Double_t *tout2, Double_t *tin2); void Leclearn (Int_t *ktest, Double_t *tout2, Double_t *tin2);
void Out(Int_t *iii, Int_t *maxcycle); void Out (Int_t *iii, Int_t *maxcycle);
void Cout(Int_t *, Double_t *xxx); void Cout (Int_t *, Double_t *xxx);
void Innit(char *det, Double_t *tout2, Double_t *tin2, Int_t ); void Innit (char *det, Double_t *tout2, Double_t *tin2, Int_t );
void TestNN(); void TestNN ();
void Inl(); void Inl ();
void GraphNN(Int_t *ilearn, Double_t *, Double_t *, char *, Int_t); void GraphNN (Int_t *ilearn, Double_t *, Double_t *, char *, Int_t
void Foncf(Int_t *i__, Double_t *u, Double_t *f); );
void Cout2(Int_t * /*i1*/, Double_t *yyy); void Foncf (Int_t *i__, Double_t *u, Double_t *f);
void Lecev2(Int_t *ktest, Double_t *tout2, Double_t *tin2); void Cout2 (Int_t * /*i1*/, Double_t *yyy);
void Arret(const char* mot ); void Lecev2 (Int_t *ktest, Double_t *tout2, Double_t *tin2);
void Arret (const char* mot );
void CollectVar(Int_t *nvar, Int_t *class__, Double_t *xpg); void CollectVar(Int_t *nvar, Int_t *class__, Double_t *xpg);
protected: protected:
static Int_t fg_100; // constant static Int_t fg_100; // constant
static Int_t fg_0; // constant static Int_t fg_0; // constant
static Int_t fg_max_nVar_; // static maximum number of input varia static Int_t fg_max_nVar_; // static maximum number of input
bles variables
static Int_t fg_max_nNodes_; // maximum number of nodes per variable static Int_t fg_max_nNodes_; // maximum number of nodes per va
static Int_t fg_999; // constant riable
static Int_t fg_999; // constant
static const char* fg_MethodName; // method name for print
Double_t W_ref(const Double_t wNN[], Int_t a_1, Int_t a_2, Int_t a_3) const { Double_t W_ref(const Double_t wNN[], Int_t a_1, Int_t a_2, Int_t a_3) const {
return wNN [(a_3*max_nNodes_ + a_2)*max_nLayers_ + a_1 - 187]; return wNN [(a_3*max_nNodes_ + a_2)*max_nLayers_ + a_1 - 187];
} }
Double_t& W_ref(Double_t wNN[], Int_t a_1, Int_t a_2, Int_t a_3) { Double_t& W_ref(Double_t wNN[], Int_t a_1, Int_t a_2, Int_t a_3) {
return wNN [((a_3)*max_nNodes_ + (a_2))*max_nLayers_ + a_1 - 187]; return wNN [((a_3)*max_nNodes_ + (a_2))*max_nLayers_ + a_1 - 187];
} }
Double_t Ww_ref(const Double_t wwNN[], Int_t a_1,Int_t a_2) const { Double_t Ww_ref(const Double_t wwNN[], Int_t a_1,Int_t a_2) const {
return wwNN[(a_2)*max_nLayers_ + a_1 - 7]; return wwNN[(a_2)*max_nLayers_ + a_1 - 7];
skipping to change at line 167 skipping to change at line 168
fxx=0; fxx=0;
} }
Double_t** fxx; Double_t** fxx;
Int_t fNevt; Int_t fNevt;
Int_t fNvar; Int_t fNvar;
} fVarn2_1, fVarn3_1; } fVarn2_1, fVarn3_1;
// ANN weights // ANN weights
struct { struct {
Double_t x [max_nLayers_*max_nNodes_]; Double_t x[max_nLayers_*max_nNodes_];
Double_t y [max_nLayers_*max_nNodes_]; Double_t y[max_nLayers_*max_nNodes_];
Double_t o [max_nNodes_]; Double_t o[max_nNodes_];
Double_t w [max_nLayers_*max_nNodes_*max_nNodes_]; Double_t w[max_nLayers_*max_nNodes_*max_nNodes_];
Double_t ww[max_nLayers_*max_nNodes_]; Double_t ww[max_nLayers_*max_nNodes_];
Double_t cut[max_nNodes_]; Double_t cut[max_nNodes_];
Double_t deltaww[max_nLayers_*max_nNodes_]; Double_t deltaww[max_nLayers_*max_nNodes_];
Int_t neuron[max_nLayers_]; Int_t neuron[max_nLayers_];
} fNeur_1; } fNeur_1;
// ANN weights // ANN weights
struct { struct {
Double_t coef [max_nNodes_], temp[max_nLayers_], demin, demax; Double_t coef[max_nNodes_], temp[max_nLayers_], demin, demax;
Double_t del [max_nLayers_*max_nNodes_]; Double_t del[max_nLayers_*max_nNodes_];
Double_t delw [max_nLayers_*max_nNodes_*max_nNodes_]; Double_t delw[max_nLayers_*max_nNodes_*max_nNodes_];
Double_t delta[max_nLayers_*max_nNodes_*max_nNodes_]; Double_t delta[max_nLayers_*max_nNodes_*max_nNodes_];
Double_t delww[max_nLayers_*max_nNodes_]; Double_t delww[max_nLayers_*max_nNodes_];
Int_t idde; Int_t idde;
} fDel_1; } fDel_1;
// flags and stuff (don't ask me...) // flags and stuff (don't ask me...)
struct { struct {
Double_t ancout, tolcou; Double_t ancout, tolcou;
Int_t ieps; Int_t ieps;
} fCost_1; } fCost_1;
 End of changes. 7 change blocks. 
30 lines changed or deleted 33 lines changed or added


 MethodCommittee.h   MethodCommittee.h 
// @(#)root/tmva $Id: MethodCommittee.h 21630 2008-01-10 19:40:44Z brun $ // @(#)root/tmva $Id: MethodCommittee.h 29122 2009-06-22 06:51:30Z brun $
// Author: Andreas Hoecker, Joerg Stelzer, Helge Voss // Author: Andreas Hoecker, Joerg Stelzer, Helge Voss
/************************************************************************** ******** /************************************************************************** ********
* Project: TMVA - a Root-integrated toolkit for multivariate data analysis * * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
* Package: TMVA * * Package: TMVA *
* Class : MethodCommittee * * Class : MethodCommittee *
* Web : http://tmva.sourceforge.net * * Web : http://tmva.sourceforge.net *
* * * *
* Description: * * Description: *
* Boosting * * Boosting *
skipping to change at line 41 skipping to change at line 41
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// // // //
// MethodCommittee // // MethodCommittee //
// // // //
// Committee method // // Committee method //
// // // //
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
#include <vector> #include <vector>
#include <iosfwd>
#ifndef ROOT_TH2
#include "TH2.h"
#endif
#ifndef ROOT_TTree
#include "TTree.h"
#endif
#ifndef ROOT_TMVA_MethodBase #ifndef ROOT_TMVA_MethodBase
#include "TMVA/MethodBase.h" #include "TMVA/MethodBase.h"
#endif #endif
class TTree;
class TH2;
namespace TMVA { namespace TMVA {
class MethodCommittee : public MethodBase { class MethodCommittee : public MethodBase {
public: public:
// constructor for training and reading // constructor for training and reading
MethodCommittee( const TString& jobName, MethodCommittee( const TString& jobName,
const TString& committeeTitle, const TString& methodTitle,
DataSet& theData, DataSetInfo& dsi,
const TString& committeeOptions, const TString& theOption,
Types::EMVA method,
const TString& methodOptions,
TDirectory* theTargetDir = 0 ); TDirectory* theTargetDir = 0 );
// constructor for calculating Committee-MVA using previously generat ad members // constructor for calculating Committee-MVA using previously generat ad members
MethodCommittee( DataSet& theData, MethodCommittee( DataSetInfo& theData,
const TString& theWeightFile, const TString& theWeightFile,
TDirectory* theTargetDir = NULL ); TDirectory* theTargetDir = 0 );
virtual ~MethodCommittee( void ); virtual ~MethodCommittee( void );
virtual Bool_t HasAnalysisType( Types::EAnalysisType type, UInt_t num
berClasses, UInt_t numberTargets );
// overloaded members from MethodBase // overloaded members from MethodBase
void WriteStateToFile() const; void WriteStateToFile() const;
// the training // the training
void Train(); void Train();
using MethodBase::WriteWeightsToStream; using MethodBase::WriteWeightsToStream;
using MethodBase::ReadWeightsFromStream; using MethodBase::ReadWeightsFromStream;
// write weights to file // write weights to file
void WriteWeightsToStream( ostream& o ) const; void WriteWeightsToStream( ostream& o ) const;
void AddWeightsXMLTo( void* parent ) const;
// read weights from file // read weights from file
void ReadWeightsFromStream( istream& istr ); void ReadWeightsFromStream( istream& istr );
void ReadWeightsFromXML ( void* /*wghtnode*/ ) {}
// write method specific histos to target file // write method specific histos to target file
void WriteMonitoringHistosToFile( void ) const; void WriteMonitoringHistosToFile( void ) const;
// calculate the MVA value // calculate the MVA value
Double_t GetMvaValue(); Double_t GetMvaValue( Double_t* err = 0 );
// apply the boost algorithm to a member in the committee // apply the boost algorithm to a member in the committee
Double_t Boost( TMVA::IMethod*, UInt_t imember ); Double_t Boost( TMVA::MethodBase*, UInt_t imember );
// ranking of input variables // ranking of input variables
const Ranking* CreateRanking(); const Ranking* CreateRanking();
// the option handling methods // the option handling methods
void DeclareOptions(); void DeclareOptions();
void ProcessOptions(); void ProcessOptions();
// accessors // accessors
const std::vector<TMVA::IMethod*>& GetCommittee() const { return f Committee; } const std::vector<TMVA::IMethod*>& GetCommittee() const { return f Committee; }
skipping to change at line 125 skipping to change at line 131
// get help message text // get help message text
void GetHelpMessage() const; void GetHelpMessage() const;
private: private:
// accessors // accessors
std::vector<IMethod*>& GetCommittee() { return fCommittee; } std::vector<IMethod*>& GetCommittee() { return fCommittee; }
std::vector<Double_t>& GetBoostWeights() { return fBoostWeights; } std::vector<Double_t>& GetBoostWeights() { return fBoostWeights; }
// boosting algorithm (adaptive boosting) // boosting algorithm (adaptive boosting)
Double_t AdaBoost( IMethod* ); Double_t AdaBoost( MethodBase* );
// boosting as a random re-weighting // boosting as a random re-weighting
Double_t Bagging( UInt_t imember); Double_t Bagging( UInt_t imember);
UInt_t fNMembers; // number of member s requested UInt_t fNMembers; // number of member s requested
std::vector<IMethod*> fCommittee; // the collection o f members std::vector<IMethod*> fCommittee; // the collection o f members
std::vector<Double_t> fBoostWeights; // the weights appl ied in the individual boosts std::vector<Double_t> fBoostWeights; // the weights appl ied in the individual boosts
TString fBoostType; // string specifyin g the boost type TString fBoostType; // string specifyin g the boost type
// options for the MVA method // options for the MVA method
Types::EMVA fMemberType; // the MVA method t o be boosted Types::EMVA fMemberType; // the MVA method t o be boosted
TString fMemberOption; // the options for that method TString fMemberOption; // the options for that method
Bool_t fUseMemberDecision; // use binary in formation from IsSignal Bool_t fUseMemberDecision; // use binary in formation from IsSignal
// use average classification from the members, or have the individua l members // use average classification from the members, or have the individua l members
Bool_t fUseWeightedMembers; // in the commit tee weighted from AdaBoost Bool_t fUseWeightedMembers; // in the commit tee weighted from AdaBoost
// Init used in the various constructors // Init used in the various constructors
void InitCommittee( void ); void Init( void );
//some histograms for monitoring //some histograms for monitoring
TH1F* fBoostFactorHist; // weights applied in boosting TH1F* fBoostFactorHist; // weights applied in boosting
TH2F* fErrFractHist; // error fraction v s member number TH2F* fErrFractHist; // error fraction v s member number
TTree* fMonitorNtuple; // monitoring ntupl e TTree* fMonitorNtuple; // monitoring ntupl e
Int_t fITree ; // ntuple var: ith member Int_t fITree ; // ntuple var: ith member
Double_t fBoostFactor; // ntuple var: boos t weight Double_t fBoostFactor; // ntuple var: boos t weight
Double_t fErrorFraction; // ntuple var: misc lassification error fraction Double_t fErrorFraction; // ntuple var: misc lassification error fraction
Int_t fNnodes; // ntuple var: nNod es Int_t fNnodes; // ntuple var: nNod es
 End of changes. 13 change blocks. 
15 lines changed or deleted 22 lines changed or added


 MethodCuts.h   MethodCuts.h 
// @(#)root/tmva $Id: MethodCuts.h 27320 2009-02-02 06:40:36Z brun $ // @(#)root/tmva $Id: MethodCuts.h 29246 2009-06-26 16:50:00Z brun $
// Author: Andreas Hoecker, Matt Jachowski, Peter Speckmayer, Helge Voss, K ai Voss // Author: Andreas Hoecker, Matt Jachowski, Peter Speckmayer, Helge Voss, K ai Voss
/************************************************************************** ******** /************************************************************************** ********
* Project: TMVA - a Root-integrated toolkit for multivariate data analysis * * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
* Package: TMVA * * Package: TMVA *
* Class : MethodCuts * * Class : MethodCuts *
* Web : http://tmva.sourceforge.net * * Web : http://tmva.sourceforge.net *
* * * *
* Description: * * Description: *
* Multivariate optimisation of signal efficiency for given background * * Multivariate optimisation of signal efficiency for given background *
skipping to change at line 58 skipping to change at line 58
#ifndef ROOT_TMVA_MethodBase #ifndef ROOT_TMVA_MethodBase
#include "TMVA/MethodBase.h" #include "TMVA/MethodBase.h"
#endif #endif
#ifndef ROOT_TMVA_BinarySearchTree #ifndef ROOT_TMVA_BinarySearchTree
#include "TMVA/BinarySearchTree.h" #include "TMVA/BinarySearchTree.h"
#endif #endif
#ifndef ROOT_TMVA_PDF #ifndef ROOT_TMVA_PDF
#include "TMVA/PDF.h" #include "TMVA/PDF.h"
#endif #endif
#ifndef ROOT_TMVA_TMatrixD #ifndef ROOT_TMVA_TMatrixDfwd
#include "TMatrixD.h" #ifndef ROOT_TMatrixDfwd
#include "TMatrixDfwd.h"
#endif
#endif #endif
#ifndef ROOT_TMVA_IFitterTarget #ifndef ROOT_TMVA_IFitterTarget
#ifndef ROOT_IFitterTarget
#include "IFitterTarget.h" #include "IFitterTarget.h"
#endif #endif
#endif
class TRandom; class TRandom;
namespace TMVA { namespace TMVA {
class Interval; class Interval;
class MethodCuts : public MethodBase, public IFitterTarget { class MethodCuts : public MethodBase, public IFitterTarget {
public: public:
MethodCuts( const TString& jobName, MethodCuts( const TString& jobName,
const TString& methodTitle, const TString& methodTitle,
DataSet& theData, DataSetInfo& theData,
const TString& theOption = "MC:150:10000:", const TString& theOption = "MC:150:10000:",
TDirectory* theTargetFile = 0 ); TDirectory* theTargetFile = 0 );
MethodCuts( DataSet& theData, MethodCuts( DataSetInfo& theData,
const TString& theWeightFile, const TString& theWeightFile,
TDirectory* theTargetDir = NULL ); TDirectory* theTargetDir = NULL );
// this is a workaround which is necessary since CINT is not capable
of handling dynamic casts
static MethodCuts* DynamicCast( IMethod* method ) { return dynamic_ca
st<MethodCuts*>(method); }
virtual ~MethodCuts( void ); virtual ~MethodCuts( void );
virtual Bool_t HasAnalysisType( Types::EAnalysisType type, UInt_t num
berClasses, UInt_t numberTargets );
// training method // training method
void Train( void ); void Train( void );
using MethodBase::WriteWeightsToStream; using MethodBase::WriteWeightsToStream;
using MethodBase::ReadWeightsFromStream; using MethodBase::ReadWeightsFromStream;
// write weights to file void WriteWeightsToStream ( std::ostream & o ) const;
void WriteWeightsToStream( ostream& o ) const; void AddWeightsXMLTo ( void* parent ) const;
// read weights from file void ReadWeightsFromStream( std::istream & i );
void ReadWeightsFromStream( istream& istr ); void ReadWeightsFromXML ( void* wghtnode );
// calculate the MVA value (for CUTs this is just a dummy) // calculate the MVA value (for CUTs this is just a dummy)
Double_t GetMvaValue(); Double_t GetMvaValue( Double_t* err = 0 );
// write method specific histos to target file // write method specific histos to target file
void WriteMonitoringHistosToFile( void ) const; void WriteMonitoringHistosToFile( void ) const;
// test the method // test the method
void Test( TTree* theTestTree ); void TestClassification();
// also overwrite: // also overwrite --> not computed for cuts
Double_t GetSeparation ( TH1*, TH1* ) const { return 0; } Double_t GetSeparation ( TH1*, TH1* ) const { return -1; }
Double_t GetSeparation ( PDF* = 0, PDF* = 0 ) const { return 0; } Double_t GetSeparation ( PDF* = 0, PDF* = 0 ) const { return -1; }
Double_t GetSignificance( void ) const { return 0; } Double_t GetSignificance( void ) const { return -1; }
Double_t GetmuTransform ( TTree *) { return 0; } Double_t GetmuTransform ( TTree *) { return -1; }
Double_t GetEfficiency ( TString, TTree *, Double_t& ); Double_t GetEfficiency ( const TString&, Types::ETreeType, Double_t&
Double_t GetTrainingEfficiency( TString ); );
Double_t GetTrainingEfficiency(const TString& );
// rarity distributions (signal or background (default) is uniform in [0,1]) // rarity distributions (signal or background (default) is uniform in [0,1])
Double_t GetRarity( Double_t, Types::ESBType ) const { return 0; } Double_t GetRarity( Double_t, Types::ESBType ) const { return 0; }
// accessors for Minuit // accessors for Minuit
Double_t ComputeEstimator( std::vector<Double_t> & ); Double_t ComputeEstimator( std::vector<Double_t> & );
Double_t EstimatorFunction( std::vector<Double_t> & ); Double_t EstimatorFunction( std::vector<Double_t> & );
Double_t EstimatorFunction( Int_t ievt1, Int_t ievt2 ); Double_t EstimatorFunction( Int_t ievt1, Int_t ievt2 );
void SetTestSignalEfficiency( Double_t effS ) { fTestSignalEff = effS ; } void SetTestSignalEfficiency( Double_t effS ) { fTestSignalEff = effS; }
// retrieve cut values for given signal efficiency // retrieve cut values for given signal efficiency
void PrintCuts( Double_t effS ) const; void PrintCuts( Double_t effS ) const;
Double_t GetCuts( Double_t effS, std::vector<Double_t>& cutMin, std:: Double_t GetCuts ( Double_t effS, std::vector<Double_t>& cutMin, std
vector<Double_t>& cutMax ) const; ::vector<Double_t>& cutMax ) const;
Double_t GetCuts( Double_t effS, Double_t* cutMin, Double_t* cutMax ) Double_t GetCuts ( Double_t effS, Double_t* cutMin, Double_t* cutMax
const; ) const;
// ranking of input variables // ranking of input variables (not available for cuts)
const Ranking* CreateRanking() { return 0; } const Ranking* CreateRanking() { return 0; }
void DeclareOptions(); void DeclareOptions();
void ProcessOptions(); void ProcessOptions();
// maximum |cut| value // maximum |cut| value
static const Double_t fgMaxAbsCutVal; static const Double_t fgMaxAbsCutVal;
// no check of options at this place
void CheckSetup() {}
protected: protected:
// make ROOT-independent C++ class for classifier response (classifie r-specific implementation) // make ROOT-independent C++ class for classifier response (classifie r-specific implementation)
void MakeClassSpecific( std::ostream&, const TString& ) const; void MakeClassSpecific( std::ostream&, const TString& ) const;
// get help message text // get help message text
void GetHelpMessage() const; void GetHelpMessage() const;
private: private:
skipping to change at line 174 skipping to change at line 186
kUsePDFs }; kUsePDFs };
// improve the Monte Carlo by providing some additional information // improve the Monte Carlo by providing some additional information
enum EFitParameters { kNotEnforced = 0, enum EFitParameters { kNotEnforced = 0,
kForceMin, kForceMin,
kForceMax, kForceMax,
kForceSmart, kForceSmart,
kForceVerySmart }; kForceVerySmart };
// general // general
TString fFitMethodS; // chosen fit method (string) TString fFitMethodS; // chosen fit method (st
EFitMethodType fFitMethod; // chosen fit method ring)
TString fEffMethodS; // chosen efficiency calculat EFitMethodType fFitMethod; // chosen fit method
ion method (string) TString fEffMethodS; // chosen efficiency cal
EEffMethod fEffMethod; // chosen efficiency calculat culation method (string)
ion method EEffMethod fEffMethod; // chosen efficiency cal
vector<EFitParameters>* fFitParams; // vector for series of fit m culation method
ethods std::vector<EFitParameters>* fFitParams; // vector for series of
Double_t fTestSignalEff; // used to test optimized sig fit methods
nal efficiency Double_t fTestSignalEff; // used to test optimize
Double_t* fCutRangeMin; // minimum of allowed cut ran d signal efficiency
ge Double_t fEffSMin; // used to test optimize
Double_t* fCutRangeMax; // maximum of allowed cut ran d signal efficiency
ge Double_t fEffSMax; // used to test optimize
vector<Interval*> fCutRange; // allowed ranges for cut opt d signal efficiency
imisation Double_t* fCutRangeMin; // minimum of allowed cu
t range
Double_t* fCutRangeMax; // maximum of allowed cu
t range
std::vector<Interval*> fCutRange; // allowed ranges for cu
t optimisation
// for the use of the binary tree method // for the use of the binary tree method
BinarySearchTree* fBinaryTreeS; BinarySearchTree* fBinaryTreeS;
BinarySearchTree* fBinaryTreeB; BinarySearchTree* fBinaryTreeB;
// MC method // MC method
Int_t fNRandCuts; // number of random cut sampl Double_t** fCutMin; // minimum requirement
ings Double_t** fCutMax; // maximum requirement
Double_t** fCutMin; // minimum requirement Double_t* fTmpCutMin; // temporary minimum req
Double_t** fCutMax; // maximum requirement uirement
Double_t* fTmpCutMin; // temporary minimum requirem Double_t* fTmpCutMax; // temporary maximum req
ent uirement
Double_t* fTmpCutMax; // temporary maximum requirem TString* fAllVarsI; // what to do with varia
ent bles
TString* fAllVarsI; // what to do with variables
// relevant for all methods // relevant for all methods
Int_t fNpar; // number of parameters in fi Int_t fNpar; // number of parameters
t (default: 2*Nvar) in fit (default: 2*Nvar)
Double_t fEffRef; // reference efficiency Double_t fEffRef; // reference efficiency
vector<Int_t>* fRangeSign; // used to match cuts to fit std::vector<Int_t>* fRangeSign; // used to match cuts to
parameters (and vice versa) fit parameters (and vice versa)
TRandom* fRandom; // random generator for MC op TRandom* fRandom; // random generator for
timisation method MC optimisation method
// basic statistics // basic statistics
vector<Double_t>* fMeanS; // means of variables (signal std::vector<Double_t>* fMeanS; // means of variables (s
) ignal)
vector<Double_t>* fMeanB; // means of variables (backgr std::vector<Double_t>* fMeanB; // means of variables (b
ound) ackground)
vector<Double_t>* fRmsS; // RMSs of variables (signal) std::vector<Double_t>* fRmsS; // RMSs of variables (si
vector<Double_t>* fRmsB; // RMSs of variables (backgro gnal)
und) std::vector<Double_t>* fRmsB; // RMSs of variables (ba
ckground)
TH1* fEffBvsSLocal; // intermediate eff. backgrou nd versus eff signal histo TH1* fEffBvsSLocal; // intermediate eff. bac kground versus eff signal histo
// PDF section // PDF section
vector<TH1*>* fVarHistS; // reference histograms (sign std::vector<TH1*>* fVarHistS; // reference histograms
al) (signal)
vector<TH1*>* fVarHistB; // reference histograms (back std::vector<TH1*>* fVarHistB; // reference histograms
ground) (background)
vector<TH1*>* fVarHistS_smooth; // smoothed reference histogr std::vector<TH1*>* fVarHistS_smooth; // smoothed reference hi
ams (signal) stograms (signal)
vector<TH1*>* fVarHistB_smooth; // smoothed reference histogr std::vector<TH1*>* fVarHistB_smooth; // smoothed reference hi
ams (background) stograms (background)
vector<PDF*>* fVarPdfS; // reference PDFs (signal) std::vector<PDF*>* fVarPdfS; // reference PDFs (signa
vector<PDF*>* fVarPdfB; // reference PDFs (background l)
) std::vector<PDF*>* fVarPdfB; // reference PDFs (backg
round)
// negative efficiencies
Bool_t fNegEffWarning; // flag risen in case of
negative efficiency warning
// the definition of fit parameters can be different from the actual // the definition of fit parameters can be different from the actual
// cut requirements; these functions provide the matching // cut requirements; these functions provide the matching
void MatchParsToCuts( const std::vector<Double_t>&, Double_t*, Do uble_t* ); void MatchParsToCuts( const std::vector<Double_t>&, Double_t*, Do uble_t* );
void MatchParsToCuts( Double_t*, Double_t*, Double_t* ); void MatchParsToCuts( Double_t*, Double_t*, Double_t* );
void MatchCutsToPars( std::vector<Double_t>&, Double_t*, Double_t * ); void MatchCutsToPars( std::vector<Double_t>&, Double_t*, Double_t * );
void MatchCutsToPars( std::vector<Double_t>&, Double_t**, Double_ t**, Int_t ibin ); void MatchCutsToPars( std::vector<Double_t>&, Double_t**, Double_ t**, Int_t ibin );
// creates PDFs in case these are used to compute efficiencies // creates PDFs in case these are used to compute efficiencies
// (corresponds to: EffMethod == kUsePDFs) // (corresponds to: EffMethod == kUsePDFs)
void CreateVariablePDFs( void ); void CreateVariablePDFs( void );
// checks ordering of variables in vectors
Bool_t SanityChecks( void );
// returns signal and background efficiencies for given cuts - using event counting // returns signal and background efficiencies for given cuts - using event counting
void GetEffsfromSelection( Double_t* cutMin, Double_t* cutMax, void GetEffsfromSelection( Double_t* cutMin, Double_t* cutMax,
Double_t& effS, Double_t& effB); Double_t& effS, Double_t& effB );
// returns signal and background efficiencies for given cuts - using PDFs // returns signal and background efficiencies for given cuts - using PDFs
void GetEffsfromPDFs( Double_t* cutMin, Double_t* cutMax, void GetEffsfromPDFs( Double_t* cutMin, Double_t* cutMax,
Double_t& effS, Double_t& effB ); Double_t& effS, Double_t& effB );
// default initialisation method called by all constructors // default initialisation method called by all constructors
void InitCuts( void ); void Init( void );
ClassDef(MethodCuts,0) // Multivariate optimisation of signal effici ency ClassDef(MethodCuts,0) // Multivariate optimisation of signal effici ency
}; };
} // namespace TMVA } // namespace TMVA
#endif #endif
 End of changes. 28 change blocks. 
86 lines changed or deleted 109 lines changed or added


 MethodFDA.h   MethodFDA.h 
// @(#)root/tmva $Id: MethodFDA.h 21630 2008-01-10 19:40:44Z brun $ // @(#)root/tmva $Id: MethodFDA.h 29122 2009-06-22 06:51:30Z brun $
// Author: Andreas Hoecker, Peter Speckmayer // Author: Andreas Hoecker, Peter Speckmayer
/************************************************************************** ******** /************************************************************************** ********
* Project: TMVA - a Root-integrated toolkit for multivariate data analysis * * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
* Package: TMVA * * Package: TMVA *
* Class : MethodFDA * * Class : MethodFDA *
* Web : http://tmva.sourceforge.net * * Web : http://tmva.sourceforge.net *
* * * *
* Description: * * Description: *
* Function discriminant analysis (FDA). This simple classifier * * Function discriminant analysis (FDA). This simple classifier *
skipping to change at line 44 skipping to change at line 44
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// // // //
// MethodFDA // // MethodFDA //
// // // //
// Function discriminant analysis (FDA). This simple classifier // // Function discriminant analysis (FDA). This simple classifier //
// fits any user-defined TFormula (via option configuration string) to // // fits any user-defined TFormula (via option configuration string) to //
// the training data by requiring a formula response of 1 (0) to signal // // the training data by requiring a formula response of 1 (0) to signal //
// (background) events. The parameter fitting is done via the abstract // // (background) events. The parameter fitting is done via the abstract //
// class FitterBase, featuring Monte Carlo sampling, Genetic // // class FitterBase, featuring Monte Carlo sampling, Genetic //
// Algorithm, Simulated Annealing, MINUIT and combinations of these. // // Algorithm, Simulated Annealing, MINUIT and combinations of these. //
//
//
// Can compute one-dimensional regression
//
// // // //
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
#ifndef ROOT_TMVA_MethodBase #ifndef ROOT_TMVA_MethodBase
#include "TMVA/MethodBase.h" #include "TMVA/MethodBase.h"
#endif
#ifndef ROOT_TMVA_IFitterTarget
#include "TMVA/IFitterTarget.h" #include "TMVA/IFitterTarget.h"
#endif #endif
class TFormula; class TFormula;
namespace TMVA { namespace TMVA {
class Interval; class Interval;
class Event; class Event;
class FitterBase; class FitterBase;
class MethodFDA : public MethodBase, public IFitterTarget { class MethodFDA : public MethodBase, public IFitterTarget {
public: public:
MethodFDA( const TString& jobName, MethodFDA( const TString& jobName,
const TString& methodTitle, const TString& methodTitle,
DataSet& theData, DataSetInfo& theData,
const TString& theOption = "", const TString& theOption = "",
TDirectory* theTargetDir = 0 ); TDirectory* theTargetDir = 0 );
MethodFDA( DataSet& theData, MethodFDA( DataSetInfo& theData,
const TString& theWeightFile, const TString& theWeightFile,
TDirectory* theTargetDir = NULL ); TDirectory* theTargetDir = NULL );
virtual ~MethodFDA( void ); virtual ~MethodFDA( void );
Bool_t HasAnalysisType( Types::EAnalysisType type, UInt_t numberClass
es, UInt_t numberTargets );
// training method // training method
void Train( void ); void Train( void );
using MethodBase::WriteWeightsToStream; using MethodBase::WriteWeightsToStream;
using MethodBase::ReadWeightsFromStream; using MethodBase::ReadWeightsFromStream;
// write weights to file void WriteWeightsToStream ( std::ostream & o ) const;
void WriteWeightsToStream( ostream& o ) const; void AddWeightsXMLTo ( void* parent ) const;
// read weights from file void ReadWeightsFromStream( std::istream & i );
void ReadWeightsFromStream( istream& istr ); void ReadWeightsFromXML ( void* wghtnode );
// calculate the MVA value // calculate the MVA value
Double_t GetMvaValue(); Double_t GetMvaValue( Double_t* err = 0 );
std::vector<Float_t>& GetRegressionValues();
void InitFDA( void ); void Init( void );
// ranking of input variables // ranking of input variables
const Ranking* CreateRanking() { return 0; } const Ranking* CreateRanking() { return 0; }
Double_t EstimatorFunction( std::vector<Double_t>& ); Double_t EstimatorFunction( std::vector<Double_t>& );
// no check of options at this place
void CheckSetup() {}
protected: protected:
// make ROOT-independent C++ class for classifier response (classifie r-specific implementation) // make ROOT-independent C++ class for classifier response (classifie r-specific implementation)
void MakeClassSpecific( std::ostream&, const TString& ) const; void MakeClassSpecific( std::ostream&, const TString& ) const;
// get help message text // get help message text
void GetHelpMessage() const; void GetHelpMessage() const;
private: private:
// interpret formula expression and compute estimator // create and interpret formula expression and compute estimator
Double_t InterpretFormula( const Event&, std::vector<Double_t>& pars void CreateFormula ();
); Double_t InterpretFormula( const Event*, std::vector<Double_t>& pars
);
// clean up // clean up
void ClearAll(); void ClearAll();
// print fit results // print fit results
void PrintResults( const TString&, std::vector<Double_t>&, const Doub le_t ) const; void PrintResults( const TString&, std::vector<Double_t>&, const Doub le_t ) const;
// the option handling methods // the option handling methods
void DeclareOptions(); void DeclareOptions();
void ProcessOptions(); void ProcessOptions();
skipping to change at line 135 skipping to change at line 147
TFormula* fFormula; // the discrimination fun ction TFormula* fFormula; // the discrimination fun ction
Int_t fNPars; // number of parameters Int_t fNPars; // number of parameters
std::vector<Interval*> fParRange; // ranges of parameters std::vector<Interval*> fParRange; // ranges of parameters
std::vector<Double_t> fBestPars; // the pars that optimise (minimise) the estimator std::vector<Double_t> fBestPars; // the pars that optimise (minimise) the estimator
TString fFitMethod; // estimator optimisation method TString fFitMethod; // estimator optimisation method
TString fConverger; // fitmethod uses fConver ger as intermediate step to converge into local minimas TString fConverger; // fitmethod uses fConver ger as intermediate step to converge into local minimas
FitterBase* fFitter; // the fitter used in the training FitterBase* fFitter; // the fitter used in the training
IFitterTarget* fConvergerFitter; // intermediate fitter IFitterTarget* fConvergerFitter; // intermediate fitter
// speed up access to training events by caching
std::vector<const Event*> fEventsSig; // event cache (sig
nal)
std::vector<const Event*> fEventsBkg; // event cache (bac
kground)
// sum of weights (this should become centrally available through the dataset) // sum of weights (this should become centrally available through the dataset)
Double_t fSumOfWeightsSig; // sum of weights (signal ) Double_t fSumOfWeightsSig; // sum of weights (signal )
Double_t fSumOfWeightsBkg; // sum of weights (backgr ound) Double_t fSumOfWeightsBkg; // sum of weights (backgr ound)
Double_t fSumOfWeights; // sum of weights
ClassDef(MethodFDA,0) // Function Discriminant Analysis ClassDef(MethodFDA,0) // Function Discriminant Analysis
}; };
} // namespace TMVA } // namespace TMVA
#endif // MethodFDA_H #endif // MethodFDA_H
 End of changes. 14 change blocks. 
18 lines changed or deleted 29 lines changed or added


 MethodFisher.h   MethodFisher.h 
// @(#)root/tmva $Id: MethodFisher.h 21630 2008-01-10 19:40:44Z brun $ // @(#)root/tmva $Id: MethodFisher.h 29122 2009-06-22 06:51:30Z brun $
// Author: Andreas Hoecker, Xavier Prudent, Joerg Stelzer, Helge Voss, Kai Voss // Author: Andreas Hoecker, Xavier Prudent, Joerg Stelzer, Helge Voss, Kai Voss
/************************************************************************** ******** /************************************************************************** ********
* Project: TMVA - a Root-integrated toolkit for multivariate data analysis * * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
* Package: TMVA * * Package: TMVA *
* Class : MethodFisher * * Class : MethodFisher *
* Web : http://tmva.sourceforge.net * * Web : http://tmva.sourceforge.net *
* * * *
* Description: * * Description: *
* Analysis of Fisher discriminant (Fisher or Mahalanobis approach) * * Analysis of Fisher discriminant (Fisher or Mahalanobis approach) *
skipping to change at line 32 skipping to change at line 32
* * * *
* Copyright (c) 2005: * * Copyright (c) 2005: *
* CERN, Switzerland * * CERN, Switzerland *
* U. of Victoria, Canada * * U. of Victoria, Canada *
* MPI-K Heidelberg, Germany * * MPI-K Heidelberg, Germany *
* LAPP, Annecy, France * * LAPP, Annecy, France *
* * * *
* Redistribution and use in source and binary forms, with or without * * Redistribution and use in source and binary forms, with or without *
* modification, are permitted according to the terms listed in LICENSE * * modification, are permitted according to the terms listed in LICENSE *
* (http://tmva.sourceforge.net/LICENSE) * * (http://tmva.sourceforge.net/LICENSE) *
* *
************************************************************************** ********/ ************************************************************************** ********/
#ifndef ROOT_TMVA_MethodFisher #ifndef ROOT_TMVA_MethodFisher
#define ROOT_TMVA_MethodFisher #define ROOT_TMVA_MethodFisher
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// // // //
// MethodFisher // // MethodFisher //
// // // //
// Analysis of Fisher discriminant (Fisher or Mahalanobis approach) // // Analysis of Fisher discriminant (Fisher or Mahalanobis approach) //
// // // //
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
#include <vector> #include <vector>
#ifndef ROOT_TMVA_MethodBase #ifndef ROOT_TMVA_MethodBase
#include "TMVA/MethodBase.h" #include "TMVA/MethodBase.h"
#endif #endif
#ifndef ROOT_TMVA_TMatrix #ifndef ROOT_TMatrixDfwd
#include "TMatrix.h" #include "TMatrixDfwd.h"
#endif
#ifndef ROOT_TMatrixD
#include "TMatrixD.h"
#endif #endif
class TH1D; class TH1D;
namespace TMVA { namespace TMVA {
class MethodFisher : public MethodBase { class MethodFisher : public MethodBase {
public: public:
MethodFisher( const TString& jobName, MethodFisher( const TString& jobName,
const TString& methodTitle, const TString& methodTitle,
DataSet& theData, DataSetInfo& dsi,
const TString& theOption = "Fisher", const TString& theOption = "Fisher",
TDirectory* theTargetDir = 0 ); TDirectory* theTargetDir = 0 );
MethodFisher( DataSet& theData, MethodFisher( DataSetInfo& dsi,
const TString& theWeightFile, const TString& theWeightFile,
TDirectory* theTargetDir = NULL ); TDirectory* theTargetDir = NULL );
virtual ~MethodFisher( void ); virtual ~MethodFisher( void );
virtual Bool_t HasAnalysisType( Types::EAnalysisType type, UInt_t num
berClasses, UInt_t numberTargets );
// training method // training method
void Train( void ); void Train( void );
using MethodBase::WriteWeightsToStream; using MethodBase::WriteWeightsToStream;
using MethodBase::ReadWeightsFromStream; using MethodBase::ReadWeightsFromStream;
// write weights to stream // write weights to stream
void WriteWeightsToStream( std::ostream & o) const; void WriteWeightsToStream( std::ostream & o) const;
void AddWeightsXMLTo ( void* parent ) const;
// read weights from stream // read weights from stream
void ReadWeightsFromStream( std::istream & i ); void ReadWeightsFromStream( std::istream & i );
void ReadWeightsFromXML ( void* wghtnode );
// calculate the MVA value // calculate the MVA value
Double_t GetMvaValue(); Double_t GetMvaValue( Double_t* err = 0 );
enum EFisherMethod { kFisher, kMahalanobis }; enum EFisherMethod { kFisher, kMahalanobis };
EFisherMethod GetFisherMethod( void ) { return fFisherMethod; } EFisherMethod GetFisherMethod( void ) { return fFisherMethod; }
// ranking of input variables // ranking of input variables
const Ranking* CreateRanking(); const Ranking* CreateRanking();
protected: protected:
// make ROOT-independent C++ class for classifier response (classifie r-specific implementation) // make ROOT-independent C++ class for classifier response (classifie r-specific implementation)
skipping to change at line 153 skipping to change at line 153
// covariance matrices // covariance matrices
TMatrixD *fBetw; // between-class matrix TMatrixD *fBetw; // between-class matrix
TMatrixD *fWith; // within-class matrix TMatrixD *fWith; // within-class matrix
TMatrixD *fCov; // full covariance matrix TMatrixD *fCov; // full covariance matrix
// number of events (sumOfWeights) // number of events (sumOfWeights)
Double_t fSumOfWeightsS; // sum-of-weights for signal training events Double_t fSumOfWeightsS; // sum-of-weights for signal training events
Double_t fSumOfWeightsB; // sum-of-weights for background trai ning events Double_t fSumOfWeightsB; // sum-of-weights for background trai ning events
std::vector<Double_t> *fDiscrimPow; // discriminating power std::vector<Double_t>* fDiscrimPow; // discriminating power
std::vector<Double_t> *fFisherCoeff; // Fisher coefficients std::vector<Double_t>* fFisherCoeff; // Fisher coefficients
Double_t fF0; // offset Double_t fF0; // offset
// default initialisation called by all constructors // default initialisation called by all constructors
void InitFisher( void ); void Init( void );
ClassDef(MethodFisher,0) // Analysis of Fisher discriminant (Fisher o r Mahalanobis approach) ClassDef(MethodFisher,0) // Analysis of Fisher discriminant (Fisher o r Mahalanobis approach)
}; };
} // namespace TMVA } // namespace TMVA
#endif // MethodFisher_H #endif // MethodFisher_H
 End of changes. 11 change blocks. 
13 lines changed or deleted 14 lines changed or added


 MethodHMatrix.h   MethodHMatrix.h 
// @(#)root/tmva $Id: MethodHMatrix.h 21630 2008-01-10 19:40:44Z brun $ // @(#)root/tmva $Id: MethodHMatrix.h 29122 2009-06-22 06:51:30Z brun $
// Author: Andreas Hoecker, Joerg Stelzer, Helge Voss, Kai Voss // Author: Andreas Hoecker, Joerg Stelzer, Helge Voss, Kai Voss
/************************************************************************** ******** /************************************************************************** ********
* Project: TMVA - a Root-integrated toolkit for multivariate data analysis * * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
* Package: TMVA * * Package: TMVA *
* Class : MethodHMatrix * * Class : MethodHMatrix *
* Web : http://tmva.sourceforge.net * * Web : http://tmva.sourceforge.net *
* * * *
* Description: * * Description: *
* H-Matrix method, which is implemented as a simple comparison of * * H-Matrix method, which is implemented as a simple comparison of *
* chi-squared estimators for signal and background, taking into accou nt * * chi-squared estimators for signal and background, taking into accou nt *
* the linear correlations between the input variables. * * the linear correlations between the input variables. *
* Method is (also) used by D0 Collaboration (FNAL) for electron * * Method is (also) used by D0 Collaboration (FNAL) for electron *
* identification; for more information, see, eg, * * identification; for more information, see, eg, *
* http://www-d0.fnal.gov/d0dist/dist/packages/tau_hmchisq/devel/doc/ * * http://www-d0.fnal.gov/d0dist/dist/packages/tau_hmchisq/devel/doc/ *
* * * *
* Authors (alphabetical): * * Authors (alphabetical): *
* Andreas Hoecker <Andreas.Hocker@cern.ch> - CERN, Switzerland * * Andreas Hoecker <Andreas.Hocker@cern.ch> - CERN, Switzerland *
* Xavier Prudent <prudent@lapp.in2p3.fr> - LAPP, France *
* Helge Voss <Helge.Voss@cern.ch> - MPI-K Heidelberg, German y * * Helge Voss <Helge.Voss@cern.ch> - MPI-K Heidelberg, German y *
* Kai Voss <Kai.Voss@cern.ch> - U. of Victoria, Canada * * Kai Voss <Kai.Voss@cern.ch> - U. of Victoria, Canada *
* * * *
* Copyright (c) 2005: * * Copyright (c) 2005: *
* CERN, Switzerland * * CERN, Switzerland *
* U. of Victoria, Canada * * U. of Victoria, Canada *
* MPI-K Heidelberg, Germany * * MPI-K Heidelberg, Germany *
* LAPP, Annecy, France *
* * * *
* Redistribution and use in source and binary forms, with or without * * Redistribution and use in source and binary forms, with or without *
* modification, are permitted according to the terms listed in LICENSE * * modification, are permitted according to the terms listed in LICENSE *
* (http://tmva.sourceforge.net/LICENSE) * * (http://tmva.sourceforge.net/LICENSE) *
************************************************************************** ********/ ************************************************************************** ********/
#ifndef ROOT_TMVA_MethodHMatrix #ifndef ROOT_TMVA_MethodHMatrix
#define ROOT_TMVA_MethodHMatrix #define ROOT_TMVA_MethodHMatrix
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
skipping to change at line 51 skipping to change at line 49
// // // //
// H-Matrix method, which is implemented as a simple comparison of // // H-Matrix method, which is implemented as a simple comparison of //
// chi-squared estimators for signal and background, taking into // // chi-squared estimators for signal and background, taking into //
// account the linear correlations between the input variables // // account the linear correlations between the input variables //
// // // //
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
#ifndef ROOT_TMVA_MethodBase #ifndef ROOT_TMVA_MethodBase
#include "TMVA/MethodBase.h" #include "TMVA/MethodBase.h"
#endif #endif
#ifndef ROOT_TMVA_TMatrixD #ifndef ROOT_TMVA_TMatrixDfwd
#include "TMatrixD.h" #ifndef ROOT_TMatrixDfwd
#include "TMatrixDfwd.h"
#endif
#endif #endif
#ifndef ROOT_TMVA_TVectorD #ifndef ROOT_TMVA_TVectorD
#ifndef ROOT_TVectorD
#include "TVectorD.h" #include "TVectorD.h"
#endif #endif
#endif
namespace TMVA { namespace TMVA {
class MethodHMatrix : public MethodBase { class MethodHMatrix : public MethodBase {
public: public:
MethodHMatrix( const TString& jobName, MethodHMatrix( const TString& jobName,
const TString& methodTitle, const TString& methodTitle,
DataSet& theData, DataSetInfo& theData,
const TString& theOption = "", const TString& theOption = "",
TDirectory* theTargetDir = 0 ); TDirectory* theTargetDir = 0 );
MethodHMatrix( DataSet& theData, MethodHMatrix( DataSetInfo& theData,
const TString& theWeightFile, const TString& theWeightFile,
TDirectory* theTargetDir = NULL ); TDirectory* theTargetDir = NULL );
virtual ~MethodHMatrix( void ); virtual ~MethodHMatrix();
virtual Bool_t HasAnalysisType( Types::EAnalysisType type, UInt_t num
berClasses, UInt_t numberTargets );
// training method // training method
void Train( void ); void Train();
using MethodBase::WriteWeightsToStream; using MethodBase::WriteWeightsToStream;
using MethodBase::ReadWeightsFromStream; using MethodBase::ReadWeightsFromStream;
// write weights to file // write weights to file
void WriteWeightsToStream( ostream& o ) const; void WriteWeightsToStream( ostream& o ) const;
void AddWeightsXMLTo( void* parent ) const;
// read weights from file // read weights from file
void ReadWeightsFromStream( istream& istr ); void ReadWeightsFromStream( istream& istr );
void ReadWeightsFromXML( void* wghtnode );
// calculate the MVA value // calculate the MVA value
Double_t GetMvaValue(); Double_t GetMvaValue( Double_t* err = 0 );
// ranking of input variables // ranking of input variables
const Ranking* CreateRanking() { return 0; } const Ranking* CreateRanking() { return 0; }
protected: protected:
// make ROOT-independent C++ class for classifier response (classifie r-specific implementation) // make ROOT-independent C++ class for classifier response (classifie r-specific implementation)
void MakeClassSpecific( std::ostream&, const TString& ) const; void MakeClassSpecific( std::ostream&, const TString& ) const;
// get help message text // get help message text
skipping to change at line 122 skipping to change at line 127
// compute correlation matrices // compute correlation matrices
void ComputeCovariance( Bool_t, TMatrixD* ); void ComputeCovariance( Bool_t, TMatrixD* );
// arrays of input evt vs. variable // arrays of input evt vs. variable
TMatrixD* fInvHMatrixS; // inverse H-matrix (signal) TMatrixD* fInvHMatrixS; // inverse H-matrix (signal)
TMatrixD* fInvHMatrixB; // inverse H-matrix (background) TMatrixD* fInvHMatrixB; // inverse H-matrix (background)
TVectorD* fVecMeanS; // vector of mean values (signal) TVectorD* fVecMeanS; // vector of mean values (signal)
TVectorD* fVecMeanB; // vector of mean values (background) TVectorD* fVecMeanB; // vector of mean values (background)
// default initialisation method called by all constructors // default initialisation method called by all constructors
void InitHMatrix( void ); void Init();
ClassDef(MethodHMatrix,0) // H-Matrix method, a simple comparison of chi-squared estimators for signal and background ClassDef(MethodHMatrix,0) // H-Matrix method, a simple comparison of chi-squared estimators for signal and background
}; };
} // namespace TMVA } // namespace TMVA
#endif #endif
 End of changes. 14 change blocks. 
12 lines changed or deleted 18 lines changed or added


 MethodKNN.h   MethodKNN.h 
// @(#)root/tmva $Id: MethodKNN.h 21630 2008-01-10 19:40:44Z brun $ // @(#)root/tmva $Id: MethodKNN.h 29122 2009-06-22 06:51:30Z brun $
// Author: Rustem Ospanov // Author: Rustem Ospanov
/************************************************************************** ******** /************************************************************************** ********
* Project: TMVA - a Root-integrated toolkit for multivariate data analysis * * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
* Package: TMVA * * Package: TMVA *
* Class : MethodKNN * * Class : MethodKNN *
* Web : http://tmva.sourceforge.net * * Web : http://tmva.sourceforge.net *
* * * *
* Description: * * Description: *
* Analysis of k-nearest neighbor * * Analysis of k-nearest neighbor *
skipping to change at line 40 skipping to change at line 40
// // // //
// MethodKNN // // MethodKNN //
// // // //
// Analysis of k-nearest neighbor // // Analysis of k-nearest neighbor //
// // // //
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
#include <vector> #include <vector>
#include <map> #include <map>
// Local
#ifndef ROOT_TMVA_MethodBase #ifndef ROOT_TMVA_MethodBase
#include "TMVA/MethodBase.h" #include "TMVA/MethodBase.h"
#endif #endif
#ifndef ROOT_TMVA_KNN_ModulekNN #ifndef ROOT_TMVA_ModulekNN
#include "TMVA/ModulekNN.h" #include "TMVA/ModulekNN.h"
#endif #endif
// SVD and linear discriminat code
#ifndef ROOT_TMVA_LDA
#include "TMVA/LDA.h"
#endif
namespace TMVA namespace TMVA
{ {
namespace kNN namespace kNN
{ {
class ModulekNN; class ModulekNN;
} }
class MethodKNN : public MethodBase class MethodKNN : public MethodBase
{ {
public: public:
MethodKNN(const TString& jobName, MethodKNN(const TString& jobName,
const TString& methodTitle, const TString& methodTitle,
DataSet& theData, DataSetInfo& theData,
const TString& theOption = "KNN", const TString& theOption = "KNN",
TDirectory* theTargetDir = NULL); TDirectory* theTargetDir = NULL);
MethodKNN(DataSet& theData, MethodKNN(DataSetInfo& theData,
const TString& theWeightFile, const TString& theWeightFile,
TDirectory* theTargetDir = NULL); TDirectory* theTargetDir = NULL);
virtual ~MethodKNN( void ); virtual ~MethodKNN( void );
virtual Bool_t HasAnalysisType( Types::EAnalysisType type, UInt_t num
berClasses, UInt_t numberTargets );
void Train( void ); void Train( void );
Double_t GetMvaValue(); Double_t GetMvaValue( Double_t* err = 0 );
const std::vector<Float_t>& GetRegressionValues();
using MethodBase::WriteWeightsToStream; using MethodBase::WriteWeightsToStream;
using MethodBase::ReadWeightsFromStream; using MethodBase::ReadWeightsFromStream;
void WriteWeightsToStream(std::ostream& o) const; void WriteWeightsToStream(std::ostream& o) const;
void WriteWeightsToStream(TFile& rf) const; void WriteWeightsToStream(TFile& rf) const;
void AddWeightsXMLTo( void* parent ) const;
void ReadWeightsFromXML( void* wghtnode );
void ReadWeightsFromStream(std::istream& istr); void ReadWeightsFromStream(std::istream& istr);
void ReadWeightsFromStream(TFile &rf); void ReadWeightsFromStream(TFile &rf);
const Ranking* CreateRanking(); const Ranking* CreateRanking();
protected: protected:
// make ROOT-independent C++ class for classifier response (classifie r-specific implementation) // make ROOT-independent C++ class for classifier response (classifie r-specific implementation)
void MakeClassSpecific( std::ostream&, const TString& ) const; void MakeClassSpecific( std::ostream&, const TString& ) const;
skipping to change at line 100 skipping to change at line 111
// get help message text // get help message text
void GetHelpMessage() const; void GetHelpMessage() const;
private: private:
// the option handling methods // the option handling methods
void DeclareOptions(); void DeclareOptions();
void ProcessOptions(); void ProcessOptions();
// default initialisation called by all constructors // default initialisation called by all constructors
void InitKNN( void ); void Init( void );
// create kd-tree (binary tree) structure // create kd-tree (binary tree) structure
void MakeKNN( void ); void MakeKNN( void );
// polynomial kernel weight function // polynomial and Gaussian kernel weight function
double PolKernel(double value) const; Double_t PolnKernel(Double_t value) const;
Double_t GausKernel(const kNN::Event &event_knn, const kNN::Event &ev
ent, const std::vector<Double_t> &svec) const;
Double_t getKernelRadius(const kNN::List &rlist) const;
const std::vector<Double_t> getRMS(const kNN::List &rlist, const kNN:
:Event &event_knn) const;
double getLDAValue(const kNN::List &rlist, const kNN::Event &event_kn
n);
private: private:
// number of events (sumOfWeights) // number of events (sumOfWeights)
Double_t fSumOfWeightsS; // sum-of-weights for signal training events Double_t fSumOfWeightsS; // sum-of-weights for signal training events
Double_t fSumOfWeightsB; // sum-of-weights for background trai ning events Double_t fSumOfWeightsB; // sum-of-weights for background trai ning events
kNN::ModulekNN *fModule; //! module where all work is done kNN::ModulekNN *fModule; //! module where all work is done
Int_t fnkNN; // number of k-nearest neighbors Int_t fnkNN; // number of k-nearest neighbors
Int_t fTreeOptDepth; // number of binary tree levels used for opti mization Int_t fBalanceDepth; // number of binary tree levels used for bala ncing tree
Float_t fScaleFrac; // fraction of events used for scaling Float_t fScaleFrac; // fraction of events used to compute variabl
e width
Float_t fSigmaFact; // scale factor for Gaussian sigma in Gaus. k
ernel
TString fKernel; // ="Gaus","Poln" - kernel type for smoothing
Bool_t fUseKernel; // use polynomial kernel weight function
Bool_t fTrim; // set equal number of signal and background events Bool_t fTrim; // set equal number of signal and background events
Bool_t fUseKernel; // use polynomial kernel weight function
Bool_t fUseWeight; // use weights to count kNN
Bool_t fUseLDA; // use local linear discriminat analysis to c
ompute MVA
kNN::EventVec fEvent; //! (untouched) events used for learning
kNN::EventVec fEvent; // (untouched) events used for learning LDA fLDA; //! Experimental feature for local knn analys is
ClassDef(MethodKNN,0) // k Nearest Neighbour classifier ClassDef(MethodKNN,0) // k Nearest Neighbour classifier
}; };
} // namespace TMVA } // namespace TMVA
#endif // MethodKNN #endif // MethodKNN
 End of changes. 16 change blocks. 
12 lines changed or deleted 43 lines changed or added


 MethodLikelihood.h   MethodLikelihood.h 
// @(#)root/tmva $Id: MethodLikelihood.h 21630 2008-01-10 19:40:44Z brun $ // @(#)root/tmva $Id: MethodLikelihood.h 29122 2009-06-22 06:51:30Z brun $
// Author: Andreas Hoecker, Joerg Stelzer, Helge Voss, Kai Voss // Author: Andreas Hoecker, Joerg Stelzer, Helge Voss, Kai Voss
/************************************************************************** ******** /************************************************************************** ********
* Project: TMVA - a Root-integrated toolkit for multivariate data analysis * * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
* Package: TMVA * * Package: TMVA *
* Class : MethodLikelihood * * Class : MethodLikelihood *
* Web : http://tmva.sourceforge.net * * Web : http://tmva.sourceforge.net *
* * * *
* Description: * * Description: *
* Likelihood analysis ("non-parametric approach") * * Likelihood analysis ("non-parametric approach") *
* Also implemented is a "diagonalized likelihood approach", * * Also implemented is a "diagonalized likelihood approach", *
* which improves over the uncorrelated likelihood ansatz by transform ing * * which improves over the uncorrelated likelihood ansatz by transform ing *
* linearly the input variables into a diagonal space, using the squar e-root * * linearly the input variables into a diagonal space, using the squar e-root *
* of the covariance matrix. This approach can be chosen by inserting * * of the covariance matrix. This approach can be chosen by inserting *
* the letter "D" into the option string. * * the letter "D" into the option string. *
* * * *
* Authors (alphabetical): * * Authors (alphabetical): *
* Andreas Hoecker <Andreas.Hocker@cern.ch> - CERN, Switzerland * * Andreas Hoecker <Andreas.Hocker@cern.ch> - CERN, Switzerland *
* Xavier Prudent <prudent@lapp.in2p3.fr> - LAPP, France *
* Helge Voss <Helge.Voss@cern.ch> - MPI-K Heidelberg, German y * * Helge Voss <Helge.Voss@cern.ch> - MPI-K Heidelberg, German y *
* Kai Voss <Kai.Voss@cern.ch> - U. of Victoria, Canada * * Kai Voss <Kai.Voss@cern.ch> - U. of Victoria, Canada *
* * * *
* Copyright (c) 2005: * * Copyright (c) 2005: *
* CERN, Switzerland * * CERN, Switzerland *
* U. of Victoria, Canada * * U. of Victoria, Canada *
* MPI-K Heidelberg, Germany * * MPI-K Heidelberg, Germany *
* LAPP, Annecy, France *
* * * *
* Redistribution and use in source and binary forms, with or without * * Redistribution and use in source and binary forms, with or without *
* modification, are permitted according to the terms listed in LICENSE * * modification, are permitted according to the terms listed in LICENSE *
* (http://tmva.sourceforge.net/LICENSE) * * (http://tmva.sourceforge.net/LICENSE) *
************************************************************************** ********/ ************************************************************************** ********/
#ifndef ROOT_TMVA_MethodLikelihood #ifndef ROOT_TMVA_MethodLikelihood
#define ROOT_TMVA_MethodLikelihood #define ROOT_TMVA_MethodLikelihood
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
skipping to change at line 67 skipping to change at line 65
class TH1D; class TH1D;
namespace TMVA { namespace TMVA {
class MethodLikelihood : public MethodBase { class MethodLikelihood : public MethodBase {
public: public:
MethodLikelihood( const TString& jobName, MethodLikelihood( const TString& jobName,
const TString& methodTitle, const TString& methodTitle,
DataSet& theData, DataSetInfo& theData,
const TString& theOption = "", const TString& theOption = "",
TDirectory* theTargetDir = 0 ); TDirectory* theTargetDir = 0 );
MethodLikelihood( DataSet& theData, MethodLikelihood( DataSetInfo& theData,
const TString& theWeightFile, const TString& theWeightFile,
TDirectory* theTargetDir = NULL ); TDirectory* theTargetDir = NULL );
virtual ~MethodLikelihood( void ); virtual ~MethodLikelihood();
virtual Bool_t HasAnalysisType( Types::EAnalysisType type,
UInt_t numberClasses, UInt_t numberTa
rgets );
// training method // training method
void Train( void ); void Train();
// write weights to file // write weights to file
void WriteWeightsToStream( ostream& o ) const; void WriteWeightsToStream( ostream& o ) const;
void WriteWeightsToStream( TFile& rf ) const; void WriteWeightsToStream( TFile& rf ) const;
void AddWeightsXMLTo( void* parent ) const;
// read weights from file // read weights from file
void ReadWeightsFromStream( istream& istr ); void ReadWeightsFromStream( istream& istr );
void ReadWeightsFromStream( TFile& istr ); void ReadWeightsFromStream( TFile& istr );
void ReadWeightsFromXML( void* wghtnode );
// calculate the MVA value // calculate the MVA value
// the argument is used for internal ranking tests // the argument is used for internal ranking tests
Double_t GetMvaValue( void ); Double_t GetMvaValue( Double_t* err = 0 );
// write method specific histos to target file // write method specific histos to target file
void WriteMonitoringHistosToFile( void ) const; void WriteMonitoringHistosToFile() const;
// ranking of input variables // ranking of input variables
const Ranking* CreateRanking(); const Ranking* CreateRanking();
virtual void WriteOptionsToStream ( ostream& o, const TString& prefix
) const;
protected: protected:
// make ROOT-independent C++ class for classifier response (classifie r-specific implementation) // make ROOT-independent C++ class for classifier response (classifie r-specific implementation)
void MakeClassSpecific( std::ostream&, const TString& ) const; void MakeClassSpecific( std::ostream&, const TString& ) const;
// header and auxiliary classes // header and auxiliary classes
void MakeClassSpecificHeader( std::ostream&, const TString& = "" ) co nst; void MakeClassSpecificHeader( std::ostream&, const TString& = "" ) co nst;
// get help message text // get help message text
void GetHelpMessage() const; void GetHelpMessage() const;
private: private:
// returns transformed or non-transformed output // returns transformed or non-transformed output
Double_t TransformLikelihoodOutput( Double_t ps, Double_t pb ) const; Double_t TransformLikelihoodOutput( Double_t ps, Double_t pb ) const;
// the option handling methods // the option handling methods
void Init();
void DeclareOptions(); void DeclareOptions();
void ProcessOptions(); void ProcessOptions();
// options // options
Int_t fAverageEvtPerBin; // average events per bin; used t Double_t fEpsilon; // minimum number of
o calculate fNbins likelihood (to avoid zero)
Int_t* fAverageEvtPerBinVarS; // average events per bin; used t Bool_t fTransformLikelihoodOutput; // likelihood output
o calculate fNbins is sigmoid-transformed
Int_t* fAverageEvtPerBinVarB; // average events per bin; used t
o calculate fNbins Int_t fDropVariable; // for ranking test
Int_t fNsmooth; // number of smooth passes
Int_t* fNsmoothVarS; // number of smooth passes
Int_t* fNsmoothVarB; // number of smooth passes
Double_t fEpsilon; // minimum number of likelihood (to
avoid zero)
Bool_t fTransformLikelihoodOutput; // likelihood output is
sigmoid-transformed
// type of Splines (or Kernel) used to smooth PDFs
TString* fInterpolateString; // which interpolation method
used for reference histograms (individual for each variable)
PDF::EInterpolateMethod *fInterpolateMethod; //enumerators encoding t
he interpolation method
Int_t fSpline; // Spline order to smooth hi
stograms (if spline is selected for interpolation)
TString fKDEtypeString; // Kernel type to use for KD
E (string) (if KDE is selected for interpolation)
TString fKDEiterString; // Number of iterations (str
ing)
KDEKernel::EKernelType fKDEtype; // Kernel type to use for KD
E
KDEKernel::EKernelIter fKDEiter; // Number of iterations
Float_t fKDEfineFactor; // fine tuning factor for Ad
aptive KDE: factor to multiply the "width" of the Kernel function
KDEKernel::EKernelBorder fBorderMethod; // the method to take care a
bout "border" effects
TString fBorderMethodString; // the method to take c
are about "border" effects (string)
Int_t fDropVariable; // for ranking test
std::vector<TH1*>* fHistSig; // signal PDFs (histograms)
std::vector<TH1*>* fHistBgd; // background PDFs (histograms)
std::vector<TH1*>* fHistSig_smooth; // signal PDFs (smoothed histogra
ms)
std::vector<TH1*>* fHistBgd_smooth; // background PDFs (smoothed hist
ograms)
std::vector<PDF*>* fPDFSig; // list of PDFs (signal) std::vector<TH1*>* fHistSig; // signal PDFs (hist
std::vector<PDF*>* fPDFBgd; // list of PDFs (background) ograms)
std::vector<TH1*>* fHistBgd; // background PDFs (
histograms)
std::vector<TH1*>* fHistSig_smooth; // signal PDFs (smoo
thed histograms)
std::vector<TH1*>* fHistBgd_smooth; // background PDFs (
smoothed histograms)
PDF* fDefaultPDFLik; // pdf that contains
default definitions
std::vector<PDF*>* fPDFSig; // list of PDFs (sig
nal)
std::vector<PDF*>* fPDFBgd; // list of PDFs (bac
kground)
// default initialisation called by all constructors // default initialisation called by all constructors
void InitLik( void );
ClassDef(MethodLikelihood,0) // Likelihood analysis A ("non-parametri c approach") ClassDef(MethodLikelihood,0) // Likelihood analysis ("non-parametric approach")
}; };
} // namespace TMVA } // namespace TMVA
#endif // MethodLikelihood_H #endif // MethodLikelihood_H
 End of changes. 17 change blocks. 
59 lines changed or deleted 39 lines changed or added


 MethodMLP.h   MethodMLP.h 
// @(#)root/tmva $Id: MethodMLP.h 23334 2008-04-19 18:38:57Z brun $ // @(#)root/tmva $Id: MethodMLP.h 29122 2009-06-22 06:51:30Z brun $
// Author: Andreas Hoecker, Matt Jachowski // Author: Andreas Hoecker, Matt Jachowski
/************************************************************************** ******** /************************************************************************** ********
* Project: TMVA - a Root-integrated toolkit for multivariate data analysis * * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
* Package: TMVA * * Package: TMVA *
* Class : MethodMLP * * Class : MethodMLP *
* Web : http://tmva.sourceforge.net * * Web : http://tmva.sourceforge.net *
* * * *
* Description: * * Description: *
* ANN Multilayer Perceptron class for the discrimination of signal * * ANN Multilayer Perceptron class for the discrimination of signal *
* from background. * from background. BFGS implementation based on TMultiLayerPerceptro
* n *
* class from ROOT (http://root.cern.ch).
*
* * * *
* Authors (alphabetical): * * Authors (alphabetical): *
* Andreas Hoecker <Andreas.Hocker@cern.ch> - CERN, Switzerland * Krzysztof Danielowski <danielow@cern.ch> - IFJ & AGH, Poland
* *
* Matt Jachowski <jachowski@stanford.edu> - Stanford University, US * Andreas Hoecker <Andreas.Hocker@cern.ch> - CERN, Switzerland
A * *
* Peter Speckmayer <peter.speckmayer@cern.ch> - CERN, Switzerlan
d *
* Matt Jachowski <jachowski@stanford.edu> - Stanford Universit
y, USA *
* Kamil Kraszewski <kalq@cern.ch> - IFJ & UJ, Poland
*
* Maciej Kruk <mkruk@cern.ch> - IFJ & AGH, Poland
*
* * * *
* Copyright (c) 2005: * * Copyright (c) 2005: *
* CERN, Switzerland * * CERN, Switzerland *
* * * *
* Redistribution and use in source and binary forms, with or without * * Redistribution and use in source and binary forms, with or without *
* modification, are permitted according to the terms listed in LICENSE * * modification, are permitted according to the terms listed in LICENSE *
* (http://tmva.sourceforge.net/LICENSE) * * (http://tmva.sourceforge.net/LICENSE) *
************************************************************************** ********/ ************************************************************************** ********/
#ifndef ROOT_TMVA_MethodMLP #ifndef ROOT_TMVA_MethodMLP
skipping to change at line 38 skipping to change at line 43
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// // // //
// MethodMLP // // MethodMLP //
// // // //
// Multilayer Perceptron built off of MethodANNBase // // Multilayer Perceptron built off of MethodANNBase //
// // // //
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
#include <vector> #include <vector>
#ifndef ROOT_TString
#include "TString.h" #include "TString.h"
#endif
#ifndef ROOT_TTree
#include "TTree.h" #include "TTree.h"
#endif
#ifndef ROOT_TObjArray
#include "TObjArray.h" #include "TObjArray.h"
#endif
#ifndef ROOT_TRandom3
#include "TRandom3.h" #include "TRandom3.h"
#endif
#ifndef ROOT_TH1F
#include "TH1F.h" #include "TH1F.h"
#endif
#ifndef ROOT_TMatrixDfwd
#include "TMatrixDfwd.h"
#endif
#ifndef ROOT_TMVA_IFitterTarget #ifndef ROOT_TMVA_IFitterTarget
#include "TMVA/IFitterTarget.h" #include "TMVA/IFitterTarget.h"
#endif #endif
#ifndef ROOT_TMVA_MethodBase #ifndef ROOT_TMVA_MethodBase
#include "TMVA/MethodBase.h" #include "TMVA/MethodBase.h"
#endif #endif
#ifndef ROOT_TMVA_MethodANNBase #ifndef ROOT_TMVA_MethodANNBase
#include "TMVA/MethodANNBase.h" #include "TMVA/MethodANNBase.h"
#endif #endif
#ifndef ROOT_TMVA_TNeuron #ifndef ROOT_TMVA_TNeuron
#include "TMVA/TNeuron.h" #include "TMVA/TNeuron.h"
#endif #endif
#ifndef ROOT_TMVA_TActivation #ifndef ROOT_TMVA_TActivation
#include "TMVA/TActivation.h" #include "TMVA/TActivation.h"
#endif #endif
#ifndef ROOT_TMVA_ConvergenceTest
#include "TMVA/ConvergenceTest.h"
#endif
#define MethodMLP_UseMinuit__ #define MethodMLP_UseMinuit__
#undef MethodMLP_UseMinuit__ #undef MethodMLP_UseMinuit__
namespace TMVA { namespace TMVA {
class MethodMLP : public MethodANNBase, public IFitterTarget { class MethodMLP : public MethodANNBase, public IFitterTarget, public Con vergenceTest {
public: public:
// standard constructors // standard constructors
MethodMLP( const TString& jobName, MethodMLP( const TString& jobName,
const TString& methodTitle, const TString& methodTitle,
DataSet& theData, DataSetInfo& theData,
const TString& theOption, const TString& theOption,
TDirectory* theTargetDir = 0 ); TDirectory* theTargetDir = 0 );
MethodMLP( DataSet& theData, MethodMLP( DataSetInfo& theData,
const TString& theWeightFile, const TString& theWeightFile,
TDirectory* theTargetDir = 0 ); TDirectory* theTargetDir = 0 );
virtual ~MethodMLP(); virtual ~MethodMLP();
virtual Bool_t HasAnalysisType( Types::EAnalysisType type, UInt_t num
berClasses, UInt_t numberTargets );
void Train() { Train(NumCycles()); } void Train() { Train(NumCycles()); }
// for GA // for GA
Double_t ComputeEstimator ( std::vector<Double_t>& parameters ); Double_t ComputeEstimator ( std::vector<Double_t>& parameters );
Double_t EstimatorFunction( std::vector<Double_t>& parameters ); Double_t EstimatorFunction( std::vector<Double_t>& parameters );
enum ETrainingMethod { kBP=0, kGA }; enum ETrainingMethod { kBP=0, kBFGS, kGA };
enum EBPTrainingMode { kSequential=0, kBatch }; enum EBPTrainingMode { kSequential=0, kBatch };
protected: protected:
// make ROOT-independent C++ class for classifier response (classifie r-specific implementation) // make ROOT-independent C++ class for classifier response (classifie r-specific implementation)
void MakeClassSpecific( std::ostream&, const TString& ) const; void MakeClassSpecific( std::ostream&, const TString& ) const;
// get help message text // get help message text
void GetHelpMessage() const; void GetHelpMessage() const;
private: private:
// the option handling methods // the option handling methods
void DeclareOptions(); void DeclareOptions();
void ProcessOptions(); void ProcessOptions();
// general helper functions // general helper functions
void Train( Int_t nEpochs ); void Train( Int_t nEpochs );
void InitMLP(); void Init();
void InitializeLearningRates(); // although this is only needed b y backprop void InitializeLearningRates(); // although this is only needed b y backprop
// used as a measure of success in all minimization techniques // used as a measure of success in all minimization techniques
Double_t CalculateEstimator( Types::ETreeType treeType = Types::kTrai ning ); Double_t CalculateEstimator( Types::ETreeType treeType = Types::kTrai ning );
// BFGS functions
void BFGSMinimize( Int_t nEpochs );
void SetGammaDelta( TMatrixD &Gamma, TMatrixD &Delta, std::vector
<Double_t> &Buffer );
void SteepestDir( TMatrixD &Dir );
Bool_t GetHessian( TMatrixD &Hessian, TMatrixD &Gamma, TMatrixD &De
lta );
void SetDir( TMatrixD &Hessian, TMatrixD &Dir );
Double_t DerivDir( TMatrixD &Dir );
Bool_t LineSearch( TMatrixD &Dir, std::vector<Double_t> &Buffer );
void ComputeDEDw();
void SimulateEvent( const Event* ev );
void SetDirWeights( std::vector<Double_t> &Origin, TMatrixD &Dir,
Double_t alpha );
Double_t GetError();
Double_t GetSqrErr( const Event* ev, UInt_t index = 0 );
// backpropagation functions // backpropagation functions
void BackPropagationMinimize( Int_t nEpochs ); void BackPropagationMinimize( Int_t nEpochs );
void TrainOneEpoch(); void TrainOneEpoch();
void Shuffle( Int_t* index, Int_t n ); void Shuffle( Int_t* index, Int_t n );
void DecaySynapseWeights(Bool_t lateEpoch ); void DecaySynapseWeights(Bool_t lateEpoch );
void TrainOneEvent( Int_t ievt); void TrainOneEvent( Int_t ievt);
Double_t GetDesiredOutput(); Double_t GetDesiredOutput( const Event* ev );
void UpdateNetwork( Double_t desired, Double_t eventWeight=1.0 ); void UpdateNetwork( Double_t desired, Double_t eventWeight=1.0 );
void UpdateNetwork(std::vector<Float_t>& desired, Double_t eventW eight=1.0);
void CalculateNeuronDeltas(); void CalculateNeuronDeltas();
void UpdateSynapses(); void UpdateSynapses();
void AdjustSynapseWeights(); void AdjustSynapseWeights();
// faster backpropagation // faster backpropagation
void TrainOneEventFast( Int_t ievt, Float_t*& branchVar, Int_t& t ype ); void TrainOneEventFast( Int_t ievt, Float_t*& branchVar, Int_t& t ype );
// genetic algorithm functions // genetic algorithm functions
void GeneticMinimize(); void GeneticMinimize();
// the neuronal network can be initialized after the analysis type ha
s been set.
void SetAnalysisType( Types::EAnalysisType type );
#ifdef MethodMLP_UseMinuit__ #ifdef MethodMLP_UseMinuit__
// minuit functions -- commented out because they rely on a static po inter // minuit functions -- commented out because they rely on a static po inter
void MinuitMinimize(); void MinuitMinimize();
static MethodMLP* GetThisPtr() { return fgThis; } static MethodMLP* GetThisPtr() { return fgThis; }
static void IFCN( Int_t& npars, Double_t* grad, Double_t &f, Double_t * fitPars, Int_t ifl ); static void IFCN( Int_t& npars, Double_t* grad, Double_t &f, Double_t * fitPars, Int_t ifl );
void FCN( Int_t& npars, Double_t* grad, Double_t &f, Double_t* fitPar s, Int_t ifl ); void FCN( Int_t& npars, Double_t* grad, Double_t &f, Double_t* fitPar s, Int_t ifl );
#endif #endif
// general // general
ETrainingMethod fTrainingMethod; // method of training, BP or GA ETrainingMethod fTrainingMethod; // method of training, BP or GA
TString fTrainMethodS; // training method option param TString fTrainMethodS; // training method option param
// backpropagation variables Float_t fSamplingFraction; // fraction of events which is sa
mpled for training
Float_t fSamplingEpoch; // fraction of epochs where sampl
ing is used
Float_t fSamplingWeight; // changing factor for event weig
hts when sampling is turned on
Bool_t fSamplingTraining; // The training sample is sampled
Bool_t fSamplingTesting; // The testing sample is sampled
// BFGS variables
Double_t fLastAlpha; // line search variable
Double_t fTau; // line search variable
Int_t fResetStep; // reset time (how often we clear he
ssian matrix)
// backpropagation variable
Double_t fLearnRate; // learning rate for synapse weight adjustments Double_t fLearnRate; // learning rate for synapse weight adjustments
Double_t fDecayRate; // decay rate for above learning rat e Double_t fDecayRate; // decay rate for above learning rat e
EBPTrainingMode fBPMode; // backprop learning mode (sequentia l or batch) EBPTrainingMode fBPMode; // backprop learning mode (sequentia l or batch)
TString fBpModeS; // backprop learning mode option str ing (sequential or batch) TString fBpModeS; // backprop learning mode option str ing (sequential or batch)
Int_t fBatchSize; // batch size, only matters if in ba tch learning mode Int_t fBatchSize; // batch size, only matters if in ba tch learning mode
Int_t fTestRate; // test for overtraining performed a t each #th epochs Int_t fTestRate; // test for overtraining performed a t each #th epochs
// genetic algorithm variables // genetic algorithm variables
Int_t fGA_nsteps; // GA settings: number of steps Int_t fGA_nsteps; // GA settings: number of steps
Int_t fGA_preCalc; // GA settings: number of pre-calc s teps Int_t fGA_preCalc; // GA settings: number of pre-calc s teps
 End of changes. 21 change blocks. 
14 lines changed or deleted 80 lines changed or added


 MethodPDERS.h   MethodPDERS.h 
// @(#)root/tmva $Id: MethodPDERS.h 21630 2008-01-10 19:40:44Z brun $ // @(#)root/tmva $Id: MethodPDERS.h 29122 2009-06-22 06:51:30Z brun $
// Author: Andreas Hoecker, Yair Mahalalel, Joerg Stelzer, Helge Voss, Kai Voss // Author: Andreas Hoecker, Yair Mahalalel, Joerg Stelzer, Helge Voss, Kai Voss
/************************************************************************** ******** /************************************************************************** ********
* Project: TMVA - a Root-integrated toolkit for multivariate data analysis * * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
* Package: TMVA * * Package: TMVA *
* Class : MethodPDERS * * Class : MethodPDERS *
* Web : http://tmva.sourceforge.net * * Web : http://tmva.sourceforge.net *
* * * *
* Description: * * Description: *
* Multidimensional Likelihood using the "Probability density estimato r * * Multidimensional Likelihood using the "Probability density estimato r *
skipping to change at line 24 skipping to change at line 24
* * * *
* The multidimensional PDFs for signal and background are modeled * * The multidimensional PDFs for signal and background are modeled *
* by counting the events in the "vicinity" of a test point. The volum e * * by counting the events in the "vicinity" of a test point. The volum e *
* that describes "vicinity" is user-defined through the option string . * * that describes "vicinity" is user-defined through the option string . *
* A search method based on binary-trees is used to improve the select ion * * A search method based on binary-trees is used to improve the select ion *
* efficiency of the volume search. * * efficiency of the volume search. *
* * * *
* Authors (alphabetical): * * Authors (alphabetical): *
* Andreas Hoecker <Andreas.Hocker@cern.ch> - CERN, Switzerland * * Andreas Hoecker <Andreas.Hocker@cern.ch> - CERN, Switzerland *
* Yair Mahalalel <Yair.Mahalalel@cern.ch> - CERN, Switzerland * * Yair Mahalalel <Yair.Mahalalel@cern.ch> - CERN, Switzerland *
* Peter Speckmayer <peter.speckmayer@cern.ch> - CERN, Switzerland *
* Helge Voss <Helge.Voss@cern.ch> - MPI-K Heidelberg, German y * * Helge Voss <Helge.Voss@cern.ch> - MPI-K Heidelberg, German y *
* Kai Voss <Kai.Voss@cern.ch> - U. of Victoria, Canada * * Kai Voss <Kai.Voss@cern.ch> - U. of Victoria, Canada *
* * * *
* Copyright (c) 2005: * * Copyright (c) 2005: *
* CERN, Switzerland * * CERN, Switzerland *
* U. of Victoria, Canada * * U. of Victoria, Canada *
* MPI-K Heidelberg, Germany * * MPI-K Heidelberg, Germany *
* * * *
* Redistribution and use in source and binary forms, with or without * * Redistribution and use in source and binary forms, with or without *
* modification, are permitted according to the terms listed in LICENSE * * modification, are permitted according to the terms listed in LICENSE *
skipping to change at line 56 skipping to change at line 57
// // // //
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
#ifndef ROOT_TMVA_MethodBase #ifndef ROOT_TMVA_MethodBase
#include "TMVA/MethodBase.h" #include "TMVA/MethodBase.h"
#endif #endif
#ifndef ROOT_TMVA_BinarySearchTree #ifndef ROOT_TMVA_BinarySearchTree
#include "TMVA/BinarySearchTree.h" #include "TMVA/BinarySearchTree.h"
#endif #endif
#ifndef ROOT_TMVA_TVector #ifndef ROOT_TMVA_TVector
#ifndef ROOT_TVector
#include "TVector.h" #include "TVector.h"
#endif #endif
#endif
namespace TMVA { namespace TMVA {
class Volume; class Volume;
class Event; class Event;
class MethodPDERS : public MethodBase { class MethodPDERS : public MethodBase {
public: public:
MethodPDERS( const TString& jobName, MethodPDERS( const TString& jobName,
const TString& methodTitle, const TString& methodTitle,
DataSet& theData, DataSetInfo& theData,
const TString& theOption, const TString& theOption,
TDirectory* theTargetDir = 0 ); TDirectory* theTargetDir = 0 );
MethodPDERS( DataSet& theData, MethodPDERS( DataSetInfo& theData,
const TString& theWeightFile, const TString& theWeightFile,
TDirectory* theTargetDir = NULL ); TDirectory* theTargetDir = NULL );
virtual ~MethodPDERS( void ); virtual ~MethodPDERS( void );
virtual Bool_t HasAnalysisType( Types::EAnalysisType type, UInt_t num
berClasses, UInt_t numberTargets );
// training method // training method
void Train( void ); void Train( void );
// write weights to file // write weights to file
void WriteWeightsToStream( ostream& o ) const; void WriteWeightsToStream( ostream& o ) const;
void WriteWeightsToStream( TFile& rf ) const; void WriteWeightsToStream( TFile& rf ) const;
void AddWeightsXMLTo( void* parent ) const;
// read weights from file // read weights from file
void ReadWeightsFromStream( istream& istr ); void ReadWeightsFromStream( istream& istr );
void ReadWeightsFromStream( TFile& istr ); void ReadWeightsFromStream( TFile& istr );
void ReadWeightsFromXML( void* wghtnode );
// calculate the MVA value // calculate the MVA value
Double_t GetMvaValue(); Double_t GetMvaValue( Double_t* err = 0 );
// calculate the MVA value
const std::vector<Float_t>& GetRegressionValues();
public: public:
// for root finder // for root finder
static Double_t IGetVolumeContentForRoot( Double_t ); static Double_t IGetVolumeContentForRoot( Double_t );
Double_t GetVolumeContentForRoot( Double_t ); Double_t GetVolumeContentForRoot( Double_t );
// static pointer to this object // static pointer to this object
static MethodPDERS* ThisPDERS( void ) { return fgThisPDERS; } static MethodPDERS* ThisPDERS( void ) { return fgThisPDERS; }
protected: protected:
skipping to change at line 115 skipping to change at line 124
// make ROOT-independent C++ class for classifier response (classifie r-specific implementation) // make ROOT-independent C++ class for classifier response (classifie r-specific implementation)
void MakeClassSpecific( std::ostream&, const TString& ) const; void MakeClassSpecific( std::ostream&, const TString& ) const;
// get help message text // get help message text
void GetHelpMessage() const; void GetHelpMessage() const;
Volume* fHelpVolume; // auxiliary variable Volume* fHelpVolume; // auxiliary variable
Int_t fFcnCall; // number of external function calls (RootF inder) Int_t fFcnCall; // number of external function calls (RootF inder)
// accessors // accessors
BinarySearchTree* GetBinaryTreeSig( void ) const { return fBinaryTree BinarySearchTree* GetBinaryTree( void ) const { return fBinaryTree; }
S; }
BinarySearchTree* GetBinaryTreeBkg( void ) const { return fBinaryTree Double_t CKernelEstimate( const Event&, std::vector<const
B; } BinarySearchTreeNode*>&, Volume& );
void RKernelEstimate( const Event&, std::vector<const
BinarySearchTreeNode*>&, Volume&, std::vector<Float_t> *pdfSum );
Double_t KernelEstimate( const Event&, std::vector<const BinarySearch TreeNode*>&, Volume& );
Double_t ApplyKernelFunction( Double_t normalized_distance ); Double_t ApplyKernelFunction( Double_t normalized_distance );
Double_t KernelNormalization( Double_t pdf ); Double_t KernelNormalization( Double_t pdf );
Double_t GetNormalizedDistance( const TMVA::Event &base_event, Double_t GetNormalizedDistance( const TMVA::Event &base_event,
const BinarySearchTreeNode &sample_ev ent, const BinarySearchTreeNode &sample_ev ent,
Double_t *dim_normalization); Double_t *dim_normalization);
Double_t NormSinc( Double_t x ); Double_t NormSinc( Double_t x );
Double_t LanczosFilter( Int_t level, Double_t x ); Double_t LanczosFilter( Int_t level, Double_t x );
// ranking of input variables // ranking of input variables
const Ranking* CreateRanking() { return 0; } const Ranking* CreateRanking() { return 0; }
skipping to change at line 140 skipping to change at line 150
private: private:
// the option handling methods // the option handling methods
void DeclareOptions(); void DeclareOptions();
void ProcessOptions(); void ProcessOptions();
// calculate the averages of the input variables needed for adaptive training // calculate the averages of the input variables needed for adaptive training
void CalcAverages(); void CalcAverages();
// create binary search trees for signal and background // create binary search trees for signal and background
void CreateBinarySearchTrees( TTree* tree ); void CreateBinarySearchTree( Types::ETreeType type );
// get sample of training events
void GetSample( const Event &e, std::vector<const BinarySearchTreeNod
e*>& events, Volume *volume);
// option // option
TString fVolumeRange; // option volume range TString fVolumeRange; // option volume range
TString fKernelString; // option kernel estimator TString fKernelString; // option kernel estimator
enum EVolumeRangeMode { enum EVolumeRangeMode {
kUnsupported = 0, kUnsupported = 0,
kMinMax, kMinMax,
kRMS, kRMS,
kAdaptive, kAdaptive,
kUnscaled, kUnscaled,
kkNN kkNN
} fVRangeMode; } fVRangeMode;
skipping to change at line 169 skipping to change at line 182
kGauss, kGauss,
kSinc3, // the sinc enumerators must be consecutive and in ord er! kSinc3, // the sinc enumerators must be consecutive and in ord er!
kSinc5, kSinc5,
kSinc7, kSinc7,
kSinc9, kSinc9,
kSinc11, kSinc11,
kLanczos2, kLanczos2,
kLanczos3, kLanczos3,
kLanczos5, kLanczos5,
kLanczos8, kLanczos8,
kTrim kTrim
} fKernelEstimator; } fKernelEstimator;
BinarySearchTree* fBinaryTreeS; // binary tree for signal BinarySearchTree* fBinaryTree; // binary tree
BinarySearchTree* fBinaryTreeB; // binary tree for background
vector<Float_t>* fDelta; // size of volume std::vector<Float_t>* fDelta; // size of volume
vector<Float_t>* fShift; // volume center std::vector<Float_t>* fShift; // volume center
vector<Float_t> fAverageRMS; // average RMS of signal and backg std::vector<Float_t> fAverageRMS; // average RMS of signal and
round background
Float_t fScaleS; // weight for signal events Float_t fScaleS; // weight for signal events
Float_t fScaleB; // weight for background events Float_t fScaleB; // weight for background events
Float_t fDeltaFrac; // fraction of RMS Float_t fDeltaFrac; // fraction of RMS
Double_t fGaussSigma; // size of Gauss in adaptive volum e Double_t fGaussSigma; // size of Gauss in adaptive volum e
Double_t fGaussSigmaNorm;// size of Gauss in adaptive volum e (normalised to dimensions) Double_t fGaussSigmaNorm;// size of Gauss in adaptive volum e (normalised to dimensions)
Double_t fNRegOut; // number of output dimensions for
regression
// input for adaptive volume adjustment // input for adaptive volume adjustment
Float_t fNEventsMin; // minimum number of events in ada ptive volume Float_t fNEventsMin; // minimum number of events in ada ptive volume
Float_t fNEventsMax; // maximum number of events in ada ptive volume Float_t fNEventsMax; // maximum number of events in ada ptive volume
Float_t fMaxVIterations;// maximum number of iterations to adapt volume size Float_t fMaxVIterations;// maximum number of iterations to adapt volume size
Float_t fInitialScale; // initial scale for adaptive volu me Float_t fInitialScale; // initial scale for adaptive volu me
Bool_t fInitializedVolumeEle; // is volume element initia lized ? Bool_t fInitializedVolumeEle; // is volume element initia lized ?
Int_t fkNNMin; // min number of events in kNN tre e Int_t fkNNMin; // min number of events in kNN tre e
Int_t fkNNMax; // max number of events in kNN tree Int_t fkNNMax; // max number of events in kNN tre
Int_t fkNNTests; // maximum number of iterations t e
o adapt volume size
Double_t fMax_distance; // maximum distance Double_t fMax_distance; // maximum distance
Bool_t fPrinted; // print Bool_t fPrinted; // print
Bool_t fNormTree; // binary-search tree is normalise d Bool_t fNormTree; // binary-search tree is normalise d
void SetVolumeElement ( void ); void SetVolumeElement ( void );
Float_t RScalc ( const Event& );
Double_t CRScalc ( const Event& );
void RRScalc ( const Event&, std::vector<F
loat_t>* count );
Float_t GetError ( Float_t countS, Float_t countB, Float_t GetError ( Float_t countS, Float_t countB,
Float_t sumW2S, Float_t sumW2B ) const; Float_t sumW2S, Float_t sumW2B ) const;
// this carrier // this carrier
static MethodPDERS* fgThisPDERS; // this pointer (required by root fi nder) static MethodPDERS* fgThisPDERS; // this pointer (required by root fi nder)
void UpdateThis() { fgThisPDERS = this; } void UpdateThis() { fgThisPDERS = this; }
void InitPDERS( void ); void Init( void );
ClassDef(MethodPDERS,0) // Multi-dimensional probability density esti mator range search (PDERS) method ClassDef(MethodPDERS,0) // Multi-dimensional probability density esti mator range search (PDERS) method
}; };
} // namespace TMVA } // namespace TMVA
#endif // MethodPDERS_H #endif // MethodPDERS_H
 End of changes. 23 change blocks. 
25 lines changed or deleted 45 lines changed or added


 MethodRuleFit.h   MethodRuleFit.h 
// @(#)root/tmva $Id: MethodRuleFit.h 21630 2008-01-10 19:40:44Z brun $ // @(#)root/tmva $Id: MethodRuleFit.h 29122 2009-06-22 06:51:30Z brun $
// Author: Fredrik Tegenfeldt // Author: Fredrik Tegenfeldt
/************************************************************************** ******** /************************************************************************** ********
* Project: TMVA - a Root-integrated toolkit for multivariate data analysis * * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
* Package: TMVA * * Package: TMVA *
* Class : MethodRuleFit * * Class : MethodRuleFit *
* Web : http://tmva.sourceforge.net * * Web : http://tmva.sourceforge.net *
* * * *
* Description: * * Description: *
* Friedman's RuleFit method * * Friedman's RuleFit method *
skipping to change at line 40 skipping to change at line 40
// // // //
// MethodRuleFit // // MethodRuleFit //
// // // //
// J Friedman's RuleFit method // // J Friedman's RuleFit method //
// // // //
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
#ifndef ROOT_TMVA_MethodBase #ifndef ROOT_TMVA_MethodBase
#include "TMVA/MethodBase.h" #include "TMVA/MethodBase.h"
#endif #endif
#ifndef ROOT_TMVA_TMatrixD #ifndef ROOT_TMatrixDfwd
#include "TMatrixD.h" #include "TMatrixDfwd.h"
#endif #endif
#ifndef ROOT_TMVA_TVectorD #ifndef ROOT_TVectorD
#include "TVectorD.h" #include "TVectorD.h"
#endif #endif
#ifndef ROOT_TMVA_DecisionTree #ifndef ROOT_TMVA_DecisionTree
#include "TMVA/DecisionTree.h" #include "TMVA/DecisionTree.h"
#endif #endif
#ifndef ROOT_TMVA_SeparationBase #ifndef ROOT_TMVA_RuleFit
#include "TMVA/SeparationBase.h"
#endif
#ifndef ROOT_TMVA_GiniIndex
#include "TMVA/GiniIndex.h"
#endif
#ifndef ROOT_TMVA_CrossEntropy
#include "TMVA/CrossEntropy.h"
#endif
#ifndef ROOT_TMVA_MisClassificationError
#include "TMVA/MisClassificationError.h"
#endif
#ifndef ROOT_TMVA_SdivSqrtSplusB
#include "TMVA/SdivSqrtSplusB.h"
#endif
#ifndef ROOT_TMVA_RULEFIT_H
#include "TMVA/RuleFit.h" #include "TMVA/RuleFit.h"
#endif #endif
namespace TMVA { namespace TMVA {
class SeparationBase;
class MethodRuleFit : public MethodBase { class MethodRuleFit : public MethodBase {
public: public:
MethodRuleFit( const TString& jobName, MethodRuleFit( const TString& jobName,
const TString& methodTitle, const TString& methodTitle,
DataSet& theData, DataSetInfo& theData,
const TString& theOption = "", const TString& theOption = "",
TDirectory* theTargetDir = 0 ); TDirectory* theTargetDir = 0 );
MethodRuleFit( DataSet& theData, MethodRuleFit( DataSetInfo& theData,
const TString& theWeightFile, const TString& theWeightFile,
TDirectory* theTargetDir = NULL ); TDirectory* theTargetDir = NULL );
virtual ~MethodRuleFit( void ); virtual ~MethodRuleFit( void );
virtual Bool_t HasAnalysisType( Types::EAnalysisType type, UInt_t num
berClasses, UInt_t /*numberTargets*/ );
// training method // training method
void Train( void ); void Train( void );
using MethodBase::WriteWeightsToStream; using MethodBase::WriteWeightsToStream;
using MethodBase::ReadWeightsFromStream; using MethodBase::ReadWeightsFromStream;
// write weights to file // write weights to file
void WriteWeightsToStream( ostream& o ) const; void WriteWeightsToStream( ostream& o ) const;
void AddWeightsXMLTo ( void* parent ) const;
// read weights from file // read weights from file
void ReadWeightsFromStream( istream& istr ); void ReadWeightsFromStream( istream& istr );
void ReadWeightsFromXML ( void* wghtnode );
// calculate the MVA value // calculate the MVA value
// Double_t GetMvaValue(Event *e); Double_t GetMvaValue( Double_t* err = 0 );
Double_t GetMvaValue();
// write method specific histos to target file // write method specific histos to target file
void WriteMonitoringHistosToFile( void ) const; void WriteMonitoringHistosToFile( void ) const;
// ranking of input variables // ranking of input variables
const Ranking* CreateRanking(); const Ranking* CreateRanking();
Bool_t UseBoost() const { return fU seBoost; } Bool_t UseBoost() const { return fUseBoost; }
// accessors // accessors
RuleFit *GetRuleFitPtr() { return &fR RuleFit* GetRuleFitPtr()
uleFit; } { return &fRuleFit; }
const RuleFit *GetRuleFitConstPtr() const { const RuleFit* GetRuleFitConstPtr() const
return &fRuleFit; } { return &fRuleFit; }
TDirectory* GetMethodBaseDir() const TDirectory* GetMethodBaseDir() const
{ return BaseDir(); } { return BaseDir(); }
const std::vector<TMVA::Event*> &GetTrainingEvents() const const std::vector<TMVA::Event*>& GetTrainingEvents() const
{ return fEventSample; } { return fEventSample; }
const std::vector<TMVA::DecisionTree*> &GetForest() const const std::vector<TMVA::DecisionTree*>& GetForest() const
{ return fForest; } { return fForest; }
Int_t GetNTrees() const Int_t GetNTrees() const
{ return fNTrees; } { return fNTrees; }
Double_t GetTreeEveFrac() const Double_t GetTreeEveFrac() const
{ return fTreeEveFrac; } { return fTreeEveFrac; }
// Double_t GetSubSampleFraction const SeparationBase* GetSeparationBaseConst() con
() const { return fSubSampleFraction; } st { return fSepType; }
const SeparationBase *GetSeparationBaseConst() con SeparationBase* GetSeparationBase() const
st { return fSepType; } { return fSepType; }
SeparationBase *GetSeparationBase() const { TMVA::DecisionTree::EPruneMethod GetPruneMethod() const
return fSepType; } { return fPruneMethod; }
TMVA::DecisionTree::EPruneMethod GetPruneMethod() const Double_t GetPruneStrength() const
{ return fPruneMethod; } { return fPruneStrength; }
Double_t GetPruneStrength() const Double_t GetMinFracNEve() const
{ return fPruneStrength; } { return fMinFracNEve; }
Double_t GetMinFracNEve() const Double_t GetMaxFracNEve() const
{ return fMinFracNEve; } { return fMaxFracNEve; }
Double_t GetMaxFracNEve() const Int_t GetNCuts() const
{ return fMaxFracNEve; } { return fNCuts; }
Int_t GetNCuts() const
{ return fNCuts; }
// //
Int_t GetGDNPathSteps() const Int_t GetGDNPathSteps() const
{ return fGDNPathSteps; } { return fGDNPathSteps; }
Double_t GetGDPathStep() const Double_t GetGDPathStep() const
{ return fGDPathStep; } { return fGDPathStep; }
Double_t GetGDErrScale() const Double_t GetGDErrScale() const
{ return fGDErrScale; } { return fGDErrScale; }
Double_t GetGDPathEveFrac() const Double_t GetGDPathEveFrac() const
{ return fGDPathEveFrac; } { return fGDPathEveFrac; }
Double_t GetGDValidEveFrac() const Double_t GetGDValidEveFrac() const
{ return fGDValidEveFrac; } { return fGDValidEveFrac; }
// //
Double_t GetLinQuantile() const { return fLinQuantile; } Double_t GetLinQuantile() const { return fLinQuantile; }
const TString GetRFWorkDir() const const TString GetRFWorkDir() const
{ return fRFWorkDir; } { return fRFWorkDir; }
Int_t GetRFNrules() const Int_t GetRFNrules() const
{ return fRFNrules; } { return fRFNrules; }
Int_t GetRFNendnodes() const Int_t GetRFNendnodes() const
{ return fRFNendnodes; } { return fRFNendnodes; }
protected: protected:
// make ROOT-independent C++ class for classifier response (classifie r-specific implementation) // make ROOT-independent C++ class for classifier response (classifie r-specific implementation)
void MakeClassSpecific( std::ostream&, const TString& ) const; void MakeClassSpecific( std::ostream&, const TString& ) const;
void MakeClassRuleCuts( std::ostream& ) const; void MakeClassRuleCuts( std::ostream& ) const;
void MakeClassLinear( std::ostream& ) const; void MakeClassLinear( std::ostream& ) const;
// get help message text // get help message text
void GetHelpMessage() const; void GetHelpMessage() const;
// initialize rulefit // initialize rulefit
void InitRuleFit( void ); void Init( void );
// copy all training events into a stl::vector // copy all training events into a stl::vector
void InitEventSample( void ); void InitEventSample( void );
// initialize monitor ntuple // initialize monitor ntuple
void InitMonitorNtuple(); void InitMonitorNtuple();
void TrainTMVARuleFit(); void TrainTMVARuleFit();
void TrainJFRuleFit(); void TrainJFRuleFit();
private: private:
// check variable range and set var to lower or upper if out of range
template<typename T>
inline Bool_t VerifyRange( MsgLogger& mlog, const char *varstr, T& va
r, const T& vmin, const T& vmax );
template<typename T>
inline Bool_t VerifyRange( MsgLogger& mlog, const char *varstr, T& va
r, const T& vmin, const T& vmax, const T& vdef );
template<typename T>
inline Int_t VerifyRange( const T& var, const T& vmin, const T& vmax
);
// the option handling methods // the option handling methods
void DeclareOptions(); void DeclareOptions();
void ProcessOptions(); void ProcessOptions();
RuleFit fRuleFit; // RuleFit instance RuleFit fRuleFit; // RuleFit instance
std::vector< Event *> fEventSample; // the complete trainin g sample std::vector<TMVA::Event *> fEventSample; // the complete trainin g sample
Double_t fSignalFraction; // scalefactor for bkg events to modify initial s/b fraction in training data Double_t fSignalFraction; // scalefactor for bkg events to modify initial s/b fraction in training data
// ntuple // ntuple
TTree *fMonitorNtuple; // pointer to monitor r ule ntuple TTree *fMonitorNtuple; // pointer to monitor r ule ntuple
Double_t fNTImportance; // ntuple: rule importa nce Double_t fNTImportance; // ntuple: rule importa nce
Double_t fNTCoefficient; // ntuple: rule coeffic ient Double_t fNTCoefficient; // ntuple: rule coeffic ient
Double_t fNTSupport; // ntuple: rule support Double_t fNTSupport; // ntuple: rule support
Int_t fNTNcuts; // ntuple: rule number of cuts Int_t fNTNcuts; // ntuple: rule number of cuts
Int_t fNTNvars; // ntuple: rule number of vars Int_t fNTNvars; // ntuple: rule number of vars
Double_t fNTPtag; // ntuple: rule P(tag) Double_t fNTPtag; // ntuple: rule P(tag)
skipping to change at line 229 skipping to change at line 228
// //
TString fModelTypeS; // rule ensemble: which model (rule,linear or both) TString fModelTypeS; // rule ensemble: which model (rule,linear or both)
Double_t fRuleMinDist; // rule min distance - see RuleEnsemble Double_t fRuleMinDist; // rule min distance - see RuleEnsemble
Double_t fLinQuantile; // quantile cut to remo ve outliers - see RuleEnsemble Double_t fLinQuantile; // quantile cut to remo ve outliers - see RuleEnsemble
ClassDef(MethodRuleFit,0) // Friedman's RuleFit method ClassDef(MethodRuleFit,0) // Friedman's RuleFit method
}; };
} // namespace TMVA } // namespace TMVA
//_______________________________________________________________________
template<typename T>
inline Int_t TMVA::MethodRuleFit::VerifyRange( const T& var, const T& vmin,
const T& vmax )
{
// check range and return +1 if above, -1 if below or 0 if inside
if (var>vmax) return 1;
if (var<vmin) return -1;
return 0;
}
//_______________________________________________________________________
template<typename T>
inline Bool_t TMVA::MethodRuleFit::VerifyRange( TMVA::MsgLogger& mlog, cons
t char *varstr, T& var, const T& vmin, const T& vmax )
{
// verify range and print out message
// if outside range, set to closest limit
Int_t dir = TMVA::MethodRuleFit::VerifyRange(var,vmin,vmax);
Bool_t modif=kFALSE;
if (dir==1) {
modif = kTRUE;
var=vmax;
}
if (dir==-1) {
modif = kTRUE;
var=vmin;
}
if (modif) {
mlog << kWARNING << "Option <" << varstr << "> " << (dir==1 ? "above"
:"below") << " allowed range. Reset to new value = " << var << Endl;
}
return modif;
}
//_______________________________________________________________________
template<typename T>
inline Bool_t TMVA::MethodRuleFit::VerifyRange( TMVA::MsgLogger& mlog, cons
t char *varstr, T& var, const T& vmin, const T& vmax, const T& vdef )
{
// verify range and print out message
// if outside range, set to given default value
Int_t dir = TMVA::MethodRuleFit::VerifyRange(var,vmin,vmax);
Bool_t modif=kFALSE;
if (dir!=0) {
modif = kTRUE;
var=vdef;
}
if (modif) {
mlog << kWARNING << "Option <" << varstr << "> " << (dir==1 ? "above"
:"below") << " allowed range. Reset to default value = " << var << Endl;
}
return modif;
}
#endif // MethodRuleFit_H #endif // MethodRuleFit_H
 End of changes. 20 change blocks. 
75 lines changed or deleted 132 lines changed or added


 MethodSVM.h   MethodSVM.h 
// @(#)root/tmva $Id: MethodSVM.h 21630 2008-01-10 19:40:44Z brun $ // @(#)root/tmva $Id: MethodSVM.h 29195 2009-06-24 10:39:49Z brun $
// Author: Marcin Wolter, Andrzej Zemla // Author: Marcin Wolter, Andrzej Zemla
/************************************************************************** ******** /************************************************************************** ********
* Project: TMVA - a Root-integrated toolkit for multivariate data analysis * * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
* Package: TMVA * * Package: TMVA *
* Class : MethodSVM * * Class : MethodSVM *
* Web : http://tmva.sourceforge.net * * Web : http://tmva.sourceforge.net *
* * * *
* Description: * * Description: *
* Support Vector Machine * * Support Vector Machine *
* * * *
* Authors (alphabetical): * * Authors (alphabetical): *
* Marcin Wolter <Marcin.Wolter@cern.ch> - IFJ PAN, Krakow, Poland * * Marcin Wolter <Marcin.Wolter@cern.ch> - IFJ PAN, Krakow, Poland *
* Andrzej Zemla <a_zemla@o2.pl> - IFJ PAN, Krakow, Poland * * Andrzej Zemla <azemla@cern.ch> - IFJ PAN, Krakow, Poland *
* (IFJ PAN: Henryk Niewodniczanski Inst. Nucl. Physics, Krakow, Polan d) * * (IFJ PAN: Henryk Niewodniczanski Inst. Nucl. Physics, Krakow, Polan d) *
* * * *
* Introduction of regression by:
*
* Krzysztof Danielowski <danielow@cern.ch> - IFJ PAN & AGH, Krakow, P
oland *
* Kamil Kraszewski <kalq@cern.ch> - IFJ PAN & UJ, Krakow, Po
land *
* Maciej Kruk <mkruk@cern.ch> - IFJ PAN & AGH, Krakow, P
oland *
*
*
* Copyright (c) 2005: * * Copyright (c) 2005: *
* CERN, Switzerland * * CERN, Switzerland *
* MPI-K Heidelberg, Germany * * MPI-K Heidelberg, Germany *
* PAN, Krakow, Poland * * PAN, Krakow, Poland *
* * * *
* Redistribution and use in source and binary forms, with or without * * Redistribution and use in source and binary forms, with or without *
* modification, are permitted according to the terms listed in LICENSE * * modification, are permitted according to the terms listed in LICENSE *
* (http://tmva.sourceforge.net/LICENSE) * * (http://tmva.sourceforge.net/LICENSE) *
************************************************************************** ********/ ************************************************************************** ********/
skipping to change at line 43 skipping to change at line 48
// MethodSVM // // MethodSVM //
// // // //
// SMO Platt's SVM classifier with Keerthi & Shavade improvements // // SMO Platt's SVM classifier with Keerthi & Shavade improvements //
// // // //
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
#ifndef ROOT_TMVA_MethodBase #ifndef ROOT_TMVA_MethodBase
#include "TMVA/MethodBase.h" #include "TMVA/MethodBase.h"
#endif #endif
#ifndef ROOT_TMVA_TMatrixD #ifndef ROOT_TMVA_TMatrixD
#include "TMatrixD.h" #ifndef ROOT_TMatrixDfwd
#include "TMatrixDfwd.h"
#endif
#endif #endif
#ifndef ROOT_TMVA_TVectorD #ifndef ROOT_TMVA_TVectorD
#ifndef ROOT_TVectorD
#include "TVectorD.h" #include "TVectorD.h"
#endif #endif
#endif
namespace TMVA { namespace TMVA
{
class SVWorkingSet;
class SVEvent;
class SVKernelFunction;
class MethodSVM : public MethodBase { class MethodSVM : public MethodBase {
public: public:
MethodSVM( const TString& jobName, MethodSVM( const TString& jobName, const TString& methodTitle, DataSe
const TString& methodTitle, tInfo& theData,
DataSet& theData, const TString& theOption = "", TDirectory* theTargetDir =
const TString& theOption = "", 0 );
TDirectory* theTargetDir = 0 );
MethodSVM( DataSetInfo& theData, const TString& theWeightFile, TDirec
MethodSVM( DataSet& theData, tory* theTargetDir = NULL );
const TString& theWeightFile,
TDirectory* theTargetDir = NULL );
virtual ~MethodSVM( void ); virtual ~MethodSVM( void );
virtual Bool_t HasAnalysisType( Types::EAnalysisType type, UInt_t num
berClasses, UInt_t numberTargets );
// training method // training method
void Train( void ); void Train( void );
using MethodBase::WriteWeightsToStream; using MethodBase::WriteWeightsToStream;
using MethodBase::ReadWeightsFromStream; using MethodBase::ReadWeightsFromStream;
// write weights to file // write weights to file
void WriteWeightsToStream( std::ostream& o ) const; void WriteWeightsToStream( std::ostream& o ) const;
void WriteWeightsToStream( TFile& fout ) const; void WriteWeightsToStream( TFile& fout ) const;
void AddWeightsXMLTo ( void* parent ) const;
// read weights from file // read weights from file
void ReadWeightsFromStream( std::istream& istr ); void ReadWeightsFromStream( std::istream& istr );
void ReadWeightsFromStream( TFile& fFin ); void ReadWeightsFromStream( TFile& fFin );
void ReadWeightsFromXML ( void* wghtnode );
// calculate the MVA value // calculate the MVA value
Double_t GetMvaValue();
void InitSVM( void ); Double_t GetMvaValue( Double_t* err = 0 );
const std::vector<Float_t>& GetRegressionValues();
void Init( void );
// ranking of input variables // ranking of input variables
const Ranking* CreateRanking() { return 0; } const Ranking* CreateRanking() { return 0; }
enum EKernelType { kLinear , kRBF, kPolynomial, kSigmoidal };
protected: protected:
// make ROOT-independent C++ class for classifier response (classifie r-specific implementation) // make ROOT-independent C++ class for classifier response (classifie r-specific implementation)
void MakeClassSpecific( std::ostream&, const TString& ) const; void MakeClassSpecific( std::ostream&, const TString& ) const;
// get help message text // get help message text
void GetHelpMessage() const; void GetHelpMessage() const;
private: private:
// the option handling methods // the option handling methods
void DeclareOptions(); void DeclareOptions();
void ProcessOptions(); void ProcessOptions();
TString fTheKernel; // kernel name Float_t fCost; // cost value
Float_t fTolerance; // tolerance parameter
UInt_t fMaxIter; // max number of iteration
UShort_t fNSubSets; // nr of subsets, de
fault 1
Float_t fBparm; // free plane coefficient
Float_t fGamma; // RBF Kernel parameter
SVWorkingSet* fWgSet; // svm working set
std::vector<TMVA::SVEvent*>* fInputData; // vector of trainin
g data in SVM format
std::vector<TMVA::SVEvent*>* fSupportVectors; // contains support
vectors
SVKernelFunction* fSVKernelFunction; // kernel function
EKernelType fKernelType; // to be defined TVectorD* fMinVars; // for normalization
Float_t fC; // to be defined //is it still needed??
Float_t fTolerance; // treshold parameter TVectorD* fMaxVars; // for normalization
Int_t fMaxIter; // max number of training loops //is it still needed??
// Kernel parameters
Float_t fDoubleSigmaSquered; // for RBF Kernel
Int_t fOrder; // for Polynomial Kernel ( polynomi
al order )
Float_t fTheta; // for Sigmoidal Kernel
Float_t fKappa; // for Sigmoidal Kernel
Float_t fBparm; // to be defined
Float_t fB_up; // to be defined
Float_t fB_low; // to be defined
Int_t fI_up; // to be defined
Int_t fI_low; // to be defined
Int_t fNsupv; // to be defined
Int_t ExamineExample( Int_t );
Int_t TakeStep( Int_t , Int_t );
Float_t LearnFunc( Int_t );
Float_t (MethodSVM::*fKernelFunc)( Int_t, Int_t ) const;
// kernel functions
Float_t LinearKernel ( Int_t, Int_t ) const;
Float_t RBFKernel ( Int_t, Int_t ) const;
Float_t PolynomialKernel( Int_t, Int_t ) const;
Float_t SigmoidalKernel ( Int_t, Int_t ) const;
vector< Float_t >* fAlphas; // to be defined
vector< Float_t >* fErrorCache; // to be defined
vector< Float_t >* fWeightVector; // weight vector for linear SVM
vector< Float_t* >* fVariables; // data vectors
vector< Float_t >* fNormVar; // norm
vector< Int_t >* fTypesVec; // type vector
vector< Short_t >* fI; // to be defined
vector< Float_t >* fKernelDiag; // to be defined
vector < Float_t* >* fSupportVectors;//
TVectorD* fMaxVars;
TVectorD* fMinVars;
void SetIndex( Int_t );
void PrepareDataToTrain();
void SetKernel();
void Results();
void StoreSupportVectors();
ClassDef(MethodSVM,0) // Support Vector Machine ClassDef(MethodSVM,0) // Support Vector Machine
}; };
} // namespace TMVA } // namespace TMVA
#endif // MethodSVM_H #endif // MethodSVM_H
 End of changes. 16 change blocks. 
70 lines changed or deleted 59 lines changed or added


 MethodSeedDistance.h   MethodSeedDistance.h 
// @(#)root/tmva $Id: MethodSeedDistance.h 21630 2008-01-10 19:40:44Z brun $ // @(#)root/tmva $Id: MethodSeedDistance.h 29122 2009-06-22 06:51:30Z brun $
// Author: Andreas Hoecker, Peter Speckmayer // Author: Andreas Hoecker, Peter Speckmayer
/************************************************************************** ******** /************************************************************************** ********
* Project: TMVA - a Root-integrated toolkit for multivariate data analysis * * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
* Package: TMVA * * Package: TMVA *
* Class : MethodSeedDistance * * Class : MethodSeedDistance *
* Web : http://tmva.sourceforge.net * * Web : http://tmva.sourceforge.net *
* * * *
* Description: * * Description: *
* * * *
skipping to change at line 55 skipping to change at line 55
class Event; class Event;
class FitterBase; class FitterBase;
class SeedDistance; class SeedDistance;
class IMetric; class IMetric;
class MethodSeedDistance : public MethodBase, public IFitterTarget { class MethodSeedDistance : public MethodBase, public IFitterTarget {
public: public:
MethodSeedDistance( const TString& jobName, MethodSeedDistance( const TString& jobName,
const TString& methodTitle, const TString& methodTitle,
DataSet& theData, DataSetInfo& theData,
const TString& theOption = "", const TString& theOption = "",
TDirectory* theTargetDir = 0 ); TDirectory* theTargetDir = 0 );
MethodSeedDistance( DataSet& theData, MethodSeedDistance( DataSetInfo& theData,
const TString& theWeightFile, const TString& theWeightFile,
TDirectory* theTargetDir = NULL ); TDirectory* theTargetDir = NULL );
virtual ~MethodSeedDistance( void ); virtual ~MethodSeedDistance( void );
virtual Bool_t HasAnalysisType( Types::EAnalysisType type, UInt_t num
berClasses, UInt_t numberTargets );
// training method // training method
virtual void Train( void ); virtual void Train( void );
using MethodBase::WriteWeightsToStream; using MethodBase::WriteWeightsToStream;
using MethodBase::ReadWeightsFromStream; using MethodBase::ReadWeightsFromStream;
// write weights to file // write weights to file
virtual void WriteWeightsToStream( ostream& o ) const; void WriteWeightsToStream( ostream& o ) const;
void AddWeightsXMLTo( void* parent ) const;
// read weights from file // read weights from file
virtual void ReadWeightsFromStream( istream& istr ); void ReadWeightsFromStream( istream& istr );
void ReadWeightsFromXML ( void* /*wghtnode*/ ) {}
// calculate the MVA value // calculate the MVA value
virtual Double_t GetMvaValue(); virtual Double_t GetMvaValue( Double_t* err = 0 );
void InitSeedDistance( void ); void Init( void );
// ranking of input variables // ranking of input variables
const Ranking* CreateRanking() { return 0; } const Ranking* CreateRanking() { return 0; }
Double_t EstimatorFunction( std::vector<Double_t>& ); Double_t EstimatorFunction( std::vector<Double_t>& );
protected: protected:
// make ROOT-independent C++ class for classifier response (classifie r-specific implementation) // make ROOT-independent C++ class for classifier response (classifie r-specific implementation)
virtual void MakeClassSpecific( std::ostream&, const TString& ) const ; virtual void MakeClassSpecific( std::ostream&, const TString& ) const ;
skipping to change at line 116 skipping to change at line 120
// interpret formula expression and compute estimator // interpret formula expression and compute estimator
Double_t InterpretFormula( const Event&, std::vector<Double_t>& pars ); Double_t InterpretFormula( const Event&, std::vector<Double_t>& pars );
// clean up // clean up
void ClearAll(); void ClearAll();
// print fit results // print fit results
void PrintResults( const TString&, std::vector<Double_t>&, const Doub le_t ) const; void PrintResults( const TString&, std::vector<Double_t>&, const Doub le_t ) const;
// the option handling methods // the option handling methods
virtual void DeclareOptions(); void DeclareOptions();
virtual void ProcessOptions(); void ProcessOptions();
TString fSeedRangeStringP; // string with ranges of parameters TString fSeedRangeStringP; // string with ranges of parameters
TString fSeedRangeStringT; // string with ranges of parameters TString fSeedRangeStringT; // string with ranges of parameters
Bool_t fScalingFactor; Bool_t fScalingFactor;
IMetric* fMetric; IMetric* fMetric;
SeedDistance* fSeedDistance; SeedDistance* fSeedDistance;
std::vector< std::vector< Double_t > > fSeeds; // the pars that op timise (minimise) the estimator std::vector< std::vector< Double_t > > fSeeds; // the pars that op timise (minimise) the estimator
std::vector<Double_t> fMetricPars; // std::vector<Double_t> fMetricPars; //
std::vector<Double_t> fPars; // the pars that optimise (mi nimise) the estimator std::vector<Double_t> fPars; // the pars that optimise (mi nimise) the estimator
 End of changes. 8 change blocks. 
15 lines changed or deleted 20 lines changed or added


 MethodTMlpANN.h   MethodTMlpANN.h 
// @(#)root/tmva $Id: MethodTMlpANN.h 23334 2008-04-19 18:38:57Z brun $ // @(#)root/tmva $Id: MethodTMlpANN.h 29122 2009-06-22 06:51:30Z brun $
// Author: Andreas Hoecker, Joerg Stelzer, Helge Voss, Kai Voss // Author: Andreas Hoecker, Joerg Stelzer, Helge Voss, Kai Voss
/************************************************************************** ******** /************************************************************************** ********
* Project: TMVA - a Root-integrated toolkit for multivariate data analysis * * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
* Package: TMVA * * Package: TMVA *
* Class : MethodTMlpANN * * Class : MethodTMlpANN *
* Web : http://tmva.sourceforge.net * * Web : http://tmva.sourceforge.net *
* * * *
* Description: * * Description: *
* Implementation of interface for Root-integrated artificial neural * * Implementation of interface for Root-integrated artificial neural *
* network: TMultiLayerPerceptron, author: Christophe.Delaere@cern.ch * * network: TMultiLayerPerceptron, author: Christophe.Delaere@cern.ch *
* for a manual, see * * for a manual, see *
* http://root.cern.ch/root/html/TMultiLayerPerceptron.html * * http://root.cern.ch/root/html/TMultiLayerPerceptron.html *
* * * *
* Authors (alphabetical): * * Authors (alphabetical): *
* Andreas Hoecker <Andreas.Hocker@cern.ch> - CERN, Switzerland * * Andreas Hoecker <Andreas.Hocker@cern.ch> - CERN, Switzerland *
* Xavier Prudent <prudent@lapp.in2p3.fr> - LAPP, France *
* Helge Voss <Helge.Voss@cern.ch> - MPI-K Heidelberg, German y * * Helge Voss <Helge.Voss@cern.ch> - MPI-K Heidelberg, German y *
* Kai Voss <Kai.Voss@cern.ch> - U. of Victoria, Canada * * Kai Voss <Kai.Voss@cern.ch> - U. of Victoria, Canada *
* * * *
* Copyright (c) 2005: * * Copyright (c) 2005: *
* CERN, Switzerland * * CERN, Switzerland *
* U. of Victoria, Canada * * U. of Victoria, Canada *
* MPI-K Heidelberg, Germany * * MPI-K Heidelberg, Germany *
* LAPP, Annecy, France *
* * * *
* Redistribution and use in source and binary forms, with or without * * Redistribution and use in source and binary forms, with or without *
* modification, are permitted according to the terms listed in LICENSE * * modification, are permitted according to the terms listed in LICENSE *
* (http://tmva.sourceforge.net/LICENSE) * * (http://tmva.sourceforge.net/LICENSE) *
************************************************************************** ********/ ************************************************************************** ********/
#ifndef ROOT_TMVA_MethodTMlpANN #ifndef ROOT_TMVA_MethodTMlpANN
#define ROOT_TMVA_MethodTMlpANN #define ROOT_TMVA_MethodTMlpANN
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
skipping to change at line 59 skipping to change at line 57
class TMultiLayerPerceptron; class TMultiLayerPerceptron;
namespace TMVA { namespace TMVA {
class MethodTMlpANN : public MethodBase { class MethodTMlpANN : public MethodBase {
public: public:
MethodTMlpANN( const TString& jobName, MethodTMlpANN( const TString& jobName,
const TString& methodTitle, const TString& methodTitle,
DataSet& theData, DataSetInfo& theData,
const TString& theOption = "3000:N-1:N-2", const TString& theOption = "3000:N-1:N-2",
TDirectory* theTargetDir = 0 ); TDirectory* theTargetDir = 0 );
MethodTMlpANN( DataSet& theData, MethodTMlpANN( DataSetInfo& theData,
const TString& theWeightFile, const TString& theWeightFile,
TDirectory* theTargetDir = NULL ); TDirectory* theTargetDir = NULL );
virtual ~MethodTMlpANN( void ); virtual ~MethodTMlpANN( void );
virtual Bool_t HasAnalysisType( Types::EAnalysisType type, UInt_t num
berClasses, UInt_t numberTargets );
// training method // training method
void Train( void ); void Train( void );
using MethodBase::WriteWeightsToStream; using MethodBase::WriteWeightsToStream;
using MethodBase::ReadWeightsFromStream; using MethodBase::ReadWeightsFromStream;
// write weights to file // write weights to file
void WriteWeightsToStream( ostream& o ) const; void WriteWeightsToStream( ostream& o ) const;
void AddWeightsXMLTo( void* parent ) const;
// read weights from file // read weights from file
void ReadWeightsFromStream( istream& istr ); void ReadWeightsFromStream( istream& istr );
void ReadWeightsFromXML(void* wghtnode);
// calculate the MVA value ... // calculate the MVA value ...
// - here it is just a dummy, as it is done in the overwritten // - here it is just a dummy, as it is done in the overwritten
// - PrepareEvaluationtree... ugly but necessary due to the strucure // - PrepareEvaluationtree... ugly but necessary due to the strucure
// of TMultiLayerPercepton in ROOT grr... :-( // of TMultiLayerPercepton in ROOT grr... :-(
Double_t GetMvaValue(); Double_t GetMvaValue( Double_t* err = 0 );
void SetHiddenLayer(TString hiddenlayer = "" ) { fHiddenLayer=hiddenl ayer; } void SetHiddenLayer(TString hiddenlayer = "" ) { fHiddenLayer=hiddenl ayer; }
// ranking of input variables // ranking of input variables
const Ranking* CreateRanking() { return 0; } const Ranking* CreateRanking() { return 0; }
// make ROOT-independent C++ class
void MakeClass( const TString& classFileName = TString("") ) const;
protected: protected:
// make ROOT-independent C++ class for classifier response (classifie r-specific implementation) // make ROOT-independent C++ class for classifier response (classifie r-specific implementation)
void MakeClassSpecific( std::ostream&, const TString& ) const; void MakeClassSpecific( std::ostream&, const TString& ) const;
// get help message text // get help message text
void GetHelpMessage() const; void GetHelpMessage() const;
private: private:
skipping to change at line 121 skipping to change at line 126
TMultiLayerPerceptron* fMLP; // the TMLP TMultiLayerPerceptron* fMLP; // the TMLP
TTree* fLocalTrainingTree; // local copy of training tree TTree* fLocalTrainingTree; // local copy of training tree
TString fHiddenLayer; // string containig the hidden layer st ructure TString fHiddenLayer; // string containig the hidden layer st ructure
Int_t fNcycles; // number of training cylcles Int_t fNcycles; // number of training cylcles
Double_t fValidationFraction; // fraction of events in training tree used for cross validation Double_t fValidationFraction; // fraction of events in training tree used for cross validation
TString fMLPBuildOptions; // option string to build the mlp TString fMLPBuildOptions; // option string to build the mlp
TString fLearningMethod; // the learning method (given via optio n string) TString fLearningMethod; // the learning method (given via optio n string)
void InitTMlpANN( void ); // default initialisation called by all constructors
void Init( void );
ClassDef(MethodTMlpANN,0) // Implementation of interface for TMultiLa yerPerceptron ClassDef(MethodTMlpANN,0) // Implementation of interface for TMultiLa yerPerceptron
}; };
} // namespace TMVA } // namespace TMVA
#endif #endif
 End of changes. 11 change blocks. 
7 lines changed or deleted 14 lines changed or added


 MetricEuler.h   MetricEuler.h 
// @(#)root/tmva $Id: MetricEuler.h 20882 2007-11-19 11:31:26Z rdm $ // @(#)root/tmva $Id: MetricEuler.h 29122 2009-06-22 06:51:30Z brun $
// Author: Peter Speckmayer // Author: Peter Speckmayer
/************************************************************************** ******** /************************************************************************** ********
* Project: TMVA - a Root-integrated toolkit for multivariate data analysis * * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
* Package: TMVA * * Package: TMVA *
* Class : MetricEuler * * Class : MetricEuler *
* Web : http://tmva.sourceforge.net * * Web : http://tmva.sourceforge.net *
* * * *
* Description: * * Description: *
* Fitter using a Genetic Algorithm * * Fitter using a Genetic Algorithm *
skipping to change at line 31 skipping to change at line 31
* modification, are permitted according to the terms listed in LICENSE * * modification, are permitted according to the terms listed in LICENSE *
* (http://tmva.sourceforge.net/LICENSE) * * (http://tmva.sourceforge.net/LICENSE) *
************************************************************************** ********/ ************************************************************************** ********/
#ifndef ROOT_TMVA_MetricEuler #ifndef ROOT_TMVA_MetricEuler
#define ROOT_TMVA_MetricEuler #define ROOT_TMVA_MetricEuler
#include <vector> #include <vector>
#ifndef ROOT_TMVA_IMetric #ifndef ROOT_TMVA_IMetric
#ifndef ROOT_IMetric
#include "IMetric.h" #include "IMetric.h"
#endif #endif
#endif
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// // // //
// MetricEuler // // MetricEuler //
// // // //
// distance between two points in parameter space // // distance between two points in parameter space //
// // // //
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
namespace TMVA { namespace TMVA {
 End of changes. 3 change blocks. 
1 lines changed or deleted 3 lines changed or added


 MetricManhattan.h   MetricManhattan.h 
// @(#)root/tmva $Id: MetricManhattan.h 20882 2007-11-19 11:31:26Z rdm $ // @(#)root/tmva $Id: MetricManhattan.h 29122 2009-06-22 06:51:30Z brun $
// Author: Peter Speckmayer // Author: Peter Speckmayer
/************************************************************************** ******** /************************************************************************** ********
* Project: TMVA - a Root-integrated toolkit for multivariate data analysis * * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
* Package: TMVA * * Package: TMVA *
* Class : MetricManhattan * * Class : MetricManhattan *
* Web : http://tmva.sourceforge.net * * Web : http://tmva.sourceforge.net *
* * * *
* Description: * * Description: *
* Fitter using a Genetic Algorithm * * Fitter using a Genetic Algorithm *
skipping to change at line 31 skipping to change at line 31
* modification, are permitted according to the terms listed in LICENSE * * modification, are permitted according to the terms listed in LICENSE *
* (http://tmva.sourceforge.net/LICENSE) * * (http://tmva.sourceforge.net/LICENSE) *
************************************************************************** ********/ ************************************************************************** ********/
#ifndef ROOT_TMVA_MetricManhattan #ifndef ROOT_TMVA_MetricManhattan
#define ROOT_TMVA_MetricManhattan #define ROOT_TMVA_MetricManhattan
#include <vector> #include <vector>
#ifndef ROOT_TMVA_IMetric #ifndef ROOT_TMVA_IMetric
#ifndef ROOT_IMetric
#include "IMetric.h" #include "IMetric.h"
#endif #endif
#endif
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// // // //
// MetricManhattan // // MetricManhattan //
// // // //
// distance between two points in parameter space // // distance between two points in parameter space //
// // // //
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
namespace TMVA { namespace TMVA {
 End of changes. 3 change blocks. 
1 lines changed or deleted 3 lines changed or added


 Minimizer.h   Minimizer.h 
// @(#)root/mathcore:$Id: Minimizer.h 26866 2008-12-12 10:50:07Z moneta $ // @(#)root/mathcore:$Id: Minimizer.h 28946 2009-06-11 15:39:14Z moneta $
// Author: L. Moneta Fri Sep 22 15:06:47 2006 // Author: L. Moneta Fri Sep 22 15:06:47 2006
/********************************************************************** /**********************************************************************
* * * *
* Copyright (c) 2006 LCG ROOT Math Team, CERN/PH-SFT * * Copyright (c) 2006 LCG ROOT Math Team, CERN/PH-SFT *
* * * *
* * * *
**********************************************************************/ **********************************************************************/
// Header file for class Minimizer // Header file for class Minimizer
skipping to change at line 175 skipping to change at line 175
virtual bool SetVariable(unsigned int ivar, const std::string & name, do uble val, double step) = 0; virtual bool SetVariable(unsigned int ivar, const std::string & name, do uble val, double step) = 0;
/// set lower limit variable (override if minimizer supports them ) /// set lower limit variable (override if minimizer supports them )
virtual bool SetLowerLimitedVariable(unsigned int ivar , const std::str ing & name , double val , double step , double lower ) { virtual bool SetLowerLimitedVariable(unsigned int ivar , const std::str ing & name , double val , double step , double lower ) {
return SetLimitedVariable(ivar, name, val, step, lower, std::numeric_ limits<double>::infinity() ); return SetLimitedVariable(ivar, name, val, step, lower, std::numeric_ limits<double>::infinity() );
} }
/// set upper limit variable (override if minimizer supports them ) /// set upper limit variable (override if minimizer supports them )
virtual bool SetUpperLimitedVariable(unsigned int ivar , const std::stri ng & name , double val , double step , double upper ) { virtual bool SetUpperLimitedVariable(unsigned int ivar , const std::stri ng & name , double val , double step , double upper ) {
return SetLimitedVariable(ivar, name, val, step, - std::numeric_limit s<double>::infinity(), upper ); return SetLimitedVariable(ivar, name, val, step, - std::numeric_limit s<double>::infinity(), upper );
} }
/// set upper/lower limited variable (override if minimizer supports the m ) /// set upper/lower limited variable (override if minimizer supports the m )
virtual bool SetLimitedVariable(unsigned int ivar , const std::string & virtual bool SetLimitedVariable(unsigned int /* ivar */ , const std::str
name , double val , double step , double /* lower */, double /* upper */) { ing & /* name */ , double /*val */ , double /* step */, double /* lower */
return SetVariable(ivar, name, val, step ); , double /* upper */) {
return false;
} }
/// set fixed variable (override if minimizer supports them ) /// set fixed variable (override if minimizer supports them )
virtual bool SetFixedVariable(unsigned int ivar , const std::string & na virtual bool SetFixedVariable(unsigned int /* ivar */ , const std::strin
me , double val ) { g & /* name */ , double /* val */ ) {
return SetLimitedVariable(ivar, name, val, 0., val, val); return false;
} }
/// set the value of an existing variable /// set the value of an existing variable
virtual bool SetVariableValue(unsigned int , double ) { return false; } virtual bool SetVariableValue(unsigned int , double ) { return false; }
/// set the values of all existing variables (array must be dimensioned to the size of the existing parameters) /// set the values of all existing variables (array must be dimensioned to the size of the existing parameters)
virtual bool SetVariableValues(const double * x) { virtual bool SetVariableValues(const double * x) {
bool ret = true; bool ret = true;
unsigned int i = 0; unsigned int i = 0;
while ( i <= NDim() && ret) { while ( i <= NDim() && ret) {
SetVariableValue(i,x[i] ); i++; SetVariableValue(i,x[i] ); i++;
} }
skipping to change at line 232 skipping to change at line 232
/// return errors at the minimum /// return errors at the minimum
virtual const double * Errors() const = 0; virtual const double * Errors() const = 0;
/** return covariance matrices elements /** return covariance matrices elements
if the variable is fixed the matrix is zero if the variable is fixed the matrix is zero
The ordering of the variables is the same as in errors The ordering of the variables is the same as in errors
*/ */
virtual double CovMatrix(unsigned int i, unsigned int j) const = 0; virtual double CovMatrix(unsigned int i, unsigned int j) const = 0;
///return status of covariance matrix
/// using Minuit convention {0 not calculated 1 approximated 2 made pos
def , 3 accurate}
virtual int CovMatrixStatus() const { return ( (fValidError) ? 3 : 1);
}
/** /**
return correlation coefficient between variable i and j. return correlation coefficient between variable i and j.
If the variable is fixed or const the return value is zero If the variable is fixed or const the return value is zero
*/ */
virtual double Correlation(unsigned int i, unsigned int j ) const { virtual double Correlation(unsigned int i, unsigned int j ) const {
double tmp = CovMatrix(i,i) * CovMatrix(j,j); double tmp = CovMatrix(i,i) * CovMatrix(j,j);
return ( tmp < 0) ? 0 : CovMatrix(i,j) / std::sqrt( tmp ); return ( tmp < 0) ? 0 : CovMatrix(i,j) / std::sqrt( tmp );
} }
/** /**
skipping to change at line 259 skipping to change at line 263
/** /**
minos error for variable i, return false if Minos failed or not suppo rted minos error for variable i, return false if Minos failed or not suppo rted
*/ */
virtual bool GetMinosError(unsigned int /* i */, double & errLow, double & errUp) { virtual bool GetMinosError(unsigned int /* i */, double & errLow, double & errUp) {
errLow = 0; errUp = 0; errLow = 0; errUp = 0;
return false; return false;
} }
/** /**
perform a full calculation of the Hessian matrix for error calculatio
n
*/
virtual bool Hesse() { return false; }
/**
scan function minimum for variable i. Variable and funciton must be s et before using Scan scan function minimum for variable i. Variable and funciton must be s et before using Scan
Return false if an error or if minimizer does not support this funcit onality Return false if an error or if minimizer does not support this funcit onality
*/ */
virtual bool Scan(unsigned int /* i */, unsigned int & /* nstep */, doub le * /* x */, double * /* y */, virtual bool Scan(unsigned int /* i */, unsigned int & /* nstep */, doub le * /* x */, double * /* y */,
double /*xmin */ = 0, double /*xmax*/ = 0) { double /*xmin */ = 0, double /*xmax*/ = 0) {
return false; return false;
} }
/** /**
find the contour points (xi,xj) of the function for parameter i and j around the minimum find the contour points (xi,xj) of the function for parameter i and j around the minimum
 End of changes. 5 change blocks. 
7 lines changed or deleted 20 lines changed or added


 Minuit2Minimizer.h   Minuit2Minimizer.h 
skipping to change at line 170 skipping to change at line 170
/** /**
return covariance matrices elements return covariance matrices elements
if the variable is fixed or const the value is zero if the variable is fixed or const the value is zero
The ordering of the variables is the same as in errors and parameter value. The ordering of the variables is the same as in errors and parameter value.
This is different from the direct interface of Minuit2 or TMinuit wh ere the This is different from the direct interface of Minuit2 or TMinuit wh ere the
values were obtained only to variable parameters values were obtained only to variable parameters
*/ */
virtual double CovMatrix(unsigned int i, unsigned int j) const; virtual double CovMatrix(unsigned int i, unsigned int j) const;
/** /**
return the status of the covariance matrix
*/
virtual int CovMatrixStatus() const;
/**
return correlation coefficient between variable i and j. return correlation coefficient between variable i and j.
If the variable is fixed or const the return value is zero If the variable is fixed or const the return value is zero
*/ */
virtual double Correlation(unsigned int i, unsigned int j ) const; virtual double Correlation(unsigned int i, unsigned int j ) const;
/** /**
get global correlation coefficient for the variable i. This is a numb er between zero and one which gives get global correlation coefficient for the variable i. This is a numb er between zero and one which gives
the correlation between the i-th variable and that linear combinatio n of all other variables which the correlation between the i-th variable and that linear combinatio n of all other variables which
is most strongly correlated with i. is most strongly correlated with i.
If the variable is fixed or const the return value is zero If the variable is fixed or const the return value is zero
skipping to change at line 201 skipping to change at line 205
return false if it is not the case return false if it is not the case
*/ */
virtual bool Scan(unsigned int i, unsigned int & nstep, double * x, doub le * y, double xmin = 0, double xmax = 0); virtual bool Scan(unsigned int i, unsigned int & nstep, double * x, doub le * y, double xmin = 0, double xmax = 0);
/** /**
find the contour points (xi,xj) of the function for parameter i and j around the minimum find the contour points (xi,xj) of the function for parameter i and j around the minimum
The contour will be find for value of the function = Min + ErrorUp(); The contour will be find for value of the function = Min + ErrorUp();
*/ */
virtual bool Contour(unsigned int i, unsigned int j, unsigned int & npoi nts, double *xi, double *xj); virtual bool Contour(unsigned int i, unsigned int j, unsigned int & npoi nts, double *xi, double *xj);
/**
perform a full calculation of the Hessian matrix for error calculatio
n
If a valid minimum exists the calculation is done on theminimum point
otherwise is performed
in the current set values of parameters
*/
virtual bool Hesse();
/// return reference to the objective function /// return reference to the objective function
///virtual const ROOT::Math::IGenFunction & Function() const; ///virtual const ROOT::Math::IGenFunction & Function() const;
protected: protected:
// protected function for accessing the internal Minuit2 object. Needed for derived classes // protected function for accessing the internal Minuit2 object. Needed for derived classes
virtual const ROOT::Minuit2::ModularFunctionMinimizer * GetMinimizer() c onst { return fMinimizer; } virtual const ROOT::Minuit2::ModularFunctionMinimizer * GetMinimizer() c onst { return fMinimizer; }
virtual void SetMinimizer( ROOT::Minuit2::ModularFunctionMinimizer * m) { fMinimizer = m; } virtual void SetMinimizer( ROOT::Minuit2::ModularFunctionMinimizer * m) { fMinimizer = m; }
 End of changes. 2 change blocks. 
0 lines changed or deleted 13 lines changed or added


 MinuitWrapper.h   MinuitWrapper.h 
// @(#)root/tmva $Id: MinuitWrapper.h 20882 2007-11-19 11:31:26Z rdm $ // @(#)root/tmva $Id: MinuitWrapper.h 29122 2009-06-22 06:51:30Z brun $
// Author: Peter Speckmayer // Author: Peter Speckmayer
/************************************************************************** ******** /************************************************************************** ********
* Project: TMVA - a Root-integrated toolkit for multivariate data analysis * * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
* Package: TMVA * * Package: TMVA *
* Class : MinuitWrapper * * Class : MinuitWrapper *
* Web : http://tmva.sourceforge.net * * Web : http://tmva.sourceforge.net *
* * * *
* Description: * * Description: *
* Wrapper around MINUIT * * Wrapper around MINUIT *
skipping to change at line 36 skipping to change at line 36
#define ROOT_TMVA_MinuitWrapper #define ROOT_TMVA_MinuitWrapper
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// // // //
// MinuitWrapper // // MinuitWrapper //
// // // //
// Wrapper around MINUIT // // Wrapper around MINUIT //
// // // //
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
#ifndef ROOT_TMinuit
#include "TMinuit.h" #include "TMinuit.h"
#endif
#ifndef ROOT_TMVA_IFitterTarget #ifndef ROOT_TMVA_IFitterTarget
#include "TMVA/IFitterTarget.h" #include "TMVA/IFitterTarget.h"
#endif #endif
class TMinuit; class TMinuit;
namespace TMVA { namespace TMVA {
class IFitterTarget; class IFitterTarget;
 End of changes. 3 change blocks. 
1 lines changed or deleted 3 lines changed or added


 MisClassificationError.h   MisClassificationError.h 
// @(#)root/tmva $Id: MisClassificationError.h 20882 2007-11-19 11:31:26Z r dm $ // @(#)root/tmva $Id: MisClassificationError.h 29122 2009-06-22 06:51:30Z b run $
// Author: Andreas Hoecker, Joerg Stelzer, Helge Voss, Kai Voss // Author: Andreas Hoecker, Joerg Stelzer, Helge Voss, Kai Voss
/************************************************************************** ******** /************************************************************************** ********
* Project: TMVA - a Root-integrated toolkit for multivariate data analysis * * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
* Package: TMVA * * Package: TMVA *
* Class : MisClassificationError * * Class : MisClassificationError *
* Web : http://tmva.sourceforge.net * * Web : http://tmva.sourceforge.net *
* * * *
* Description: * * Description: *
* Implementation of the MisClassificationError as separation * * Implementation of the MisClassificationError as separation *
* criterion: 1-max(p, 1-p) * * criterion: 1-max(p, 1-p) *
* * * *
* * * *
* Authors (alphabetical): * * Authors (alphabetical): *
* Andreas Hoecker <Andreas.Hocker@cern.ch> - CERN, Switzerland * * Andreas Hoecker <Andreas.Hocker@cern.ch> - CERN, Switzerland *
* Xavier Prudent <prudent@lapp.in2p3.fr> - LAPP, France *
* Helge Voss <Helge.Voss@cern.ch> - MPI-K Heidelberg, German y * * Helge Voss <Helge.Voss@cern.ch> - MPI-K Heidelberg, German y *
* Kai Voss <Kai.Voss@cern.ch> - U. of Victoria, Canada * * Kai Voss <Kai.Voss@cern.ch> - U. of Victoria, Canada *
* * * *
* Copyright (c) 2005: * * Copyright (c) 2005: *
* CERN, Switzerland * * CERN, Switzerland *
* U. of Victoria, Canada * * U. of Victoria, Canada *
* Heidelberg U., Germany * * Heidelberg U., Germany *
* LAPP, Annecy, France *
* * * *
* Redistribution and use in source and binary forms, with or without * * Redistribution and use in source and binary forms, with or without *
* modification, are permitted according to the terms listed in LICENSE * * modification, are permitted according to the terms listed in LICENSE *
* (http://tmva.sourceforge.net/LICENSE) * * (http://tmva.sourceforge.net/LICENSE) *
************************************************************************** ********/ ************************************************************************** ********/
#ifndef ROOT_TMVA_MisClassificationError #ifndef ROOT_TMVA_MisClassificationError
#define ROOT_TMVA_MisClassificationError #define ROOT_TMVA_MisClassificationError
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// // // //
// MisClassificationError // // MisClassificationError //
// // // //
// Implementation of the MisClassificationError as separation criterion // // Implementation of the MisClassificationError as separation criterion //
// // // //
// criterion: 1-max(p, 1-p) // // criterion: 1-max(p, 1-p) //
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
#ifndef ROOT_TMVA_ #ifndef ROOT_TMVA_SeparationBase
#include "TMVA/SeparationBase.h" #include "TMVA/SeparationBase.h"
#endif #endif
namespace TMVA { namespace TMVA {
class MisClassificationError : public SeparationBase { class MisClassificationError : public SeparationBase {
public: public:
// consturctor for the Misclassification error // consturctor for the Misclassification error
 End of changes. 4 change blocks. 
4 lines changed or deleted 2 lines changed or added


 ModulekNN.h   ModulekNN.h 
// @(#)root/tmva $Id: ModulekNN.h 27320 2009-02-02 06:40:36Z brun $ // @(#)root/tmva $Id: ModulekNN.h 29195 2009-06-24 10:39:49Z brun $
// Author: Rustem Ospanov // Author: Rustem Ospanov
/************************************************************************** ******** /************************************************************************** ********
* Project: TMVA - a Root-integrated toolkit for multivariate data analysis * * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
* Package: TMVA * * Package: TMVA *
* Class : ModulekNN * * Class : ModulekNN *
* Web : http://tmva.sourceforge.net * * Web : http://tmva.sourceforge.net *
* * * *
* Description: * * Description: *
* Module for k-nearest neighbor algorithm * * Module for k-nearest neighbor algorithm *
skipping to change at line 26 skipping to change at line 26
* Copyright (c) 2007: * * Copyright (c) 2007: *
* CERN, Switzerland * * CERN, Switzerland *
* MPI-K Heidelberg, Germany * * MPI-K Heidelberg, Germany *
* U. of Texas at Austin, USA * * U. of Texas at Austin, USA *
* * * *
* Redistribution and use in source and binary forms, with or without * * Redistribution and use in source and binary forms, with or without *
* modification, are permitted according to the terms listed in LICENSE * * modification, are permitted according to the terms listed in LICENSE *
* (http://tmva.sourceforge.net/LICENSE) * * (http://tmva.sourceforge.net/LICENSE) *
************************************************************************** ********/ ************************************************************************** ********/
#ifndef ROOT_TMVA_KNN_ModulekNN #ifndef ROOT_TMVA_ModulekNN
#define ROOT_TMVA_KNN_ModulekNN #define ROOT_TMVA_ModulekNN
//______________________________________________________________________ //______________________________________________________________________
/* /*
kNN::Event describes point in input variable vector-space, with kNN::Event describes point in input variable vector-space, with
additional functionality like distance between points additional functionality like distance between points
*/ */
//______________________________________________________________________ //______________________________________________________________________
// C++ // C++
#include <cassert> #include <cassert>
#include <iosfwd> #include <iosfwd>
#include <map> #include <map>
#include <string>
#include <vector> #include <vector>
// ROOT // ROOT
#ifndef ROOT_Rtypes
#include "Rtypes.h" #include "Rtypes.h"
#endif
// Local #ifndef ROOT_TMVA_NodekNN
#ifndef ROOT_TMVA_KNN_Node
#include "TMVA/NodekNN.h" #include "TMVA/NodekNN.h"
#endif #endif
#ifndef ROOT_TMVA_MsgLogger
#include "TMVA/MsgLogger.h"
#endif
namespace TMVA namespace TMVA {
{
namespace kNN class MsgLogger;
{
namespace kNN {
typedef Float_t VarType; typedef Float_t VarType;
typedef std::vector<VarType> VarVec; typedef std::vector<VarType> VarVec;
class Event class Event {
{
public: public:
Event(); Event();
Event(const VarVec &vec, Double_t weight, Short_t type); Event(const VarVec &vec, Double_t weight, Short_t type);
Event(const VarVec &vec, Double_t weight, Short_t type, const VarV ec &tvec);
~Event(); ~Event();
Double_t GetWeight() const; Double_t GetWeight() const;
VarType GetVar(UInt_t i) const; VarType GetVar(UInt_t i) const;
VarType GetTgt(UInt_t i) const;
UInt_t GetNVar() const; UInt_t GetNVar() const;
UInt_t GetNTgt() const;
Short_t GetType() const; Short_t GetType() const;
// keep these two function separate // keep these two function separate
VarType GetDist(VarType var, UInt_t ivar) const; VarType GetDist(VarType var, UInt_t ivar) const;
VarType GetDist(const Event &other) const; VarType GetDist(const Event &other) const;
void SetTargets(const VarVec &tvec);
const VarVec& GetTargets() const;
const VarVec& GetVars() const;
void Print() const; void Print() const;
void Print(std::ostream& os) const; void Print(std::ostream& os) const;
private: private:
VarVec fVar; VarVec fVar; // coordinates (variables) for knn search
VarVec fTgt; // targets for regression analysis
Double_t fWeight; Double_t fWeight; // event weight
Short_t fType; Short_t fType; // event type ==0 or == 1, expand it to arbitrary c
lass types?
}; };
typedef std::vector<TMVA::kNN::Event> EventVec; typedef std::vector<TMVA::kNN::Event> EventVec;
typedef std::pair<const Node<Event> *, VarType> Elem; typedef std::pair<const Node<Event> *, VarType> Elem;
typedef std::list<Elem> List; typedef std::list<Elem> List;
std::ostream& operator<<(std::ostream& os, const Event& event); std::ostream& operator<<(std::ostream& os, const Event& event);
class ModulekNN class ModulekNN
{ {
skipping to change at line 114 skipping to change at line 122
ModulekNN(); ModulekNN();
~ModulekNN(); ~ModulekNN();
void Clear(); void Clear();
void Add(const Event &event); void Add(const Event &event);
Bool_t Fill(const UShort_t odepth, UInt_t ifrac, const std::string &option = ""); Bool_t Fill(const UShort_t odepth, UInt_t ifrac, const std::string &option = "");
Bool_t Find(Event event, UInt_t nfind = 100) const; Bool_t Find(Event event, UInt_t nfind = 100, const std::string &op tion = "count") const;
Bool_t Find(UInt_t nfind, const std::string &option) const; Bool_t Find(UInt_t nfind, const std::string &option) const;
const EventVec& GetEventVec() const; const EventVec& GetEventVec() const;
const List& GetkNNList() const; const List& GetkNNList() const;
const Event& GetkNNEvent() const; const Event& GetkNNEvent() const;
const VarMap& GetVarMap() const; const VarMap& GetVarMap() const;
const std::map<Int_t, Double_t>& GetMetric() const; const std::map<Int_t, Double_t>& GetMetric() const;
skipping to change at line 153 skipping to change at line 161
std::map<Int_t, Double_t> fVarScale; std::map<Int_t, Double_t> fVarScale;
mutable List fkNNList; // latest result from kNN search mutable List fkNNList; // latest result from kNN search
mutable Event fkNNEvent; // latest event used for kNN search mutable Event fkNNEvent; // latest event used for kNN search
std::map<Short_t, UInt_t> fCount; // count number of events of eac h type std::map<Short_t, UInt_t> fCount; // count number of events of eac h type
EventVec fEvent; // vector of all events used to build tree and an alysis EventVec fEvent; // vector of all events used to build tree and an alysis
VarMap fVar; // sorted map of variables in each dimension for all event types VarMap fVar; // sorted map of variables in each dimension for all event types
mutable MsgLogger fLogger; // message logger mutable MsgLogger* fLogger; // message logger
MsgLogger& Log() const { return *fLogger; }
}; };
// //
// inlined functions for Event class // inlined functions for Event class
// //
inline VarType Event::GetDist(const VarType var1, const UInt_t ivar) const inline VarType Event::GetDist(const VarType var1, const UInt_t ivar) const
{ {
const VarType var2 = GetVar(ivar); const VarType var2 = GetVar(ivar);
return (var1 - var2) * (var1 - var2); return (var1 - var2) * (var1 - var2);
} }
inline Double_t Event::GetWeight() const inline Double_t Event::GetWeight() const
{ {
return fWeight; return fWeight;
} }
inline VarType Event::GetVar(const UInt_t i) const inline VarType Event::GetVar(const UInt_t i) const
{ {
assert(i < GetNVar());
return fVar[i]; return fVar[i];
} }
inline VarType Event::GetTgt(const UInt_t i) const
{
return fTgt[i];
}
inline UInt_t Event::GetNVar() const inline UInt_t Event::GetNVar() const
{ {
return fVar.size(); return fVar.size();
} }
inline UInt_t Event::GetNTgt() const
{
return fTgt.size();
}
inline Short_t Event::GetType() const inline Short_t Event::GetType() const
{ {
return fType; return fType;
} }
// //
// inline functions for ModulekNN class // inline functions for ModulekNN class
// //
inline const List& ModulekNN::GetkNNList() const inline const List& ModulekNN::GetkNNList() const
{ {
 End of changes. 20 change blocks. 
20 lines changed or deleted 38 lines changed or added


 MsgLogger.h   MsgLogger.h 
// @(#)root/tmva $Id: MsgLogger.h 26085 2008-11-05 16:34:45Z pcanal $ // @(#)root/tmva $Id: MsgLogger.h 29195 2009-06-24 10:39:49Z brun $
// Author: Attila Krasznahorkay // Author: Attila Krasznahorkay
/************************************************************************** ******** /************************************************************************** ********
* Project: TMVA - a Root-integrated toolkit for multivariate data analysis * * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
* Package: TMVA * * Package: TMVA *
* Class : MsgLogger * * Class : MsgLogger *
* Web : http://tmva.sourceforge.net * * Web : http://tmva.sourceforge.net *
* * * *
* Description: * * Description: *
* TMVA output logger class producing nicely formatted log messages * * TMVA output logger class producing nicely formatted log messages *
skipping to change at line 47 skipping to change at line 47
#include <string> #include <string>
#include <sstream> #include <sstream>
#include <iostream> #include <iostream>
#include <map> #include <map>
// ROOT include(s) // ROOT include(s)
#ifndef ROOT_TObject #ifndef ROOT_TObject
#include "TObject.h" #include "TObject.h"
#endif #endif
#ifndef ROOT_TMVA_Types
#include "TMVA/Types.h"
#endif
// Local include(s): // Local include(s):
namespace TMVA { namespace TMVA {
// define outside of class to facilite access
enum EMsgType {
kDEBUG = 1,
kVERBOSE = 2,
kINFO = 3,
kWARNING = 4,
kERROR = 5,
kFATAL = 6,
kSILENT = 7
};
class MsgLogger : public std::ostringstream, public TObject { class MsgLogger : public std::ostringstream, public TObject {
public: public:
MsgLogger( const TObject* source, EMsgType minType = kINFO ); MsgLogger( const TObject* source, EMsgType minType = kINFO );
MsgLogger( const std::string& source, EMsgType minType = kINFO ); MsgLogger( const std::string& source, EMsgType minType = kINFO );
MsgLogger( EMsgType minType = kINFO ); MsgLogger( EMsgType minType = kINFO );
MsgLogger( const MsgLogger& parent ); MsgLogger( const MsgLogger& parent );
~MsgLogger(); ~MsgLogger();
skipping to change at line 102 skipping to change at line 95
// Accept message type specification // Accept message type specification
MsgLogger& operator<< ( EMsgType type ); MsgLogger& operator<< ( EMsgType type );
// For all the "conventional" inputs // For all the "conventional" inputs
template <class T> MsgLogger& operator<< ( T arg ) { template <class T> MsgLogger& operator<< ( T arg ) {
*(std::ostringstream*)this << arg; *(std::ostringstream*)this << arg;
return *this; return *this;
} }
// Temporaly disables all the loggers (Caution! Use with care !)
static void InhibitOutput();
static void EnableOutput();
private: private:
// private utility routines // private utility routines
void Send(); void Send();
void InitMaps(); void InitMaps();
void WriteMsg( EMsgType type, const std::string& line ) const; void WriteMsg( EMsgType type, const std::string& line ) const;
const TObject* fObjSource; // the source TObjec t (used for name) const TObject* fObjSource; // the source TObjec t (used for name)
std::string fStrSource; // alternative strin g source std::string fStrSource; // alternative strin g source
const std::string fPrefix; // the prefix of the source name const std::string fPrefix; // the prefix of the source name
const std::string fSuffix; // suffix following source name const std::string fSuffix; // suffix following source name
EMsgType fActiveType; // active type EMsgType fActiveType; // active type
static UInt_t fgMaxSourceSize; // maximum length of source name static UInt_t fgMaxSourceSize; // maximum length of source name
static Bool_t fgOutputSupressed; // disable the out put globaly (used by generic booster)
std::map<EMsgType, std::string> fTypeMap; // matches output ty pes with strings std::map<EMsgType, std::string> fTypeMap; // matches output ty pes with strings
std::map<EMsgType, std::string> fColorMap; // matches output ty pes with terminal colors std::map<EMsgType, std::string> fColorMap; // matches output ty pes with terminal colors
EMsgType fMinType; // minimum type for output EMsgType fMinType; // minimum type for output
static Bool_t fgInhibitOutput; // flag to suppress
all output
ClassDef(MsgLogger,0) // Ostringstream derivative to redirect and for mat logging output ClassDef(MsgLogger,0) // Ostringstream derivative to redirect and for mat logging output
}; // class MsgLogger }; // class MsgLogger
inline MsgLogger& MsgLogger::operator<< ( MsgLogger& (*_f)( MsgLogger& ) ) inline MsgLogger& MsgLogger::operator<< ( MsgLogger& (*_f)( MsgLogger& ) )
{ {
return (_f)(*this); return (_f)(*this);
} }
inline MsgLogger& MsgLogger::operator<< ( std::ostream& (*_f)( std::ostr eam& ) ) inline MsgLogger& MsgLogger::operator<< ( std::ostream& (*_f)( std::ostr eam& ) )
{ {
skipping to change at line 150 skipping to change at line 150
inline MsgLogger& MsgLogger::operator<< ( EMsgType type ) inline MsgLogger& MsgLogger::operator<< ( EMsgType type )
{ {
fActiveType = type; fActiveType = type;
return *this; return *this;
} }
// Although the proper definition of "Endl" as a function pointer // Although the proper definition of "Endl" as a function pointer
// would be nicer C++-wise, it introduces some "unused variable" // would be nicer C++-wise, it introduces some "unused variable"
// warnings so let's use the #define definition after all... // warnings so let's use the #define definition after all...
// static MsgLogger& ( *Endl )( MsgLogger& ) = &MsgLogger::Endmsg; // static MsgLogger& ( *Endl )( MsgLogger& ) = &MsgLogger::Endmsg;
#ifndef __CINT__
#define Endl MsgLogger::Endmsg #define Endl MsgLogger::Endmsg
#endif
} }
#endif // TMVA_MsgLogger #endif // TMVA_MsgLogger
 End of changes. 8 change blocks. 
14 lines changed or deleted 14 lines changed or added


 NewDelFunctions.h   NewDelFunctions.h 
skipping to change at line 31 skipping to change at line 31
DelFunc_t fDelete; //pointer to a function deleting one o bject. DelFunc_t fDelete; //pointer to a function deleting one o bject.
DelArrFunc_t fDeleteArray; //pointer to a function deleting an ar ray of objects. DelArrFunc_t fDeleteArray; //pointer to a function deleting an ar ray of objects.
DesFunc_t fDestructor; //pointer to a function call an object 's destructor. DesFunc_t fDestructor; //pointer to a function call an object 's destructor.
}; };
template <class T> struct NewDelFunctionsT : public NewDelFunctions { template <class T> struct NewDelFunctionsT : public NewDelFunctions {
static void* new_T(void* p) { return p ? new(p) T : new T; } static void* new_T(void* p) { return p ? new(p) T : new T; }
static void* new_p_T(void* p) { return p ? new(p) T : ::new T; } static void* new_p_T(void* p) { return p ? new(p) T : ::new T; }
static void* new_np_T(void* p) { return p ? ::new(p) T : new T; } static void* new_np_T(void* p) { return p ? ::new(p) T : new T; }
static void* newArray_T(long size, void* p) { return p ? new (p) T[si ze] : new T[size]; } static void* newArray_T(long size, void* p) { return p ? new (p) T[si ze] : new T[size]; }
static void* newArray_p_T(size_t size, void* p) { return p ? new (p) static void* newArray_p_T(long size, void* p) { return p ? new (p) T[
T[size] : ::new T[size]; } size] : ::new T[size]; }
static void* newArray_np_T(size_t size, void* p) { return p ? ::new ( static void* newArray_np_T(long size, void* p) { return p ? ::new (p)
p) T[size] : new T[size]; } T[size] : new T[size]; }
static void delete_T(void *p) { delete (T*)p; } static void delete_T(void *p) { delete (T*)p; }
static void deleteArray_T(void* p) { delete [] (T*)p; } static void deleteArray_T(void* p) { delete [] (T*)p; }
static void destruct_T(void* p) { ((T*)p)->~T(); } static void destruct_T(void* p) { ((T*)p)->~T(); }
NewDelFunctionsT() { NewDelFunctionsT() {
fNew = new_T; fNew = new_T;
fNewArray = newArray_T; fNewArray = newArray_T;
fDelete = delete_T; fDelete = delete_T;
fDeleteArray = deleteArray_T; fDeleteArray = deleteArray_T;
fDestructor = destruct_T; fDestructor = destruct_T;
} }
 End of changes. 1 change blocks. 
4 lines changed or deleted 4 lines changed or added


 NeymanConstruction.h   NeymanConstruction.h 
skipping to change at line 25 skipping to change at line 25
#include "Rtypes.h" #include "Rtypes.h"
#endif #endif
#ifndef ROOSTATS_IntervalCalculator #ifndef ROOSTATS_IntervalCalculator
#include "RooStats/IntervalCalculator.h" #include "RooStats/IntervalCalculator.h"
#endif #endif
#include "RooStats/TestStatSampler.h" #include "RooStats/TestStatSampler.h"
#include "RooStats/ConfidenceBelt.h" #include "RooStats/ConfidenceBelt.h"
#include "RooTreeData.h" #include "RooAbsData.h"
#include "RooWorkspace.h" #include "RooWorkspace.h"
#include "RooAbsPdf.h" #include "RooAbsPdf.h"
#include "RooArgSet.h" #include "RooArgSet.h"
#include "TList.h" #include "TList.h"
class RooAbsData; class RooAbsData;
namespace RooStats { namespace RooStats {
class ConfInterval; class ConfInterval;
class NeymanConstruction : public IntervalCalculator { class NeymanConstruction : public IntervalCalculator {
public: public:
NeymanConstruction(); NeymanConstruction();
virtual ~NeymanConstruction() {} virtual ~NeymanConstruction();
// Main interface to get a ConfInterval (will be a PointSetInterval) // Main interface to get a ConfInterval (will be a PointSetInterval)
virtual ConfInterval* GetInterval() const; virtual ConfInterval* GetInterval() const;
virtual ConfInterval* GetIntervalUsingList() const; virtual ConfInterval* GetIntervalUsingList() const;
// Interface extended with I/O support // Interface extended with I/O support
virtual ConfInterval* GetInterval(const char* asciiFilePat) const; virtual ConfInterval* GetInterval(const char* asciiFilePat) const;
// Actually generate teh sampling distribution // Actually generate teh sampling distribution
virtual TList* GenSamplingDistribution(const char* asciiFilePa t = 0) const; virtual TList* GenSamplingDistribution(const char* asciiFilePa t = 0) const;
skipping to change at line 63 skipping to change at line 63
// in addition to interface we also need: // in addition to interface we also need:
// Set the TestStatSampler (eg. ToyMC or FFT, includes choice of Test Statistic) // Set the TestStatSampler (eg. ToyMC or FFT, includes choice of Test Statistic)
void SetTestStatSampler(TestStatSampler& distCreator) {fTestStatSampl er = &distCreator;} void SetTestStatSampler(TestStatSampler& distCreator) {fTestStatSampl er = &distCreator;}
// fLeftSideTailFraction*fSize defines lower edge of acceptance regio n. // fLeftSideTailFraction*fSize defines lower edge of acceptance regio n.
// Unified limits use 0, central limits use 0.5, // Unified limits use 0, central limits use 0.5,
// for upper/lower limits it is 0/1 depends on sign of test statistic w.r.t. parameter // for upper/lower limits it is 0/1 depends on sign of test statistic w.r.t. parameter
void SetLeftSideTailFraction(Double_t leftSideFraction = 0.) {fLeftSi deFraction = leftSideFraction;} void SetLeftSideTailFraction(Double_t leftSideFraction = 0.) {fLeftSi deFraction = leftSideFraction;}
// User-defined set of points to test // User-defined set of points to test
void SetParameterPointsToTest(RooTreeData& pointsToTest) { void SetParameterPointsToTest(RooAbsData& pointsToTest) {
fPointsToTest = &pointsToTest; fPointsToTest = &pointsToTest;
fConfBelt = new ConfidenceBelt("ConfBelt",pointsToTest); fConfBelt = new ConfidenceBelt("ConfBelt",pointsToTest);
} }
// This class can make regularly spaced scans based on range stored i n RooRealVars. // This class can make regularly spaced scans based on range stored i n RooRealVars.
// Choose number of steps for a rastor scan (common for each dimensio n) // Choose number of steps for a rastor scan (common for each dimensio n)
// void SetNumSteps(Int_t); // void SetNumSteps(Int_t);
// This class can make regularly spaced scans based on range stored i n RooRealVars. // This class can make regularly spaced scans based on range stored i n RooRealVars.
// Choose number of steps for a rastor scan (specific for each dimens ion) // Choose number of steps for a rastor scan (specific for each dimens ion)
// void SetNumSteps(map<RooAbsArg, Int_t>) // void SetNumSteps(map<RooAbsArg, Int_t>)
// Get the size of the test (eg. rate of Type I error) // Get the size of the test (eg. rate of Type I error)
virtual Double_t Size() const {return fSize;} virtual Double_t Size() const {return fSize;}
// Get the Confidence level for the test // Get the Confidence level for the test
virtual Double_t ConfidenceLevel() const {return 1.-fSize;} virtual Double_t ConfidenceLevel() const {return 1.-fSize;}
// set a workspace that owns all the necessary components for the ana lysis // set a workspace that owns all the necessary components for the ana lysis
virtual void SetWorkspace(RooWorkspace& ws) {fWS = &ws;} virtual void SetWorkspace(RooWorkspace& ws) {fWS = &ws;}
// Set the DataSet, add to the the workspace if not already there // Set the DataSet, add to the the workspace if not already there
virtual void SetData(RooAbsData& data) { virtual void SetData(RooAbsData& data) {
if(&data){ if (!fWS) {
fWS->import(data); fWS = new RooWorkspace();
fDataName = data.GetName(); fOwnsWorkspace = true;
fWS->Print(); }
} if (! fWS->data(data.GetName()) ) {
RooMsgService::instance().setGlobalKillBelow(RooFit::ERROR) ;
fWS->import(data);
RooMsgService::instance().setGlobalKillBelow(RooFit::DEBUG) ;
}
SetData(data.GetName());
} }
// Set the Pdf, add to the the workspace if not already there // Set the Pdf, add to the the workspace if not already there
virtual void SetPdf(RooAbsPdf& pdf) { virtual void SetPdf(RooAbsPdf& pdf) {
if(&pdf){ if (!fWS)
fWS->import(pdf); fWS = new RooWorkspace();
fPdfName = pdf.GetName(); if (! fWS->pdf( pdf.GetName() ))
} {
RooMsgService::instance().setGlobalKillBelow(RooFit::ERROR) ;
fWS->import(pdf);
RooMsgService::instance().setGlobalKillBelow(RooFit::DEBUG) ;
}
SetPdf(pdf.GetName());
} }
// specify the name of the dataset in the workspace to be used // specify the name of the dataset in the workspace to be used
virtual void SetData(const char* name) {fDataName = name;} virtual void SetData(const char* name) {fDataName = name;}
// specify the name of the PDF in the workspace to be used // specify the name of the PDF in the workspace to be used
virtual void SetPdf(const char* name) {fPdfName = name;} virtual void SetPdf(const char* name) {fPdfName = name;}
// specify the parameters of interest in the interval // specify the parameters of interest in the interval
virtual void SetParameters(RooArgSet& set) {fPOI = &set;} virtual void SetParameters(RooArgSet& set) {fPOI = &set;}
// specify the nuisance parameters (eg. the rest of the parameters) // specify the nuisance parameters (eg. the rest of the parameters)
virtual void SetNuisanceParameters(RooArgSet& set) {fNuisParams = &se t;} virtual void SetNuisanceParameters(RooArgSet& set) {fNuisParams = &se t;}
// set the size of the test (rate of Type I error) ( Eg. 0.05 for a 9 5% Confidence Interval) // set the size of the test (rate of Type I error) ( Eg. 0.05 for a 9 5% Confidence Interval)
virtual void SetTestSize(Double_t size) {fSize = size;} virtual void SetTestSize(Double_t size) {fSize = size;}
// set the confidence level for the interval (eg. 0.95 for a 95% Conf idence Interval) // set the confidence level for the interval (eg. 0.95 for a 95% Conf idence Interval)
virtual void SetConfidenceLevel(Double_t cl) {fSize = 1.-cl;} virtual void SetConfidenceLevel(Double_t cl) {fSize = 1.-cl;}
ConfidenceBelt* GetConfidenceBelt() {return fConfBelt;} ConfidenceBelt* GetConfidenceBelt() {return fConfBelt;}
void UseAdaptiveSampling(bool flag=true){fAdaptiveSampling=flag;} void UseAdaptiveSampling(bool flag=true){fAdaptiveSampling=flag;}
void SaveBeltToFile(bool flag=true){
fSaveBeltToFile = flag;
if(flag) fCreateBelt = true;
}
void CreateConfBelt(bool flag=true){fCreateBelt = flag;}
private: private:
Double_t fSize; // size of the test (eg. specified rate of Type I err or) Double_t fSize; // size of the test (eg. specified rate of Type I err or)
RooWorkspace* fWS; // a workspace that owns all the components to be used by the calculator RooWorkspace* fWS; // a workspace that owns all the components to be used by the calculator
Bool_t fOwnsWorkspace; // flag if this object owns its workspace Bool_t fOwnsWorkspace; // flag if this object owns its workspace
const char* fPdfName; // name of common PDF in workspace const char* fPdfName; // name of common PDF in workspace
const char* fDataName; // name of data set in workspace const char* fDataName; // name of data set in workspace
RooArgSet* fPOI; // RooArgSet specifying parameters of interest for interval RooArgSet* fPOI; // RooArgSet specifying parameters of interest for interval
RooArgSet* fNuisParams;// RooArgSet specifying nuisance parameters f or interval RooArgSet* fNuisParams;// RooArgSet specifying nuisance parameters f or interval
TestStatSampler* fTestStatSampler; TestStatSampler* fTestStatSampler;
RooTreeData* fPointsToTest; RooAbsData* fPointsToTest;
Double_t fLeftSideFraction; Double_t fLeftSideFraction;
ConfidenceBelt* fConfBelt; ConfidenceBelt* fConfBelt;
bool fAdaptiveSampling; // controls use of adaptive sampling algorith m bool fAdaptiveSampling; // controls use of adaptive sampling algorith m
bool fSaveBeltToFile; // controls use if ConfidenceBelt should be sav
ed to a TFile
bool fCreateBelt; // controls use if ConfidenceBelt should be saved t
o a TFile
protected: protected:
ClassDef(NeymanConstruction,1) // Interface for tools setting limit s (producing confidence intervals) ClassDef(NeymanConstruction,1) // Interface for tools setting limit s (producing confidence intervals)
}; };
} }
#endif #endif
 End of changes. 9 change blocks. 
13 lines changed or deleted 34 lines changed or added


 Node.h   Node.h 
// @(#)root/tmva $Id: Node.h 21079 2007-11-27 20:08:49Z brun $ // @(#)root/tmva $Id: Node.h 29195 2009-06-24 10:39:49Z brun $
// Author: Andreas Hoecker, Joerg Stelzer, Helge Voss, Kai Voss // Author: Andreas Hoecker, Joerg Stelzer, Helge Voss, Kai Voss
/************************************************************************** ******** /************************************************************************** ********
* Project: TMVA - a Root-integrated toolkit for multivariate data analysis * * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
* Package: TMVA * * Package: TMVA *
* Classes: Node * * Classes: Node *
* Web : http://tmva.sourceforge.net * * Web : http://tmva.sourceforge.net *
* * * *
* Description: * * Description: *
* Node for the BinarySearch or Decision Trees * * Node for the BinarySearch or Decision Trees *
* * * *
* Authors (alphabetical): * * Authors (alphabetical): *
* Andreas Hoecker <Andreas.Hocker@cern.ch> - CERN, Switzerland * * Andreas Hoecker <Andreas.Hocker@cern.ch> - CERN, Switzerland *
* Xavier Prudent <prudent@lapp.in2p3.fr> - LAPP, France *
* Helge Voss <Helge.Voss@cern.ch> - MPI-K Heidelberg, German y * * Helge Voss <Helge.Voss@cern.ch> - MPI-K Heidelberg, German y *
* Kai Voss <Kai.Voss@cern.ch> - U. of Victoria, Canada * * Kai Voss <Kai.Voss@cern.ch> - U. of Victoria, Canada *
* * * *
* Copyright (c) 2005: * * Copyright (c) 2005: *
* CERN, Switzerland * * CERN, Switzerland *
* U. of Victoria, Canada * * U. of Victoria, Canada *
* MPI-K Heidelberg, Germany * * MPI-K Heidelberg, Germany *
* LAPP, Annecy, France *
* * * *
* Redistribution and use in source and binary forms, with or without * * Redistribution and use in source and binary forms, with or without *
* modification, are permitted according to the terms listed in LICENSE * * modification, are permitted according to the terms listed in LICENSE *
* (http://tmva.sourceforge.net/LICENSE) * * (http://tmva.sourceforge.net/LICENSE) *
************************************************************************** ********/ ************************************************************************** ********/
#ifndef ROOT_TMVA_Node #ifndef ROOT_TMVA_Node
#define ROOT_TMVA_Node #define ROOT_TMVA_Node
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// // // //
// Node // // Node //
// // // //
// Node base class for the BinarySearch or Decision Trees Nodes // // Node base class for the BinarySearch or Decision Trees Nodes //
// // // //
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
//#include <iosfwd> #include <iosfwd>
#include <iostream> #ifndef ROOT_Rtypes
#include "Rtypes.h" #include "Rtypes.h"
#ifndef ROOT_TMVA_MsgLogger
#include "TMVA/MsgLogger.h"
#endif #endif
namespace TMVA { namespace TMVA {
class Node; class Node;
class Event; class Event;
class BinaryTree; class BinaryTree;
ostream& operator<<( ostream& os, const Node& node ); std::ostream& operator<<( std::ostream& os, const Node& node );
ostream& operator<<( ostream& os, const Node* node ); std::ostream& operator<<( std::ostream& os, const Node* node );
// a class used to identify a Node; (needed for recursive reading from t ext file) // a class used to identify a Node; (needed for recursive reading from t ext file)
// (currently it is NOT UNIQUE... but could eventually made it // (currently it is NOT UNIQUE... but could eventually made it
// a node in the tree structure // a node in the tree structure
class Node { class Node {
// output operator for a node // output operator for a node
friend ostream& operator << (ostream& os, const Node& node); friend std::ostream& operator << (std::ostream& os, const Node& node) ;
// output operator with a pointer to the node (which still prints the node itself) // output operator with a pointer to the node (which still prints the node itself)
friend ostream& operator << (ostream& os, const Node* node); friend std::ostream& operator << (std::ostream& os, const Node* node) ;
public: public:
// constructor of a node // constructor of a node
Node(); Node();
// constructor of a daughter node as a daughter of 'p' // constructor of a daughter node as a daughter of 'p'
Node( Node* p, char pos ); Node( Node* p, char pos );
// copy constructor // copy constructor
Node( const Node &n ); Node( const Node &n );
// destructor // destructor
virtual ~Node(); virtual ~Node();
virtual Node* CreateNode() const = 0;
// test event if i{ decends the tree at this node to the right // test event if i{ decends the tree at this node to the right
virtual Bool_t GoesRight( const Event& ) const = 0; virtual Bool_t GoesRight( const Event& ) const = 0;
// test event if it decends the tree at this node to the left // test event if it decends the tree at this node to the left
virtual Bool_t GoesLeft ( const Event& ) const = 0; virtual Bool_t GoesLeft ( const Event& ) const = 0;
// test event if it is equal to the event that "makes the node" (just for the "search tree" // test event if it is equal to the event that "makes the node" (just for the "search tree"
// return pointer to the left daughter node // return pointer to the left daughter node
inline Node* GetLeft () const { return fLeft; } inline Node* GetLeft () const { return fLeft; }
// return pointer to the right daughter node // return pointer to the right daughter node
skipping to change at line 108 skipping to change at line 104
inline void SetLeft (Node* l) { fLeft = l;} inline void SetLeft (Node* l) { fLeft = l;}
// set pointer to the right daughter node // set pointer to the right daughter node
inline void SetRight (Node* r) { fRight = r;} inline void SetRight (Node* r) { fRight = r;}
// set pointer to the parent node // set pointer to the parent node
inline void SetParent(Node* p) { fParent = p;} inline void SetParent(Node* p) { fParent = p;}
//recursively go through the part of the tree below this node and cou nt all daughters //recursively go through the part of the tree below this node and cou nt all daughters
Int_t CountMeAndAllDaughters() const; Int_t CountMeAndAllDaughters() const;
// printout of the node // printout of the node
virtual void Print( ostream& os ) const = 0; virtual void Print( std::ostream& os ) const = 0;
// recursive printout of the node and it daughters // recursive printout of the node and it daughters
virtual void PrintRec ( ostream& os ) const = 0; virtual void PrintRec ( std::ostream& os ) const = 0;
void* AddXMLTo(void* parent) const;
void ReadXML(void* node);
virtual void AddAttributesToNode(void* node) const = 0;
virtual void AddContentToNode(std::stringstream& s) const = 0;
// Set depth, layer of the where the node is within the tree, seen fr om the top (root) // Set depth, layer of the where the node is within the tree, seen fr om the top (root)
void SetDepth(UInt_t d){fDepth=d;} void SetDepth(UInt_t d){fDepth=d;}
// Return depth, layer of the where the node is within the tree, seen from the top (root) // Return depth, layer of the where the node is within the tree, seen from the top (root)
UInt_t GetDepth() const {return fDepth;} UInt_t GetDepth() const {return fDepth;}
// set node position, i.e, the node is a left (l) or right (r) daugth er // set node position, i.e, the node is a left (l) or right (r) daugth er
void SetPos(char s) {fPos=s;} void SetPos(char s) {fPos=s;}
skipping to change at line 134 skipping to change at line 135
// Return the pointer to the Parent tree to which the Node belongs // Return the pointer to the Parent tree to which the Node belongs
TMVA::BinaryTree* GetParentTree() const {return fParentTree;} TMVA::BinaryTree* GetParentTree() const {return fParentTree;}
// set the pointer to the Parent Tree to which the Node belongs // set the pointer to the Parent Tree to which the Node belongs
void SetParentTree(TMVA::BinaryTree* t) {fParentTree = t;} void SetParentTree(TMVA::BinaryTree* t) {fParentTree = t;}
int GetCount(){return fgCount;} int GetCount(){return fgCount;}
virtual Bool_t ReadDataRecord( std::istream& ) = 0; virtual Bool_t ReadDataRecord( std::istream& ) = 0;
virtual void ReadAttributes(void* node) = 0;
virtual void ReadContent(std::stringstream& s) =0;
private: private:
Node* fParent; // the previous (parent) node Node* fParent; // the previous (parent) node
Node* fLeft; // pointers to the two "daughter" nodes Node* fLeft; // pointers to the two "daughter" nodes
Node* fRight; // pointers to the two "daughter" nodes Node* fRight; // pointers to the two "daughter" nodes
char fPos; // position, i.e. it is a left (l) or r ight (r) daughter char fPos; // position, i.e. it is a left (l) or r ight (r) daughter
UInt_t fDepth; // depth of the node within the tree (s een from root node) UInt_t fDepth; // depth of the node within the tree (s een from root node)
 End of changes. 12 change blocks. 
15 lines changed or deleted 18 lines changed or added


 NodekNN.h   NodekNN.h 
// @(#)root/tmva $Id: NodekNN.h 21079 2007-11-27 20:08:49Z brun $ // @(#)root/tmva $Id: NodekNN.h 29122 2009-06-22 06:51:30Z brun $
// Author: Rustem Ospanov // Author: Rustem Ospanov
/************************************************************************** ******** /************************************************************************** ********
* Project: TMVA - a Root-integrated toolkit for multivariate data analysis * * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
* Package: TMVA * * Package: TMVA *
* Class : Node * * Class : Node *
* Web : http://tmva.sourceforge.net * * Web : http://tmva.sourceforge.net *
* * * *
* Description: * * Description: *
* kd-tree (binary tree) template * * kd-tree (binary tree) template *
skipping to change at line 26 skipping to change at line 26
* Copyright (c) 2007: * * Copyright (c) 2007: *
* CERN, Switzerland * * CERN, Switzerland *
* MPI-K Heidelberg, Germany * * MPI-K Heidelberg, Germany *
* U. of Texas at Austin, USA * * U. of Texas at Austin, USA *
* * * *
* Redistribution and use in source and binary forms, with or without * * Redistribution and use in source and binary forms, with or without *
* modification, are permitted according to the terms listed in LICENSE * * modification, are permitted according to the terms listed in LICENSE *
* (http://tmva.sourceforge.net/LICENSE) * * (http://tmva.sourceforge.net/LICENSE) *
************************************************************************** ********/ ************************************************************************** ********/
#ifndef ROOT_TMVA_KNN_Node #ifndef ROOT_TMVA_NodekNN
#define ROOT_TMVA_KNN_Node #define ROOT_TMVA_NodekNN
// C++ // C++
#include <list> #include <list>
#include <iosfwd>
#include <string> #include <string>
#include <iostream> #include <iostream>
// ROOT // ROOT
#ifndef ROOT_Rtypes
#include "Rtypes.h" #include "Rtypes.h"
#endif
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// // // //
// kNN::Node // // kNN::Node //
// // // //
// This file contains binary tree and global function template // // This file contains binary tree and global function template //
// that searches tree for k-nearest neigbors // // that searches tree for k-nearest neigbors //
// // // //
// Node class template parameter T has to provide these functions: // // Node class template parameter T has to provide these functions: //
// rtype GetVar(UInt_t) const; // // rtype GetVar(UInt_t) const; //
skipping to change at line 129 skipping to change at line 130
Float_t fVarMax; Float_t fVarMax;
const UInt_t fMod; const UInt_t fMod;
}; };
// recursive search for k-nearest neighbor: k = nfind // recursive search for k-nearest neighbor: k = nfind
template<class T> template<class T>
UInt_t Find(std::list<std::pair<const Node<T> *, Float_t> > &nlist, UInt_t Find(std::list<std::pair<const Node<T> *, Float_t> > &nlist,
const Node<T> *node, const T &event, UInt_t nfind); const Node<T> *node, const T &event, UInt_t nfind);
// recursive search for k-nearest neighbor
// find k events with sum of event weights >= nfind
template<class T>
UInt_t Find(std::list<std::pair<const Node<T> *, Float_t> > &nlist,
const Node<T> *node, const T &event, Double_t nfind, Doubl
e_t ncurr);
// recursively travel upward until root node is reached // recursively travel upward until root node is reached
template <class T> template <class T>
UInt_t Depth(const Node<T> *node); UInt_t Depth(const Node<T> *node);
// prInt_t node content and content of its children // prInt_t node content and content of its children
//template <class T> //template <class T>
//std::ostream& operator<<(std::ostream& os, const Node<T> &node); //std::ostream& operator<<(std::ostream& os, const Node<T> &node);
// //
// Inlined functions for Node template // Inlined functions for Node template
skipping to change at line 339 skipping to change at line 346
// This function should be modified with care. // This function should be modified with care.
// //
if (!node || nfind < 1) { if (!node || nfind < 1) {
return 0; return 0;
} }
const Float_t value = event.GetVar(node->GetMod()); const Float_t value = event.GetVar(node->GetMod());
if (node->GetWeight() > 0.0) { if (node->GetWeight() > 0.0) {
Float_t max_dist = 0.0; Float_t max_dist = 0.0;
if (!nlist.empty()) { if (!nlist.empty()) {
max_dist = nlist.back().second; max_dist = nlist.back().second;
if (nlist.size() == nfind) { if (nlist.size() == nfind) {
if (value > node->GetVarMax() && if (value > node->GetVarMax() &&
event.GetDist(node->GetVarMax(), node->GetMod()) > max_dist ) { event.GetDist(node->GetVarMax(), node->GetMod()) > max_dist ) {
return 0; return 0;
} }
if (value < node->GetVarMin() && if (value < node->GetVarMin() &&
event.GetDist(node->GetVarMin(), node->GetMod()) > max_dist ) { event.GetDist(node->GetVarMin(), node->GetMod()) > max_dist ) {
return 0; return 0;
} }
} }
} }
const Float_t distance = event.GetDist(node->GetEvent()); const Float_t distance = event.GetDist(node->GetEvent());
Bool_t insert_this = kFALSE; Bool_t insert_this = kFALSE;
Bool_t remove_back = kFALSE; Bool_t remove_back = kFALSE;
if (nlist.size() < nfind) { if (nlist.size() < nfind) {
insert_this = true; insert_this = kTRUE;
} }
else if (nlist.size() == nfind) { else if (nlist.size() == nfind) {
if (distance < max_dist) { if (distance < max_dist) {
insert_this = true; insert_this = kTRUE;
remove_back = true; remove_back = kTRUE;
} }
} }
else { else {
std::cerr << "TMVA::kNN::Find() - logic error in recursive procedu re" << std::endl; std::cerr << "TMVA::kNN::Find() - logic error in recursive procedu re" << std::endl;
return 1; return 1;
} }
if (insert_this) { if (insert_this) {
// need typename keyword because qualified dependent names // need typename keyword because qualified dependent names
// are not valid types unless preceded by 'typename'. // are not valid types unless preceded by 'typename'.
typename std::list<std::pair<const Node<T> *, Float_t> >::iterator lit = nlist.begin(); typename std::list<std::pair<const Node<T> *, Float_t> >::iterator lit = nlist.begin();
// find a place where current node should be inserted // find a place where current node should be inserted
for (; lit != nlist.end(); ++lit) { for (; lit != nlist.end(); ++lit) {
if (distance < lit->second) { if (distance < lit->second) {
break; break;
} }
else else {
{ continue;
continue; }
}
} }
nlist.insert(lit, std::pair<const Node<T> *, Float_t>(node, distan ce)); nlist.insert(lit, std::pair<const Node<T> *, Float_t>(node, distan ce));
if (remove_back) { if (remove_back) {
nlist.pop_back(); nlist.pop_back();
} }
} }
} }
skipping to change at line 421 skipping to change at line 430
count += Find(nlist, node->GetNodeL(), event, nfind); count += Find(nlist, node->GetNodeL(), event, nfind);
} }
if (node->GetNodeR()) { if (node->GetNodeR()) {
count += Find(nlist, node->GetNodeR(), event, nfind); count += Find(nlist, node->GetNodeR(), event, nfind);
} }
} }
return count; return count;
} }
//-------------------------------------------------------------------------
------------------
template<class T>
UInt_t TMVA::kNN::Find(std::list<std::pair<const TMVA::kNN::Node<T> *, Floa
t_t> > &nlist,
const TMVA::kNN::Node<T> *node, const T &event, cons
t Double_t nfind, Double_t ncurr)
{
// This is a global templated function that searches for k-nearest neigh
bors.
// list contains all nodes that are closest to event
// and have sum of event weights >= nfind.
// Only nodes with positive weights are added to list.
// Requirement for used classes:
// - each node contains maximum and minimum values of splitting variabl
e
// for all its children
// - min and max range is checked to avoid descending into
// nodes that are defintely outside current minimum neighbourhood.
//
// This function should be modified with care.
//
if (!node || !(nfind < 0.0)) {
return 0;
}
const Float_t value = event.GetVar(node->GetMod());
if (node->GetWeight() > 0.0) {
Float_t max_dist = 0.0;
if (!nlist.empty()) {
max_dist = nlist.back().second;
if (!(ncurr < nfind)) {
if (value > node->GetVarMax() &&
event.GetDist(node->GetVarMax(), node->GetMod()) > max_dist
) {
return 0;
}
if (value < node->GetVarMin() &&
event.GetDist(node->GetVarMin(), node->GetMod()) > max_dist
) {
return 0;
}
}
}
const Float_t distance = event.GetDist(node->GetEvent());
Bool_t insert_this = kFALSE;
if (ncurr < nfind) {
insert_this = kTRUE;
}
else if (!nlist.empty()) {
if (distance < max_dist) {
insert_this = kTRUE;
}
}
else {
std::cerr << "TMVA::kNN::Find() - logic error in recursive procedu
re" << std::endl;
return 1;
}
if (insert_this) {
// (re)compute total current weight when inserting a new node
ncurr = 0;
// need typename keyword because qualified dependent names
// are not valid types unless preceded by 'typename'.
typename std::list<std::pair<const Node<T> *, Float_t> >::iterator
lit = nlist.begin();
// find a place where current node should be inserted
for (; lit != nlist.end(); ++lit) {
if (distance < lit->second) {
break;
}
ncurr += lit -> first -> GetWeight();
}
lit = nlist.insert(lit, std::pair<const Node<T> *, Float_t>(node,
distance));
for (; lit != nlist.end(); ++lit) {
ncurr += lit -> first -> GetWeight();
if (!(ncurr < nfind)) {
++lit;
break;
}
}
if(lit != nlist.end())
{
nlist.erase(lit, nlist.end());
}
}
}
UInt_t count = 1;
if (node->GetNodeL() && node->GetNodeR()) {
if (value < node->GetVarDis()) {
count += Find(nlist, node->GetNodeL(), event, nfind, ncurr);
count += Find(nlist, node->GetNodeR(), event, nfind, ncurr);
}
else {
count += Find(nlist, node->GetNodeR(), event, nfind, ncurr);
count += Find(nlist, node->GetNodeL(), event, nfind, ncurr);
}
}
else {
if (node->GetNodeL()) {
count += Find(nlist, node->GetNodeL(), event, nfind, ncurr);
}
if (node->GetNodeR()) {
count += Find(nlist, node->GetNodeR(), event, nfind, ncurr);
}
}
return count;
}
#endif #endif
 End of changes. 13 change blocks. 
11 lines changed or deleted 149 lines changed or added


 NumEventsTestStat.h   NumEventsTestStat.h 
skipping to change at line 54 skipping to change at line 54
} }
virtual ~NumEventsTestStat() { virtual ~NumEventsTestStat() {
// delete fRand; // delete fRand;
// delete fTestStatistic; // delete fTestStatistic;
} }
// Main interface to evaluate the test statistic on a dataset // Main interface to evaluate the test statistic on a dataset
virtual Double_t Evaluate(RooAbsData& data, RooArgSet& /*paramsOfInter est*/) { virtual Double_t Evaluate(RooAbsData& data, RooArgSet& /*paramsOfInter est*/) {
if(!&data){ cout << "problem with data" << endl;} if(!&data){ cout << "problem with data" << endl;}
RooMsgService::instance().setGlobalKillBelow(RooMsgService::FATAL) ; RooMsgService::instance().setGlobalKillBelow(RooFit::FATAL) ;
return data.numEntries(); return data.numEntries();
} }
// Get the TestStatistic // Get the TestStatistic
virtual const RooAbsArg* GetTestStatistic() const {return fPdf;} virtual const RooAbsArg* GetTestStatistic() const {return fPdf;}
virtual const TString GetVarName() const {return "Number of events";}
private: private:
RooAbsPdf* fPdf; RooAbsPdf* fPdf;
protected: protected:
ClassDef(NumEventsTestStat,1) ClassDef(NumEventsTestStat,1)
}; };
} }
#endif #endif
 End of changes. 2 change blocks. 
1 lines changed or deleted 3 lines changed or added


 NumberCountingUtils.h   NumberCountingUtils.h 
// @(#)root/roostats:$Id: NumberCountingUtils.h 26324 2008-11-20 17:17:32Z moneta $ // @(#)root/roostats:$Id: NumberCountingUtils.h 29179 2009-06-23 18:39:27Z brun $
// Author: Kyle Cranmer 28/07/2008 // Author: Kyle Cranmer 28/07/2008
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2008, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2008, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
#ifndef RooStats_NumberCountingUtils #ifndef RooStats_NumberCountingUtils
#define RooStats_NumberCountingUtils #define RooStats_NumberCountingUtils
///////////////////////////////////////// //_________________________________________________
// NumberCountingUtils /*
BEGIN_HTML
<h2>NumberCountingUtils</h2>
<p>
These are RooStats standalone utilities
that calculate the p-value or Z value (eg. significance in
1-sided Gaussian standard deviations) for a number counting experiment.
This is a hypothesis test between background only and signal-plus-backgroun
d.
The background estimate has uncertainty derived from an auxiliary or sideba
nd
measurement.
</p>
<p>
This is based on code and comments from Bob Cousins
and on the following papers:
<p>
<ul>
<li>Evaluation of three methods for calculating statistical significance wh
en incorporating a
systematic uncertainty into a test of the background-only hypothesis for a
Poisson process<br />
Authors: Robert D. Cousins, James T. Linnemann, Jordan Tucker<br />
http://arxiv.org/abs/physics/0702156<br />
NIM A 595 (2008) 480--501</li>
<li>
Statistical Challenges for Searches for New Physics at the LHC<br />
Authors: Kyle Cranmer<br />
http://arxiv.org/abs/physics/0511028
</li>
<li>
Measures of Significance in HEP and Astrophysics<br />
Authors: J. T. Linnemann<br />
http://arxiv.org/abs/physics/0312059
</li>
</ul>
<p>
The problem is treated in a fully frequentist fashion by
interpreting the relative background uncertainty as
being due to an auxiliary or sideband observation
that is also Poisson distributed with only background.
Finally, one considers the test as a ratio of Poisson means
where an interval is well known based on the conditioning on the total
number of events and the binomial distribution.
</p>
<p>
In short, this is an exact frequentist solution to the problem of
a main measurement x distributed as a Poisson around s+b and a sideband or
auxiliary measurement y distributed as a Poisson around tau*b. Eg.
</p>
END_HTML
BEGIN_LATEX
L(x,y|s,b,#tau) = Pois(x|s+b) Pois(y|#tau b)
END_LATEX
BEGIN_HTML
<pre>
Naming conventions:
Exp = Expected
Obs = Observed
P = p-value
Z = Z-value or significance in sigma (one-sided convention)
</pre>
END_HTML
*/
// //
// Encapsulates common number counting utilities
/////////////////////////////////////////
#include "Rtypes.h" #include "Rtypes.h"
namespace RooStats{ namespace RooStats{
namespace NumberCountingUtils { namespace NumberCountingUtils {
/////////////////////////////////// // Expected P-value for s=0 in a ratio of Poisson means.
// Standalone Functions. // Here the background and its uncertainty are provided directly and
// Naming conventions: // assumed to be from the double Poisson counting setup described in the
// Exp = Expected // BinomialWithTau functions.
// Obs = Observed // Normally one would know tau directly, but here it is determiend from
// P = p-value // the background uncertainty. This is not strictly correct, but a usefu
// Z = Z-value or significance in Sigma (one-sided convention) l
////////////////////////////////// // approximation.
Double_t BinomialExpZ(Double_t sExp, Double_t bExp, Double_t fractiona
Double_t BinomialExpZ(Double_t, Double_t, Double_t); lBUncertainty);
Double_t BinomialWithTauExpZ(Double_t, Double_t, Double_t);
Double_t BinomialObsZ(Double_t, Double_t, Double_t); // See BinomialWithTauExpP
Double_t BinomialWithTauObsZ(Double_t, Double_t, Double_t); Double_t BinomialWithTauExpZ(Double_t sExp, Double_t bExp, Double_t ta
u);
Double_t BinomialExpP(Double_t, Double_t, Double_t);
Double_t BinomialWithTauExpP(Double_t, Double_t, Double_t); // See BinomialObsP
Double_t BinomialObsP(Double_t, Double_t, Double_t); Double_t BinomialObsZ(Double_t nObs, Double_t bExp, Double_t fractiona
Double_t BinomialWithTauObsP(Double_t, Double_t, Double_t); lBUncertainty);
// See BinomialWithTauObsP
Double_t BinomialWithTauObsZ(Double_t nObs, Double_t bExp, Double_t ta
u);
// See BinomialExpP
Double_t BinomialExpP(Double_t sExp, Double_t bExp, Double_t fractiona
lBUncertainty);
// Expected P-value for s=0 in a ratio of Poisson means.
// Based on two expectations, a main measurement that might have signal
// and an auxiliarly measurement for the background that is signal free.
// The expected background in the auxiliary measurement is a factor
// tau larger than in the main measurement.
Double_t BinomialWithTauExpP(Double_t sExp, Double_t bExp, Double_t ta
u);
// P-value for s=0 in a ratio of Poisson means.
// Here the background and its uncertainty are provided directly and
// assumed to be from the double Poisson counting setup.
// Normally one would know tau directly, but here it is determiend from
// the background uncertainty. This is not strictly correct, but a usefu
l
// approximation.
Double_t BinomialObsP(Double_t nObs, Double_t, Double_t fractionalBUnc
ertainty);
// P-value for s=0 in a ratio of Poisson means.
// Based on two observations, a main measurement that might have signal
// and an auxiliarly measurement for the background that is signal free.
// The expected background in the auxiliary measurement is a factor
// tau larger than in the main measurement.
Double_t BinomialWithTauObsP(Double_t nObs, Double_t bExp, Double_t ta
u);
} }
} }
#endif #endif
 End of changes. 4 change blocks. 
23 lines changed or deleted 121 lines changed or added


 OneDimFunctionAdapter.h   OneDimFunctionAdapter.h 
skipping to change at line 95 skipping to change at line 95
fCoord(icoord), fCoord(icoord),
fDim(dim), fDim(dim),
fOwn(true) fOwn(true)
{ {
fX = new double[dim]; fX = new double[dim];
} }
/** /**
Destructor (no operations) Destructor (no operations)
*/ */
virtual ~OneDimMultiFunctionAdapter () { if (fOwn) delete [] fX; } virtual ~OneDimMultiFunctionAdapter () { if (fOwn && fX) delete [] fX; }
/** /**
clone clone
*/ */
virtual OneDimMultiFunctionAdapter * Clone( ) const { virtual OneDimMultiFunctionAdapter * Clone( ) const {
if (fOwn) if (fOwn)
return new OneDimMultiFunctionAdapter( fFunc, fDim, fCoord, fParam s); return new OneDimMultiFunctionAdapter( fFunc, fDim, fCoord, fParam s);
else else
return new OneDimMultiFunctionAdapter( fFunc, fX, fCoord, fParams) ; return new OneDimMultiFunctionAdapter( fFunc, fX, fCoord, fParams) ;
} }
public: public:
/** /**
Set X values in case vector is own, iterator size must muched previo us Set X values in case vector is own, iterator size must match previou s
set dimension set dimension
*/ */
template<class Iterator> template<class Iterator>
void SetX(Iterator begin, Iterator end) { void SetX(Iterator begin, Iterator end) {
if (fOwn) std::copy(begin, end, fX); if (fOwn) std::copy(begin, end, fX);
} }
/** /**
set pointer without copying the values set pointer without copying the values
*/ */
void SetX(double * x) { void SetX(double * x) {
if (!fOwn) fX = x; if (!fOwn) fX = x;
} }
/**
set values
*/
void SetX(const double * x) {
if (fOwn) std::copy(x, x+fDim, fX);
else
SetX( const_cast<double *>(x) ); // wee need to modify x but then
we restore it as before
}
void SetCoord(int icoord) { fCoord=icoord;} void SetCoord(int icoord) { fCoord=icoord;}
// copy constructor
OneDimMultiFunctionAdapter( const OneDimMultiFunctionAdapter & rhs) :
fFunc(rhs.fFunc),
fParams(rhs.fParams),
fCoord(rhs.fCoord),
fDim(rhs.fDim),
fOwn(rhs.fOwn)
{
if (fOwn) {
fX = new double[fDim];
std::copy( rhs.fX, rhs.fX+fDim, fX);
}
else fX = rhs.fX;
}
private: private:
// dummy assignment (should never be called and clone must be used)
OneDimMultiFunctionAdapter & operator= ( const OneDimMultiFunctionAdapte
r & rhs) {
if (this == &rhs) return *this;
assert(false);
}
/** /**
evaluate function at the values x[] given in the constructor and evaluate function at the values x[] given in the constructor and
as function of the coordinate fCoord. as function of the coordinate fCoord.
*/ */
double DoEval(double x) const { double DoEval(double x) const {
if (fOwn) { if (fOwn) {
fX[fCoord] = x; fX[fCoord] = x;
return EvaluatorOneDim<MultiFuncType>::F( fFunc, fX, fParams ); return EvaluatorOneDim<MultiFuncType>::F( fFunc, fX, fParams );
} }
else { else {
skipping to change at line 202 skipping to change at line 234
*/ */
~OneDimParamFunctionAdapter () {} ~OneDimParamFunctionAdapter () {}
/** /**
clone clone
*/ */
virtual OneDimParamFunctionAdapter * Clone( ) const { virtual OneDimParamFunctionAdapter * Clone( ) const {
return new OneDimParamFunctionAdapter(fFunc, fX, fParams, fIpar); return new OneDimParamFunctionAdapter(fFunc, fX, fParams, fIpar);
} }
// can use default copy constructor
private: private:
/** /**
evaluate function at the values x[] given in the constructor and evaluate function at the values x[] given in the constructor and
as function of the coordinate fCoord. as function of the coordinate fCoord.
*/ */
double DoEval(double x) const { double DoEval(double x) const {
// HACK: use const_cast to modify the function values x[] and restore afterwards the original ones // HACK: use const_cast to modify the function values x[] and restore afterwards the original ones
double * p = const_cast<double *>(fParams); double * p = const_cast<double *>(fParams);
double pprev = fParams[fIpar]; // keep original value to restore in f X double pprev = fParams[fIpar]; // keep original value to restore in f X
 End of changes. 7 change blocks. 
2 lines changed or deleted 38 lines changed or added


 Option.h   Option.h 
// @(#)root/tmva $Id: Option.h 26050 2008-11-01 09:18:41Z brun $ // @(#)root/tmva $Id: Option.h 29122 2009-06-22 06:51:30Z brun $
// Author: Andreas Hoecker, Joerg Stelzer, Helge Voss // Author: Andreas Hoecker, Joerg Stelzer, Helge Voss
/************************************************************************** ******** /************************************************************************** ********
* Project: TMVA - a Root-integrated toolkit for multivariate data analysis * * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
* Package: TMVA * * Package: TMVA *
* Class : Option * * Class : Option *
* Web : http://tmva.sourceforge.net * * Web : http://tmva.sourceforge.net *
* * * *
* Description: * * Description: *
* Option container * * Option container *
skipping to change at line 40 skipping to change at line 40
#define ROOT_TMVA_Option #define ROOT_TMVA_Option
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// // // //
// Option // // Option //
// // // //
// Class for MVA-option handling // // Class for MVA-option handling //
// // // //
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
#include <iomanip>
#include <sstream> #include <sstream>
#include <vector> #include <vector>
#ifndef ROOT_TObject #ifndef ROOT_TObject
#include "TObject.h" #include "TObject.h"
#endif #endif
#ifndef ROOT_TString #ifndef ROOT_TString
#include "TString.h" #include "TString.h"
#endif #endif
#ifndef ROOT_TList #ifndef ROOT_TList
skipping to change at line 66 skipping to change at line 67
namespace TMVA { namespace TMVA {
class Configurable; class Configurable;
class OptionBase : public TObject { class OptionBase : public TObject {
public: public:
friend class Configurable; friend class Configurable;
OptionBase( const TString& name, const TString& desc ) OptionBase( const TString& name, const TString& desc );
: TObject(), fName(name), fNameAllLower(name), fDescription(desc),
fIsSet(kFALSE), fLogger("OptionBase") {
fNameAllLower.ToLower();
}
virtual ~OptionBase() {} virtual ~OptionBase() {}
virtual const char* GetName() const { return fNameAllLower.Data(); } virtual const char* GetName() const { return fNameAllLower.Data(); }
virtual const char* TheName() const { return fName.Data(); } virtual const char* TheName() const { return fName.Data(); }
virtual TString GetValue(Int_t i=-1) const = 0; virtual TString GetValue(Int_t i=-1) const = 0;
Bool_t IsSet() const { return fIsSet; } Bool_t IsSet() const { return fIsSet; }
virtual Bool_t IsArrayOpt() const = 0; virtual Bool_t IsArrayOpt() const = 0;
const TString& Description() const { return fDescription; } const TString& Description() const { return fDescription; }
virtual Bool_t IsPreDefinedVal(const TString&) const = 0; virtual Bool_t IsPreDefinedVal(const TString&) const = 0;
skipping to change at line 150 skipping to change at line 148
class Option<T*> : public Option<T> { class Option<T*> : public Option<T> {
public: public:
Option( T*& ref, Int_t size, const TString& name, const TString& desc ) : Option( T*& ref, Int_t size, const TString& name, const TString& desc ) :
Option<T>(*ref,name, desc), fVRefPtr(&ref), fSize(size) {} Option<T>(*ref,name, desc), fVRefPtr(&ref), fSize(size) {}
virtual ~Option() {} virtual ~Option() {}
TString GetValue( Int_t i ) const { TString GetValue( Int_t i ) const {
std::stringstream str; std::stringstream str;
str << Value(i); str << std::scientific << Value(i);
return str.str(); return str.str();
} }
const T& Value( Int_t i ) const { return (*fVRefPtr)[i]; } const T& Value( Int_t i ) const { return (*fVRefPtr)[i]; }
virtual Bool_t IsArrayOpt() const { return kTRUE; } virtual Bool_t IsArrayOpt() const { return kTRUE; }
virtual Int_t GetArraySize() const { return fSize; } virtual Int_t GetArraySize() const { return fSize; }
using Option<T>::Print; using Option<T>::Print;
virtual void Print( ostream&, Int_t levelofdetail=0 ) const; virtual void Print( ostream&, Int_t levelofdetail=0 ) const;
virtual Bool_t SetValue( const TString& val, Int_t i=0 ); virtual Bool_t SetValue( const TString& val, Int_t i=0 );
skipping to change at line 186 skipping to change at line 184
} }
template<class T> template<class T>
inline T& TMVA::Option<T>::Value( Int_t ) { inline T& TMVA::Option<T>::Value( Int_t ) {
return *fRefPtr; return *fRefPtr;
} }
template<class T> template<class T>
inline TString TMVA::Option<T>::GetValue( Int_t ) const { inline TString TMVA::Option<T>::GetValue( Int_t ) const {
std::stringstream str; std::stringstream str;
str << this->Value(); str << std::scientific << this->Value();
return str.str(); return str.str();
} }
template<> template<>
inline TString TMVA::Option<Bool_t>::GetValue( Int_t ) const { inline TString TMVA::Option<Bool_t>::GetValue( Int_t ) const {
return Value() ? "True" : "False"; return Value() ? "True" : "False";
} }
template<> template<>
inline TString TMVA::Option<Bool_t*>::GetValue( Int_t i ) const { inline TString TMVA::Option<Bool_t*>::GetValue( Int_t i ) const {
 End of changes. 5 change blocks. 
8 lines changed or deleted 5 lines changed or added


 PDF.h   PDF.h 
// @(#)root/tmva $Id: PDF.h 23334 2008-04-19 18:38:57Z brun $ // @(#)root/tmva $Id: PDF.h 29195 2009-06-24 10:39:49Z brun $
// Author: Asen Christov, Andreas Hoecker, Joerg Stelzer, Helge Voss, Kai V oss // Author: Asen Christov, Andreas Hoecker, Joerg Stelzer, Helge Voss, Kai V oss
/************************************************************************** ******** /************************************************************************** ********
* Project: TMVA - a Root-integrated toolkit for multivariate data analysis * * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
* Package: TMVA * * Package: TMVA *
* Class : PDF * * Class : PDF *
* Web : http://tmva.sourceforge.net * * Web : http://tmva.sourceforge.net *
* * * *
* Description: * * Description: *
* PDF wrapper for histograms; uses user-defined spline interpolation * * PDF wrapper for histograms; uses user-defined spline interpolation *
* and kernel density estimation * * and kernel density estimation *
* * * *
* Authors (alphabetical): * * Authors (alphabetical): *
* Asen Christov <christov@physik.uni-freiburg.de> - Freiburg U., Ge rmany * * Asen Christov <christov@physik.uni-freiburg.de> - Freiburg U., Ge rmany *
* Andreas Hoecker <Andreas.Hocker@cern.ch> - CERN, Switzerland * * Andreas Hoecker <Andreas.Hocker@cern.ch> - CERN, Switzerland *
* Xavier Prudent <prudent@lapp.in2p3.fr> - LAPP, France *
* Helge Voss <Helge.Voss@cern.ch> - MPI-K Heidelberg, German y * * Helge Voss <Helge.Voss@cern.ch> - MPI-K Heidelberg, German y *
* Kai Voss <Kai.Voss@cern.ch> - U. of Victoria, Canada * * Kai Voss <Kai.Voss@cern.ch> - U. of Victoria, Canada *
* * * *
* Copyright (c) 2005: * * Copyright (c) 2005: *
* CERN, Switzerland * * CERN, Switzerland *
* U. of Victoria, Canada * * U. of Victoria, Canada *
* MPI-K Heidelberg, Germany * * MPI-K Heidelberg, Germany *
* LAPP, Annecy, France, *
* Freiburg U., Germany * * Freiburg U., Germany *
* * * *
* Redistribution and use in source and binary forms, with or without * * Redistribution and use in source and binary forms, with or without *
* modification, are permitted according to the terms listed in LICENSE * * modification, are permitted according to the terms listed in LICENSE *
* (http://tmva.sourceforge.net/LICENSE) * * (http://tmva.sourceforge.net/LICENSE) *
************************************************************************** ********/ ************************************************************************** ********/
#ifndef ROOT_TMVA_PDF #ifndef ROOT_TMVA_PDF
#define ROOT_TMVA_PDF #define ROOT_TMVA_PDF
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// // // //
// PDF // // PDF //
// // // //
// PDF wrapper for histograms; uses user-defined spline interpolation // // PDF wrapper for histograms; uses user-defined spline interpolation //
// // // //
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
#include <iosfwd>
#ifndef ROOT_TH1 #ifndef ROOT_TH1
#include "TH1.h" #include "TH1.h"
#endif #endif
#ifndef ROOT_TObject
#include "TObject.h"
#endif
#ifndef ROOT_TMVA_MsgLogger
#include "TMVA/MsgLogger.h"
#endif
#ifndef ROOT_TMVA_KDEKernel #ifndef ROOT_TMVA_KDEKernel
#include "TMVA/KDEKernel.h" #include "TMVA/KDEKernel.h"
#endif #endif
#ifndef ROOT_TMVA_Configurable
#include "TMVA/Configurable.h"
#endif
class TSpline; class TSpline;
class TGraph; class TGraph;
class TF1; class TF1;
namespace TMVA { namespace TMVA {
class MsgLogger;
class PDF; class PDF;
ostream& operator<< ( ostream& os, const PDF& tree ); ostream& operator<< ( ostream& os, const PDF& tree );
istream& operator>> ( istream& istr, PDF& tree); istream& operator>> ( istream& istr, PDF& tree);
class PDF : public TObject { class PDF : public Configurable {
friend ostream& operator<< ( ostream& os, const PDF& tree ); friend ostream& operator<< ( ostream& os, const PDF& tree );
friend istream& operator>> ( istream& istr, PDF& tree); friend istream& operator>> ( istream& istr, PDF& tree);
public: public:
enum EInterpolateMethod { kSpline0, kSpline1, kSpline2, kSpline3, kSp line5, kKDE }; enum EInterpolateMethod { kSpline0, kSpline1, kSpline2, kSpline3, kSp line5, kKDE };
PDF(); explicit PDF( const TString& name, Bool_t norm=kTRUE );
PDF( const TH1* theHist, EInterpolateMethod method = kSpline2, Int_t explicit PDF( const TString& name, const TH1* theHist, EInterpolateMe
nsmooth = 0, thod method = kSpline2,
Bool_t checkHist = kFALSE ); Int_t minnsmooth = 0, Int_t maxnsmooth = 0, Bool_t chec
PDF( const TH1* theHist, kHist = kFALSE, Bool_t norm=kTRUE );
KDEKernel::EKernelType ktype, KDEKernel::EKernelIter kiter, KDEK explicit PDF( const TString& name, const TH1* theHist,
ernel::EKernelBorder KDEKernel::EKernelType ktype, KDEKernel::EKernelIter ki
kborder, Float_t FineFactor ); ter, KDEKernel::EKernelBorder
kborder, Float_t FineFactor, Bool_t norm=kTRUE );
explicit PDF( const TString& name, const TString& options, const TStr
ing& suffix = "", PDF* defaultPDF = 0, Bool_t norm=kTRUE);
virtual ~PDF(); virtual ~PDF();
//creates the pdf after the definitions have been stored in
void BuildPDF (const TH1* theHist);
// returns probability density at given abscissa // returns probability density at given abscissa
Double_t GetVal( Double_t x ) const; Double_t GetVal( Double_t x ) const;
void AddXMLTo( void* parent );
void ReadXML( void* pdfnode );
// histogram underlying the PDF // histogram underlying the PDF
TH1* GetPDFHist() const { return fPDFHist; } TH1* GetPDFHist() const { return fPDFHist; }
TH1* GetOriginalHist() const { return fHistOriginal; } TH1* GetOriginalHist() const { return fHistOriginal; }
TH1* GetSmoothedHist() const { return fHist; } TH1* GetSmoothedHist() const { return fHist; }
TH1* GetNSmoothHist() const { return fNSmoothHist; }
// integral of PDF within given range // integral of PDF within given range
Double_t GetIntegral( Double_t xmin, Double_t xmax ); Double_t GetIntegral( Double_t xmin, Double_t xmax );
// accessors // accessors
TSpline* GetSpline() const { return fSpline; } TSpline* GetSpline() const { return fSpline; }
Int_t GetNBins () const { return fHist->GetNbinsX(); } Int_t GetNBins () const { return fHist->GetNbinsX(); }
Double_t GetXmin () const { return fHist->GetXaxis()->GetXmin(); } Double_t GetXmin () const { return fHist->GetXaxis()->GetXmin(); }
Double_t GetXmax () const { return fHist->GetXaxis()->GetXmax(); } Double_t GetXmax () const { return fHist->GetXaxis()->GetXmax(); }
// perform series of validation tests // perform series of validation tests
void ValidatePDF( TH1* original = 0 ) const; void ValidatePDF( TH1* original = 0 ) const;
//gives the number of needed bins in the source histogram
Int_t GetHistNBins ( Int_t evtNum = 0 );
TMVA::PDF::EInterpolateMethod GetInterpolMethod() { return fInterpolM
ethod;}
// modified name (remove TMVA::) // modified name (remove TMVA::)
const char* GetName() const { return "PDF"; } const char* GetName() const { return fPDFName; }
// TMVA version control (for weight files) // TMVA version control (for weight files)
void SetReadingVersion( UInt_t rv ) { fReadingVersion = rv; } void SetReadingVersion( UInt_t rv ) { fReadingVersion = rv; }
UInt_t GetReadingVersion() const { return fReadingVersion; } UInt_t GetReadingVersion() const { return fReadingVersion; }
//void WriteOptionsToStream ( ostream& o, const TString& prefix ) con
st;
void ProcessOptions();
// reads from and option string the definitions for pdf returns it
void DeclareOptions();
private: private:
// sanity check of PDF quality (after smoothing): comparison with // sanity check of PDF quality (after smoothing): comparison with
// original histogram // original histogram
void CheckHist() const; void CheckHist() const;
void FillSplineToHist(); void FillSplineToHist();
void FillKDEToHist(); void BuildKDEPDF();
void SmoothHistogram();
void FillHistToGraph();
Double_t GetIntegral() const; Double_t GetIntegral() const;
Double_t GetPdfHistBinWidth() const { Double_t GetPdfHistBinWidth() const {
TH1* h = GetPDFHist(); TH1* h = GetPDFHist();
return (fPDFHist) ? (h->GetXaxis()->GetXmax() - h->GetXaxis()->Get Xmin())/h->GetNbinsX() : 1; return (fPDFHist) ? (h->GetXaxis()->GetXmax() - h->GetXaxis()->Get Xmin())/h->GetNbinsX() : 1;
} }
// do we use the original histogram as reference ? // do we use the original histogram as reference ?
Bool_t UseHistogram() const { return fUseHistogram; } Bool_t UseHistogram() const { return fUseHistogram; }
void BuildPDF( Bool_t checkHist = kFALSE ); void BuildSplinePDF();
// flag that indicates that no splines are produced and no smoothing // flag that indicates that no splines are produced and no smoothing
// is applied, i.e., the original histogram is used as reference // is applied, i.e., the original histogram is used as reference
// this is useful for discrete variables // this is useful for discrete variables
Bool_t fUseHistogram; // spline0 uses histogram as reference Bool_t fUseHistogram; // spline0 uses histogram as reference
// static configuration variables ---------------------------- // static configuration variables ----------------------------
// to increase computation speed, the final PDF is filled in // to increase computation speed, the final PDF is filled in
// a high-binned histogram; "GetValue" then returns the histogram // a high-binned histogram; "GetValue" then returns the histogram
// entry, linearized between adjacent bins // entry, linearized between adjacent bins
static const Int_t fgNbin_PdfHist; // number of bins in static const Int_t fgNbin_PdfHist; // number of bins in
high-binned reference histogram high-binned reference histogram
static const Bool_t fgManualIntegration; // manual integration static const Bool_t fgManualIntegration; // manual integration
(sum over bins) or DGAUSS (sum over bins) or DGAUSS
static const Double_t fgEpsilon; // minimum PDF return static const Double_t fgEpsilon; // minimum PDF return
// ----------------------------------------------------------- // -----------------------------------------------------------
Int_t fNsmooth; // number of times th TString fPDFName; // for output
e histogram is smoothed Int_t fNsmooth; // Min number of smoo
thing iterations
Int_t fMinNsmooth; // Min number of smoo
thing iterations
Int_t fMaxNsmooth; // Max number of smoo
thing iterations
TH1* fNSmoothHist; // number of smooth f
or each bin
TMVA::PDF::EInterpolateMethod fInterpolMethod; // interpolation meth od TMVA::PDF::EInterpolateMethod fInterpolMethod; // interpolation meth od
TSpline* fSpline; //! the used spline t TSpline* fSpline; //! the used spline t
ype ype
TH1* fPDFHist; // the high-binned h TH1* fPDFHist; // the high-binned h
istogram corresponding to the PDF istogram corresponding to the PDF
TH1* fHist; // copy of input his TH1* fHist; // copy of input his
togram togram
TH1* fHistOriginal; // the input histogr TH1* fHistOriginal; // the input histogr
am am
TGraph* fGraph; //! needed to create TGraph* fGraph; //! needed to create
PDF from histogram PDF from histogram
TF1* fIGetVal; // integration interf TF1* fIGetVal; // integration interf
ace ace
Int_t fHistAvgEvtPerBin; // avg event per sour
ce hist bin
Int_t fHistDefinedNBins; // source hist bin nu
m set by user
TString fKDEtypeString; // strings used to re
ad definitions
TString fKDEiterString;
TString fBorderMethodString;
TString fInterpolateString;
KDEKernel::EKernelType fKDEtype; // Kernel type to use for KDE KDEKernel::EKernelType fKDEtype; // Kernel type to use for KDE
KDEKernel::EKernelIter fKDEiter; // Number of iteratio ns (adaptive or not) KDEKernel::EKernelIter fKDEiter; // Number of iteratio ns (adaptive or not)
KDEKernel::EKernelBorder fKDEborder; // The method to take care about "border" effects (string) KDEKernel::EKernelBorder fKDEborder; // The method to take care about "border" effects (string)
Float_t fFineFactor; // fine tuning factor for Adaptive KDE Float_t fFineFactor; // fine tuning factor for Adaptive KDE
UInt_t fReadingVersion; // the TMVA version o f the weight file UInt_t fReadingVersion; // the TMVA version o f the weight file
mutable MsgLogger fLogger; //! message logger Bool_t fCheckHist; // check of source hi
stogram
Bool_t fNormalize; // normalize histogra
m (false for cumulative distribution used in GaussTranform)
TString fSuffix; //! the suffix for op
tions
mutable MsgLogger* fLogger; //! message logger
MsgLogger& Log() const { return *fLogger; }
// static pointer to this object // static pointer to this object
static PDF* fgThisPDF; // this PDF pointer static PDF* fgThisPDF; // this PDF pointer
static PDF* ThisPDF( void ) { return fgThisPDF; } static PDF* ThisPDF( void ) { return fgThisPDF; }
// external auxiliary functions // external auxiliary functions
static Double_t IGetVal( Double_t*, Double_t* ); static Double_t IGetVal( Double_t*, Double_t* );
ClassDef(PDF,1) // PDF wrapper for histograms ClassDef(PDF,1) // PDF wrapper for histograms
}; };
} // namespace TMVA } // namespace TMVA
#endif #endif
 End of changes. 24 change blocks. 
46 lines changed or deleted 96 lines changed or added


 PointSetInterval.h   PointSetInterval.h 
skipping to change at line 18 skipping to change at line 18
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
#ifndef RooStats_PointSetInterval #ifndef RooStats_PointSetInterval
#define RooStats_PointSetInterval #define RooStats_PointSetInterval
#ifndef ROO_ARG_SET #ifndef ROO_ARG_SET
#include "RooArgSet.h" #include "RooArgSet.h"
#endif #endif
#ifndef ROO_TREE_DATA #ifndef ROO_TREE_DATA
#include "RooTreeData.h" #include "RooAbsData.h"
#endif #endif
#ifndef RooStats_ConfInterval #ifndef RooStats_ConfInterval
#include "RooStats/ConfInterval.h" #include "RooStats/ConfInterval.h"
#endif #endif
namespace RooStats { namespace RooStats {
class PointSetInterval : public ConfInterval { class PointSetInterval : public ConfInterval {
private: private:
// RooArgSet* fParameters; // parameter of interest // RooArgSet* fParameters; // parameter of interest
Double_t fConfidenceLevel; // confidence level Double_t fConfidenceLevel; // confidence level
RooTreeData* fParameterPointsInInterval; // either a histogram (RooData Hist) or a tree (RooDataSet) RooAbsData* fParameterPointsInInterval; // either a histogram (RooDataH ist) or a tree (RooDataSet)
public: public:
// constructors,destructors // constructors,destructors
PointSetInterval(); PointSetInterval();
PointSetInterval(const char* name); PointSetInterval(const char* name);
PointSetInterval(const char* name, const char* title); PointSetInterval(const char* name, const char* title);
PointSetInterval(const char* name, RooTreeData&); PointSetInterval(const char* name, RooAbsData&);
PointSetInterval(const char* name, const char* title, RooTreeData&); PointSetInterval(const char* name, const char* title, RooAbsData&);
virtual ~PointSetInterval(); virtual ~PointSetInterval();
virtual Bool_t IsInInterval(RooArgSet&); virtual Bool_t IsInInterval(RooArgSet&);
virtual void SetConfidenceLevel(Double_t cl) {fConfidenceLevel = cl;} virtual void SetConfidenceLevel(Double_t cl) {fConfidenceLevel = cl;}
virtual Double_t ConfidenceLevel() const {return fConfidenceLevel;} virtual Double_t ConfidenceLevel() const {return fConfidenceLevel;}
// Method to return lower limit on a given parameter // Method to return lower limit on a given parameter
// Double_t LowerLimit(RooRealVar& param) ; // could provide, but misl eading? // Double_t LowerLimit(RooRealVar& param) ; // could provide, but misl eading?
// Double_t UpperLimit(RooRealVar& param) ; // could provide, but misleading? // Double_t UpperLimit(RooRealVar& param) ; // could provide, but misleading?
// do we want it to return list of parameters // do we want it to return list of parameters
virtual RooArgSet* GetParameters() const; virtual RooArgSet* GetParameters() const;
// Accessor for making plots // Accessor for making plots
RooTreeData* GetParameterPoints() const {return (RooTreeData*)fParamete rPointsInInterval->Clone();} RooAbsData* GetParameterPoints() const {return (RooAbsData*)fParameterP ointsInInterval->Clone();}
// check if parameters are correct. (dummy implementation to start) // check if parameters are correct. (dummy implementation to start)
Bool_t CheckParameters(RooArgSet&) const ; Bool_t CheckParameters(RooArgSet&) const ;
// Method to return lower limit on a given parameter
Double_t LowerLimit(RooRealVar& param) ;
Double_t UpperLimit(RooRealVar& param) ;
protected: protected:
ClassDef(PointSetInterval,1) // Concrete implementation of ConfInterva l for simple 1-D intervals in the form [a,b] ClassDef(PointSetInterval,1) // Concrete implementation of ConfInterva l for simple 1-D intervals in the form [a,b]
}; };
} }
#endif #endif
 End of changes. 5 change blocks. 
5 lines changed or deleted 9 lines changed or added


 PoissonLikelihoodFCN.h   PoissonLikelihoodFCN.h 
// @(#)root/mathcore:$Id: PoissonLikelihoodFCN.h 26541 2008-12-01 10:00:52Z moneta $ // @(#)root/mathcore:$Id: PoissonLikelihoodFCN.h 28946 2009-06-11 15:39:14Z moneta $
// Author: L. Moneta Fri Aug 17 14:29:24 2007 // Author: L. Moneta Fri Aug 17 14:29:24 2007
/********************************************************************** /**********************************************************************
* * * *
* Copyright (c) 2007 LCG ROOT Math Team, CERN/PH-SFT * * Copyright (c) 2007 LCG ROOT Math Team, CERN/PH-SFT *
* * * *
* * * *
**********************************************************************/ **********************************************************************/
// Header file for class PoissonLikelihoodFCN // Header file for class PoissonLikelihoodFCN
skipping to change at line 93 skipping to change at line 93
PoissonLikelihoodFCN(const PoissonLikelihoodFCN &) {} PoissonLikelihoodFCN(const PoissonLikelihoodFCN &) {}
/** /**
Assignment operator Assignment operator
*/ */
PoissonLikelihoodFCN & operator = (const PoissonLikelihoodFCN & rhs) { r eturn *this; } PoissonLikelihoodFCN & operator = (const PoissonLikelihoodFCN & rhs) { r eturn *this; }
public: public:
/// clone the function (need to return Base for Windows) /// clone the function (need to return Base for Windows)
BaseFunction * Clone() const { return new PoissonLikelihoodFCN(fData,fF unc); } virtual BaseFunction * Clone() const { return new PoissonLikelihoodFCN( fData,fFunc); }
// effective points used in the fit // effective points used in the fit
unsigned int NFitPoints() const { return fNEffPoints; } virtual unsigned int NFitPoints() const { return fNEffPoints; }
/// i-th likelihood element and its gradient /// i-th likelihood element and its gradient
double DataElement(const double * x, unsigned int i, double * g) const { virtual double DataElement(const double * x, unsigned int i, double * g) const {
return FitUtil::EvaluatePoissonBinPdf(fFunc, fData, x, i, g); return FitUtil::EvaluatePoissonBinPdf(fFunc, fData, x, i, g);
} }
/// evaluate gradient /// evaluate gradient
virtual void Gradient(const double *x, double *g) const { virtual void Gradient(const double *x, double *g) const {
// evaluate the chi2 gradient // evaluate the chi2 gradient
FitUtil::EvaluatePoissonLogLGradient(fFunc, fData, x, g ); FitUtil::EvaluatePoissonLogLGradient(fFunc, fData, x, g );
} }
/// get type of fit method function /// get type of fit method function
skipping to change at line 125 skipping to change at line 125
/// access to const reference to the model function /// access to const reference to the model function
virtual const IModelFunction & ModelFunction() const { return fFunc; } virtual const IModelFunction & ModelFunction() const { return fFunc; }
protected: protected:
private: private:
/** /**
Evaluation of the function (required by interface) Evaluation of the function (required by interface)
*/ */
double DoEval (const double * x) const { virtual double DoEval (const double * x) const {
this->UpdateNCalls(); this->UpdateNCalls();
return FitUtil::EvaluatePoissonLogL(fFunc, fData, x, fNEffPoints); return FitUtil::EvaluatePoissonLogL(fFunc, fData, x, fNEffPoints);
} }
// for derivatives // for derivatives
virtual double DoDerivative(const double * x, unsigned int icoord ) con st { virtual double DoDerivative(const double * x, unsigned int icoord ) con st {
Gradient(x, &fGrad[0]); Gradient(x, &fGrad[0]);
return fGrad[icoord]; return fGrad[icoord];
} }
 End of changes. 5 change blocks. 
5 lines changed or deleted 5 lines changed or added


 ProfileLikelihoodCalculator.h   ProfileLikelihoodCalculator.h 
// @(#)root/roostats:$Id: ProfileLikelihoodCalculator.h 26964 2008-12-16 16 :30:01Z moneta $ // @(#)root/roostats:$Id: ProfileLikelihoodCalculator.h 29179 2009-06-23 18 :39:27Z brun $
// Author: Kyle Cranmer, Lorenzo Moneta, Gregory Schott, Wouter Verkerke // Author: Kyle Cranmer, Lorenzo Moneta, Gregory Schott, Wouter Verkerke
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2008, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2008, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
#ifndef ROOSTATS_ProfileLikelihoodCalculator #ifndef ROOSTATS_ProfileLikelihoodCalculator
#define ROOSTATS_ProfileLikelihoodCalculator #define ROOSTATS_ProfileLikelihoodCalculator
#ifndef ROOSTATS_CombinedCalculator #ifndef ROOSTATS_CombinedCalculator
#include "RooStats/CombinedCalculator.h" #include "RooStats/CombinedCalculator.h"
#endif #endif
#include "RooStats/LikelihoodInterval.h"
namespace RooStats { namespace RooStats {
class ProfileLikelihoodCalculator : public CombinedCalculator { class ProfileLikelihoodCalculator : public CombinedCalculator {
public: public:
ProfileLikelihoodCalculator(); ProfileLikelihoodCalculator();
ProfileLikelihoodCalculator(RooWorkspace& ws, RooAbsData& data, RooAb sPdf& pdf, RooArgSet& paramsOfInterest, ProfileLikelihoodCalculator(RooWorkspace& ws, RooAbsData& data, RooAb sPdf& pdf, RooArgSet& paramsOfInterest,
Double_t size = 0.05, RooArgSet* nullPara ms = 0, RooArgSet* altParams = 0); Double_t size = 0.05, RooArgSet* nullPara ms = 0, RooArgSet* altParams = 0);
ProfileLikelihoodCalculator(RooAbsData& data, RooAbsPdf& pdf, RooArgS et& paramsOfInterest, ProfileLikelihoodCalculator(RooAbsData& data, RooAbsPdf& pdf, RooArgS et& paramsOfInterest,
Double_t size = 0.05, RooArgSet* nullPara ms = 0, RooArgSet* altParams = 0); Double_t size = 0.05, RooArgSet* nullPara ms = 0, RooArgSet* altParams = 0);
virtual ~ProfileLikelihoodCalculator(); virtual ~ProfileLikelihoodCalculator();
// main interface, implemented // main interface, implemented
virtual ConfInterval* GetInterval() const ; virtual ConfInterval* GetInterval() const ;
// main interface, implemented // main interface, implemented
virtual HypoTestResult* GetHypoTest() const; virtual HypoTestResult* GetHypoTest() const;
protected: protected:
ClassDef(ProfileLikelihoodCalculator,1) // A concrete implementation of CombinedCalculator that uses the ProfileLikelihood ratio. ClassDef(ProfileLikelihoodCalculator,1) // A concrete implementation of CombinedCalculator that uses the ProfileLikelihood ratio.
}; };
} }
#endif #endif
 End of changes. 3 change blocks. 
1 lines changed or deleted 4 lines changed or added


 ProfileLikelihoodTestStat.h   ProfileLikelihoodTestStat.h 
skipping to change at line 62 skipping to change at line 62
ProfileLikelihoodTestStat(RooAbsPdf& pdf) { ProfileLikelihoodTestStat(RooAbsPdf& pdf) {
fPdf = &pdf; fPdf = &pdf;
fProfile = 0; fProfile = 0;
fNll = 0; fNll = 0;
fCachedBestFitParams = 0; fCachedBestFitParams = 0;
fLastData = 0; fLastData = 0;
} }
virtual ~ProfileLikelihoodTestStat() { virtual ~ProfileLikelihoodTestStat() {
// delete fRand; // delete fRand;
// delete fTestStatistic; // delete fTestStatistic;
if(fProfile) delete fProfile;
if(fNll) delete fNll;
if(fCachedBestFitParams) delete fCachedBestFitParams;
} }
// Main interface to evaluate the test statistic on a dataset // Main interface to evaluate the test statistic on a dataset
virtual Double_t Evaluate(RooAbsData& data, RooArgSet& paramsOfInteres t) { virtual Double_t Evaluate(RooAbsData& data, RooArgSet& paramsOfInteres t) {
if(!&data){ cout << "problem with data" << endl;} if(!&data){ cout << "problem with data" << endl;}
RooMsgService::instance().setGlobalKillBelow(RooMsgService::FATAL) ; RooMsgService::instance().setGlobalKillBelow(RooFit::FATAL) ;
bool needToRebuild = true; // try to avoid rebuilding if possible bool needToRebuild = true; // try to avoid rebuilding if possible
if(fLastData == &data) // simple pointer comparison for now (note NL L makes COPY of data) if(fLastData == &data) // simple pointer comparison for now (note NL L makes COPY of data)
needToRebuild=false; needToRebuild=false;
else else
fLastData = &data; // keep a copy of pointer to original data fLastData = &data; // keep a copy of pointer to original data
// pointer comparison causing problems. See multiple datasets with same value of pointer // pointer comparison causing problems. See multiple datasets with same value of pointer
// but actually a new dataset // but actually a new dataset
needToRebuild = true; needToRebuild = true;
// check mem leak in NLL or Profile. Should remove. // check mem leak in NLL or Profile. Should remove.
// if(fProfile) needToRebuild = false; // if(fProfile) needToRebuild = false;
if(needToRebuild){ if(needToRebuild){
if(fProfile) delete fProfile; if(fProfile) delete fProfile;
if (fNll) delete fNll; if (fNll) delete fNll;
/*
RooNLLVar* nll = new RooNLLVar("nll","",*fPdf,data, RooFit::Extende d()); RooNLLVar* nll = new RooNLLVar("nll","",*fPdf,data, RooFit::Extende d());
fNll = nll; fNll = nll;
fProfile = new RooProfileLL("pll","",*nll, paramsOfInterest); fProfile = new RooProfileLL("pll","",*nll, paramsOfInterest);
*/
RooArgSet* constrainedParams = fPdf->getParameters(data);
RemoveConstantParameters(constrainedParams);
RooNLLVar* nll = (RooNLLVar*) fPdf->createNLL(data, RooFit::CloneDa
ta(kFALSE),RooFit::Constrain(*constrainedParams));
fNll=nll;
fProfile = (RooProfileLL*) nll->createProfile(paramsOfInterest);
delete constrainedParams;
// paramsOfInterest.Print("v");
// set parameters to previous best fit params, to speed convergence // set parameters to previous best fit params, to speed convergence
// and to avoid local minima // and to avoid local minima
if(fCachedBestFitParams){ if(fCachedBestFitParams){
// store original values, since minimization will change them. // store original values, since minimization will change them.
RooArgSet* origParamVals = (RooArgSet*) paramsOfInterest.snapshot (); RooArgSet* origParamVals = (RooArgSet*) paramsOfInterest.snapshot ();
// these parameters are not guaranteed to be the best for this da ta // these parameters are not guaranteed to be the best for this da ta
SetParameters(fCachedBestFitParams, fProfile->getParameters(data) ); SetParameters(fCachedBestFitParams, fProfile->getParameters(data) );
// now evaluate to force this profile to evaluate and store // now evaluate to force this profile to evaluate and store
skipping to change at line 153 skipping to change at line 167
} }
} }
// issue warning if problems // issue warning if problems
if(!fProfile){ cout << "problem making profile" << endl;} if(!fProfile){ cout << "problem making profile" << endl;}
// set parameters to point being requested // set parameters to point being requested
SetParameters(&paramsOfInterest, fProfile->getParameters(data) ); SetParameters(&paramsOfInterest, fProfile->getParameters(data) );
Double_t value = fProfile->getVal(); Double_t value = fProfile->getVal();
RooMsgService::instance().setGlobalKillBelow(RooMsgService::DEBUG) ;
/* /*
// for debugging caching // for debugging caching
cout << "current value of input params: " << endl; cout << "current value of input params: " << endl;
paramsOfInterest.Print("verbose"); paramsOfInterest.Print("verbose");
cout << "current value of params in profile: " << endl; cout << "current value of params in profile: " << endl;
fProfile->getParameters(data)->Print("verbose"); fProfile->getParameters(data)->Print("verbose");
cout << "cached last best fit: " << endl; cout << "cached last best fit: " << endl;
fCachedBestFitParams->Print("verbose"); fCachedBestFitParams->Print("verbose");
*/ */
// catch false minimum // catch false minimum
if(value<0){ if(value<0){
// cout << "ProfileLikelihoodTestStat: problem that profileLL = " << value // cout << "ProfileLikelihoodTestStat: problem that profileLL = " << value
// << " < 0, indicates false min. Try again."<<endl; // << " < 0, indicates false min. Try again."<<endl;
delete fNll; delete fNll;
delete fProfile; delete fProfile;
/*
RooNLLVar* nll = new RooNLLVar("nll","",*fPdf,data, RooFit::Extende d()); RooNLLVar* nll = new RooNLLVar("nll","",*fPdf,data, RooFit::Extende d());
fNll = nll; fNll = nll;
fProfile = new RooProfileLL("pll","",*nll, paramsOfInterest); fProfile = new RooProfileLL("pll","",*nll, paramsOfInterest);
*/
RooArgSet* constrainedParams = fPdf->getParameters(data);
RemoveConstantParameters(constrainedParams);
RooNLLVar* nll = (RooNLLVar*) fPdf->createNLL(data, RooFit::CloneDa
ta(kFALSE),RooFit::Constrain(*constrainedParams));
fNll=nll;
fProfile = (RooProfileLL*) nll->createProfile(paramsOfInterest);
delete constrainedParams;
// set parameters to point being requested // set parameters to point being requested
SetParameters(&paramsOfInterest, fProfile->getParameters(data) ); SetParameters(&paramsOfInterest, fProfile->getParameters(data) );
value = fProfile->getVal(); value = fProfile->getVal();
// cout << "now profileLL = " << value << endl; //cout << "now profileLL = " << value << endl;
} }
// cout << "now profileLL = " << value << endl;
RooMsgService::instance().setGlobalKillBelow(RooFit::DEBUG) ;
return value; return value;
} }
// Get the TestStatistic // Get the TestStatistic
virtual const RooAbsArg* GetTestStatistic() const {return fProfile;} virtual const RooAbsArg* GetTestStatistic() const {return fProfile;}
virtual const TString GetVarName() const {return "Profile Likelihood
Ratio";}
private: private:
RooProfileLL* fProfile; RooProfileLL* fProfile;
RooAbsPdf* fPdf; RooAbsPdf* fPdf;
RooNLLVar* fNll; RooNLLVar* fNll;
const RooArgSet* fCachedBestFitParams; const RooArgSet* fCachedBestFitParams;
RooAbsData* fLastData; RooAbsData* fLastData;
// Double_t fLastMLE; // Double_t fLastMLE;
protected: protected:
ClassDef(ProfileLikelihoodTestStat,1) ClassDef(ProfileLikelihoodTestStat,1) // implements the profile lik elihood ratio as a test statistic to be used with several tools
}; };
} }
#endif #endif
 End of changes. 11 change blocks. 
4 lines changed or deleted 34 lines changed or added


 RConfigOptions.h   RConfigOptions.h 
#ifndef ROOT_RConfigOptions #ifndef ROOT_RConfigOptions
#define ROOT_RConfigOptions #define ROOT_RConfigOptions
#define R__CONFIGUREOPTIONS "QTDIR=/afs/cern.ch/sw/lcg/external/qt/4.4.2/ i686-slc5-gcc43-opt PYTHONDIR=/afs/cern.ch/sw/lcg/external/Python/2.5.4/i68 6-slc5-gcc43-opt --fail-on-missing --enable-cintex --enable-explicitlink -- enable-gdml --enable-genvector --enable-mathmore --enable-minuit2 --enable- mysql --enable-oracle --enable-python --enable-qt --enable-qtgsi --enable-r eflex --enable-roofit --enable-table --enable-unuran --with-castor-incdir=/ afs/cern.ch/sw/lcg/external/castor/2.1.7-24/i686-slc5-gcc43-opt/usr/include /shift --with-castor-libdir=/afs/cern.ch/sw/lcg/external/castor/2.1.7-24/i6 86-slc5-gcc43-opt/usr/lib --with-cern-libdir=/afs/cern.ch/sw/lcg/external/c ernlib/2005/i686-slc5-gcc43-opt/lib --with-dcap-libdir=/afs/cern.ch/sw/lcg/ external/dcache_client/1.8.0p1/i686-slc5-gcc43-opt/dcap/lib --with-dcap-inc dir=/afs/cern.ch/sw/lcg/external/dcache_client/1.8.0p1/i686-slc5-gcc43-opt/ dcap/include --with-fftw3-incdir=/afs/cern.ch/sw/lcg/external/fftw3/3.1.2/i 686-slc5-gcc43-opt/include --with-fftw3-libdir=/afs/cern.ch/sw/lcg/external /fftw3/3.1.2/i686-slc5-gcc43-opt/lib --with-gccxml=/afs/cern.ch/sw/lcg/exte rnal/gccxml/0.9.0_20081130/i686-slc5-gcc43-opt/bin --with-gfal-libdir=/afs/ cern.ch/sw/lcg/external/Grid/gfal/1.11.2-1/i686-slc5-gcc43-opt/lib --with-g fal-incdir=/afs/cern.ch/sw/lcg/external/Grid/gfal/1.11.2-1/i686-slc5-gcc43- opt/include --with-globus-incdir=/afs/cern.ch/sw/lcg/external/Grid/globus/4 .0.3-VDT-1.6.0/i686-slc5-gcc43-opt/globus/include --with-globus-libdir=/afs /cern.ch/sw/lcg/external/Grid/globus/4.0.3-VDT-1.6.0/i686-slc5-gcc43-opt/gl obus/lib --with-gsl-incdir=/afs/cern.ch/sw/lcg/external/GSL/1.10/i686-slc5- gcc43-opt/include --with-gsl-libdir=/afs/cern.ch/sw/lcg/external/GSL/1.10/i 686-slc5-gcc43-opt/lib --with-mysql-incdir=/afs/cern.ch/sw/lcg/external/mys ql/5.0.18/i686-slc5-gcc43-opt/include --with-mysql-libdir=/afs/cern.ch/sw/l cg/external/mysql/5.0.18/i686-slc5-gcc43-opt/lib --with-oracle-incdir=/afs/ cern.ch/sw/lcg/external/oracle/10.2.0.4-full/i686-slc5-gcc43-opt/include -- with-oracle-libdir=/afs/cern.ch/sw/lcg/external/oracle/10.2.0.4-full/i686-s lc5-gcc43-opt/lib --with-shift-incdir=/afs/cern.ch/sw/lcg/external/castor/2 .1.7-24/i686-slc5-gcc43-opt/usr/include/shift --with-shift-libdir=/afs/cern .ch/sw/lcg/external/castor/2.1.7-24/i686-slc5-gcc43-opt/usr/lib" #define R__CONFIGUREOPTIONS "QTDIR=/afs/cern.ch/sw/lcg/external/qt/4.4.2/ i686-slc5-gcc43-opt PYTHONDIR=/afs/cern.ch/sw/lcg/external/Python/2.5.4/i68 6-slc5-gcc43-opt --fail-on-missing --enable-cintex --enable-explicitlink -- enable-gdml --enable-genvector --enable-mathmore --enable-minuit2 --enable- mysql --enable-oracle --enable-python --enable-qt --enable-qtgsi --enable-r eflex --enable-roofit --enable-table --enable-unuran --with-castor-incdir=/ afs/cern.ch/sw/lcg/external/castor/2.1.7-24/i686-slc5-gcc43-opt/usr/include /shift --with-castor-libdir=/afs/cern.ch/sw/lcg/external/castor/2.1.7-24/i6 86-slc5-gcc43-opt/usr/lib --with-cern-libdir=/afs/cern.ch/sw/lcg/external/c ernlib/2006a/i686-slc5-gcc43-opt/lib --with-dcap-libdir=/afs/cern.ch/sw/lcg /external/dcache_client/1.9.3/i686-slc5-gcc43-opt/dcap/lib --with-dcap-incd ir=/afs/cern.ch/sw/lcg/external/dcache_client/1.9.3/i686-slc5-gcc43-opt/dca p/include --with-fftw3-incdir=/afs/cern.ch/user/b/bellenot/scratch0/fftw3/3 .1.2/i686-slc5-gcc43-opt/include --with-fftw3-libdir=/afs/cern.ch/user/b/be llenot/scratch0/fftw3/3.1.2/i686-slc5-gcc43-opt/lib --with-gccxml=/afs/cern .ch/sw/lcg/external/gccxml/0.9.0_20090601/i686-slc5-gcc43-opt/bin --with-gf al-libdir=/afs/cern.ch/sw/lcg/external/Grid/gfal/1.11.7-1/i686-slc5-gcc43-o pt/lib --with-gfal-incdir=/afs/cern.ch/sw/lcg/external/Grid/gfal/1.11.7-1/i 686-slc5-gcc43-opt/include --with-globus-incdir=/afs/cern.ch/sw/lcg/externa l/Grid/globus/4.0.3-VDT-1.6.0/i686-slc5-gcc43-opt/globus/include --with-glo bus-libdir=/afs/cern.ch/sw/lcg/external/Grid/globus/4.0.3-VDT-1.6.0/i686-sl c5-gcc43-opt/globus/lib --with-gsl-incdir=/afs/cern.ch/sw/lcg/external/GSL/ 1.10/i686-slc5-gcc43-opt/include --with-gsl-libdir=/afs/cern.ch/sw/lcg/exte rnal/GSL/1.10/i686-slc5-gcc43-opt/lib --with-mysql-incdir=/afs/cern.ch/sw/l cg/external/mysql/5.0.18/i686-slc5-gcc43-opt/include --with-mysql-libdir=/a fs/cern.ch/sw/lcg/external/mysql/5.0.18/i686-slc5-gcc43-opt/lib --with-orac le-incdir=/afs/cern.ch/sw/lcg/external/oracle/10.2.0.4-full/i686-slc5-gcc43 -opt/include --with-oracle-libdir=/afs/cern.ch/sw/lcg/external/oracle/10.2. 0.4-full/i686-slc5-gcc43-opt/lib --with-shift-incdir=/afs/cern.ch/sw/lcg/ex ternal/castor/2.1.7-24/i686-slc5-gcc43-opt/usr/include/shift --with-shift-l ibdir=/afs/cern.ch/sw/lcg/external/castor/2.1.7-24/i686-slc5-gcc43-opt/usr/ lib"
#endif #endif
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 RVersion.h   RVersion.h 
skipping to change at line 17 skipping to change at line 17
* These macros can be used in the following way: * These macros can be used in the following way:
* *
* #if ROOT_VERSION_CODE >= ROOT_VERSION(2,23,4) * #if ROOT_VERSION_CODE >= ROOT_VERSION(2,23,4)
* #include <newheader.h> * #include <newheader.h>
* #else * #else
* #include <oldheader.h> * #include <oldheader.h>
* #endif * #endif
* *
*/ */
#define ROOT_RELEASE "5.23/04" #define ROOT_RELEASE "5.24/00"
#define ROOT_RELEASE_DATE "Apr 22 2009" #define ROOT_RELEASE_DATE "Jun 29 2009"
#define ROOT_RELEASE_TIME "12:13:45" #define ROOT_RELEASE_TIME "11:40:31"
#define ROOT_SVN_REVISION 28330 #define ROOT_SVN_REVISION 29252
#define ROOT_SVN_BRANCH "trunk" #define ROOT_SVN_BRANCH "trunk"
#define ROOT_VERSION_CODE 333572 #define ROOT_VERSION_CODE 333824
#define ROOT_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c)) #define ROOT_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
#endif #endif
 End of changes. 2 change blocks. 
5 lines changed or deleted 5 lines changed or added


 Ranking.h   Ranking.h 
// @(#)root/tmva $Id: Ranking.h 21079 2007-11-27 20:08:49Z brun $ // @(#)root/tmva $Id: Ranking.h 29195 2009-06-24 10:39:49Z brun $
// Author: Andreas Hoecker, Joerg Stelzer, Helge Voss, Kai Voss // Author: Andreas Hoecker, Joerg Stelzer, Helge Voss, Kai Voss
/************************************************************************** ******** /************************************************************************** ********
* Project: TMVA - a Root-integrated toolkit for multivariate data analysis * * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
* Package: TMVA * * Package: TMVA *
* Class : Ranking * * Class : Ranking *
* Web : http://tmva.sourceforge.net * * Web : http://tmva.sourceforge.net *
* * * *
* Description: * * Description: *
* Virtual ranking class * * Virtual ranking class *
skipping to change at line 41 skipping to change at line 41
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// // // //
// Ranking // // Ranking //
// // // //
// Defines vector of rank // // Defines vector of rank //
// // // //
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
#include <vector> #include <vector>
#ifndef ROOT_TMVA_MsgLogger
#include "TMVA/MsgLogger.h"
#endif
#ifndef ROOT_TString #ifndef ROOT_TString
#include "TString.h" #include "TString.h"
#endif #endif
class TString;
namespace TMVA { namespace TMVA {
class MsgLogger;
class Rank; class Rank;
class Ranking { class Ranking {
public: public:
Ranking(); Ranking();
Ranking( const TString& context, const TString& rankingDiscriminatorN ame ); Ranking( const TString& context, const TString& rankingDiscriminatorN ame );
virtual ~Ranking(); virtual ~Ranking();
virtual void AddRank( const Rank& rank ); virtual void AddRank( const Rank& rank );
virtual void Print() const; virtual void Print() const;
void SetContext ( const TString context ) { fContext = context; fL void SetContext ( const TString& context );
ogger.SetSource( fContext.Data() ); } void SetDiscrName( const TString& discrName ) { fRankingDiscriminator
void SetDiscrName( const TString discrName ) { fRankingDiscriminatorN Name = discrName; }
ame = discrName; }
private: private:
std::vector<TMVA::Rank*> fRanking; // vector of rank s std::vector<TMVA::Rank> fRanking; // vector of ranks
TString fContext; // the ranking con text TString fContext; // the ranking con text
TString fRankingDiscriminatorName; // the name of the ranking discriminator TString fRankingDiscriminatorName; // the name of the ranking discriminator
mutable MsgLogger fLogger; // message logger mutable MsgLogger* fLogger; //! message logger
MsgLogger& Log() const { return *fLogger; }
ClassDef(Ranking,0) // Method-specific ranking for input variables ClassDef(Ranking,0) // Method-specific ranking for input variables
}; };
// --------------------------------------------------------------------- ----- // --------------------------------------------------------------------- -----
class Rank { class Rank {
public: public:
Rank( TString variable, Double_t rankValue ); Rank( const TString& variable, Double_t rankValue );
virtual ~Rank(); virtual ~Rank();
// comparison between rank // comparison between rank
Bool_t operator < ( const Rank& other ) const; Bool_t operator < ( const Rank& other ) const;
Bool_t operator > ( const Rank& other ) const; Bool_t operator > ( const Rank& other ) const;
const TString& GetVariable() const { return fVariable; } const TString& GetVariable() const { return fVariable; }
Double_t GetRankValue() const { return fRankValue; } Double_t GetRankValue() const { return fRankValue; }
Int_t GetRank() const { return fRank; } Int_t GetRank() const { return fRank; }
void SetRank( Int_t rank ) { fRank = rank; } void SetRank( Int_t rank ) { fRank = rank; }
 End of changes. 8 change blocks. 
13 lines changed or deleted 9 lines changed or added


 Reader.h   Reader.h 
// @(#)root/tmva $Id: Reader.h 27320 2009-02-02 06:40:36Z brun $ // @(#)root/tmva $Id: Reader.h 29195 2009-06-24 10:39:49Z brun $
// Author: Andreas Hoecker, Joerg Stelzer, Helge Voss, Kai Voss // Author: Andreas Hoecker, Joerg Stelzer, Helge Voss, Kai Voss
/************************************************************************** ******** /************************************************************************** ********
* Project: TMVA - a Root-integrated toolkit for multivariate data analysis * * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
* Package: TMVA * * Package: TMVA *
* Class : Reader * * Class : Reader *
* Web : http://tmva.sourceforge.net * * Web : http://tmva.sourceforge.net *
* * * *
* Description: * * Description: *
* Reader class to be used in the user application to interpret the tr ained * * Reader class to be used in the user application to interpret the tr ained *
* MVAs in an analysis context * * MVAs in an analysis context *
* * * *
* Authors (alphabetical): * * Authors (alphabetical order): *
* Andreas Hoecker <Andreas.Hocker@cern.ch> - CERN, Switzerland * * Andreas Hoecker <Andreas.Hocker@cern.ch> - CERN, Switzerland *
* Xavier Prudent <prudent@lapp.in2p3.fr> - LAPP, France * Peter Speckmayer <peter.speckmayer@cern.ch> - CERN, Switzerland
* *
* Joerg Stelzer <Joerg.Stelzer@cern.ch> - CERN, Switzerland
*
* Helge Voss <Helge.Voss@cern.ch> - MPI-K Heidelberg, German y * * Helge Voss <Helge.Voss@cern.ch> - MPI-K Heidelberg, German y *
* Kai Voss <Kai.Voss@cern.ch> - U. of Victoria, Canada * * Kai Voss <Kai.Voss@cern.ch> - U. of Victoria, Canada *
* * * *
* Copyright (c) 2005: * * Copyright (c) 2005: *
* CERN, Switzerland * * CERN, Switzerland *
* U. of Victoria, Canada * * U. of Victoria, Canada *
* MPI-K Heidelberg, Germany * * MPI-K Heidelberg, Germany *
* LAPP, Annecy, France *
* * * *
* Redistribution and use in source and binary forms, with or without * * Redistribution and use in source and binary forms, with or without *
* modification, are permitted according to the terms listed in LICENSE * * modification, are permitted according to the terms listed in LICENSE *
* (http://ttmva.sourceforge.net/LICENSE) * * (http://ttmva.sourceforge.net/LICENSE) *
************************************************************************** ********/ ************************************************************************** ********/
#ifndef ROOT_TMVA_Reader #ifndef ROOT_TMVA_Reader
#define ROOT_TMVA_Reader #define ROOT_TMVA_Reader
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// // // //
// Reader // // Reader //
// // // //
// Reader class to be used in the user application to interpret the // // Reader class to be used in the user application to interpret the //
// trained MVAs in an analysis context // // trained MVAs in an analysis context //
// // // //
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
#ifndef ROOT_TMVA_Configurable
#include "TMVA/Configurable.h"
#endif
#ifndef ROOT_TMVA_Types #ifndef ROOT_TMVA_Types
#include "TMVA/Types.h" #include "TMVA/Types.h"
#endif #endif
#ifndef ROOT_TMVA_IMethod #ifndef ROOT_TMVA_DataSetInfo
#include "TMVA/MethodBase.h" #include "TMVA/DataSetInfo.h"
#endif #endif
#ifndef ROOT_TMVA_DataSet #ifndef ROOT_TMVA_DataInputHandler
#include "TMVA/DataSet.h" #include "TMVA/DataInputHandler.h"
#endif #endif
#ifndef ROOT_TMVA_MsgLogger #ifndef ROOT_TMVA_DataSetManager
#include "TMVA/MsgLogger.h" #include "TMVA/DataSetManager.h"
#endif
#ifndef ROOT_TMVA_Configurable
#include "TMVA/Configurable.h"
#endif #endif
#include <vector> #include <vector>
#include <map> #include <map>
#include <string> #include <stdexcept>
namespace TMVA { namespace TMVA {
class IMethod;
class MethodBase;
class DataSetInfo;
class MethodCuts;
class Reader : public Configurable { class Reader : public Configurable {
public: public:
// without prior specification of variables // without prior specification of variables
Reader( TString theOption="", Bool_t verbose = 0 ); Reader( const TString& theOption="", Bool_t verbose = 0 );
// STL types // STL types
Reader( std::vector<std::string>& varNames, TString theOption = "", Reader( std::vector<std::string>& varNames, const TString& theOption
Bool_t verbose = 0 ); = "", Bool_t verbose = 0 );
Reader( const std::string varNames, TString theOption, Bool_t verbose Reader( const std::string& varNames, const TString& theOption, Bool_t
= 0 ); // format: "var1:var2:..." verbose = 0 ); // format: "var1:var2:..."
// Root types // Root types
Reader( std::vector<TString>& varNames, TString theOption = "", Bool_ Reader( std::vector<TString>& varNames, const TString& theOption = ""
t verbose = 0 ); , Bool_t verbose = 0 );
Reader( const TString varNames, TString theOption, Bool_t verbose = 0 Reader( const TString& varNames, const TString& theOption, Bool_t ver
); // format: "var1:var2:..." bose = 0 ); // format: "var1:var2:..."
virtual ~Reader( void ); virtual ~Reader( void );
// book MVA method via weight file
IMethod* BookMVA( const TString& methodTag, const TString& weightfile ); IMethod* BookMVA( const TString& methodTag, const TString& weightfile );
IMethod* FindMVA( const TString& methodTag ); IMethod* FindMVA( const TString& methodTag );
// special function for Cuts to avoid dynamic_casts in ROOT macros,
// which are not properly handled by CINT
MethodCuts* FindCutsMVA( const TString& methodTag );
// returns the MVA response for given event
Double_t EvaluateMVA( const std::vector<Float_t> &, const TString& me thodTag, Double_t aux = 0 ); Double_t EvaluateMVA( const std::vector<Float_t> &, const TString& me thodTag, Double_t aux = 0 );
Double_t EvaluateMVA( const std::vector<Double_t>&, const TString& me thodTag, Double_t aux = 0 ); Double_t EvaluateMVA( const std::vector<Double_t>&, const TString& me thodTag, Double_t aux = 0 );
Double_t EvaluateMVA( MethodBase* method, Double_t aux = 0 ); Double_t EvaluateMVA( MethodBase* method, Double_t aux = 0 );
Double_t EvaluateMVA( const TString& methodTag, Double_t a Double_t EvaluateMVA( const TString& methodTag, Double_t aux = 0
ux = 0 ); );
// returns error on MVA response for given event
// NOTE: must be called AFTER "EvaluateMVA(...)" call !
Double_t GetMVAError() const { return fMvaEventError; }
const std::vector< Float_t >& EvaluateRegression( const TString& meth
odTag, Double_t aux = 0 );
const std::vector< Float_t >& EvaluateRegression( MethodBase* method,
Double_t aux = 0 );
Float_t EvaluateRegression( UInt_t tgtNumber, const TString& methodT
ag, Double_t aux = 0 );
// probability and rarity accessors (see Users Guide for definition o f Rarity)
Double_t GetProba ( const TString& methodTag, Double_t ap_sig=0.5, Do uble_t mvaVal=-9999999 ); Double_t GetProba ( const TString& methodTag, Double_t ap_sig=0.5, Do uble_t mvaVal=-9999999 );
Double_t GetRarity( const TString& methodTag, Double_t mvaVal=-999999 9 ); Double_t GetRarity( const TString& methodTag, Double_t mvaVal=-999999 9 );
// accessors // accessors
virtual const char* GetName() const { return "Reader"; } virtual const char* GetName() const { return "Reader"; }
Bool_t Verbose( void ) const { return fVerbose; } Bool_t Verbose( void ) const { return fVerbose; }
void SetVerbose( Bool_t v ) { fVerbose = v; } void SetVerbose( Bool_t v ) { fVerbose = v; }
const DataSet& Data() const { return *fDataSet; } const DataSetInfo& DataInfo() const { return fDataSetInfo; }
DataSet& Data() { return *fDataSet; } DataSetInfo& DataInfo() { return fDataSetInfo; }
// add and retrieve variables void AddVariable( const TString& expression, Float_t* );
void AddVariable( const TString& expression, Float_t* ); void AddVariable( const TString& expression, Int_t* );
void AddVariable( const TString& expression, Int_t* );
const TString& GetVarName( Int_t ivar ) { return Data().GetExpression
(ivar); }
private: private:
// this booking method is internal // this booking method is internal
IMethod* BookMVA( Types::EMVA method, TString weightfile ); IMethod* BookMVA( Types::EMVA method, const TString& weightfile );
DataSet* fDataSet; // the data set DataSetInfo fDataSetInfo; // the data set
DataInputHandler fDataInputHandler;
// Init Reader class // Init Reader class
void Init( void ); void Init( void );
// Decode Constructor string (or TString) and fill variable name std: :vector // Decode Constructor string (or TString) and fill variable name std: :vector
void DecodeVarNames( const std::string varNames ); void DecodeVarNames( const std::string& varNames );
void DecodeVarNames( const TString varNames ); void DecodeVarNames( const TString& varNames );
// Reads method name and title from the weightfile
void GetMethodNameTitle(const TString& weightfile, TString& methodNam
e, TString& methodTitle);
void DeclareOptions(); void DeclareOptions();
Bool_t fVerbose; // verbosity Bool_t fVerbose; // verbosity
Bool_t fSilent; // overall silent flag Bool_t fSilent; // silent mode
Bool_t fColor; // color output Bool_t fColor; // color mode
Double_t fMvaEventError; // per-event error returned by MVA (unless:
-1)
std::map<TString, IMethod*> fMethodMap; // map of methods std::map<TString, IMethod*> fMethodMap; // map of methods
mutable MsgLogger fLogger; // message logger mutable MsgLogger* fLogger; // message logger
MsgLogger& Log() const { return *fLogger; }
ClassDef(Reader,0) // Interpret the trained MVAs in an analysis conte xt ClassDef(Reader,0) // Interpret the trained MVAs in an analysis conte xt
}; };
} }
#endif #endif
 End of changes. 25 change blocks. 
45 lines changed or deleted 67 lines changed or added


 RooAbsArg.h   RooAbsArg.h 
skipping to change at line 33 skipping to change at line 33
#include "RooRefCountList.h" #include "RooRefCountList.h"
#include "RooAbsCache.h" #include "RooAbsCache.h"
#include <map> #include <map>
#include <set> #include <set>
#include <deque> #include <deque>
class TTree ; class TTree ;
class RooArgSet ; class RooArgSet ;
class RooAbsCollection ; class RooAbsCollection ;
class RooTreeData ; class RooTreeData ;
class RooTreeDataStore ;
class RooAbsData ; class RooAbsData ;
class RooAbsDataStore ;
class RooAbsProxy ; class RooAbsProxy ;
class RooArgProxy ; class RooArgProxy ;
class RooSetProxy ; class RooSetProxy ;
class RooListProxy ; class RooListProxy ;
class RooExpensiveObjectCache ; class RooExpensiveObjectCache ;
class RooAbsArg : public TNamed, public RooPrintable { class RooAbsArg : public TNamed, public RooPrintable {
public: public:
// Constructors, cloning and assignment // Constructors, cloning and assignment
skipping to change at line 157 skipping to change at line 159
RooArgSet* getParameters(const RooAbsData* data) const ; RooArgSet* getParameters(const RooAbsData* data) const ;
RooArgSet* getParameters(const RooAbsData& data) const { RooArgSet* getParameters(const RooAbsData& data) const {
// Return the parameters of this p.d.f when used in conjuction with dat aset 'data' // Return the parameters of this p.d.f when used in conjuction with dat aset 'data'
return getParameters(&data) ; return getParameters(&data) ;
} }
RooArgSet* getParameters(const RooArgSet& set) const { RooArgSet* getParameters(const RooArgSet& set) const {
// Return the parameters of the p.d.f given the provided set of observa bles // Return the parameters of the p.d.f given the provided set of observa bles
return getParameters(&set) ; return getParameters(&set) ;
} }
virtual RooArgSet* getParameters(const RooArgSet* depList) const ; virtual RooArgSet* getParameters(const RooArgSet* depList) const ;
RooArgSet* getObservables(const RooArgSet& set) const { RooArgSet* getObservables(const RooArgSet& set, Bool_t valueOnly=kTRUE) c onst {
// Return the observables of _this_ pdf given a set of observables // Return the observables of _this_ pdf given a set of observables
return getObservables(&set) ; return getObservables(&set,valueOnly) ;
} }
RooArgSet* getObservables(const RooAbsData* data) const ; RooArgSet* getObservables(const RooAbsData* data) const ;
RooArgSet* getObservables(const RooAbsData& data) const { RooArgSet* getObservables(const RooAbsData& data) const {
// Return the observables of _this_ pdf given the observables defined b y 'data' // Return the observables of _this_ pdf given the observables defined b y 'data'
return getObservables(&data) ; return getObservables(&data) ;
} }
virtual RooArgSet* getObservables(const RooArgSet* depList) const ; virtual RooArgSet* getObservables(const RooArgSet* depList, Bool_t valueO nly=kTRUE) const ;
Bool_t observableOverlaps(const RooAbsData* dset, const RooAbsArg& testAr g) const ; Bool_t observableOverlaps(const RooAbsData* dset, const RooAbsArg& testAr g) const ;
Bool_t observableOverlaps(const RooArgSet* depList, const RooAbsArg& test Arg) const ; Bool_t observableOverlaps(const RooArgSet* depList, const RooAbsArg& test Arg) const ;
virtual Bool_t checkObservables(const RooArgSet* nset) const ; virtual Bool_t checkObservables(const RooArgSet* nset) const ;
Bool_t recursiveCheckObservables(const RooArgSet* nset) const ; Bool_t recursiveCheckObservables(const RooArgSet* nset) const ;
RooArgSet* getComponents() const ; RooArgSet* getComponents() const ;
// --- Obsolete functions for backward compatibility // --- Obsolete functions for backward compatibility
inline RooArgSet* getDependents(const RooArgSet& set) const { return getO bservables(set) ; } inline RooArgSet* getDependents(const RooArgSet& set) const { return getO bservables(set) ; }
inline RooArgSet* getDependents(const RooAbsData* set) const { return get Observables(set) ; } inline RooArgSet* getDependents(const RooAbsData* set) const { return get Observables(set) ; }
inline RooArgSet* getDependents(const RooArgSet* depList) const { return getObservables(depList) ; } inline RooArgSet* getDependents(const RooArgSet* depList) const { return getObservables(depList) ; }
inline Bool_t dependentOverlaps(const RooAbsData* dset, const RooAbsArg& testArg) const { return observableOverlaps(dset,testArg) ; } inline Bool_t dependentOverlaps(const RooAbsData* dset, const RooAbsArg& testArg) const { return observableOverlaps(dset,testArg) ; }
inline Bool_t dependentOverlaps(const RooArgSet* depList, const RooAbsArg & testArg) const { return observableOverlaps(depList, testArg) ; } inline Bool_t dependentOverlaps(const RooArgSet* depList, const RooAbsArg & testArg) const { return observableOverlaps(depList, testArg) ; }
inline Bool_t checkDependents(const RooArgSet* nset) const { return check Observables(nset) ; } inline Bool_t checkDependents(const RooArgSet* nset) const { return check Observables(nset) ; }
inline Bool_t recursiveCheckDependents(const RooArgSet* nset) const { ret urn recursiveCheckObservables(nset) ; } inline Bool_t recursiveCheckDependents(const RooArgSet* nset) const { ret urn recursiveCheckObservables(nset) ; }
// --- End obsolete functions for backward compatibility // --- End obsolete functions for backward compatibility
void attachDataSet(const RooAbsData &set); void attachDataSet(const RooAbsData &set);
void attachDataStore(const RooAbsDataStore &set);
// I/O streaming interface (machine readable) // I/O streaming interface (machine readable)
virtual Bool_t readFromStream(istream& is, Bool_t compact, Bool_t verbose =kFALSE) = 0 ; virtual Bool_t readFromStream(istream& is, Bool_t compact, Bool_t verbose =kFALSE) = 0 ;
virtual void writeToStream(ostream& os, Bool_t compact) const = 0 ; virtual void writeToStream(ostream& os, Bool_t compact) const = 0 ;
inline virtual void Print(Option_t *options= 0) const { inline virtual void Print(Option_t *options= 0) const {
// Printing interface (human readable) // Printing interface (human readable)
printStream(defaultPrintStream(),defaultPrintContents(options),defaultP rintStyle(options)); printStream(defaultPrintStream(),defaultPrintContents(options),defaultP rintStyle(options));
} }
skipping to change at line 276 skipping to change at line 279
virtual void optimizeCacheMode(const RooArgSet& observables) ; virtual void optimizeCacheMode(const RooArgSet& observables) ;
virtual void optimizeCacheMode(const RooArgSet& observables, RooArgSet& o ptNodes, RooLinkedList& processedNodes) ; virtual void optimizeCacheMode(const RooArgSet& observables, RooArgSet& o ptNodes, RooLinkedList& processedNodes) ;
// Find constant terms in expression // Find constant terms in expression
Bool_t findConstantNodes(const RooArgSet& observables, RooArgSet& cacheLi st) ; Bool_t findConstantNodes(const RooArgSet& observables, RooArgSet& cacheLi st) ;
Bool_t findConstantNodes(const RooArgSet& observables, RooArgSet& cacheLi st, RooLinkedList& processedNodes) ; Bool_t findConstantNodes(const RooArgSet& observables, RooArgSet& cacheLi st, RooLinkedList& processedNodes) ;
// constant term optimization // constant term optimization
virtual void constOptimizeTestStatistic(ConstOpCode opcode) ; virtual void constOptimizeTestStatistic(ConstOpCode opcode) ;
void graphVizTree(const char* fileName) ; void graphVizTree(const char* fileName, const char* delimiter="\n", bool
void graphVizTree(ostream& os) ; useTitle=false, bool useLatex=false) ;
void graphVizTree(ostream& os, const char* delimiter="\n", bool useTitle=
false, bool useLatex=false) ;
void printCompactTree(const char* indent="",const char* fileName=0, const char* namePat=0, RooAbsArg* client=0) ; void printCompactTree(const char* indent="",const char* fileName=0, const char* namePat=0, RooAbsArg* client=0) ;
void printCompactTree(ostream& os, const char* indent="", const char* nam ePat=0, RooAbsArg* client=0) ; void printCompactTree(ostream& os, const char* indent="", const char* nam ePat=0, RooAbsArg* client=0) ;
virtual void printCompactTreeHook(ostream& os, const char *ind="") ; virtual void printCompactTreeHook(ostream& os, const char *ind="") ;
// Dirty state accessor // Dirty state accessor
inline Bool_t isShapeDirty() const { inline Bool_t isShapeDirty() const {
// Return true is shape has been invalidated by server value change // Return true is shape has been invalidated by server value change
return isDerived()?_shapeDirty:kFALSE ; return isDerived()?_shapeDirty:kFALSE ;
} }
skipping to change at line 403 skipping to change at line 406
Int_t numProxies() const ; Int_t numProxies() const ;
// Attribute list // Attribute list
std::set<std::string> _boolAttrib ; // Boolean attributes std::set<std::string> _boolAttrib ; // Boolean attributes
std::map<std::string,std::string> _stringAttrib ; // String attributes std::map<std::string,std::string> _stringAttrib ; // String attributes
std::set<std::string> _boolAttribTransient ; //! Transient boolean attrib utes (not copied in ctor) std::set<std::string> _boolAttribTransient ; //! Transient boolean attrib utes (not copied in ctor)
void printAttribList(ostream& os) const; void printAttribList(ostream& os) const;
// Hooks for RooTreeData interface // Hooks for RooTreeData interface
friend class RooTreeDataStore ;
friend class RooTreeData ; friend class RooTreeData ;
friend class RooDataSet ; friend class RooDataSet ;
friend class RooRealMPFE ; friend class RooRealMPFE ;
friend class RooHistPdf ; friend class RooHistPdf ;
virtual void syncCache(const RooArgSet* nset=0) = 0 ; virtual void syncCache(const RooArgSet* nset=0) = 0 ;
virtual void copyCache(const RooAbsArg* source, Bool_t valueOnly=kFALSE) = 0 ; virtual void copyCache(const RooAbsArg* source, Bool_t valueOnly=kFALSE) = 0 ;
virtual void attachToTree(TTree& t, Int_t bufSize=32000) = 0 ; virtual void attachToTree(TTree& t, Int_t bufSize=32000) = 0 ;
virtual void setTreeBranchStatus(TTree& t, Bool_t active) = 0 ; virtual void setTreeBranchStatus(TTree& t, Bool_t active) = 0 ;
virtual void fillTreeBranch(TTree& t) = 0 ; virtual void fillTreeBranch(TTree& t) = 0 ;
TString cleanBranchName() const ; TString cleanBranchName() const ;
 End of changes. 8 change blocks. 
5 lines changed or deleted 11 lines changed or added


 RooAbsCollection.h   RooAbsCollection.h 
skipping to change at line 80 skipping to change at line 80
virtual void addClone(const RooAbsCollection& list, Bool_t silent=kFALS E); virtual void addClone(const RooAbsCollection& list, Bool_t silent=kFALS E);
Bool_t replace(const RooAbsCollection &other); Bool_t replace(const RooAbsCollection &other);
Bool_t remove(const RooAbsCollection& list, Bool_t silent=kFALSE, Bool_t matchByNameOnly=kFALSE) ; Bool_t remove(const RooAbsCollection& list, Bool_t silent=kFALSE, Bool_t matchByNameOnly=kFALSE) ;
// Group operations on AbsArgs // Group operations on AbsArgs
void setAttribAll(const Text_t* name, Bool_t value=kTRUE) ; void setAttribAll(const Text_t* name, Bool_t value=kTRUE) ;
// List search methods // List search methods
RooAbsArg *find(const char *name) const ; RooAbsArg *find(const char *name) const ;
Bool_t contains(const RooAbsArg& var) const { Bool_t contains(const RooAbsArg& var) const {
// Returns true if var is contained in this collection // Returns true if object with same name as var is contained in this co llection
return (0 == find(var.GetName())) ? kFALSE:kTRUE; return (0 == find(var.GetName())) ? kFALSE:kTRUE;
} }
Bool_t containsInstance(const RooAbsArg& var) const {
// Returns true if var is contained in this collection
return (0 == _list.FindObject(&var)) ? kFALSE:kTRUE;
}
RooAbsCollection* selectByAttrib(const char* name, Bool_t value) const ; RooAbsCollection* selectByAttrib(const char* name, Bool_t value) const ;
RooAbsCollection* selectCommon(const RooAbsCollection& refColl) const ; RooAbsCollection* selectCommon(const RooAbsCollection& refColl) const ;
RooAbsCollection* selectByName(const char* nameList, Bool_t verbose=kFALS E) const ; RooAbsCollection* selectByName(const char* nameList, Bool_t verbose=kFALS E) const ;
Bool_t equals(const RooAbsCollection& otherColl) const ; Bool_t equals(const RooAbsCollection& otherColl) const ;
Bool_t overlaps(const RooAbsCollection& otherColl) const ; Bool_t overlaps(const RooAbsCollection& otherColl) const ;
// export subset of THashList interface // export subset of THashList interface
inline TIterator* createIterator(Bool_t dir = kIterForward) const { inline TIterator* createIterator(Bool_t dir = kIterForward) const {
// Create and return an iterator over the elements in this collection // Create and return an iterator over the elements in this collection
return _list.MakeIterator(dir); return _list.MakeIterator(dir);
 End of changes. 2 change blocks. 
1 lines changed or deleted 5 lines changed or added


 RooAbsData.h   RooAbsData.h 
skipping to change at line 32 skipping to change at line 32
#include "RooFormulaVar.h" #include "RooFormulaVar.h"
class RooAbsArg; class RooAbsArg;
class RooAbsReal ; class RooAbsReal ;
class RooAbsCategory ; class RooAbsCategory ;
class Roo1DTable ; class Roo1DTable ;
class RooPlot; class RooPlot;
class RooArgList; class RooArgList;
class TH1; class TH1;
class RooAbsBinning ; class RooAbsBinning ;
class Roo1DTable ;
class RooAbsDataStore ;
class RooAbsData : public TNamed, public RooPrintable { class RooAbsData : public TNamed, public RooPrintable {
public: public:
// Constructors, factory methods etc. // Constructors, factory methods etc.
RooAbsData() ; RooAbsData() ;
RooAbsData(const char *name, const char *title, const RooArgSet& vars) ; RooAbsData(const char *name, const char *title, const RooArgSet& vars, Ro oAbsDataStore* store=0) ;
RooAbsData(const RooAbsData& other, const char* newname = 0) ; RooAbsData(const RooAbsData& other, const char* newname = 0) ;
virtual ~RooAbsData() ; virtual ~RooAbsData() ;
virtual RooAbsData* emptyClone(const char* newName=0, const char* newTitl e=0, const RooArgSet* vars=0) const = 0 ; virtual RooAbsData* emptyClone(const char* newName=0, const char* newTitl e=0, const RooArgSet* vars=0) const = 0 ;
// Reduction methods // Reduction methods
RooAbsData* reduce(RooCmdArg arg1,RooCmdArg arg2=RooCmdArg(),RooCmdArg ar g3=RooCmdArg(),RooCmdArg arg4=RooCmdArg(), RooAbsData* reduce(RooCmdArg arg1,RooCmdArg arg2=RooCmdArg(),RooCmdArg ar g3=RooCmdArg(),RooCmdArg arg4=RooCmdArg(),
RooCmdArg arg5=RooCmdArg(),RooCmdArg arg6=RooCmdArg(), RooCmdArg arg7=RooCmdArg(),RooCmdArg arg8=RooCmdArg()) ; RooCmdArg arg5=RooCmdArg(),RooCmdArg arg6=RooCmdArg(), RooCmdArg arg7=RooCmdArg(),RooCmdArg arg8=RooCmdArg()) ;
RooAbsData* reduce(const char* cut) ; RooAbsData* reduce(const char* cut) ;
RooAbsData* reduce(const RooFormulaVar& cutVar) ; RooAbsData* reduce(const RooFormulaVar& cutVar) ;
RooAbsData* reduce(const RooArgSet& varSubset, const char* cut=0) ; RooAbsData* reduce(const RooArgSet& varSubset, const char* cut=0) ;
RooAbsData* reduce(const RooArgSet& varSubset, const RooFormulaVar& cutVa r) ; RooAbsData* reduce(const RooArgSet& varSubset, const RooFormulaVar& cutVa r) ;
RooAbsDataStore* store() { return _dstore ; }
const RooAbsDataStore* store() const { return _dstore ; }
void checkInit() const ;
// Change name of observable // Change name of observable
virtual Bool_t changeObservableName(const char* from, const char* to) = 0 ; virtual Bool_t changeObservableName(const char* from, const char* to) ;
// Add one ore more rows of data // Add one ore more rows of data
virtual void add(const RooArgSet& row, Double_t weight=1, Double_t weight virtual void add(const RooArgSet& row, Double_t weight=1, Double_t weight
Error=0) = 0 ; Error=0) = 0 ; // DERIVED
virtual void fill() = 0 ; virtual void fill() ;
// Load a given row of data // Load a given row of data
virtual inline const RooArgSet* get() const { virtual inline const RooArgSet* get() const {
// Return current row of dataset // Return current row of dataset
return &_vars ; return &_vars ;
} }
virtual Double_t weight() const = 0 ; virtual Double_t weight() const = 0 ; // DERIVED
virtual Bool_t valid() const = 0 ; virtual Bool_t valid() const { return kTRUE ; }
enum ErrorType { Poisson, SumW2, None, Auto } ; enum ErrorType { Poisson, SumW2, None, Auto } ;
virtual Double_t weightError(ErrorType etype=Poisson) const ; virtual Double_t weightError(ErrorType etype=Poisson) const ;
virtual void weightError(Double_t& lo, Double_t& hi, ErrorType etype=Pois son) const ; virtual void weightError(Double_t& lo, Double_t& hi, ErrorType etype=Pois son) const ;
virtual const RooArgSet* get(Int_t index) const = 0 ; virtual const RooArgSet* get(Int_t index) const ;
virtual Int_t numEntries() const = 0 ; virtual Int_t numEntries() const ;
virtual Double_t sumEntries(const char* cutSpec=0, const char* cutRange=0 virtual Double_t sumEntries(const char* cutSpec=0, const char* cutRange=0
) const = 0 ; ) const = 0 ; // DERIVED
virtual Bool_t isWeighted() const { virtual Bool_t isWeighted() const {
// Do events in dataset have weights? // Do events in dataset have weights?
return kFALSE ; return kFALSE ;
} }
virtual Bool_t isNonPoissonWeighted() const { virtual Bool_t isNonPoissonWeighted() const {
// Do events in dataset have non-integer weights? // Do events in dataset have non-integer weights?
return kFALSE ; return kFALSE ;
} }
virtual void reset() = 0 ; virtual void reset() ;
virtual Bool_t getRange(RooRealVar& var, Double_t& lowest, Double_t& high est, Double_t marginFrac=0, Bool_t symMode=kFALSE) const = 0 ; Bool_t getRange(RooRealVar& var, Double_t& lowest, Double_t& highest, Dou ble_t marginFrac=0, Bool_t symMode=kFALSE) const ;
// Plot the distribution of a real valued arg // Plot the distribution of a real valued arg
virtual Roo1DTable* table(const RooArgSet& catSet, const char* cuts="", c onst char* opts="") const ; virtual Roo1DTable* table(const RooArgSet& catSet, const char* cuts="", c onst char* opts="") const ;
virtual Roo1DTable* table(const RooAbsCategory& cat, const char* cuts="", const char* opts="") const = 0; virtual Roo1DTable* table(const RooAbsCategory& cat, const char* cuts="", const char* opts="") const ;
virtual RooPlot* plotOn(RooPlot* frame, virtual RooPlot* plotOn(RooPlot* frame,
const RooCmdArg& arg1=RooCmdArg::none(), const Roo CmdArg& arg2=RooCmdArg::none(), const RooCmdArg& arg1=RooCmdArg::none(), const Roo CmdArg& arg2=RooCmdArg::none(),
const RooCmdArg& arg3=RooCmdArg::none(), const Roo CmdArg& arg4=RooCmdArg::none(), const RooCmdArg& arg3=RooCmdArg::none(), const Roo CmdArg& arg4=RooCmdArg::none(),
const RooCmdArg& arg5=RooCmdArg::none(), const Roo CmdArg& arg6=RooCmdArg::none(), const RooCmdArg& arg5=RooCmdArg::none(), const Roo CmdArg& arg6=RooCmdArg::none(),
const RooCmdArg& arg7=RooCmdArg::none(), const Roo CmdArg& arg8=RooCmdArg::none()) const ; const RooCmdArg& arg7=RooCmdArg::none(), const Roo CmdArg& arg8=RooCmdArg::none()) const ;
virtual RooPlot* plotOn(RooPlot* frame, const RooLinkedList& cmdList) con
st = 0 ; virtual RooPlot* plotOn(RooPlot* frame, const RooLinkedList& cmdList) con
st ;
// WVE --- This needs to be public to avoid CINT problems
struct PlotOpt {
PlotOpt() : cuts(""), drawOptions("P"), bins(0), etype(RooAbsData::Poiss
on), cutRange(0), histName(0), histInvisible(kFALSE),
addToHistName(0),addToWgtSelf(1.),addToWgtOther(1.),xErrorSiz
e(1),refreshFrameNorm(kFALSE),correctForBinWidth(kTRUE),
scaleFactor(1.) {} ;
const char* cuts ;
Option_t* drawOptions ;
RooAbsBinning* bins ;
RooAbsData::ErrorType etype ;
const char* cutRange ;
const char* histName ;
Bool_t histInvisible ;
const char* addToHistName ;
Double_t addToWgtSelf ;
Double_t addToWgtOther ;
Double_t xErrorSize ;
Bool_t refreshFrameNorm ;
Bool_t correctForBinWidth ;
Double_t scaleFactor ;
} ;
// Split a dataset by a category // Split a dataset by a category
virtual TList* split(const RooAbsCategory& splitCat) const = 0 ; virtual TList* split(const RooAbsCategory& splitCat) const ;
// Create 1,2, and 3D histograms from and fill it // Create 1,2, and 3D histograms from and fill it
TH1 *createHistogram(const char *name, const RooAbsRealLValue& xvar, TH1 *createHistogram(const char *name, const RooAbsRealLValue& xvar,
const RooCmdArg& arg1=RooCmdArg::none(), const RooCm dArg& arg2=RooCmdArg::none(), const RooCmdArg& arg1=RooCmdArg::none(), const RooCm dArg& arg2=RooCmdArg::none(),
const RooCmdArg& arg3=RooCmdArg::none(), const RooCm dArg& arg4=RooCmdArg::none(), const RooCmdArg& arg3=RooCmdArg::none(), const RooCm dArg& arg4=RooCmdArg::none(),
const RooCmdArg& arg5=RooCmdArg::none(), const RooCm dArg& arg6=RooCmdArg::none(), const RooCmdArg& arg5=RooCmdArg::none(), const RooCm dArg& arg6=RooCmdArg::none(),
const RooCmdArg& arg7=RooCmdArg::none(), const RooCm dArg& arg8=RooCmdArg::none()) const ; const RooCmdArg& arg7=RooCmdArg::none(), const RooCm dArg& arg8=RooCmdArg::none()) const ;
TH1* createHistogram(const char *name, const RooAbsRealLValue& xvar, cons t RooLinkedList& argList) const ; TH1* createHistogram(const char *name, const RooAbsRealLValue& xvar, cons t RooLinkedList& argList) const ;
TH1 *createHistogram(const char* varNameList, Int_t xbins=0, Int_t ybins= 0, Int_t zbins=0) const ; TH1 *createHistogram(const char* varNameList, Int_t xbins=0, Int_t ybins= 0, Int_t zbins=0) const ;
// Fill an existing histogram // Fill an existing histogram
virtual TH1 *fillHistogram(TH1 *hist, const RooArgList &plotVars, const c har *cuts= "", const char* cutRange=0) const = 0; virtual TH1 *fillHistogram(TH1 *hist, const RooArgList &plotVars, const c har *cuts= "", const char* cutRange=0) const;
// Printing interface (human readable) // Printing interface (human readable)
inline virtual void Print(Option_t *options= 0) const { inline virtual void Print(Option_t *options= 0) const {
// Print contents on stdout // Print contents on stdout
printStream(defaultPrintStream(),defaultPrintContents(options),defaultP rintStyle(options)); printStream(defaultPrintStream(),defaultPrintContents(options),defaultP rintStyle(options));
} }
virtual void printName(ostream& os) const ; virtual void printName(ostream& os) const ;
virtual void printTitle(ostream& os) const ; virtual void printTitle(ostream& os) const ;
virtual void printClassName(ostream& os) const ; virtual void printClassName(ostream& os) const ;
void printMultiline(ostream& os, Int_t contents, Bool_t verbose=kFALSE, T String indent="") const ;
virtual Int_t defaultPrintContents(Option_t* opt) const ; virtual Int_t defaultPrintContents(Option_t* opt) const ;
void setDirtyProp(Bool_t flag) { void setDirtyProp(Bool_t flag) ;
// Control propagation of dirty flags from observables in dataset
_doDirtyProp = flag ; Double_t moment(RooRealVar &var, Double_t order, const char* cutSpec=0, c
} onst char* cutRange=0) const ;
Double_t moment(RooRealVar &var, Double_t order, Double_t offset, const c
har* cutSpec=0, const char* cutRange=0) const ;
Double_t standMoment(RooRealVar &var, Double_t order, const char* cutSpec
=0, const char* cutRange=0) const ;
Double_t mean(RooRealVar& var, const char* cutSpec=0, const char* cutRang
e=0) const { return moment(var,1,0,cutSpec,cutRange) ; }
Double_t sigma(RooRealVar& var, const char* cutSpec=0, const char* cutRan
ge=0) const { return moment(var,2,cutSpec,cutRange) ; }
Double_t skewness(RooRealVar& var, const char* cutSpec=0, const char* cut
Range=0) const { return standMoment(var,3,cutSpec,cutRange) ; }
Double_t kurtosis(RooRealVar& var, const char* cutSpec=0, const char* cut
Range=0) const { return standMoment(var,4,cutSpec,cutRange) ; }
RooRealVar* meanVar(RooRealVar &var, const char* cutSpec=0, const char* c
utRange=0) const ;
RooRealVar* rmsVar(RooRealVar &var, const char* cutSpec=0, const char* cu
tRange=0) const ;
virtual RooPlot* statOn(RooPlot* frame,
const RooCmdArg& arg1=RooCmdArg::none(), const Ro
oCmdArg& arg2=RooCmdArg::none(),
const RooCmdArg& arg3=RooCmdArg::none(), const Ro
oCmdArg& arg4=RooCmdArg::none(),
const RooCmdArg& arg5=RooCmdArg::none(), const Ro
oCmdArg& arg6=RooCmdArg::none(),
const RooCmdArg& arg7=RooCmdArg::none(), const Ro
oCmdArg& arg8=RooCmdArg::none()) ;
virtual RooPlot* statOn(RooPlot* frame, const char *what,
const char *label= "", Int_t sigDigits= 2,
Option_t *options= "NELU", Double_t xmin=0.15,
Double_t xmax= 0.65,Double_t ymax=0.85,
const char* cutSpec=0, const char* cutRange=0,
const RooCmdArg* formatCmd=0);
protected: protected:
virtual void optimizeReadingWithCaching(RooAbsArg& arg, const RooArgSet& virtual void optimizeReadingWithCaching(RooAbsArg& arg, const RooArgSet&
cacheList, const RooArgSet& keepObsList) =0 ; cacheList, const RooArgSet& keepObsList) ;
Bool_t allClientsCached(RooAbsArg*, const RooArgSet&) ;
// PlotOn implementation
virtual RooPlot *plotOn(RooPlot *frame, PlotOpt o) const ;
virtual RooPlot *plotAsymOn(RooPlot* frame, const RooAbsCategoryLValue& a
symCat, PlotOpt o) const ;
virtual RooPlot *plotEffOn(RooPlot* frame, const RooAbsCategoryLValue& ef
fCat, PlotOpt o) const ;
// Constant term optimizer interface // Constant term optimizer interface
friend class RooAbsArg ; friend class RooAbsArg ;
friend class RooAbsReal ; friend class RooAbsReal ;
friend class RooAbsOptTestStatistic ; friend class RooAbsOptTestStatistic ;
friend class RooAbsCachedPdf ; friend class RooAbsCachedPdf ;
virtual RooAbsData* cacheClone(const RooArgSet* newCacheVars, const char* virtual void cacheArgs(RooArgSet& varSet, const RooArgSet* nset=0) ;
newName=0) = 0 ; virtual void resetCache() ;
virtual void cacheArgs(RooArgSet& varSet, const RooArgSet* nset=0) = 0 ; virtual void setArgStatus(const RooArgSet& set, Bool_t active) ;
virtual void resetCache() = 0 ; virtual void initCache(const RooArgSet& cachedVars) ;
virtual void setArgStatus(const RooArgSet& set, Bool_t active) = 0 ;
virtual RooAbsData* cacheClone(const RooArgSet* newCacheVars, const char* newName=0) = 0 ; // DERIVED
virtual RooAbsData* reduceEng(const RooArgSet& varSubset, const RooFormul aVar* cutVar, const char* cutRange=0, virtual RooAbsData* reduceEng(const RooArgSet& varSubset, const RooFormul aVar* cutVar, const char* cutRange=0,
Int_t nStart=0, Int_t nStop=2000000000, Bool _t copyCache=kTRUE) = 0 ; Int_t nStart=0, Int_t nStop=2000000000, Bool _t copyCache=kTRUE) = 0 ; // DERIVED
// Column structure definition // Column structure definition
RooArgSet _vars; // Dimensions of this data set RooArgSet _vars; // Dimensions of this data set
RooArgSet _cachedVars ; //! External variables cached with this data set RooArgSet _cachedVars ; //! External variables cached with this data set
TIterator *_iterator; //! Iterator over dimension variables TIterator *_iterator; //! Iterator over dimension variables
TIterator *_cacheIter ; //! Iterator over cached variables TIterator *_cacheIter ; //! Iterator over cached variables
Bool_t _doDirtyProp ; // Switch do (de)activate dirty state propagatio
n when loading a data point RooAbsDataStore* _dstore ; // Data storage implementation
private: private:
ClassDef(RooAbsData,1) // Abstract data collection ClassDef(RooAbsData,2) // Abstract data collection
}; };
#endif #endif
 End of changes. 22 change blocks. 
33 lines changed or deleted 108 lines changed or added


 RooAbsMCStudyModule.h   RooAbsMCStudyModule.h 
skipping to change at line 85 skipping to change at line 85
protected: protected:
// Interface methods to RooMCStudy objects, // Interface methods to RooMCStudy objects,
// which are only functional after module has been attached to a RooMCSt udy object // which are only functional after module has been attached to a RooMCSt udy object
RooFitResult* refit(RooAbsData* inGenSample=0) { RooFitResult* refit(RooAbsData* inGenSample=0) {
// Refit model using orignal or specified data sample // Refit model using orignal or specified data sample
if (_mcs) return _mcs->refit(inGenSample) ; else return 0 ; if (_mcs) return _mcs->refit(inGenSample) ; else return 0 ;
} }
RooDataSet* genSample() { RooAbsData* genSample() {
// Return generate sample // Return generate sample
return _mcs ? _mcs->_genSample : 0 ; return _mcs ? _mcs->_genSample : 0 ;
} }
RooAbsPdf* genModel() { RooAbsPdf* genModel() {
// Return generator pdf // Return generator pdf
return _mcs ? _mcs->_genModel : 0 ; return _mcs ? _mcs->_genModel : 0 ;
} }
// Accessor for generator context, generator parameters, prototype da ta and projected dependents // Accessor for generator context, generator parameters, prototype da ta and projected dependents
RooAbsGenContext* genContext() { RooAbsGenContext* genContext() {
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 RooAbsOptTestStatistic.h   RooAbsOptTestStatistic.h 
skipping to change at line 22 skipping to change at line 22
* Redistribution and use in source and binary forms, * * Redistribution and use in source and binary forms, *
* with or without modification, are permitted according to the terms * * with or without modification, are permitted according to the terms *
* listed in LICENSE (http://roofit.sourceforge.net/license.txt) * * listed in LICENSE (http://roofit.sourceforge.net/license.txt) *
************************************************************************** ***/ ************************************************************************** ***/
#ifndef ROO_ABS_OPT_TEST_STATISTIC #ifndef ROO_ABS_OPT_TEST_STATISTIC
#define ROO_ABS_OPT_TEST_STATISTIC #define ROO_ABS_OPT_TEST_STATISTIC
#include "Riosfwd.h" #include "Riosfwd.h"
#include "RooAbsTestStatistic.h" #include "RooAbsTestStatistic.h"
#include "RooSetProxy.h" #include "RooSetProxy.h"
#include "RooCategoryProxy.h"
class RooArgSet ; class RooArgSet ;
class RooAbsData ; class RooAbsData ;
class RooAbsReal ; class RooAbsReal ;
class RooAbsOptTestStatistic : public RooAbsTestStatistic { class RooAbsOptTestStatistic : public RooAbsTestStatistic {
public: public:
// Constructors, assignment etc // Constructors, assignment etc
RooAbsOptTestStatistic() ; RooAbsOptTestStatistic() ;
 End of changes. 1 change blocks. 
0 lines changed or deleted 1 lines changed or added


 RooAbsPdf.h   RooAbsPdf.h 
skipping to change at line 26 skipping to change at line 26
#ifndef ROO_ABS_PDF #ifndef ROO_ABS_PDF
#define ROO_ABS_PDF #define ROO_ABS_PDF
#include "RooAbsReal.h" #include "RooAbsReal.h"
#include "RooRealIntegral.h" #include "RooRealIntegral.h"
#include "RooNameSet.h" #include "RooNameSet.h"
#include "RooObjCacheManager.h" #include "RooObjCacheManager.h"
#include "RooCmdArg.h" #include "RooCmdArg.h"
class RooDataSet; class RooDataSet;
class RooDataHist ;
class RooArgSet ; class RooArgSet ;
class RooRealProxy ; class RooRealProxy ;
class RooAbsGenContext ; class RooAbsGenContext ;
class RooFitResult ; class RooFitResult ;
class RooExtendPdf ; class RooExtendPdf ;
class RooCategory ; class RooCategory ;
class TPaveText; class TPaveText;
class TH1F; class TH1F;
class TH2F; class TH2F;
class TList ; class TList ;
skipping to change at line 61 skipping to change at line 62
const RooCmdArg& arg2=RooCmdArg::none(), const RooCm dArg& arg3=RooCmdArg::none(), const RooCmdArg& arg2=RooCmdArg::none(), const RooCm dArg& arg3=RooCmdArg::none(),
const RooCmdArg& arg4=RooCmdArg::none(), const RooCm dArg& arg5=RooCmdArg::none()) ; const RooCmdArg& arg4=RooCmdArg::none(), const RooCm dArg& arg5=RooCmdArg::none()) ;
RooDataSet *generate(const RooArgSet &whatVars, RooDataSet *generate(const RooArgSet &whatVars,
const RooCmdArg& arg1=RooCmdArg::none(),const RooCmd Arg& arg2=RooCmdArg::none(), const RooCmdArg& arg1=RooCmdArg::none(),const RooCmd Arg& arg2=RooCmdArg::none(),
const RooCmdArg& arg3=RooCmdArg::none(),const RooCmd Arg& arg4=RooCmdArg::none(), const RooCmdArg& arg3=RooCmdArg::none(),const RooCmd Arg& arg4=RooCmdArg::none(),
const RooCmdArg& arg5=RooCmdArg::none(),const RooCmd Arg& arg6=RooCmdArg::none()) ; const RooCmdArg& arg5=RooCmdArg::none(),const RooCmd Arg& arg6=RooCmdArg::none()) ;
RooDataSet *generate(const RooArgSet &whatVars, Int_t nEvents = 0, Bool_t verbose=kFALSE) const; RooDataSet *generate(const RooArgSet &whatVars, Int_t nEvents = 0, Bool_t verbose=kFALSE) const;
RooDataSet *generate(const RooArgSet &whatVars, const RooDataSet &prototy pe, Int_t nEvents= 0, RooDataSet *generate(const RooArgSet &whatVars, const RooDataSet &prototy pe, Int_t nEvents= 0,
Bool_t verbose=kFALSE, Bool_t randProtoOrder=kFALSE, Bool_t resampleProto=kFALSE) const; Bool_t verbose=kFALSE, Bool_t randProtoOrder=kFALSE, Bool_t resampleProto=kFALSE) const;
RooDataHist *generateBinned(const RooArgSet &whatVars, Int_t nEvents, con
st RooCmdArg& arg1,
const RooCmdArg& arg2=RooCmdArg::none(), const
RooCmdArg& arg3=RooCmdArg::none(),
const RooCmdArg& arg4=RooCmdArg::none(), const
RooCmdArg& arg5=RooCmdArg::none()) ;
RooDataHist *generateBinned(const RooArgSet &whatVars,
const RooCmdArg& arg1=RooCmdArg::none(),const
RooCmdArg& arg2=RooCmdArg::none(),
const RooCmdArg& arg3=RooCmdArg::none(),const
RooCmdArg& arg4=RooCmdArg::none(),
const RooCmdArg& arg5=RooCmdArg::none(),const
RooCmdArg& arg6=RooCmdArg::none()) ;
RooDataHist *generateBinned(const RooArgSet &whatVars, Int_t nEvents, Boo
l_t expectedData=kFALSE, Bool_t extended=kFALSE) const;
virtual RooPlot* plotOn(RooPlot* frame, virtual RooPlot* plotOn(RooPlot* frame,
const RooCmdArg& arg1=RooCmdArg::none(), const Roo CmdArg& arg2=RooCmdArg::none(), const RooCmdArg& arg1=RooCmdArg::none(), const Roo CmdArg& arg2=RooCmdArg::none(),
const RooCmdArg& arg3=RooCmdArg::none(), const Roo CmdArg& arg4=RooCmdArg::none(), const RooCmdArg& arg3=RooCmdArg::none(), const Roo CmdArg& arg4=RooCmdArg::none(),
const RooCmdArg& arg5=RooCmdArg::none(), const Roo CmdArg& arg6=RooCmdArg::none(), const RooCmdArg& arg5=RooCmdArg::none(), const Roo CmdArg& arg6=RooCmdArg::none(),
const RooCmdArg& arg7=RooCmdArg::none(), const Roo CmdArg& arg8=RooCmdArg::none(), const RooCmdArg& arg7=RooCmdArg::none(), const Roo CmdArg& arg8=RooCmdArg::none(),
const RooCmdArg& arg9=RooCmdArg::none(), const Roo CmdArg& arg10=RooCmdArg::none() const RooCmdArg& arg9=RooCmdArg::none(), const Roo CmdArg& arg10=RooCmdArg::none()
) const { ) const {
return RooAbsReal::plotOn(frame,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8 ,arg9,arg10) ; return RooAbsReal::plotOn(frame,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8 ,arg9,arg10) ;
} }
 End of changes. 2 change blocks. 
0 lines changed or deleted 17 lines changed or added


 RooAbsReal.h   RooAbsReal.h 
skipping to change at line 24 skipping to change at line 24
* listed in LICENSE (http://roofit.sourceforge.net/license.txt) * * listed in LICENSE (http://roofit.sourceforge.net/license.txt) *
************************************************************************** ***/ ************************************************************************** ***/
#ifndef ROO_ABS_REAL #ifndef ROO_ABS_REAL
#define ROO_ABS_REAL #define ROO_ABS_REAL
#include "RooAbsArg.h" #include "RooAbsArg.h"
#include "RooCmdArg.h" #include "RooCmdArg.h"
#include "RooCurve.h" #include "RooCurve.h"
#include "RooArgSet.h" #include "RooArgSet.h"
#include "RooArgList.h" #include "RooArgList.h"
#include "RooGlobalFunc.h"
class RooArgList ; class RooArgList ;
class RooDataSet ; class RooDataSet ;
class RooPlot; class RooPlot;
class RooRealVar; class RooRealVar;
class RooAbsFunc; class RooAbsFunc;
class RooAbsCategoryLValue ; class RooAbsCategoryLValue ;
class RooCategory ; class RooCategory ;
class RooLinkedList ; class RooLinkedList ;
class RooNumIntConfig ; class RooNumIntConfig ;
skipping to change at line 184 skipping to change at line 185
RooNumIntConfig* specialIntegratorConfig(Bool_t createOnTheFly) ; RooNumIntConfig* specialIntegratorConfig(Bool_t createOnTheFly) ;
void setIntegratorConfig() ; void setIntegratorConfig() ;
void setIntegratorConfig(const RooNumIntConfig& config) ; void setIntegratorConfig(const RooNumIntConfig& config) ;
virtual void fixAddCoefNormalization(const RooArgSet& addNormSet=RooArgSe t(),Bool_t force=kTRUE) ; virtual void fixAddCoefNormalization(const RooArgSet& addNormSet=RooArgSe t(),Bool_t force=kTRUE) ;
virtual void fixAddCoefRange(const char* rangeName=0,Bool_t force=kTRUE) ; virtual void fixAddCoefRange(const char* rangeName=0,Bool_t force=kTRUE) ;
virtual void preferredObservableScanOrder(const RooArgSet& obs, RooArgSet & orderedObs) const ; virtual void preferredObservableScanOrder(const RooArgSet& obs, RooArgSet & orderedObs) const ;
// User entry point for plotting // User entry point for plotting
enum ScaleType { Raw, Relative, NumEvent, RelativeExpected } ;
virtual RooPlot* plotOn(RooPlot* frame, virtual RooPlot* plotOn(RooPlot* frame,
const RooCmdArg& arg1=RooCmdArg(), const RooCmdArg & arg2=RooCmdArg(), const RooCmdArg& arg1=RooCmdArg(), const RooCmdArg & arg2=RooCmdArg(),
const RooCmdArg& arg3=RooCmdArg(), const RooCmdArg & arg4=RooCmdArg(), const RooCmdArg& arg3=RooCmdArg(), const RooCmdArg & arg4=RooCmdArg(),
const RooCmdArg& arg5=RooCmdArg(), const RooCmdArg & arg6=RooCmdArg(), const RooCmdArg& arg5=RooCmdArg(), const RooCmdArg & arg6=RooCmdArg(),
const RooCmdArg& arg7=RooCmdArg(), const RooCmdArg & arg8=RooCmdArg(), const RooCmdArg& arg7=RooCmdArg(), const RooCmdArg & arg8=RooCmdArg(),
const RooCmdArg& arg9=RooCmdArg(), const RooCmdArg & arg10=RooCmdArg() const RooCmdArg& arg9=RooCmdArg(), const RooCmdArg & arg10=RooCmdArg()
) const ; ) const ;
enum ScaleType { Raw, Relative, NumEvent, RelativeExpected } ;
// Forwarder function for backward compatibility // Forwarder function for backward compatibility
virtual RooPlot *plotSliceOn(RooPlot *frame, const RooArgSet& sliceSet, O ption_t* drawOptions="L", virtual RooPlot *plotSliceOn(RooPlot *frame, const RooArgSet& sliceSet, O ption_t* drawOptions="L",
Double_t scaleFactor=1.0, ScaleType stype=Rel ative, const RooAbsData* projData=0) const; Double_t scaleFactor=1.0, ScaleType stype=Rel ative, const RooAbsData* projData=0) const;
// Fill an existing histogram // Fill an existing histogram
TH1 *fillHistogram(TH1 *hist, const RooArgList &plotVars, TH1 *fillHistogram(TH1 *hist, const RooArgList &plotVars,
Double_t scaleFactor= 1, const RooArgSet *projectedVars Double_t scaleFactor= 1, const RooArgSet *projectedVars
= 0, Bool_t scaling=kTRUE) const; = 0, Bool_t scaling=kTRUE,
const RooArgSet* condObs=0) const;
// Create 1,2, and 3D histograms from and fill it // Create 1,2, and 3D histograms from and fill it
TH1 *createHistogram(const char* varNameList, Int_t xbins=0, Int_t ybins= 0, Int_t zbins=0) const ; TH1 *createHistogram(const char* varNameList, Int_t xbins=0, Int_t ybins= 0, Int_t zbins=0) const ;
TH1* createHistogram(const char *name, const RooAbsRealLValue& xvar, RooL inkedList& argList) const ; TH1* createHistogram(const char *name, const RooAbsRealLValue& xvar, RooL inkedList& argList) const ;
TH1 *createHistogram(const char *name, const RooAbsRealLValue& xvar, TH1 *createHistogram(const char *name, const RooAbsRealLValue& xvar,
const RooCmdArg& arg1=RooCmdArg::none(), const RooCm dArg& arg2=RooCmdArg::none(), const RooCmdArg& arg1=RooCmdArg::none(), const RooCm dArg& arg2=RooCmdArg::none(),
const RooCmdArg& arg3=RooCmdArg::none(), const RooCm dArg& arg4=RooCmdArg::none(), const RooCmdArg& arg3=RooCmdArg::none(), const RooCm dArg& arg4=RooCmdArg::none(),
const RooCmdArg& arg5=RooCmdArg::none(), const RooCm dArg& arg6=RooCmdArg::none(), const RooCmdArg& arg5=RooCmdArg::none(), const RooCm dArg& arg6=RooCmdArg::none(),
const RooCmdArg& arg7=RooCmdArg::none(), const RooCm dArg& arg8=RooCmdArg::none()) const ; const RooCmdArg& arg7=RooCmdArg::none(), const RooCm dArg& arg8=RooCmdArg::none()) const ;
skipping to change at line 237 skipping to change at line 240
EvalError() { _msg[0] = 0 ; _srvval[0] = 0 ; } EvalError() { _msg[0] = 0 ; _srvval[0] = 0 ; }
EvalError(const EvalError& other) { strcpy(_msg,other._msg) ; strcpy(_s rvval,other._srvval) ; } ; EvalError(const EvalError& other) { strcpy(_msg,other._msg) ; strcpy(_s rvval,other._srvval) ; } ;
void setMessage(const char* tmp) { strcpy(_msg,tmp) ; } void setMessage(const char* tmp) { strcpy(_msg,tmp) ; }
void setServerValues(const char* tmp) { strcpy(_srvval,tmp) ; } void setServerValues(const char* tmp) { strcpy(_srvval,tmp) ; }
char _msg[1024] ; char _msg[1024] ;
char _srvval[1024] ; char _srvval[1024] ;
} ; } ;
static Bool_t evalErrorLoggingEnabled() { return _doLogEvalError ; } static Bool_t evalErrorLoggingEnabled() { return _doLogEvalError ; }
static void enableEvalErrorLogging(Bool_t flag) { _doLogEvalError = flag ; } static void enableEvalErrorLogging(Bool_t flag) { _doLogEvalError = flag ; }
void logEvalError(const char* message, const char* serverValueString=0) c onst ; void logEvalError(const char* message, const char* serverValueString=0) c onst ;
static void logEvalError(const RooAbsReal* originator, const char* origNa me, const char* message, const char* serverValueString=0) ;
static void printEvalErrors(ostream&os=std::cout, Int_t maxPerNode=100000 00) ; static void printEvalErrors(ostream&os=std::cout, Int_t maxPerNode=100000 00) ;
static Int_t numEvalErrors() ; static Int_t numEvalErrors() ;
static Int_t numEvalErrorItems() { return _evalErrorList.size() ; } static Int_t numEvalErrorItems() { return _evalErrorList.size() ; }
typedef std::map<const RooAbsArg*,std::pair<std::string,std::list<EvalErr or> > >::const_iterator EvalErrorIter ; typedef std::map<const RooAbsArg*,std::pair<std::string,std::list<EvalErr or> > >::const_iterator EvalErrorIter ;
static EvalErrorIter evalErrorIter() { return _evalErrorList.begin() ; } static EvalErrorIter evalErrorIter() { return _evalErrorList.begin() ; }
static void clearEvalErrorLog() ; static void clearEvalErrorLog() ;
virtual std::list<Double_t>* plotSamplingHint(RooAbsRealLValue& /*obs*/, Double_t /*xlo*/, Double_t /*xhi*/) const { virtual std::list<Double_t>* plotSamplingHint(RooAbsRealLValue& /*obs*/, Double_t /*xlo*/, Double_t /*xhi*/) const {
skipping to change at line 282 skipping to change at line 286
RooArgSet& projectedVars, Bool_t silent) const ; RooArgSet& projectedVars, Bool_t silent) const ;
TString integralNameSuffix(const RooArgSet& iset, const RooArgSet* nset=0 , const char* rangeName=0, Bool_t omitEmpty=kFALSE) const ; TString integralNameSuffix(const RooArgSet& iset, const RooArgSet* nset=0 , const char* rangeName=0, Bool_t omitEmpty=kFALSE) const ;
Bool_t isSelectedComp() const ; Bool_t isSelectedComp() const ;
public: public:
const RooAbsReal* createPlotProjection(const RooArgSet& depVars, const Ro oArgSet& projVars) const ; const RooAbsReal* createPlotProjection(const RooArgSet& depVars, const Ro oArgSet& projVars) const ;
const RooAbsReal* createPlotProjection(const RooArgSet& depVars, const Ro oArgSet& projVars, RooArgSet*& cloneSet) const ; const RooAbsReal* createPlotProjection(const RooArgSet& depVars, const Ro oArgSet& projVars, RooArgSet*& cloneSet) const ;
const RooAbsReal *createPlotProjection(const RooArgSet &dependentVars, co nst RooArgSet *projectedVars, const RooAbsReal *createPlotProjection(const RooArgSet &dependentVars, co nst RooArgSet *projectedVars,
RooArgSet *&cloneSet, const char* r angeName=0) const; RooArgSet *&cloneSet, const char* r angeName=0, const RooArgSet* condObs=0) const;
protected: protected:
RooFitResult* chi2FitDriver(RooAbsReal& fcn, RooLinkedList& cmdList) ; RooFitResult* chi2FitDriver(RooAbsReal& fcn, RooLinkedList& cmdList) ;
RooPlot* plotOnWithErrorBand(RooPlot* frame,const RooFitResult& fr, Doubl
e_t Z, const RooArgSet* params, const RooLinkedList& argList, Bool_t method
1) const ;
// Support interface for subclasses to advertise their analytic integrati on // Support interface for subclasses to advertise their analytic integrati on
// and generator capabilities in their analticalIntegral() and generateEv ent() // and generator capabilities in their analticalIntegral() and generateEv ent()
// implementations. // implementations.
Bool_t matchArgs(const RooArgSet& allDeps, RooArgSet& numDeps, Bool_t matchArgs(const RooArgSet& allDeps, RooArgSet& numDeps,
const RooArgProxy& a) const ; const RooArgProxy& a) const ;
Bool_t matchArgs(const RooArgSet& allDeps, RooArgSet& numDeps, Bool_t matchArgs(const RooArgSet& allDeps, RooArgSet& numDeps,
const RooArgProxy& a, const RooArgProxy& b) const ; const RooArgProxy& a, const RooArgProxy& b) const ;
Bool_t matchArgs(const RooArgSet& allDeps, RooArgSet& numDeps, Bool_t matchArgs(const RooArgSet& allDeps, RooArgSet& numDeps,
const RooArgProxy& a, const RooArgProxy& b, const RooArgP roxy& c) const ; const RooArgProxy& a, const RooArgProxy& b, const RooArgP roxy& c) const ;
Bool_t matchArgs(const RooArgSet& allDeps, RooArgSet& numDeps, Bool_t matchArgs(const RooArgSet& allDeps, RooArgSet& numDeps,
 End of changes. 7 change blocks. 
4 lines changed or deleted 12 lines changed or added


 RooAbsString.h   RooAbsString.h 
skipping to change at line 52 skipping to change at line 52
// Printing interface (human readable) // Printing interface (human readable)
virtual void printValue(ostream& os) const ; virtual void printValue(ostream& os) const ;
RooAbsArg *createFundamental(const char* newname=0) const; RooAbsArg *createFundamental(const char* newname=0) const;
protected: protected:
// Function evaluation and error tracing // Function evaluation and error tracing
const char* traceEval() const ; const char* traceEval() const ;
virtual Bool_t traceEvalHook(const char* value) const ; virtual Bool_t traceEvalHook(const char* value) const ;
virtual TString evaluate() const { return 0 ; } virtual TString evaluate() const { return "" ; }
// Internal consistency checking (needed by RooDataSet) // Internal consistency checking (needed by RooDataSet)
virtual Bool_t isValid() const ; virtual Bool_t isValid() const ;
virtual Bool_t isValidString(const char*, Bool_t printError=kFALSE) const ; virtual Bool_t isValidString(const char*, Bool_t printError=kFALSE) const ;
virtual void syncCache(const RooArgSet* nset=0) ; virtual void syncCache(const RooArgSet* nset=0) ;
void copyCache(const RooAbsArg* source, Bool_t valueOnly=kFALSE) ; void copyCache(const RooAbsArg* source, Bool_t valueOnly=kFALSE) ;
virtual void attachToTree(TTree& t, Int_t bufSize=32000) ; virtual void attachToTree(TTree& t, Int_t bufSize=32000) ;
virtual void fillTreeBranch(TTree& t) ; virtual void fillTreeBranch(TTree& t) ;
virtual void setTreeBranchStatus(TTree& t, Bool_t active) ; virtual void setTreeBranchStatus(TTree& t, Bool_t active) ;
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 RooAddition.h   RooAddition.h 
skipping to change at line 40 skipping to change at line 40
RooAddition(const char *name, const char *title, const RooArgList& sumSet 1, const RooArgList& sumSet2, Bool_t takeOwnerShip=kFALSE) ; RooAddition(const char *name, const char *title, const RooArgList& sumSet 1, const RooArgList& sumSet2, Bool_t takeOwnerShip=kFALSE) ;
virtual ~RooAddition() ; virtual ~RooAddition() ;
RooAddition(const RooAddition& other, const char* name = 0); RooAddition(const RooAddition& other, const char* name = 0);
virtual TObject* clone(const char* newname) const { return new RooAdditio n(*this, newname); } virtual TObject* clone(const char* newname) const { return new RooAdditio n(*this, newname); }
virtual Double_t defaultErrorLevel() const ; virtual Double_t defaultErrorLevel() const ;
void printMetaArgs(ostream& os) const ; void printMetaArgs(ostream& os) const ;
const RooArgList& list1() const { return _set1 ; }
const RooArgList& list2() const { return _set2 ; }
protected: protected:
RooArgList _ownedList ; // List of owned components RooArgList _ownedList ; // List of owned components
RooListProxy _set1 ; // First set of terms to be summed RooListProxy _set1 ; // First set of terms to be summed
RooListProxy _set2 ; // Second set of terms to be summed RooListProxy _set2 ; // Second set of terms to be summed
mutable TIterator* _setIter1 ; //! Iterator over set1 mutable TIterator* _setIter1 ; //! Iterator over set1
mutable TIterator* _setIter2 ; //! Iterator over set2 mutable TIterator* _setIter2 ; //! Iterator over set2
Double_t evaluate() const; Double_t evaluate() const;
 End of changes. 1 change blocks. 
0 lines changed or deleted 3 lines changed or added


 RooChi2Var.h   RooChi2Var.h 
skipping to change at line 43 skipping to change at line 43
RooChi2Var(const char *name, const char* title, RooAbsPdf& pdf, RooDataHi st& data, RooChi2Var(const char *name, const char* title, RooAbsPdf& pdf, RooDataHi st& data,
const RooCmdArg& arg1 , const RooCmdArg& arg2=Ro oCmdArg::none(),const RooCmdArg& arg3=RooCmdArg::none(), const RooCmdArg& arg1 , const RooCmdArg& arg2=Ro oCmdArg::none(),const RooCmdArg& arg3=RooCmdArg::none(),
const RooCmdArg& arg4=RooCmdArg::none(), const RooCmdArg& arg5= RooCmdArg::none(),const RooCmdArg& arg6=RooCmdArg::none(), const RooCmdArg& arg4=RooCmdArg::none(), const RooCmdArg& arg5= RooCmdArg::none(),const RooCmdArg& arg6=RooCmdArg::none(),
const RooCmdArg& arg7=RooCmdArg::none(), const RooCmdArg& arg8= RooCmdArg::none(),const RooCmdArg& arg9=RooCmdArg::none()) ; const RooCmdArg& arg7=RooCmdArg::none(), const RooCmdArg& arg8= RooCmdArg::none(),const RooCmdArg& arg9=RooCmdArg::none()) ;
enum FuncMode { Function, Pdf, ExtendedPdf } ; enum FuncMode { Function, Pdf, ExtendedPdf } ;
RooChi2Var(const char *name, const char *title, RooAbsPdf& pdf, RooDataHi st& data, RooChi2Var(const char *name, const char *title, RooAbsPdf& pdf, RooDataHi st& data,
Bool_t extended=kFALSE, const char* rangeName=0, const char* add CoefRangeName=0, Bool_t extended=kFALSE, const char* rangeName=0, const char* add CoefRangeName=0,
Int_t nCPU=1, Bool_t interleave=kFALSE, Bool_t verbose=kTRUE, B ool_t splitCutRange=kTRUE) ; Int_t nCPU=1, Bool_t interleave=kFALSE, Bool_t verbose=kTRUE, B ool_t splitCutRange=kTRUE, RooDataHist::ErrorType=RooDataHist::SumW2) ;
RooChi2Var(const char *name, const char *title, RooAbsReal& func, RooData Hist& data, RooChi2Var(const char *name, const char *title, RooAbsReal& func, RooData Hist& data,
const RooArgSet& projDeps, FuncMode funcMode, const char* range Name=0, const char* addCoefRangeName=0, const RooArgSet& projDeps, FuncMode funcMode, const char* range Name=0, const char* addCoefRangeName=0,
Int_t nCPU=1, Bool_t interleave=kFALSE, Bool_t verbose=kTRUE, B ool_t splitCutRange=kTRUE) ; Int_t nCPU=1, Bool_t interleave=kFALSE, Bool_t verbose=kTRUE, B ool_t splitCutRange=kTRUE, RooDataHist::ErrorType=RooDataHist::SumW2) ;
RooChi2Var(const RooChi2Var& other, const char* name=0); RooChi2Var(const RooChi2Var& other, const char* name=0);
virtual TObject* clone(const char* newname) const { return new RooChi2Var (*this,newname); } virtual TObject* clone(const char* newname) const { return new RooChi2Var (*this,newname); }
virtual RooAbsTestStatistic* create(const char *name, const char *title, RooAbsReal& pdf, RooAbsData& dhist, virtual RooAbsTestStatistic* create(const char *name, const char *title, RooAbsReal& pdf, RooAbsData& dhist,
const RooArgSet& projDeps, const char* rangeName=0, const char* addCoefRangeName=0, const RooArgSet& projDeps, const char* rangeName=0, const char* addCoefRangeName=0,
Int_t nCPU=1, Bool_t interleave=kFALSE ,Bool_t verbose=kTRUE, Bool_t splitCutRange=kTRUE) { Int_t nCPU=1, Bool_t interleave=kFALSE ,Bool_t verbose=kTRUE, Bool_t splitCutRange=kTRUE) {
// Virtual constructor // Virtual constructor
return new RooChi2Var(name,title,(RooAbsPdf&)pdf,(RooDataHist&)dhist,pr ojDeps,_funcMode,rangeName, return new RooChi2Var(name,title,(RooAbsPdf&)pdf,(RooDataHist&)dhist,pr ojDeps,_funcMode,rangeName,
addCoefRangeName,nCPU,interleave,verbose, splitCut Range) ; addCoefRangeName,nCPU,interleave,verbose, splitCut Range,_etype) ;
} }
virtual ~RooChi2Var(); virtual ~RooChi2Var();
virtual Double_t defaultErrorLevel() const { virtual Double_t defaultErrorLevel() const {
// The default error level for MINUIT error analysis for a chi^2 is 1.0 // The default error level for MINUIT error analysis for a chi^2 is 1.0
return 1.0 ; return 1.0 ;
} }
protected: protected:
 End of changes. 3 change blocks. 
3 lines changed or deleted 3 lines changed or added


 RooCurve.h   RooCurve.h 
skipping to change at line 22 skipping to change at line 22
* Redistribution and use in source and binary forms, * * Redistribution and use in source and binary forms, *
* with or without modification, are permitted according to the terms * * with or without modification, are permitted according to the terms *
* listed in LICENSE (http://roofit.sourceforge.net/license.txt) * * listed in LICENSE (http://roofit.sourceforge.net/license.txt) *
************************************************************************** ***/ ************************************************************************** ***/
#ifndef ROO_CURVE #ifndef ROO_CURVE
#define ROO_CURVE #define ROO_CURVE
#include "TGraph.h" #include "TGraph.h"
#include "RooPlotable.h" #include "RooPlotable.h"
#include <list> #include <list>
#include <vector>
#include "TMatrixDfwd.h"
class RooAbsReal; class RooAbsReal;
class RooRealVar; class RooRealVar;
class RooAbsFunc; class RooAbsFunc;
class RooArgSet; class RooArgSet;
class RooAbsRealLValue ; class RooAbsRealLValue ;
class RooHist ; class RooHist ;
class RooCurve : public TGraph, public RooPlotable { class RooCurve : public TGraph, public RooPlotable {
public: public:
skipping to change at line 67 skipping to change at line 69
printStream(defaultPrintStream(),defaultPrintContents(options),defaultP rintStyle(options)); printStream(defaultPrintStream(),defaultPrintContents(options),defaultP rintStyle(options));
} }
Double_t chiSquare(const RooHist& hist, int nFitParam) const ; Double_t chiSquare(const RooHist& hist, int nFitParam) const ;
Int_t findPoint(Double_t value, Double_t tolerance=1e-10) const ; Int_t findPoint(Double_t value, Double_t tolerance=1e-10) const ;
Double_t average(Double_t lo, Double_t hi) const ; Double_t average(Double_t lo, Double_t hi) const ;
Double_t interpolate(Double_t x, Double_t tolerance=1e-10) const ; Double_t interpolate(Double_t x, Double_t tolerance=1e-10) const ;
Bool_t isIdentical(const RooCurve& other, Double_t tol=1e-6) const ; Bool_t isIdentical(const RooCurve& other, Double_t tol=1e-6) const ;
RooCurve* makeErrorBand(const std::vector<RooCurve*>& variations, Double_
t Z=1) const ;
RooCurve* makeErrorBand(const std::vector<RooCurve*>& plusVar, const std:
:vector<RooCurve*>& minusVar, const TMatrixD& V, Double_t Z=1) const ;
protected: protected:
void calcBandInterval(const std::vector<RooCurve*>& variations,Int_t i,Do
uble_t Z,Double_t& lo, Double_t& hi, Bool_t approxGauss) const ;
void calcBandInterval(const std::vector<RooCurve*>& plusVar, const std::v
ector<RooCurve*>& minusVar, Int_t i, const TMatrixD& V,
Double_t Z,Double_t& lo, Double_t& hi) const ;
void initialize(); void initialize();
void addPoints(const RooAbsFunc &func, Double_t xlo, Double_t xhi, void addPoints(const RooAbsFunc &func, Double_t xlo, Double_t xhi,
Int_t minPoints, Double_t prec, Double_t resolution, WingMo de wmode, Int_t minPoints, Double_t prec, Double_t resolution, WingMo de wmode,
Int_t numee=0, Bool_t doEEVal=kFALSE, Double_t eeVal=0.,std ::list<Double_t>* samplingHint=0) ; Int_t numee=0, Bool_t doEEVal=kFALSE, Double_t eeVal=0.,std ::list<Double_t>* samplingHint=0) ;
void addRange(const RooAbsFunc& func, Double_t x1, Double_t x2, Double_t y1, void addRange(const RooAbsFunc& func, Double_t x1, Double_t x2, Double_t y1,
Double_t y2, Double_t minDy, Double_t minDx, Double_t y2, Double_t minDy, Double_t minDx,
Int_t numee=0, Bool_t doEEVal=kFALSE, Double_t eeVal=0.) ; Int_t numee=0, Bool_t doEEVal=kFALSE, Double_t eeVal=0.) ;
void shiftCurveToZero(Double_t prevYMax) ; void shiftCurveToZero(Double_t prevYMax) ;
 End of changes. 3 change blocks. 
0 lines changed or deleted 14 lines changed or added


 RooDataHist.h   RooDataHist.h 
skipping to change at line 19 skipping to change at line 19
* Copyright (c) 2000-2005, Regents of the University of California * * Copyright (c) 2000-2005, Regents of the University of California *
* and Stanford University. All rights reserved. * * and Stanford University. All rights reserved. *
* * * *
* Redistribution and use in source and binary forms, * * Redistribution and use in source and binary forms, *
* with or without modification, are permitted according to the terms * * with or without modification, are permitted according to the terms *
* listed in LICENSE (http://roofit.sourceforge.net/license.txt) * * listed in LICENSE (http://roofit.sourceforge.net/license.txt) *
************************************************************************** ***/ ************************************************************************** ***/
#ifndef ROO_DATA_HIST #ifndef ROO_DATA_HIST
#define ROO_DATA_HIST #define ROO_DATA_HIST
#include "RooTreeData.h" #include "RooAbsData.h"
#include "RooDirItem.h" #include "RooDirItem.h"
#include "RooArgSet.h" #include "RooArgSet.h"
#include "RooNameSet.h" #include "RooNameSet.h"
#include "RooCacheManager.h" #include "RooCacheManager.h"
#include <vector> #include <vector>
#include <list> #include <list>
#include <map> #include <map>
#include <string> #include <string>
class TObject ; class TObject ;
class RooAbsArg; class RooAbsArg;
class RooAbsReal ; class RooAbsReal ;
class RooAbsCategory ; class RooAbsCategory ;
class Roo1DTable ; class Roo1DTable ;
class RooPlot; class RooPlot;
class RooArgSet ; class RooArgSet ;
class RooLinkedList ; class RooLinkedList ;
class RooAbsLValue ; class RooAbsLValue ;
class RooDataHist : public RooTreeData, public RooDirItem { class RooDataHist : public RooAbsData, public RooDirItem {
public: public:
// Constructors, factory methods etc. // Constructors, factory methods etc.
RooDataHist() ; RooDataHist() ;
RooDataHist(const char *name, const char *title, const RooArgSet& vars, c onst char* binningName=0) ; RooDataHist(const char *name, const char *title, const RooArgSet& vars, c onst char* binningName=0) ;
RooDataHist(const char *name, const char *title, const RooArgSet& vars, c onst RooAbsData& data, Double_t initWgt=1.0) ; RooDataHist(const char *name, const char *title, const RooArgSet& vars, c onst RooAbsData& data, Double_t initWgt=1.0) ;
RooDataHist(const char *name, const char *title, const RooArgList& vars, const TH1* hist, Double_t initWgt=1.0) ; RooDataHist(const char *name, const char *title, const RooArgList& vars, const TH1* hist, Double_t initWgt=1.0) ;
RooDataHist(const char *name, const char *title, const RooArgList& vars, RooCategory& indexCat, std::map<std::string,TH1*> histMap, Double_t initWgt =1.0) ; RooDataHist(const char *name, const char *title, const RooArgList& vars, RooCategory& indexCat, std::map<std::string,TH1*> histMap, Double_t initWgt =1.0) ;
//RooDataHist(const char *name, const char *title, const RooArgList& vars , Double_t initWgt=1.0) ; //RooDataHist(const char *name, const char *title, const RooArgList& vars , Double_t initWgt=1.0) ;
RooDataHist(const char *name, const char *title, const RooArgList& vars, RooCmdArg arg1, RooCmdArg arg2=RooCmdArg(), RooCmdArg arg3=RooCmdArg(), RooDataHist(const char *name, const char *title, const RooArgList& vars, RooCmdArg arg1, RooCmdArg arg2=RooCmdArg(), RooCmdArg arg3=RooCmdArg(),
skipping to change at line 110 skipping to change at line 110
TIterator* sliceIterator(RooAbsArg& sliceArg, const RooArgSet& otherArgs) ; TIterator* sliceIterator(RooAbsArg& sliceArg, const RooArgSet& otherArgs) ;
virtual void weightError(Double_t& lo, Double_t& hi, ErrorType etype=Pois son) const ; virtual void weightError(Double_t& lo, Double_t& hi, ErrorType etype=Pois son) const ;
virtual Double_t weightError(ErrorType etype=Poisson) const { virtual Double_t weightError(ErrorType etype=Poisson) const {
// Return symmetric error on current bin calculated either from Poisson statistics or from SumOfWeights // Return symmetric error on current bin calculated either from Poisson statistics or from SumOfWeights
Double_t lo,hi ; Double_t lo,hi ;
weightError(lo,hi,etype) ; weightError(lo,hi,etype) ;
return (lo+hi)/2 ; return (lo+hi)/2 ;
} }
using RooTreeData::plotOn ; using RooAbsData::plotOn ;
virtual RooPlot *plotOn(RooPlot *frame, PlotOpt o) const; virtual RooPlot *plotOn(RooPlot *frame, PlotOpt o) const;
virtual void reset() ; virtual void reset() ;
void dump2() ; void dump2() ;
virtual void printMultiline(ostream& os, Int_t content, Bool_t verbose=kF ALSE, TString indent="") const ; virtual void printMultiline(ostream& os, Int_t content, Bool_t verbose=kF ALSE, TString indent="") const ;
virtual void printArgs(ostream& os) const ; virtual void printArgs(ostream& os) const ;
virtual void printValue(ostream& os) const ; virtual void printValue(ostream& os) const ;
void SetName(const char *name) ; void SetName(const char *name) ;
skipping to change at line 155 skipping to change at line 155
void calculatePartialBinVolume(const RooArgSet& dimSet) const ; void calculatePartialBinVolume(const RooArgSet& dimSet) const ;
void adjustBinning(const RooArgList& vars, TH1& href, Int_t* offset=0) ; void adjustBinning(const RooArgList& vars, TH1& href, Int_t* offset=0) ;
void importTH1(const RooArgList& vars, TH1& histo, Double_t initWgt) ; void importTH1(const RooArgList& vars, TH1& histo, Double_t initWgt) ;
void importTH1Set(const RooArgList& vars, RooCategory& indexCat, std::map <std::string,TH1*> hmap, Double_t initWgt) ; void importTH1Set(const RooArgList& vars, RooCategory& indexCat, std::map <std::string,TH1*> hmap, Double_t initWgt) ;
virtual RooAbsData* cacheClone(const RooArgSet* newCacheVars, const char* newName=0) ; virtual RooAbsData* cacheClone(const RooArgSet* newCacheVars, const char* newName=0) ;
Int_t _arrSize ; // Size of the weight array Int_t _arrSize ; // Size of the weight array
Int_t* _idxMult ; //! Multiplier jump table for index calculation Int_t* _idxMult ; //! Multiplier jump table for index calculation
Double_t* _wgt ; //[_arrSize] Weight array Double_t* _wgt ; //[_arrSize] Weight array
Double_t* _errLo ; //[_arrSize] Low-side error on weight array Double_t* _errLo ; //[_arrSize] Low-side error on weight array
Double_t* _errHi ; //[_arrSize] High-side error on weight array Double_t* _errHi ; //[_arrSize] High-side error on weight array
Double_t* _sumw2 ; //[_arrSize] Sum of weights^2 Double_t* _sumw2 ; //[_arrSize] Sum of weights^2
Double_t* _binv ; //[_arrSize] Bin volume array Double_t* _binv ; //[_arrSize] Bin volume array
RooArgSet _realVars ; // Real dimensions of the dataset RooArgSet _realVars ; // Real dimensions of the dataset
TIterator* _realIter ; //! Iterator over realVars TIterator* _realIter ; //! Iterator over realVars
Bool_t* _binValid ; //! Valid bins with current range definition Bool_t* _binValid ; //! Valid bins with current range definition
mutable Double_t _curWeight ; // Weight associated with the current coord inate mutable Double_t _curWeight ; // Weight associated with the current coord inate
mutable Double_t _curWgtErrLo ; // Error on weight associated with the cu rrent coordinate mutable Double_t _curWgtErrLo ; // Error on weight associated with the cu rrent coordinate
mutable Double_t _curWgtErrHi ; // Error on weight associated with the cu rrent coordinate mutable Double_t _curWgtErrHi ; // Error on weight associated with the cu rrent coordinate
mutable Double_t _curSumW2 ; // Current sum of weights^2 mutable Double_t _curSumW2 ; // Current sum of weights^2
mutable Double_t _curVolume ; // Volume of bin enclosing current coordina te mutable Double_t _curVolume ; // Volume of bin enclosing current coordina te
mutable Int_t _curIndex ; // Current index mutable Int_t _curIndex ; // Current index
 End of changes. 5 change blocks. 
3 lines changed or deleted 5 lines changed or added


 RooDataSet.h   RooDataSet.h 
skipping to change at line 23 skipping to change at line 23
* with or without modification, are permitted according to the terms * * with or without modification, are permitted according to the terms *
* listed in LICENSE (http://roofit.sourceforge.net/license.txt) * * listed in LICENSE (http://roofit.sourceforge.net/license.txt) *
************************************************************************** ***/ ************************************************************************** ***/
#ifndef ROO_DATA_SET #ifndef ROO_DATA_SET
#define ROO_DATA_SET #define ROO_DATA_SET
class TDirectory ; class TDirectory ;
class RooAbsRealLValue ; class RooAbsRealLValue ;
class RooRealVar ; class RooRealVar ;
class RooDataHist ; class RooDataHist ;
#include "RooTreeData.h" #include "RooAbsData.h"
#include "RooDirItem.h" #include "RooDirItem.h"
class RooDataSet : public RooTreeData, public RooDirItem { class RooDataSet : public RooAbsData, public RooDirItem {
public: public:
// Constructors, factory methods etc. // Constructors, factory methods etc.
RooDataSet() ; RooDataSet() ;
RooDataSet(const char* name, const char* title, const RooArgSet& vars, Ro // Empty constructor
oCmdArg arg1, RooCmdArg arg2=RooCmdArg(), RooCmdArg arg3=RooCmdArg(),
RooCmdArg arg4=RooCmdArg(),RooCmdArg arg5=RooCmdArg(),RooCmdArg
arg6=RooCmdArg(),RooCmdArg arg7=RooCmdArg(),RooCmdArg arg8=RooCmdArg()) ;
RooDataSet(const char *name, const char *title, const RooArgSet& vars, co nst char* wgtVarName=0) ; RooDataSet(const char *name, const char *title, const RooArgSet& vars, co nst char* wgtVarName=0) ;
RooDataSet(const char *name, const char *title, RooDataSet *ntuple,
const RooArgSet& vars, const char *cuts=0, const char* wgtVarNa // Universal constructor
me=0); RooDataSet(const char* name, const char* title, const RooArgSet& vars, Ro
RooDataSet(const char *name, const char *title, RooDataSet *t, oCmdArg arg1, RooCmdArg arg2=RooCmdArg(),
const RooArgSet& vars, const RooFormulaVar& cutVar, const char* RooCmdArg arg3=RooCmdArg(), RooCmdArg arg4=RooCmdArg(),RooCmdAr
wgtVarName=0) ; g arg5=RooCmdArg(),
RooDataSet(const char *name, const char *title, TTree *t, RooCmdArg arg6=RooCmdArg(),RooCmdArg arg7=RooCmdArg(),RooCmdArg
const RooArgSet& vars, const RooFormulaVar& cutVar, const char* arg8=RooCmdArg()) ;
wgtVarName=0) ;
RooDataSet(const char *name, const char *title, TTree *ntuple, // Constructor for subset of existing dataset
const RooArgSet& vars, const char *cuts=0, const char* wgtVarNa RooDataSet(const char *name, const char *title, RooDataSet *data, const R
me=0); ooArgSet& vars,
RooDataSet(const char *name, const char *filename, const char *treename, const char *cuts=0, const char* wgtVarName=0);
const RooArgSet& vars, const char *cuts=0, const char* wgtVarNa RooDataSet(const char *name, const char *title, RooDataSet *data, const R
me=0); ooArgSet& vars,
const RooFormulaVar& cutVar, const char* wgtVarName=0) ;
// Constructor importing data from external ROOT Tree
RooDataSet(const char *name, const char *title, TTree *ntuple, const RooA
rgSet& vars,
const char *cuts=0, const char* wgtVarName=0);
RooDataSet(const char *name, const char *title, TTree *t, const RooArgSet
& vars,
const RooFormulaVar& cutVar, const char* wgtVarName=0) ;
RooDataSet(RooDataSet const & other, const char* newname=0) ; RooDataSet(RooDataSet const & other, const char* newname=0) ;
virtual TObject* Clone(const char* newname=0) const { return new RooDataS et(*this,newname?newname:GetName()) ; } virtual TObject* Clone(const char* newname=0) const { return new RooDataS et(*this,newname?newname:GetName()) ; }
virtual ~RooDataSet() ; virtual ~RooDataSet() ;
virtual RooAbsData* emptyClone(const char* newName=0, const char* newTitl e=0, const RooArgSet* vars=0) const ; virtual RooAbsData* emptyClone(const char* newName=0, const char* newTitl e=0, const RooArgSet* vars=0) const ;
RooDataHist* binnedClone(const char* newName=0, const char* newTitle=0) c onst ; RooDataHist* binnedClone(const char* newName=0, const char* newTitle=0) c onst ;
virtual Int_t numEntries() const ;
virtual Double_t sumEntries(const char* cutSpec=0, const char* cutRange=0 ) const ; virtual Double_t sumEntries(const char* cutSpec=0, const char* cutRange=0 ) const ;
virtual RooPlot* plotOnXY(RooPlot* frame, virtual RooPlot* plotOnXY(RooPlot* frame,
const RooCmdArg& arg1=RooCmdArg::none(), const R ooCmdArg& arg2=RooCmdArg::none(), const RooCmdArg& arg1=RooCmdArg::none(), const R ooCmdArg& arg2=RooCmdArg::none(),
const RooCmdArg& arg3=RooCmdArg::none(), const R ooCmdArg& arg4=RooCmdArg::none(), const RooCmdArg& arg3=RooCmdArg::none(), const R ooCmdArg& arg4=RooCmdArg::none(),
const RooCmdArg& arg5=RooCmdArg::none(), const R ooCmdArg& arg6=RooCmdArg::none(), const RooCmdArg& arg5=RooCmdArg::none(), const R ooCmdArg& arg6=RooCmdArg::none(),
const RooCmdArg& arg7=RooCmdArg::none(), const R ooCmdArg& arg8=RooCmdArg::none()) const ; const RooCmdArg& arg7=RooCmdArg::none(), const R ooCmdArg& arg8=RooCmdArg::none()) const ;
// Read data from a text file and create a dataset from it. // Read data from a text file and create a dataset from it.
// The possible options are: (D)ebug, (Q)uiet. // The possible options are: (D)ebug, (Q)uiet.
skipping to change at line 94 skipping to change at line 99
virtual const RooArgSet* get(Int_t index) const; virtual const RooArgSet* get(Int_t index) const;
virtual const RooArgSet* get() const ; virtual const RooArgSet* get() const ;
// Add one ore more rows of data // Add one ore more rows of data
virtual void add(const RooArgSet& row, Double_t weight=1.0, Double_t weig htError=0); virtual void add(const RooArgSet& row, Double_t weight=1.0, Double_t weig htError=0);
virtual void add(const RooArgSet& row, Double_t weight, Double_t weightEr rorLo, Double_t weightErrorHi); virtual void add(const RooArgSet& row, Double_t weight, Double_t weightEr rorLo, Double_t weightErrorHi);
virtual void addFast(const RooArgSet& row, Double_t weight=1.0, Double_t weightError=0); virtual void addFast(const RooArgSet& row, Double_t weight=1.0, Double_t weightError=0);
void append(RooTreeData& data) ; void append(RooDataSet& data) ;
Bool_t merge(RooDataSet* data1, RooDataSet* data2=0, RooDataSet* data3=0, Bool_t merge(RooDataSet* data1, RooDataSet* data2=0, RooDataSet* data3=0,
RooDataSet* data4=0, RooDataSet* data5=0, RooDataSet* data6=0 RooDataSet* data4=0, RooDataSet* data5=0, RooDataSet* data6=0
) ; ) ;
Bool_t merge(std::list<RooDataSet*> dsetList) ;
virtual RooAbsArg* addColumn(RooAbsArg& var, Bool_t adjustRange=kTRUE) ; virtual RooAbsArg* addColumn(RooAbsArg& var, Bool_t adjustRange=kTRUE) ;
virtual RooArgSet* addColumns(const RooArgList& varList) ; virtual RooArgSet* addColumns(const RooArgList& varList) ;
// Plot the distribution of a real valued arg // Plot the distribution of a real valued arg
using RooTreeData::createHistogram ; using RooAbsData::createHistogram ;
TH2F* createHistogram(const RooAbsRealLValue& var1, const RooAbsRealLValu e& var2, const char* cuts="", TH2F* createHistogram(const RooAbsRealLValue& var1, const RooAbsRealLValu e& var2, const char* cuts="",
const char *name= "hist") const; const char *name= "hist") const;
TH2F* createHistogram(const RooAbsRealLValue& var1, const RooAbsRealLValu e& var2, Int_t nx, Int_t ny, TH2F* createHistogram(const RooAbsRealLValue& var1, const RooAbsRealLValu e& var2, Int_t nx, Int_t ny,
const char* cuts="", const char *name="hist") const ; const char* cuts="", const char *name="hist") const ;
void printMultiline(ostream& os, Int_t contents, Bool_t verbose=kFALSE, T String indent="") const ; void printMultiline(ostream& os, Int_t contents, Bool_t verbose=kFALSE, T String indent="") const ;
virtual void printArgs(ostream& os) const ; virtual void printArgs(ostream& os) const ;
virtual void printValue(ostream& os) const ; virtual void printValue(ostream& os) const ;
void SetName(const char *name) ; void SetName(const char *name) ;
void SetNameTitle(const char *name, const char* title) ; void SetNameTitle(const char *name, const char* title) ;
protected: protected:
virtual RooAbsData* cacheClone(const RooArgSet* newCacheVars, const char* newName=0) ; virtual RooAbsData* cacheClone(const RooArgSet* newCacheVars, const char* newName=0) ;
friend class RooProdGenContext ; friend class RooProdGenContext ;
Bool_t merge(const TList& data) ;
void initialize(const char* wgtVarName) ; void initialize(const char* wgtVarName) ;
// Cache copy feature is not publicly accessible // Cache copy feature is not publicly accessible
RooAbsData* reduceEng(const RooArgSet& varSubset, const RooFormulaVar* cu tVar, const char* cutRange=0, RooAbsData* reduceEng(const RooArgSet& varSubset, const RooFormulaVar* cu tVar, const char* cutRange=0,
Int_t nStart=0, Int_t nStop=2000000000, Bool_t copyC ache=kTRUE) ; Int_t nStart=0, Int_t nStop=2000000000, Bool_t copyC ache=kTRUE) ;
RooDataSet(const char *name, const char *title, RooDataSet *ntuple, RooDataSet(const char *name, const char *title, RooDataSet *ntuple,
const RooArgSet& vars, const RooFormulaVar* cutVar, const char* cutRange, int nStart, int nStop, Bool_t copyCache); const RooArgSet& vars, const RooFormulaVar* cutVar, const char* cutRange, int nStart, int nStop, Bool_t copyCache);
RooArgSet addWgtVar(const RooArgSet& origVars, const RooAbsArg* wgtVar) ; RooArgSet addWgtVar(const RooArgSet& origVars, const RooAbsArg* wgtVar) ;
RooArgSet _varsNoWgt ; // Vars without weight variable RooArgSet _varsNoWgt ; // Vars without weight variable
RooRealVar* _wgtVar ; // Pointer to weight variable (if set) RooRealVar* _wgtVar ; // Pointer to weight variable (if set)
ClassDef(RooDataSet,1) // Unbinned data set ClassDef(RooDataSet,2) // Unbinned data set
}; };
#endif #endif
 End of changes. 10 change blocks. 
29 lines changed or deleted 34 lines changed or added


 RooFitResult.h   RooFitResult.h 
skipping to change at line 64 skipping to change at line 64
void printMultiline(ostream& os, Int_t contents, Bool_t verbose=kFALSE, T String indent="") const ; void printMultiline(ostream& os, Int_t contents, Bool_t verbose=kFALSE, T String indent="") const ;
inline virtual void Print(Option_t *options= 0) const { inline virtual void Print(Option_t *options= 0) const {
// Printing interface // Printing interface
printStream(defaultPrintStream(),defaultPrintContents(options),defaultP rintStyle(options)); printStream(defaultPrintStream(),defaultPrintContents(options),defaultP rintStyle(options));
} }
virtual Int_t defaultPrintContents(Option_t* opt) const ; virtual Int_t defaultPrintContents(Option_t* opt) const ;
virtual StyleOption defaultPrintStyle(Option_t* opt) const ; virtual StyleOption defaultPrintStyle(Option_t* opt) const ;
RooAbsPdf* createPdf(const RooArgSet& params) const ; RooAbsPdf* createHessePdf(const RooArgSet& params) const ;
// Accessors // Accessors
inline Int_t status() const { inline Int_t status() const {
// Return MINUIT status code // Return MINUIT status code
return _status ; return _status ;
} }
inline Int_t covQual() const { inline Int_t covQual() const {
// Return MINUIT quality code of covariance matrix // Return MINUIT quality code of covariance matrix
return _covQual ; return _covQual ;
} }
skipping to change at line 115 skipping to change at line 115
} }
const RooArgList* correlation(const RooAbsArg& par) const { const RooArgList* correlation(const RooAbsArg& par) const {
// Return pointer to list of correlations of all parameters with par // Return pointer to list of correlations of all parameters with par
return correlation(par.GetName()) ; return correlation(par.GetName()) ;
} }
Double_t correlation(const char* parname1, const char* parname2) const ; Double_t correlation(const char* parname1, const char* parname2) const ;
const RooArgList* correlation(const char* parname) const ; const RooArgList* correlation(const char* parname) const ;
const TMatrixDSym& covarianceMatrix() const ; const TMatrixDSym& covarianceMatrix() const ;
TMatrixDSym reducedCovarianceMatrix(const RooArgSet& params) const ;
const TMatrixDSym& correlationMatrix() const ; const TMatrixDSym& correlationMatrix() const ;
// Global correlation accessors // Global correlation accessors
Double_t globalCorr(const RooAbsArg& par) { return globalCorr(par.GetName ()) ; } Double_t globalCorr(const RooAbsArg& par) { return globalCorr(par.GetName ()) ; }
Double_t globalCorr(const char* parname) ; Double_t globalCorr(const char* parname) ;
const RooArgList* globalCorr() ; const RooArgList* globalCorr() ;
// Add objects to a 2D plot // Add objects to a 2D plot
inline RooPlot *plotOn(RooPlot *frame, const RooAbsArg &par1, const RooAb sArg &par2, inline RooPlot *plotOn(RooPlot *frame, const RooAbsArg &par1, const RooAb sArg &par2,
const char *options= "ME") const { const char *options= "ME") const {
skipping to change at line 142 skipping to change at line 143
const RooArgList& randomizePars() const; const RooArgList& randomizePars() const;
Bool_t isIdentical(const RooFitResult& other, Double_t tol=5e-5, Double_t tolCorr=1e-4, Bool_t verbose=kTRUE) const ; Bool_t isIdentical(const RooFitResult& other, Double_t tol=5e-5, Double_t tolCorr=1e-4, Bool_t verbose=kTRUE) const ;
void SetName(const char *name) ; void SetName(const char *name) ;
void SetNameTitle(const char *name, const char* title) ; void SetNameTitle(const char *name, const char* title) ;
protected: protected:
friend class RooMinuit ; friend class RooMinuit ;
friend class RooMinimizer ;
friend class RooNag ; friend class RooNag ;
void setCovarianceMatrix(TMatrixDSym& V) ; void setCovarianceMatrix(TMatrixDSym& V) ;
void setConstParList(const RooArgList& list) ; void setConstParList(const RooArgList& list) ;
void setInitParList(const RooArgList& list) ; void setInitParList(const RooArgList& list) ;
void setFinalParList(const RooArgList& list) ; void setFinalParList(const RooArgList& list) ;
inline void setMinNLL(Double_t val) { _minNLL = val ; } inline void setMinNLL(Double_t val) { _minNLL = val ; }
inline void setEDM(Double_t val) { _edm = val ; } inline void setEDM(Double_t val) { _edm = val ; }
inline void setStatus(Int_t val) { _status = val ; } inline void setStatus(Int_t val) { _status = val ; }
inline void setCovQual(Int_t val) { _covQual = val ; } inline void setCovQual(Int_t val) { _covQual = val ; }
inline void setNumInvalidNLL(Int_t val) { _numBadNLL=val ; } inline void setNumInvalidNLL(Int_t val) { _numBadNLL=val ; }
void fillCorrMatrix() ; void fillCorrMatrix() ;
void fillCorrMatrix(const std::vector<double>& globalCC, const TMatrixDSy m& corrs, const TMatrixDSym& covs) ;
Double_t correlation(Int_t row, Int_t col) const; Double_t correlation(Int_t row, Int_t col) const;
Double_t covariance(Int_t row, Int_t col) const; Double_t covariance(Int_t row, Int_t col) const;
Int_t _status ; // MINUIT status code Int_t _status ; // MINUIT status code
Int_t _covQual ; // MINUIT quality code of covariance matrix Int_t _covQual ; // MINUIT quality code of covariance matrix
Int_t _numBadNLL ; // Number calls with bad (zero,negative) like lihood Int_t _numBadNLL ; // Number calls with bad (zero,negative) like lihood
Double_t _minNLL ; // NLL at minimum Double_t _minNLL ; // NLL at minimum
Double_t _edm ; // Estimated distance to minimum Double_t _edm ; // Estimated distance to minimum
RooArgList* _constPars ; // List of constant parameters RooArgList* _constPars ; // List of constant parameters
 End of changes. 4 change blocks. 
1 lines changed or deleted 4 lines changed or added


 RooGlobalFunc.h   RooGlobalFunc.h 
skipping to change at line 20 skipping to change at line 20
* and Stanford University. All rights reserved. * * and Stanford University. All rights reserved. *
* * * *
* Redistribution and use in source and binary forms, * * Redistribution and use in source and binary forms, *
* with or without modification, are permitted according to the terms * * with or without modification, are permitted according to the terms *
* listed in LICENSE (http://roofit.sourceforge.net/license.txt) * * listed in LICENSE (http://roofit.sourceforge.net/license.txt) *
************************************************************************** ***/ ************************************************************************** ***/
#ifndef ROO_GLOBAL_FUNC #ifndef ROO_GLOBAL_FUNC
#define ROO_GLOBAL_FUNC #define ROO_GLOBAL_FUNC
#include "RooCmdArg.h" #include "RooCmdArg.h"
#include "RooDataHist.h" //#include "RooDataHist.h"
#include "RooAbsPdf.h" //#include "RooAbsPdf.h"
#include "RooRealConstant.h" //#include "RooRealConstant.h"
#include "RooMsgService.h" //#include "RooMsgService.h"
class RooDataHist ;
class RooDataSet ;
class RooFitResult ;
class RooAbsPdf ;
class RooAbsRealLValue ;
class RooRealConstant ;
class RooMsgService ;
class RooFormulaVar ;
class RooAbsData ; class RooAbsData ;
class RooArgSet ; class RooArgSet ;
class RooCategory ; class RooCategory ;
class RooAbsReal ; class RooAbsReal ;
class RooAbsBinning ; class RooAbsBinning ;
class RooAbsCollection ;
class RooAbsPdf ; class RooAbsPdf ;
class RooConstVar ; class RooConstVar ;
class RooRealVar ; class RooRealVar ;
class RooAbsCategory ; class RooAbsCategory ;
class RooNumIntConfig ;
class RooArgList ;
class RooAbsCollection ;
class TH1 ;
class TF1 ; class TF1 ;
class TF2 ; class TF2 ;
class TF3 ; class TF3 ;
class TTree ;
namespace RooFit { namespace RooFit {
enum MsgLevel { DEBUG=0, INFO=1, PROGRESS=2, WARNING=3, ERROR=4, FATAL=5 }
;
enum MsgTopic { Generation=1, Minimization=2, Plotting=4, Fitting=8, Integr
ation=16, LinkStateMgmt=32,
Eval=64, Caching=128, Optimization=256, ObjectHandling=512, InputAr
guments=1024, Tracing=2048,
Contents=4096, DataHandling=8192, NumIntegration=16384 } ;
// RooAbsReal::plotOn arguments // RooAbsReal::plotOn arguments
RooCmdArg DrawOption(const char* opt) ; RooCmdArg DrawOption(const char* opt) ;
RooCmdArg Normalization(Double_t scaleFactor) ; RooCmdArg Normalization(Double_t scaleFactor) ;
RooCmdArg Slice(const RooArgSet& sliceSet) ; RooCmdArg Slice(const RooArgSet& sliceSet) ;
RooCmdArg Slice(RooCategory& cat, const char* label) ; RooCmdArg Slice(RooCategory& cat, const char* label) ;
RooCmdArg Project(const RooArgSet& projSet) ; RooCmdArg Project(const RooArgSet& projSet) ;
RooCmdArg ProjWData(const RooAbsData& projData, Bool_t binData=kFALSE) ; RooCmdArg ProjWData(const RooAbsData& projData, Bool_t binData=kFALSE) ;
RooCmdArg ProjWData(const RooArgSet& projSet, const RooAbsData& projData, B ool_t binData=kFALSE) ; RooCmdArg ProjWData(const RooArgSet& projSet, const RooAbsData& projData, B ool_t binData=kFALSE) ;
RooCmdArg Asymmetry(const RooCategory& cat) ; RooCmdArg Asymmetry(const RooCategory& cat) ;
RooCmdArg Precision(Double_t prec) ; RooCmdArg Precision(Double_t prec) ;
skipping to change at line 66 skipping to change at line 85
RooCmdArg LineStyle(Style_t style) ; RooCmdArg LineStyle(Style_t style) ;
RooCmdArg LineWidth(Width_t width) ; RooCmdArg LineWidth(Width_t width) ;
RooCmdArg FillColor(Color_t color) ; RooCmdArg FillColor(Color_t color) ;
RooCmdArg FillStyle(Style_t style) ; RooCmdArg FillStyle(Style_t style) ;
RooCmdArg ProjectionRange(const char* rangeName) ; RooCmdArg ProjectionRange(const char* rangeName) ;
RooCmdArg Name(const char* name) ; RooCmdArg Name(const char* name) ;
RooCmdArg Invisible() ; RooCmdArg Invisible() ;
RooCmdArg AddTo(const char* name, double wgtSel=1.0, double wgtOther=1.0) ; RooCmdArg AddTo(const char* name, double wgtSel=1.0, double wgtOther=1.0) ;
RooCmdArg EvalErrorValue(Double_t value) ; RooCmdArg EvalErrorValue(Double_t value) ;
RooCmdArg MoveToBack() ; RooCmdArg MoveToBack() ;
RooCmdArg VisualizeError(const RooDataSet& paramData, Double_t Z=1) ;
RooCmdArg VisualizeError(const RooFitResult& fitres, Double_t Z=1, Bool_t l
inearMethod=kTRUE) ;
RooCmdArg VisualizeError(const RooFitResult& fitres, const RooArgSet& param
, Double_t Z=1, Bool_t linearMethod=kTRUE) ;
// RooAbsPdf::plotOn arguments // RooAbsPdf::plotOn arguments
RooCmdArg Normalization(Double_t scaleFactor, RooAbsPdf::ScaleType scaleTyp e) ; RooCmdArg Normalization(Double_t scaleFactor, Int_t scaleType) ;
RooCmdArg Components(const RooArgSet& compSet) ; RooCmdArg Components(const RooArgSet& compSet) ;
RooCmdArg Components(const char* compSpec) ; RooCmdArg Components(const char* compSpec) ;
// RooAbsData::plotOn arguments // RooAbsData::plotOn arguments
RooCmdArg Cut(const char* cutSpec) ; RooCmdArg Cut(const char* cutSpec) ;
RooCmdArg Cut(const RooFormulaVar& cutVar) ; RooCmdArg Cut(const RooFormulaVar& cutVar) ;
RooCmdArg Binning(const RooAbsBinning& binning) ; RooCmdArg Binning(const RooAbsBinning& binning) ;
RooCmdArg Binning(const char* binningName) ; RooCmdArg Binning(const char* binningName) ;
RooCmdArg Binning(Int_t nBins, Double_t xlo=0., Double_t xhi=0.) ; RooCmdArg Binning(Int_t nBins, Double_t xlo=0., Double_t xhi=0.) ;
RooCmdArg MarkerStyle(Style_t style) ; RooCmdArg MarkerStyle(Style_t style) ;
skipping to change at line 104 skipping to change at line 126
RooCmdArg WeightVar(const char* name) ; RooCmdArg WeightVar(const char* name) ;
RooCmdArg WeightVar(const RooRealVar& arg) ; RooCmdArg WeightVar(const RooRealVar& arg) ;
RooCmdArg Import(const char* state, RooDataSet& data) ; RooCmdArg Import(const char* state, RooDataSet& data) ;
RooCmdArg Import(RooDataSet& data) ; RooCmdArg Import(RooDataSet& data) ;
RooCmdArg Import(TTree& tree) ; RooCmdArg Import(TTree& tree) ;
RooCmdArg StoreError(const RooArgSet& aset) ; RooCmdArg StoreError(const RooArgSet& aset) ;
RooCmdArg StoreAsymError(const RooArgSet& aset) ; RooCmdArg StoreAsymError(const RooArgSet& aset) ;
// RooChi2Var::ctor arguments // RooChi2Var::ctor arguments
RooCmdArg Extended(Bool_t flag=kTRUE) ; RooCmdArg Extended(Bool_t flag=kTRUE) ;
RooCmdArg DataError(RooDataHist::ErrorType) ; RooCmdArg DataError(Int_t) ;
RooCmdArg NumCPU(Int_t nCPU, Bool_t interleave=kFALSE) ; RooCmdArg NumCPU(Int_t nCPU, Bool_t interleave=kFALSE) ;
// RooAbsPdf::printLatex arguments // RooAbsPdf::printLatex arguments
RooCmdArg Columns(Int_t ncol) ; RooCmdArg Columns(Int_t ncol) ;
RooCmdArg OutputFile(const char* fileName) ; RooCmdArg OutputFile(const char* fileName) ;
RooCmdArg Format(const char* format, Int_t sigDigit) ; RooCmdArg Format(const char* format, Int_t sigDigit) ;
RooCmdArg Format(const char* what, const RooCmdArg& arg1=RooCmdArg::none(), const RooCmdArg& arg2=RooCmdArg::none(), RooCmdArg Format(const char* what, const RooCmdArg& arg1=RooCmdArg::none(), const RooCmdArg& arg2=RooCmdArg::none(),
const RooCmdArg& arg3=RooCmdArg::none(),const RooCmdArg& a rg4=RooCmdArg::none(), const RooCmdArg& arg3=RooCmdArg::none(),const RooCmdArg& a rg4=RooCmdArg::none(),
const RooCmdArg& arg5=RooCmdArg::none(),const RooCmdArg& a rg6=RooCmdArg::none(), const RooCmdArg& arg5=RooCmdArg::none(),const RooCmdArg& a rg6=RooCmdArg::none(),
const RooCmdArg& arg7=RooCmdArg::none(),const RooCmdArg& a rg8=RooCmdArg::none()) ; const RooCmdArg& arg7=RooCmdArg::none(),const RooCmdArg& a rg8=RooCmdArg::none()) ;
RooCmdArg Sibling(const RooAbsCollection& sibling) ; RooCmdArg Sibling(const RooAbsCollection& sibling) ;
// RooAbsReal::fillHistogram arguments
RooCmdArg IntegratedObservables(const RooArgSet& intObs) ;
// RooAbsRealLValue::frame arguments // RooAbsRealLValue::frame arguments
RooCmdArg Title(const char* name) ; RooCmdArg Title(const char* name) ;
RooCmdArg Bins(Int_t nbin) ; RooCmdArg Bins(Int_t nbin) ;
RooCmdArg AutoSymRange(const RooAbsData& data, Double_t marginFactor=0.1) ; RooCmdArg AutoSymRange(const RooAbsData& data, Double_t marginFactor=0.1) ;
RooCmdArg AutoRange(const RooAbsData& data, Double_t marginFactor=0.1) ; RooCmdArg AutoRange(const RooAbsData& data, Double_t marginFactor=0.1) ;
// RooAbsData::createHistogram arguments // RooAbsData::createHistogram arguments
RooCmdArg AutoSymBinning(Int_t nbins=100, Double_t marginFactor=0.1) ; RooCmdArg AutoSymBinning(Int_t nbins=100, Double_t marginFactor=0.1) ;
RooCmdArg AutoBinning(Int_t nbins=100, Double_t marginFactor=0.1) ; RooCmdArg AutoBinning(Int_t nbins=100, Double_t marginFactor=0.1) ;
skipping to change at line 149 skipping to change at line 174
RooCmdArg PrintLevel(Int_t code) ; RooCmdArg PrintLevel(Int_t code) ;
RooCmdArg Warnings(Bool_t flag=kTRUE) ; RooCmdArg Warnings(Bool_t flag=kTRUE) ;
RooCmdArg Strategy(Int_t code) ; RooCmdArg Strategy(Int_t code) ;
RooCmdArg InitialHesse(Bool_t flag=kTRUE) ; RooCmdArg InitialHesse(Bool_t flag=kTRUE) ;
RooCmdArg Hesse(Bool_t flag=kTRUE) ; RooCmdArg Hesse(Bool_t flag=kTRUE) ;
RooCmdArg Minos(Bool_t flag=kTRUE) ; RooCmdArg Minos(Bool_t flag=kTRUE) ;
RooCmdArg Minos(const RooArgSet& minosArgs) ; RooCmdArg Minos(const RooArgSet& minosArgs) ;
RooCmdArg SplitRange(Bool_t flag=kTRUE) ; RooCmdArg SplitRange(Bool_t flag=kTRUE) ;
RooCmdArg SumCoefRange(const char* rangeName) ; RooCmdArg SumCoefRange(const char* rangeName) ;
RooCmdArg Constrain(const RooArgSet& params) ; RooCmdArg Constrain(const RooArgSet& params) ;
RooCmdArg Constrained() ;
RooCmdArg ExternalConstraints(const RooArgSet& constraintPdfs) ; RooCmdArg ExternalConstraints(const RooArgSet& constraintPdfs) ;
RooCmdArg PrintEvalErrors(Int_t numErrors) ; RooCmdArg PrintEvalErrors(Int_t numErrors) ;
RooCmdArg EvalErrorWall(Bool_t flag) ; RooCmdArg EvalErrorWall(Bool_t flag) ;
RooCmdArg SumW2Error(Bool_t flag) ; RooCmdArg SumW2Error(Bool_t flag) ;
RooCmdArg CloneData(Bool_t flag) ; RooCmdArg CloneData(Bool_t flag) ;
RooCmdArg Integrate(Bool_t flag) ; RooCmdArg Integrate(Bool_t flag) ;
RooCmdArg Minimizer(const char* type, const char* alg=0) ;
// RooAbsPdf::paramOn arguments // RooAbsPdf::paramOn arguments
RooCmdArg Label(const char* str) ; RooCmdArg Label(const char* str) ;
RooCmdArg Layout(Double_t xmin, Double_t xmax=0.99, Double_t ymin=0.95) ; RooCmdArg Layout(Double_t xmin, Double_t xmax=0.99, Double_t ymin=0.95) ;
RooCmdArg Parameters(const RooArgSet& params) ; RooCmdArg Parameters(const RooArgSet& params) ;
RooCmdArg ShowConstants(Bool_t flag=kTRUE) ; RooCmdArg ShowConstants(Bool_t flag=kTRUE) ;
// RooTreeData::statOn arguments // RooTreeData::statOn arguments
RooCmdArg What(const char* str) ; RooCmdArg What(const char* str) ;
// RooProdPdf::ctor arguments // RooProdPdf::ctor arguments
RooCmdArg Conditional(const RooArgSet& pdfSet, const RooArgSet& depSet, Boo l_t depsAreCond=kFALSE) ; RooCmdArg Conditional(const RooArgSet& pdfSet, const RooArgSet& depSet, Boo l_t depsAreCond=kFALSE) ;
// RooAbsPdf::generate arguments // RooAbsPdf::generate arguments
RooCmdArg ProtoData(const RooDataSet& protoData, Bool_t randomizeOrder=kFAL SE, Bool_t resample=kFALSE) ; RooCmdArg ProtoData(const RooDataSet& protoData, Bool_t randomizeOrder=kFAL SE, Bool_t resample=kFALSE) ;
RooCmdArg NumEvents(Int_t numEvents) ; RooCmdArg NumEvents(Int_t numEvents) ;
RooCmdArg ExpectedData(Bool_t flag=kTRUE) ;
RooCmdArg Asimov(Bool_t flag=kTRUE) ;
// RooAbsRealLValue::createHistogram arguments // RooAbsRealLValue::createHistogram arguments
RooCmdArg YVar(const RooAbsRealLValue& var, const RooCmdArg& arg=RooCmdArg: :none()) ; RooCmdArg YVar(const RooAbsRealLValue& var, const RooCmdArg& arg=RooCmdArg: :none()) ;
RooCmdArg ZVar(const RooAbsRealLValue& var, const RooCmdArg& arg=RooCmdArg: :none()) ; RooCmdArg ZVar(const RooAbsRealLValue& var, const RooCmdArg& arg=RooCmdArg: :none()) ;
RooCmdArg AxisLabel(const char* name) ; RooCmdArg AxisLabel(const char* name) ;
RooCmdArg Scaling(Bool_t flag) ; RooCmdArg Scaling(Bool_t flag) ;
// RooAbsReal::createIntegral arguments // RooAbsReal::createIntegral arguments
RooCmdArg NormSet(const RooArgSet& nset) ; RooCmdArg NormSet(const RooArgSet& nset) ;
RooCmdArg NumIntConfig(const RooNumIntConfig& cfg) ; RooCmdArg NumIntConfig(const RooNumIntConfig& cfg) ;
 End of changes. 12 change blocks. 
7 lines changed or deleted 41 lines changed or added


 RooHist.h   RooHist.h 
skipping to change at line 28 skipping to change at line 28
#include "TGraphAsymmErrors.h" #include "TGraphAsymmErrors.h"
#include "RooPlotable.h" #include "RooPlotable.h"
#include "RooAbsData.h" #include "RooAbsData.h"
class TH1; class TH1;
class RooCurve ; class RooCurve ;
class RooHist : public TGraphAsymmErrors, public RooPlotable { class RooHist : public TGraphAsymmErrors, public RooPlotable {
public: public:
RooHist() {} ; RooHist() ;
RooHist(Double_t nominalBinWidth, Double_t nSigma= 1, Double_t xErrorFrac =1.0, Double_t scaleFactor=1.0); RooHist(Double_t nominalBinWidth, Double_t nSigma= 1, Double_t xErrorFrac =1.0, Double_t scaleFactor=1.0);
RooHist(const TH1 &data, Double_t nominalBinWidth= 0, Double_t nSigma= 1, RooAbsData::ErrorType=RooAbsData::Poisson, RooHist(const TH1 &data, Double_t nominalBinWidth= 0, Double_t nSigma= 1, RooAbsData::ErrorType=RooAbsData::Poisson,
Double_t xErrorFrac=1.0, Bool_t correctForBinWidth=kTRUE, Double_t scaleFactor=1.); Double_t xErrorFrac=1.0, Bool_t correctForBinWidth=kTRUE, Double_t scaleFactor=1.);
RooHist(const TH1 &data1, const TH1 &data2, Double_t nominalBinWidth= 0, Double_t nSigma= 1, Double_t xErrorFrac=1.0, RooHist(const TH1 &data1, const TH1 &data2, Double_t nominalBinWidth= 0, Double_t nSigma= 1, Double_t xErrorFrac=1.0,
Bool_t efficiency=kFALSE, Double_t scaleFactor=1.0); Bool_t efficiency=kFALSE, Double_t scaleFactor=1.0);
RooHist(const RooHist& hist1, const RooHist& hist2, Double_t wgt1=1.0, Do uble_t wgt2=1.0, RooHist(const RooHist& hist1, const RooHist& hist2, Double_t wgt1=1.0, Do uble_t wgt2=1.0,
RooAbsData::ErrorType etype=RooAbsData::Poisson, Double_t xErrorFr ac=1.0) ; RooAbsData::ErrorType etype=RooAbsData::Poisson, Double_t xErrorFr ac=1.0) ;
virtual ~RooHist(); virtual ~RooHist();
// add a datapoint for a bin with n entries, using a Poisson error // add a datapoint for a bin with n entries, using a Poisson error
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 RooMCStudy.h   RooMCStudy.h 
skipping to change at line 109 skipping to change at line 109
friend class RooAbsMCStudyModule ; friend class RooAbsMCStudyModule ;
RooPlot* makeFrameAndPlotCmd(const RooRealVar& param, RooLinkedList& cmdL ist, Bool_t symRange=kFALSE) const ; RooPlot* makeFrameAndPlotCmd(const RooRealVar& param, RooLinkedList& cmdL ist, Bool_t symRange=kFALSE) const ;
Bool_t run(Bool_t generate, Bool_t fit, Int_t nSamples, Int_t nEvtPerSamp le, Bool_t keepGenData, const char* asciiFilePat) ; Bool_t run(Bool_t generate, Bool_t fit, Int_t nSamples, Int_t nEvtPerSamp le, Bool_t keepGenData, const char* asciiFilePat) ;
Bool_t fitSample(RooAbsData* genSample) ; Bool_t fitSample(RooAbsData* genSample) ;
RooFitResult* doFit(RooAbsData* genSample) ; RooFitResult* doFit(RooAbsData* genSample) ;
void calcPulls() ; void calcPulls() ;
RooDataSet* _genSample ; // Currently generated sample RooAbsData* _genSample ; // Currently generated sample
RooAbsPdf* _genModel ; // Generator model RooAbsPdf* _genModel ; // Generator model
RooAbsGenContext* _genContext ; // Generator context RooAbsGenContext* _genContext ; // Generator context
RooArgSet* _genInitParams ; // List of originalgenerator paramet ers RooArgSet* _genInitParams ; // List of originalgenerator paramet ers
RooArgSet* _genParams ; // List of actual generator paramete rs RooArgSet* _genParams ; // List of actual generator paramete rs
const RooDataSet* _genProtoData ; // Generator prototype data set const RooDataSet* _genProtoData ; // Generator prototype data set
RooArgSet _projDeps ; // List of projected dependents in f it RooArgSet _projDeps ; // List of projected dependents in f it
RooAbsPdf* _constrPdf ; // Constraints p.d.f RooAbsPdf* _constrPdf ; // Constraints p.d.f
RooAbsGenContext* _constrGenContext ; // Generator context for constraint s p.d.f RooAbsGenContext* _constrGenContext ; // Generator context for constraint s p.d.f
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 RooMsgService.h   RooMsgService.h 
skipping to change at line 26 skipping to change at line 26
#ifndef ROO_MSG_SERVICE #ifndef ROO_MSG_SERVICE
#define ROO_MSG_SERVICE #define ROO_MSG_SERVICE
#include "Riosfwd.h" #include "Riosfwd.h"
#include <assert.h> #include <assert.h>
#include "TObject.h" #include "TObject.h"
#include <string> #include <string>
#include <vector> #include <vector>
#include <map> #include <map>
#include "RooCmdArg.h" #include "RooCmdArg.h"
#include "RooGlobalFunc.h"
class RooAbsArg ; class RooAbsArg ;
// Shortcut definitions // Shortcut definitions
#define coutI(a) RooMsgService::instance().log(this,RooMsgService::INFO,Roo #define coutI(a) RooMsgService::instance().log(this,RooFit::INFO,RooFit::a)
MsgService::a) #define coutP(a) RooMsgService::instance().log(this,RooFit::PROGRESS,RooFit
#define coutP(a) RooMsgService::instance().log(this,RooMsgService::PROGRESS ::a)
,RooMsgService::a) #define coutW(a) RooMsgService::instance().log(this,RooFit::WARNING,RooFit:
#define coutW(a) RooMsgService::instance().log(this,RooMsgService::WARNING, :a)
RooMsgService::a) #define coutE(a) RooMsgService::instance().log(this,RooFit::ERROR,RooFit::a
#define coutE(a) RooMsgService::instance().log(this,RooMsgService::ERROR,Ro )
oMsgService::a) #define coutF(a) RooMsgService::instance().log(this,RooFit::FATAL,RooFit::a
#define coutF(a) RooMsgService::instance().log(this,RooMsgService::FATAL,Ro )
oMsgService::a)
#define ccoutD(a) RooMsgService::instance().log(this,RooFit::DEBUG,RooFit::
#define ccoutD(a) RooMsgService::instance().log(this,RooMsgService::DEBUG,R a,kTRUE)
ooMsgService::a,kTRUE) #define ccoutI(a) RooMsgService::instance().log(this,RooFit::INFO,RooFit::a
#define ccoutI(a) RooMsgService::instance().log(this,RooMsgService::INFO,Ro ,kTRUE)
oMsgService::a,kTRUE) #define ccoutP(a) RooMsgService::instance().log(this,RooFit::PROGRESS,RooFi
#define ccoutP(a) RooMsgService::instance().log(this,RooMsgService::PROGRES t::a,kTRUE)
S,RooMsgService::a,kTRUE) #define ccoutW(a) RooMsgService::instance().log(this,RooFit::WARNING,RooFit
#define ccoutW(a) RooMsgService::instance().log(this,RooMsgService::WARNING ::a,kTRUE)
,RooMsgService::a,kTRUE) #define ccoutE(a) RooMsgService::instance().log(this,RooFit::ERROR,RooFit::
#define ccoutE(a) RooMsgService::instance().log(this,RooMsgService::ERROR,R a,kTRUE)
ooMsgService::a,kTRUE) #define ccoutF(a) RooMsgService::instance().log(this,RooFit::FATAL,RooFit::
#define ccoutF(a) RooMsgService::instance().log(this,RooMsgService::FATAL,R a,kTRUE)
ooMsgService::a,kTRUE)
#define oocoutI(o,a) RooMsgService::instance().log(o,RooFit::INFO,RooFit::a
#define oocoutI(o,a) RooMsgService::instance().log(o,RooMsgService::INFO,Ro )
oMsgService::a) #define oocoutP(o,a) RooMsgService::instance().log(o,RooFit::PROGRESS,RooFi
#define oocoutP(o,a) RooMsgService::instance().log(o,RooMsgService::PROGRES t::a)
S,RooMsgService::a) #define oocoutW(o,a) RooMsgService::instance().log(o,RooFit::WARNING,RooFit
#define oocoutW(o,a) RooMsgService::instance().log(o,RooMsgService::WARNING ::a)
,RooMsgService::a) #define oocoutE(o,a) RooMsgService::instance().log(o,RooFit::ERROR,RooFit::
#define oocoutE(o,a) RooMsgService::instance().log(o,RooMsgService::ERROR,R a)
ooMsgService::a) #define oocoutF(o,a) RooMsgService::instance().log(o,RooFit::FATAL,RooFit::
#define oocoutF(o,a) RooMsgService::instance().log(o,RooMsgService::FATAL,R a)
ooMsgService::a)
#define ooccoutD(o,a) RooMsgService::instance().log(o,RooFit::DEBUG,RooFit:
#define ooccoutD(o,a) RooMsgService::instance().log(o,RooMsgService::DEBUG, :a,kTRUE)
RooMsgService::a,kTRUE) #define ooccoutI(o,a) RooMsgService::instance().log(o,RooFit::INFO,RooFit::
#define ooccoutI(o,a) RooMsgService::instance().log(o,RooMsgService::INFO,R a,kTRUE)
ooMsgService::a,kTRUE) #define ooccoutP(o,a) RooMsgService::instance().log(o,RooFit::PROGRESS,RooF
#define ooccoutP(o,a) RooMsgService::instance().log(o,RooMsgService::PROGRE it::a,kTRUE)
SS,RooMsgService::a,kTRUE) #define ooccoutW(o,a) RooMsgService::instance().log(o,RooFit::WARNING,RooFi
#define ooccoutW(o,a) RooMsgService::instance().log(o,RooMsgService::WARNIN t::a,kTRUE)
G,RooMsgService::a,kTRUE) #define ooccoutE(o,a) RooMsgService::instance().log(o,RooFit::ERROR,RooFit:
#define ooccoutE(o,a) RooMsgService::instance().log(o,RooMsgService::ERROR, :a,kTRUE)
RooMsgService::a,kTRUE) #define ooccoutF(o,a) RooMsgService::instance().log(o,RooFit::FATAL,RooFit:
#define ooccoutF(o,a) RooMsgService::instance().log(o,RooMsgService::FATAL, :a,kTRUE)
RooMsgService::a,kTRUE)
#ifndef _WIN32 #ifndef _WIN32
#define ANYDEBUG (RooMsgService::_debugCount>0) #define ANYDEBUG (RooMsgService::_debugCount>0)
#else #else
#define ANYDEBUG (RooMsgService::anyDebug()) #define ANYDEBUG (RooMsgService::anyDebug())
#endif #endif
#define dologD(a) (ANYDEBUG && RooMsgService::instance().isActive(this,RooM #define dologD(a) (ANYDEBUG && RooMsgService::instance().isActive(this,RooF
sgService::a,RooMsgService::DEBUG)) it::a,RooFit::DEBUG))
#define dologI(a) (RooMsgService::instance().isActive(this,RooMsgService::a #define dologI(a) (RooMsgService::instance().isActive(this,RooFit::a,RooFit
,RooMsgService::INFO)) ::INFO))
#define dologP(a) (RooMsgService::instance().isActive(this,RooMsgService::a #define dologP(a) (RooMsgService::instance().isActive(this,RooFit::a,RooFit
,RooMsgService::PROGRESS)) ::PROGRESS))
#define dologW(a) (RooMsgService::instance().isActive(this,RooMsgService::a #define dologW(a) (RooMsgService::instance().isActive(this,RooFit::a,RooFit
,RooMsgService::WARNING)) ::WARNING))
#define dologE(a) (RooMsgService::instance().isActive(this,RooMsgService::a #define dologE(a) (RooMsgService::instance().isActive(this,RooFit::a,RooFit
,RooMsgService::ERROR)) ::ERROR))
#define dologF(a) (RooMsgService::instance().isActive(this,RooMsgService::a #define dologF(a) (RooMsgService::instance().isActive(this,RooFit::a,RooFit
,RooMsgService::FATAL)) ::FATAL))
#define oodologD(o,a) (ANYDEBUG && RooMsgService::instance().isActive(o,Roo #define oodologD(o,a) (ANYDEBUG && RooMsgService::instance().isActive(o,Roo
MsgService::a,RooMsgService::DEBUG)) Fit::a,RooFit::DEBUG))
#define oodologI(o,a) (RooMsgService::instance().isActive(o,RooMsgService:: #define oodologI(o,a) (RooMsgService::instance().isActive(o,RooFit::a,RooFi
a,RooMsgService::INFO)) t::INFO))
#define oodologP(o,a) (RooMsgService::instance().isActive(o,RooMsgService:: #define oodologP(o,a) (RooMsgService::instance().isActive(o,RooFit::a,RooFi
a,RooMsgService::PROGRESS)) t::PROGRESS))
#define oodologW(o,a) (RooMsgService::instance().isActive(o,RooMsgService:: #define oodologW(o,a) (RooMsgService::instance().isActive(o,RooFit::a,RooFi
a,RooMsgService::WARNING)) t::WARNING))
#define oodologE(o,a) (RooMsgService::instance().isActive(o,RooMsgService:: #define oodologE(o,a) (RooMsgService::instance().isActive(o,RooFit::a,RooFi
a,RooMsgService::ERROR)) t::ERROR))
#define oodologF(o,a) (RooMsgService::instance().isActive(o,RooMsgService:: #define oodologF(o,a) (RooMsgService::instance().isActive(o,RooFit::a,RooFi
a,RooMsgService::FATAL)) t::FATAL))
// Shortcuts definitions with conditional execution of print expression -- USE WITH CAUTION // Shortcuts definitions with conditional execution of print expression -- USE WITH CAUTION
#define cxcoutD(a) if (ANYDEBUG && RooMsgService::instance().isActive(this, #define cxcoutD(a) if (ANYDEBUG && RooMsgService::instance().isActive(this,
RooMsgService::a,RooMsgService::DEBUG)) RooMsgService::instance().log(this, RooFit::a,RooFit::DEBUG)) RooMsgService::instance().log(this,RooFit::DEBUG,
RooMsgService::DEBUG,RooMsgService::a) RooFit::a)
#define ccxcoutD(a) if (ANYDEBUG && RooMsgService::instance().isActive(this #define ccxcoutD(a) if (ANYDEBUG && RooMsgService::instance().isActive(this
,RooMsgService::a,RooMsgService::DEBUG)) RooMsgService::instance().log(this ,RooFit::a,RooFit::DEBUG)) RooMsgService::instance().log(this,RooFit::DEBUG
,RooMsgService::DEBUG,RooMsgService::a,kTRUE) ,RooFit::a,kTRUE)
#define oocxcoutD(o,a) if (ANYDEBUG && RooMsgService::instance().isActive(o #define oocxcoutD(o,a) if (ANYDEBUG && RooMsgService::instance().isActive(o
,RooMsgService::a,RooMsgService::DEBUG)) RooMsgService::instance().log(o,Ro ,RooFit::a,RooFit::DEBUG)) RooMsgService::instance().log(o,RooFit::DEBUG,Ro
oMsgService::DEBUG,RooMsgService::a) oFit::a)
#define ooccxcoutD(o,a) if (ANYDEBUG && RooMsgService::instance().isActive( #define ooccxcoutD(o,a) if (ANYDEBUG && RooMsgService::instance().isActive(
o,RooMsgService::a,RooMsgService::DEBUG)) RooMsgService::instance().log(o,R o,RooFit::a,RooFit::DEBUG)) RooMsgService::instance().log(o,RooFit::DEBUG,R
ooMsgService::DEBUG,RooMsgService::a,kTRUE) ooFit::a,kTRUE)
#define cxcoutI(a) if (RooMsgService::instance().isActive(this,RooMsgServic #define cxcoutI(a) if (RooMsgService::instance().isActive(this,RooFit::a,Ro
e::a,RooMsgService::INFO)) RooMsgService::instance().log(this,RooMsgService oFit::INFO)) RooMsgService::instance().log(this,RooFit::INFO,RooFit::a)
::INFO,RooMsgService::a) #define ccxcoutI(a) if (RooMsgService::instance().isActive(this,RooFit::a,R
#define ccxcoutI(a) if (RooMsgService::instance().isActive(this,RooMsgServi ooFit::INFO)) RooMsgService::instance().log(this,RooFit::INFO,RooFit::a,kTR
ce::a,RooMsgService::INFO)) RooMsgService::instance().log(this,RooMsgServic UE)
e::INFO,RooMsgService::a,kTRUE) #define oocxcoutI(o,a) if (RooMsgService::instance().isActive(o,RooFit::a,R
#define oocxcoutI(o,a) if (RooMsgService::instance().isActive(o,RooMsgServi ooFit::INFO)) RooMsgService::instance().log(o,RooFit::INFO,RooFit::a)
ce::a,RooMsgService::INFO)) RooMsgService::instance().log(o,RooMsgService:: #define ooccxcoutI(o,a) if (RooMsgService::instance().isActive(o,RooFit::a,
INFO,RooMsgService::a) RooFit::INFO)) RooMsgService::instance().log(o,RooFit::INFO,RooFit::a,kTRUE
#define ooccxcoutI(o,a) if (RooMsgService::instance().isActive(o,RooMsgServ )
ice::a,RooMsgService::INFO)) RooMsgService::instance().log(o,RooMsgService: #define cxcoutP(a) if (RooMsgService::instance().isActive(this,RooFit::a,Ro
:INFO,RooMsgService::a,kTRUE) oFit::PROGRESS)) RooMsgService::instance().log(this,RooFit::INFO,RooFit::a)
#define cxcoutP(a) if (RooMsgService::instance().isActive(this,RooMsgServic #define ccxcoutP(a) if (RooMsgService::instance().isActive(this,RooFit::a,R
e::a,RooMsgService::PROGRESS)) RooMsgService::instance().log(this,RooMsgSer ooFit::PROGRESS)) RooMsgService::instance().log(this,RooFit::INFO,RooFit::a
vice::INFO,RooMsgService::a) ,kTRUE)
#define ccxcoutP(a) if (RooMsgService::instance().isActive(this,RooMsgServi #define oocxcoutP(o,a) if (RooMsgService::instance().isActive(o,RooFit::a,R
ce::a,RooMsgService::PROGRESS)) RooMsgService::instance().log(this,RooMsgSe ooFit::PROGRESS)) RooMsgService::instance().log(o,RooFit::INFO,RooFit::a)
rvice::INFO,RooMsgService::a,kTRUE) #define ooccxcoutP(o,a) if (RooMsgService::instance().isActive(o,RooFit::a,
#define oocxcoutP(o,a) if (RooMsgService::instance().isActive(o,RooMsgServi RooFit::PROGRESS)) RooMsgService::instance().log(o,RooFit::INFO,RooFit::a,k
ce::a,RooMsgService::PROGRESS)) RooMsgService::instance().log(o,RooMsgServi TRUE)
ce::INFO,RooMsgService::a) #define cxcoutW(a) if (RooMsgService::instance().isActive(this,RooFit::a,Ro
#define ooccxcoutP(o,a) if (RooMsgService::instance().isActive(o,RooMsgServ oFit::WARNING)) RooMsgService::instance().log(this,RooFit::WARNING,RooFit::
ice::a,RooMsgService::PROGRESS)) RooMsgService::instance().log(o,RooMsgServ a)
ice::INFO,RooMsgService::a,kTRUE) #define ccxcoutW(a) if (RooMsgService::instance().isActive(this,RooFit::a,R
#define cxcoutW(a) if (RooMsgService::instance().isActive(this,RooMsgServic ooFit::WARNING)) RooMsgService::instance().log(this,RooFit::WARNING,RooFit:
e::a,RooMsgService::WARNING)) RooMsgService::instance().log(this,RooMsgServ :a,kTRUE)
ice::WARNING,RooMsgService::a) #define oocxcoutW(o,a) if (RooMsgService::instance().isActive(o,RooFit::a,R
#define ccxcoutW(a) if (RooMsgService::instance().isActive(this,RooMsgServi ooFit::WARNING)) RooMsgService::instance().log(o,RooFit::WARNING,RooFit::a)
ce::a,RooMsgService::WARNING)) RooMsgService::instance().log(this,RooMsgSer #define ooccxcoutW(o,a) if (RooMsgService::instance().isActive(o,RooFit::a,
vice::WARNING,RooMsgService::a,kTRUE) RooFit::WARNING)) RooMsgService::instance().log(o,RooFit::WARNING,RooFit::a
#define oocxcoutW(o,a) if (RooMsgService::instance().isActive(o,RooMsgServi ,kTRUE)
ce::a,RooMsgService::WARNING)) RooMsgService::instance().log(o,RooMsgServic #define cxcoutE(a) if (RooMsgService::instance().isActive(this,RooFit::a,Ro
e::WARNING,RooMsgService::a) oFit::ERROR)) RooMsgService::instance().log(this,RooFit::ERROR,RooFit::a)
#define ooccxcoutW(o,a) if (RooMsgService::instance().isActive(o,RooMsgServ #define ccxcoutE(a) if (RooMsgService::instance().isActive(this,RooFit::a,R
ice::a,RooMsgService::WARNING)) RooMsgService::instance().log(o,RooMsgServi ooFit::ERROR)) RooMsgService::instance().log(this,RooFit::ERROR,RooFit::a,k
ce::WARNING,RooMsgService::a,kTRUE) TRUE)
#define cxcoutE(a) if (RooMsgService::instance().isActive(this,RooMsgServic #define oocxcoutE(o,a) if (RooMsgService::instance().isActive(o,RooFit::a,R
e::a,RooMsgService::ERROR)) RooMsgService::instance().log(this,RooMsgServic ooFit::ERROR)) RooMsgService::instance().log(to,RooFit::ERROR,RooFit::a)
e::ERROR,RooMsgService::a) #define ooccxcoutE(o,a) if (RooMsgService::instance().isActive(o,RooFit::a,
#define ccxcoutE(a) if (RooMsgService::instance().isActive(this,RooMsgServi RooFit::ERROR)) RooMsgService::instance().log(o,RooFit::ERROR,RooFit::a,kTR
ce::a,RooMsgService::ERROR)) RooMsgService::instance().log(this,RooMsgServi UE)
ce::ERROR,RooMsgService::a,kTRUE) #define cxcoutF(a) if (RooMsgService::instance().isActive(this,RooFit::a,Ro
#define oocxcoutE(o,a) if (RooMsgService::instance().isActive(o,RooMsgServi oFit::FATAL)) RooMsgService::instance().log(this,RooFit::FATAL,RooFit::a)
ce::a,RooMsgService::ERROR)) RooMsgService::instance().log(to,RooMsgService #define ccxcoutF(a) if (RooMsgService::instance().isActive(this,RooFit::a,R
::ERROR,RooMsgService::a) ooFit::FATAL)) RooMsgService::instance().log(this,RooFit::FATAL,RooFit::a,k
#define ooccxcoutE(o,a) if (RooMsgService::instance().isActive(o,RooMsgServ TRUE)
ice::a,RooMsgService::ERROR)) RooMsgService::instance().log(o,RooMsgService #define oocxcoutF(o,a) if (RooMsgService::instance().isActive(o,RooFit::a,R
::ERROR,RooMsgService::a,kTRUE) ooFit::FATAL)) RooMsgService::instance().log(o,RooFit::FATAL,RooFit::a)
#define cxcoutF(a) if (RooMsgService::instance().isActive(this,RooMsgServic #define ooccxcoutF(o,a) if (RooMsgService::instance().isActive(o,RooFit::a,
e::a,RooMsgService::FATAL)) RooMsgService::instance().log(this,RooMsgServic RooFit::FATAL)) RooMsgService::instance().log(o,RooFit::FATAL,RooFit::a,kTR
e::FATAL,RooMsgService::a) UE)
#define ccxcoutF(a) if (RooMsgService::instance().isActive(this,RooMsgServi
ce::a,RooMsgService::FATAL)) RooMsgService::instance().log(this,RooMsgServi
ce::FATAL,RooMsgService::a,kTRUE)
#define oocxcoutF(o,a) if (RooMsgService::instance().isActive(o,RooMsgServi
ce::a,RooMsgService::FATAL)) RooMsgService::instance().log(o,RooMsgService:
:FATAL,RooMsgService::a)
#define ooccxcoutF(o,a) if (RooMsgService::instance().isActive(o,RooMsgServ
ice::a,RooMsgService::FATAL)) RooMsgService::instance().log(o,RooMsgService
::FATAL,RooMsgService::a,kTRUE)
class RooMsgService : public TObject { class RooMsgService : public TObject {
public: public:
virtual ~RooMsgService() ; virtual ~RooMsgService() ;
enum MsgLevel { DEBUG=0, INFO=1, PROGRESS=2, WARNING=3, ERROR=4, FATAL=5
} ;
enum MsgTopic { Generation=1, Minimization=2, Plotting=4, Fitting=8, Inte
gration=16, LinkStateMgmt=32,
Eval=64, Caching=128, Optimization=256, ObjectHandling=51
2, InputArguments=1024, Tracing=2048,
Contents=4096, DataHandling=8192, NumIntegration=16384 } ;
struct StreamConfig { struct StreamConfig {
public:
void addTopic(RooFit::MsgTopic newTopic) {
topic |= newTopic ;
}
void removeTopic(RooFit::MsgTopic oldTopic) {
topic &= ~oldTopic ;
}
friend class RooMsgService ;
Bool_t match(RooFit::MsgLevel level, RooFit::MsgTopic facility, const R
ooAbsArg* obj) ;
Bool_t match(RooFit::MsgLevel level, RooFit::MsgTopic facility, const T
Object* obj) ;
Bool_t active ; Bool_t active ;
Bool_t universal ; Bool_t universal ;
MsgLevel minLevel ; RooFit::MsgLevel minLevel ;
Int_t topic ; Int_t topic ;
std::string objectName ; std::string objectName ;
std::string className ; std::string className ;
std::string baseClassName ; std::string baseClassName ;
std::string tagName ; std::string tagName ;
Color_t color ; Color_t color ;
Bool_t prefix ; Bool_t prefix ;
ostream* os ; ostream* os ;
Bool_t match(MsgLevel level, MsgTopic facility, const RooAbsArg* obj) ;
Bool_t match(MsgLevel level, MsgTopic facility, const TObject* obj) ;
} ; } ;
// Access to instance // Access to instance
static RooMsgService& instance() ; static RooMsgService& instance() ;
static Bool_t anyDebug() ; static Bool_t anyDebug() ;
// User interface -- Add or delete reporting streams ; // User interface -- Add or delete reporting streams ;
Int_t addStream(MsgLevel level, const RooCmdArg& arg1=RooCmdArg(), const RooCmdArg& arg2=RooCmdArg(), const RooCmdArg& arg3=RooCmdArg(), Int_t addStream(RooFit::MsgLevel level, const RooCmdArg& arg1=RooCmdArg() , const RooCmdArg& arg2=RooCmdArg(), const RooCmdArg& arg3=RooCmdArg(),
const RooCmdArg& arg4=RooCmdArg(), const R ooCmdArg& arg5=RooCmdArg(), const RooCmdArg& arg6=RooCmdArg()); const RooCmdArg& arg4=RooCmdArg(), const R ooCmdArg& arg5=RooCmdArg(), const RooCmdArg& arg6=RooCmdArg());
void deleteStream(Int_t id) ; void deleteStream(Int_t id) ;
StreamConfig getStream(Int_t id) { return _streams[id] ; } StreamConfig& getStream(Int_t id) { return _streams[id] ; }
Int_t numStreams() const { return _streams.size() ; } Int_t numStreams() const { return _streams.size() ; }
void setStreamStatus(Int_t id, Bool_t active) ; void setStreamStatus(Int_t id, Bool_t active) ;
Bool_t getStreamStatus(Int_t id) const ; Bool_t getStreamStatus(Int_t id) const ;
void reset() { cleanup() ; } void reset() { cleanup() ; }
void setGlobalKillBelow(MsgLevel level) { _globMinLevel = level ; } void setGlobalKillBelow(RooFit::MsgLevel level) { _globMinLevel = level ;
MsgLevel globalKillBelow() const { return _globMinLevel ; } }
RooFit::MsgLevel globalKillBelow() const { return _globMinLevel ; }
void Print(Option_t *options= 0) const ; void Print(Option_t *options= 0) const ;
void showPid(Bool_t flag) { _showPid = flag ; } void showPid(Bool_t flag) { _showPid = flag ; }
// Back end -- Send message or check if particular logging configuration is active // Back end -- Send message or check if particular logging configuration is active
ostream& log(const RooAbsArg* self, MsgLevel level, MsgTopic facility, Bo ostream& log(const RooAbsArg* self, RooFit::MsgLevel level, RooFit::MsgTo
ol_t forceSkipPrefix=kFALSE) ; pic facility, Bool_t forceSkipPrefix=kFALSE) ;
ostream& log(const TObject* self, MsgLevel level, MsgTopic facility, Bool ostream& log(const TObject* self, RooFit::MsgLevel level, RooFit::MsgTopi
_t forceSkipPrefix=kFALSE) ; c facility, Bool_t forceSkipPrefix=kFALSE) ;
Bool_t isActive(const RooAbsArg* self, MsgTopic facility, MsgLevel level) Bool_t isActive(const RooAbsArg* self, RooFit::MsgTopic facility, RooFit:
; :MsgLevel level) ;
Bool_t isActive(const TObject* self, MsgTopic facility, MsgLevel level) ; Bool_t isActive(const TObject* self, RooFit::MsgTopic facility, RooFit::M
sgLevel level) ;
static Int_t _debugCount ; static Int_t _debugCount ;
std::map<int,std::string> _levelNames ; std::map<int,std::string> _levelNames ;
std::map<int,std::string> _topicNames ; std::map<int,std::string> _topicNames ;
static void cleanup() ; static void cleanup() ;
// Print level support for RooFit-related messages that are not routed th rough RooMsgService (such as Minuit printouts) // Print level support for RooFit-related messages that are not routed th rough RooMsgService (such as Minuit printouts)
Bool_t silentMode() const { return _silentMode ; } Bool_t silentMode() const { return _silentMode ; }
void setSilentMode(Bool_t flag) { _silentMode = flag ; } void setSilentMode(Bool_t flag) { _silentMode = flag ; }
Int_t errorCount() const { return _errorCount ; } Int_t errorCount() const { return _errorCount ; }
void clearErrorCount() { _errorCount = 0 ; } void clearErrorCount() { _errorCount = 0 ; }
protected: protected:
Int_t activeStream(const RooAbsArg* self, MsgTopic facility, MsgLevel lev Int_t activeStream(const RooAbsArg* self, RooFit::MsgTopic facility, RooF
el) ; it::MsgLevel level) ;
Int_t activeStream(const TObject* self, MsgTopic facility, MsgLevel level Int_t activeStream(const TObject* self, RooFit::MsgTopic facility, RooFit
) ; ::MsgLevel level) ;
std::vector<StreamConfig> _streams ; std::vector<StreamConfig> _streams ;
std::ostream* _devnull ; std::ostream* _devnull ;
std::map<std::string,std::ostream*> _files ; std::map<std::string,std::ostream*> _files ;
MsgLevel _globMinLevel ; RooFit::MsgLevel _globMinLevel ;
MsgLevel _lastMsgLevel ; RooFit::MsgLevel _lastMsgLevel ;
Bool_t _silentMode ; Bool_t _silentMode ;
Bool_t _showPid ; Bool_t _showPid ;
Int_t _errorCount ; Int_t _errorCount ;
// Private ctor -- singleton class // Private ctor -- singleton class
RooMsgService() ; RooMsgService() ;
RooMsgService(const RooMsgService&) ; RooMsgService(const RooMsgService&) ;
 End of changes. 14 change blocks. 
173 lines changed or deleted 171 lines changed or added


 RooNLLVar.h   RooNLLVar.h 
skipping to change at line 35 skipping to change at line 35
// Constructors, assignment etc // Constructors, assignment etc
RooNLLVar() {} ; RooNLLVar() {} ;
RooNLLVar(const char *name, const char* title, RooAbsPdf& pdf, RooAbsData & data, RooNLLVar(const char *name, const char* title, RooAbsPdf& pdf, RooAbsData & data,
const RooCmdArg& arg1 , const RooCmdArg& arg2=Roo CmdArg::none(),const RooCmdArg& arg3=RooCmdArg::none(), const RooCmdArg& arg1 , const RooCmdArg& arg2=Roo CmdArg::none(),const RooCmdArg& arg3=RooCmdArg::none(),
const RooCmdArg& arg4=RooCmdArg::none(), const RooCmdArg& arg5=R ooCmdArg::none(),const RooCmdArg& arg6=RooCmdArg::none(), const RooCmdArg& arg4=RooCmdArg::none(), const RooCmdArg& arg5=R ooCmdArg::none(),const RooCmdArg& arg6=RooCmdArg::none(),
const RooCmdArg& arg7=RooCmdArg::none(), const RooCmdArg& arg8=R ooCmdArg::none(),const RooCmdArg& arg9=RooCmdArg::none()) ; const RooCmdArg& arg7=RooCmdArg::none(), const RooCmdArg& arg8=R ooCmdArg::none(),const RooCmdArg& arg9=RooCmdArg::none()) ;
RooNLLVar(const char *name, const char *title, RooAbsPdf& pdf, RooAbsData & data, RooNLLVar(const char *name, const char *title, RooAbsPdf& pdf, RooAbsData & data,
Bool_t extended=kFALSE, const char* rangeName=0, const char* add CoefRangeName=0, Bool_t extended=kFALSE, const char* rangeName=0, const char* add CoefRangeName=0,
Int_t nCPU=1, Bool_t interleave=kFALSE, Bool_t verbose=kTRUE, Bo ol_t splitRange=kFALSE) ; Int_t nCPU=1, Bool_t interleave=kFALSE, Bool_t verbose=kTRUE, Bo ol_t splitRange=kFALSE, Bool_t cloneData=kTRUE) ;
RooNLLVar(const char *name, const char *title, RooAbsPdf& pdf, RooAbsData & data, RooNLLVar(const char *name, const char *title, RooAbsPdf& pdf, RooAbsData & data,
const RooArgSet& projDeps, Bool_t extended=kFALSE, const char* r angeName=0, const RooArgSet& projDeps, Bool_t extended=kFALSE, const char* r angeName=0,
const char* addCoefRangeName=0, Int_t nCPU=1, Bool_t interleave= kFALSE, Bool_t verbose=kTRUE, Bool_t splitRange=kFALSE) ; const char* addCoefRangeName=0, Int_t nCPU=1, Bool_t interleave= kFALSE, Bool_t verbose=kTRUE, Bool_t splitRange=kFALSE, Bool_t cloneData=kT RUE) ;
RooNLLVar(const RooNLLVar& other, const char* name=0); RooNLLVar(const RooNLLVar& other, const char* name=0);
virtual TObject* clone(const char* newname) const { return new RooNLLVar( *this,newname); } virtual TObject* clone(const char* newname) const { return new RooNLLVar( *this,newname); }
virtual RooAbsTestStatistic* create(const char *name, const char *title, RooAbsReal& pdf, RooAbsData& adata, virtual RooAbsTestStatistic* create(const char *name, const char *title, RooAbsReal& pdf, RooAbsData& adata,
const RooArgSet& projDeps, const char* rangeName, const char* addCoefRangeName=0, const RooArgSet& projDeps, const char* rangeName, const char* addCoefRangeName=0,
Int_t nCPU=1, Bool_t interleave=kFALSE , Bool_t verbose=kTRUE, Bool_t splitRange=kFALSE) { Int_t nCPU=1, Bool_t interleave=kFALSE , Bool_t verbose=kTRUE, Bool_t splitRange=kFALSE) {
return new RooNLLVar(name,title,(RooAbsPdf&)pdf,adata,projDeps,_extende d,rangeName, addCoefRangeName, nCPU, interleave,verbose,splitRange) ; return new RooNLLVar(name,title,(RooAbsPdf&)pdf,adata,projDeps,_extende d,rangeName, addCoefRangeName, nCPU, interleave,verbose,splitRange) ;
} }
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 RooPlot.h   RooPlot.h 
skipping to change at line 115 skipping to change at line 115
// container management // container management
const char* nameOf(Int_t idx) const ; const char* nameOf(Int_t idx) const ;
TObject *findObject(const char *name, const TClass* clas=0) const; TObject *findObject(const char *name, const TClass* clas=0) const;
TObject* getObject(Int_t idx) const ; TObject* getObject(Int_t idx) const ;
Stat_t numItems() const {return _items.GetSize();} Stat_t numItems() const {return _items.GetSize();}
void addPlotable(RooPlotable *plotable, Option_t *drawOptions= "", Bool_t invisible=kFALSE, Bool_t refreshNorm=kFALSE); void addPlotable(RooPlotable *plotable, Option_t *drawOptions= "", Bool_t invisible=kFALSE, Bool_t refreshNorm=kFALSE);
void addObject(TObject* obj, Option_t* drawOptions= "", Bool_t invisible= kFALSE); void addObject(TObject* obj, Option_t* drawOptions= "", Bool_t invisible= kFALSE);
void addTH1(TH1 *hist, Option_t* drawOptions= "", Bool_t invisible=kFALSE ); void addTH1(TH1 *hist, Option_t* drawOptions= "", Bool_t invisible=kFALSE );
void remove(const char* name=0, Bool_t deleteToo=kTRUE) ;
// ascii printing // ascii printing
virtual void printName(ostream& os) const ; virtual void printName(ostream& os) const ;
virtual void printTitle(ostream& os) const ; virtual void printTitle(ostream& os) const ;
virtual void printClassName(ostream& os) const ; virtual void printClassName(ostream& os) const ;
virtual void printArgs(ostream& os) const ; virtual void printArgs(ostream& os) const ;
virtual void printValue(ostream& os) const ; virtual void printValue(ostream& os) const ;
virtual void printMultiline(ostream& os, Int_t content, Bool_t verbose=kF ALSE, TString indent="") const ; virtual void printMultiline(ostream& os, Int_t content, Bool_t verbose=kF ALSE, TString indent="") const ;
virtual Int_t defaultPrintContents(Option_t* opt) const ; virtual Int_t defaultPrintContents(Option_t* opt) const ;
 End of changes. 1 change blocks. 
0 lines changed or deleted 2 lines changed or added


 RooProfileLL.h   RooProfileLL.h 
skipping to change at line 39 skipping to change at line 39
virtual ~RooProfileLL() ; virtual ~RooProfileLL() ;
void setAlwaysStartFromMin(Bool_t flag) { _startFromMin = flag ; } void setAlwaysStartFromMin(Bool_t flag) { _startFromMin = flag ; }
Bool_t alwaysStartFromMin() const { return _startFromMin ; } Bool_t alwaysStartFromMin() const { return _startFromMin ; }
RooAbsReal& nll() { return const_cast<RooAbsReal&>(_nll.arg()) ; } RooAbsReal& nll() { return const_cast<RooAbsReal&>(_nll.arg()) ; }
const RooArgSet& bestFitParams() const ; const RooArgSet& bestFitParams() const ;
virtual RooAbsReal* createProfile(const RooArgSet& paramsOfInterest) ; virtual RooAbsReal* createProfile(const RooArgSet& paramsOfInterest) ;
virtual Bool_t redirectServersHook(const RooAbsCollection& /*newServerLis
t*/, Bool_t /*mustReplaceAll*/, Bool_t /*nameChange*/, Bool_t /*isRecursive
*/) ;
protected: protected:
void validateAbsMin() const ; void validateAbsMin() const ;
RooRealProxy _nll ; // Input -log(L) function RooRealProxy _nll ; // Input -log(L) function
RooSetProxy _obs ; // Parameters of profile likelihood RooSetProxy _obs ; // Parameters of profile likelihood
RooSetProxy _par ; // Marginialized parameters of likelihood RooSetProxy _par ; // Marginialized parameters of likelihood
Bool_t _startFromMin ; // Always start minimization for global minimum? Bool_t _startFromMin ; // Always start minimization for global minimum?
TIterator* _piter ; //! Iterator over profile likelihood parameters to be minimized TIterator* _piter ; //! Iterator over profile likelihood parameters to be minimized
 End of changes. 1 change blocks. 
0 lines changed or deleted 4 lines changed or added


 RooProjectedPdf.h   RooProjectedPdf.h 
skipping to change at line 69 skipping to change at line 69
// Cache management functions // Cache management functions
virtual RooArgList containedArgs(Action) ; virtual RooArgList containedArgs(Action) ;
virtual void printCompactTreeHook(std::ostream&, const char *, Int_t, I nt_t) ; virtual void printCompactTreeHook(std::ostream&, const char *, Int_t, I nt_t) ;
} ; } ;
mutable RooObjCacheManager _cacheMgr ; //! The cache manager mutable RooObjCacheManager _cacheMgr ; //! The cache manager
Bool_t redirectServersHook(const RooAbsCollection& newServerList, Bool_t /*mustReplaceAll*/, Bool_t /*nameChange*/, Bool_t /*isRecursive*/) ; Bool_t redirectServersHook(const RooAbsCollection& newServerList, Bool_t /*mustReplaceAll*/, Bool_t /*nameChange*/, Bool_t /*isRecursive*/) ;
mutable RooArgSet* _curNormSet ; //! mutable RooArgSet* _curNormSet ; //!
const RooAbsReal* getProjection(const RooArgSet* iset, const RooArgSet* n set, int& code) const ; const RooAbsReal* getProjection(const RooArgSet* iset, const RooArgSet* n set, const char* rangeName, int& code) const ;
Double_t evaluate() const ; Double_t evaluate() const ;
private: private:
ClassDef(RooProjectedPdf,1) // Operator p.d.f calculating projection of a nother p.d.f ClassDef(RooProjectedPdf,1) // Operator p.d.f calculating projection of a nother p.d.f
}; };
#endif #endif
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 RooSimultaneous.h   RooSimultaneous.h 
skipping to change at line 52 skipping to change at line 52
RooSimultaneous(const char *name, const char *title, std::map<std::string ,RooAbsPdf*> pdfMap, RooAbsCategoryLValue& inIndexCat) ; RooSimultaneous(const char *name, const char *title, std::map<std::string ,RooAbsPdf*> pdfMap, RooAbsCategoryLValue& inIndexCat) ;
RooSimultaneous(const char *name, const char *title, const RooArgList& pd fList, RooAbsCategoryLValue& indexCat) ; RooSimultaneous(const char *name, const char *title, const RooArgList& pd fList, RooAbsCategoryLValue& indexCat) ;
RooSimultaneous(const RooSimultaneous& other, const char* name=0); RooSimultaneous(const RooSimultaneous& other, const char* name=0);
virtual TObject* clone(const char* newname) const { return new RooSimulta neous(*this,newname) ; } virtual TObject* clone(const char* newname) const { return new RooSimulta neous(*this,newname) ; }
virtual ~RooSimultaneous() ; virtual ~RooSimultaneous() ;
virtual Double_t evaluate() const ; virtual Double_t evaluate() const ;
virtual Bool_t selfNormalized() const { return kTRUE ; } virtual Bool_t selfNormalized() const { return kTRUE ; }
Bool_t addPdf(const RooAbsPdf& pdf, const char* catLabel) ; Bool_t addPdf(const RooAbsPdf& pdf, const char* catLabel) ;
virtual ExtendMode extendMode() const { virtual ExtendMode extendMode() const ;
if (_anyMustExtend) return MustBeExtended ;
if (_anyCanExtend) return CanBeExtended ;
return CanNotBeExtended ;
}
virtual Double_t expectedEvents(const RooArgSet* nset) const ; virtual Double_t expectedEvents(const RooArgSet* nset) const ;
virtual Double_t expectedEvents(const RooArgSet& nset) const { return exp ectedEvents(&nset) ; } virtual Double_t expectedEvents(const RooArgSet& nset) const { return exp ectedEvents(&nset) ; }
virtual Bool_t forceAnalyticalInt(const RooAbsArg&) const { return kTRUE ; } virtual Bool_t forceAnalyticalInt(const RooAbsArg&) const { return kTRUE ; }
Int_t getAnalyticalIntegralWN(RooArgSet& allVars, RooArgSet& numVars, con st RooArgSet* normSet, const char* rangeName=0) const ; Int_t getAnalyticalIntegralWN(RooArgSet& allVars, RooArgSet& numVars, con st RooArgSet* normSet, const char* rangeName=0) const ;
Double_t analyticalIntegralWN(Int_t code, const RooArgSet* normSet, const char* rangeName=0) const ; Double_t analyticalIntegralWN(Int_t code, const RooArgSet* normSet, const char* rangeName=0) const ;
using RooAbsPdf::plotOn ; using RooAbsPdf::plotOn ;
virtual RooPlot* plotOn(RooPlot* frame, virtual RooPlot* plotOn(RooPlot* frame,
skipping to change at line 109 skipping to change at line 105
} ; } ;
mutable RooObjCacheManager _partIntMgr ; // Component normalization manag er mutable RooObjCacheManager _partIntMgr ; // Component normalization manag er
friend class RooSimGenContext ; friend class RooSimGenContext ;
virtual RooAbsGenContext* genContext(const RooArgSet &vars, const RooData Set *prototype=0, virtual RooAbsGenContext* genContext(const RooArgSet &vars, const RooData Set *prototype=0,
const RooArgSet* auxProto=0, Bool_t v erbose= kFALSE) const ; const RooArgSet* auxProto=0, Bool_t v erbose= kFALSE) const ;
RooCategoryProxy _indexCat ; // Index category RooCategoryProxy _indexCat ; // Index category
TList _pdfProxyList ; // List of PDF proxies (named after applicab le category state) TList _pdfProxyList ; // List of PDF proxies (named after applicab le category state)
Int_t _numPdf ; // Number of registered PDFs Int_t _numPdf ; // Number of registered PDFs
Bool_t _anyCanExtend ; // Flag set if all component PDFs are extend
able
Bool_t _anyMustExtend ; // Flag set if all component PDFs are extend
able
ClassDef(RooSimultaneous,1) // Simultaneous operator p.d.f, functions li ke C++ 'switch()' on input p.d.fs operating on index category5A ClassDef(RooSimultaneous,2) // Simultaneous operator p.d.f, functions li ke C++ 'switch()' on input p.d.fs operating on index category5A
}; };
#endif #endif
 End of changes. 3 change blocks. 
10 lines changed or deleted 2 lines changed or added


 RooStatsUtils.h   RooStatsUtils.h 
// @(#)root/roostats:$Id: RooStatsUtils.h 28306 2009-04-21 10:04:57Z moneta $ // @(#)root/roostats:$Id: RooStatsUtils.h 29107 2009-06-19 14:26:42Z moneta $
// Author: Kyle Cranmer 28/07/2008 // Author: Kyle Cranmer 28/07/2008
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2008, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2008, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 53 skipping to change at line 53
RooRealVar *mytarget; RooRealVar *mytarget;
while ((myarg = (RooRealVar *)it.Next())) { while ((myarg = (RooRealVar *)it.Next())) {
if(!myarg) continue; if(!myarg) continue;
mytarget = (RooRealVar*) paramsToChange->find(myarg->GetName()); mytarget = (RooRealVar*) paramsToChange->find(myarg->GetName());
if(!mytarget) continue; if(!mytarget) continue;
mytarget->setVal( myarg->getVal() ); mytarget->setVal( myarg->getVal() );
mytarget->setConstant(myarg->isConstant()); mytarget->setConstant(myarg->isConstant());
} }
} }
inline void RemoveConstantParameters(RooArgSet* set){
RooArgSet constSet;
TIter it = set->createIterator();
RooRealVar *myarg;
while ((myarg = (RooRealVar *)it.Next())) {
if(!myarg) continue;
if(myarg->isConstant()) constSet.add(*myarg);
}
set->remove(constSet);
}
} }
#endif #endif
 End of changes. 2 change blocks. 
1 lines changed or deleted 12 lines changed or added


 RooTreeData.h   RooTreeData.h 
skipping to change at line 20 skipping to change at line 20
* and Stanford University. All rights reserved. * * and Stanford University. All rights reserved. *
* * * *
* Redistribution and use in source and binary forms, * * Redistribution and use in source and binary forms, *
* with or without modification, are permitted according to the terms * * with or without modification, are permitted according to the terms *
* listed in LICENSE (http://roofit.sourceforge.net/license.txt) * * listed in LICENSE (http://roofit.sourceforge.net/license.txt) *
************************************************************************** ***/ ************************************************************************** ***/
#ifndef ROO_TREE_DATA #ifndef ROO_TREE_DATA
#define ROO_TREE_DATA #define ROO_TREE_DATA
#include "RooAbsData.h" #include "RooAbsData.h"
#include "TString.h"
class TTree; #include "RooArgSet.h"
class TIterator; class TTree ;
class TBranch;
class TH1F;
class TH2F;
class TPaveText;
class RooAbsArg;
class RooAbsReal ;
class RooAbsCategory ;
class RooAbsString ;
class Roo1DTable ;
class RooPlot;
class RooFormulaVar ;
class RooLinkedList ;
class RooTreeData : public RooAbsData { class RooTreeData : public RooAbsData {
public: public:
// Constructors, factory methods etc. // Constructors, factory methods etc.
RooTreeData() ; RooTreeData() {} ;
RooTreeData(const char *name, const char *title, const RooArgSet& vars) ;
RooTreeData(const char *name, const char *title, RooTreeData *ntuple,
const RooArgSet& vars, const char *cuts);
RooTreeData(const char *name, const char *title, RooTreeData *t,
const RooArgSet& vars, const RooFormulaVar& cutVar) ;
RooTreeData(const char *name, const char *title, TTree *t,
const RooArgSet& vars, const RooFormulaVar& cutVar) ;
RooTreeData(const char *name, const char *title, TTree *ntuple,
const RooArgSet& vars, const char *cuts);
RooTreeData(const char *name, const char *filename, const char *treename,
const RooArgSet& vars, const char *cuts);
RooTreeData(RooTreeData const & other, const char* newname=0) ;
virtual ~RooTreeData() ;
virtual Bool_t changeObservableName(const char* from, const char* to) ;
// Load a given row of data
virtual void fill() { Fill() ; } ;
virtual const RooArgSet* get(Int_t index) const;
virtual const RooArgSet* get() const { return &_vars ; }
virtual Bool_t valid() const ;
virtual RooAbsArg* addColumn(RooAbsArg& var, Bool_t adjustRange=kTRUE) ;
virtual RooArgSet* addColumns(const RooArgList& varList) ;
virtual Int_t numEntries() const ;
virtual void reset() { Reset() ; }
using RooAbsData::table ;
virtual Roo1DTable* table(const RooAbsCategory& cat, const char* cuts="",
const char* opts="") const ;
virtual RooPlot* statOn(RooPlot* frame,
const RooCmdArg& arg1=RooCmdArg::none(), const Ro
oCmdArg& arg2=RooCmdArg::none(),
const RooCmdArg& arg3=RooCmdArg::none(), const Ro
oCmdArg& arg4=RooCmdArg::none(),
const RooCmdArg& arg5=RooCmdArg::none(), const Ro
oCmdArg& arg6=RooCmdArg::none(),
const RooCmdArg& arg7=RooCmdArg::none(), const Ro
oCmdArg& arg8=RooCmdArg::none()) ;
virtual RooPlot* statOn(RooPlot* frame, const char *what,
const char *label= "", Int_t sigDigits= 2,
Option_t *options= "NELU", Double_t xmin=0.15,
Double_t xmax= 0.65,Double_t ymax=0.85,
const char* cutSpec=0, const char* cutRange=0,
const RooCmdArg* formatCmd=0);
TH1 *fillHistogram(TH1 *hist, const RooArgList &plotVars, const char *cut
s= "", const char* cutRange=0) const;
Double_t moment(RooRealVar &var, Double_t order, const char* cutSpec=0, c
onst char* cutRange=0) const ;
Double_t moment(RooRealVar &var, Double_t order, Double_t offset, const c
har* cutSpec=0, const char* cutRange=0) const ;
Double_t standMoment(RooRealVar &var, Double_t order, const char* cutSpec
=0, const char* cutRange=0) const ;
Double_t mean(RooRealVar& var, const char* cutSpec=0, const char* cutRang
e=0) const { return moment(var,1,0,cutSpec,cutRange) ; }
Double_t sigma(RooRealVar& var, const char* cutSpec=0, const char* cutRan
ge=0) const { return moment(var,2,cutSpec,cutRange) ; }
Double_t skewness(RooRealVar& var, const char* cutSpec=0, const char* cut
Range=0) const { return standMoment(var,3,cutSpec,cutRange) ; }
Double_t kurtosis(RooRealVar& var, const char* cutSpec=0, const char* cut
Range=0) const { return standMoment(var,4,cutSpec,cutRange) ; }
RooRealVar* meanVar(RooRealVar &var, const char* cutSpec=0, const char* c
utRange=0) const ;
RooRealVar* rmsVar(RooRealVar &var, const char* cutSpec=0, const char* cu
tRange=0) const ;
Bool_t getRange(RooRealVar& var, Double_t& lowest, Double_t& highest, Dou
ble_t marginFrac=0, Bool_t symMode=kFALSE) const ;
virtual TList* split(const RooAbsCategory& splitCat) const ;
// Forwarded from TTree
Int_t Scan(const char* varexp="", const char* selection="", Option_t* opt
ion="",
Int_t nentries = 1000000000, Int_t firstentry = 0);
const TTree& tree() const { return *_tree ; }
// WVE Debug stuff
void dump() ;
virtual void printMultiline(ostream& os, Int_t content, Bool_t verbose=kF
ALSE, TString indent="") const ;
using RooAbsData::plotOn ;
virtual RooPlot* plotOn(RooPlot* frame, const RooLinkedList& cmdList) con
st ;
// WVE --- This needs to be public to avoid CINT problems
struct PlotOpt {
PlotOpt() : cuts(""), drawOptions("P"), bins(0), etype(RooAbsData::Poiss
on), cutRange(0), histName(0), histInvisible(kFALSE),
addToHistName(0),addToWgtSelf(1.),addToWgtOther(1.),xErrorSiz
e(1),refreshFrameNorm(kFALSE),correctForBinWidth(kTRUE),
scaleFactor(1.) {} ;
const char* cuts ;
Option_t* drawOptions ;
RooAbsBinning* bins ;
RooAbsData::ErrorType etype ;
const char* cutRange ;
const char* histName ;
Bool_t histInvisible ;
const char* addToHistName ;
Double_t addToWgtSelf ;
Double_t addToWgtOther ;
Double_t xErrorSize ;
Bool_t refreshFrameNorm ;
Bool_t correctForBinWidth ;
Double_t scaleFactor ;
} ;
// PlotOn implementation
virtual RooPlot *plotOn(RooPlot *frame, PlotOpt o) const ;
virtual RooPlot *plotAsymOn(RooPlot* frame, const RooAbsCategoryLValue& a
symCat, PlotOpt o) const ;
virtual RooPlot *plotEffOn(RooPlot* frame, const RooAbsCategoryLValue& ef
fCat, PlotOpt o) const ;
// Draw implementation forwarded to underlying tree
virtual void Draw(Option_t* opt) ;
virtual Long64_t Draw(const char* varexp, const char* selection, Option_t
* option = "", Long64_t nentries = 1000000000, Long64_t firstentry = 0) ;
protected:
friend class RooMCStudy ;
virtual void optimizeReadingWithCaching(RooAbsArg& arg, const RooArgSet&
cacheList, const RooArgSet& keepObsList) ;
Bool_t allClientsCached(RooAbsArg*, const RooArgSet&) ;
// Cache copy feature is not publicly accessible
RooTreeData(const char *name, const char *title, RooTreeData *ntuple,
const RooArgSet& vars, const RooFormulaVar* cutVar, const char
* cutRange,
Int_t nStart, Int_t nStop, Bool_t copyCache);
Int_t ScanCache(const char* varexp="", const char* selection="", Option_t
* option="",
Int_t nentries = 1000000000, Int_t firstentry = 0);
const TTree& cacheTree() const { return *_cacheTree ; }
// Forwarded from TTree
Stat_t GetEntries() const;
void Reset(Option_t* option=0);
Int_t Fill();
Int_t GetEntry(Int_t entry = 0, Int_t getall = 0);
void treePrint();
// Constant term optimizer interface
virtual void cacheArgs(RooArgSet& varSet, const RooArgSet* nset=0) ;
void setArgStatus(const RooArgSet& set, Bool_t active) ;
virtual void resetCache() ;
// TTree Branch buffer size contro
void setBranchBufferSize(Int_t size) { _defTreeBufSize = size ; }
Int_t getBranchBufferSize() const { return _defTreeBufSize ; }
void checkInit() const {
if (_defCtor) {
const_cast<RooTreeData*>(this)->initialize() ;
_defCtor = kFALSE ;
}
}
// Load data from another TTree
void loadValues(const RooTreeData *t, RooFormulaVar* select=0, const char
* rangeName=0, Int_t nStart=0, Int_t nStop=2000000000) ;
void loadValues(const TTree *t, RooFormulaVar* cutVar=0, const char* rang
eName=0, Int_t nStart=0, Int_t nStop=2000000000) ;
void loadValues(const char *filename, const char *treename, RooFormulaVar
*cutVar=0);
friend class RooDataSet ; private:
void createTree(const char* name, const char* title) ;
TTree *_tree ; // TTree holding the data points
TTree *_cacheTree ; //! TTree holding the cached function values
mutable Bool_t _defCtor ;//! Was object constructed with default ctor?
// Column structure definition TTree *_tree ; // TTree holding the data points
RooArgSet _truth; // Truth variables RooArgSet _truth; // Truth variables
TString _blindString ; // Blinding string (optionally read from ASCII f iles) TString _blindString ; // Blinding string (optionally read from ASCII f iles)
static Int_t _defTreeBufSize ; ClassDef(RooTreeData,1) // Dummy class for legacy RooDataSet support
void initCache(const RooArgSet& cachedVars) ;
private:
void initialize();
ClassDef(RooTreeData,1) // Abstract TTree based data collection
}; };
#endif #endif
 End of changes. 5 change blocks. 
210 lines changed or deleted 7 lines changed or added


 RooWorkspace.h   RooWorkspace.h 
skipping to change at line 68 skipping to change at line 68
Bool_t import(const RooArgSet& args, const RooCmdArg& arg1=RooCmdArg(),co nst RooCmdArg& arg2=RooCmdArg(),const RooCmdArg& arg3=RooCmdArg()) ; Bool_t import(const RooArgSet& args, const RooCmdArg& arg1=RooCmdArg(),co nst RooCmdArg& arg2=RooCmdArg(),const RooCmdArg& arg3=RooCmdArg()) ;
Bool_t import(RooAbsData& data, const RooCmdArg& arg1=RooCmdArg(),const R ooCmdArg& arg2=RooCmdArg(),const RooCmdArg& arg3=RooCmdArg()) ; Bool_t import(RooAbsData& data, const RooCmdArg& arg1=RooCmdArg(),const R ooCmdArg& arg2=RooCmdArg(),const RooCmdArg& arg3=RooCmdArg()) ;
// Transaction management interface for multi-step import operations // Transaction management interface for multi-step import operations
Bool_t startTransaction() ; Bool_t startTransaction() ;
Bool_t cancelTransaction() ; Bool_t cancelTransaction() ;
Bool_t commitTransaction() ; Bool_t commitTransaction() ;
// Named set management // Named set management
Bool_t defineSet(const char* name, const RooArgSet& aset, Bool_t importMi ssing=kFALSE) ; Bool_t defineSet(const char* name, const RooArgSet& aset, Bool_t importMi ssing=kFALSE) ;
Bool_t defineSet(const char* name, const char* contentList) ;
Bool_t extendSet(const char* name, const char* newContents) ;
const RooArgSet* set(const char* name) ; const RooArgSet* set(const char* name) ;
// Import, load and save parameter value snapshots // Import, load and save parameter value snapshots
Bool_t saveSnapshot(const char* name, const RooArgSet& params, Bool_t imp ortValues=kFALSE) ; Bool_t saveSnapshot(const char* name, const RooArgSet& params, Bool_t imp ortValues=kFALSE) ;
Bool_t loadSnapshot(const char* name) ; Bool_t loadSnapshot(const char* name) ;
// Import other workspaces void merge(const RooWorkspace& /*other*/) {} ;
Bool_t merge(const RooWorkspace& other) ;
Bool_t join(const RooWorkspace& other) ; // Join p.d.f.s and datasets for simultaneous analysis
// RooAbsPdf* joinPdf(const char* jointPdfName, const char* indexName,
const char* inputMapping) ;
// RooAbsData* joinData(const char* jointDataName, const char* indexNam
e, const char* inputMapping) ;
// Accessor functions // Accessor functions
RooAbsPdf* pdf(const char* name) ; RooAbsPdf* pdf(const char* name) ;
RooAbsReal* function(const char* name) ; RooAbsReal* function(const char* name) ;
RooRealVar* var(const char* name) ; RooRealVar* var(const char* name) ;
RooCategory* cat(const char* name) ; RooCategory* cat(const char* name) ;
RooAbsCategory* catfunc(const char* name) ; RooAbsCategory* catfunc(const char* name) ;
RooAbsData* data(const char* name) ; RooAbsData* data(const char* name) ;
RooAbsArg* arg(const char* name) ; RooAbsArg* arg(const char* name) ;
RooAbsArg* fundArg(const char* name) ; RooAbsArg* fundArg(const char* name) ;
skipping to change at line 99 skipping to change at line 103
Bool_t makeDir() ; Bool_t makeDir() ;
Bool_t cd(const char* path = 0) ; Bool_t cd(const char* path = 0) ;
Bool_t writeToFile(const char* fileName, Bool_t recreate=kTRUE) ; Bool_t writeToFile(const char* fileName, Bool_t recreate=kTRUE) ;
// Tools management // Tools management
RooFactoryWSTool& factory() ; RooFactoryWSTool& factory() ;
RooAbsArg* factory(const char* expr) ; RooAbsArg* factory(const char* expr) ;
// View management // Generic objects
//RooModelView* addView(const char* name, const RooArgSet& observables) ; Bool_t import(TObject& object, Bool_t replaceExisting=kFALSE) ;
//RooModelView* view(const char* name) ; TObject* obj(const char* name) ;
//void removeView(const char* name) ;
// Print function // Print function
void Print(Option_t* opts=0) const ; void Print(Option_t* opts=0) const ;
static void autoImportClassCode(Bool_t flag) ; static void autoImportClassCode(Bool_t flag) ;
static void addClassDeclImportDir(const char* dir) ; static void addClassDeclImportDir(const char* dir) ;
static void addClassImplImportDir(const char* dir) ; static void addClassImplImportDir(const char* dir) ;
static void setClassFileExportDir(const char* dir=0) ; static void setClassFileExportDir(const char* dir=0) ;
skipping to change at line 200 skipping to change at line 203
TUUID _uuid ; // Unique workspace ID TUUID _uuid ; // Unique workspace ID
static Bool_t _autoClass ; // Automatic import of non-distribution class code static Bool_t _autoClass ; // Automatic import of non-distribution class code
CodeRepo _classes ; // Repository of embedded class code. This data membe r _must_ be first CodeRepo _classes ; // Repository of embedded class code. This data membe r _must_ be first
RooArgSet _allOwnedNodes ; // List of owned pdfs and components RooArgSet _allOwnedNodes ; // List of owned pdfs and components
RooLinkedList _dataList ; // List of owned datasets RooLinkedList _dataList ; // List of owned datasets
RooLinkedList _views ; // List of model views RooLinkedList _views ; // List of model views
RooLinkedList _snapshots ; // List of parameter snapshots RooLinkedList _snapshots ; // List of parameter snapshots
RooLinkedList _genObjects ; // List of generic objects
std::map<std::string,RooArgSet> _namedSets ; // Map of named RooArgSets std::map<std::string,RooArgSet> _namedSets ; // Map of named RooArgSets
WSDir* _dir ; //! Transient ROOT directory representation of workspace WSDir* _dir ; //! Transient ROOT directory representation of workspace
RooExpensiveObjectCache _eocache ; // Cache for expensive objects RooExpensiveObjectCache _eocache ; // Cache for expensive objects
RooFactoryWSTool* _factory ; //! Factory tool associated with workspace RooFactoryWSTool* _factory ; //! Factory tool associated with workspace
Bool_t _doExport ; //! Export contents of workspace to CINT? Bool_t _doExport ; //! Export contents of workspace to CINT?
std::string _exportNSName ; //! Name of CINT namespace to which contents are exported std::string _exportNSName ; //! Name of CINT namespace to which contents are exported
Bool_t _openTrans ; //! Is there a transaction open? Bool_t _openTrans ; //! Is there a transaction open?
RooArgSet _sandboxNodes ; //! Sandbox for incoming objects in a transac tion RooArgSet _sandboxNodes ; //! Sandbox for incoming objects in a transac tion
ClassDef(RooWorkspace,5) // Persistable project container for (composite ) pdfs, functions, variables and datasets ClassDef(RooWorkspace,6) // Persistable project container for (composite ) pdfs, functions, variables and datasets
} ; } ;
#endif #endif
 End of changes. 5 change blocks. 
8 lines changed or deleted 14 lines changed or added


 RootFinder.h   RootFinder.h 
// @(#)root/tmva $Id: RootFinder.h 20882 2007-11-19 11:31:26Z rdm $ // @(#)root/tmva $Id: RootFinder.h 29195 2009-06-24 10:39:49Z brun $
// Author: Andreas Hoecker, Joerg Stelzer, Helge Voss, Kai Voss // Author: Andreas Hoecker, Joerg Stelzer, Helge Voss, Kai Voss
/************************************************************************** ******** /************************************************************************** ********
* Project: TMVA - a Root-integrated toolkit for multivariate data analysis * * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
* Package: TMVA * * Package: TMVA *
* Class : RootFinder * * Class : RootFinder *
* Web : http://tmva.sourceforge.net * * Web : http://tmva.sourceforge.net *
* * * *
* Description: * * Description: *
* Root finding using Brents algorithm * * Root finding using Brents algorithm *
* (translated from CERNLIB function RZERO) * * (translated from CERNLIB function RZERO) *
* * * *
* Authors (alphabetical): * * Authors (alphabetical): *
* Andreas Hoecker <Andreas.Hocker@cern.ch> - CERN, Switzerland * * Andreas Hoecker <Andreas.Hocker@cern.ch> - CERN, Switzerland *
* Xavier Prudent <prudent@lapp.in2p3.fr> - LAPP, France *
* Helge Voss <Helge.Voss@cern.ch> - MPI-K Heidelberg, German y * * Helge Voss <Helge.Voss@cern.ch> - MPI-K Heidelberg, German y *
* Kai Voss <Kai.Voss@cern.ch> - U. of Victoria, Canada * * Kai Voss <Kai.Voss@cern.ch> - U. of Victoria, Canada *
* * * *
* Copyright (c) 2005: * * Copyright (c) 2005: *
* CERN, Switzerland * * CERN, Switzerland *
* U. of Victoria, Canada * * U. of Victoria, Canada *
* MPI-K Heidelberg, Germany * * MPI-K Heidelberg, Germany *
* LAPP, Annecy, France *
* * * *
* Redistribution and use in source and binary forms, with or without * * Redistribution and use in source and binary forms, with or without *
* modification, are permitted according to the terms listed in LICENSE * * modification, are permitted according to the terms listed in LICENSE *
* (http://tmva.sourceforge.net/LICENSE) * * (http://tmva.sourceforge.net/LICENSE) *
************************************************************************** ********/ ************************************************************************** ********/
#ifndef ROOT_TMVA_RootFinder #ifndef ROOT_TMVA_RootFinder
#define ROOT_TMVA_RootFinder #define ROOT_TMVA_RootFinder
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// // // //
// RootFinder // // RootFinder //
// // // //
// Root finding using Brents algorithm // // Root finding using Brents algorithm //
// (translated from CERNLIB function RZERO) // // (translated from CERNLIB function RZERO) //
// // // //
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
#ifndef ROOT_TObject
#include "TObject.h" #include "TObject.h"
#ifndef ROOT_TMVA_MsgLogger
#include "TMVA/MsgLogger.h"
#endif #endif
namespace TMVA { namespace TMVA {
class MsgLogger;
class RootFinder : public TObject { class RootFinder : public TObject {
public: public:
RootFinder( Double_t (*rootVal)( Double_t ), RootFinder( Double_t (*rootVal)( Double_t ),
Double_t rootMin, Double_t rootMax, Double_t rootMin, Double_t rootMax,
Int_t maxIterations = 100, Int_t maxIterations = 100,
Double_t absTolerance = 0.0 ); Double_t absTolerance = 0.0 );
virtual ~RootFinder( void ); virtual ~RootFinder( void );
skipping to change at line 74 skipping to change at line 72
private: private:
Double_t fRootMin; // minimum root value Double_t fRootMin; // minimum root value
Double_t fRootMax; // maximum root value Double_t fRootMax; // maximum root value
Int_t fMaxIter; // maximum number of iterations Int_t fMaxIter; // maximum number of iterations
Double_t fAbsTol; // absolute tolerance deviation Double_t fAbsTol; // absolute tolerance deviation
// function pointer // function pointer
Double_t (*fGetRootVal)( Double_t ); Double_t (*fGetRootVal)( Double_t );
mutable MsgLogger fLogger; // message logger mutable MsgLogger* fLogger; //! message logger
MsgLogger& Log() const { return *fLogger; }
ClassDef(RootFinder,0) // Root finding using Brents algorithm ClassDef(RootFinder,0) // Root finding using Brents algorithm
}; };
} // namespace TMVA } // namespace TMVA
#endif #endif
 End of changes. 7 change blocks. 
7 lines changed or deleted 6 lines changed or added


 Rtypes.h   Rtypes.h 
/* @(#)root/base:$Id: Rtypes.h 23198 2008-04-14 09:23:08Z rdm $ */ /* @(#)root/base:$Id: Rtypes.h 28342 2009-04-23 21:27:43Z pcanal $ */
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
#ifndef ROOT_Rtypes #ifndef ROOT_Rtypes
skipping to change at line 273 skipping to change at line 273
static Version_t Class_Version() { return id; } \ static Version_t Class_Version() { return id; } \
static void Dictionary(); \ static void Dictionary(); \
virtual TClass *IsA() const { return name::Class(); } \ virtual TClass *IsA() const { return name::Class(); } \
virtual void ShowMembers(TMemberInspector &insp, char *parent); \ virtual void ShowMembers(TMemberInspector &insp, char *parent); \
virtual void Streamer(TBuffer &b); \ virtual void Streamer(TBuffer &b); \
void StreamerNVirtual(TBuffer &b) { name::Streamer(b); } \ void StreamerNVirtual(TBuffer &b) { name::Streamer(b); } \
static const char *DeclFileName() { return __FILE__; } \ static const char *DeclFileName() { return __FILE__; } \
static int ImplFileLine(); \ static int ImplFileLine(); \
static const char *ImplFileName(); static const char *ImplFileName();
// Version without any virtual functions.
#define _ClassDefNV_(name,id) \
private: \
static TClass *fgIsA; \
public: \
static TClass *Class(); \
static const char *Class_Name(); \
static Version_t Class_Version() { return id; } \
static void Dictionary(); \
TClass *IsA() const { return name::Class(); } \
void ShowMembers(TMemberInspector &insp, char *parent); \
void Streamer(TBuffer &b); \
void StreamerNVirtual(TBuffer &b) { name::Streamer(b); } \
static const char *DeclFileName() { return __FILE__; } \
static int ImplFileLine(); \
static const char *ImplFileName();
#if !defined(R__CONCRETE_INPUT_OPERATOR) #if !defined(R__CONCRETE_INPUT_OPERATOR)
#if !defined(R__ACCESS_IN_SYMBOL) || defined(__CINT__) #if !defined(R__ACCESS_IN_SYMBOL) || defined(__CINT__)
#define ClassDef(name,id) \ #define ClassDef(name,id) \
_ClassDef_(name,id) \ _ClassDef_(name,id) \
static int DeclFileLine() { return __LINE__; } static int DeclFileLine() { return __LINE__; }
#define ClassDefNV(name,id) \
_ClassDefNV_(name,id) \
static int DeclFileLine() { return __LINE__; }
#else #else
#define ClassDef(name,id) \ #define ClassDef(name,id) \
_ClassDef_(name,id) \ _ClassDef_(name,id) \
friend void ROOT__ShowMembersFunc(name *obj, TMemberInspector &R__insp, \ friend void ROOT__ShowMembersFunc(name *obj, TMemberInspector &R__insp, \
char *R__parent); \ char *R__parent); \
static int DeclFileLine() { return __LINE__; } static int DeclFileLine() { return __LINE__; }
#define ClassDefNV(name,id) \
_ClassDefNV_(name,id) \
friend void ROOT__ShowMembersFunc(name *obj, TMemberInspector &R__insp,
\
char *R__parent); \
static int DeclFileLine() { return __LINE__; }
#endif #endif
#else #else
#define ClassDef(name,id) \ #define ClassDef(name,id) \
_ClassDef_(name,id) \ _ClassDef_(name,id) \
friend TBuffer &operator>>(TBuffer &buf, name *&obj); \ friend TBuffer &operator>>(TBuffer &buf, name *&obj); \
friend TBuffer &operator>>(TBuffer &buf, const name *&obj); \ friend TBuffer &operator>>(TBuffer &buf, const name *&obj); \
static int DeclFileLine() { return __LINE__; } static int DeclFileLine() { return __LINE__; }
#define ClassDefNV(name,id) \
_ClassDefNV_(name,id) \
friend TBuffer &operator>>(TBuffer &buf, name *&obj); \
friend TBuffer &operator>>(TBuffer &buf, const name *&obj); \
static int DeclFileLine() { return __LINE__; }
#endif #endif
#define R__UseDummy(name) \ #define R__UseDummy(name) \
class _NAME2_(name,_c) { public: _NAME2_(name,_c)() { if (name) { } } } class _NAME2_(name,_c) { public: _NAME2_(name,_c)() { if (name) { } } }
#if defined(__CINT__) #if defined(__CINT__)
#define ClassImpUnique(name,key) #define ClassImpUnique(name,key)
#define ClassImp(name) #define ClassImp(name)
#else #else
#define ClassImpUnique(name,key) \ #define ClassImpUnique(name,key) \
skipping to change at line 350 skipping to change at line 383
// This ClassDefT is stricly redundant and is kept only for // This ClassDefT is stricly redundant and is kept only for
// backward compatibility. Using #define ClassDef ClassDefT is confusing // backward compatibility. Using #define ClassDef ClassDefT is confusing
// the CINT parser. // the CINT parser.
#if !defined(R__ACCESS_IN_SYMBOL) || defined(__CINT__) #if !defined(R__ACCESS_IN_SYMBOL) || defined(__CINT__)
#define ClassDefT(name,id) \ #define ClassDefT(name,id) \
_ClassDef_(name,id) \ _ClassDef_(name,id) \
static int DeclFileLine() { return __LINE__; } static int DeclFileLine() { return __LINE__; }
#define ClassDefTNV(name,id) \
_ClassDefNV_(name,id) \
static int DeclFileLine() { return __LINE__; }
#else #else
#define ClassDefT(name,id) \ #define ClassDefT(name,id) \
_ClassDef_(name,id) \ _ClassDef_(name,id) \
friend void ROOT__ShowMembersFunc(name *obj, TMemberInspector &R__insp, \ friend void ROOT__ShowMembersFunc(name *obj, TMemberInspector &R__insp, \
char *R__parent); \ char *R__parent); \
static int DeclFileLine() { return __LINE__; } static int DeclFileLine() { return __LINE__; }
#define ClassDefTNV(name,id) \
_ClassDefNV_(name,id) \
friend void ROOT__ShowMembersFunc(name *obj, TMemberInspector &R__insp,
\
char *R__parent); \
static int DeclFileLine() { return __LINE__; }
#endif #endif
#define ClassDefT2(name,Tmpl) #define ClassDefT2(name,Tmpl)
#if defined(__CINT__) #if defined(__CINT__)
#define templateClassImpUnique(name,key) #define templateClassImpUnique(name,key)
#define templateClassImp(name) #define templateClassImp(name)
#else #else
#define templateClassImpUnique(name,key) \ #define templateClassImpUnique(name,key) \
namespace ROOT { \ namespace ROOT { \
 End of changes. 7 change blocks. 
1 lines changed or deleted 46 lines changed or added


 Rule.h   Rule.h 
// @(#)root/tmva $Id: Rule.h 23334 2008-04-19 18:38:57Z brun $ // @(#)root/tmva $Id: Rule.h 29195 2009-06-24 10:39:49Z brun $
// Author: Andreas Hoecker, Joerg Stelzer, Fredrik Tegenfeldt, Helge Voss // Author: Andreas Hoecker, Joerg Stelzer, Fredrik Tegenfeldt, Helge Voss
/************************************************************************** ******** /************************************************************************** ********
* Project: TMVA - a Root-integrated toolkit for multivariate data analysis * * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
* Package: TMVA * * Package: TMVA *
* Class : Rule * * Class : Rule *
* * * *
* Description: * * Description: *
* A class describung a 'rule' * * A class describung a 'rule' *
* Each internal node of a tree defines a rule from all the parental n odes. * * Each internal node of a tree defines a rule from all the parental n odes. *
skipping to change at line 34 skipping to change at line 34
* MPI-K Heidelberg, Germany * * MPI-K Heidelberg, Germany *
* * * *
* Redistribution and use in source and binary forms, with or without * * Redistribution and use in source and binary forms, with or without *
* modification, are permitted according to the terms listed in LICENSE * * modification, are permitted according to the terms listed in LICENSE *
* (http://tmva.sourceforge.net/LICENSE) * * (http://tmva.sourceforge.net/LICENSE) *
************************************************************************** ********/ ************************************************************************** ********/
#ifndef ROOT_TMVA_Rule #ifndef ROOT_TMVA_Rule
#define ROOT_TMVA_Rule #define ROOT_TMVA_Rule
#ifndef ROOT_TMath
#include "TMath.h" #include "TMath.h"
#endif
#ifndef ROOT_TMVA_DecisionTree #ifndef ROOT_TMVA_DecisionTree
#include "TMVA/DecisionTree.h" #include "TMVA/DecisionTree.h"
#endif #endif
#ifndef ROOT_TMVA_Event #ifndef ROOT_TMVA_Event
#include "TMVA/Event.h" #include "TMVA/Event.h"
#endif #endif
#ifndef ROOT_TMVA_MsgLogger
#include "TMVA/MsgLogger.h"
#endif
#ifndef ROOT_TMVA_RuleCut #ifndef ROOT_TMVA_RuleCut
#include "TMVA/RuleCut.h" #include "TMVA/RuleCut.h"
#endif #endif
namespace TMVA { namespace TMVA {
class RuleEnsemble; class RuleEnsemble;
class MsgLogger;
class Rule; class Rule;
ostream& operator<<( ostream& os, const Rule & rule ); ostream& operator<<( ostream& os, const Rule & rule );
class Rule { class Rule {
// ouput operator for a Rule // ouput operator for a Rule
friend ostream& operator<< ( ostream& os, const Rule & rule ); friend ostream& operator<< ( ostream& os, const Rule & rule );
public: public:
skipping to change at line 79 skipping to change at line 78
// copy constructor // copy constructor
Rule( const Rule & other ) { Copy( other ); } Rule( const Rule & other ) { Copy( other ); }
// empty constructor // empty constructor
Rule(); Rule();
virtual ~Rule(); virtual ~Rule();
// set message type // set message type
void SetMsgType( EMsgType t ) { fLogger.SetMinType(t); } void SetMsgType( EMsgType t );
// set RuleEnsemble ptr // set RuleEnsemble ptr
void SetRuleEnsemble( const RuleEnsemble *re ) { fRuleEnsemble = re; } void SetRuleEnsemble( const RuleEnsemble *re ) { fRuleEnsemble = re; }
// set RuleCut ptr // set RuleCut ptr
void SetRuleCut( RuleCut *rc ) { fCut = rc; } void SetRuleCut( RuleCut *rc ) { fCut = rc; }
// set Rule norm // set Rule norm
void SetNorm(Double_t norm) { fNorm = (norm>0 ? 1.0/norm:1.0); } void SetNorm(Double_t norm) { fNorm = (norm>0 ? 1.0/norm:1.0); }
skipping to change at line 159 skipping to change at line 158
Double_t GetSupport() const { return fSupport; } Double_t GetSupport() const { return fSupport; }
Double_t GetSigma() const { return fSigma; } Double_t GetSigma() const { return fSigma; }
Double_t GetNorm() const { return fNorm; } Double_t GetNorm() const { return fNorm; }
Double_t GetImportance() const { return fImportance; } Double_t GetImportance() const { return fImportance; }
Double_t GetImportanceRef() const { return fImportanceRef; } Double_t GetImportanceRef() const { return fImportanceRef; }
// print the rule using flogger // print the rule using flogger
void PrintLogger( const char *title=0 ) const; void PrintLogger( const char *title=0 ) const;
// print just the raw info, used for weight file generation // print just the raw info, used for weight file generation
void PrintRaw( ostream& os ) const; void PrintRaw ( ostream& os ) const; // obsolete
void* AddXMLTo ( void* parent ) const;
void ReadRaw( istream& os ); void ReadRaw ( istream& os ); // obsolete
void ReadFromXML( void* wghtnode );
private: private:
// set sigma - don't use this as non private! // set sigma - don't use this as non private!
void SetSigma(Double_t v) { fSigma=v; } void SetSigma(Double_t v) { fSigma=v; }
// print info about the Rule // print info about the Rule
void Print( ostream& os ) const; void Print( ostream& os ) const;
// copy from another rule // copy from another rule
void Copy( const Rule & other ); void Copy( const Rule & other );
// get the name of variable with index i // get the name of variable with index i
skipping to change at line 187 skipping to change at line 189
Double_t fNorm; // normalization - usually 1.0/t (k) Double_t fNorm; // normalization - usually 1.0/t (k)
Double_t fSupport; // s(k) Double_t fSupport; // s(k)
Double_t fSigma; // t(k) = sqrt(s*(1-s)) Double_t fSigma; // t(k) = sqrt(s*(1-s))
Double_t fCoefficient; // rule coeff. a(k) Double_t fCoefficient; // rule coeff. a(k)
Double_t fImportance; // importance of rule Double_t fImportance; // importance of rule
Double_t fImportanceRef; // importance ref Double_t fImportanceRef; // importance ref
const RuleEnsemble* fRuleEnsemble; // pointer to parent RuleEnsembl e const RuleEnsemble* fRuleEnsemble; // pointer to parent RuleEnsembl e
Double_t fSSB; // S/(S+B) for rule Double_t fSSB; // S/(S+B) for rule
Double_t fSSBNeve; // N(events) reaching the last n ode in reevaluation Double_t fSSBNeve; // N(events) reaching the last n ode in reevaluation
mutable MsgLogger fLogger; // message logger mutable MsgLogger* fLogger; //! message logger
MsgLogger& Log() const { return *fLogger; }
}; };
} // end of TMVA namespace } // end of TMVA namespace
//_______________________________________________________________________ //_______________________________________________________________________
/* inline Double_t TMVA::Rule::EvalEvent( const TMVA::Event& e, Bool_t norm
) const */
/* { */
/* // */
/* // Evaluates the event for the given rule. */
/* // It will return the value scaled with the coefficient and */
/* // if requested, also normalized. */
/* // */
/* if (fCoefficient==0) return 0.0; */
/* Double_t rval = TMVA::Rule::EvalEvent(e); */
/* rval *= (norm ? fNorm : 1.0 ); */
/* return rval*fCoefficient; */
//}
//_______________________________________________________________________
inline Bool_t TMVA::Rule::EvalEvent( const TMVA::Event& e ) const inline Bool_t TMVA::Rule::EvalEvent( const TMVA::Event& e ) const
{ {
// Checks if event is accepted by rule. // Checks if event is accepted by rule.
// Return true if yes and false if not. // Return true if yes and false if not.
// //
return fCut->EvalEvent(e); return fCut->EvalEvent(e);
} }
#endif #endif
 End of changes. 11 change blocks. 
24 lines changed or deleted 12 lines changed or added


 RuleCut.h   RuleCut.h 
// @(#)root/tmva $Id: RuleCut.h 20882 2007-11-19 11:31:26Z rdm $ // @(#)root/tmva $Id: RuleCut.h 29195 2009-06-24 10:39:49Z brun $
// Author: Andreas Hoecker, Joerg Stelzer, Fredrik Tegenfeldt, Helge Voss // Author: Andreas Hoecker, Joerg Stelzer, Fredrik Tegenfeldt, Helge Voss
/************************************************************************** ******** /************************************************************************** ********
* Project: TMVA - a Root-integrated toolkit for multivariate data analysis * * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
* Package: TMVA * * Package: TMVA *
* Class : Rule * * Class : Rule *
* * * *
* Description: * * Description: *
* A class describing a 'rule cut' * * A class describing a 'rule cut' *
* * * *
skipping to change at line 30 skipping to change at line 30
* Redistribution and use in source and binary forms, with or without * * Redistribution and use in source and binary forms, with or without *
* modification, are permitted according to the terms listed in LICENSE * * modification, are permitted according to the terms listed in LICENSE *
* (http://tmva.sourceforge.net/LICENSE) * * (http://tmva.sourceforge.net/LICENSE) *
************************************************************************** ********/ ************************************************************************** ********/
#ifndef ROOT_TMVA_RuleCut #ifndef ROOT_TMVA_RuleCut
#define ROOT_TMVA_RuleCut #define ROOT_TMVA_RuleCut
#ifndef ROOT_TMVA_Event #ifndef ROOT_TMVA_Event
#include "TMVA/Event.h" #include "TMVA/Event.h"
#endif #endif
#ifndef ROOT_TMVA_MsgLogger
#include "TMVA/MsgLogger.h"
#endif
namespace TMVA { namespace TMVA {
class Node; class Node;
class MsgLogger;
class RuleCut { class RuleCut {
public: public:
// main constructor // main constructor
RuleCut( const std::vector< const TMVA::Node * > & nodes ); RuleCut( const std::vector< const TMVA::Node * > & nodes );
// copy constructor // copy constructor
RuleCut( const RuleCut & other ) { Copy( other ); } RuleCut( const RuleCut & other ) { Copy( other ); }
// empty constructor // empty constructor
RuleCut(); RuleCut();
// destructor // destructor
virtual ~RuleCut() {} virtual ~RuleCut();
// evaluate an event // evaluate an event
inline Bool_t EvalEvent( const Event &eve ); inline Bool_t EvalEvent( const Event &eve );
// get cut range for a given selector // get cut range for a given selector
Bool_t GetCutRange(Int_t sel,Double_t &rmin, Double_t &rmax, Bool_t & dormin, Bool_t &dormax) const; Bool_t GetCutRange(Int_t sel,Double_t &rmin, Double_t &rmax, Bool_t & dormin, Bool_t &dormax) const;
// number of cuts // number of cuts
UInt_t GetNcuts() const; UInt_t GetNcuts() const;
skipping to change at line 77 skipping to change at line 76
void SetCutMin( Int_t i, Double_t v ) { fCutMin[i] = v; } void SetCutMin( Int_t i, Double_t v ) { fCutMin[i] = v; }
void SetCutMax( Int_t i, Double_t v ) { fCutMax[i] = v; } void SetCutMax( Int_t i, Double_t v ) { fCutMax[i] = v; }
void SetCutDoMin( Int_t i, Bool_t v ) { fCutDoMin[i] = v; } void SetCutDoMin( Int_t i, Bool_t v ) { fCutDoMin[i] = v; }
void SetCutDoMax( Int_t i, Bool_t v ) { fCutDoMax[i] = v; } void SetCutDoMax( Int_t i, Bool_t v ) { fCutDoMax[i] = v; }
// accessors // accessors
UInt_t GetNvars() const { return fSelector.size(); } UInt_t GetNvars() const { return fSelector.size(); }
UInt_t GetSelector(Int_t is) const { return fSelector[is]; } UInt_t GetSelector(Int_t is) const { return fSelector[is]; }
Double_t GetCutMin(Int_t is) const { return fCutMin[is]; } Double_t GetCutMin(Int_t is) const { return fCutMin[is]; }
Double_t GetCutMax(Int_t is) const { return fCutMax[is]; } Double_t GetCutMax(Int_t is) const { return fCutMax[is]; }
Double_t GetCutDoMin(Int_t is) const { return fCutDoMin[is]; } Char_t GetCutDoMin(Int_t is) const { return fCutDoMin[is]; }
Double_t GetCutDoMax(Int_t is) const { return fCutDoMax[is]; } Char_t GetCutDoMax(Int_t is) const { return fCutDoMax[is]; }
Double_t GetCutNeve() const { return fCutNeve; } Double_t GetCutNeve() const { return fCutNeve; }
Double_t GetPurity() const { return fPurity; } Double_t GetPurity() const { return fPurity; }
private: private:
// copy // copy
inline void Copy( const RuleCut & other); inline void Copy( const RuleCut & other);
// make the cuts from the array of nodes // make the cuts from the array of nodes
void MakeCuts( const std::vector< const TMVA::Node * > & nodes ); void MakeCuts( const std::vector< const TMVA::Node * > & nodes );
std::vector<UInt_t> fSelector; // array of selectors (expressions) std::vector<UInt_t> fSelector; // array of selectors (expressions)
std::vector<Double_t> fCutMin; // array of lower limits std::vector<Double_t> fCutMin; // array of lower limits
std::vector<Double_t> fCutMax; // array of upper limits std::vector<Double_t> fCutMax; // array of upper limits
std::vector<Bool_t> fCutDoMin; // array of usage flags for lower li std::vector<Char_t> fCutDoMin; // array of usage flags for lower li
mits mits <--- stores boolean
std::vector<Bool_t> fCutDoMax; // array of usage flags for upper li std::vector<Char_t> fCutDoMax; // array of usage flags for upper li
mits mits <--- stores boolean
Double_t fCutNeve; // N(events) after cut (possibly wei ghted) Double_t fCutNeve; // N(events) after cut (possibly wei ghted)
Double_t fPurity; // S/(S+B) on training data Double_t fPurity; // S/(S+B) on training data
mutable MsgLogger fLogger; // message logger mutable MsgLogger* fLogger; // message logger
MsgLogger& Log() const { return *fLogger; }
}; };
} }
//_______________________________________________________________________ //_______________________________________________________________________
inline void TMVA::RuleCut::Copy( const TMVA::RuleCut & other ) inline void TMVA::RuleCut::Copy( const TMVA::RuleCut & other )
{ {
// copy from another // copy from another
if (&other != this) { if (&other != this) {
for (UInt_t ns=0; ns<other.GetNvars(); ns++) { for (UInt_t ns=0; ns<other.GetNvars(); ns++) {
fSelector.push_back( other.GetSelector(ns) ); fSelector.push_back( other.GetSelector(ns) );
 End of changes. 7 change blocks. 
12 lines changed or deleted 12 lines changed or added


 RuleEnsemble.h   RuleEnsemble.h 
// @(#)root/tmva $Id: RuleEnsemble.h 20882 2007-11-19 11:31:26Z rdm $ // @(#)root/tmva $Id: RuleEnsemble.h 29195 2009-06-24 10:39:49Z brun $
// Author: Andreas Hoecker, Joerg Stelzer, Fredrik Tegenfeldt, Helge Voss // Author: Andreas Hoecker, Joerg Stelzer, Fredrik Tegenfeldt, Helge Voss
/************************************************************************** ******** /************************************************************************** ********
* Project: TMVA - a Root-integrated toolkit for multivariate data analysis * * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
* Package: TMVA * * Package: TMVA *
* Class : RuleEnsemble * * Class : RuleEnsemble *
* Web : http://tmva.sourceforge.net * * Web : http://tmva.sourceforge.net *
* * * *
* Description: * * Description: *
* A class generating an ensemble of rules * * A class generating an ensemble of rules *
skipping to change at line 51 skipping to change at line 51
#ifndef ROOT_TMVA_DecisionTree #ifndef ROOT_TMVA_DecisionTree
#include "TMVA/DecisionTree.h" #include "TMVA/DecisionTree.h"
#endif #endif
#ifndef ROOT_TMVA_Event #ifndef ROOT_TMVA_Event
#include "TMVA/Event.h" #include "TMVA/Event.h"
#endif #endif
#ifndef ROOT_TMVA_Rule #ifndef ROOT_TMVA_Rule
#include "TMVA/Rule.h" #include "TMVA/Rule.h"
#endif #endif
#ifndef ROOT_TMVA_MsgLogger #ifndef ROOT_TMVA_Types
#include "TMVA/MsgLogger.h" #include "TMVA/Types.h"
#endif #endif
class TH1F; class TH1F;
namespace TMVA { namespace TMVA {
class TBits; class TBits;
class MethodBase;
class MethodRuleFit; class MethodRuleFit;
class RuleFit; class RuleFit;
class RuleEnsemble; class RuleEnsemble;
class MsgLogger;
ostream& operator<<( ostream& os, const RuleEnsemble& event ); ostream& operator<<( ostream& os, const RuleEnsemble& event );
class RuleEnsemble { class RuleEnsemble {
// output operator for a RuleEnsemble // output operator for a RuleEnsemble
friend ostream& operator<< ( ostream& os, const RuleEnsemble& rules ) ; friend ostream& operator<< ( ostream& os, const RuleEnsemble& rules ) ;
public: public:
enum ELearningModel { kFull, kRules, kLinear }; enum ELearningModel { kFull=0, kRules=1, kLinear=2 };
// main constructor // main constructor
RuleEnsemble( RuleFit* rf ); RuleEnsemble( RuleFit* rf );
// copy constructor // copy constructor
RuleEnsemble( const RuleEnsemble& other ); RuleEnsemble( const RuleEnsemble& other );
// empty constructor // empty constructor
RuleEnsemble(); RuleEnsemble();
// destructor // destructor
virtual ~RuleEnsemble(); virtual ~RuleEnsemble();
// initialize // initialize
void Initialize( const RuleFit* rf ); void Initialize( const RuleFit* rf );
// set message type // set message type
void SetMsgType( EMsgType t ) { fLogger.SetMinType(t); } void SetMsgType( EMsgType t );
// makes the model - calls MakeRules() and MakeLinearTerms() // makes the model - calls MakeRules() and MakeLinearTerms()
void MakeModel(); void MakeModel();
// generates the rules from a given forest of decision trees // generates the rules from a given forest of decision trees
void MakeRules( const std::vector< const TMVA::DecisionTree *>& fores t ); void MakeRules( const std::vector< const TMVA::DecisionTree *>& fores t );
// make the linear terms // make the linear terms
void MakeLinearTerms(); void MakeLinearTerms();
skipping to change at line 157 skipping to change at line 159
// Calculate the number of possible rules from a given tree // Calculate the number of possible rules from a given tree
Int_t CalcNRules( const TMVA::DecisionTree* dtree ); Int_t CalcNRules( const TMVA::DecisionTree* dtree );
// Recursivly search for end-nodes; used by CalcNRules() // Recursivly search for end-nodes; used by CalcNRules()
void FindNEndNodes( const TMVA::Node* node, Int_t& nendnodes ); void FindNEndNodes( const TMVA::Node* node, Int_t& nendnodes );
// set current event to be used // set current event to be used
void SetEvent( const Event & e ) { fEvent = &e; fEventCacheOK = kFALS E; } void SetEvent( const Event & e ) { fEvent = &e; fEventCacheOK = kFALS E; }
// fill cached values of rule/linear respons // fill cached values of rule/linear respons
inline void UpdateEventVal(); void UpdateEventVal();
// fill binary rule respons for all events (or selected subset) // fill binary rule respons for all events (or selected subset)
void MakeRuleMap(const std::vector<TMVA::Event *> *events=0, UInt_t i first=0, UInt_t ilast=0); void MakeRuleMap(const std::vector<TMVA::Event *> *events=0, UInt_t i first=0, UInt_t ilast=0);
// clear rule map // clear rule map
void ClearRuleMap() { fRuleMap.clear(); fRuleMapEvents=0; } void ClearRuleMap() { fRuleMap.clear(); fRuleMapEvents=0; }
// evaluates the event using the ensemble of rules // evaluates the event using the ensemble of rules
// the following uses fEventCache, that is per event saved in cache // the following uses fEventCache, that is per event saved in cache
inline Double_t EvalEvent() const; Double_t EvalEvent() const;
inline Double_t EvalEvent( const Event & e ); Double_t EvalEvent( const Event & e );
// same as previous but using other model coefficients // same as previous but using other model coefficients
inline Double_t EvalEvent( Double_t ofs, Double_t EvalEvent( Double_t ofs,
const std::vector<Double_t> & coefs, const std::vector<Double_t> & coefs,
const std::vector<Double_t> & lincoefs) co const std::vector<Double_t> & lincoefs) const;
nst; Double_t EvalEvent( const Event & e,
inline Double_t EvalEvent( const Event & e, Double_t ofs,
Double_t ofs, const std::vector<Double_t> & coefs,
const std::vector<Double_t> & coefs, const std::vector<Double_t> & lincoefs);
const std::vector<Double_t> & lincoefs);
// same as above but using the event index // same as above but using the event index
// these will use fRuleMap - MUST call MakeRuleMap() before - no chec k... // these will use fRuleMap - MUST call MakeRuleMap() before - no chec k...
inline Double_t EvalEvent( UInt_t evtidx ) const; Double_t EvalEvent( UInt_t evtidx ) const;
inline Double_t EvalEvent( UInt_t evtidx, Double_t EvalEvent( UInt_t evtidx,
Double_t ofs, Double_t ofs,
const std::vector<Double_t> & coefs, const std::vector<Double_t> & coefs,
const std::vector<Double_t> & lincoefs) co const std::vector<Double_t> & lincoefs) const;
nst;
// evaluate the linear term using event by reference // evaluate the linear term using event by reference
// inline Double_t EvalLinEvent( UInt_t vind ) const; // Double_t EvalLinEvent( UInt_t vind ) const;
inline Double_t EvalLinEvent() const; Double_t EvalLinEvent() const;
inline Double_t EvalLinEvent( const std::vector<Double_t> & coefs ) c Double_t EvalLinEvent( const std::vector<Double_t> & coefs ) const;
onst; Double_t EvalLinEvent( const Event &e );
inline Double_t EvalLinEvent( const Event &e ); Double_t EvalLinEvent( const Event &e, UInt_t vind );
inline Double_t EvalLinEvent( const Event &e, UInt_t vind ); Double_t EvalLinEvent( const Event &e, const std::vector<Double_t> &
inline Double_t EvalLinEvent( const Event &e, const std::vector<Doubl coefs );
e_t> & coefs );
// idem but using evtidx - must call MakeRuleMap() first // idem but using evtidx - must call MakeRuleMap() first
inline Double_t EvalLinEvent( UInt_t evtidx ) const; Double_t EvalLinEvent( UInt_t evtidx ) const;
inline Double_t EvalLinEvent( UInt_t evtidx, const std::vector<Double Double_t EvalLinEvent( UInt_t evtidx, const std::vector<Double_t> & c
_t> & coefs ) const; oefs ) const;
inline Double_t EvalLinEvent( UInt_t evtidx, UInt_t vind ) const; Double_t EvalLinEvent( UInt_t evtidx, UInt_t vind ) const;
inline Double_t EvalLinEvent( UInt_t evtidx, UInt_t vind, Double_t co Double_t EvalLinEvent( UInt_t evtidx, UInt_t vind, Double_t coefs ) c
efs ) const; onst;
// evaluate linear terms used to fill fEventLinearVal // evaluate linear terms used to fill fEventLinearVal
Double_t EvalLinEventRaw( UInt_t vind, const Event &e, Bool_t norm ) const; Double_t EvalLinEventRaw( UInt_t vind, const Event &e, Bool_t norm ) const;
Double_t EvalLinEventRaw( UInt_t vind, UInt_t evtidx, Bool_t norm ) const; Double_t EvalLinEventRaw( UInt_t vind, UInt_t evtidx, Bool_t norm ) const;
// calculate p(y=1|x) for a given event using the linear terms // calculate p(y=1|x) for a given event using the linear terms
Double_t PdfLinear( Double_t & nsig, Double_t & ntot ) const; Double_t PdfLinear( Double_t & nsig, Double_t & ntot ) const;
// calculate p(y=1|x) for a given event using the rules // calculate p(y=1|x) for a given event using the rules
Double_t PdfRule( Double_t & nsig, Double_t & ntot ) const; Double_t PdfRule( Double_t & nsig, Double_t & ntot ) const;
skipping to change at line 321 skipping to change at line 323
const TMVA::Event *GetRuleMapEvent(UInt_t evtidx) const { return (*fR uleMapEvents)[evtidx]; } const TMVA::Event *GetRuleMapEvent(UInt_t evtidx) const { return (*fR uleMapEvents)[evtidx]; }
Bool_t IsRuleMapOK() const { return fRuleMapOK; } Bool_t IsRuleMapOK() const { return fRuleMapOK; }
// print rule generation info // print rule generation info
void PrintRuleGen() const; void PrintRuleGen() const;
// print the ensemble // print the ensemble
void Print() const; void Print() const;
// print the model in a cryptic way // print the model in a cryptic way
void PrintRaw( ostream& os ) const; void PrintRaw ( ostream& os ) const; // obsolete
void* AddXMLTo ( void* parent ) const;
// read the model from input stream // read the model from input stream
void ReadRaw( istream& istr ); void ReadRaw ( istream& istr ); // obsolete
void ReadFromXML( void* wghtnode );
private: private:
// delete all rules // delete all rules
void DeleteRules() { for (UInt_t i=0; i<fRules.size(); i++) delete fR ules[i]; fRules.clear(); } void DeleteRules() { for (UInt_t i=0; i<fRules.size(); i++) delete fR ules[i]; fRules.clear(); }
// copy method // copy method
void Copy( RuleEnsemble const& other ); void Copy( RuleEnsemble const& other );
// set all coeffs to default values // set all coeffs to default values
skipping to change at line 351 skipping to change at line 355
void AddRule( const Node *node ); void AddRule( const Node *node );
// make a rule // make a rule
Rule *MakeTheRule( const Node *node ); Rule *MakeTheRule( const Node *node );
ELearningModel fLearningModel; // can be full (rul es+linear), rules, linear ELearningModel fLearningModel; // can be full (rul es+linear), rules, linear
Double_t fImportanceCut; // minimum importan ce accepted Double_t fImportanceCut; // minimum importan ce accepted
Double_t fLinQuantile; // quantile cut to remove outliers Double_t fLinQuantile; // quantile cut to remove outliers
Double_t fOffset; // offset in discri minator function Double_t fOffset; // offset in discri minator function
std::vector< TMVA::Rule* > fRules; // vector of rules std::vector< TMVA::Rule* > fRules; // vector of rules
std::vector< Bool_t > fLinTermOK; // flags linear ter ms with sufficient strong importance std::vector< Char_t > fLinTermOK; // flags linear ter ms with sufficient strong importance <-- stores boolean
std::vector< Double_t > fLinDP; // delta+ in eq 24, ref 2 std::vector< Double_t > fLinDP; // delta+ in eq 24, ref 2
std::vector< Double_t > fLinDM; // delta- std::vector< Double_t > fLinDM; // delta-
std::vector< Double_t > fLinCoefficients; // linear coefficie nts, one per variable std::vector< Double_t > fLinCoefficients; // linear coefficie nts, one per variable
std::vector< Double_t > fLinNorm; // norm of ditto, s ee after eq 26 in ref 2 std::vector< Double_t > fLinNorm; // norm of ditto, s ee after eq 26 in ref 2
std::vector< TH1F* > fLinPDFB; // pdfs for each va riable, background std::vector< TH1F* > fLinPDFB; // pdfs for each va riable, background
std::vector< TH1F* > fLinPDFS; // pdfs for each va riable, signal std::vector< TH1F* > fLinPDFS; // pdfs for each va riable, signal
std::vector< Double_t > fLinImportance; // linear term impo rtance std::vector< Double_t > fLinImportance; // linear term impo rtance
std::vector< Double_t > fVarImportance; // one importance p er input variable std::vector< Double_t > fVarImportance; // one importance p er input variable
Double_t fImportanceRef; // reference import ance (max) Double_t fImportanceRef; // reference import ance (max)
Double_t fAverageSupport; // average support (over all rules) Double_t fAverageSupport; // average support (over all rules)
skipping to change at line 379 skipping to change at line 383
std::vector< Double_t > fRulePTag; // p(tag) std::vector< Double_t > fRulePTag; // p(tag)
Double_t fRuleFSig; // N(sig)/N(sig)+N( bkg) Double_t fRuleFSig; // N(sig)/N(sig)+N( bkg)
Double_t fRuleNCave; // N(cuts) average Double_t fRuleNCave; // N(cuts) average
Double_t fRuleNCsig; // idem sigma Double_t fRuleNCsig; // idem sigma
// //
Double_t fRuleMinDist; // minimum rule dis tance Double_t fRuleMinDist; // minimum rule dis tance
UInt_t fNRulesGenerated; // number of rules generated, before cleanup UInt_t fNRulesGenerated; // number of rules generated, before cleanup
// //
const Event* fEvent; // current event. const Event* fEvent; // current event.
Bool_t fEventCacheOK; // true if rule/lin ear respons are updated Bool_t fEventCacheOK; // true if rule/lin ear respons are updated
std::vector<Bool_t> fEventRuleVal; // the rule respons of current event std::vector<Char_t> fEventRuleVal; // the rule respons of current event <----- stores boolean
std::vector<Double_t> fEventLinearVal; // linear respons std::vector<Double_t> fEventLinearVal; // linear respons
// //
Bool_t fRuleMapOK; // true if MakeRule Map() has been called Bool_t fRuleMapOK; // true if MakeRule Map() has been called
std::vector< std::vector<UInt_t> > fRuleMap; // map of rule responses std::vector< std::vector<UInt_t> > fRuleMap; // map of rule responses
UInt_t fRuleMapInd0; // start index UInt_t fRuleMapInd0; // start index
UInt_t fRuleMapInd1; // last index UInt_t fRuleMapInd1; // last index
const std::vector<TMVA::Event *> *fRuleMapEvents; // pointer to vecto r of events used const std::vector<TMVA::Event *> *fRuleMapEvents; // pointer to vecto r of events used
// //
const RuleFit* fRuleFit; // pointer to rule fit object const RuleFit* fRuleFit; // pointer to rule fit object
mutable MsgLogger fLogger; // message logger mutable MsgLogger* fLogger; //! message logger
MsgLogger& Log() const { return *fLogger; }
}; };
} }
//_______________________________________________________________________ //_______________________________________________________________________
inline void TMVA::RuleEnsemble::UpdateEventVal() inline void TMVA::RuleEnsemble::UpdateEventVal()
{ {
// //
// Update rule and linear respons using the current event // Update rule and linear respons using the current event
// //
if (fEventCacheOK) return; if (fEventCacheOK) return;
 End of changes. 17 change blocks. 
41 lines changed or deleted 43 lines changed or added


 RuleFit.h   RuleFit.h 
// @(#)root/tmva $Id: RuleFit.h 23334 2008-04-19 18:38:57Z brun $ // @(#)root/tmva $Id: RuleFit.h 29195 2009-06-24 10:39:49Z brun $
// Author: Andreas Hoecker, Joerg Stelzer, Fredrik Tegenfeldt, Helge Voss // Author: Andreas Hoecker, Joerg Stelzer, Fredrik Tegenfeldt, Helge Voss
/************************************************************************** ******** /************************************************************************** ********
* Project: TMVA - a Root-integrated toolkit for multivariate data analysis * * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
* Package: TMVA * * Package: TMVA *
* Class : RuleFit * * Class : RuleFit *
* Web : http://tmva.sourceforge.net * * Web : http://tmva.sourceforge.net *
* * * *
* Description: * * Description: *
* A class implementing various fits of rule ensembles * * A class implementing various fits of rule ensembles *
skipping to change at line 44 skipping to change at line 44
#endif #endif
#ifndef ROOT_TMVA_RuleEnsemble #ifndef ROOT_TMVA_RuleEnsemble
#include "TMVA/RuleEnsemble.h" #include "TMVA/RuleEnsemble.h"
#endif #endif
#ifndef ROOT_TMVA_RuleFitParams #ifndef ROOT_TMVA_RuleFitParams
#include "TMVA/RuleFitParams.h" #include "TMVA/RuleFitParams.h"
#endif #endif
#ifndef ROOT_TMVA_Event #ifndef ROOT_TMVA_Event
#include "TMVA/Event.h" #include "TMVA/Event.h"
#endif #endif
#ifndef ROOT_TMVA_MsgLogger
#include "TMVA/MsgLogger.h"
#endif
namespace TMVA { namespace TMVA {
class MethodBase; class MethodBase;
class MethodRuleFit; class MethodRuleFit;
class MsgLogger;
class RuleFit { class RuleFit {
public: public:
// main constructor // main constructor
RuleFit( const TMVA::MethodBase *rfbase ); RuleFit( const TMVA::MethodBase *rfbase );
// empty constructor // empty constructor
RuleFit( void ); RuleFit( void );
skipping to change at line 162 skipping to change at line 160
RuleFitParams * GetRuleFitParamsPtr() { return &fRuleFitParams; } RuleFitParams * GetRuleFitParamsPtr() { return &fRuleFitParams; }
const MethodRuleFit * GetMethodRuleFit() cons t { return fMethodRuleFit; } const MethodRuleFit * GetMethodRuleFit() cons t { return fMethodRuleFit; }
const MethodBase * GetMethodBase() cons t { return fMethodBase; } const MethodBase * GetMethodBase() cons t { return fMethodBase; }
private: private:
// copy constructor // copy constructor
RuleFit( const RuleFit & other ); RuleFit( const RuleFit & other );
// copy method // copy method
//void Copy( const RuleFit & other ); void Copy( const RuleFit & other );
std::vector<TMVA::Event *> fTrainingEvents; // all trai ning events std::vector<TMVA::Event *> fTrainingEvents; // all trai ning events
std::vector<TMVA::Event *> fTrainingEventsRndm; // idem, bu t randomly shuffled std::vector<TMVA::Event *> fTrainingEventsRndm; // idem, bu t randomly shuffled
std::vector<Double_t> fEventWeights; // original weights of the events - follows fTrainingEvents std::vector<Double_t> fEventWeights; // original weights of the events - follows fTrainingEvents
UInt_t fNTreeSample; // number o f events in sub sample = frac*neve UInt_t fNTreeSample; // number o f events in sub sample = frac*neve
Double_t fNEveEffTrain; // reweighted n umber of events = sum(wi) Double_t fNEveEffTrain; // reweighted n umber of events = sum(wi)
std::vector< const TMVA::DecisionTree *> fForest; // the input fo rest of decision trees std::vector< const TMVA::DecisionTree *> fForest; // the input fo rest of decision trees
RuleEnsemble fRuleEnsemble; // the ensemble of rules RuleEnsemble fRuleEnsemble; // the ensemble of rules
RuleFitParams fRuleFitParams; // fit rule par ameters RuleFitParams fRuleFitParams; // fit rule par ameters
const MethodRuleFit *fMethodRuleFit; // pointer the method which initialized this RuleFit instance const MethodRuleFit *fMethodRuleFit; // pointer the method which initialized this RuleFit instance
const MethodBase *fMethodBase; // pointer the method base which initialized this RuleFit instance const MethodBase *fMethodBase; // pointer the method base which initialized this RuleFit instance
Bool_t fVisHistsUseImp; // if true, use importance as weight; else coef in vis hists Bool_t fVisHistsUseImp; // if true, use importance as weight; else coef in vis hists
mutable MsgLogger fLogger; // message logg mutable MsgLogger* fLogger; // message logger
er MsgLogger& Log() const { return *fLogger; }
static const Int_t randSEED = 0; // set to 1 for debugging purposes o
r to zero for random seeds
ClassDef(RuleFit,0) // Calculations for Friedman's RuleFit method ClassDef(RuleFit,0) // Calculations for Friedman's RuleFit method
}; };
} }
#endif #endif
 End of changes. 5 change blocks. 
7 lines changed or deleted 8 lines changed or added


 RuleFitParams.h   RuleFitParams.h 
// @(#)root/tmva $Id: RuleFitParams.h 20882 2007-11-19 11:31:26Z rdm $ // @(#)root/tmva $Id: RuleFitParams.h 29195 2009-06-24 10:39:49Z brun $
// Author: Andreas Hoecker, Joerg Stelzer, Fredrik Tegenfeldt, Helge Voss // Author: Andreas Hoecker, Joerg Stelzer, Fredrik Tegenfeldt, Helge Voss
/************************************************************************** ******** /************************************************************************** ********
* Project: TMVA - a Root-integrated toolkit for multivariate data analysis * * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
* Package: TMVA * * Package: TMVA *
* Class : RuleFitParams * * Class : RuleFitParams *
* Web : http://tmva.sourceforge.net * * Web : http://tmva.sourceforge.net *
* * * *
* Description: * * Description: *
* A class doing the actual fitting of a linear model using rules as * * A class doing the actual fitting of a linear model using rules as *
skipping to change at line 50 skipping to change at line 50
#else #else
#ifndef ROOT_TMath #ifndef ROOT_TMath
#include "TMath.h" #include "TMath.h"
#endif #endif
#endif #endif
#ifndef ROOT_TMVA_Event #ifndef ROOT_TMVA_Event
#include "TMVA/Event.h" #include "TMVA/Event.h"
#endif #endif
#ifndef ROOT_TMVA_MsgLogger
#include "TMVA/MsgLogger.h"
#endif
class TTree; class TTree;
namespace TMVA { namespace TMVA {
class RuleEnsemble; class RuleEnsemble;
class RuleFit; class RuleFit;
class MsgLogger;
class RuleFitParams { class RuleFitParams {
public: public:
RuleFitParams(); RuleFitParams();
virtual ~RuleFitParams(); virtual ~RuleFitParams();
void Init(); void Init();
// set message type // set message type
void SetMsgType( EMsgType t ) { fLogger.SetMinType(t); } void SetMsgType( EMsgType t );
// set RuleFit ptr // set RuleFit ptr
void SetRuleFit( RuleFit *rf ) { fRuleFit = rf; } void SetRuleFit( RuleFit *rf ) { fRuleFit = rf; }
// //
// GD path: set N(path steps) // GD path: set N(path steps)
void SetGDNPathSteps( Int_t np ) { fGDNPathSteps = np; } void SetGDNPathSteps( Int_t np ) { fGDNPathSteps = np; }
// GD path: set path step size // GD path: set path step size
void SetGDPathStep( Double_t s ) { fGDPathStep = s; } void SetGDPathStep( Double_t s ) { fGDPathStep = s; }
skipping to change at line 226 skipping to change at line 223
std::vector<Double_t> fAverageSelectorPerf; // average of each variab le over the range fPerfIdx1,2 std::vector<Double_t> fAverageSelectorPerf; // average of each variab le over the range fPerfIdx1,2
std::vector<Double_t> fAverageRulePerf; // average of each rule, same range std::vector<Double_t> fAverageRulePerf; // average of each rule, same range
std::vector<Double_t> fGradVec; // gradient vector - dimension = number of rules in ensemble std::vector<Double_t> fGradVec; // gradient vector - dimension = number of rules in ensemble
std::vector<Double_t> fGradVecLin; // gradient vector - dimension = number of variables std::vector<Double_t> fGradVecLin; // gradient vector - dimension = number of variables
std::vector< std::vector<Double_t> > fGradVecTst; // gradient vect or - one per tau std::vector< std::vector<Double_t> > fGradVecTst; // gradient vect or - one per tau
std::vector< std::vector<Double_t> > fGradVecLinTst; // gradient vect or, linear terms - one per tau std::vector< std::vector<Double_t> > fGradVecLinTst; // gradient vect or, linear terms - one per tau
// //
std::vector<Double_t> fGDErrTst; // error rates per tau std::vector<Double_t> fGDErrTst; // error rates per tau
std::vector<Bool_t> fGDErrTstOK; // error rate is sufficiently lo w std::vector<Char_t> fGDErrTstOK; // error rate is sufficiently lo w <--- stores boolean
std::vector< std::vector<Double_t> > fGDCoefTst; // rule coeffs - one per tau std::vector< std::vector<Double_t> > fGDCoefTst; // rule coeffs - one per tau
std::vector< std::vector<Double_t> > fGDCoefLinTst; // linear coeffs - one per tau std::vector< std::vector<Double_t> > fGDCoefLinTst; // linear coeffs - one per tau
std::vector<Double_t> fGDOfsTst; // offset per tau std::vector<Double_t> fGDOfsTst; // offset per tau
std::vector< Double_t > fGDTauVec; // the tau's std::vector< Double_t > fGDTauVec; // the tau's
UInt_t fGDNTauTstOK; // number of tau in the test-p hase that are ok UInt_t fGDNTauTstOK; // number of tau in the test-p hase that are ok
UInt_t fGDNTau; // number of tau-paths - calcu lated in SetGDTauPrec UInt_t fGDNTau; // number of tau-paths - calcu lated in SetGDTauPrec
Double_t fGDTauPrec; // precision in tau Double_t fGDTauPrec; // precision in tau
UInt_t fGDTauScan; // number scan for tau-paths UInt_t fGDTauScan; // number scan for tau-paths
Double_t fGDTauMin; // min threshold parameter (ta u in eq 26, ref 1) Double_t fGDTauMin; // min threshold parameter (ta u in eq 26, ref 1)
Double_t fGDTauMax; // max threshold parameter (ta u in eq 26, ref 1) Double_t fGDTauMax; // max threshold parameter (ta u in eq 26, ref 1)
skipping to change at line 263 skipping to change at line 260
Double_t *fNTCoeff; // GD path: rule coefficients Double_t *fNTCoeff; // GD path: rule coefficients
Double_t *fNTLinCoeff; // GD path: linear coefficient s Double_t *fNTLinCoeff; // GD path: linear coefficient s
Double_t fsigave; // Sigma of current signal sco re function F(sig) Double_t fsigave; // Sigma of current signal sco re function F(sig)
Double_t fsigrms; // Rms of F(sig) Double_t fsigrms; // Rms of F(sig)
Double_t fbkgave; // Average of F(bkg) Double_t fbkgave; // Average of F(bkg)
Double_t fbkgrms; // Rms of F(bkg) Double_t fbkgrms; // Rms of F(bkg)
private: private:
mutable MsgLogger fLogger; // message logger mutable MsgLogger* fLogger; //! message logger
MsgLogger& Log() const { return *fLogger; }
}; };
// -------------------------------------------------------- // --------------------------------------------------------
class AbsValue { class AbsValue {
public: public:
Bool_t operator()( Double_t first, Double_t second ) const { return T Math::Abs(first) < TMath::Abs(second); } Bool_t operator()( Double_t first, Double_t second ) const { return T Math::Abs(first) < TMath::Abs(second); }
}; };
 End of changes. 6 change blocks. 
8 lines changed or deleted 7 lines changed or added


 SMatrix.h   SMatrix.h 
// @(#)root/smatrix:$Id: SMatrix.h 26866 2008-12-12 10:50:07Z moneta $ // @(#)root/smatrix:$Id: SMatrix.h 28954 2009-06-12 09:36:34Z moneta $
// Author: T. Glebe, L. Moneta, J. Palacios 2005 // Author: T. Glebe, L. Moneta, J. Palacios 2005
#ifndef ROOT_Math_SMatrix #ifndef ROOT_Math_SMatrix
#define ROOT_Math_SMatrix #define ROOT_Math_SMatrix
/************************************************************************** ******* /************************************************************************** *******
// //
// source: // source:
// //
// type: source code // type: source code
skipping to change at line 360 skipping to change at line 360
template <class A, class R2> template <class A, class R2>
bool operator>(const Expr<A,T,D1,D2,R2>& rhs) const; bool operator>(const Expr<A,T,D1,D2,R2>& rhs) const;
/// element wise comparison /// element wise comparison
template <class A, class R2> template <class A, class R2>
bool operator<(const Expr<A,T,D1,D2,R2>& rhs) const; bool operator<(const Expr<A,T,D1,D2,R2>& rhs) const;
/** /**
read only access to matrix element, with indices starting from 0 read only access to matrix element, with indices starting from 0
*/ */
const T& operator()(unsigned int i, unsigned int j) const; const T& operator()(unsigned int i, unsigned int j) const;
/** /**
read/write access to matrix element with indices starting from 0 read/write access to matrix element with indices starting from 0
*/ */
T& operator()(unsigned int i, unsigned int j); T& operator()(unsigned int i, unsigned int j);
/** /**
read only access to matrix element, with indices starting from 0. read only access to matrix element, with indices starting from 0.
Fuction will check index values and it will assert if they are wrong Fuction will check index values and it will assert if they are wrong
*/ */
const T& At(unsigned int i, unsigned int j) const; const T& At(unsigned int i, unsigned int j) const;
/** /**
read/write access to matrix element with indices starting from 0. read/write access to matrix element with indices starting from 0.
Fuction will check index values and it will assert if they are wrong Fuction will check index values and it will assert if they are wrong
*/ */
T& At(unsigned int i, unsigned int j); T& At(unsigned int i, unsigned int j);
// helper class for implementing the m[i][j] operator
class SMatrixRow {
public:
SMatrixRow ( SMatrix<T,D1,D2,R> & rhs, unsigned int i ) :
fMat(&rhs), fRow(i)
{}
T & operator[](int j) { return (*fMat)(fRow,j); }
private:
SMatrix<T,D1,D2,R> * fMat;
unsigned int fRow;
};
class SMatrixRow_const {
public:
SMatrixRow_const ( const SMatrix<T,D1,D2,R> & rhs, unsigned int i ) :
fMat(&rhs), fRow(i)
{}
const T & operator[](int j) const { return (*fMat)(fRow, j); }
private:
const SMatrix<T,D1,D2,R> * fMat;
unsigned int fRow;
};
/**
read only access to matrix element, with indices starting from 0 : m[
i][j]
*/
SMatrixRow_const operator[](unsigned int i) const { return SMatrixRow_c
onst(*this, i); }
/**
read/write access to matrix element with indices starting from 0 : m[
i][j]
*/
SMatrixRow operator[](unsigned int i) { return SMatrixRow(*this, i); }
/** /**
addition with a scalar addition with a scalar
*/ */
SMatrix<T,D1,D2,R>&operator+=(const T& rhs); SMatrix<T,D1,D2,R>&operator+=(const T& rhs);
/** /**
addition with another matrix of any compatible representation addition with another matrix of any compatible representation
*/ */
template <class R2> template <class R2>
SMatrix<T,D1,D2,R>&operator+=(const SMatrix<T,D1,D2,R2>& rhs); SMatrix<T,D1,D2,R>&operator+=(const SMatrix<T,D1,D2,R2>& rhs);
skipping to change at line 471 skipping to change at line 506
matrices upto 5x5. Afterwards the same defult algorithm of Invert() i s used. matrices upto 5x5. Afterwards the same defult algorithm of Invert() i s used.
Note that this method is faster but can suffer from much larger numer ical accuracy Note that this method is faster but can suffer from much larger numer ical accuracy
when the condition of the matrix is large when the condition of the matrix is large
*/ */
bool InvertFast(); bool InvertFast();
/** /**
Invert a square Matrix and returns a new matrix. In case the inversi on fails Invert a square Matrix and returns a new matrix. In case the inversi on fails
the current matrix is returned. the current matrix is returned.
\param ifail . ifail will be set to 0 when inversion is successfull. \param ifail . ifail will be set to 0 when inversion is successfull.
See ROOT::Math::SMatrix::InverseFast for the inversion algorithm See ROOT::Math::SMatrix::InvertFast for the inversion algorithm
*/ */
SMatrix<T,D1,D2,R> InverseFast(int & ifail ) const; SMatrix<T,D1,D2,R> InverseFast(int & ifail ) const;
/** /**
Invertion of a symmetric positive defined Matrix using Choleski decom
position.
( this method changes the current matrix).
Return true if inversion is successfull.
The method used is based on Choleski decomposition
A compile error is given if the matrix is not of type symmetric and a
run-time failure if the
matrix is not positive defined.
For solving a linear system, it is possible to use also the function
ROOT::Math::SolveChol(matrix, vector) which will be faster than perfo
rming the inversion
*/
bool InvertChol();
/**
Invert of a symmetric positive defined Matrix using Choleski decompos
ition.
A compile error is given if the matrix is not of type symmetric and a
run-time failure if the
matrix is not positive defined.
In case the inversion fails the current matrix is returned.
\param ifail . ifail will be set to 0 when inversion is successfull.
See ROOT::Math::SMatrix::InvertChol for the inversion algorithm
*/
SMatrix<T,D1,D2,R> InverseChol(int & ifail ) const;
/**
determinant of square Matrix via Dfact. determinant of square Matrix via Dfact.
Return true when the calculation is successfull. Return true when the calculation is successfull.
\param det will contain the calculated determinant value \param det will contain the calculated determinant value
\b Note: this will destroy the contents of the Matrix! \b Note: this will destroy the contents of the Matrix!
*/ */
bool Det(T& det); bool Det(T& det);
/** /**
determinant of square Matrix via Dfact. determinant of square Matrix via Dfact.
Return true when the calculation is successfull. Return true when the calculation is successfull.
 End of changes. 5 change blocks. 
3 lines changed or deleted 68 lines changed or added


 SMatrix.icc   SMatrix.icc 
// @(#)root/smatrix:$Id: SMatrix.icc 26866 2008-12-12 10:50:07Z moneta $ // @(#)root/smatrix:$Id: SMatrix.icc 28954 2009-06-12 09:36:34Z moneta $
// Authors: T. Glebe, L. Moneta 2005 // Authors: T. Glebe, L. Moneta 2005
#ifndef ROOT_Math_SMatrix_icc #ifndef ROOT_Math_SMatrix_icc
#define ROOT_Math_SMatrix_icc #define ROOT_Math_SMatrix_icc
// ******************************************************************** // ********************************************************************
// //
// source: // source:
// //
// type: source code // type: source code
// //
skipping to change at line 417 skipping to change at line 417
template <class T, unsigned int D1, unsigned int D2, class R> template <class T, unsigned int D1, unsigned int D2, class R>
inline bool SMatrix<T,D1,D2,R>::InvertFast() { inline bool SMatrix<T,D1,D2,R>::InvertFast() {
STATIC_CHECK( D1 == D2,SMatrix_not_square); STATIC_CHECK( D1 == D2,SMatrix_not_square);
return FastInverter<D1,D2>::Dinv((*this).fRep); return FastInverter<D1,D2>::Dinv((*this).fRep);
} }
// fast inversion returning a new matrix // fast inversion returning a new matrix
template <class T, unsigned int D1, unsigned int D2, class R> template <class T, unsigned int D1, unsigned int D2, class R>
inline SMatrix<T,D1,D2,R> SMatrix<T,D1,D2,R>::InverseFast(int & ifail) cons t { inline SMatrix<T,D1,D2,R> SMatrix<T,D1,D2,R>::InverseFast(int & ifail) cons t {
SMatrix<T,D1,D2,R> tmp(*this); SMatrix<T,D1,D2,R> tmp(*this);
bool ok = tmp.Invert(); bool ok = tmp.InvertFast();
ifail = 0;
if (!ok) ifail = 1;
return tmp;
}
// Choleski inversion for symmetric and positive defined matrices
template <class T, unsigned int D1, unsigned int D2, class R>
inline bool SMatrix<T,D1,D2, R>::InvertChol() {
STATIC_CHECK( D1 == D2,SMatrix_not_square);
return CholInverter<D1>::Dinv((*this).fRep);
}
template <class T, unsigned int D1, unsigned int D2, class R>
inline SMatrix<T,D1,D2, R> SMatrix<T,D1,D2, R>::InverseChol(int &ifail) co
nst {
SMatrix<T,D1,D2,R > tmp(*this);
bool ok = tmp.InvertChol();
ifail = 0; ifail = 0;
if (!ok) ifail = 1; if (!ok) ifail = 1;
return tmp; return tmp;
} }
//========================================================================= ===== //========================================================================= =====
// det // det
//========================================================================= ===== //========================================================================= =====
template <class T, unsigned int D1, unsigned int D2, class R> template <class T, unsigned int D1, unsigned int D2, class R>
inline bool SMatrix<T,D1,D2,R>::Det(T& det) { inline bool SMatrix<T,D1,D2,R>::Det(T& det) {
 End of changes. 2 change blocks. 
2 lines changed or deleted 19 lines changed or added


 SPlot.h   SPlot.h 
// @(#)root/roostats:$Id: SPlot.h 26324 2008-11-20 17:17:32Z moneta $ // @(#)root/roostats:$Id: SPlot.h 29107 2009-06-19 14:26:42Z moneta $
// Author: Kyle Cranmer 21/07/2008 // Author: Kyle Cranmer 21/07/2008
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2008, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2008, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
#ifndef RooStats_SPlot #ifndef RooStats_SPlot
#define RooStats_SPlot #define RooStats_SPlot
class RooAbsReal; class RooAbsReal;
class RooAbsPdf; class RooAbsPdf;
class RooFitResult; class RooFitResult;
class RooRealVar; class RooRealVar;
class RooSimultaneous; class RooSimultaneous;
#ifndef ROOT_TH1 #ifndef ROO_MSG_SERVICE
#include "TH1.h" #include "RooMsgService.h"
#endif #endif
#include "RooFitResult.h" #include "RooFitResult.h"
#include "RooRealVar.h" #include "RooRealVar.h"
#include "RooHist.h" #include "RooHist.h"
#include "RooPlot.h" #include "RooPlot.h"
#include "RooDataSet.h" #include "RooDataSet.h"
namespace RooStats{ namespace RooStats{
class SPlot : public TH1F { class SPlot: public TNamed {
public: public:
~SPlot();
SPlot(); SPlot();
SPlot(const SPlot &other); SPlot(const SPlot &other);
SPlot(const char* name, const char *title, Int_t nbins, Double_t xmin, SPlot(const char* name, const char* title);
Double_t xmax); SPlot(const char* name, const char* title, const RooDataSet &data);
SPlot(const char* name, const char* title,RooDataSet& data, RooAbsPdf*
pdf,
const RooArgList &yieldsList,const RooArgSet &projDeps=RooArgSet()
,
bool includeWeights=kTRUE, bool copyDataSet = kFALSE, const char*
newName = "");
RooDataSet* SetSData(RooDataSet* data);
RooDataSet* GetSDataSet() const;
static RooDataSet* RooArgList GetSWeightVars() const;
AddSWeightToData(const RooSimultaneous* pdf, const RooArgList &yields
Tmp,
RooDataSet &data, const RooArgSet &projDeps=RooArgSet
()) ;
void FillSPlot(const RooDataSet &data, TString varname, TString weightn ame); Int_t GetNumSWeightVars() const;
void FillSPlot(const RooAbsReal &x, RooAbsReal &nstar, RooDataSet data, void AddSWeight(RooAbsPdf* pdf, const RooArgList &yieldsTmp,
const RooFitResult &fitRes, const RooArgList &pdfList, const RooArgList &y const RooArgSet &projDeps=RooArgSet(), bool includeWeigh
ields, Bool_t doErrors, const RooArgSet &projDeps=RooArgSet() ); ts=kTRUE);
void FillSPlot(const RooAbsReal &x, RooAbsReal &nstar, RooDataSet data,
const RooFitResult &fitRes, const RooArgList &pdfList, const RooArgList &y
ields, RooAbsPdf &totalPdf, Bool_t doErrors, const RooArgSet &projDeps=RooA
rgSet() );
void FillSPlot(const RooAbsReal &x, RooAbsReal &nstar, RooDataSet data, const RooFitResult &fitRes, RooAbsPdf &totalPdf, RooArgList &yields, Bool_ t doErrors, const RooArgSet &projDeps=RooArgSet() ); Double_t GetSumOfEventSWeight(Int_t numEvent) const;
Double_t GetComponentValue(RooAbsPdf &pdf, RooArgList &yieldsTmp, Int_t Double_t GetYieldFromSWeight(const char* sVariable) const;
igood, RooArgSet &normSet);
Double_t GetSWeight(Int_t numEvent, const char* sVariable) const;
protected: protected:
RooArgList fSWeightVars;
// RooListProxy fSWeightVars;
RooDataSet* fSData;
ClassDef(SPlot,1) // Class used for making sPlots ClassDef(SPlot,1) // Class used for making sPlots
};
};
} }
#endif #endif
 End of changes. 13 change blocks. 
23 lines changed or deleted 37 lines changed or added


 SamplingDistribution.h   SamplingDistribution.h 
skipping to change at line 34 skipping to change at line 34
#include <vector> #include <vector>
namespace RooStats { namespace RooStats {
class SamplingDistribution : public TNamed { class SamplingDistribution : public TNamed {
public: public:
// Constructor for SamplingDistribution // Constructor for SamplingDistribution
SamplingDistribution(const char *name,const char *title, std::vector<Do uble_t>& samplingDist); SamplingDistribution(const char *name,const char *title, std::vector<Do uble_t>& samplingDist, const TString varName = "");
SamplingDistribution(const char *name,const char *title, SamplingDistribution(const char *name,const char *title,
std::vector<Double_t>& samplingDist, std::vector<Do uble_t>& sampleWeights); std::vector<Double_t>& samplingDist, std::vector<Do uble_t>& sampleWeights, const TString varName = "");
SamplingDistribution(const char *name,const char *title); SamplingDistribution(const char *name,const char *title, const TString varName = "");
// Default constructor for SamplingDistribution // Default constructor for SamplingDistribution
SamplingDistribution(); SamplingDistribution();
// Destructor of SamplingDistribution // Destructor of SamplingDistribution
virtual ~SamplingDistribution(); virtual ~SamplingDistribution();
// get the inverse of the Cumulative distribution function // get the inverse of the Cumulative distribution function
Double_t InverseCDF(Double_t pvalue); Double_t InverseCDF(Double_t pvalue);
skipping to change at line 63 skipping to change at line 63
// together with the inverse based on sampling variation // together with the inverse based on sampling variation
Double_t InverseCDF(Double_t pvalue, Double_t sigmaVariaton, Double_t& inverseVariation); Double_t InverseCDF(Double_t pvalue, Double_t sigmaVariaton, Double_t& inverseVariation);
// merge two sampling distributions // merge two sampling distributions
void Add(SamplingDistribution* other); void Add(SamplingDistribution* other);
// size of samples // size of samples
Int_t GetSize() const{return fSamplingDist.size();} Int_t GetSize() const{return fSamplingDist.size();}
// Get test statistics values // Get test statistics values
std::vector<Double_t> GetSamplingDistribution(){return fSamplingDist;} std::vector<Double_t> GetSamplingDistribution() const {return fSampling Dist;}
// Get the sampling weights // Get the sampling weights
std::vector<Double_t> GetSampleWeights(){return fSampleWeights;} std::vector<Double_t> GetSampleWeights() const {return fSampleWeights;}
const TString GetVarName() const {return fVarName;}
private: private:
std::vector<Double_t> fSamplingDist; // vector of points for the sampli ng distribution std::vector<Double_t> fSamplingDist; // vector of points for the sampli ng distribution
std::vector<Double_t> fSampleWeights; // vector of weights for the samp les std::vector<Double_t> fSampleWeights; // vector of weights for the samp les
// store a RooRealVar that this distribution corresponds to? // store a RooRealVar that this distribution corresponds to?
TString fVarName;
protected: protected:
ClassDef(SamplingDistribution,1) // Class containing the results of th e HybridCalculator ClassDef(SamplingDistribution,1) // Class containing the results of th e HybridCalculator
}; };
} }
#endif #endif
 End of changes. 6 change blocks. 
5 lines changed or deleted 9 lines changed or added


 Scope.h   Scope.h 
// @(#)root/reflex:$Id: Scope.h 28064 2009-04-02 13:31:29Z axel $ // @(#)root/reflex:$Id: Scope.h 28733 2009-05-28 04:34:44Z pcanal $
// Author: Stefan Roiser 2004 // Author: Stefan Roiser 2004
// Copyright CERN, CH-1211 Geneva 23, 2004-2006, All rights reserved. // Copyright CERN, CH-1211 Geneva 23, 2004-2006, All rights reserved.
// //
// Permission to use, copy, modify, and distribute this software for any // Permission to use, copy, modify, and distribute this software for any
// purpose is hereby granted without fee, provided that this copyright and // purpose is hereby granted without fee, provided that this copyright and
// permissions notice appear in all copies and derivatives. // permissions notice appear in all copies and derivatives.
// //
// This software is provided "as is" without express or implied warranty. // This software is provided "as is" without express or implied warranty.
skipping to change at line 747 skipping to change at line 747
size_t UsingDirectiveSize() const; size_t UsingDirectiveSize() const;
Scope_Iterator UsingDirective_Begin() const; Scope_Iterator UsingDirective_Begin() const;
Scope_Iterator UsingDirective_End() const; Scope_Iterator UsingDirective_End() const;
Reverse_Scope_Iterator UsingDirective_RBegin() const; Reverse_Scope_Iterator UsingDirective_RBegin() const;
Reverse_Scope_Iterator UsingDirective_REnd() const; Reverse_Scope_Iterator UsingDirective_REnd() const;
public: public:
/** /**
* AddBase will add information about a Base class
* @param base type of the base class
* @param offsFP pointer to a function stub for calculating the base c
lass offset
* @param modifiers the modifiers of the base class
*/
void AddBase(const Type & bas, OffsetFunction offsFP, unsigned int mo
difiers = 0) const;
/**
* AddBase will add the information about a Base class
* @param b pointer to the base class
*/
void AddBase(const Base & b) const;
/**
* AddDataMember will add the information about a data member * AddDataMember will add the information about a data member
* @param dm data member to add * @param dm data member to add
*/ */
void AddDataMember( const Member & dm ) const; void AddDataMember( const Member & dm ) const;
/** /**
* AddDataMember will add the information about a data member * AddDataMember will add the information about a data member
* @param nam the name of the data member * @param nam the name of the data member
* @param typ the type of the data member * @param typ the type of the data member
* @param offs the offset of the data member relative to the beginning of the scope * @param offs the offset of the data member relative to the beginning of the scope
* @param modifiers of the data member * @param modifiers of the data member
*/ */
void AddDataMember( const char * name, Member AddDataMember( const char * name,
const Type & type, const Type & type,
size_t offset, size_t offset,
unsigned int modifiers = 0 ) const; unsigned int modifiers = 0,
char * interpreterOffset = 0 ) const;
/**
* AddDataMember will add the information about a data member
* @param output a placeholder for 'Member' pointing to the data memb
er
* @param nam the name of the data member
* @param typ the type of the data member
* @param offs the offset of the data member relative to the beginnin
g of the scope
* @param modifiers of the data member
*/
void AddDataMember(Member& output, const char* name, const Type& type
, size_t offset, unsigned int modifiers = 0, char* interpreterOffset = 0) c
onst;
/** /**
* AddFunctionMember will add the information about a function member * AddFunctionMember will add the information about a function member
* @param fm function member to add * @param fm function member to add
*/ */
void AddFunctionMember( const Member & fm ) const; void AddFunctionMember( const Member & fm ) const;
/** /**
* AddFunctionMember will add the information about a function member * AddFunctionMember will add the information about a function member
* @param nam the name of the function member * @param nam the name of the function member
* @param typ the type of the function member * @param typ the type of the function member
* @param stubFP a pointer to the stub function * @param stubFP a pointer to the stub function
* @param stubCtx a pointer to the context of the function member * @param stubCtx a pointer to the context of the function member
* @param params a semi colon separated list of parameters * @param params a semi colon separated list of parameters
* @param modifiers of the function member * @param modifiers of the function member
*/ */
void AddFunctionMember( const char * name, Member AddFunctionMember( const char * name,
const Type & type, const Type & type,
StubFunction stubFP, StubFunction stubFP,
void * stubCtx = 0, void * stubCtx = 0,
const char * params = 0, const char * params = 0,
unsigned int modifiers = 0 ) const; unsigned int modifiers = 0 ) const;
/** /**
* AddMemberTemplate will add a member template to this scope * AddMemberTemplate will add a member template to this scope
* @param mt member template to add * @param mt member template to add
*/ */
skipping to change at line 1363 skipping to change at line 1368
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Reverse_Scope_Iterator Reflex::Scope::UsingDirective_REnd() const { inline Reflex::Reverse_Scope_Iterator Reflex::Scope::UsingDirective_REnd() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( * this ) return fScopeName->fScopeBase->UsingDirective_REnd(); if ( * this ) return fScopeName->fScopeBase->UsingDirective_REnd();
return Dummy::ScopeCont().rend(); return Dummy::ScopeCont().rend();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline void Reflex::Scope::AddBase( const Type & bas,
OffsetFunction offsFP,
unsigned int modifiers /* = 0 */) const
{
//-------------------------------------------------------------------------
------
if ( * this) fScopeName->fScopeBase->AddBase( bas, offsFP, modifiers );
}
//-------------------------------------------------------------------------
------
inline void Reflex::Scope::AddBase(const Base & b) const {
//-------------------------------------------------------------------------
------
if ( * this) fScopeName->fScopeBase->AddBase( b );
}
//-------------------------------------------------------------------------
------
inline void Reflex::Scope::AddSubScope( const Scope & sc ) const { inline void Reflex::Scope::AddSubScope( const Scope & sc ) const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( * this) fScopeName->fScopeBase->AddSubScope( sc ); if ( * this) fScopeName->fScopeBase->AddSubScope( sc );
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline void Reflex::Scope::AddSubScope( const char * scope, inline void Reflex::Scope::AddSubScope( const char * scope,
TYPE scopeType ) const { TYPE scopeType ) const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( * this ) fScopeName->fScopeBase->AddSubScope( scope, scopeType ); if ( * this ) fScopeName->fScopeBase->AddSubScope( scope, scopeType );
 End of changes. 6 change blocks. 
18 lines changed or deleted 40 lines changed or added


 ScopeBase.h   ScopeBase.h 
// @(#)root/reflex:$Id: ScopeBase.h 28145 2009-04-07 17:00:06Z axel $ // @(#)root/reflex:$Id: ScopeBase.h 28733 2009-05-28 04:34:44Z pcanal $
// Author: Stefan Roiser 2004 // Author: Stefan Roiser 2004
// Copyright CERN, CH-1211 Geneva 23, 2004-2006, All rights reserved. // Copyright CERN, CH-1211 Geneva 23, 2004-2006, All rights reserved.
// //
// Permission to use, copy, modify, and distribute this software for any // Permission to use, copy, modify, and distribute this software for any
// purpose is hereby granted without fee, provided that this copyright and // purpose is hereby granted without fee, provided that this copyright and
// permissions notice appear in all copies and derivatives. // permissions notice appear in all copies and derivatives.
// //
// This software is provided "as is" without express or implied warranty. // This software is provided "as is" without express or implied warranty.
skipping to change at line 172 skipping to change at line 172
virtual Reverse_Member_Iterator FunctionMember_RBegin(EMEMBERQUERY in h = INHERITEDMEMBERS_DEFAULT) const; virtual Reverse_Member_Iterator FunctionMember_RBegin(EMEMBERQUERY in h = INHERITEDMEMBERS_DEFAULT) const;
virtual Reverse_Member_Iterator FunctionMember_REnd(EMEMBERQUERY inh = INHERITEDMEMBERS_DEFAULT) const; virtual Reverse_Member_Iterator FunctionMember_REnd(EMEMBERQUERY inh = INHERITEDMEMBERS_DEFAULT) const;
/** /**
* GenerateDict will produce the dictionary information of this type * GenerateDict will produce the dictionary information of this type
* @param generator a reference to the dictionary generator instance * @param generator a reference to the dictionary generator instance
*/ */
virtual void GenerateDict(DictionaryGenerator &generator) const; virtual void GenerateDict(DictionaryGenerator &generator) const;
/** /**
* GetBasePosition will return fBasePosition
* @return The position where the unscoped Name starts in the typename
*/
size_t GetBasePosition() const;
/**
* GlobalScope will return the global scope representation\ * GlobalScope will return the global scope representation\
* @return global scope * @return global scope
*/ */
static Scope GlobalScope(); static Scope GlobalScope();
/** /**
* HasBase will check whether this class has a base class given * HasBase will check whether this class has a base class given
* as argument * as argument
* @param cl the base-class to check for * @param cl the base-class to check for
* @return the Base info if it is found, an empty base otherwise (can be tested for bool) * @return the Base info if it is found, an empty base otherwise (can be tested for bool)
skipping to change at line 457 skipping to change at line 463
Reverse_Scope_Iterator UsingDirective_REnd() const; Reverse_Scope_Iterator UsingDirective_REnd() const;
protected: protected:
/** protected constructor for initialisation of the global namespace */ /** protected constructor for initialisation of the global namespace */
ScopeBase(); ScopeBase();
public: public:
/** /**
* AddBase will add information about a Base class
* @param base type of the base class
* @param offsFP pointer to a function stub for calculating the base c
lass offset
* @param modifiers the modifiers of the base class
*/
virtual void AddBase(const Type& bas, OffsetFunction offsFP, unsigned
int modifiers = 0) const;
/**
* AddBase will add the information about a Base class
* @param b pointer to the base class
*/
virtual void AddBase(const Base& b) const;
/**
* AddDataMember will add the information about a data MemberAt * AddDataMember will add the information about a data MemberAt
* @param dm pointer to data MemberAt * @param dm pointer to data MemberAt
*/ */
virtual void AddDataMember(const Member& dm) const; virtual void AddDataMember(const Member& dm) const;
virtual void AddDataMember(const char* name, const Type& type, size_t virtual Member AddDataMember(const char * name,
offset, unsigned int modifiers = 0) const; const Type & type,
virtual void AddDataMember(Member& output, const char* name, const Ty size_t offset,
pe& type, size_t offset, unsigned int modifiers = 0, char* interpreterOffse unsigned int modifiers = 0,
t = 0) const; char * interpreterOffset = 0 ) const;
/** /**
* AddFunctionMember will add the information about a function MemberA t * AddFunctionMember will add the information about a function MemberA t
* @param fm pointer to function MemberAt * @param fm pointer to function MemberAt
*/ */
virtual void AddFunctionMember( const Member & fm ) const; virtual void AddFunctionMember( const Member & fm ) const;
virtual void AddFunctionMember( const char * name, virtual Member AddFunctionMember( const char * name,
const Type & type, const Type & type,
StubFunction stubFP, StubFunction stubFP,
void * stubCtx = 0, void * stubCtx = 0,
const char * params = 0, const char * params = 0,
unsigned int modifiers = 0 ) const; unsigned int modifiers = 0 ) const;
virtual void AddMemberTemplate( const MemberTemplate & mt ) const ; virtual void AddMemberTemplate( const MemberTemplate & mt ) const ;
/** /**
* AddSubScope will add a sub-At to this one * AddSubScope will add a sub-At to this one
skipping to change at line 772 skipping to change at line 795
return ((const std::vector<Member>&)fFunctionMembers).rbegin(); return ((const std::vector<Member>&)fFunctionMembers).rbegin();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Reverse_Member_Iterator Reflex::ScopeBase::FunctionMember_RE nd(EMEMBERQUERY) const { inline Reflex::Reverse_Member_Iterator Reflex::ScopeBase::FunctionMember_RE nd(EMEMBERQUERY) const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return ((const std::vector<Member>&)fFunctionMembers).rend(); return ((const std::vector<Member>&)fFunctionMembers).rend();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline size_t Reflex::ScopeBase::GetBasePosition() const {
//-------------------------------------------------------------------------
------
return fBasePosition;
}
//-------------------------------------------------------------------------
------
inline Reflex::Scope_Iterator Reflex::ScopeBase::SubScope_Begin() const { inline Reflex::Scope_Iterator Reflex::ScopeBase::SubScope_Begin() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return fSubScopes.begin(); return fSubScopes.begin();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Scope_Iterator Reflex::ScopeBase::SubScope_End() const { inline Reflex::Scope_Iterator Reflex::ScopeBase::SubScope_End() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return fSubScopes.end(); return fSubScopes.end();
} }
 End of changes. 6 change blocks. 
7 lines changed or deleted 37 lines changed or added


 SdivSqrtSplusB.h   SdivSqrtSplusB.h 
// @(#)root/tmva $Id: SdivSqrtSplusB.h 20882 2007-11-19 11:31:26Z rdm $ // @(#)root/tmva $Id: SdivSqrtSplusB.h 29122 2009-06-22 06:51:30Z brun $
// Author: Andreas Hoecker, Joerg Stelzer, Helge Voss, Kai Voss // Author: Andreas Hoecker, Joerg Stelzer, Helge Voss, Kai Voss
/************************************************************************** ******** /************************************************************************** ********
* Project: TMVA - a Root-integrated toolkit for multivariate data analysis * * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
* Package: TMVA * * Package: TMVA *
* Class : SdivSqrtSplusB * * Class : SdivSqrtSplusB *
* Web : http://tmva.sourceforge.net * * Web : http://tmva.sourceforge.net *
* * * *
* Description: Implementation of the SdivSqrtSplusB as separation criterio n * * Description: Implementation of the SdivSqrtSplusB as separation criterio n *
* S/sqrt(S + B) * * S/sqrt(S + B) *
* * * *
* Authors (alphabetical): * * Authors (alphabetical): *
* Andreas Hoecker <Andreas.Hocker@cern.ch> - CERN, Switzerland * * Andreas Hoecker <Andreas.Hocker@cern.ch> - CERN, Switzerland *
* Xavier Prudent <prudent@lapp.in2p3.fr> - LAPP, France *
* Helge Voss <Helge.Voss@cern.ch> - MPI-K Heidelberg, German y * * Helge Voss <Helge.Voss@cern.ch> - MPI-K Heidelberg, German y *
* Kai Voss <Kai.Voss@cern.ch> - U. of Victoria, Canada * * Kai Voss <Kai.Voss@cern.ch> - U. of Victoria, Canada *
* * * *
* Copyright (c) 2005: * * Copyright (c) 2005: *
* CERN, Switzerland * * CERN, Switzerland *
* U. of Victoria, Canada * * U. of Victoria, Canada *
* Heidelberg U., Germany * * Heidelberg U., Germany *
* LAPP, Annecy, France *
* * * *
* Redistribution and use in source and binary forms, with or without * * Redistribution and use in source and binary forms, with or without *
* modification, are permitted according to the terms listed in LICENSE * * modification, are permitted according to the terms listed in LICENSE *
* (http://tmva.sourceforge.net/LICENSE) * * (http://tmva.sourceforge.net/LICENSE) *
************************************************************************** ********/ ************************************************************************** ********/
#ifndef ROOT_TMVA_SdivSqrtSplusB #ifndef ROOT_TMVA_SdivSqrtSplusB
#define ROOT_TMVA_SdivSqrtSplusB #define ROOT_TMVA_SdivSqrtSplusB
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
 End of changes. 3 change blocks. 
3 lines changed or deleted 1 lines changed or added


 SeedDistance.h   SeedDistance.h 
// @(#)root/tmva $Id: SeedDistance.h 21630 2008-01-10 19:40:44Z brun $ // @(#)root/tmva $Id: SeedDistance.h 29122 2009-06-22 06:51:30Z brun $
// Author: Peter Speckmayer // Author: Peter Speckmayer
/************************************************************************** ******** /************************************************************************** ********
* Project: TMVA - a Root-integrated toolkit for multivariate data analysis * * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
* Package: TMVA * * Package: TMVA *
* Class : SeedDistance * * Class : SeedDistance *
* Web : http://tmva.sourceforge.net * * Web : http://tmva.sourceforge.net *
* * * *
* Description: * * Description: *
* Searches for the nearest seed * * Searches for the nearest seed *
skipping to change at line 31 skipping to change at line 31
* modification, are permitted according to the terms listed in LICENSE * * modification, are permitted according to the terms listed in LICENSE *
* (http://tmva.sourceforge.net/LICENSE) * * (http://tmva.sourceforge.net/LICENSE) *
************************************************************************** ********/ ************************************************************************** ********/
#ifndef ROOT_TMVA_SeedDistance #ifndef ROOT_TMVA_SeedDistance
#define ROOT_TMVA_SeedDistance #define ROOT_TMVA_SeedDistance
#include <vector> #include <vector>
#ifndef ROOT_TMVA_IMetric #ifndef ROOT_TMVA_IMetric
#ifndef ROOT_IMetric
#include "IMetric.h" #include "IMetric.h"
#endif #endif
#endif
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// // // //
// SeedDistance // // SeedDistance //
// //
// // // //
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
namespace TMVA { namespace TMVA {
class IMetric; class IMetric;
class SeedDistance { class SeedDistance {
public: public:
skipping to change at line 61 skipping to change at line 64
std::vector<Double_t>& GetDistances( std::vector<Double_t>& point ); std::vector<Double_t>& GetDistances( std::vector<Double_t>& point );
protected: protected:
std::vector< std::vector<Double_t> >& fSeeds; std::vector< std::vector<Double_t> >& fSeeds;
std::vector<Double_t> fDistances; std::vector<Double_t> fDistances;
IMetric& fMetric; IMetric& fMetric;
private: private:
ClassDef(SeedDistance,0) // Seed and metric storage ClassDef(SeedDistance,0) //
}; };
} // namespace TMVA } // namespace TMVA
#endif #endif
 End of changes. 5 change blocks. 
3 lines changed or deleted 6 lines changed or added


 SeparationBase.h   SeparationBase.h 
// @(#)root/tmva $Id: SeparationBase.h 21630 2008-01-10 19:40:44Z brun $ // @(#)root/tmva $Id: SeparationBase.h 29122 2009-06-22 06:51:30Z brun $
// Author: Andreas Hoecker, Joerg Stelzer, Helge Voss, Kai Voss // Author: Andreas Hoecker, Joerg Stelzer, Helge Voss, Kai Voss
/************************************************************************** ******** /************************************************************************** ********
* Project: TMVA - a Root-integrated toolkit for multivariate data analysis * * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
* Package: TMVA * * Package: TMVA *
* Class : SeparationBase * * Class : SeparationBase *
* Web : http://tmva.sourceforge.net * * Web : http://tmva.sourceforge.net *
* * * *
* Description: An interface to different separation critiera useded in var ious * * Description: An interface to different separation critiera useded in var ious *
* training algorithms, as there are: * * training algorithms, as there are: *
skipping to change at line 32 skipping to change at line 32
* Separation Gain: * * Separation Gain: *
* the measure of how the quality of separation of the sample incr eases * * the measure of how the quality of separation of the sample incr eases *
* by splitting the sample e.g. into a "left-node" and a "right-no de" * * by splitting the sample e.g. into a "left-node" and a "right-no de" *
* (N * Index_parent) - (N_left * Index_left) - (N_right * Index_r ight) * * (N * Index_parent) - (N_left * Index_left) - (N_right * Index_r ight) *
* this is then the quality crition which is optimized for when tr ying * * this is then the quality crition which is optimized for when tr ying *
* to increase the information in the system (making the best sele ction * * to increase the information in the system (making the best sele ction *
* * * *
* * * *
* Authors (alphabetical): * * Authors (alphabetical): *
* Andreas Hoecker <Andreas.Hocker@cern.ch> - CERN, Switzerland * * Andreas Hoecker <Andreas.Hocker@cern.ch> - CERN, Switzerland *
* Xavier Prudent <prudent@lapp.in2p3.fr> - LAPP, France *
* Helge Voss <Helge.Voss@cern.ch> - MPI-K Heidelberg, German y * * Helge Voss <Helge.Voss@cern.ch> - MPI-K Heidelberg, German y *
* Kai Voss <Kai.Voss@cern.ch> - U. of Victoria, Canada * * Kai Voss <Kai.Voss@cern.ch> - U. of Victoria, Canada *
* * * *
* Copyright (c) 2005: * * Copyright (c) 2005: *
* CERN, Switzerland * * CERN, Switzerland *
* U. of Victoria, Canada * * U. of Victoria, Canada *
* Heidelberg U., Germany * * Heidelberg U., Germany *
* LAPP, Annecy, France *
* * * *
* Redistribution and use in source and binary forms, with or without * * Redistribution and use in source and binary forms, with or without *
* modification, are permitted according to the terms listed in LICENSE * * modification, are permitted according to the terms listed in LICENSE *
* (http://tmva.sourceforge.net/LICENSE) * * (http://tmva.sourceforge.net/LICENSE) *
************************************************************************** ********/ ************************************************************************** ********/
#ifndef ROOT_TMVA_SeparationBase #ifndef ROOT_TMVA_SeparationBase
#define ROOT_TMVA_SeparationBase #define ROOT_TMVA_SeparationBase
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// // // //
// SeparationBase //
// //
// An interface to calculate the "SeparationGain" for different // // An interface to calculate the "SeparationGain" for different //
// separation critiera used in various training algorithms // // separation critiera used in various training algorithms //
// // // //
// There are two things: the Separation Index, and the Separation Gain //
// Separation Index: //
// Measure of the "purity" of a sample. If all elements (events) in the //
// sample belong to the same class (e.g. signal or backgr), than the //
// separation index is 0 (meaning 100% purity (or 0% purity as it is //
// symmetric. The index becomes maximal, for perfectly mixed samples //
// eg. purity=50% , N_signal = N_bkg //
// //
// Separation Gain: //
// the measure of how the quality of separation of the sample increases //
// by splitting the sample e.g. into a "left-node" and a "right-node" //
// (N * Index_parent) - (N_left * Index_left) - (N_right * Index_right) //
// this is then the quality crition which is optimized for when trying //
// to increase the information in the system (making the best selection //
// //
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
#ifndef ROOT_Rtypes
#include "Rtypes.h" #include "Rtypes.h"
#endif
#ifndef ROOT_TString
#include "TString.h" #include "TString.h"
#endif
namespace TMVA { namespace TMVA {
class SeparationBase { class SeparationBase {
public: public:
//default constructor //default constructor
SeparationBase(){} SeparationBase();
//copy constructor //copy constructor
SeparationBase( const SeparationBase& s ): fName ( s.fName ) {} SeparationBase( const SeparationBase& s ): fName ( s.fName ) {}
// destructor // destructor
virtual ~SeparationBase(){} virtual ~SeparationBase(){}
// Return the gain in separation of the original sample is splitted i n two sub-samples // Return the gain in separation of the original sample is splitted i n two sub-samples
// (N * Index_parent) - (N_left * Index_left) - (N_right * Index_righ t) // (N * Index_parent) - (N_left * Index_left) - (N_right * Index_righ t)
Double_t GetSeparationGain( const Double_t& nSelS, const Double_t& nS elB, Double_t GetSeparationGain( const Double_t& nSelS, const Double_t& nS elB,
const Double_t& nTotS, const Double_t& nT otB ); const Double_t& nTotS, const Double_t& nT otB );
// Return the separation index (a measure for "purity" of the sample" ) // Return the separation index (a measure for "purity" of the sample" )
virtual Double_t GetSeparationIndex( const Double_t &s, const Double_ t &b ) = 0; virtual Double_t GetSeparationIndex( const Double_t &s, const Double_ t &b ) = 0;
// Return the name of the concrete Index implementation // Return the name of the concrete Index implementation
TString GetName() { return fName; } const TString& GetName() { return fName; }
protected: protected:
TString fName; // name of the concrete Separation Index impementatio n TString fName; // name of the concrete Separation Index impementatio n
Double_t fPrecisionCut;
ClassDef(SeparationBase,0) // Interface to different separation criti era used in training algorithms ClassDef(SeparationBase,0) // Interface to different separation criti era used in training algorithms
}; };
} // namespace TMVA } // namespace TMVA
#endif #endif
 End of changes. 11 change blocks. 
5 lines changed or deleted 27 lines changed or added


 SimulatedAnnealing.h   SimulatedAnnealing.h 
// @(#)root/tmva $Id: SimulatedAnnealing.h 23341 2008-04-20 12:49:40Z brun // @(#)root/tmva $Id: SimulatedAnnealing.h 29195 2009-06-24 10:39:49Z brun
$ $
// Author: Andreas Hoecker, Joerg Stelzer, Helge Voss // Author: Andreas Hoecker, Joerg Stelzer, Helge Voss, Krzysztof Danielowsk
i, Kamil Kraszewski, Maciej Kruk
/************************************************************************** ******** /************************************************************************** ********
* Project: TMVA - a Root-integrated toolkit for multivariate data analysis * * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
* Package: TMVA * * Package: TMVA *
* Class : SimulatedAnnealing * * Class : SimulatedAnnealing *
* Web : http://tmva.sourceforge.net * * Web : http://tmva.sourceforge.net *
* * * *
* Description: * * Description: *
* Implementation of simulated annealing fitting procedure * * Implementation of simulated annealing fitting procedure *
* * * *
skipping to change at line 45 skipping to change at line 45
// Base implementation of simulated annealing fitting procedure // // Base implementation of simulated annealing fitting procedure //
// // // //
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
#include <vector> #include <vector>
#include <list> #include <list>
#ifndef ROOT_TMVA_Types #ifndef ROOT_TMVA_Types
#include "TMVA/Types.h" #include "TMVA/Types.h"
#endif #endif
#ifndef ROOT_TMVA_MsgLogger
#include "TMVA/MsgLogger.h"
#endif
class TRandom; class TRandom;
namespace TMVA { namespace TMVA {
class IFitterTarget; class IFitterTarget;
class Interval; class Interval;
class MsgLogger;
class SimulatedAnnealing { class SimulatedAnnealing {
public: public:
SimulatedAnnealing( IFitterTarget& target, const std::vector<Interval *>& ranges ); SimulatedAnnealing( IFitterTarget& target, const std::vector<Interval *>& ranges );
virtual ~SimulatedAnnealing(); virtual ~SimulatedAnnealing();
// returns FCN value at minimum // returns FCN value at minimum
Double_t Minimize( std::vector<Double_t>& parameters ); Double_t Minimize( std::vector<Double_t>& parameters );
skipping to change at line 117 skipping to change at line 115
Double_t fEps; // epsilon Double_t fEps; // epsilon
Double_t fTemperatureScale; // how fast te mperature change Double_t fTemperatureScale; // how fast te mperature change
Double_t fAdaptiveSpeed; // how fast te mperature change in adaptive (in adaptive two variables describe Double_t fAdaptiveSpeed; // how fast te mperature change in adaptive (in adaptive two variables describe
// the change of temperature, but fAdaptiveSpeed should be 1.0 and its not // the change of temperature, but fAdaptiveSpeed should be 1.0 and its not
// recomended to change it) // recomended to change it)
Double_t fTemperatureAdaptiveStep;// used to cal culate InitialTemperature if fUseDefaultTemperature Double_t fTemperatureAdaptiveStep;// used to cal culate InitialTemperature if fUseDefaultTemperature
Bool_t fUseDefaultScale; // if TRUE, SA calculates its own TemperatureScale Bool_t fUseDefaultScale; // if TRUE, SA calculates its own TemperatureScale
Bool_t fUseDefaultTemperature; // if TRUE, SA calculates its own InitialTemperature (MinTemperautre) Bool_t fUseDefaultTemperature; // if TRUE, SA calculates its own InitialTemperature (MinTemperautre)
mutable MsgLogger fLogger; // message log mutable MsgLogger* fLogger; // message logger
ger MsgLogger& Log() const { return *fLogger; }
Double_t fProgress; Double_t fProgress;
ClassDef(SimulatedAnnealing,0) // Base class for Simulated Annealing fitting ClassDef(SimulatedAnnealing,0) // Base class for Simulated Annealing fitting
}; };
} // namespace TMVA } // namespace TMVA
#endif #endif
 End of changes. 4 change blocks. 
8 lines changed or deleted 7 lines changed or added


 SimulatedAnnealingFitter.h   SimulatedAnnealingFitter.h 
// @(#)root/tmva $Id: SimulatedAnnealingFitter.h 23334 2008-04-19 18:38:57Z // @(#)root/tmva $Id: SimulatedAnnealingFitter.h 29122 2009-06-22 06:51:30Z
brun $ brun $
// Author: Andreas Hoecker // Author: Andreas Hoecker, Krzysztof Danielowski, Kamil Kraszewski, Maciej
Kruk
/************************************************************************** ******** /************************************************************************** ********
* Project: TMVA - a Root-integrated toolkit for multivariate data analysis * * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
* Package: TMVA * * Package: TMVA *
* Class : SimulatedAnnealingFitter * * Class : SimulatedAnnealingFitter *
* Web : http://tmva.sourceforge.net * * Web : http://tmva.sourceforge.net *
* * * *
* Description: * * Description: *
* Fitter using Simulated Annealing algorithm * * Fitter using Simulated Annealing algorithm *
* * * *
 End of changes. 1 change blocks. 
3 lines changed or deleted 4 lines changed or added


 TActivation.h   TActivation.h 
// @(#)root/tmva $Id: TActivation.h 20882 2007-11-19 11:31:26Z rdm $ // @(#)root/tmva $Id: TActivation.h 29122 2009-06-22 06:51:30Z brun $
// Author: Matt Jachowski // Author: Matt Jachowski
/************************************************************************** ******** /************************************************************************** ********
* Project: TMVA - a Root-integrated toolkit for multivariate data analysis * * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
* Package: TMVA * * Package: TMVA *
* Class : TMVA::TActivation * * Class : TMVA::TActivation *
* * * *
* Description: * * Description: *
* Interface for TNeuron activation function classes. * * Interface for TNeuron activation function classes. *
* * * *
skipping to change at line 34 skipping to change at line 34
#define ROOT_TMVA_TActivation #define ROOT_TMVA_TActivation
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// // // //
// TActivation // // TActivation //
// // // //
// Interface for TNeuron activation function classes // // Interface for TNeuron activation function classes //
// // // //
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
class TString; #include <iosfwd>
#ifndef ROOT_TObject
#include "TObject.h"
#endif
#ifndef ROOT_TString
#include "TString.h"
#endif
namespace TMVA { namespace TMVA {
class TActivation { class TActivation {
public: public:
TActivation() {} TActivation() {}
virtual ~TActivation() {} virtual ~TActivation() {}
skipping to change at line 64 skipping to change at line 71
// maximum of the range of the activation function // maximum of the range of the activation function
virtual Double_t GetMax() = 0; virtual Double_t GetMax() = 0;
// expression for activation function // expression for activation function
virtual TString GetExpression() = 0; virtual TString GetExpression() = 0;
// writer of function code // writer of function code
virtual void MakeFunction(std::ostream& fout, const TString& fncName) = 0; virtual void MakeFunction(std::ostream& fout, const TString& fncName) = 0;
ClassDef(TActivation,0) // Interface for TNeuron activation function classes ClassDef(TActivation,0) // Interface for TNeuron activation function classes
;
}; };
} // namespace TMVA } // namespace TMVA
#endif #endif
 End of changes. 3 change blocks. 
3 lines changed or deleted 10 lines changed or added


 TActivationChooser.h   TActivationChooser.h 
// @(#)root/tmva $Id: TActivationChooser.h 20882 2007-11-19 11:31:26Z rdm $ // @(#)root/tmva $Id: TActivationChooser.h 29195 2009-06-24 10:39:49Z brun $
// Author: Matt Jachowski // Author: Matt Jachowski
/************************************************************************** ******** /************************************************************************** ********
* Project: TMVA - a Root-integrated toolkit for multivariate data analysis * * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
* Package: TMVA * * Package: TMVA *
* Class : TMVA::TActivationChooser * * Class : TMVA::TActivationChooser *
* Web : http://tmva.sourceforge.net * * Web : http://tmva.sourceforge.net *
* * * *
* Description: * * Description: *
* Class for easily choosing activation functions. * * Class for easily choosing activation functions. *
skipping to change at line 36 skipping to change at line 36
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// // // //
// TActivationChooser // // TActivationChooser //
// // // //
// Class for easily choosing activation functions // // Class for easily choosing activation functions //
// // // //
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
#include <vector> #include <vector>
#ifndef ROOT_TString
#include "TString.h" #include "TString.h"
#ifndef ROOT_TMVA_TActivation
#include "TActivation.h"
#endif
#ifndef ROOT_TMVA_TActivationIdentity
#include "TActivationIdentity.h"
#endif
#ifndef ROOT_TMVA_TActivationSigmoid
#include "TActivationSigmoid.h"
#endif
#ifndef ROOT_TMVA_TActivationTanh
#include "TActivationTanh.h"
#endif
#ifndef ROOT_TMVA_TActivationRadial
#include "TActivationRadial.h"
#endif
#ifndef ROOT_TMVA_MsgLogger
#include "TMVA/MsgLogger.h"
#endif #endif
namespace TMVA { namespace TMVA {
class TActivationChooser { class TActivation;
class MsgLogger;
class TActivationChooser {
public: public:
TActivationChooser()
: fLogger( "TActivationChooser" )
{
// defaut constructor
fLINEAR = "linear";
fSIGMOID = "sigmoid";
fTANH = "tanh";
fRADIAL = "radial";
}
virtual ~TActivationChooser() {}
enum EActivationType { kLinear = 0, enum EActivationType { kLinear = 0,
kSigmoid, kSigmoid,
kTanh, kTanh,
kRadial kRadial
}; };
TActivation* CreateActivation(EActivationType type) const TActivationChooser();
{ virtual ~TActivationChooser();
// instantiate the correct activation object according to the
// type choosen (given as the enumeration type) TActivation* CreateActivation(EActivationType type) const;
TActivation* CreateActivation(const TString& type) const;
switch (type) { std::vector<TString>* GetAllActivationNames() const;
case kLinear: return new TActivationIdentity();
case kSigmoid: return new TActivationSigmoid();
case kTanh: return new TActivationTanh();
case kRadial: return new TActivationRadial();
default:
fLogger << kFATAL << "no Activation function of type " << type
<< " found" << Endl;
return 0;
}
return NULL;
}
TActivation* CreateActivation(const TString type) const
{
// instantiate the correct activation object according to the
// type choosen (given by a TString)
if (type == fLINEAR) return CreateActivation(kLinear);
else if (type == fSIGMOID) return CreateActivation(kSigmoid);
else if (type == fTANH) return CreateActivation(kTanh);
else if (type == fRADIAL) return CreateActivation(kRadial);
else {
fLogger << kFATAL << "no Activation function of type " << type
<< " found" << Endl;
return 0;
}
}
vector<TString>* GetAllActivationNames() const
{
// retuns the names of all know activation functions
vector<TString>* names = new vector<TString>();
names->push_back(fLINEAR);
names->push_back(fSIGMOID);
names->push_back(fTANH);
names->push_back(fRADIAL);
return names;
}
private: private:
TString fLINEAR; // activation function name TString fLINEAR; // activation function name
TString fSIGMOID; // activation function name TString fSIGMOID; // activation function name
TString fTANH; // activation function name TString fTANH; // activation function name
TString fRADIAL; // activation function name TString fRADIAL; // activation function name
mutable MsgLogger fLogger; // message logger mutable MsgLogger* fLogger; //! message logger
MsgLogger& Log() const { return *fLogger; }
ClassDef(TActivationChooser,0) // Class for choosing activation funct ions ClassDef(TActivationChooser,0) // Class for choosing activation funct ions
}; };
} // namespace TMVA } // namespace TMVA
#endif #endif
 End of changes. 8 change blocks. 
78 lines changed or deleted 13 lines changed or added


 TActivationIdentity.h   TActivationIdentity.h 
// @(#)root/tmva $Id: TActivationIdentity.h 23645 2008-05-03 15:33:17Z brun $ // @(#)root/tmva $Id: TActivationIdentity.h 29122 2009-06-22 06:51:30Z brun $
// Author: Matt Jachowski // Author: Matt Jachowski
/************************************************************************** ******** /************************************************************************** ********
* Project: TMVA - a Root-integrated toolkit for multivariate data analysis * * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
* Package: TMVA * * Package: TMVA *
* Class : TMVA::TActivationIdentity * * Class : TMVA::TActivationIdentity *
* Web : http://tmva.sourceforge.net * * Web : http://tmva.sourceforge.net *
* * * *
* Description: * * Description: *
* Identity activation function for TNeuron * * Identity activation function for TNeuron *
skipping to change at line 35 skipping to change at line 35
#define ROOT_TMVA_TActivationIdentity #define ROOT_TMVA_TActivationIdentity
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// // // //
// TActivationIdentity // // TActivationIdentity //
// // // //
// Identity activation function for TNeuron // // Identity activation function for TNeuron //
// // // //
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
#ifndef ROOT_TFormula
#include "TFormula.h" #include "TFormula.h"
#endif
#ifndef ROOT_TString
#include "TString.h" #include "TString.h"
#endif
#ifndef ROOT_TMVA_TActivation #ifndef ROOT_TMVA_TActivation
#include "TMVA/TActivation.h" #include "TMVA/TActivation.h"
#endif #endif
namespace TMVA { namespace TMVA {
class TActivationIdentity : public TActivation { class TActivationIdentity : public TActivation {
public: public:
 End of changes. 4 change blocks. 
1 lines changed or deleted 5 lines changed or added


 TActivationRadial.h   TActivationRadial.h 
// @(#)root/tmva $Id: TActivationRadial.h 20882 2007-11-19 11:31:26Z rdm $ // @(#)root/tmva $Id: TActivationRadial.h 29122 2009-06-22 06:51:30Z brun $
// Author: Matt Jachowski // Author: Matt Jachowski
/************************************************************************** ******** /************************************************************************** ********
* Project: TMVA - a Root-integrated toolkit for multivariate data analysis * * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
* Package: TMVA * * Package: TMVA *
* Class : TMVA::TActivationRadial * * Class : TMVA::TActivationRadial *
* Web : http://tmva.sourceforge.net * * Web : http://tmva.sourceforge.net *
* * * *
* Description: * * Description: *
* Radial basis activation function for TNeuron * * Radial basis activation function for TNeuron *
skipping to change at line 35 skipping to change at line 35
#define ROOT_TMVA_TActivationRadial #define ROOT_TMVA_TActivationRadial
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// // // //
// TActivationRadial // // TActivationRadial //
// // // //
// Radial basis activation function for TNeuron // // Radial basis activation function for TNeuron //
// // // //
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
#ifndef ROOT_TFormula
#include "TFormula.h" #include "TFormula.h"
#endif
#ifndef ROOT_TString
#include "TString.h" #include "TString.h"
#endif
#ifndef ROOT_TMVA_TActivation #ifndef ROOT_TMVA_TActivation
#include "TMVA/TActivation.h" #include "TMVA/TActivation.h"
#endif #endif
namespace TMVA { namespace TMVA {
class TActivationRadial : public TActivation { class TActivationRadial : public TActivation {
public: public:
 End of changes. 4 change blocks. 
1 lines changed or deleted 5 lines changed or added


 TActivationSigmoid.h   TActivationSigmoid.h 
// @(#)root/tmva $Id: TActivationSigmoid.h 20882 2007-11-19 11:31:26Z rdm $ // @(#)root/tmva $Id: TActivationSigmoid.h 29122 2009-06-22 06:51:30Z brun $
// Author: Matt Jachowski // Author: Matt Jachowski
/************************************************************************** ******** /************************************************************************** ********
* Project: TMVA - a Root-integrated toolkit for multivariate data analysis * * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
* Package: TMVA * * Package: TMVA *
* Class : TMVA::TActivationSigmoid * * Class : TMVA::TActivationSigmoid *
* Web : http://tmva.sourceforge.net * * Web : http://tmva.sourceforge.net *
* * * *
* Description: * * Description: *
* Sigmoid activation function for TNeuron * * Sigmoid activation function for TNeuron *
skipping to change at line 35 skipping to change at line 35
#define ROOT_TMVA_TActivationSigmoid #define ROOT_TMVA_TActivationSigmoid
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// // // //
// TActivationSigmoid // // TActivationSigmoid //
// // // //
// Sigmoid activation function for TNeuron // // Sigmoid activation function for TNeuron //
// // // //
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
#ifndef ROOT_TFormula
#include "TFormula.h" #include "TFormula.h"
#endif
#ifndef ROOT_TString
#include "TString.h" #include "TString.h"
#endif
#ifndef ROOT_TMVA_TActivation #ifndef ROOT_TMVA_TActivation
#include "TMVA/TActivation.h" #include "TMVA/TActivation.h"
#endif #endif
namespace TMVA { namespace TMVA {
class TActivationSigmoid : public TActivation { class TActivationSigmoid : public TActivation {
public: public:
 End of changes. 4 change blocks. 
1 lines changed or deleted 5 lines changed or added


 TActivationTanh.h   TActivationTanh.h 
// @(#)root/tmva $Id: TActivationTanh.h 20882 2007-11-19 11:31:26Z rdm $ // @(#)root/tmva $Id: TActivationTanh.h 29122 2009-06-22 06:51:30Z brun $
// Author: Matt Jachowski // Author: Matt Jachowski
/************************************************************************** ******** /************************************************************************** ********
* Project: TMVA - a Root-integrated toolkit for multivariate data analysis * * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
* Package: TMVA * * Package: TMVA *
* Class : TMVA::TActivationTanh * * Class : TMVA::TActivationTanh *
* Web : http://tmva.sourceforge.net * * Web : http://tmva.sourceforge.net *
* * * *
* Description: * * Description: *
* Tanh activation function for TNeuron * * Tanh activation function for TNeuron *
skipping to change at line 35 skipping to change at line 35
#define ROOT_TMVA_TActivationTanh #define ROOT_TMVA_TActivationTanh
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// // // //
// TActivationTanh // // TActivationTanh //
// // // //
// Tanh activation function for TNeuron // // Tanh activation function for TNeuron //
// // // //
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
#ifndef ROOT_TFormula
#include "TFormula.h" #include "TFormula.h"
#endif
#ifndef ROOT_TString
#include "TString.h" #include "TString.h"
#endif
#ifndef ROOT_TMVA_TActivation #ifndef ROOT_TMVA_TActivation
#include "TMVA/TActivation.h" #include "TMVA/TActivation.h"
#endif #endif
namespace TMVA { namespace TMVA {
class TActivationTanh : public TActivation { class TActivationTanh : public TActivation {
public: public:
 End of changes. 4 change blocks. 
1 lines changed or deleted 5 lines changed or added


 TArchiveFile.h   TArchiveFile.h 
// @(#)root/io:$Id: TArchiveFile.h 26606 2008-12-02 20:36:09Z pcanal $ // @(#)root/io:$Id: TArchiveFile.h 28638 2009-05-15 12:31:05Z rdm $
// Author: Fons Rademakers 30/6/04 // Author: Fons Rademakers 30/6/04
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 45 skipping to change at line 45
class TArchiveMember; class TArchiveMember;
class TObjArray; class TObjArray;
class TArchiveFile : public TObject { class TArchiveFile : public TObject {
private: private:
TArchiveFile(const TArchiveFile&); // Not implemented because TArchiveFile can not be copied. TArchiveFile(const TArchiveFile&); // Not implemented because TArchiveFile can not be copied.
TArchiveFile& operator=(const TArchiveFile&); // Not implemented because TArchiveFile can not be copied. TArchiveFile& operator=(const TArchiveFile&); // Not implemented because TArchiveFile can not be copied.
protected: protected:
TString fArchiveName; // Archive file name TString fArchiveName; // Archive file name
TString fMemberName; // Sub-file name TString fMemberName; // Sub-file name
Int_t fMemberIndex; // Index of sub-file in archive Int_t fMemberIndex; // Index of sub-file in archive
TFile *fFile; // File stream used to access the archive TFile *fFile; // File stream used to access the archive
TObjArray *fMembers; // Members in this archive TObjArray *fMembers; // Members in this archive
TArchiveMember *fCurMember; // Current archive member TArchiveMember *fCurMember; // Current archive member
static Bool_t ParseUrl(const char *url, TString &archive, TString &membe r, TString &type); static Bool_t ParseUrl(const char *url, TString &archive, TString &membe r, TString &type);
public: public:
 End of changes. 2 change blocks. 
2 lines changed or deleted 1 lines changed or added


 TAuthenticate.h   TAuthenticate.h 
// @(#)root/auth:$Id: TAuthenticate.h 21591 2008-01-08 17:28:21Z brun $ // @(#)root/auth:$Id: TAuthenticate.h 28642 2009-05-15 15:20:48Z rdm $
// Author: Fons Rademakers 26/11/2000 // Author: Fons Rademakers 26/11/2000
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 168 skipping to change at line 168
TRootSecContext *GetSecContext() const { return fSecContext; } TRootSecContext *GetSecContext() const { return fSecContext; }
TSocket *GetSocket() const { return fSocket; } TSocket *GetSocket() const { return fSocket; }
const char *GetUser() const { return fUser; } const char *GetUser() const { return fUser; }
Int_t HasTimedOut() const { return fTimeOut; } Int_t HasTimedOut() const { return fTimeOut; }
void SetRSAKeyType(Int_t key) { fRSAKey = key; } void SetRSAKeyType(Int_t key) { fRSAKey = key; }
void SetSecContext(TRootSecContext *ctx) { fSecContext = c tx; } void SetSecContext(TRootSecContext *ctx) { fSecContext = c tx; }
static void AuthError(const char *where, Int_t error); static void AuthError(const char *where, Int_t error);
static Bool_t CheckProofAuth(Int_t cSec, TString &det); static Bool_t CheckProofAuth(Int_t cSec, TString &det);
static Int_t DecodeBase64(const char *in, char *out);
static Int_t DecodeRSAPublic(const char *rsapubexport, rsa_NUMBER &n, static Int_t DecodeRSAPublic(const char *rsapubexport, rsa_NUMBER &n,
rsa_NUMBER &d, char **rsassl = 0); rsa_NUMBER &d, char **rsassl = 0);
static Int_t EncodeBase64(const char *in, Int_t lin, TString &out) ;
static TList *GetAuthInfo(); static TList *GetAuthInfo();
static const char *GetAuthMethod(Int_t idx); static const char *GetAuthMethod(Int_t idx);
static Int_t GetAuthMethodIdx(const char *meth); static Int_t GetAuthMethodIdx(const char *meth);
static Bool_t GetAuthReUse(); static Bool_t GetAuthReUse();
static Int_t GetClientProtocol(); static Int_t GetClientProtocol();
static char *GetDefaultDetails(Int_t method, Int_t opt, const char *user); static char *GetDefaultDetails(Int_t method, Int_t opt, const char *user);
static const char *GetDefaultUser(); static const char *GetDefaultUser();
static TDatime GetGlobalExpDate(); static TDatime GetGlobalExpDate();
static Bool_t GetGlobalPwHash(); static Bool_t GetGlobalPwHash();
static Bool_t GetGlobalSRPPwd(); static Bool_t GetGlobalSRPPwd();
 End of changes. 3 change blocks. 
3 lines changed or deleted 2 lines changed or added


 TBranchProxyDescriptor.h   TBranchProxyDescriptor.h 
// @(#)root/treeplayer:$Id: TBranchProxyDescriptor.h 20882 2007-11-19 11:31 :26Z rdm $ // @(#)root/treeplayer:$Id: TBranchProxyDescriptor.h 28346 2009-04-24 12:39 :14Z pcanal $
// Author: Philippe Canal 06/06/2004 // Author: Philippe Canal 06/06/2004
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2004, Rene Brun and Fons Rademakers and al. * * Copyright (C) 1995-2004, Rene Brun and Fons Rademakers and al. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 24 skipping to change at line 24
#ifndef ROOT_TNamed #ifndef ROOT_TNamed
#include "TNamed.h" #include "TNamed.h"
#endif #endif
namespace ROOT { namespace ROOT {
class TBranchProxyDescriptor : public TNamed { class TBranchProxyDescriptor : public TNamed {
TString fDataName; TString fDataName;
TString fBranchName; TString fBranchName;
Bool_t fIsSplit; Bool_t fIsSplit;
Bool_t fBranchIsSkipped; Bool_t fBranchIsSkipped;
Bool_t fIsLeafList; // true if the branch was constructed from
a leaf list.
public: public:
TBranchProxyDescriptor(const char *dataname, const char *type, TBranchProxyDescriptor(const char *dataname, const char *type,
const char *branchname, Bool_t split = true, B ool_t skipped = false); const char *branchname, Bool_t split = true, B ool_t skipped = false, Bool_t isleaflist = false);
const char *GetDataName(); const char *GetDataName();
const char *GetTypeName(); const char *GetTypeName();
const char *GetBranchName(); const char *GetBranchName();
Bool_t IsEquivalent(const TBranchProxyDescriptor *other, Bool_t inCla ss = kFALSE); Bool_t IsEquivalent(const TBranchProxyDescriptor *other, Bool_t inCla ss = kFALSE);
Bool_t IsSplit() const; Bool_t IsSplit() const;
void OutputDecl(FILE *hf, int offset, UInt_t maxVarname); void OutputDecl(FILE *hf, int offset, UInt_t maxVarname);
void OutputInit(FILE *hf, int offset, UInt_t maxVarname, void OutputInit(FILE *hf, int offset, UInt_t maxVarname,
const char *prefix); const char *prefix);
 End of changes. 3 change blocks. 
4 lines changed or deleted 6 lines changed or added


 TBufferSQL2.h   TBufferSQL2.h 
// @(#)root/sql:$Id: TBufferSQL2.h 25450 2008-09-18 21:13:42Z pcanal $ // @(#)root/sql:$Id: TBufferSQL2.h 29170 2009-06-23 14:09:56Z brun $
// Author: Sergey Linev 20/11/2005 // Author: Sergey Linev 20/11/2005
#ifndef ROOT_TBufferSQL2 #ifndef ROOT_TBufferSQL2
#define ROOT_TBufferSQL2 #define ROOT_TBufferSQL2
///////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////
// // // //
// TBufferSQL2 class used in TSQLFile to convert binary object data // // TBufferSQL2 class used in TSQLFile to convert binary object data //
// to SQL statements, supplied to DB server // // to SQL statements, supplied to DB server //
// // // //
skipping to change at line 123 skipping to change at line 123
void SqlReadBasic(UInt_t& value); void SqlReadBasic(UInt_t& value);
void SqlReadBasic(ULong_t& value); void SqlReadBasic(ULong_t& value);
void SqlReadBasic(ULong64_t& value); void SqlReadBasic(ULong64_t& value);
const char* SqlReadValue(const char* tname); const char* SqlReadValue(const char* tname);
const char* SqlReadCharStarValue(); const char* SqlReadCharStarValue();
Int_t SqlWriteObject(const void* obj, const TClass* objClass, TMemberStreamer *streamer = 0, Int_t streamer_index = 0); Int_t SqlWriteObject(const void* obj, const TClass* objClass, TMemberStreamer *streamer = 0, Int_t streamer_index = 0);
void* SqlReadObject(void* obj, TClass** cl = 0, TMemberStream er *streamer = 0, Int_t streamer_index = 0, const TClass *onFileClass=0); void* SqlReadObject(void* obj, TClass** cl = 0, TMemberStream er *streamer = 0, Int_t streamer_index = 0, const TClass *onFileClass=0);
void* SqlReadObjectDirect(void* obj, TClass** cl, Long64_t ob jid, TMemberStreamer *streamer = 0, Int_t streamer_index = 0, const TClass *onFileClass = 0); void* SqlReadObjectDirect(void* obj, TClass** cl, Long64_t ob jid, TMemberStreamer *streamer = 0, Int_t streamer_index = 0, const TClass *onFileClass = 0);
static const char* fgFloatFmt; //! printf argument for floats
and doubles, either "%f" or "%e" or "%10f" and so on
public: public:
TBufferSQL2(TBuffer::EMode mode); TBufferSQL2(TBuffer::EMode mode);
TBufferSQL2(TBuffer::EMode mode, TSQLFile* file); TBufferSQL2(TBuffer::EMode mode, TSQLFile* file);
virtual ~TBufferSQL2(); virtual ~TBufferSQL2();
void SetCompressionLevel(int level) { fCompressLevel = level ; } void SetCompressionLevel(int level) { fCompressLevel = level ; }
TSQLStructure* GetStructure() const { return fStructure; } TSQLStructure* GetStructure() const { return fStructure; }
skipping to change at line 295 skipping to change at line 297
virtual void WriteUInt(UInt_t i); virtual void WriteUInt(UInt_t i);
virtual void WriteLong(Long_t l); virtual void WriteLong(Long_t l);
virtual void WriteULong(ULong_t l); virtual void WriteULong(ULong_t l);
virtual void WriteLong64(Long64_t l); virtual void WriteLong64(Long64_t l);
virtual void WriteULong64(ULong64_t l); virtual void WriteULong64(ULong64_t l);
virtual void WriteFloat(Float_t f); virtual void WriteFloat(Float_t f);
virtual void WriteDouble(Double_t d); virtual void WriteDouble(Double_t d);
virtual void WriteCharP(const Char_t *c); virtual void WriteCharP(const Char_t *c);
virtual void WriteTString(const TString &s); virtual void WriteTString(const TString &s);
static void SetFloatFormat(const char* fmt = "%e");
static const char* GetFloatFormat();
// end of redefined virtual functions // end of redefined virtual functions
ClassDef(TBufferSQL2,1); //a specialized TBuffer to convert data to SQL statements or read data from SQL tables ClassDef(TBufferSQL2,1); //a specialized TBuffer to convert data to SQL statements or read data from SQL tables
}; };
#endif #endif
 End of changes. 3 change blocks. 
1 lines changed or deleted 7 lines changed or added


 TBufferXML.h   TBufferXML.h 
// @(#)root/xml:$Id: TBufferXML.h 25450 2008-09-18 21:13:42Z pcanal $ // @(#)root/xml:$Id: TBufferXML.h 29170 2009-06-23 14:09:56Z brun $
// Author: Sergey Linev 10.05.2004 // Author: Sergey Linev 10.05.2004
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 211 skipping to change at line 211
virtual void WriteULong(ULong_t l); virtual void WriteULong(ULong_t l);
virtual void WriteLong64(Long64_t l); virtual void WriteLong64(Long64_t l);
virtual void WriteULong64(ULong64_t l); virtual void WriteULong64(ULong64_t l);
virtual void WriteFloat(Float_t f); virtual void WriteFloat(Float_t f);
virtual void WriteDouble(Double_t d); virtual void WriteDouble(Double_t d);
virtual void WriteCharP(const Char_t *c); virtual void WriteCharP(const Char_t *c);
virtual void WriteTString(const TString &s); virtual void WriteTString(const TString &s);
// end of redefined virtual functions // end of redefined virtual functions
static void SetFloatFormat(const char* fmt = "%e");
static const char* GetFloatFormat();
protected: protected:
TBufferXML(); TBufferXML();
// redefined protected virtual functions // redefined protected virtual functions
virtual void WriteObjectClass(const void *actualObjStart, const TCla ss *actualClass); virtual void WriteObjectClass(const void *actualObjStart, const TCla ss *actualClass);
// end redefined protected virtual functions // end redefined protected virtual functions
TXMLFile* XmlFile(); TXMLFile* XmlFile();
skipping to change at line 314 skipping to change at line 317
TString fValueBuf; //! TString fValueBuf; //!
Int_t fErrorFlag; //! Int_t fErrorFlag; //!
Bool_t fCanUseCompact; //! flag indicate that basic t ype (like Int_t) can be placed in the same tag Bool_t fCanUseCompact; //! flag indicate that basic t ype (like Int_t) can be placed in the same tag
Bool_t fExpectedChain; //! flag to resolve situation when several elements of same basic type stored as FastArray Bool_t fExpectedChain; //! flag to resolve situation when several elements of same basic type stored as FastArray
TClass* fExpectedBaseClass; //! pointer to class, which sh ould be stored as parent of current TClass* fExpectedBaseClass; //! pointer to class, which sh ould be stored as parent of current
Int_t fCompressLevel; //! compress level used to min imize size of file Int_t fCompressLevel; //! compress level used to min imize size of file
static const char* fgFloatFmt; //! printf argument for floats
and doubles, either "%f" or "%e" or "%10f" and so on
ClassDef(TBufferXML,1) //a specialized TBuffer to read/write to XML files ClassDef(TBufferXML,1) //a specialized TBuffer to read/write to XML files
}; };
#endif #endif
 End of changes. 3 change blocks. 
1 lines changed or deleted 7 lines changed or added


 TCanvas.h   TCanvas.h 
// @(#)root/gpad:$Id: TCanvas.h 22054 2008-02-08 08:03:32Z brun $ // @(#)root/gpad:$Id: TCanvas.h 28464 2009-05-06 12:37:21Z brun $
// Author: Rene Brun 12/12/94 // Author: Rene Brun 12/12/94
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 86 skipping to change at line 86
TString fSelectedOpt; //!Drawing option of selected object TString fSelectedOpt; //!Drawing option of selected object
TPad *fSelectedPad; //!Pad containing currently selected obj ect TPad *fSelectedPad; //!Pad containing currently selected obj ect
TPad *fClickSelectedPad;//!Pad containing currently click-select ed object TPad *fClickSelectedPad;//!Pad containing currently click-select ed object
TPad *fPadSave; //!Pointer to saved pad in HandleInput TPad *fPadSave; //!Pointer to saved pad in HandleInput
TCanvasImp *fCanvasImp; //!Window system specific canvas impleme ntation TCanvasImp *fCanvasImp; //!Window system specific canvas impleme ntation
TContextMenu *fContextMenu; //!Context menu pointer TContextMenu *fContextMenu; //!Context menu pointer
Bool_t fBatch; //!True when in batchmode Bool_t fBatch; //!True when in batchmode
Bool_t fUpdating; //!True when Updating the canvas Bool_t fUpdating; //!True when Updating the canvas
Bool_t fRetained; //Retain structure flag Bool_t fRetained; //Retain structure flag
Bool_t fUseGL; //!True when rendering is with GL Bool_t fUseGL; //!True when rendering is with GL
//
TVirtualPadPainter *fPainter; //!Canvas (pad) painter.
static Bool_t fgIsFolder; //Indicates if canvas can be browsed as a folder static Bool_t fgIsFolder; //Indicates if canvas can be browsed as a folder
private: private:
TCanvas(const TCanvas &canvas); // cannot copy canvas, use TObject::Clo ne() TCanvas(const TCanvas &canvas); // cannot copy canvas, use TObject::Clo ne()
TCanvas &operator=(const TCanvas &rhs); // idem TCanvas &operator=(const TCanvas &rhs); // idem
void Build(); void Build();
void CopyPixmaps(); void CopyPixmaps();
void DrawEventStatus(Int_t event, Int_t x, Int_t y, TObject *selecte d); void DrawEventStatus(Int_t event, Int_t x, Int_t y, TObject *selecte d);
void RunAutoExec(); void RunAutoExec();
//Initialize PadPainter.
void CreatePainter();
protected: protected:
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py); virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py);
//-- used by friend TThread class //-- used by friend TThread class
void Init(); void Init();
public: public:
// TCanvas status bits // TCanvas status bits
enum { enum {
kShowEventStatus = BIT(15), kShowEventStatus = BIT(15),
kAutoExec = BIT(16), kAutoExec = BIT(16),
skipping to change at line 229 skipping to change at line 234
void SetBatch(Bool_t batch=kTRUE); void SetBatch(Bool_t batch=kTRUE);
static void SetFolder(Bool_t isfolder=kTRUE); static void SetFolder(Bool_t isfolder=kTRUE);
void SetPadSave(TPad *pad) {fPadSave = pad;} void SetPadSave(TPad *pad) {fPadSave = pad;}
void SetRetained(Bool_t retained=kTRUE) { fRetained=retaine d;} void SetRetained(Bool_t retained=kTRUE) { fRetained=retaine d;}
void SetTitle(const char *title=""); void SetTitle(const char *title="");
virtual void ToggleEventStatus(); virtual void ToggleEventStatus();
virtual void ToggleAutoExec(); virtual void ToggleAutoExec();
virtual void ToggleToolBar(); virtual void ToggleToolBar();
virtual void ToggleEditor(); virtual void ToggleEditor();
virtual void Update(); virtual void Update();
//Still need this.
Bool_t UseGL() const { return fUseGL; } Bool_t UseGL() const { return fUseGL; }
void SetSupportGL(Bool_t support) {fUseGL = support;} void SetSupportGL(Bool_t support) {fUseGL = support;}
//Name is GetPainter, not GetPadPainter
//to avoid name hiding and confusion.
//GetPadPainter and GetPainter are non-virtual (no need, in fact).
TVirtualPadPainter *GetCanvasPainter();
static TCanvas *MakeDefCanvas(); static TCanvas *MakeDefCanvas();
ClassDef(TCanvas,6) //Graphics canvas ClassDef(TCanvas,6) //Graphics canvas
}; };
#endif #endif
 End of changes. 5 change blocks. 
1 lines changed or deleted 12 lines changed or added


 TClass.h   TClass.h 
// @(#)root/meta:$Id: TClass.h 27287 2009-01-29 04:52:36Z pcanal $ // @(#)root/meta:$Id: TClass.h 29000 2009-06-15 13:53:52Z rdm $
// Author: Rene Brun 07/01/95 // Author: Rene Brun 07/01/95
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 190 skipping to change at line 190
// (??? Are the two distinct tables really needed?) // (??? Are the two distinct tables really needed?)
static THashTable* fgClassTypedefHash; static THashTable* fgClassTypedefHash;
static THashTable* fgClassShortTypedefHash; static THashTable* fgClassShortTypedefHash;
private: private:
TClass(const TClass& tc); TClass(const TClass& tc);
TClass& operator=(const TClass&); TClass& operator=(const TClass&);
protected: protected:
TVirtualStreamerInfo *FindStreamerInfo(TObjArray* arr, UInt_t checks um) const; TVirtualStreamerInfo *FindStreamerInfo(TObjArray* arr, UInt_t checks um) const;
static THashTable *GetClassShortTypedefHash();
public: public:
TClass(); TClass();
TClass(const char *name, Bool_t silent = kFALSE); TClass(const char *name, Bool_t silent = kFALSE);
TClass(const char *name, Version_t cversion, TClass(const char *name, Version_t cversion,
const char *dfil = 0, const char *ifil = 0, const char *dfil = 0, const char *ifil = 0,
Int_t dl = 0, Int_t il = 0, Bool_t silent = kFALSE); Int_t dl = 0, Int_t il = 0, Bool_t silent = kFALSE);
TClass(const char *name, Version_t cversion, TClass(const char *name, Version_t cversion,
const type_info &info, TVirtualIsAProxy *isa, const type_info &info, TVirtualIsAProxy *isa,
ShowMembersFunc_t showmember, ShowMembersFunc_t showmember,
 End of changes. 2 change blocks. 
1 lines changed or deleted 2 lines changed or added


 TClassEdit.h   TClassEdit.h 
// @(#)root/base:$Id: TClassEdit.h 28095 2009-04-03 19:52:28Z pcanal $ // @(#)root/base:$Id: TClassEdit.h 28776 2009-06-02 15:16:39Z pcanal $
// Author: Victor Perev 10/04/2003 // Author: Victor Perev 10/04/2003
// Philippe Canal 05/2004 // Philippe Canal 05/2004
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2003, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2003, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 54 skipping to change at line 54
enum ESTLType { enum ESTLType {
kNotSTL = 0, kNotSTL = 0,
kVector = 1, kVector = 1,
kList = 2, kList = 2,
kDeque = 3, kDeque = 3,
kMap = 4, kMap = 4,
kMultiMap = 5, kMultiMap = 5,
kSet = 6, kSet = 6,
kMultiSet = 7, kMultiSet = 7,
kEnd = 8 kBitSet = 8,
kEnd = 9
}; };
std::string CleanType (const char *typeDesc,int mode = 0,const char **ta il=0); std::string CleanType (const char *typeDesc,int mode = 0,const char **ta il=0);
bool IsDefAlloc(const char *alloc, const char *classname); bool IsDefAlloc(const char *alloc, const char *classname);
bool IsDefAlloc(const char *alloc, const char *keyclassname, cons t char *valueclassname); bool IsDefAlloc(const char *alloc, const char *keyclassname, cons t char *valueclassname);
bool IsDefComp (const char *comp , const char *classname); bool IsDefComp (const char *comp , const char *classname);
bool IsSTLBitset(const char *type);
int IsSTLCont (const char *type,int testAlloc=0); int IsSTLCont (const char *type,int testAlloc=0);
bool IsStdClass(const char *type); bool IsStdClass(const char *type);
bool IsVectorBool(const char *name); bool IsVectorBool(const char *name);
std::string GetLong64_Name(const std::string& original); std::string GetLong64_Name(const std::string& original);
int GetSplit (const char *type, std::vector<std::string> &outpu t, int &nestedLoc); int GetSplit (const char *type, std::vector<std::string> &outpu t, int &nestedLoc);
int STLKind (const char *type); //Kind of stl container int STLKind (const char *type); //Kind of stl container
int STLArgs (int kind); //Min number of arguments w ithout allocator int STLArgs (int kind); //Min number of arguments w ithout allocator
std::string ResolveTypedef(const char *tname, bool resolveAll = false); std::string ResolveTypedef(const char *tname, bool resolveAll = false);
std::string ShortType (const char *typeDesc, int mode); std::string ShortType (const char *typeDesc, int mode);
std::string InsertStd(const char *tname); std::string InsertStd(const char *tname);
 End of changes. 3 change blocks. 
2 lines changed or deleted 4 lines changed or added


 TCollectionProxyInfo.h   TCollectionProxyInfo.h 
// @(#)root/cont:$Id: TCollectionProxyInfo.h 27661 2009-02-28 20:37:18Z pca nal $ // @(#)root/cont:$Id: TCollectionProxyInfo.h 28776 2009-06-02 15:16:39Z pca nal $
// Author: Markus Frank 28/10/04. Philippe Canal 02/01/2007 // Author: Markus Frank 28/10/04. Philippe Canal 02/01/2007
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 487 skipping to change at line 487
}; };
#ifndef __CINT__ #ifndef __CINT__
// Need specialization for boolean references due to stupid STL vector<b ool> // Need specialization for boolean references due to stupid STL vector<b ool>
template<> inline void* ::ROOT::TCollectionProxyInfo::Address<std::vecto r<bool>::const_reference>::address(std::vector<bool>::const_reference ) { template<> inline void* ::ROOT::TCollectionProxyInfo::Address<std::vecto r<bool>::const_reference>::address(std::vector<bool>::const_reference ) {
R__ASSERT(0); R__ASSERT(0);
return 0; return 0;
} }
#endif #endif
template <typename T> class TStdBitsetHelper {
// This class is intentionally empty, this is scaffolding to allow th
e equivalent
// of 'template <int N> struct TCollectionProxyInfo::Type<std::bitset
<N> >' which
// is not effective in C++ (as of gcc 4.3.3).
};
#ifndef __CINT__
template <typename Bitset_t> struct TCollectionProxyInfo::Type<ROOT::TSt
dBitsetHelper<Bitset_t> > : public TCollectionProxyInfo::Address<const bool
&>
{
typedef Bitset_t Cont_t;
typedef std::pair<size_t,bool> Iter_t;
typedef bool Value_t;
typedef Environ<Iter_t> Env_t;
typedef Env_t *PEnv_t;
typedef Cont_t *PCont_t;
typedef Value_t *PValue_t;
virtual ~Type() {}
static inline PCont_t object(void* ptr) {
return PCont_t(PEnv_t(ptr)->fObject);
}
static void* size(void* env) {
PEnv_t e = PEnv_t(env);
e->fSize = PCont_t(e->fObject)->size();
return &e->fSize;
}
static void* clear(void* env) {
object(env)->reset();
return 0;
}
static void* first(void* env) {
PEnv_t e = PEnv_t(env);
PCont_t c = PCont_t(e->fObject);
e->fIterator.first = 0;
e->fIterator.second = c->size() > 0 ? c->test(e->fIterator.first)
: false ; // Iterator actually hold the value.
e->fSize = c->size();
return 0;
}
static void* next(void* env) {
PEnv_t e = PEnv_t(env);
PCont_t c = PCont_t(e->fObject);
for (; e->fIdx > 0 && e->fIterator.first != c->size(); ++(e->fIter
ator.first), --e->fIdx){ }
e->fIterator.second = (e->fIterator.first != c->size()) ? c->test(
e->fIterator.first) : false;
return 0;
}
static void* construct(void*) {
// Nothing to construct.
return 0;
}
static void* collect(void* env) {
PEnv_t e = PEnv_t(env);
PCont_t c = PCont_t(e->fObject);
PValue_t m = PValue_t(e->fStart); // 'start' is a buffer outside t
he container.
for (size_t i=0; i != c->size(); ++i, ++m )
*m = c->test(i);
return 0;
}
static void* destruct(void*) {
// Nothing to destruct.
return 0;
}
};
template <typename Bitset_t>
struct TCollectionProxyInfo::Pushback<ROOT::TStdBitsetHelper<Bitset_t>
> : public TCollectionProxyInfo::Type<TStdBitsetHelper<Bitset_t> > {
typedef Bitset_t Cont_t;
typedef bool Iter_t;
typedef bool Value_t;
typedef Environ<Iter_t> Env_t;
typedef Env_t *PEnv_t;
typedef Cont_t *PCont_t;
typedef Value_t *PValue_t;
static void* resize(void* env) {
PEnv_t e = PEnv_t(env);
e->fIdx = 0;
return 0;
}
static void* feed(void* env) {
PEnv_t e = PEnv_t(env);
PCont_t c = PCont_t(e->fObject);
PValue_t m = PValue_t(e->fStart); // Here start is actually a 'buf
fer' outside the container.
for (size_t i=0; i<e->fSize; ++i, ++m)
c->set(i,*m);
return 0;
}
static int value_offset() {
return 0;
}
};
#endif
} }
#endif #endif
 End of changes. 2 change blocks. 
1 lines changed or deleted 104 lines changed or added


 TDatabasePDG.h   TDatabasePDG.h 
// @(#)root/eg:$Id: TDatabasePDG.h 20882 2007-11-19 11:31:26Z rdm $ // @(#)root/eg:$Id: TDatabasePDG.h 29092 2009-06-19 09:31:49Z brun $
// Author: Pasha Murat 12/02/99 // Author: Pasha Murat 12/02/99
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 23 skipping to change at line 23
#define ROOT_TDatabasePDG #define ROOT_TDatabasePDG
#ifndef ROOT_TParticlePDG #ifndef ROOT_TParticlePDG
#include "TParticlePDG.h" #include "TParticlePDG.h"
#endif #endif
#ifndef ROOT_TParticleClassPDG #ifndef ROOT_TParticleClassPDG
#include "TParticleClassPDG.h" #include "TParticleClassPDG.h"
#endif #endif
class THashList; class THashList;
class TExMap;
class TDatabasePDG: public TNamed { class TDatabasePDG: public TNamed {
protected: protected:
static TDatabasePDG *fgInstance; // protect against multiple inst ances static TDatabasePDG *fgInstance; // protect against multiple inst ances
THashList* fParticleList; // list of PDG particles THashList *fParticleList; // list of PDG particles
TObjArray* fListOfClasses; // list of classes (leptons etc. TObjArray *fListOfClasses; // list of classes (leptons etc.
) )
mutable TExMap *fPdgMap; //!hash-map from pdg-code to par
ticle
TDatabasePDG(const TDatabasePDG& db) TDatabasePDG(const TDatabasePDG& db)
: TNamed(db), fParticleList(db.fParticleList), : TNamed(db), fParticleList(db.fParticleList),
fListOfClasses(db.fListOfClasses) { } fListOfClasses(db.fListOfClasses), fPdgMap(0) { }
TDatabasePDG& operator=(const TDatabasePDG& db) TDatabasePDG& operator=(const TDatabasePDG& db)
{if(this!=&db) {TNamed::operator=(db); fParticleList=db.fParticleList; {if(this!=&db) {TNamed::operator=(db); fParticleList=db.fParticleList;
fListOfClasses=db.fListOfClasses;} return *this;} fListOfClasses=db.fListOfClasses;} return *this;}
void BuildPdgMap() const;
public: public:
TDatabasePDG(); TDatabasePDG();
virtual ~TDatabasePDG(); virtual ~TDatabasePDG();
static TDatabasePDG* Instance(); static TDatabasePDG* Instance();
virtual TParticlePDG* AddParticle(const char* Name, virtual TParticlePDG* AddParticle(const char* Name,
const char* Title, const char* Title,
Double_t Mass, Double_t Mass,
 End of changes. 5 change blocks. 
5 lines changed or deleted 10 lines changed or added


 TEveCaloData.h   TEveCaloData.h 
// @(#)root/eve:$Id: TEveCaloData.h 26561 2008-12-01 17:35:55Z matevz $ // @(#)root/eve:$Id: TEveCaloData.h 28888 2009-06-10 18:47:24Z matevz $
// Author: Matevz Tadel 2007 // Author: Matevz Tadel 2007
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 144 skipping to change at line 144
private: private:
TEveCaloData(const TEveCaloData&); // Not implemented TEveCaloData(const TEveCaloData&); // Not implemented
TEveCaloData& operator=(const TEveCaloData&); // Not implemented TEveCaloData& operator=(const TEveCaloData&); // Not implemented
protected: protected:
vSliceInfo_t fSliceInfos; vSliceInfo_t fSliceInfos;
TAxis* fEtaAxis; TAxis* fEtaAxis;
TAxis* fPhiAxis; TAxis* fPhiAxis;
Bool_t fWrapTwoPi;
Float_t fMaxValEt; // cached Float_t fMaxValEt; // cached
Float_t fMaxValE; // cached Float_t fMaxValE; // cached
Float_t fEps; Float_t fEps;
public: public:
TEveCaloData(); TEveCaloData();
virtual ~TEveCaloData() {} virtual ~TEveCaloData() {}
virtual void GetCellList(Float_t etaMin, Float_t etaMax, virtual void GetCellList(Float_t etaMin, Float_t etaMax,
skipping to change at line 187 skipping to change at line 189
virtual TAxis* GetEtaBins() const { return fEtaAxis; } virtual TAxis* GetEtaBins() const { return fEtaAxis; }
virtual void SetEtaBins(TAxis* ax) { fEtaAxis=ax; } virtual void SetEtaBins(TAxis* ax) { fEtaAxis=ax; }
virtual TAxis* GetPhiBins() const { return fPhiAxis; } virtual TAxis* GetPhiBins() const { return fPhiAxis; }
virtual void SetPhiBins(TAxis* ax) { fPhiAxis=ax; } virtual void SetPhiBins(TAxis* ax) { fPhiAxis=ax; }
virtual Float_t GetEps() const { return fEps; } virtual Float_t GetEps() const { return fEps; }
virtual void SetEps(Float_t eps) { fEps=eps; } virtual void SetEps(Float_t eps) { fEps=eps; }
Bool_t GetWrapTwoPi() const { return fWrapTwoPi; }
void SetWrapTwoPi(Bool_t w) { fWrapTwoPi=w; }
static Float_t EtaToTheta(Float_t eta); static Float_t EtaToTheta(Float_t eta);
ClassDef(TEveCaloData, 0); // Manages calorimeter event data. ClassDef(TEveCaloData, 0); // Manages calorimeter event data.
}; };
/************************************************************************** / /************************************************************************** /
/************************************************************************** / /************************************************************************** /
class TEveCaloDataVec: public TEveCaloData class TEveCaloDataVec: public TEveCaloData
{ {
 End of changes. 3 change blocks. 
1 lines changed or deleted 6 lines changed or added


 TEveCaloLegoGL.h   TEveCaloLegoGL.h 
// @(#)root/eve:$Id: TEveCaloLegoGL.h 27370 2009-02-06 18:58:23Z matevz $ // @(#)root/eve:$Id: TEveCaloLegoGL.h 28888 2009-06-10 18:47:24Z matevz $
// Author: Alja Mrak-Tadel 2007 // Author: Alja Mrak-Tadel 2007
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
#ifndef ROOT_TEveCaloLegoGL #ifndef ROOT_TEveCaloLegoGL
#define ROOT_TEveCaloLegoGL #define ROOT_TEveCaloLegoGL
#include "TGLObject.h" #include "TGLObject.h"
#include "TGLIncludes.h"
#include "TGLAxisPainter.h" #include "TGLAxisPainter.h"
#include "TEveCaloData.h" #include "TEveCaloData.h"
#include "TEveVSDStructs.h" #include "TEveVSDStructs.h"
#include "TEveCalo.h" #include "TEveCalo.h"
#include <map> #include <map>
class TEveCaloLego; class TEveCaloLego;
skipping to change at line 98 skipping to change at line 97
virtual void DirectDraw(TGLRnrCtx & rnrCtx) const; virtual void DirectDraw(TGLRnrCtx & rnrCtx) const;
virtual Bool_t SupportsSecondarySelect() const { return kTRUE; } virtual Bool_t SupportsSecondarySelect() const { return kTRUE; }
virtual void ProcessSelection(TGLRnrCtx & rnrCtx, TGLSelectRecord & re c); virtual void ProcessSelection(TGLRnrCtx & rnrCtx, TGLSelectRecord & re c);
ClassDef(TEveCaloLegoGL, 0); // GL renderer class for TEveCaloLego. ClassDef(TEveCaloLegoGL, 0); // GL renderer class for TEveCaloLego.
}; };
//_________________________________________________________________________ _____ //_________________________________________________________________________ _____
inline void TEveCaloLegoGL::WrapTwoPi(Float_t &min, Float_t &max) const inline void TEveCaloLegoGL::WrapTwoPi(Float_t &min, Float_t &max) const
{ {
// static const Float_t pi = TMath::Pi() + 1e-6; if (fM->GetData()->GetWrapTwoPi())
if (fM->GetPhiMax()>TMath::Pi() && max<=fM->GetPhiMin())
{ {
min += TMath::TwoPi(); if (fM->GetPhiMax()>TMath::Pi() && max<=fM->GetPhiMin())
max += TMath::TwoPi(); {
min += TMath::TwoPi();
max += TMath::TwoPi();
}
else if (fM->GetPhiMin()<-TMath::Pi() && min>=fM->GetPhiMax())
{
min -= TMath::TwoPi();
max -= TMath::TwoPi();
}
} }
else if (fM->GetPhiMin()<-TMath::Pi() && min>=fM->GetPhiMax())
{
min -= TMath::TwoPi();
max -= TMath::TwoPi();
}
} }
#endif #endif
 End of changes. 5 change blocks. 
12 lines changed or deleted 12 lines changed or added


 TEveGeoNode.h   TEveGeoNode.h 
// @(#)root/eve:$Id: TEveGeoNode.h 28295 2009-04-20 20:26:34Z matevz $ // @(#)root/eve:$Id: TEveGeoNode.h 28354 2009-04-24 17:22:02Z matevz $
// Authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007 // Authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
#ifndef ROOT_TEveGeoNode #ifndef ROOT_TEveGeoNode
#define ROOT_TEveGeoNode #define ROOT_TEveGeoNode
#include "TEveElement.h" #include "TEveElement.h"
#include "TEveTrans.h"
#include "TEveProjectionBases.h"
class TGeoVolume; class TGeoVolume;
class TGeoNode; class TGeoNode;
class TGeoHMatrix; class TGeoHMatrix;
class TGeoManager; class TGeoManager;
class TGeoShape; // Added here to ease transition - forward declaration should be used.
// This include will be removed for 5.24.
#include <TEveGeoShape.h>
// class TGeoShape;
class TEveGeoShapeExtract; class TEveGeoShapeExtract;
//---------------------------------------------------------------- //----------------------------------------------------------------
class TEveGeoNode : public TEveElement, class TEveGeoNode : public TEveElement,
public TObject public TObject
{ {
friend class TEveGeoNodeEditor; friend class TEveGeoNodeEditor;
TEveGeoNode(const TEveGeoNode&); // Not implemented TEveGeoNode(const TEveGeoNode&); // Not implemented
TEveGeoNode& operator=(const TEveGeoNode&); // Not implemented TEveGeoNode& operator=(const TEveGeoNode&); // Not implemented
protected: protected:
TGeoNode *fNode; TGeoNode *fNode;
TEveGeoShapeExtract* DumpShapeTree(TEveGeoNode* geon, TEveGeoShapeExtrac t* parent = 0, Int_t level = 0); TEveGeoShapeExtract* DumpShapeTree(TEveGeoNode* geon, TEveGeoShapeExtrac t* parent=0, Bool_t leafs_only=kFALSE);
static Int_t fgCSGExportNSeg; //! static Int_t fgCSGExportNSeg; //!
static std::list<TGeoShape*> fgTemporaryStore; //! static std::list<TGeoShape*> fgTemporaryStore; //!
public: public:
TEveGeoNode(TGeoNode* node); TEveGeoNode(TGeoNode* node);
virtual const char* GetName() const; virtual const char* GetName() const;
virtual const char* GetTitle() const; virtual const char* GetTitle() const;
virtual const char* GetElementName() const; virtual const char* GetElementName() const;
skipping to change at line 73 skipping to change at line 75
virtual Bool_t CanEditMainColor() const; virtual Bool_t CanEditMainColor() const;
virtual void SetMainColor(Color_t color); virtual void SetMainColor(Color_t color);
virtual Bool_t CanEditMainTransparency() const; virtual Bool_t CanEditMainTransparency() const;
virtual UChar_t GetMainTransparency() const; virtual UChar_t GetMainTransparency() const;
virtual void SetMainTransparency(UChar_t t); virtual void SetMainTransparency(UChar_t t);
void UpdateNode(TGeoNode* node); void UpdateNode(TGeoNode* node);
void UpdateVolume(TGeoVolume* volume); void UpdateVolume(TGeoVolume* volume);
void Save(const char* file, const char* name="Extract"); void Save(const char* file, const char* name="Extract", Bool_t leafs_onl
y=kFALSE);
void SaveExtract(const char* file, const char* name, Bool_t leafs_only);
void WriteExtract(const char* name, Bool_t leafs_only);
virtual void Draw(Option_t* option=""); virtual void Draw(Option_t* option="");
static Int_t GetCSGExportNSeg(); static Int_t GetCSGExportNSeg();
static void SetCSGExportNSeg(Int_t nseg); static void SetCSGExportNSeg(Int_t nseg);
ClassDef(TEveGeoNode, 1); // Wrapper for TGeoNode that allows it to be s hown in GUI and controlled as a TEveElement. ClassDef(TEveGeoNode, 1); // Wrapper for TGeoNode that allows it to be s hown in GUI and controlled as a TEveElement.
}; };
//---------------------------------------------------------------- //----------------------------------------------------------------
skipping to change at line 128 skipping to change at line 132
// Signals from GeoManager. // Signals from GeoManager.
// These are not available any more ... colors in list-tree not refreshe d // These are not available any more ... colors in list-tree not refreshe d
// properly. // properly.
void VolumeVisChanged(TGeoVolume* volume); void VolumeVisChanged(TGeoVolume* volume);
void VolumeColChanged(TGeoVolume* volume); void VolumeColChanged(TGeoVolume* volume);
void NodeVisChanged(TGeoNode* node); void NodeVisChanged(TGeoNode* node);
ClassDef(TEveGeoTopNode, 1); // Top-level TEveGeoNode with a pointer to TGeoManager and controls for steering of TGeoPainter. ClassDef(TEveGeoTopNode, 1); // Top-level TEveGeoNode with a pointer to TGeoManager and controls for steering of TGeoPainter.
}; };
//----------------------------------------------------------------
//----------------------------------------------------------------
class TEveGeoShape : public TEveElement,
public TNamed,
public TEveProjectable
{
TEveGeoShape(const TEveGeoShape&); // Not implemented
TEveGeoShape& operator=(const TEveGeoShape&); // Not implemented
protected:
Color_t fColor;
Int_t fNSegments;
TGeoShape* fShape;
static TGeoManager* fgGeoMangeur;
static TEveGeoShape* SubImportShapeExtract(TEveGeoShapeExtract* gse, TEv
eElement* parent);
TEveGeoShapeExtract* DumpShapeTree(TEveGeoShape* geon, TEveGeoShapeExtra
ct* parent = 0);
public:
TEveGeoShape(const char* name="TEveGeoShape", const char* title=0);
virtual ~TEveGeoShape();
virtual Bool_t CanEditMainColor() const { return kTRUE; }
virtual Bool_t CanEditMainTransparency() const { return kTRUE; }
Color_t GetColor() const { return fColor; }
Int_t GetNSegments() const { return fNSegments; }
void SetNSegments(Int_t s) { fNSegments = s; }
TGeoShape* GetShape() { return fShape; }
void SetShape(TGeoShape* s);
virtual void Paint(Option_t* option="");
void Save(const char* file, const char* name="Extract");
static TEveGeoShape* ImportShapeExtract(TEveGeoShapeExtract* gse, TEveEl
ement* parent=0);
// GeoProjectable
virtual TBuffer3D* MakeBuffer3D();
virtual TClass* ProjectedClass() const;
static TGeoManager* GetGeoMangeur();
ClassDef(TEveGeoShape, 1); // Wrapper for TGeoShape with absolute positi
oning and color attributes allowing display of extracted TGeoShape's (witho
ut an active TGeoManager) and simplified geometries (needed for NLT project
ions).
};
#endif #endif
 End of changes. 6 change blocks. 
59 lines changed or deleted 11 lines changed or added


 TEvePolygonSetProjected.h   TEvePolygonSetProjected.h 
// @(#)root/eve:$Id: TEvePolygonSetProjected.h 27157 2009-01-15 14:05:12Z b run $ // @(#)root/eve:$Id: TEvePolygonSetProjected.h 28366 2009-04-27 16:04:05Z m atevz $
// Authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007 // Authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 26 skipping to change at line 26
#include "TEveProjectionBases.h" #include "TEveProjectionBases.h"
#include "TNamed.h" #include "TNamed.h"
#include "TAtt3D.h" #include "TAtt3D.h"
#include "TAttBBox.h" #include "TAttBBox.h"
#include "TColor.h" #include "TColor.h"
#include "TEveVSDStructs.h" #include "TEveVSDStructs.h"
class TBuffer3D; class TBuffer3D;
namespace std
{
template<typename _Tp> class allocator;
template<typename _Tp, typename _Alloc > class list;
}
class TEveVector; class TEveVector;
class TEvePolygonSetProjected : public TEveElementList, class TEvePolygonSetProjected : public TEveElementList,
public TEveProjected, public TEveProjected,
public TAtt3D, public TAtt3D,
public TAttBBox public TAttBBox
{ {
friend class TEvePolygonSetProjectedGL; friend class TEvePolygonSetProjectedGL;
friend class TEvePolygonSetProjectedEditor; friend class TEvePolygonSetProjectedEditor;
private: private:
 End of changes. 2 change blocks. 
7 lines changed or deleted 1 lines changed or added


 TEveViewer.h   TEveViewer.h 
// @(#)root/eve:$Id: TEveViewer.h 28197 2009-04-14 13:59:27Z matevz $ // @(#)root/eve:$Id: TEveViewer.h 28863 2009-06-09 19:17:12Z matevz $
// Authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007 // Authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 83 skipping to change at line 83
class TEveViewerList : public TEveElementList class TEveViewerList : public TEveElementList
{ {
private: private:
TEveViewerList(const TEveViewerList&); // Not implemented TEveViewerList(const TEveViewerList&); // Not implemented
TEveViewerList& operator=(const TEveViewerList&); // Not implemented TEveViewerList& operator=(const TEveViewerList&); // Not implemented
protected: protected:
Bool_t fShowTooltip; Bool_t fShowTooltip;
Float_t fBrightness;
Bool_t fUseLightColorSet;
public: public:
TEveViewerList(const char* n="TEveViewerList", const char* t=""); TEveViewerList(const char* n="TEveViewerList", const char* t="");
virtual ~TEveViewerList() {} virtual ~TEveViewerList() {}
virtual void AddElement(TEveElement* el); virtual void AddElement(TEveElement* el);
virtual void RemoveElementLocal(TEveElement* el); virtual void RemoveElementLocal(TEveElement* el);
virtual void RemoveElementsLocal(); virtual void RemoveElementsLocal();
// -------------------------------- // --------------------------------
skipping to change at line 111 skipping to change at line 114
// -------------------------------- // --------------------------------
void OnMouseOver(TGLPhysicalShape* shape, UInt_t state); void OnMouseOver(TGLPhysicalShape* shape, UInt_t state);
void OnClicked(TObject *obj, UInt_t button, UInt_t state); void OnClicked(TObject *obj, UInt_t button, UInt_t state);
// -------------------------------- // --------------------------------
Bool_t GetShowTooltip() const { return fShowTooltip; } Bool_t GetShowTooltip() const { return fShowTooltip; }
void SetShowTooltip(Bool_t x) { fShowTooltip = x; } void SetShowTooltip(Bool_t x) { fShowTooltip = x; }
Float_t GetColorBrightness() const { return fBrightness; }
void SetColorBrightness(Float_t b);
Bool_t UseLightColorSet() const { return fUseLightColorSet; }
void SwitchColorSet();
ClassDef(TEveViewerList, 0); // List of Viewers providing common operati ons on TEveViewer collections. ClassDef(TEveViewerList, 0); // List of Viewers providing common operati ons on TEveViewer collections.
}; };
#endif #endif
 End of changes. 3 change blocks. 
1 lines changed or deleted 10 lines changed or added


 TEveWindow.h   TEveWindow.h 
// @(#)root/eve:$Id: TEveWindow.h 28197 2009-04-14 13:59:27Z matevz $ // @(#)root/eve:$Id: TEveWindow.h 29129 2009-06-22 09:39:20Z brun $
// Author: Matevz Tadel 2007 // Author: Matevz Tadel 2007
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 135 skipping to change at line 135
virtual void WindowNameChanged(const TString& name); virtual void WindowNameChanged(const TString& name);
virtual void Destroy(); virtual void Destroy();
void SetOriginalSlotAndContainer(TEveWindow* slot, TEveWindow* container ); void SetOriginalSlotAndContainer(TEveWindow* slot, TEveWindow* container );
void SomeWindowClosed(TEveWindow* w); void SomeWindowClosed(TEveWindow* w);
void MainFrameClosed(); void MainFrameClosed();
TEveWindow* GetOriginalSlot() const { return fOriginalSlot; }
TEveWindow* GetOriginalContainer() const { return fOriginalContainer; }
ClassDef(TEveCompositeFrameInMainFrame, 0); // Eve-composite-frame that is contained in one tab of a TGTab. ClassDef(TEveCompositeFrameInMainFrame, 0); // Eve-composite-frame that is contained in one tab of a TGTab.
}; };
//========================================================================= ===== //========================================================================= =====
// TEveCompositeFrameInPack // TEveCompositeFrameInPack
//========================================================================= ===== //========================================================================= =====
class TEveCompositeFrameInPack : public TEveCompositeFrame class TEveCompositeFrameInPack : public TEveCompositeFrame
{ {
private: private:
skipping to change at line 363 skipping to change at line 366
protected: protected:
TGPack *fPack; TGPack *fPack;
public: public:
TEveWindowPack(TGPack* p, const char* n="TEveWindowPack", const char* t= ""); TEveWindowPack(TGPack* p, const char* n="TEveWindowPack", const char* t= "");
virtual ~TEveWindowPack(); virtual ~TEveWindowPack();
virtual TGFrame* GetGUIFrame(); virtual TGFrame* GetGUIFrame();
virtual Bool_t CanMakeNewSlots() const { return kTRUE; } virtual Bool_t CanMakeNewSlots() const { return kTRUE; }
virtual TEveWindowSlot* NewSlotWithWeight(Float_t w);
virtual TEveWindowSlot* NewSlot(); // *MENU* virtual TEveWindowSlot* NewSlot(); // *MENU*
void FlipOrientation(); // *MENU* void FlipOrientation(); // *MENU*
void SetVertical(Bool_t x=kTRUE); void SetVertical(Bool_t x=kTRUE);
void SetHorizontal() { SetVertical(kFALSE); } void SetHorizontal() { SetVertical(kFALSE); }
void EqualizeFrames(); // *MENU* void EqualizeFrames(); // *MENU*
TGPack* GetPack() const { return fPack; } TGPack* GetPack() const { return fPack; }
 End of changes. 3 change blocks. 
1 lines changed or deleted 5 lines changed or added


 TEventIter.h   TEventIter.h 
// @(#)root/proofplayer:$Id: TEventIter.h 25733 2008-10-07 22:37:15Z ganis $ // @(#)root/proofplayer:$Id: TEventIter.h 29126 2009-06-22 09:05:46Z brun $
// Author: Maarten Ballintijn 07/01/02 // Author: Maarten Ballintijn 07/01/02
// Modified: Long Tran-Thanh 04/09/07 (Addition of TEventIterUnit) // Modified: Long Tran-Thanh 04/09/07 (Addition of TEventIterUnit)
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2001, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2001, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 140 skipping to change at line 140
TTree *fTree; // tree we are iterating over TTree *fTree; // tree we are iterating over
TTreeCache *fTreeCache; // instance of the tree cache for the tree TTreeCache *fTreeCache; // instance of the tree cache for the tree
Bool_t fUseTreeCache; // Control usage of the tree cache Bool_t fUseTreeCache; // Control usage of the tree cache
Long64_t fCacheSize; // Cache size Long64_t fCacheSize; // Cache size
TList *fFileTrees; // Files && Trees currently open TList *fFileTrees; // Files && Trees currently open
// Auxilliary class to keep track open files and loaded trees // Auxilliary class to keep track open files and loaded trees
class TFileTree : public TNamed { class TFileTree : public TNamed {
public: public:
Bool_t fUsed; Bool_t fUsed;
Bool_t fIsLocal;
TFile *fFile; TFile *fFile;
TList *fTrees; TList *fTrees;
TFileTree(const char *name, TFile *f); TFileTree(const char *name, TFile *f, Bool_t islocal);
virtual ~TFileTree(); virtual ~TFileTree();
}; };
TTree* Load(TDSetElement *elem); TTree* Load(TDSetElement *elem, Bool_t &localfile);
TTree* GetTrees(TDSetElement *elem); TTree* GetTrees(TDSetElement *elem);
public: public:
TEventIterTree(); TEventIterTree();
TEventIterTree(TDSet *dset, TSelector *sel, Long64_t first, Long64_t num ); TEventIterTree(TDSet *dset, TSelector *sel, Long64_t first, Long64_t num );
~TEventIterTree(); ~TEventIterTree();
Long64_t GetNextEvent(); Long64_t GetNextEvent();
ClassDef(TEventIterTree,0) // Event iterator for Trees ClassDef(TEventIterTree,0) // Event iterator for Trees
}; };
 End of changes. 4 change blocks. 
3 lines changed or deleted 4 lines changed or added


 TF2GL.h   TF2GL.h 
// @(#)root/gl:$Id: TF2GL.h 21252 2007-12-07 01:39:32Z matevz $ // @(#)root/gl:$Id: TF2GL.h 28378 2009-04-28 15:40:53Z matevz $
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
#ifndef ROOT_TF2GL #ifndef ROOT_TF2GL
#define ROOT_TF2GL #define ROOT_TF2GL
skipping to change at line 48 skipping to change at line 48
virtual Bool_t SetModel(TObject* obj, const Option_t* opt=0); virtual Bool_t SetModel(TObject* obj, const Option_t* opt=0);
virtual void SetBBox(); virtual void SetBBox();
virtual void DirectDraw(TGLRnrCtx & rnrCtx) const; virtual void DirectDraw(TGLRnrCtx & rnrCtx) const;
virtual Bool_t KeepDuringSmartRefresh() const { return kFALSE; } virtual Bool_t KeepDuringSmartRefresh() const { return kFALSE; }
// To support two-level selection // To support two-level selection
// virtual Bool_t SupportsSecondarySelect() const { return kTRUE; } // virtual Bool_t SupportsSecondarySelect() const { return kTRUE; }
// virtual void ProcessSelection(UInt_t* ptr, TGLViewer*, TGLScene*); // virtual void ProcessSelection(UInt_t* ptr, TGLViewer*, TGLScene*);
ClassDef(TF2GL, 0) // GL renderer for TF2 and TF3. ClassDef(TF2GL, 0); // GL renderer for TF2 and TF3.
}; };
#endif #endif
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 TF3.h   TF3.h 
// @(#)root/hist:$Id: TF3.h 20882 2007-11-19 11:31:26Z rdm $ // @(#)root/hist:$Id: TF3.h 28481 2009-05-07 13:36:10Z moneta $
// Author: Rene Brun 27/10/95 // Author: Rene Brun 27/10/95
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
// ---------------------------------- F3.h // ---------------------------------- F3.h
skipping to change at line 54 skipping to change at line 54
TF3(const char *name, Double_t (*fcn)(const Double_t *, const Double_t * ), Double_t xmin=0, Double_t xmax=1, Double_t ymin=0, TF3(const char *name, Double_t (*fcn)(const Double_t *, const Double_t * ), Double_t xmin=0, Double_t xmax=1, Double_t ymin=0,
Double_t ymax=1, Double_t zmin=0, Double_t zmax=1, Int_t npar=0); Double_t ymax=1, Double_t zmin=0, Double_t zmax=1, Int_t npar=0);
#endif #endif
// constructor using a functor // constructor using a functor
TF3(const char *name, ROOT::Math::ParamFunctor f, Double_t xmin = 0, Dou ble_t xmax = 1, Double_t ymin = 0, Double_t ymax = 1, Double_t zmin=0, Doub le_t zmax=1, Int_t npar = 0); TF3(const char *name, ROOT::Math::ParamFunctor f, Double_t xmin = 0, Dou ble_t xmax = 1, Double_t ymin = 0, Double_t ymax = 1, Double_t zmin=0, Doub le_t zmax=1, Int_t npar = 0);
// Template constructors from a pointer to any C++ class of type PtrObj with a specific member function of type // Template constructors from a pointer to any C++ class of type PtrObj with a specific member function of type
// MemFn. // MemFn.
template <class PtrObj, typename MemFn> template <class PtrObj, typename MemFn>
TF3(const char *name, const PtrObj& p, MemFn memFn, Double_t xmin, Doub le_t xmax, Double_t ymin, Double_t ymax, Double_t zmin, Double_t zmax, Int_ t npar, char * c1, char * c2) : TF3(const char *name, const PtrObj& p, MemFn memFn, Double_t xmin, Doub le_t xmax, Double_t ymin, Double_t ymax, Double_t zmin, Double_t zmax, Int_ t npar, const char * c1, const char * c2) :
TF2(name,p,memFn,xmin,xmax,ymin,ymax,npar,c1,c2), TF2(name,p,memFn,xmin,xmax,ymin,ymax,npar,c1,c2),
fZmin(zmin), fZmax(zmax), fNpz(30) fZmin(zmin), fZmax(zmax), fNpz(30)
{ {
fNdim = 3; fNdim = 3;
} }
// Template constructors from any C++ callable object, defining the o perator() (double * , double *) // Template constructors from any C++ callable object, defining the o perator() (double * , double *)
// and returning a double. // and returning a double.
template <typename Func> template <typename Func>
TF3(const char *name, Func f, Double_t xmin, Double_t xmax, Double_t ymi n, Double_t ymax, Double_t zmin, Double_t zmax, Int_t npar, char * c1 ) : TF3(const char *name, Func f, Double_t xmin, Double_t xmax, Double_t ymi n, Double_t ymax, Double_t zmin, Double_t zmax, Int_t npar, const char * c1 ) :
TF2(name,f,xmin,xmax,ymin,ymax,npar,c1), TF2(name,f,xmin,xmax,ymin,ymax,npar,c1),
fZmin(zmin), fZmax(zmax), fNpz(30) fZmin(zmin), fZmax(zmax), fNpz(30)
{ {
fNdim = 3; fNdim = 3;
} }
// constructor used by CINT // constructor used by CINT
TF3(const char *name, void *ptr, Double_t xmin, Double_t xmax, Double_t TF3(const char *name, void *ptr, Double_t xmin, Double_t xmax, Double_t
ymin, Double_t ymax, Double_t zmin, Double_t zmax, Int_t npar, char *class ymin, Double_t ymax, Double_t zmin, Double_t zmax, Int_t npar, const char
Name ); *className );
TF3(const char *name, void *ptr, void *,Double_t xmin, Double_t xmax, Do TF3(const char *name, void *ptr, void *,Double_t xmin, Double_t xmax, Do
uble_t ymin, Double_t ymax, Double_t zmin, Double_t zmax, Int_t npar, char uble_t ymin, Double_t ymax, Double_t zmin, Double_t zmax, Int_t npar, const
*className, char *methodName = 0); char *className, const char *methodName = 0);
TF3(const TF3 &f3); TF3(const TF3 &f3);
TF3& operator=(const TF3 &rhs); TF3& operator=(const TF3 &rhs);
virtual ~TF3(); virtual ~TF3();
virtual void Copy(TObject &f3) const; virtual void Copy(TObject &f3) const;
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py); virtual Int_t DistancetoPrimitive(Int_t px, Int_t py);
virtual void Draw(Option_t *option=""); virtual void Draw(Option_t *option="");
virtual void DrawDerivative(Option_t * ="al") {;} virtual void DrawDerivative(Option_t * ="al") {;}
virtual void DrawIntegral(Option_t * ="al") {;} virtual void DrawIntegral(Option_t * ="al") {;}
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py); virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py);
 End of changes. 4 change blocks. 
9 lines changed or deleted 9 lines changed or added


 TFileCollection.h   TFileCollection.h 
// @(#)root/base:$Id: TFileCollection.h 27854 2009-03-17 21:33:41Z rdm $ // @(#)root/base:$Id: TFileCollection.h 28573 2009-05-12 14:29:22Z rdm $
// Author: Jan Fiete Grosse-Oetringhaus 01/06/07 // Author: Jan Fiete Grosse-Oetringhaus 01/06/07
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 35 skipping to change at line 35
#ifndef ROOT_TNamed #ifndef ROOT_TNamed
#include "TNamed.h" #include "TNamed.h"
#endif #endif
#ifndef ROOT_TString #ifndef ROOT_TString
#include "TString.h" #include "TString.h"
#endif #endif
class THashList; class THashList;
class TMap;
class TList; class TList;
class TFileInfo; class TFileInfo;
class TFileInfoMeta; class TFileInfoMeta;
class TObjString; class TObjString;
class TFileCollection : public TNamed { class TFileCollection : public TNamed {
private: private:
THashList *fList; //-> list of TFileInfos THashList *fList; //-> list of TFileInfos
TList *fMetaDataList; //-> generic list of file meta data obj ect(s) TList *fMetaDataList; //-> generic list of file meta data obj ect(s)
skipping to change at line 71 skipping to change at line 72
const char *file = 0, Int_t nfiles = -1, Int_t firstfile = 1); const char *file = 0, Int_t nfiles = -1, Int_t firstfile = 1);
virtual ~TFileCollection(); virtual ~TFileCollection();
Int_t Add(TFileInfo *info); Int_t Add(TFileInfo *info);
Int_t Add(TFileCollection *coll); Int_t Add(TFileCollection *coll);
Int_t AddFromFile(const char *file, Int_t nfiles = -1, Int_t f irstfile = 1); Int_t AddFromFile(const char *file, Int_t nfiles = -1, Int_t f irstfile = 1);
Int_t Add(const char *path); Int_t Add(const char *path);
THashList *GetList() { return fList; } THashList *GetList() { return fList; }
void SetList(THashList* list) { fList = list; } void SetList(THashList* list) { fList = list; }
TObjString *ExportInfo(const char *name = 0); TObjString *ExportInfo(const char *name = 0, Int_t popt = 0);
Int_t RemoveDuplicates();
Int_t Update(Long64_t avgsize = -1); Int_t Update(Long64_t avgsize = -1);
void Sort(); void Sort();
void SetAnchor(const char *anchor); void SetAnchor(const char *anchor);
void Print(Option_t *option = "") const; void Print(Option_t *option = "") const;
void SetBitAll(UInt_t f); void SetBitAll(UInt_t f);
void ResetBitAll(UInt_t f); void ResetBitAll(UInt_t f);
Long64_t GetTotalSize() const { return fTotalSize; } Long64_t GetTotalSize() const { return fTotalSize; }
Long64_t GetNFiles() const { return fNFiles; } Long64_t GetNFiles() const { return fNFiles; }
Long64_t GetNStagedFiles() const { return fNStagedFiles; } Long64_t GetNStagedFiles() const { return fNStagedFiles; }
Long64_t GetNCorruptFiles() const { return fNCorruptFiles; } Long64_t GetNCorruptFiles() const { return fNCorruptFiles; }
Float_t GetStagedPercentage() const Float_t GetStagedPercentage() const
{ return (fNFiles > 0) ? 100. * fNStagedFiles / fNFiles : 0; } { return (fNFiles > 0) ? 100. * fNStagedFiles / fNFiles : 0; }
Float_t GetCorruptedPercentage() const Float_t GetCorruptedPercentage() const
{ return (fNFiles > 0) ? 100. * fNCorruptFiles / fNFiles : 0; } { return (fNFiles > 0) ? 100. * fNCorruptFiles / fNFiles : 0; }
const char *GetDefaultTreeName() const; const char *GetDefaultTreeName() const;
void SetDefaultTreeName(const char* treeName) { fDefaultTree = treeName; } void SetDefaultTreeName(const char* treeName) { fDefaultTree = treeName; }
Long64_t GetTotalEntries(const char *tree) const; Long64_t GetTotalEntries(const char *tree) const;
TFileInfoMeta *GetMetaData(const char *meta = 0) const; TFileInfoMeta *GetMetaData(const char *meta = 0) const;
void SetDefaultMetaData(const char *meta); void SetDefaultMetaData(const char *meta);
Bool_t AddMetaData(TObject *meta);
void RemoveMetaData(const char *meta = 0); void RemoveMetaData(const char *meta = 0);
TFileCollection *GetStagedSubset(); TFileCollection *GetStagedSubset();
TFileCollection *GetFilesOnServer(const char *server);
TMap *GetFilesPerServer(const char *exclude = 0);
ClassDef(TFileCollection, 3) // Collection of TFileInfo objects ClassDef(TFileCollection, 3) // Collection of TFileInfo objects
}; };
#endif #endif
 End of changes. 7 change blocks. 
2 lines changed or deleted 9 lines changed or added


 TFileInfo.h   TFileInfo.h 
// @(#)root/base:$Id: TFileInfo.h 23025 2008-04-07 16:48:00Z rdm $ // @(#)root/base:$Id: TFileInfo.h 28573 2009-05-12 14:29:22Z rdm $
// Author: Andreas-Joachim Peters 20/9/2005 // Author: Andreas-Joachim Peters 20/9/2005
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2005, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2005, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 60 skipping to change at line 60
private: private:
TUrl *fCurrentUrl; //! current URL to access the file, po ints to URL TUrl *fCurrentUrl; //! current URL to access the file, po ints to URL
// in the fUrlList or 0, if the list end is reached // in the fUrlList or 0, if the list end is reached
TList *fUrlList; // list of file URLs TList *fUrlList; // list of file URLs
Long64_t fSize; // file size Long64_t fSize; // file size
TUUID *fUUID; //-> uuid of the referenced file TUUID *fUUID; //-> uuid of the referenced file
TMD5 *fMD5; //-> md5 digest of the file TMD5 *fMD5; //-> md5 digest of the file
TList *fMetaDataList; // generic list of file meta data obje ct(s) TList *fMetaDataList; // generic list of file meta data obje ct(s)
TFileInfo(const TFileInfo&); // not implemented
TFileInfo& operator=(const TFileInfo&); // not implemented TFileInfo& operator=(const TFileInfo&); // not implemented
public: public:
enum EStatusBits { enum EStatusBits {
kStaged = BIT(15), kStaged = BIT(15),
kCorrupted = BIT(16) kCorrupted = BIT(16)
}; };
TFileInfo(const char *url = 0, Long64_t size = -1, const char *uuid = 0, TFileInfo(const char *url = 0, Long64_t size = -1, const char *uuid = 0,
const char *md5 = 0, TObject *meta = 0); const char *md5 = 0, TObject *meta = 0);
TFileInfo(const TFileInfo &);
virtual ~TFileInfo(); virtual ~TFileInfo();
void ResetUrl() { fCurrentUrl = (TUrl*)fUrlList->First(); } void ResetUrl() { fCurrentUrl = (TUrl*)fUrlList->First(); }
TUrl *NextUrl(); TUrl *NextUrl();
TUrl *GetCurrentUrl() const; TUrl *GetCurrentUrl() const;
TUrl *GetFirstUrl() const { return (TUrl*)fUrlList->First(); } TUrl *GetFirstUrl() const { return (TUrl*)fUrlList->First(); }
Int_t GetNUrls() const { return fUrlList->GetEntries(); } Int_t GetNUrls() const { return fUrlList->GetEntries(); }
Bool_t SetCurrentUrl(const char *url);
Bool_t SetCurrentUrl(TUrl *url);
Long64_t GetSize() const { return fSize; } Long64_t GetSize() const { return fSize; }
TUUID *GetUUID() const { return fUUID; } TUUID *GetUUID() const { return fUUID; }
TMD5 *GetMD5() const { return fMD5; } TMD5 *GetMD5() const { return fMD5; }
TList *GetMetaDataList() const { return fMetaDataList; } TList *GetMetaDataList() const { return fMetaDataList; }
TFileInfoMeta *GetMetaData(const char *meta = 0) const; TFileInfoMeta *GetMetaData(const char *meta = 0) const;
void SetSize(Long64_t size) { fSize = size; } void SetSize(Long64_t size) { fSize = size; }
void SetUUID(const char *uuid);
TUrl *FindByUrl(const char *url); TUrl *FindByUrl(const char *url, Bool_t withDeflt = kFALSE);
Bool_t AddUrl(const char *url, Bool_t infront = kFALSE); Bool_t AddUrl(const char *url, Bool_t infront = kFALSE);
Bool_t RemoveUrl(const char *url); Bool_t RemoveUrl(const char *url);
Bool_t AddMetaData(TObject *meta); Bool_t AddMetaData(TObject *meta);
Bool_t RemoveMetaData(const char *meta = 0); Bool_t RemoveMetaData(const char *meta = 0);
Bool_t IsSortable() const { return kTRUE; } Bool_t IsSortable() const { return kTRUE; }
Int_t Compare(const TObject *obj) const; Int_t Compare(const TObject *obj) const;
void Print(Option_t *options="") const; void Print(Option_t *options="") const;
skipping to change at line 113 skipping to change at line 117
class TFileInfoMeta : public TNamed { class TFileInfoMeta : public TNamed {
private: private:
Long64_t fEntries; // number of entries in tree or number of obj ects Long64_t fEntries; // number of entries in tree or number of obj ects
Long64_t fFirst; // first valid tree entry Long64_t fFirst; // first valid tree entry
Long64_t fLast; // last valid tree entry Long64_t fLast; // last valid tree entry
Bool_t fIsTree; // true if type is a TTree (or TTree derived) Bool_t fIsTree; // true if type is a TTree (or TTree derived)
Long64_t fTotBytes; // uncompressed size in bytes Long64_t fTotBytes; // uncompressed size in bytes
Long64_t fZipBytes; // compressed size in bytes Long64_t fZipBytes; // compressed size in bytes
TFileInfoMeta(const TFileInfoMeta&); // not implemented
TFileInfoMeta& operator=(const TFileInfoMeta&); // not implemented TFileInfoMeta& operator=(const TFileInfoMeta&); // not implemented
public: public:
enum EStatusBits { kExternal = BIT(15) };
TFileInfoMeta() : fEntries(-1), fFirst(0), fLast(-1), TFileInfoMeta() : fEntries(-1), fFirst(0), fLast(-1),
fIsTree(kFALSE), fTotBytes(-1), fZipBytes(-1){ } fIsTree(kFALSE), fTotBytes(-1), fZipBytes(-1)
{ ResetBit(TFileInfoMeta::kExternal); }
TFileInfoMeta(const char *objPath, const char *objClass = "TTree", TFileInfoMeta(const char *objPath, const char *objClass = "TTree",
Long64_t entries = -1, Long64_t first = 0, Long64_t last = -1, Long64_t entries = -1, Long64_t first = 0, Long64_t last = -1,
Long64_t totbytes = -1, Long64_t zipbytes = -1); Long64_t totbytes = -1, Long64_t zipbytes = -1);
TFileInfoMeta(const char *objPath, const char *objDir, TFileInfoMeta(const char *objPath, const char *objDir,
const char *objClass, Long64_t entries = -1, const char *objClass, Long64_t entries = -1,
Long64_t first = 0, Long64_t last = -1, Long64_t first = 0, Long64_t last = -1,
Long64_t totbytes = -1, Long64_t zipbytes = -1); Long64_t totbytes = -1, Long64_t zipbytes = -1);
TFileInfoMeta(const TFileInfoMeta &m);
virtual ~TFileInfoMeta() { } virtual ~TFileInfoMeta() { }
const char *GetObject() const; const char *GetObject() const;
const char *GetClass() const { return GetTitle(); } const char *GetClass() const { return GetTitle(); }
const char *GetDirectory() const; const char *GetDirectory() const;
Long64_t GetEntries() const { return fEntries; } Long64_t GetEntries() const { return fEntries; }
Long64_t GetFirst() const { return fFirst; } Long64_t GetFirst() const { return fFirst; }
Long64_t GetLast() const { return fLast; } Long64_t GetLast() const { return fLast; }
Bool_t IsTree() const { return fIsTree; } Bool_t IsTree() const { return fIsTree; }
 End of changes. 10 change blocks. 
5 lines changed or deleted 12 lines changed or added


 TFileMerger.h   TFileMerger.h 
// @(#)root/proofplayer:$Id: TFileMerger.h 27117 2009-01-12 18:36:25Z pcana l $ // @(#)root/proofplayer:$Id: TFileMerger.h 28883 2009-06-10 14:32:37Z ganis $
// Author: Andreas Peters + Fons Rademakers 26/5/2005 // Author: Andreas Peters + Fons Rademakers 26/5/2005
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2005, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2005, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 77 skipping to change at line 77
//--- file management interface //--- file management interface
virtual Bool_t SetCWD(const char * /*path*/) { MayNotUse("SetCWD"); retu rn kFALSE; } virtual Bool_t SetCWD(const char * /*path*/) { MayNotUse("SetCWD"); retu rn kFALSE; }
virtual const char *GetCWD() { MayNotUse("GetCWD"); return 0; } virtual const char *GetCWD() { MayNotUse("GetCWD"); return 0; }
//--- file merging interface //--- file merging interface
virtual void Reset(); virtual void Reset();
virtual Bool_t AddFile(const char *url); virtual Bool_t AddFile(const char *url);
virtual Bool_t OutputFile(const char *url); virtual Bool_t OutputFile(const char *url);
virtual void PrintFiles(Option_t *options); virtual void PrintFiles(Option_t *options);
virtual Bool_t Merge(Bool_t progressbar = kTRUE); virtual Bool_t Merge(Bool_t = kTRUE);
virtual Bool_t MergeRecursive(TDirectory *target, TList *sourcelist, Int _t isdir); virtual Bool_t MergeRecursive(TDirectory *target, TList *sourcelist, Int _t isdir);
virtual void SetFastMethod(Bool_t fast=kTRUE) {fFastMethod = fast;} virtual void SetFastMethod(Bool_t fast=kTRUE) {fFastMethod = fast;}
virtual void SetNotrees(Bool_t notrees=kFALSE) {fNoTrees = notrees;} virtual void SetNotrees(Bool_t notrees=kFALSE) {fNoTrees = notrees;}
ClassDef(TFileMerger,1) // File copying and merging services ClassDef(TFileMerger,1) // File copying and merging services
}; };
#endif #endif
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 TFitEditor.h   TFitEditor.h 
// @(#)root/fitpanel:$Id: TFitEditor.h 27549 2009-02-20 14:31:41Z moneta $ // @(#)root/fitpanel:$Id: TFitEditor.h 29104 2009-06-19 13:41:05Z moneta $
// Author: Ilka Antcheva, Lorenzo Moneta, David Gonzalez Maline 10/08/2006 // Author: Ilka Antcheva, Lorenzo Moneta, David Gonzalez Maline 10/08/2006
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2006, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2006, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 135 skipping to change at line 135
Double_t & operator[](UInt_t i) { return fP[i];} Double_t & operator[](UInt_t i) { return fP[i];}
Double_t fP[3]; Double_t fP[3];
}; };
std::vector<FuncParamData_t> fFuncPars; // function parameters (value + limits) std::vector<FuncParamData_t> fFuncPars; // function parameters (value + limits)
std::vector<TF1*> fPrevFit; // Previous succesful fits. std::vector<TF1*> fPrevFit; // Previous succesful fits.
TGRadioButton *fLibMinuit; // set default minimization libr ary (Minuit) TGRadioButton *fLibMinuit; // set default minimization libr ary (Minuit)
TGRadioButton *fLibMinuit2; // set Minuit2 as minimization l ibrary TGRadioButton *fLibMinuit2; // set Minuit2 as minimization l ibrary
TGRadioButton *fLibFumili; // set Fumili as minimization li brary TGRadioButton *fLibFumili; // set Fumili as minimization li brary
TGRadioButton *fMigrad; // set default minimization meth TGRadioButton *fLibGSL; // set Fumili as minimization li
od (MIGRAD) brary
TGRadioButton *fSimplex; // set Simplex as minimization m TGComboBox *fMinMethodList; // set the minimization method
ethod
TGRadioButton *fFumili; // set Fumili as minimization me
thod
TGRadioButton *fCombination; // set Combination as minimizati
on method
TGRadioButton *fScan; // set Scan as minimization meth
od
TGNumberEntryField *fErrorScale; // contains error scale set for minimization TGNumberEntryField *fErrorScale; // contains error scale set for minimization
TGNumberEntryField *fTolerance; // contains tolerance set for mi nimization TGNumberEntryField *fTolerance; // contains tolerance set for mi nimization
TGNumberEntryField *fIterations; // contains maximum number of it erations TGNumberEntryField *fIterations; // contains maximum number of it erations
TGStatusBar *fStatusBar; // statusbar widget TGStatusBar *fStatusBar; // statusbar widget
static TFitEditor *fgFitDialog; // singleton fit panel static TFitEditor *fgFitDialog; // singleton fit panel
TGComboBox* BuildDataSetList(TGFrame *parent, Int_t id); TGComboBox* BuildDataSetList(TGFrame *parent, Int_t id);
TGComboBox* BuildMethodList(TGFrame *parent, Int_t id); TGComboBox* BuildMethodList(TGFrame *parent, Int_t id);
skipping to change at line 197 skipping to change at line 194
protected: protected:
virtual void SetCanvas(TCanvas *c); virtual void SetCanvas(TCanvas *c);
public: public:
virtual void SetFitObject(TVirtualPad *pad, TObject *obj, Int_t event) ; virtual void SetFitObject(TVirtualPad *pad, TObject *obj, Int_t event) ;
virtual void SetFunction(const char *function); virtual void SetFunction(const char *function);
// slot methods 'General' tab // slot methods 'General' tab
void FillFunctionList(Int_t selected = -1); void FillFunctionList(Int_t selected = -1);
void FillMinMethodList(Int_t selected = -1);
virtual void DoAddition(Bool_t on); virtual void DoAddition(Bool_t on);
virtual void DoAdvancedOptions(); virtual void DoAdvancedOptions();
virtual void DoAllWeights1(); virtual void DoAllWeights1();
virtual void DoClose(); virtual void DoClose();
virtual void DoEmptyBinsAllWeights1(); virtual void DoEmptyBinsAllWeights1();
virtual void DoEnteredFunction(); virtual void DoEnteredFunction();
virtual void DoFit(); virtual void DoFit();
virtual void DoMaxIterations(); virtual void DoMaxIterations();
virtual void DoDataSet(Int_t sel); virtual void DoDataSet(Int_t sel);
virtual void DoFunction(Int_t sel); virtual void DoFunction(Int_t sel);
skipping to change at line 223 skipping to change at line 221
virtual void DoSliderXMoved(); virtual void DoSliderXMoved();
virtual void DoNumericSliderXChanged(); virtual void DoNumericSliderXChanged();
virtual void DoSliderYMoved(); virtual void DoSliderYMoved();
virtual void DoNumericSliderYChanged(); virtual void DoNumericSliderYChanged();
virtual void DoSliderZMoved(); virtual void DoSliderZMoved();
virtual void DoUserDialog(); virtual void DoUserDialog();
virtual void DoUseFuncRange(); virtual void DoUseFuncRange();
// slot methods 'Minimization' tab // slot methods 'Minimization' tab
virtual void DoLibrary(Bool_t on); virtual void DoLibrary(Bool_t on);
virtual void DoMinMethod(Bool_t on); virtual void DoMinMethod(Int_t );
virtual void DoPrintOpt(Bool_t on); virtual void DoPrintOpt(Bool_t on);
public: public:
typedef std::vector<FuncParamData_t > FuncParams_t; typedef std::vector<FuncParamData_t > FuncParams_t;
ClassDef(TFitEditor,0) //Fit Panel interface ClassDef(TFitEditor,0) //Fit Panel interface
}; };
#endif #endif
 End of changes. 4 change blocks. 
12 lines changed or deleted 6 lines changed or added


 TGFileBrowser.h   TGFileBrowser.h 
// @(#)root/gui:$Id: TGFileBrowser.h 23625 2008-05-01 06:39:40Z rdm $ // @(#)root/gui:$Id: TGFileBrowser.h 28853 2009-06-09 08:19:33Z bellenot $
// Author: Bertrand Bellenot 26/09/2007 // Author: Bertrand Bellenot 26/09/2007
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 94 skipping to change at line 94
void Clicked(TGListTreeItem *item, Int_t btn, Int_t x, Int_t y); void Clicked(TGListTreeItem *item, Int_t btn, Int_t x, Int_t y);
TString DirName(TGListTreeItem* item); TString DirName(TGListTreeItem* item);
TString FullPathName(TGListTreeItem* item); TString FullPathName(TGListTreeItem* item);
void DoubleClicked(TGListTreeItem *item, Int_t btn); void DoubleClicked(TGListTreeItem *item, Int_t btn);
Long_t XXExecuteDefaultAction(TObject *obj); Long_t XXExecuteDefaultAction(TObject *obj);
char *FormatFileInfo(const char *fname, Long64_t size, Long_t modt ime); char *FormatFileInfo(const char *fname, Long64_t size, Long_t modt ime);
void GetFilePictures(const TGPicture **pic, Int_t file_type, Bool _t is_link, const char *name); void GetFilePictures(const TGPicture **pic, Int_t file_type, Bool _t is_link, const char *name);
void GetObjPicture(const TGPicture **pic, TObject *obj); void GetObjPicture(const TGPicture **pic, TObject *obj);
void GotoDir(const char *path); void GotoDir(const char *path);
void Selected(char *); void Selected(char *);
void Update();
ClassDef(TGFileBrowser, 0) // File browser. ClassDef(TGFileBrowser, 0) // File browser.
}; };
#endif #endif
 End of changes. 2 change blocks. 
1 lines changed or deleted 2 lines changed or added


 TGLAxisPainter.h   TGLAxisPainter.h 
// @(#)root/eve:$Id: TGLAxisPainter.h 28197 2009-04-14 13:59:27Z matevz $ // @(#)root/eve:$Id: TGLAxisPainter.h 28378 2009-04-28 15:40:53Z matevz $
// Author: Alja Mrak-Tadel 2009 // Author: Alja Mrak-Tadel 2009
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
#ifndef ROOT_TGLAxisPainter #ifndef ROOT_TGLAxisPainter
#define ROOT_TGLAxisPainter #define ROOT_TGLAxisPainter
#include "TGLUtil.h" #include "TGLUtil.h"
#include "TGLFontManager.h" #include "TGLFontManager.h"
class TAttAxis; class TAttAxis;
class TAxis; class TAxis;
class TH1;
class TGLRnrCtx; class TGLRnrCtx;
//=========================================================================
=====
// TGLAxisPainter
//=========================================================================
=====
class TGLAxisPainter class TGLAxisPainter
{ {
public: public:
typedef std::pair <Float_t, Float_t> Lab_t; // label <pos, value> pa ir typedef std::pair <Float_t, Float_t> Lab_t; // label <pos, value> pa ir
typedef std::vector<Lab_t> LabVec_t; typedef std::vector<Lab_t> LabVec_t;
typedef std::pair <Float_t, Int_t> TM_t; // tick-mark <pos, order > pair typedef std::pair <Float_t, Int_t> TM_t; // tick-mark <pos, order > pair
typedef std::vector<TM_t> TMVec_t; // vector od tick line s typedef std::vector<TM_t> TMVec_t; // vector od tick line s
private: private:
TGLAxisPainter(const TGLAxisPainter&); // Not implemented TGLAxisPainter(const TGLAxisPainter&); // Not implemented
skipping to change at line 50 skipping to change at line 55
// Font derived from axis attributes. // Font derived from axis attributes.
TGLFont fLabelFont; TGLFont fLabelFont;
TGLFont fTitleFont; TGLFont fTitleFont;
// Print format. // Print format.
void LabelsLimits(const char *label, Int_t &first, Int_t &last) const; void LabelsLimits(const char *label, Int_t &first, Int_t &last) const;
void FormAxisValue(Double_t x, TString &s) const; void FormAxisValue(Double_t x, TString &s) const;
protected: protected:
TAttAxis *fAttAxis; // Model. TAttAxis *fAttAxis; // Model.
TGLFont::EMode fFontMode; // Later in AttAxis TGLFont::EMode fFontMode; // To be put into TAttAxis
LabVec_t fLabVec; // List of Labels position-value pairs LabVec_t fLabVec; // List of Labels position-value pairs
TMVec_t fTMVec; // List of tick-mark position-value pairs TMVec_t fTMVec; // List of tick-mark position-value pairs
// //
// Additional axis attributes required for GL rendering: // Additional axis attributes required for GL rendering:
// Orientation // Orientation
TGLVector3 fDir; TGLVector3 fDir;
TGLVector3 fTMOff[3]; TGLVector3 fTMOff[3];
Int_t fTMNDim; Int_t fTMNDim;
skipping to change at line 110 skipping to change at line 115
void SetAttAxis(TAttAxis* a) { fAttAxis = a; } void SetAttAxis(TAttAxis* a) { fAttAxis = a; }
TAttAxis* GetAttAxis() { return fAttAxis; } TAttAxis* GetAttAxis() { return fAttAxis; }
// Utility. // Utility.
void SetLabelFont(TGLRnrCtx &rnrCtx, const char* fontName, Int_t pixelSi ze = 64, Double_t font3DSize = -1); void SetLabelFont(TGLRnrCtx &rnrCtx, const char* fontName, Int_t pixelSi ze = 64, Double_t font3DSize = -1);
void SetTitleFont(TGLRnrCtx &rnrCtx, const char* fontName, Int_t pixelSi ze = 64, Double_t font3DSize = -1); void SetTitleFont(TGLRnrCtx &rnrCtx, const char* fontName, Int_t pixelSi ze = 64, Double_t font3DSize = -1);
void SetTextFormat(Double_t min, Double_t max, Double_t binWidth); void SetTextFormat(Double_t min, Double_t max, Double_t binWidth);
// Renderers. // Renderers.
void RnrText( const char* txt, const TGLVector3 &pos, const TGLFont::ETe xtAlign_e align, const TGLFont &font) const; void RnrText (const char* txt, const TGLVector3 &pos, const TGLFont::ETe xtAlign_e align, const TGLFont &font) const;
void RnrTitle(const char* title, TGLVector3 &pos, TGLFont::ETextAlign_e align) const; void RnrTitle(const char* title, TGLVector3 &pos, TGLFont::ETextAlign_e align) const;
void RnrLabels() const; void RnrLabels() const;
void RnrLines() const; void RnrLines() const;
void PaintAxis(TGLRnrCtx& ctx, TAxis* ax); void PaintAxis(TGLRnrCtx& ctx, TAxis* ax);
ClassDef(TGLAxisPainter, 0); // GL axis painter. ClassDef(TGLAxisPainter, 0); // GL axis painter.
}; };
//=========================================================================
=====
// TGLAxisPainterBox
//=========================================================================
=====
class TGLAxisPainterBox : public TGLAxisPainter
{
protected:
TGLVector3 fAxisTitlePos[3];
TAxis* fAxis[3];
public:
TGLAxisPainterBox();
virtual ~TGLAxisPainterBox();
void SetAxis3DTitlePos(TGLRnrCtx &rnrCtx);
void DrawAxis3D(TGLRnrCtx &rnrCtx);
void PlotStandard(TGLRnrCtx &rnrCtx, const TH1* histo, const TGLBounding
Box& bbox);
ClassDef(TGLAxisPainterBox, 0); // Painter of GL axes for a 3D box.
};
#endif #endif
 End of changes. 6 change blocks. 
3 lines changed or deleted 35 lines changed or added


 TGLBoxPainter.h   TGLBoxPainter.h 
skipping to change at line 43 skipping to change at line 43
TString fPlotInfo; TString fPlotInfo;
Rgl::Range_t fMinMaxVal; Rgl::Range_t fMinMaxVal;
mutable TGLQuadric fQuadric; mutable TGLQuadric fQuadric;
TGLBoxPainter(const TGLBoxPainter &); TGLBoxPainter(const TGLBoxPainter &);
TGLBoxPainter &operator = (const TGLBoxPainter &); TGLBoxPainter &operator = (const TGLBoxPainter &);
public: public:
TGLBoxPainter(TH1 *hist, TGLPlotCamera *camera, TGLPlotCoordinates *coor d, TGLPaintDevice *dev = 0); TGLBoxPainter(TH1 *hist, TGLPlotCamera *camera, TGLPlotCoordinates *coor d);
char *GetPlotInfo(Int_t px, Int_t py); char *GetPlotInfo(Int_t px, Int_t py);
Bool_t InitGeometry(); Bool_t InitGeometry();
void StartPan(Int_t px, Int_t py); void StartPan(Int_t px, Int_t py);
void Pan(Int_t px, Int_t py); void Pan(Int_t px, Int_t py);
void AddOption(const TString &stringOption); void AddOption(const TString &stringOption);
void ProcessEvent(Int_t event, Int_t px, Int_t py); void ProcessEvent(Int_t event, Int_t px, Int_t py);
private: private:
//Overriders //Overriders
void InitGL()const; void InitGL()const;
void DeInitGL()const;
void DrawPlot()const; void DrawPlot()const;
void SetPlotColor()const; void SetPlotColor()const;
void DrawSectionXOZ()const; void DrawSectionXOZ()const;
void DrawSectionYOZ()const; void DrawSectionYOZ()const;
void DrawSectionXOY()const; void DrawSectionXOY()const;
void DrawPalette()const; void DrawPalette()const;
void DrawPaletteAxis()const; void DrawPaletteAxis()const;
 End of changes. 2 change blocks. 
1 lines changed or deleted 3 lines changed or added


 TGLClip.h   TGLClip.h 
// @(#)root/gl:$Id: TGLClip.h 26394 2008-11-23 14:35:25Z matevz $ // @(#)root/gl:$Id: TGLClip.h 28607 2009-05-13 15:11:33Z matevz $
// Author: Richard Maunder 16/09/2005 // Author: Richard Maunder 16/09/2005
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2005, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2005, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 37 skipping to change at line 37
// approximate shape as set of planes. This plane set is used to perform// // approximate shape as set of planes. This plane set is used to perform//
// interactive clipping using OpenGL clip planes. // // interactive clipping using OpenGL clip planes. //
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
class TGLClip : public TGLPhysicalShape class TGLClip : public TGLPhysicalShape
{ {
public: public:
enum EMode { kOutside, // Clip away what's outside enum EMode { kOutside, // Clip away what's outside
kInside // Clip away what's inside kInside // Clip away what's inside
}; };
private:
protected:
EMode fMode; EMode fMode;
UInt_t fTimeStamp; UInt_t fTimeStamp;
Bool_t fValid;
public: public:
TGLClip(const TGLLogicalShape & logical, const TGLMatrix & transform, co nst float color[4]); TGLClip(const TGLLogicalShape & logical, const TGLMatrix & transform, co nst float color[4]);
virtual ~TGLClip(); virtual ~TGLClip();
virtual void Modified() { TGLPhysicalShape::Modified(); IncTimeStamp(); } virtual void Modified() { TGLPhysicalShape::Modified(); IncTimeStamp(); }
virtual void Setup(const TGLBoundingBox & bbox) = 0; virtual void Setup(const TGLBoundingBox & bbox) = 0;
EMode GetMode() const { return fMode; } EMode GetMode() const { return fMode; }
void SetMode(EMode mode) { if (mode != fMode) { fMode = mode; ++fTimeS tamp; } } void SetMode(EMode mode) { if (mode != fMode) { fMode = mode; ++fTimeS tamp; } }
UInt_t TimeStamp() const { return fTimeStamp; } UInt_t TimeStamp() const { return fTimeStamp; }
void IncTimeStamp() { ++fTimeStamp; } void IncTimeStamp() { ++fTimeStamp; }
Bool_t IsValid() const { return fValid; }
void Invalidate() { fValid = kFALSE; }
virtual void Draw(TGLRnrCtx & rnrCtx) const; virtual void Draw(TGLRnrCtx & rnrCtx) const;
virtual void PlaneSet(TGLPlaneSet_t & set) const = 0; virtual void PlaneSet(TGLPlaneSet_t & set) const = 0;
ClassDef(TGLClip,0); // abstract clipping object ClassDef(TGLClip,0); // abstract clipping object
}; };
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// // // //
// TGLClipPlane // // TGLClipPlane //
// // // //
skipping to change at line 133 skipping to change at line 139
{ {
protected: protected:
TGLClipPlane *fClipPlane; TGLClipPlane *fClipPlane;
TGLClipBox *fClipBox; TGLClipBox *fClipBox;
TGLClip *fCurrentClip; //! the current clipping shape TGLClip *fCurrentClip; //! the current clipping shape
Bool_t fShowClip; Bool_t fShowClip;
Bool_t fShowManip; Bool_t fShowManip;
TGLManipSet *fManip; TGLManipSet *fManip;
TGLBoundingBox fLastBBox;
public: public:
TGLClipSet(); TGLClipSet();
virtual ~TGLClipSet(); virtual ~TGLClipSet();
virtual Bool_t MouseEnter(TGLOvlSelectRecord& selRec); virtual Bool_t MouseEnter(TGLOvlSelectRecord& selRec);
virtual Bool_t MouseStillInside(TGLOvlSelectRecord& selRec); virtual Bool_t MouseStillInside(TGLOvlSelectRecord& selRec);
virtual Bool_t Handle(TGLRnrCtx& rnrCtx, TGLOvlSelectRecord& selRec, virtual Bool_t Handle(TGLRnrCtx& rnrCtx, TGLOvlSelectRecord& selRec,
Event_t* event); Event_t* event);
virtual void MouseLeave(); virtual void MouseLeave();
virtual void Render(TGLRnrCtx& rnrCtx); virtual void Render(TGLRnrCtx& rnrCtx);
Bool_t IsClipping() const { return fCurrentClip != 0; } Bool_t IsClipping() const { return fCurrentClip != 0; }
TGLClip* GetCurrentClip() const { return fCurrentClip; } TGLClip* GetCurrentClip() const { return fCurrentClip; }
void FillPlaneSet(TGLPlaneSet_t& set) const; void FillPlaneSet(TGLPlaneSet_t& set) const;
// Clipping // Clipping
void SetupClips(const TGLBoundingBox& sceneBBox); void SetupClips(const TGLBoundingBox& sceneBBox);
void SetupCurrentClip(const TGLBoundingBox& sceneBBox);
void SetupCurrentClipIfInvalid(const TGLBoundingBox& sceneBBox);
void InvalidateClips();
void InvalidateCurrentClip();
void GetClipState(EClipType type, Double_t data[6]) const; void GetClipState(EClipType type, Double_t data[6]) const;
void SetClipState(EClipType type, const Double_t data[6]); void SetClipState(EClipType type, const Double_t data[6]);
EClipType GetClipType() const; EClipType GetClipType() const;
void SetClipType(EClipType type); void SetClipType(EClipType type);
// Editor only supports combined flag so far. // Editor only supports combined flag so far.
Bool_t GetShowManip() const { return fShowManip; } Bool_t GetShowManip() const { return fShowManip; }
void SetShowManip(Bool_t show) { fShowManip = show; } void SetShowManip(Bool_t show) { fShowManip = show; }
 End of changes. 6 change blocks. 
2 lines changed or deleted 15 lines changed or added


 TGLContextPrivate.h   TGLContextPrivate.h 
// @(#)root/gl:$Id: TGLContextPrivate.h 24162 2008-06-06 11:33:13Z matevz $ // @(#)root/gl:$Id: TGLContextPrivate.h 29056 2009-06-17 14:36:59Z matevz $
#ifndef ROOT_TGLContextPrivate #ifndef ROOT_TGLContextPrivate
#define ROOT_TGLContextPrivate #define ROOT_TGLContextPrivate
#include <map> #include <map>
#ifndef ROOT_TGLIncludes
#include "TGLIncludes.h" #include "TGLIncludes.h"
#endif #include "TGLWSIncludes.h"
#ifndef ROOT_TGLContext
#include "TGLContext.h" #include "TGLContext.h"
#endif
#ifdef WIN32 #ifdef WIN32
class TGLContextPrivate { class TGLContextPrivate {
public: public:
HWND fHWND; HWND fHWND;
HDC fHDC; HDC fHDC;
HGLRC fGLContext; HGLRC fGLContext;
TGLContextPrivate() TGLContextPrivate()
 End of changes. 4 change blocks. 
5 lines changed or deleted 2 lines changed or added


 TGLFontManager.h   TGLFontManager.h 
// @(#)root/gl:$Id: TGLFontManager.h 27564 2009-02-21 12:37:20Z matevz $ // @(#)root/gl:$Id: TGLFontManager.h 28464 2009-05-06 12:37:21Z brun $
// Author: Olivier Couet 12/04/2007 // Author: Alja Mrak-Tadel 2008
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
#ifndef ROOT_TGLFontManager #ifndef ROOT_TGLFontManager
skipping to change at line 85 skipping to change at line 85
Float_t GetDescent() const; Float_t GetDescent() const;
Float_t GetLineHeight() const; Float_t GetLineHeight() const;
void MeasureBaseLineParams(Float_t& ascent, Float_t& descent, Float_t & line_height, void MeasureBaseLineParams(Float_t& ascent, Float_t& descent, Float_t & line_height,
const char* txt="Xj") const; const char* txt="Xj") const;
void BBox(const char* txt, void BBox(const char* txt,
Float_t& llx, Float_t& lly, Float_t& llz, Float_t& llx, Float_t& lly, Float_t& llz,
Float_t& urx, Float_t& ury, Float_t& urz) const; Float_t& urx, Float_t& ury, Float_t& urz) const;
void Render(const char* txt) const; void Render(const char* txt) const;
void Render(const char* txt, Double_t x, Double_t y, Double_t angle, Do uble_t mgn) const;
void RenderBitmap(const char* txt, Float_t x, Float_t y, Float_t zs, ET extAlign_e align) const; void RenderBitmap(const char* txt, Float_t x, Float_t y, Float_t zs, ET extAlign_e align) const;
// helper gl draw functions // helper gl draw functions
virtual void PreRender(Bool_t autoLight=kTRUE, Bool_t lightOn=kFALSE) co nst; virtual void PreRender(Bool_t autoLight=kTRUE, Bool_t lightOn=kFALSE) co nst;
virtual void PostRender() const; virtual void PostRender() const;
Bool_t operator< (const TGLFont& o) const Bool_t operator< (const TGLFont& o) const
{ {
if (fSize == o.fSize) if (fSize == o.fSize)
{ {
skipping to change at line 146 skipping to change at line 147
TGLFontManager() : fFontMap(), fFontTrash() {} TGLFontManager() : fFontMap(), fFontTrash() {}
virtual ~TGLFontManager(); virtual ~TGLFontManager();
void RegisterFont(Int_t size, Int_t file, TGLFont::EMode mode, TGLFont & out); void RegisterFont(Int_t size, Int_t file, TGLFont::EMode mode, TGLFont & out);
void RegisterFont(Int_t size, const char* name, TGLFont::EMode mode, T GLFont& out); void RegisterFont(Int_t size, const char* name, TGLFont::EMode mode, T GLFont& out);
void ReleaseFont(TGLFont& font); void ReleaseFont(TGLFont& font);
static TObjArray* GetFontFileArray(); static TObjArray* GetFontFileArray();
static FontSizeVec_t* GetFontSizeArray(); static FontSizeVec_t* GetFontSizeArray();
static Int_t GetFontSize(Float_t ds, Int_t min = -1, Int_t m static Int_t GetFontSize(Float_t ds);
ax = -1); static Int_t GetFontSize(Float_t ds, Int_t min, Int_t max);
static const char* GetFontNameFromId(Int_t); static const char* GetFontNameFromId(Int_t);
void ClearFontTrash(); void ClearFontTrash();
ClassDef(TGLFontManager, 0); // A FreeType GL font manager. ClassDef(TGLFontManager, 0); // A FreeType GL font manager.
}; };
#endif #endif
 End of changes. 3 change blocks. 
4 lines changed or deleted 5 lines changed or added


 TGLHistPainter.h   TGLHistPainter.h 
skipping to change at line 15 skipping to change at line 15
#ifndef ROOT_TVirtualHistPainter #ifndef ROOT_TVirtualHistPainter
#include "TVirtualHistPainter.h" #include "TVirtualHistPainter.h"
#endif #endif
#ifndef ROOT_TGLPlotPainter #ifndef ROOT_TGLPlotPainter
#include "TGLPlotPainter.h" #include "TGLPlotPainter.h"
#endif #endif
#ifndef ROOT_TGLPlotCamera #ifndef ROOT_TGLPlotCamera
#include "TGLPlotCamera.h" #include "TGLPlotCamera.h"
#endif #endif
#ifndef ROOT_TGLAdapter
#include "TGLAdapter.h"
#endif
/* /*
TGLHistPainter is a proxy class. It inherits TVirtualHistPainter and TGLHistPainter is a proxy class. It inherits TVirtualHistPainter and
overrides its virtual functions, but all actual work is done by : overrides its virtual functions, but all actual work is done by :
THistPainter - I name it "default" painter, it's the member of type THistPainter - I name it "default" painter, it's the member of type
TVirtualHistPainter * and loaded via plugin-manager; TVirtualHistPainter * and loaded via plugin-manager;
TGLLegoPainter - it draws different legos (lego/lego1/lego2/lego3); TGLLegoPainter - it draws different legos (lego/lego1/lego2/lego3);
TGLSurfacePainter - supports surfaces (surf/surf1/surf2/surf3/surf4/s urf5); TGLSurfacePainter - supports surfaces (surf/surf1/surf2/surf3/surf4/s urf5);
TGLBoxPainter - box option for TH3; TGLBoxPainter - box option for TH3;
TGLTF3Painter - TF3. TGLTF3Painter - TF3.
*/ */
class TGLParametricEquation; class TGLParametricEquation;
class TGL5DDataSet;
class TString; class TString;
class TList; class TList;
class TF3; class TF3;
class TH1; class TH1;
class TGLHistPainter : public TVirtualHistPainter { class TGLHistPainter : public TVirtualHistPainter {
private: private:
//Dynamic type is THistPainter, no problems with simultaneous inheritanc e and membership //Dynamic type is THistPainter, no problems with simultaneous inheritanc e and membership
//TGLHistPainter delegates unsupported options/calls to this object //TGLHistPainter delegates unsupported options/calls to this object
std::auto_ptr<TVirtualHistPainter> fDefaultPainter; std::auto_ptr<TVirtualHistPainter> fDefaultPainter;
skipping to change at line 52 skipping to change at line 50
std::auto_ptr<TGLPlotPainter> fGLPainter; std::auto_ptr<TGLPlotPainter> fGLPainter;
TGLParametricEquation *fEq; TGLParametricEquation *fEq;
TH1 *fHist; TH1 *fHist;
TF3 *fF3; TF3 *fF3;
TList *fStack; TList *fStack;
EGLPlotType fPlotType; EGLPlotType fPlotType;
TGLPlotCamera fCamera; TGLPlotCamera fCamera;
TGLPlotCoordinates fCoord; TGLPlotCoordinates fCoord;
TGLAdapter fGLDevice;
public: public:
TGLHistPainter(TH1 *hist); TGLHistPainter(TH1 *hist);
TGLHistPainter(TGLParametricEquation *equation); TGLHistPainter(TGLParametricEquation *equation);
TGLHistPainter(TGL5DDataSet *data);
//TVirtualHistPainter final overriders //TVirtualHistPainter final overriders
Int_t DistancetoPrimitive(Int_t px, Int_t py); Int_t DistancetoPrimitive(Int_t px, Int_t py);
void DrawPanel(); void DrawPanel();
void ExecuteEvent(Int_t event, Int_t px, Int_t py); void ExecuteEvent(Int_t event, Int_t px, Int_t py);
TList *GetContourList(Double_t contour)const; TList *GetContourList(Double_t contour)const;
char *GetObjectInfo(Int_t px, Int_t py)const; char *GetObjectInfo(Int_t px, Int_t py)const;
TList *GetStack()const; TList *GetStack()const;
Bool_t IsInside(Int_t x, Int_t y); Bool_t IsInside(Int_t x, Int_t y);
Bool_t IsInside(Double_t x, Double_t y); Bool_t IsInside(Double_t x, Double_t y);
void Paint(Option_t *option); void Paint(Option_t *option);
void PaintStat(Int_t dostat, TF1 *fit); void PaintStat(Int_t dostat, TF1 *fit);
void ProcessMessage(const char *message, const TObject *obj); void ProcessMessage(const char *message, const TObject *obj);
void SetHistogram(TH1 *hist); void SetHistogram(TH1 *hist);
void SetStack(TList *stack); void SetStack(TList *stack);
Int_t MakeCuts(char *cutsOpt); Int_t MakeCuts(char *cutsOpt);
void SetShowProjection(const char *option, Int_t nbins); void SetShowProjection(const char *option, Int_t nbins);
TGLPlotPainter *GetRealPainter(){return fGLPainter.get();}
private: private:
struct PlotOption_t; struct PlotOption_t;
PlotOption_t ParsePaintOption(const TString &option)const; PlotOption_t ParsePaintOption(const TString &option)const;
void CreatePainter(const PlotOption_t &parsed, void CreatePainter(const PlotOption_t &parsed,
const TString &option); const TString &option);
void PadToViewport(Bool_t selectionPass = kFALSE);
TGLHistPainter(const TGLHistPainter &); TGLHistPainter(const TGLHistPainter &);
TGLHistPainter &operator = (const TGLHistPainter &); TGLHistPainter &operator = (const TGLHistPainter &);
ClassDef(TGLHistPainter, 0) //Proxy class for GL hist painter ClassDef(TGLHistPainter, 0) //Proxy class for GL hist painters.
}; };
#endif #endif
 End of changes. 7 change blocks. 
6 lines changed or deleted 6 lines changed or added


 TGLIncludes.h   TGLIncludes.h 
// @(#)root/gl:$Id: TGLIncludes.h 20882 2007-11-19 11:31:26Z rdm $ // @(#)root/gl:$Id: TGLIncludes.h 29056 2009-06-17 14:36:59Z matevz $
// Author: Richard Maunder 25/05/2005
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
#ifndef ROOT_TGLIncludes #ifndef ROOT_TGLIncludes
#define ROOT_TGLIncludes #define ROOT_TGLIncludes
// GL includes - include this if you are calling OpenGL functions.
#ifdef WIN32 #ifdef WIN32
#ifndef ROOT_Windows4Root
#include "Windows4Root.h" #include "Windows4Root.h"
#endif #endif
#endif
#ifndef G__DICTIONARY
#include <GL/glew.h>
#else
#include <GL/gl.h> #include <GL/gl.h>
#include <GL/glu.h> #include <GL/glu.h>
#endif // ROOT_TGLIncludes #endif
#endif
 End of changes. 5 change blocks. 
5 lines changed or deleted 9 lines changed or added


 TGLLegoPainter.h   TGLLegoPainter.h 
// @(#)root/gl:$Id: TGLLegoPainter.h 28201 2009-04-14 16:04:20Z matevz $ // @(#)root/gl:$Id: TGLLegoPainter.h 28464 2009-05-06 12:37:21Z brun $
// Author: Timur Pocheptsov 14/06/2006 // Author: Timur Pocheptsov 14/06/2006
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 66 skipping to change at line 66
mutable TGLQuadric fQuadric; mutable TGLQuadric fQuadric;
Bool_t fDrawErrors; Bool_t fDrawErrors;
mutable TGLLevelPalette fPalette; mutable TGLLevelPalette fPalette;
mutable std::vector<Double_t> fColorLevels; mutable std::vector<Double_t> fColorLevels;
TGLLegoPainter(const TGLLegoPainter &); TGLLegoPainter(const TGLLegoPainter &);
TGLLegoPainter &operator = (const TGLLegoPainter &); TGLLegoPainter &operator = (const TGLLegoPainter &);
public: public:
TGLLegoPainter(TH1 *hist, TGLPlotCamera *camera, TGLPlotCoordinates *coo rd, TGLPaintDevice *dev = 0); TGLLegoPainter(TH1 *hist, TGLPlotCamera *camera, TGLPlotCoordinates *coo rd);
//TGLPlotPainter's final-overriders //TGLPlotPainter's final-overriders
char *GetPlotInfo(Int_t px, Int_t py); char *GetPlotInfo(Int_t px, Int_t py);
Bool_t InitGeometry(); Bool_t InitGeometry();
void StartPan(Int_t px, Int_t py); void StartPan(Int_t px, Int_t py);
void Pan(Int_t px, Int_t py); void Pan(Int_t px, Int_t py);
void AddOption(const TString &stringOption); void AddOption(const TString &stringOption);
void ProcessEvent(Int_t event, Int_t px, Int_t py); void ProcessEvent(Int_t event, Int_t px, Int_t py);
private: private:
//Auxilary functions. //Auxilary functions.
Bool_t InitGeometryCartesian(); Bool_t InitGeometryCartesian();
Bool_t InitGeometryPolar(); Bool_t InitGeometryPolar();
Bool_t InitGeometryCylindrical(); Bool_t InitGeometryCylindrical();
Bool_t InitGeometrySpherical(); Bool_t InitGeometrySpherical();
//Overriders //Overriders
void InitGL()const; void InitGL()const;
void DeInitGL()const;
void DrawPlot()const; void DrawPlot()const;
void DrawLegoCartesian()const; void DrawLegoCartesian()const;
void DrawLegoPolar()const; void DrawLegoPolar()const;
void DrawLegoCylindrical()const; void DrawLegoCylindrical()const;
void DrawLegoSpherical()const; void DrawLegoSpherical()const;
void SetLegoColor()const; void SetLegoColor()const;
void DrawSectionXOZ()const; void DrawSectionXOZ()const;
 End of changes. 3 change blocks. 
2 lines changed or deleted 4 lines changed or added


 TGLOverlay.h   TGLOverlay.h 
// @(#)root/gl:$Id: TGLOverlay.h 21812 2008-01-22 20:52:31Z matevz $ // @(#)root/gl:$Id: TGLOverlay.h 28885 2009-06-10 15:51:12Z matevz $
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
#ifndef ROOT_TGLOverlay_H #ifndef ROOT_TGLOverlay_H
#define ROOT_TGLOverlay_H #define ROOT_TGLOverlay_H
#include <GuiTypes.h> #include <GuiTypes.h>
class TGLRnrCtx; class TGLRnrCtx;
class TGLOvlSelectRecord; class TGLOvlSelectRecord;
#include <list> #include <list>
class TGLOverlayElement class TGLOverlayElement
{ {
public:
enum ERole { kUser, kViewer, kAnnotation, kAll };
private: private:
TGLOverlayElement(const TGLOverlayElement&); // Not implement ed TGLOverlayElement(const TGLOverlayElement&); // Not implement ed
TGLOverlayElement& operator=(const TGLOverlayElement&); // Not implement ed TGLOverlayElement& operator=(const TGLOverlayElement&); // Not implement ed
protected:
ERole fRole;
public: public:
TGLOverlayElement() {} TGLOverlayElement(ERole r = kUser):fRole(r) {}
virtual ~TGLOverlayElement() {} virtual ~TGLOverlayElement() {}
virtual Bool_t MouseEnter(TGLOvlSelectRecord& selRec); virtual Bool_t MouseEnter(TGLOvlSelectRecord& selRec);
virtual Bool_t MouseStillInside(TGLOvlSelectRecord& selRec); virtual Bool_t MouseStillInside(TGLOvlSelectRecord& selRec);
virtual Bool_t Handle(TGLRnrCtx& rnrCtx, TGLOvlSelectRecord& selRec, virtual Bool_t Handle(TGLRnrCtx& rnrCtx, TGLOvlSelectRecord& selRec,
Event_t* event); Event_t* event);
virtual void MouseLeave(); virtual void MouseLeave();
virtual void Render(TGLRnrCtx& rnrCtx) = 0; virtual void Render(TGLRnrCtx& rnrCtx) = 0;
ERole GetRole() const { return fRole; }
void SetRole(ERole r) { fRole = r; }
ClassDef(TGLOverlayElement, 0) // Base class for GL overlay elements. ClassDef(TGLOverlayElement, 0) // Base class for GL overlay elements.
}; };
class TGLOverlayList class TGLOverlayList
{ {
private: private:
TGLOverlayList(const TGLOverlayList&); // Not implemented TGLOverlayList(const TGLOverlayList&); // Not implemented
TGLOverlayList& operator=(const TGLOverlayList&); // Not implemented TGLOverlayList& operator=(const TGLOverlayList&); // Not implemented
protected: protected:
 End of changes. 5 change blocks. 
2 lines changed or deleted 11 lines changed or added


 TGLParametric.h   TGLParametric.h 
// @(#)root/gl:$Id: TGLParametric.h 28201 2009-04-14 16:04:20Z matevz $ // @(#)root/gl:$Id: TGLParametric.h 28464 2009-05-06 12:37:21Z brun $
// Author: Timur Pocheptsov 26/01/2007 // Author: Timur Pocheptsov 26/01/2007
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 111 skipping to change at line 111
Int_t fMeshSize; Int_t fMeshSize;
TGL2DArray<Vertex_t> fMesh; TGL2DArray<Vertex_t> fMesh;
Bool_t fShowMesh; Bool_t fShowMesh;
Int_t fColorScheme; Int_t fColorScheme;
TGLParametricEquation *fEquation; TGLParametricEquation *fEquation;
public: public:
TGLParametricPlot(TGLParametricEquation *equation, TGLPlotCamera *camera , TGLPaintDevice *dev = 0); TGLParametricPlot(TGLParametricEquation *equation, TGLPlotCamera *camera );
Bool_t InitGeometry(); Bool_t InitGeometry();
void StartPan(Int_t px, Int_t py); void StartPan(Int_t px, Int_t py);
void Pan(Int_t px, Int_t py); void Pan(Int_t px, Int_t py);
char *GetPlotInfo(Int_t px, Int_t py); char *GetPlotInfo(Int_t px, Int_t py);
void AddOption(const TString &option); void AddOption(const TString &option);
void ProcessEvent(Int_t event, Int_t px, Int_t py); void ProcessEvent(Int_t event, Int_t px, Int_t py);
private: private:
void InitGL()const; void InitGL()const;
void DeInitGL()const;
void DrawPlot()const; void DrawPlot()const;
void InitColors(); void InitColors();
void DrawSectionXOZ()const; void DrawSectionXOZ()const;
void DrawSectionYOZ()const; void DrawSectionYOZ()const;
void DrawSectionXOY()const; void DrawSectionXOY()const;
void SetSurfaceColor()const; void SetSurfaceColor()const;
 End of changes. 3 change blocks. 
2 lines changed or deleted 4 lines changed or added


 TGLParametricEquationGL.h   TGLParametricEquationGL.h 
// @(#)root/gl:$Id: TGLParametricEquationGL.h 21252 2007-12-07 01:39:32Z ma tevz $ // @(#)root/gl:$Id: TGLParametricEquationGL.h 28378 2009-04-28 15:40:53Z ma tevz $
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
#ifndef ROOT_TGLParametricEquationGL #ifndef ROOT_TGLParametricEquationGL
#define ROOT_TGLParametricEquationGL #define ROOT_TGLParametricEquationGL
skipping to change at line 48 skipping to change at line 48
virtual Bool_t SetModel(TObject* obj, const Option_t* opt=0); virtual Bool_t SetModel(TObject* obj, const Option_t* opt=0);
virtual void SetBBox(); virtual void SetBBox();
virtual void DirectDraw(TGLRnrCtx & rnrCtx) const; virtual void DirectDraw(TGLRnrCtx & rnrCtx) const;
virtual Bool_t KeepDuringSmartRefresh() const { return kFALSE; } virtual Bool_t KeepDuringSmartRefresh() const { return kFALSE; }
// To support two-level selection // To support two-level selection
// virtual Bool_t SupportsSecondarySelect() const { return kTRUE; } // virtual Bool_t SupportsSecondarySelect() const { return kTRUE; }
// virtual void ProcessSelection(UInt_t* ptr, TGLViewer*, TGLScene*); // virtual void ProcessSelection(UInt_t* ptr, TGLViewer*, TGLScene*);
ClassDef(TGLParametricEquationGL, 0) // GL renderer for TGLParametricEqu ation ClassDef(TGLParametricEquationGL, 0); // GL renderer for TGLParametricEq uation
}; };
#endif #endif
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 TGLPlotCamera.h   TGLPlotCamera.h 
// @(#)root/eve:$Id: TGLPlotCamera.h 28201 2009-04-14 16:04:20Z matevz $ // @(#)root/eve:$Id: TGLPlotCamera.h 28464 2009-05-06 12:37:21Z brun $
// Author: Timur Pocheptsov // Author: Timur Pocheptsov
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 42 skipping to change at line 42
TGLVertex3 fCenter; TGLVertex3 fCenter;
TGLVector3 fTruck; TGLVector3 fTruck;
TArcBall fArcBall; TArcBall fArcBall;
TPoint fMousePos; TPoint fMousePos;
Bool_t fVpChanged; Bool_t fVpChanged;
public: public:
TGLPlotCamera(); TGLPlotCamera();
virtual ~TGLPlotCamera() {} virtual ~TGLPlotCamera() {}
void SetViewport(TGLPaintDevice *dev); void SetViewport(const TGLRect &vp);
void SetViewVolume(const TGLVertex3 *box); void SetViewVolume(const TGLVertex3 *box);
void StartRotation(Int_t px, Int_t py); void StartRotation(Int_t px, Int_t py);
void RotateCamera(Int_t px, Int_t py); void RotateCamera(Int_t px, Int_t py);
void StartPan(Int_t px, Int_t py); void StartPan(Int_t px, Int_t py);
void Pan(Int_t px, Int_t py); void Pan(Int_t px, Int_t py);
void ZoomIn(); void ZoomIn();
void ZoomOut(); void ZoomOut();
void SetCamera()const; void SetCamera()const;
void Apply(Double_t phi, Double_t theta)const; void Apply(Double_t phi, Double_t theta)const;
Bool_t ViewportChanged()const{return fVpChanged;} Bool_t ViewportChanged()const{return fVpChanged;}
 End of changes. 2 change blocks. 
2 lines changed or deleted 3 lines changed or added


 TGLPlotPainter.h   TGLPlotPainter.h 
// @(#)root/gl:$Id: TGLPlotPainter.h 28201 2009-04-14 16:04:20Z matevz $ // @(#)root/gl:$Id: TGLPlotPainter.h 28601 2009-05-13 13:52:31Z brun $
// Author: Timur Pocheptsov 14/06/2006 // Author: Timur Pocheptsov 14/06/2006
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 69 skipping to change at line 69
Double_t fFactor; Double_t fFactor;
TPoint fMousePos; TPoint fMousePos;
public: public:
TGLBoxCut(const TGLPlotBox *plotBox); TGLBoxCut(const TGLPlotBox *plotBox);
virtual ~TGLBoxCut(); virtual ~TGLBoxCut();
void TurnOnOff(); void TurnOnOff();
Bool_t IsActive()const{return fActive;} Bool_t IsActive()const{return fActive;}
void SetActive(Bool_t a);
void SetFactor(Double_t f){fFactor = f;} void SetFactor(Double_t f){fFactor = f;}
void DrawBox(Bool_t selectionPass, Int_t selected)const; void DrawBox(Bool_t selectionPass, Int_t selected)const;
void StartMovement(Int_t px, Int_t py); void StartMovement(Int_t px, Int_t py);
void MoveBox(Int_t px, Int_t py, Int_t axisID); void MoveBox(Int_t px, Int_t py, Int_t axisID);
Bool_t IsInCut(Double_t xMin, Double_t xMax, Double_t yMin, Double_t yMa x, Bool_t IsInCut(Double_t xMin, Double_t xMax, Double_t yMin, Double_t yMa x,
Double_t zMin, Double_t zMax)const; Double_t zMin, Double_t zMax)const;
template<class V> template<class V>
Bool_t IsInCut(const V * v) const Bool_t IsInCut(const V * v) const
{ {
//Check, if box defined by xmin/xmax etc. is in cut. //Check, if box defined by xmin/xmax etc. is in cut.
if (v[0] >= fXRange.first && v[0] < fXRange.second && if (v[0] >= fXRange.first && v[0] < fXRange.second &&
v[1] >= fYRange.first && v[1] < fYRange.second && v[1] >= fYRange.first && v[1] < fYRange.second &&
v[2] >= fZRange.first && v[2] < fZRange.second) v[2] >= fZRange.first && v[2] < fZRange.second)
return kTRUE; return kTRUE;
return kFALSE; return kFALSE;
} }
Rgl::Range_t GetXRange()const{return fXRange;}
Rgl::Range_t GetYRange()const{return fYRange;}
Rgl::Range_t GetZRange()const{return fZRange;}
private: private:
void AdjustBox(); void AdjustBox();
ClassDef(TGLBoxCut, 0)//Cuts away part of a plot. ClassDef(TGLBoxCut, 0)//Cuts away part of a plot.
}; };
/* /*
2D contour for TH3 slicing. 2D contour for TH3 slicing.
*/ */
skipping to change at line 161 skipping to change at line 168
ClassDef(TGLTH3Slice, 0) // TH3 slice ClassDef(TGLTH3Slice, 0) // TH3 slice
}; };
/* /*
TGLPlotPainter class defines interface to different plot painters. TGLPlotPainter class defines interface to different plot painters.
*/ */
class TGLPlotPainter : public TVirtualGLPainter { class TGLPlotPainter : public TVirtualGLPainter {
private: private:
// Int_t fGLContext; //Int_t fGLContext;
TGLPaintDevice *fGLDevice; //TGLPaintDevice *fGLDevice;
const TColor *fPadColor; const TColor *fPadColor;
protected: protected:
Double_t fPadPhi; Double_t fPadPhi;
Double_t fPadTheta; Double_t fPadTheta;
TH1 *fHist; TH1 *fHist;
TAxis *fXAxis; TAxis *fXAxis;
TAxis *fYAxis; TAxis *fYAxis;
TAxis *fZAxis; TAxis *fZAxis;
TGLPlotCoordinates *fCoord; TGLPlotCoordinates *fCoord;
TGLPlotCamera *fCamera; TGLPlotCamera *fCamera;
TGLSelectionBuffer fSelection; TGLSelectionBuffer fSelection;
Bool_t fUpdateSelection; Bool_t fUpdateSelection;
Bool_t fSelectionPass; Bool_t fSelectionPass;
Int_t fSelectedPart; Int_t fSelectedPart;
TPoint fMousePosition; TPoint fMousePosition;
mutable Double_t fXOZSectionPos; mutable Double_t fXOZSectionPos;
mutable Double_t fYOZSectionPos; mutable Double_t fYOZSectionPos;
mutable Double_t fXOYSectionPos; mutable Double_t fXOYSectionPos;
TGLPlotBox fBackBox; TGLPlotBox fBackBox;
TGLBoxCut fBoxCut; TGLBoxCut fBoxCut;
skipping to change at line 201 skipping to change at line 209
kTrueColorSelectionBase = 10 kTrueColorSelectionBase = 10
}; };
ESelectionBase fSelectionBase; ESelectionBase fSelectionBase;
mutable Bool_t fDrawPalette; mutable Bool_t fDrawPalette;
public: public:
/* TGLPlotPainter(TH1 *hist, TGLPlotCamera *camera, TGLPlotCoordinates *c oord, Int_t context, /* TGLPlotPainter(TH1 *hist, TGLPlotCamera *camera, TGLPlotCoordinates *c oord, Int_t context,
Bool_t xoySelectable, Bool_t xozSelectable, Bool_t yozSel ectable); Bool_t xoySelectable, Bool_t xozSelectable, Bool_t yozSel ectable);
TGLPlotPainter(TGLPlotCamera *camera, Int_t context);*/ TGLPlotPainter(TGLPlotCamera *camera, Int_t context);*/
TGLPlotPainter(TH1 *hist, TGLPlotCamera *camera, TGLPlotCoordinates *coo rd, TGLPaintDevice *dev, TGLPlotPainter(TH1 *hist, TGLPlotCamera *camera, TGLPlotCoordinates *coo rd,
Bool_t xoySelectable, Bool_t xozSelectable, Bool_t yozSel ectable); Bool_t xoySelectable, Bool_t xozSelectable, Bool_t yozSel ectable);
TGLPlotPainter(TGLPlotCamera *camera, TGLPaintDevice *dev); TGLPlotPainter(TGLPlotCamera *camera);
const TGLPlotBox& RefBackBox() const { return fBackBox; } const TGLPlotBox& RefBackBox() const { return fBackBox; }
virtual void InitGL()const = 0; virtual void InitGL()const = 0;
virtual void DeInitGL()const = 0;
virtual void DrawPlot()const = 0; virtual void DrawPlot()const = 0;
virtual void Paint(); virtual void Paint();
//Checks, if mouse cursor is above plot. //Checks, if mouse cursor is above plot.
virtual Bool_t PlotSelected(Int_t px, Int_t py); virtual Bool_t PlotSelected(Int_t px, Int_t py);
//Init geometry does plot's specific initialization. //Init geometry does plot's specific initialization.
virtual Bool_t InitGeometry() = 0; virtual Bool_t InitGeometry() = 0;
virtual void StartPan(Int_t px, Int_t py) = 0; virtual void StartPan(Int_t px, Int_t py) = 0;
//Pan function is already declared in TVirtualGLPainter. //Pan function is already declared in TVirtualGLPainter.
//Add string option, it can be a digit in "lego" or "surf". //Add string option, it can be a digit in "lego" or "surf".
virtual void AddOption(const TString &stringOption) = 0; virtual void AddOption(const TString &stringOption) = 0;
//Function to process additional events (key presses, mouse clicks.) //Function to process additional events (key presses, mouse clicks.)
virtual void ProcessEvent(Int_t event, Int_t px, Int_t py) = 0; virtual void ProcessEvent(Int_t event, Int_t px, Int_t py) = 0;
//Used by GLpad //Used by GLpad
// void SetGLContext(Int_t context);
void SetGLDevice(TGLPaintDevice *dev){fGLDevice = dev;}
void SetPadColor(const TColor *color); void SetPadColor(const TColor *color);
virtual void SetFrameColor(const TColor *frameColor); virtual void SetFrameColor(const TColor *frameColor);
//Camera is external to painter, if zoom was changed, or camera //Camera is external to painter, if zoom was changed, or camera
//was rotated, selection must be invalidated. //was rotated, selection must be invalidated.
void InvalidateSelection(); void InvalidateSelection();
enum ECutAxisID { enum ECutAxisID {
kXAxis = 7, kXAxis = 7,
kYAxis = 8, kYAxis = 8,
kZAxis = 9 kZAxis = 9
}; };
Bool_t CutAxisSelected()const{return !fHighColor && fSelectedP art <= kZAxis && fSelectedPart >= kXAxis;} Bool_t CutAxisSelected()const{return !fHighColor && fSelectedP art <= kZAxis && fSelectedPart >= kXAxis;}
protected: protected:
// Int_t GetGLContext()const;
const TColor *GetPadColor()const; const TColor *GetPadColor()const;
Bool_t MakeGLContextCurrent()const;
// //
void MoveSection(Int_t px, Int_t py); void MoveSection(Int_t px, Int_t py);
void DrawSections()const; void DrawSections()const;
virtual void DrawSectionXOZ()const = 0; virtual void DrawSectionXOZ()const = 0;
virtual void DrawSectionYOZ()const = 0; virtual void DrawSectionYOZ()const = 0;
virtual void DrawSectionXOY()const = 0; virtual void DrawSectionXOY()const = 0;
virtual void DrawPaletteAxis()const; virtual void DrawPaletteAxis()const;
virtual void ClearBuffers()const; virtual void ClearBuffers()const;
void PrintPlot()const; void PrintPlot()const;
//Attention! After one of this methods was called,
//the GL_MATRIX_MODE could become different from what
//you had before the call: for example, SaveModelviewMatrix will
//change it to GL_MODELVIEW.
void SaveModelviewMatrix()const;
void SaveProjectionMatrix()const;
void RestoreModelviewMatrix()const;
void RestoreProjectionMatrix()const;
// //
ClassDef(TGLPlotPainter, 0) //Base for gl plots ClassDef(TGLPlotPainter, 0) //Base for gl plots
}; };
/* /*
Auxiliary class, which holds different Auxiliary class, which holds different
information about plot's current coordinate system information about plot's current coordinate system
*/ */
 End of changes. 13 change blocks. 
9 lines changed or deleted 25 lines changed or added


 TGLRnrCtx.h   TGLRnrCtx.h 
// @(#)root/gl:$Id: TGLRnrCtx.h 28197 2009-04-14 13:59:27Z matevz $ // @(#)root/gl:$Id: TGLRnrCtx.h 28378 2009-04-28 15:40:53Z matevz $
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
#ifndef ROOT_TGLRnrCtx #ifndef ROOT_TGLRnrCtx
#define ROOT_TGLRnrCtx #define ROOT_TGLRnrCtx
skipping to change at line 32 skipping to change at line 32
class TGLFont; class TGLFont;
class TGLContextIdentity; class TGLContextIdentity;
class TGLClip; class TGLClip;
class TGLSelectBuffer; class TGLSelectBuffer;
class TGLRect; class TGLRect;
class GLUquadric; class GLUquadric;
namespace std
{
template<typename _Tp> class allocator;
template<typename _Tp, typename _Alc> class list;
}
/************************************************************************** / /************************************************************************** /
// TGLRnrCtx // TGLRnrCtx
/************************************************************************** / /************************************************************************** /
class TGLRnrCtx class TGLRnrCtx
{ {
public: public:
enum EStyle enum EStyle
{ {
kStyleUndef = -1, kStyleUndef = -1,
skipping to change at line 80 skipping to change at line 86
kSSLImpliedSelected, kSSLImpliedSelected,
kSSLHighlighted, kSSLHighlighted,
kSSLImpliedHighlighted, kSSLImpliedHighlighted,
kSSLEnd kSSLEnd
}; };
private: private:
TGLRnrCtx(const TGLRnrCtx&); // Not implemented TGLRnrCtx(const TGLRnrCtx&); // Not implemented
TGLRnrCtx& operator=(const TGLRnrCtx&); // Not implemented TGLRnrCtx& operator=(const TGLRnrCtx&); // Not implemented
typedef std::list<TGLColorSet*, std::allocator<TGLColorSet*> > lpTGLColo
rSet_t;
protected: protected:
TGLViewerBase *fViewer; TGLViewerBase *fViewer;
TGLCamera *fCamera; TGLCamera *fCamera;
TGLSceneInfo *fSceneInfo; TGLSceneInfo *fSceneInfo;
Short_t fViewerLOD; Short_t fViewerLOD;
Short_t fSceneLOD; Short_t fSceneLOD;
Short_t fCombiLOD; // Combined viewer/scene lod Short_t fCombiLOD; // Combined viewer/scene lod
Short_t fShapeLOD; Short_t fShapeLOD;
skipping to change at line 113 skipping to change at line 121
// Highlight / Selection stuff // Highlight / Selection stuff
Bool_t fHighlight; // True when in highlight. Bool_t fHighlight; // True when in highlight.
Bool_t fHighlightOutline; // True when in highlight-outline. Bool_t fHighlightOutline; // True when in highlight-outline.
Bool_t fSelection; Bool_t fSelection;
Bool_t fSecSelection; Bool_t fSecSelection;
Int_t fPickRadius; Int_t fPickRadius;
TGLRect *fPickRectangle; TGLRect *fPickRectangle;
TGLSelectBuffer*fSelectBuffer; TGLSelectBuffer*fSelectBuffer;
void *fColorSetStack; lpTGLColorSet_t*fColorSetStack;
UInt_t fEventKeySym; UInt_t fEventKeySym;
// GL state // GL state
Bool_t fDLCaptureOpen; //! DL-capture currently open Bool_t fDLCaptureOpen; //! DL-capture currently open
TGLContextIdentity *fGLCtxIdentity; //! Current GL context identity TGLContextIdentity *fGLCtxIdentity; //! Current GL context identity
GLUquadric *fQuadric; GLUquadric *fQuadric;
// Picture grabbing // Picture grabbing
skipping to change at line 208 skipping to change at line 216
// Composed operations // Composed operations
void BeginSelection(Int_t x, Int_t y, Int_t r=3); void BeginSelection(Int_t x, Int_t y, Int_t r=3);
void EndSelection (Int_t glResult); void EndSelection (Int_t glResult);
void PushColorSet(); void PushColorSet();
TGLColorSet& ColorSet(); TGLColorSet& ColorSet();
void PopColorSet(); void PopColorSet();
TGLColorSet* ChangeBaseColorSet(TGLColorSet* set); TGLColorSet* ChangeBaseColorSet(TGLColorSet* set);
TGLColorSet* GetBaseColorSet(); TGLColorSet* GetBaseColorSet();
void ColorOrForeground(Color_t col);
UInt_t GetEventKeySym() const { return fEventKeySym; } UInt_t GetEventKeySym() const { return fEventKeySym; }
void SetEventKeySym(UInt_t k) { fEventKeySym = k; } void SetEventKeySym(UInt_t k) { fEventKeySym = k; }
Bool_t IsDLCaptureOpen() const { return fDLCaptureOpen; } Bool_t IsDLCaptureOpen() const { return fDLCaptureOpen; }
void OpenDLCapture(); void OpenDLCapture();
void CloseDLCapture(); void CloseDLCapture();
TGLContextIdentity* GetGLCtxIdentity() const { return fGLCtxIdentity; } TGLContextIdentity* GetGLCtxIdentity() const { return fGLCtxIdentity; }
void SetGLCtxIdentity(TGLContextIdentity* cid) { fGLCtxIdentity = cid; } void SetGLCtxIdentity(TGLContextIdentity* cid) { fGLCtxIdentity = cid; }
 End of changes. 5 change blocks. 
2 lines changed or deleted 13 lines changed or added


 TGLSurfacePainter.h   TGLSurfacePainter.h 
skipping to change at line 57 skipping to change at line 57
mutable std::list<Projection_t> fXOYProj; mutable std::list<Projection_t> fXOYProj;
mutable TGLLevelPalette fPalette; mutable TGLLevelPalette fPalette;
mutable std::vector<Double_t> fColorLevels; mutable std::vector<Double_t> fColorLevels;
Rgl::Range_t fMinMaxVal; Rgl::Range_t fMinMaxVal;
Bool_t fSectionPass; Bool_t fSectionPass;
mutable Bool_t fUpdateTexMap; mutable Bool_t fUpdateTexMap;
public: public:
TGLSurfacePainter(TH1 *hist, TGLPlotCamera *camera, TGLPlotCoordinates * TGLSurfacePainter(TH1 *hist, TGLPlotCamera *camera, TGLPlotCoordinates *
coord, coord);
TGLPaintDevice *dev = 0);
//TGLPlotPainter's final-overriders. //TGLPlotPainter's final-overriders.
char *GetPlotInfo(Int_t px, Int_t py); char *GetPlotInfo(Int_t px, Int_t py);
Bool_t InitGeometry(); Bool_t InitGeometry();
void StartPan(Int_t px, Int_t py); void StartPan(Int_t px, Int_t py);
void Pan(Int_t px, Int_t py); void Pan(Int_t px, Int_t py);
void AddOption(const TString &stringOption); void AddOption(const TString &stringOption);
void ProcessEvent(Int_t event, Int_t px, Int_t py); void ProcessEvent(Int_t event, Int_t px, Int_t py);
private: private:
void InitGL()const; void InitGL()const;
void DeInitGL()const;
void DrawPlot()const; void DrawPlot()const;
void SetNormals(); void SetNormals();
void SetSurfaceColor()const; void SetSurfaceColor()const;
Bool_t InitGeometryCartesian(); Bool_t InitGeometryCartesian();
Bool_t InitGeometryPolar(); Bool_t InitGeometryPolar();
Bool_t InitGeometryCylindrical(); Bool_t InitGeometryCylindrical();
Bool_t InitGeometrySpherical(); Bool_t InitGeometrySpherical();
 End of changes. 2 change blocks. 
3 lines changed or deleted 4 lines changed or added


 TGLTF3Painter.h   TGLTF3Painter.h 
skipping to change at line 43 skipping to change at line 43
ETF3Style fStyle; ETF3Style fStyle;
Rgl::Mc::TIsoMesh<Double_t> fMesh; Rgl::Mc::TIsoMesh<Double_t> fMesh;
TF3 *fF3; TF3 *fF3;
TGLTH3Slice fXOZSlice; TGLTH3Slice fXOZSlice;
TGLTH3Slice fYOZSlice; TGLTH3Slice fYOZSlice;
TGLTH3Slice fXOYSlice; TGLTH3Slice fXOYSlice;
public: public:
TGLTF3Painter(TF3 *fun, TH1 *hist, TGLPlotCamera *camera, TGLPlotCoordin TGLTF3Painter(TF3 *fun, TH1 *hist, TGLPlotCamera *camera, TGLPlotCoordin
ates *coord, ates *coord);
TGLPaintDevice *dev = 0);
char *GetPlotInfo(Int_t px, Int_t py); char *GetPlotInfo(Int_t px, Int_t py);
Bool_t InitGeometry(); Bool_t InitGeometry();
void StartPan(Int_t px, Int_t py); void StartPan(Int_t px, Int_t py);
void Pan(Int_t px, Int_t py); void Pan(Int_t px, Int_t py);
void AddOption(const TString &stringOption); void AddOption(const TString &stringOption);
void ProcessEvent(Int_t event, Int_t px, Int_t py); void ProcessEvent(Int_t event, Int_t px, Int_t py);
private: private:
void InitGL()const; void InitGL()const;
void DeInitGL()const;
void DrawPlot()const; void DrawPlot()const;
// //
void DrawToSelectionBuffer()const; void DrawToSelectionBuffer()const;
void DrawDefaultPlot()const; void DrawDefaultPlot()const;
void DrawMaplePlot()const; void DrawMaplePlot()const;
// //
void SetSurfaceColor()const; void SetSurfaceColor()const;
Bool_t HasSections()const; Bool_t HasSections()const;
skipping to change at line 107 skipping to change at line 108
Rgl::Range_t fMinMax; Rgl::Range_t fMinMax;
//Palette. One color per iso-surface. //Palette. One color per iso-surface.
TGLLevelPalette fPalette; TGLLevelPalette fPalette;
//Iso levels. Equidistant or user-defined. //Iso levels. Equidistant or user-defined.
std::vector<Double_t> fColorLevels; std::vector<Double_t> fColorLevels;
//Now meshes are initialized only once. //Now meshes are initialized only once.
//To be changed in future. //To be changed in future.
Bool_t fInit; Bool_t fInit;
public: public:
TGLIsoPainter(TH1 *hist, TGLPlotCamera *camera, TGLPlotCoordinates *coor TGLIsoPainter(TH1 *hist, TGLPlotCamera *camera, TGLPlotCoordinates *coor
d, d);
TGLPaintDevice *dev = 0);
//TGLPlotPainter final-overriders. //TGLPlotPainter final-overriders.
char *GetPlotInfo(Int_t px, Int_t py); char *GetPlotInfo(Int_t px, Int_t py);
Bool_t InitGeometry(); Bool_t InitGeometry();
void StartPan(Int_t px, Int_t py); void StartPan(Int_t px, Int_t py);
void Pan(Int_t px, Int_t py); void Pan(Int_t px, Int_t py);
void AddOption(const TString &option); void AddOption(const TString &option);
void ProcessEvent(Int_t event, Int_t px, Int_t py); void ProcessEvent(Int_t event, Int_t px, Int_t py);
private: private:
//TGLPlotPainter final-overriders. //TGLPlotPainter final-overriders.
void InitGL()const; void InitGL()const;
void DeInitGL()const;
void DrawPlot()const; void DrawPlot()const;
void DrawSectionXOZ()const; void DrawSectionXOZ()const;
void DrawSectionYOZ()const; void DrawSectionYOZ()const;
void DrawSectionXOY()const; void DrawSectionXOY()const;
//Auxiliary methods. //Auxiliary methods.
Bool_t HasSections()const; Bool_t HasSections()const;
void SetSurfaceColor(Int_t ind)const; void SetSurfaceColor(Int_t ind)const;
void SetMesh(Mesh_t &mesh, Double_t isoValue); void SetMesh(Mesh_t &mesh, Double_t isoValue);
void DrawMesh(const Mesh_t &mesh, Int_t level)const; void DrawMesh(const Mesh_t &mesh, Int_t level)const;
void FindMinMax(); void FindMinMax();
 End of changes. 4 change blocks. 
6 lines changed or deleted 9 lines changed or added


 TGLUtil.h   TGLUtil.h 
// @(#)root/gl:$Id: TGLUtil.h 28210 2009-04-15 08:03:19Z matevz $ // @(#)root/gl:$Id: TGLUtil.h 28845 2009-06-08 13:53:44Z rdm $
// Author: Richard Maunder 25/05/2005 // Author: Richard Maunder 25/05/2005
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 76 skipping to change at line 76
}; };
enum EGLPlotType { enum EGLPlotType {
kGLLegoPlot, kGLLegoPlot,
kGLSurfacePlot, kGLSurfacePlot,
kGLBoxPlot, kGLBoxPlot,
kGLTF3Plot, kGLTF3Plot,
kGLStackPlot, kGLStackPlot,
kGLParametricPlot, kGLParametricPlot,
kGLIsoPlot, kGLIsoPlot,
kGL5D,
kGLDefaultPlot kGLDefaultPlot
}; };
// TODO: Split these into own h/cxx files - too long now! // TODO: Split these into own h/cxx files - too long now!
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// // // //
// TGLVertex3 // // TGLVertex3 //
// // // //
// 3 component (x/y/z) vertex class // // 3 component (x/y/z) vertex class //
skipping to change at line 143 skipping to change at line 144
Double_t Y() const { return fVals[1]; } Double_t Y() const { return fVals[1]; }
Double_t & Y() { return fVals[1]; } Double_t & Y() { return fVals[1]; }
Double_t Z() const { return fVals[2]; } Double_t Z() const { return fVals[2]; }
Double_t & Z() { return fVals[2]; } Double_t & Z() { return fVals[2]; }
const Double_t * CArr() const { return fVals; } const Double_t * CArr() const { return fVals; }
Double_t * Arr() { return fVals; } Double_t * Arr() { return fVals; }
void Dump() const; void Dump() const;
ClassDef(TGLVertex3,0) // GL 3 component vertex helper/wrapper class ClassDef(TGLVertex3,0); // GL 3 component vertex helper/wrapper class
}; };
//_________________________________________________________________________ _____ //_________________________________________________________________________ _____
inline TGLVertex3 operator*(Double_t f, const TGLVertex3& v) inline TGLVertex3 operator*(Double_t f, const TGLVertex3& v)
{ {
return TGLVertex3(f*v.X(), f*v.Y(), f*v.Z()); return TGLVertex3(f*v.X(), f*v.Y(), f*v.Z());
} }
//_________________________________________________________________________ _____ //_________________________________________________________________________ _____
inline void TGLVertex3::Negate() inline void TGLVertex3::Negate()
skipping to change at line 268 skipping to change at line 269
TGLVector3& operator = (const TGLVertex3& v) TGLVector3& operator = (const TGLVertex3& v)
{ fVals[0] = v[0]; fVals[1] = v[1]; fVals[2] = v[2]; return *this; } { fVals[0] = v[0]; fVals[1] = v[1]; fVals[2] = v[2]; return *this; }
TGLVector3 & operator /= (Double_t val); TGLVector3 & operator /= (Double_t val);
TGLVector3 operator - () const; TGLVector3 operator - () const;
Double_t Mag() const; Double_t Mag() const;
void Normalise(); void Normalise();
ClassDef(TGLVector3,0) // GL 3 component vector helper/wrapper class ClassDef(TGLVector3,0); // GL 3 component vector helper/wrapper class
}; };
// Inline for TGLVertex3 requiring full TGLVector definition // Inline for TGLVertex3 requiring full TGLVector definition
//_________________________________________________________________________ _____ //_________________________________________________________________________ _____
inline const TGLVertex3 & TGLVertex3::operator -= (const TGLVector3 & vec) inline const TGLVertex3 & TGLVertex3::operator -= (const TGLVector3 & vec)
{ {
fVals[0] -= vec[0]; fVals[1] -= vec[1]; fVals[2] -= vec[2]; fVals[0] -= vec[0]; fVals[1] -= vec[1]; fVals[2] -= vec[2];
return *this; return *this;
} }
skipping to change at line 305 skipping to change at line 306
//_________________________________________________________________________ _____ //_________________________________________________________________________ _____
inline TGLVector3 TGLVector3::operator - () const inline TGLVector3 TGLVector3::operator - () const
{ {
return TGLVector3(-fVals[0], -fVals[1], -fVals[2]); return TGLVector3(-fVals[0], -fVals[1], -fVals[2]);
} }
//_________________________________________________________________________ _____ //_________________________________________________________________________ _____
inline Double_t TGLVector3::Mag() const inline Double_t TGLVector3::Mag() const
{ {
return sqrt(fVals[0]*fVals[0] + fVals[1]*fVals[1] + fVals[2]*fVals[2]); return std::sqrt(fVals[0]*fVals[0] + fVals[1]*fVals[1] + fVals[2]*fVals[ 2]);
} }
//_________________________________________________________________________ _____ //_________________________________________________________________________ _____
inline void TGLVector3::Normalise() inline void TGLVector3::Normalise()
{ {
Double_t mag = Mag(); Double_t mag = Mag();
if ( mag == 0.0 ) { if ( mag == 0.0 ) {
Error("TGLVector3::Normalise", "vector has zero magnitude"); Error("TGLVector3::Normalise", "vector has zero magnitude");
return; return;
} }
skipping to change at line 416 skipping to change at line 417
// Bitwise copy constructor and = operator are fine // Bitwise copy constructor and = operator are fine
// Accessors // Accessors
const TGLVertex3 & Start() const { return fVertex; } const TGLVertex3 & Start() const { return fVertex; }
const TGLVertex3 End() const { return fVertex + fVector; } const TGLVertex3 End() const { return fVertex + fVector; }
const TGLVector3 & Vector() const { return fVector; } const TGLVector3 & Vector() const { return fVector; }
// Debug // Debug
void Draw() const; void Draw() const;
ClassDef(TGLLine3,0) // GL line wrapper class ClassDef(TGLLine3,0); // GL line wrapper class
}; };
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// // // //
// TGLRect // // TGLRect //
// // // //
// Viewport (pixel base) 2D rectangle class // // Viewport (pixel base) 2D rectangle class //
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
class TGLRect class TGLRect
skipping to change at line 472 skipping to change at line 473
Int_t Right() const { return fX + fWidth; } Int_t Right() const { return fX + fWidth; }
Int_t Top() const { return fY; } Int_t Top() const { return fY; }
Int_t Bottom() const { return fY + fHeight; } Int_t Bottom() const { return fY + fHeight; }
Int_t Diagonal() const; Int_t Diagonal() const;
Int_t Longest() const; Int_t Longest() const;
Double_t Aspect() const; Double_t Aspect() const;
EOverlap Overlap(const TGLRect & other) const; EOverlap Overlap(const TGLRect & other) const;
ClassDef(TGLRect,0) // GL rect helper/wrapper class ClassDef(TGLRect,0); // GL rect helper/wrapper class
}; };
//_________________________________________________________________________ _____ //_________________________________________________________________________ _____
inline void TGLRect::Set(Int_t x, Int_t y, Int_t width, Int_t height) inline void TGLRect::Set(Int_t x, Int_t y, Int_t width, Int_t height)
{ {
fX = x; fX = x;
fY = y; fY = y;
fWidth = width; fWidth = width;
fHeight = height; fHeight = height;
} }
skipping to change at line 527 skipping to change at line 528
fY = y; fY = y;
fHeight += -delY; fHeight += -delY;
} }
} }
//_________________________________________________________________________ _____ //_________________________________________________________________________ _____
inline Int_t TGLRect::Diagonal() const inline Int_t TGLRect::Diagonal() const
{ {
const Double_t w = static_cast<Double_t>(fWidth); const Double_t w = static_cast<Double_t>(fWidth);
const Double_t h = static_cast<Double_t>(fHeight); const Double_t h = static_cast<Double_t>(fHeight);
return static_cast<Int_t>(sqrt(w*w + h*h)); return static_cast<Int_t>(std::sqrt(w*w + h*h));
} }
//_________________________________________________________________________ _____ //_________________________________________________________________________ _____
inline Int_t TGLRect::Longest() const inline Int_t TGLRect::Longest() const
{ {
return fWidth > fHeight ? fWidth:fHeight; return fWidth > fHeight ? fWidth:fHeight;
} }
//_________________________________________________________________________ _____ //_________________________________________________________________________ _____
inline Double_t TGLRect::Aspect() const inline Double_t TGLRect::Aspect() const
skipping to change at line 577 skipping to change at line 578
// Methods // Methods
void Normalise(); void Normalise();
public: public:
TGLPlane(); TGLPlane();
TGLPlane(const TGLPlane & other); TGLPlane(const TGLPlane & other);
TGLPlane(Double_t a, Double_t b, Double_t c, Double_t d); TGLPlane(Double_t a, Double_t b, Double_t c, Double_t d);
TGLPlane(Double_t eq[4]); TGLPlane(Double_t eq[4]);
TGLPlane(const TGLVector3 & norm, const TGLVertex3 & point); TGLPlane(const TGLVector3 & norm, const TGLVertex3 & point);
TGLPlane(const TGLVertex3 & p1, const TGLVertex3 & p2, const TGLVertex3 & p3); TGLPlane(const TGLVertex3 & p1, const TGLVertex3 & p2, const TGLVertex3 & p3);
virtual ~TGLPlane(); // ClassDef introduces virtual fns virtual ~TGLPlane();
// Manipulators // Manipulators
void Set(const TGLPlane & other); void Set(const TGLPlane & other);
void Set(Double_t a, Double_t b, Double_t c, Double_t d); void Set(Double_t a, Double_t b, Double_t c, Double_t d);
void Set(Double_t eq[4]); void Set(Double_t eq[4]);
void Set(const TGLVector3 & norm, const TGLVertex3 & point); void Set(const TGLVector3 & norm, const TGLVertex3 & point);
void Set(const TGLVertex3 & p1, const TGLVertex3 & p2, const TGLVertex3 & p3); void Set(const TGLVertex3 & p1, const TGLVertex3 & p2, const TGLVertex3 & p3);
void Negate(); void Negate();
// Accessors // Accessors
skipping to change at line 603 skipping to change at line 604
TGLVector3 Norm() const { return TGLVector3( fVals[0], fVals[1], fVals[2 ]); } TGLVector3 Norm() const { return TGLVector3( fVals[0], fVals[1], fVals[2 ]); }
Double_t DistanceTo(const TGLVertex3 & vertex) const; Double_t DistanceTo(const TGLVertex3 & vertex) const;
TGLVertex3 NearestOn(const TGLVertex3 & point) const; TGLVertex3 NearestOn(const TGLVertex3 & point) const;
// Internal data accessors - for GL API // Internal data accessors - for GL API
const Double_t * CArr() const { return fVals; } const Double_t * CArr() const { return fVals; }
Double_t * Arr() { return fVals; } Double_t * Arr() { return fVals; }
void Dump() const; void Dump() const;
ClassDef(TGLPlane,0) // GL plane helper/wrapper class ClassDef(TGLPlane,0); // GL plane helper/wrapper class
}; };
typedef std::vector<TGLPlane> TGLPlaneSet_t; typedef std::vector<TGLPlane> TGLPlaneSet_t;
typedef std::vector<TGLPlane>::iterator TGLPlaneSet_i; typedef std::vector<TGLPlane>::iterator TGLPlaneSet_i;
typedef std::vector<TGLPlane>::const_iterator TGLPlaneSet_ci; typedef std::vector<TGLPlane>::const_iterator TGLPlaneSet_ci;
//_________________________________________________________________________
_____
inline void TGLPlane::Set(const TGLPlane & other)
{
fVals[0] = other.fVals[0];
fVals[1] = other.fVals[1];
fVals[2] = other.fVals[2];
fVals[3] = other.fVals[3];
}
//_________________________________________________________________________
_____
inline void TGLPlane::Set(Double_t a, Double_t b, Double_t c, Double_t d)
{
fVals[0] = a;
fVals[1] = b;
fVals[2] = c;
fVals[3] = d;
Normalise();
}
//_________________________________________________________________________
_____
inline void TGLPlane::Set(Double_t eq[4])
{
fVals[0] = eq[0];
fVals[1] = eq[1];
fVals[2] = eq[2];
fVals[3] = eq[3];
Normalise();
}
//_________________________________________________________________________
_____
inline void TGLPlane::Set(const TGLVector3 & norm, const TGLVertex3 & point
)
{
// Set plane from a normal vector and in-plane point pair
fVals[0] = norm[0];
fVals[1] = norm[1];
fVals[2] = norm[2];
fVals[3] = -(fVals[0]*point[0] + fVals[1]*point[1] + fVals[2]*point[2]);
Normalise();
}
//_________________________________________________________________________
_____
inline void TGLPlane::Set(const TGLVertex3 & p1, const TGLVertex3 & p2, con
st TGLVertex3 & p3)
{
TGLVector3 norm = Cross(p2 - p1, p3 - p1);
Set(norm, p2);
}
//_________________________________________________________________________
_____
inline void TGLPlane::Negate()
{
fVals[0] = -fVals[0];
fVals[1] = -fVals[1];
fVals[2] = -fVals[2];
fVals[3] = -fVals[3];
}
//_________________________________________________________________________
_____
inline void TGLPlane::Normalise()
{
Double_t mag = sqrt( fVals[0]*fVals[0] + fVals[1]*fVals[1] + fVals[2]*fV
als[2] );
if ( mag == 0.0 ) {
Error("TGLPlane::Normalise", "trying to normalise plane with zero mag
nitude normal");
return;
}
fVals[0] /= mag;
fVals[1] /= mag;
fVals[2] /= mag;
fVals[3] /= mag;
}
//_________________________________________________________________________
_____
inline Double_t TGLPlane::DistanceTo(const TGLVertex3 & vertex) const
{
return (fVals[0]*vertex[0] + fVals[1]*vertex[1] + fVals[2]*vertex[2] + f
Vals[3]);
}
//_________________________________________________________________________
_____
inline TGLVertex3 TGLPlane::NearestOn(const TGLVertex3 & point) const
{
TGLVector3 o = Norm() * (Dot(Norm(), TGLVector3(point[0], point[1], poin
t[2])) + D() / Dot(Norm(), Norm()));
TGLVertex3 v = point - o;
return v;
}
// Some free functions for planes // Some free functions for planes
std::pair<Bool_t, TGLLine3> Intersection(const TGLPlane & p1, const TGLPl ane & p2); std::pair<Bool_t, TGLLine3> Intersection(const TGLPlane & p1, const TGLPl ane & p2);
std::pair<Bool_t, TGLVertex3> Intersection(const TGLPlane & p1, const TGLPl ane & p2, const TGLPlane & p3); std::pair<Bool_t, TGLVertex3> Intersection(const TGLPlane & p1, const TGLPl ane & p2, const TGLPlane & p3);
std::pair<Bool_t, TGLVertex3> Intersection(const TGLPlane & plane, const TG LLine3 & line, Bool_t extend); std::pair<Bool_t, TGLVertex3> Intersection(const TGLPlane & plane, const TG LLine3 & line, Bool_t extend);
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// // // //
// TGLMatrix // // TGLMatrix //
// // // //
// 16 component (4x4) transform matrix - column MAJOR as per GL. // // 16 component (4x4) transform matrix - column MAJOR as per GL. //
skipping to change at line 734 skipping to change at line 649
Bool_t ValidIndex(UInt_t index) const { return (index < 16); } Bool_t ValidIndex(UInt_t index) const { return (index < 16); }
public: public:
TGLMatrix(); TGLMatrix();
TGLMatrix(Double_t x, Double_t y, Double_t z); TGLMatrix(Double_t x, Double_t y, Double_t z);
TGLMatrix(const TGLVertex3 & translation); TGLMatrix(const TGLVertex3 & translation);
TGLMatrix(const TGLVertex3 & origin, const TGLVector3 & zAxis, const TGL Vector3 & xAxis); TGLMatrix(const TGLVertex3 & origin, const TGLVector3 & zAxis, const TGL Vector3 & xAxis);
TGLMatrix(const TGLVertex3 & origin, const TGLVector3 & zAxis); TGLMatrix(const TGLVertex3 & origin, const TGLVector3 & zAxis);
TGLMatrix(const Double_t vals[16]); TGLMatrix(const Double_t vals[16]);
TGLMatrix(const TGLMatrix & other); TGLMatrix(const TGLMatrix & other);
virtual ~TGLMatrix(); // ClassDef introduces virtual fns virtual ~TGLMatrix();
// Operators // Operators
TGLMatrix & operator =(const TGLMatrix & rhs); TGLMatrix & operator =(const TGLMatrix & rhs);
Double_t & operator [] (Int_t index); Double_t & operator [] (Int_t index);
Double_t operator [] (Int_t index) const; Double_t operator [] (Int_t index) const;
void MultRight(const TGLMatrix & rhs); void MultRight(const TGLMatrix & rhs);
void MultLeft (const TGLMatrix & lhs); void MultLeft (const TGLMatrix & lhs);
TGLMatrix & operator*=(const TGLMatrix & rhs) { MultRight(rhs); return * this; } TGLMatrix & operator*=(const TGLMatrix & rhs) { MultRight(rhs); return * this; }
skipping to change at line 788 skipping to change at line 703
TGLVector3 Rotate(const TGLVector3& v) const; TGLVector3 Rotate(const TGLVector3& v) const;
void MultiplyIP(TGLVector3& v, Double_t w=1) const; void MultiplyIP(TGLVector3& v, Double_t w=1) const;
void RotateIP(TGLVector3& v) const; void RotateIP(TGLVector3& v) const;
// Internal data accessors - for GL API // Internal data accessors - for GL API
const Double_t * CArr() const { return fVals; } const Double_t * CArr() const { return fVals; }
Double_t * Arr() { return fVals; } Double_t * Arr() { return fVals; }
void Dump() const; void Dump() const;
ClassDef(TGLMatrix,0) // GL matrix helper/wrapper class ClassDef(TGLMatrix,0); // GL matrix helper/wrapper class
}; };
//_________________________________________________________________________ _____ //_________________________________________________________________________ _____
inline TGLMatrix & TGLMatrix::operator =(const TGLMatrix & rhs) inline TGLMatrix & TGLMatrix::operator =(const TGLMatrix & rhs)
{ {
// Check for self-assignment // Check for self-assignment
if (this != &rhs) { if (this != &rhs) {
Set(rhs.fVals); Set(rhs.fVals);
} }
return *this; return *this;
skipping to change at line 897 skipping to change at line 812
{ {
const Double_t* C = fVals + 4*--b; const Double_t* C = fVals + 4*--b;
x[0] = C[0], x[1] = C[1], x[2] = C[2]; x[0] = C[0], x[1] = C[1], x[2] = C[2];
} }
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// //
// TGLColor // TGLColor
// //
// Encapsulate color in preferred GL format - UChar_t RGBA array. // Encapsulate color in preferred GL format - UChar_t RGBA array.
// Color index is also cached for easier interfacing with the
// traditional ROOT graphics.
// //
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
class TGLColor class TGLColor
{ {
protected: protected:
UChar_t fRGBA[4]; UChar_t fRGBA[4];
mutable Short_t fIndex;
public: public:
TGLColor(); TGLColor();
TGLColor(Int_t r, Int_t g, Int_t b, Int_t a=255); TGLColor(Int_t r, Int_t g, Int_t b, Int_t a=255);
TGLColor(Float_t r, Float_t g, Float_t b, Float_t a=1); TGLColor(Float_t r, Float_t g, Float_t b, Float_t a=1);
TGLColor(Color_t color_index, Char_t transparency=0); TGLColor(Color_t color_index, Char_t transparency=0);
virtual ~TGLColor(); virtual ~TGLColor();
TGLColor& operator=(const TGLColor& c); TGLColor& operator=(const TGLColor& c);
skipping to change at line 1112 skipping to change at line 1030
const TGLVertex3 & pos, const TGLVertex3 & pos,
Float_t radius = 3, Float_t radius = 3,
const Float_t * rgba = 0); const Float_t * rgba = 0);
static void DrawSimpleAxes(const TGLCamera & camera, static void DrawSimpleAxes(const TGLCamera & camera,
const TGLBoundingBox & bbox, const TGLBoundingBox & bbox,
Int_t axesType); Int_t axesType);
static void DrawNumber(const TString & num, static void DrawNumber(const TString & num,
const TGLVertex3 & pos, const TGLVertex3 & pos,
Bool_t center = kFALSE); Bool_t center = kFALSE);
ClassDef(TGLUtil,0) // Wrapper class for misc GL pieces ClassDef(TGLUtil,0); // Wrapper class for misc GL pieces
}; };
/************************************************************************** / /************************************************************************** /
class TGLCapabilitySwitch class TGLCapabilitySwitch
{ {
private: private:
TGLCapabilitySwitch(const TGLCapabilitySwitch &); TGLCapabilitySwitch(const TGLCapabilitySwitch &);
TGLCapabilitySwitch &operator = (const TGLCapabilitySwitch &); TGLCapabilitySwitch &operator = (const TGLCapabilitySwitch &);
skipping to change at line 1185 skipping to change at line 1103
class TGLSelectionBuffer { class TGLSelectionBuffer {
std::vector<UChar_t> fBuffer; std::vector<UChar_t> fBuffer;
Int_t fWidth; Int_t fWidth;
Int_t fHeight; Int_t fHeight;
public: public:
TGLSelectionBuffer(); TGLSelectionBuffer();
virtual ~TGLSelectionBuffer(); virtual ~TGLSelectionBuffer();
void ReadColorBuffer(Int_t width, Int_t height); void ReadColorBuffer(Int_t width, Int_t height);
void ReadColorBuffer(Int_t x, Int_t y, Int_t width, Int_t heig ht);
const UChar_t *GetPixelColor(Int_t px, Int_t py)const; const UChar_t *GetPixelColor(Int_t px, Int_t py)const;
private: private:
TGLSelectionBuffer(const TGLSelectionBuffer &); TGLSelectionBuffer(const TGLSelectionBuffer &);
TGLSelectionBuffer &operator = (const TGLSelectionBuffer &); TGLSelectionBuffer &operator = (const TGLSelectionBuffer &);
ClassDef(TGLSelectionBuffer, 0)//Holds color buffer content for selectio n ClassDef(TGLSelectionBuffer, 0); //Holds color buffer content for select ion
}; };
template<class T> template<class T>
class TGL2DArray : public std::vector<T> { class TGL2DArray : public std::vector<T> {
private: private:
Int_t fRowLen; Int_t fRowLen;
Int_t fMaxRow; Int_t fMaxRow;
typedef typename std::vector<T>::size_type size_type; typedef typename std::vector<T>::size_type size_type;
public: public:
 End of changes. 18 change blocks. 
115 lines changed or deleted 19 lines changed or added


 TGLViewer.h   TGLViewer.h 
// @(#)root/gl:$Id: TGLViewer.h 28197 2009-04-14 13:59:27Z matevz $ // @(#)root/gl:$Id: TGLViewer.h 28607 2009-05-13 15:11:33Z matevz $
// Author: Richard Maunder 25/05/2005 // Author: Richard Maunder 25/05/2005
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 91 skipping to change at line 91
TGLOrthoCamera fOrthoZOYCamera; //! TGLOrthoCamera fOrthoZOYCamera; //!
TGLOrthoCamera fOrthoXnOYCamera; //! TGLOrthoCamera fOrthoXnOYCamera; //!
TGLOrthoCamera fOrthoXnOZCamera; //! TGLOrthoCamera fOrthoXnOZCamera; //!
TGLOrthoCamera fOrthoZnOYCamera; //! TGLOrthoCamera fOrthoZnOYCamera; //!
TGLCamera *fCurrentCamera; //! TGLCamera *fCurrentCamera; //!
// Lights // Lights
TGLLightSet *fLightSet; //! TGLLightSet *fLightSet; //!
// Clipping // Clipping
TGLClipSet *fClipSet; //! TGLClipSet *fClipSet; //!
Bool_t fClipAutoUpdate; //!
// Selected physical // Selected physical
TGLSelectRecord fCurrentSelRec; //! select record in use as selected TGLSelectRecord fCurrentSelRec; //! select record in use as selected
TGLSelectRecord fSelRec; //! select record from last select (should go to context) TGLSelectRecord fSelRec; //! select record from last select (should go to context)
TGLSelectRecord fSecSelRec; //! select record from last secondary select (should go to context) TGLSelectRecord fSecSelRec; //! select record from last secondary select (should go to context)
TGLManipSet *fSelectedPShapeRef; //! TGLManipSet *fSelectedPShapeRef; //!
// Overlay // Overlay
TGLOverlayElement *fCurrentOvlElm; //! current overlay element TGLOverlayElement *fCurrentOvlElm; //! current overlay element
TGLOvlSelectRecord fOvlSelRec; //! select record from last overlay select TGLOvlSelectRecord fOvlSelRec; //! select record from last overlay select
TGEventHandler *fEventHandler; //! event handler TGEventHandler *fEventHandler; //! event handler
skipping to change at line 226 skipping to change at line 227
Bool_t IsUsingDefaultColorSet() const; Bool_t IsUsingDefaultColorSet() const;
void SetClearColor(Color_t col); void SetClearColor(Color_t col);
static TGLColorSet& GetDefaultColorSet(); static TGLColorSet& GetDefaultColorSet();
static void UseDefaultColorSetForNewViewers(Bool_t x); static void UseDefaultColorSetForNewViewers(Bool_t x);
static Bool_t IsUsingDefaultColorSetForNewViewers(); static Bool_t IsUsingDefaultColorSetForNewViewers();
TGLLightSet* GetLightSet() const { return fLightSet; } TGLLightSet* GetLightSet() const { return fLightSet; }
TGLClipSet * GetClipSet() const { return fClipSet; } TGLClipSet * GetClipSet() const { return fClipSet; }
Bool_t GetClipAutoUpdate() const { return fClipAutoUpdate; }
void SetClipAutoUpdate(Bool_t x) { fClipAutoUpdate = x; }
// External GUI component interface // External GUI component interface
TGLCamera & CurrentCamera() const { return *fCurrentCamera; } TGLCamera & CurrentCamera() const { return *fCurrentCamera; }
TGLCamera & RefCamera(ECameraType camera); TGLCamera & RefCamera(ECameraType camera);
void SetCurrentCamera(ECameraType camera); void SetCurrentCamera(ECameraType camera);
void SetOrthoCamera(ECameraType camera, Double_t zoom, Double_t dolly, void SetOrthoCamera(ECameraType camera, Double_t zoom, Double_t dolly,
Double_t center[3], Double_t hRotate, Double_t vRotate); Double_t center[3], Double_t hRotate, Double_t vRotate);
void SetPerspectiveCamera(ECameraType camera, Double_t fov, Double_t dol ly, void SetPerspectiveCamera(ECameraType camera, Double_t fov, Double_t dol ly,
Double_t center[3], Double_t hRotate, Double_t vRotate); Double_t center[3], Double_t hRotate, Double_t vRotate);
void GetGuideState(Int_t & axesType, Bool_t & axesDepthTest, Bool_t & re ferenceOn, Double_t* referencePos) const; void GetGuideState(Int_t & axesType, Bool_t & axesDepthTest, Bool_t & re ferenceOn, Double_t* referencePos) const;
 End of changes. 3 change blocks. 
1 lines changed or deleted 4 lines changed or added


 TGLViewerBase.h   TGLViewerBase.h 
// @(#)root/gl:$Id: TGLViewerBase.h 28197 2009-04-14 13:59:27Z matevz $ // @(#)root/gl:$Id: TGLViewerBase.h 28885 2009-06-10 15:51:12Z matevz $
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
#ifndef ROOT_TGLViewerBase #ifndef ROOT_TGLViewerBase
#define ROOT_TGLViewerBase #define ROOT_TGLViewerBase
#include <TObject.h> #include <TObject.h>
#include "TGLLockable.h" #include "TGLLockable.h"
#include <TGLBoundingBox.h> #include <TGLBoundingBox.h>
#include "TGLOverlay.h"
#include <list> #include <list>
#include <vector> #include <vector>
class TGLSceneBase; class TGLSceneBase;
class TGLSceneInfo; class TGLSceneInfo;
class TGLCamera; class TGLCamera;
class TGLClip; class TGLClip;
class TGLRnrCtx; class TGLRnrCtx;
class TGLSelectRecord; class TGLSelectRecord;
skipping to change at line 92 skipping to change at line 93
TGLSceneInfo* AddScene(TGLSceneBase* scene); TGLSceneInfo* AddScene(TGLSceneBase* scene);
void RemoveScene(TGLSceneBase* scene); void RemoveScene(TGLSceneBase* scene);
void RemoveAllScenes(); void RemoveAllScenes();
void SceneDestructing(TGLSceneBase* scene); void SceneDestructing(TGLSceneBase* scene);
TGLSceneInfo* GetSceneInfo(TGLSceneBase* scene); TGLSceneInfo* GetSceneInfo(TGLSceneBase* scene);
virtual void AddOverlayElement(TGLOverlayElement* el); virtual void AddOverlayElement(TGLOverlayElement* el);
virtual void RemoveOverlayElement(TGLOverlayElement* el); virtual void RemoveOverlayElement(TGLOverlayElement* el);
virtual void DeleteOverlayAnnotations(); virtual void DeleteOverlayAnnotations();
virtual void DeleteOverlayElements(TGLOverlayElement::ERole r);
TGLClip* Clip() const { return fClip; } TGLClip* Clip() const { return fClip; }
void SetClip(TGLClip *p) { fClip = p; } void SetClip(TGLClip *p) { fClip = p; }
Short_t LOD() const { return fLOD; } Short_t LOD() const { return fLOD; }
void SetLOD(Short_t lod) { fLOD = lod; } void SetLOD(Short_t lod) { fLOD = lod; }
Short_t Style() const { return fStyle; } Short_t Style() const { return fStyle; }
void SetStyle(Short_t st) { fStyle = st; } void SetStyle(Short_t st) { fStyle = st; }
 End of changes. 3 change blocks. 
1 lines changed or deleted 3 lines changed or added


 TGPack.h   TGPack.h 
// @(#)root/eve:$Id: TGPack.h 26800 2008-12-10 16:20:20Z bellenot $ // @(#)root/eve:$Id: TGPack.h 29129 2009-06-22 09:39:20Z brun $
// Author: Matevz Tadel 2007 // Author: Matevz Tadel 2007
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
#ifndef ROOT_TGPack #ifndef ROOT_TGPack
#define ROOT_TGPack #define ROOT_TGPack
#include "TGFrame.h" #include "TGFrame.h"
#include "TGLayout.h"
class TGSplitter;
class TGFrameElementPack : public TGFrameElement
{
private:
TGFrameElementPack(const TGFrameElementPack&); // Not impleme
nted
TGFrameElementPack& operator=(const TGFrameElementPack&); // Not impleme
nted
public:
Float_t fWeight; // relative weight
TGFrameElementPack* fSplitFE; //! cached varaible for optimisation
TGFrameElementPack(TGFrame *frame, TGLayoutHints* lh = 0, Float_t weight
= 1):
TGFrameElement(frame, lh), fWeight(weight), fSplitFE(0) { }
ClassDef(TGFrameElementPack, 0); // Class used in TGPack.
};
//=========================================================================
=====
class TGPack : public TGCompositeFrame class TGPack : public TGCompositeFrame
{ {
private: private:
TGPack(const TGPack&); // Not implemented TGPack(const TGPack&); // Not implemented
TGPack& operator=(const TGPack&); // Not implemented TGPack& operator=(const TGPack&); // Not implemented
protected: protected:
Bool_t fVertical; Bool_t fVertical;
Bool_t fUseSplitters; Bool_t fUseSplitters;
Int_t fSplitterLen; Int_t fSplitterLen;
Int_t fDragOverflow; //! Int_t fDragOverflow; //!
Float_t fWeightSum; // total sum of sub frame weights
Int_t fNVisible; // number of visible frames
Int_t GetFrameLength(const TGFrame* f) const { return fVertical ? f->GetHeight() : f->GetWidth(); } Int_t GetFrameLength(const TGFrame* f) const { return fVertical ? f->GetHeight() : f->GetWidth(); }
Int_t GetLength() const { return GetFrameL ength(this); } Int_t GetLength() const { return GetFrameL ength(this); }
Int_t GetAvailableLength() const; Int_t GetAvailableLength() const;
void SetFrameLength (TGFrame* f, Int_t len); void SetFrameLength (TGFrame* f, Int_t len);
void SetFramePosition(TGFrame* f, Int_t pos); void SetFramePosition(TGFrame* f, Int_t pos);
Int_t NumberOfRealFrames() const; void FindFrames(TGFrame* splitter, TGFrameElementPack*& f0, TG
Int_t LengthOfRealFrames() const; FrameElementPack*& f1) const;
void ResizeExistingFrames(Int_t amount); void CheckSplitterVisibility();
void ExpandExistingFrames(Int_t amount); void ResizeExistingFrames();
void ShrinkExistingFrames(Int_t amount);
void RefitFramesToPack(); void RefitFramesToPack();
void FindFrames(TGFrame* splitter, TGFrame*& f0, TGFrame*& f1) void AddFrameInternal(TGFrame *f, TGLayoutHints* l = 0, Float_
; t weight = 1);
void RemoveFrameInternal(TGFrame *f);
void AddFrameInternal(TGFrame *f, TGLayoutHints* l = 0);
Int_t RemoveFrameInternal(TGFrame *f);
public: public:
TGPack(const TGWindow *p = 0, UInt_t w = 1, UInt_t h = 1, UInt_t options = 0, TGPack(const TGWindow *p = 0, UInt_t w = 1, UInt_t h = 1, UInt_t options = 0,
Pixel_t back = GetDefaultFrameBackground()); Pixel_t back = GetDefaultFrameBackground());
TGPack(TGClient *c, Window_t id, const TGWindow *parent = 0); TGPack(TGClient *c, Window_t id, const TGWindow *parent = 0);
virtual ~TGPack(); virtual ~TGPack();
virtual void AddFrame(TGFrame *f, TGLayoutHints *l = 0); virtual void AddFrameWithWeight(TGFrame *f, TGLayoutHints* l, Float_t
w);
virtual void AddFrame(TGFrame *f, TGLayoutHints* l=0);
virtual void DeleteFrame(TGFrame *f); virtual void DeleteFrame(TGFrame *f);
virtual void RemoveFrame(TGFrame *f); virtual void RemoveFrame(TGFrame *f);
virtual void ShowFrame(TGFrame *f); virtual void ShowFrame(TGFrame *f);
virtual void HideFrame(TGFrame *f); virtual void HideFrame(TGFrame *f);
using TGCompositeFrame::Resize; using TGCompositeFrame::Resize;
virtual void Resize(UInt_t w = 0, UInt_t h = 0); virtual void Resize(UInt_t w = 0, UInt_t h = 0);
using TGCompositeFrame::MapSubwindows;
virtual void MapSubwindows();
virtual void MoveResize(Int_t x, Int_t y, UInt_t w = 0, UInt_t h = 0); virtual void MoveResize(Int_t x, Int_t y, UInt_t w = 0, UInt_t h = 0);
virtual void Layout(); virtual void Layout();
void EqualizeFrames(); virtual void Dump() const;
void EqualizeFrames();
void HandleSplitterStart(); void HandleSplitterStart();
void HandleSplitterResize(Int_t delta); void HandleSplitterResize(Int_t delta);
// ---------------------------------------------------------------- // ----------------------------------------------------------------
Bool_t GetVertical() const { return fVertical; } Bool_t GetVertical() const { return fVertical; }
void SetVertical(Bool_t x); void SetVertical(Bool_t x);
// For now assume this is always true. Lenght of splitter = 4 pixels. // For now assume this is always true. Lenght of splitter = 4 pixels.
// Bool_t GetUseSplitters() const { return fUseSplitters; } Bool_t GetUseSplitters() const { return fUseSplitters; }
// void SetUseSplitters(Bool_t x) { fUseSplitters = x; } void SetUseSplitters(Bool_t x) { fUseSplitters = x; }
ClassDef(TGPack, 0); // Horizontal or vertical stack of frames. ClassDef(TGPack, 0); // Horizontal or vertical stack of frames.
}; };
#endif #endif
 End of changes. 11 change blocks. 
15 lines changed or deleted 48 lines changed or added


 TGQt.h   TGQt.h 
// @(#)root/qt:$Id: TGQt.h 28205 2009-04-14 19:38:00Z brun $ // @(#)root/qt:$Id: TGQt.h 28820 2009-06-05 06:16:09Z brun $
// Author: Valeri Fine 21/01/2002 // Author: Valeri Fine 21/01/2002
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. *
* Copyright (C) 2002 by Valeri Fine. * * Copyright (C) 2002 by Valeri Fine. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 32 skipping to change at line 32
// // // //
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
#include "TQtRConfig.h" #include "TQtRConfig.h"
#ifndef __CINT__ #ifndef __CINT__
#include <vector> #include <vector>
#include <map> #include <map>
#include <qobject.h> #include <qobject.h>
#include <qmap.h> #include <QMap>
#include <qcolor.h> #include <QColor>
#include <qcursor.h> #include <QCursor>
#include <qpainter.h> #include <QPainter>
#include <qrect.h> #include <QRect>
#include <qmap.h>
#include <qnamespace.h> #include <qnamespace.h>
#if (QT_VERSION > 0x039999) #include <QtGui/QPixmap>
# include <QPixmap> #include <QtCore/QEvent>
# include <QEvent> #include <QtCore/QVector>
# include <QVector>
#else
# include <qmemarray.h>
# include <qptrqueue.h>
# include <qptrlist.h>
# include <qptrvector.h>
#endif /* QT_VERSION */
#include <qfontdatabase.h> #include <QtGui/QFontDatabase>
#include "TQtClientGuard.h" #include "TQtClientGuard.h"
#else #else
class QObject; class QObject;
class QEvent; class QEvent;
#endif /* CINT */ #endif /* CINT */
class QPen; class QPen;
class QMarker; class QMarker;
skipping to change at line 103 skipping to change at line 95
friend class TQtWidget; friend class TQtWidget;
friend class TQtClientWidget; friend class TQtClientWidget;
friend class TQtImage; friend class TQtImage;
friend class TQtClientGuard; friend class TQtClientGuard;
friend class TQtClientFilter; friend class TQtClientFilter;
friend class TQtSynchPainting; friend class TQtSynchPainting;
friend class TQtToggleFeedBack; friend class TQtToggleFeedBack;
friend class TQtColorSelect; friend class TQtColorSelect;
friend class TQt16ColorSelector; friend class TQt16ColorSelector;
friend class TQtPen; friend class TQtPen;
friend class TQtBrush;
friend class TQtPainter;
protected: protected:
enum DEFWINDOWID { kDefault=1 }; enum DEFWINDOWID { kDefault=1 };
QPaintDevice *fSelectedWindow; // Pointer to the current "paintdevi ce: PixMap, Widget etc" QPaintDevice *fSelectedWindow; // Pointer to the current "paintdevi ce: PixMap, Widget etc"
// QPaintDevice *fSelectedBuffer; // Pointer to the current "paintde vice buffer"
QPaintDevice *fPrevWindow; // Pointer to the previous "Window" QPaintDevice *fPrevWindow; // Pointer to the previous "Window"
Int_t fDisplayOpened; Int_t fDisplayOpened;
TQtPainter *fQPainter; TQtPainter *fQPainter;
TQtEmitter fEmitter; // object to emit Qt signals on beha lf of TVirtualX TQtEmitter fEmitter; // object to emit Qt signals on beha lf of TVirtualX
static TVirtualX *fgTQt; // The hiden poiner to fullish ROOT TPluginManager static TVirtualX *fgTQt; // The hiden poiner to foolish ROOT TPluginManager
void *fhEvent; // The event object to synch thr eads void *fhEvent; // The event object to synch threads
#if QT_VERSION < 0x40000
QPtrVector<QCursor> fCursors;
#else /* QT_VERSION */
QVector<QCursor *> fCursors; QVector<QCursor *> fCursors;
#endif /* QT_VERSION */ ECursor fCursor; // Current cursor number;
// Qt::CursorShape fCursors[kNumCursors]; //List of cursors
ECursor fCursor; // Current cursor number;
Style_t fMarkerStyle; Style_t fMarkerStyle;
Int_t fTextAlignH; //Text Alignment Horizontal Int_t fTextAlignH; //Text Alignment Horizontal
Int_t fTextAlignV; //Text Alignment Vertical Int_t fTextAlignV; //Text Alignment Vertical
Float_t fCharacterUpX; //Character Up vector along X Float_t fCharacterUpX; //Character Up vector along X
Float_t fCharacterUpY; //Character Up vector along Y Float_t fCharacterUpY; //Character Up vector along Y
Int_t fTextFontModified; // Mark whether the text font has been modified Int_t fTextFontModified; // Mark whether the text font has been modified
Float_t fTextMagnitude; //Text Magnitude Float_t fTextMagnitude; //Text Magnitude
// Common HANDLES of the graphics attributes for all HIGZ windows // Common HANDLES of the graphics attributes for all HIGZ windows
TQtBrush *fQBrush; TQtBrush *fQBrush;
TQtPen *fQPen; TQtPen *fQPen;
TQtMarker *fQtMarker; TQtMarker *fQtMarker;
TQtPadFont *fQFont; TQtPadFont *fQFont;
#if (QT_VERSION <0x40000)
Qt::RasterOp fDrawMode;
#else
QPainter::CompositionMode fDrawMode; QPainter::CompositionMode fDrawMode;
#endif
typedef QMap<QPaintDevice *,QRect> TQTCLIPMAP; typedef QMap<QPaintDevice *,QRect> TQTCLIPMAP;
TQTCLIPMAP fClipMap; TQTCLIPMAP fClipMap;
// //
// Colors staff // Colors staff
// //
// QMemArray<QColor> QMap<Key, T>::const_iterator; // QMemArray<QColor> QMap<Key, T>::const_iterator;
QMap<Color_t,QColor*> fPallete; QMap<Color_t,QColor*> fPallete;
skipping to change at line 166 skipping to change at line 150
TQtClientGuard fQClientGuard; // guard TQtClientWibdget against of dead pointers TQtClientGuard fQClientGuard; // guard TQtClientWibdget against of dead pointers
TQtPixmapGuard fQPixmapGuard; // guard TQtClientWibdget against of dead pointers TQtPixmapGuard fQPixmapGuard; // guard TQtClientWibdget against of dead pointers
typedef std::map<ULong_t, QColor * > COLORMAP; typedef std::map<ULong_t, QColor * > COLORMAP;
COLORMAP fColorMap; // to back the TG widgets COLORMAP fColorMap; // to back the TG widgets
TQtClientWidget *fPointerGrabber; TQtClientWidget *fPointerGrabber;
QTextCodec *fCodec; // The Current text decoder QTextCodec *fCodec; // The Current text decoder
QString fFontTextCode; // The default code text code page (from the Gui.DefaultFont) QString fFontTextCode; // The default code text code page (from the Gui.DefaultFont)
const char *fSymbolFontFamily; // the name of the font to su bstiute the non-standard "Symbol" const char *fSymbolFontFamily; // the name of the font to su bstiute the non-standard "Symbol"
Int_t fQtEventHasBeenProcessed; // Flag whether the eve nts were processed Int_t fQtEventHasBeenProcessed; // Flag whether the eve nts were processed
Bool_t fFeedBackMode; // TCanvas feedback mode Bool_t fFeedBackMode; // TCanvas feedback mode
TQtFeedBackWidget *fFeedBackWidget; // The dedicated widget for TC TQtFeedBackWidget *fFeedBackWidget; // The dedicated widget for T
anvas feebback mode Canvas feebback mode
Bool_t fBlockRGB; // Protect agaist color doubel Bool_t fBlockRGB; // Protect agaist color doube
setting l setting
// //
// Text management // Text management
// //
//Qt::AlignmentFlags fTextAlign; //Qt::AlignmentFlags fTextAlign;
// void SetTextFont(const char *fontname, Int_t italic, Int_t bold); // void SetTextFont(const char *fontname, Int_t italic, Int_t bold);
Int_t CreatROOTThread(); Int_t CreatROOTThread();
void DeleteSelectedObj(); void DeleteSelectedObj();
// Qt methods // Qt methods
static QRect GetQRect(QPaintDevice &dev); static QRect GetQRect(QPaintDevice &dev);
void Begin();
void End();
void UpdateFont();
void UpdatePen();
void UpdateBrush();
void UpdateClipRectangle();
int UpdateColor(int cindex); int UpdateColor(int cindex);
virtual const QColor& ColorIndex(Color_t indx) const; virtual const QColor& ColorIndex(Color_t indx) const;
QPaintDevice *GetDoubleBuffer(QPaintDevice *dev); QPaintDevice *GetDoubleBuffer(QPaintDevice *dev);
#endif #endif
static Int_t RegisterWid(QPaintDevice *wid); // register QWidget for the embedded TCanvas static Int_t RegisterWid(QPaintDevice *wid); // register QWidget for the embedded TCanvas
static Int_t UnRegisterWid(QPaintDevice *wid); // unregister QWidget o f the TCanvas static Int_t UnRegisterWid(QPaintDevice *wid); // unregister QWidget o f the TCanvas
static Bool_t IsRegistered(QPaintDevice *wid); // Check whether the ob ject has been registered static Bool_t IsRegistered(QPaintDevice *wid); // Check whether the ob ject has been registered
private: private:
skipping to change at line 271 skipping to change at line 249
static void SetCoinLoaded(); static void SetCoinLoaded();
static Int_t IsCoinLoaded(); static Int_t IsCoinLoaded();
#ifndef __CINT__ #ifndef __CINT__
static QString RootFileFormat(const char *selector); static QString RootFileFormat(const char *selector);
static QString RootFileFormat(const QString &selector); static QString RootFileFormat(const QString &selector);
static QString QtFileFormat(const char *selector); static QString QtFileFormat(const char *selector);
static QString QtFileFormat(const QString &selector); static QString QtFileFormat(const QString &selector);
#endif #endif
#ifndef Q_MOC_RUN #ifndef Q_MOC_RUN
//MOC_SKIP_BEGIN
ClassDef(TGQt,0) //Interface to Qt GUI ClassDef(TGQt,0) //Interface to Qt GUI
//MOC_SKIP_END
#endif #endif
}; };
R__EXTERN TGQt *gQt; R__EXTERN TGQt *gQt;
#endif #endif
 End of changes. 16 change blocks. 
43 lines changed or deleted 19 lines changed or added


 TGenCollectionProxy.h   TGenCollectionProxy.h 
// @(#)root/io:$Id: TGenCollectionProxy.h 27255 2009-01-27 10:59:53Z pcanal $ // @(#)root/io:$Id: TGenCollectionProxy.h 29225 2009-06-25 15:17:04Z brun $
// Author: Markus Frank 28/10/04 // Author: Markus Frank 28/10/04
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
#ifndef ROOT_TGenCollectionProxy #ifndef ROOT_TGenCollectionProxy
skipping to change at line 195 skipping to change at line 195
/** @class TGenCollectionProxy::Method TGenCollectionProxy.h TGenCollect ionProxy.h /** @class TGenCollectionProxy::Method TGenCollectionProxy.h TGenCollect ionProxy.h
* *
* Small helper to execute (compiler) generated function for the * Small helper to execute (compiler) generated function for the
* access to STL or other containers. * access to STL or other containers.
* *
* @author M.Frank * @author M.Frank
* @version 1.0 * @version 1.0
* @date 10/10/2004 * @date 10/10/2004
*/ */
struct Method { class Method {
public:
typedef void* (*Call_t)(void*); typedef void* (*Call_t)(void*);
Call_t call; Call_t call;
Method() : call(0) { } Method() : call(0) { }
Method(Call_t c) : call(c) { } Method(Call_t c) : call(c) { }
Method(const Method& m) : call(m.call) { } Method(const Method& m) : call(m.call) { }
void* invoke(void* obj) const { return (*call)(obj); } void* invoke(void* obj) const { return (*call)(obj); }
}; };
/** @class TGenCollectionProxy::Method TGenCollectionProxy.h TGenCollect ionProxy.h /** @class TGenCollectionProxy::Method TGenCollectionProxy.h TGenCollect ionProxy.h
* *
* Small helper to execute (compiler) generated function for the * Small helper to execute (compiler) generated function for the
* access to STL or other containers. * access to STL or other containers.
* *
* @author M.Frank * @author M.Frank
* @version 1.0 * @version 1.0
* @date 10/10/2004 * @date 10/10/2004
*/ */
struct Method0 { class Method0 {
public:
typedef void* (*Call_t)(); typedef void* (*Call_t)();
Call_t call; Call_t call;
Method0() : call(0) { } Method0() : call(0) { }
Method0(Call_t c) : call(c) { } Method0(Call_t c) : call(c) { }
Method0(const Method0& m) : call(m.call) { } Method0(const Method0& m) : call(m.call) { }
void* invoke() const { return (*call)(); } void* invoke() const { return (*call)(); }
}; };
protected: protected:
typedef ROOT::TCollectionProxyInfo::Environ<char[64]> Env_t; typedef ROOT::TCollectionProxyInfo::Environ<char[64]> Env_t;
 End of changes. 3 change blocks. 
3 lines changed or deleted 5 lines changed or added


 TH1.h   TH1.h 
// @(#)root/hist:$Id: TH1.h 28080 2009-04-03 07:30:43Z brun $ // @(#)root/hist:$Id: TH1.h 28964 2009-06-12 16:08:04Z moneta $
// Author: Rene Brun 26/12/94 // Author: Rene Brun 26/12/94
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 297 skipping to change at line 297
virtual void Multiply(const TH1 *h1); virtual void Multiply(const TH1 *h1);
virtual void Multiply(const TH1 *h1, const TH1 *h2, Double_t c1=1, D ouble_t c2=1, Option_t *option=""); // *MENU* virtual void Multiply(const TH1 *h1, const TH1 *h2, Double_t c1=1, D ouble_t c2=1, Option_t *option=""); // *MENU*
virtual void Paint(Option_t *option=""); virtual void Paint(Option_t *option="");
virtual void Print(Option_t *option="") const; virtual void Print(Option_t *option="") const;
virtual void PutStats(Double_t *stats); virtual void PutStats(Double_t *stats);
virtual TH1 *Rebin(Int_t ngroup=2, const char*newname="", const Doub le_t *xbins=0); // *MENU* virtual TH1 *Rebin(Int_t ngroup=2, const char*newname="", const Doub le_t *xbins=0); // *MENU*
virtual void RebinAxis(Double_t x, TAxis *axis); virtual void RebinAxis(Double_t x, TAxis *axis);
virtual void Rebuild(Option_t *option=""); virtual void Rebuild(Option_t *option="");
virtual void RecursiveRemove(TObject *obj); virtual void RecursiveRemove(TObject *obj);
virtual void Reset(Option_t *option=""); virtual void Reset(Option_t *option="");
virtual void ResetStats() { fTsumw = 0; }
virtual void SavePrimitive(ostream &out, Option_t *option = ""); virtual void SavePrimitive(ostream &out, Option_t *option = "");
virtual void Scale(Double_t c1=1, Option_t *option=""); virtual void Scale(Double_t c1=1, Option_t *option="");
virtual void SetAxisColor(Color_t color=1, Option_t *axis="X"); virtual void SetAxisColor(Color_t color=1, Option_t *axis="X");
virtual void SetAxisRange(Double_t xmin, Double_t xmax, Option_t *ax is="X"); virtual void SetAxisRange(Double_t xmin, Double_t xmax, Option_t *ax is="X");
virtual void SetBarOffset(Float_t offset=0.25) {fBarOffset = Short_t (1000*offset);} virtual void SetBarOffset(Float_t offset=0.25) {fBarOffset = Short_t (1000*offset);}
virtual void SetBarWidth(Float_t width=0.5) {fBarWidth = Short_t(100 0*width);} virtual void SetBarWidth(Float_t width=0.5) {fBarWidth = Short_t(100 0*width);}
virtual void SetBinContent(Int_t bin, Double_t content); virtual void SetBinContent(Int_t bin, Double_t content);
virtual void SetBinContent(Int_t binx, Int_t biny, Double_t content) ; virtual void SetBinContent(Int_t binx, Int_t biny, Double_t content) ;
virtual void SetBinContent(Int_t binx, Int_t biny, Int_t binz, Doubl e_t content); virtual void SetBinContent(Int_t binx, Int_t biny, Int_t binz, Doubl e_t content);
virtual void SetBinError(Int_t bin, Double_t error); virtual void SetBinError(Int_t bin, Double_t error);
 End of changes. 2 change blocks. 
1 lines changed or deleted 2 lines changed or added


 TH2GL.h   TH2GL.h 
// @(#)root/gl:$Id: TH2GL.h 27471 2009-02-18 09:36:09Z couet $ // @(#)root/gl:$Id: TH2GL.h 28378 2009-04-28 15:40:53Z matevz $
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
#ifndef ROOT_TH2GL #ifndef ROOT_TH2GL
#define ROOT_TH2GL #define ROOT_TH2GL
#include <TGLObject.h> #include <TGLObject.h>
#include <TGLUtil.h>
#include <TGLAxisPainter.h>
class TGLRnrCtx; class TGLRnrCtx;
class TH1; class TH2;
class TAxis;
#include "TGLPlotPainter.h" #include "TGLPlotPainter.h"
class TH2GL : public TGLObject class TH2GL : public TGLObject
{ {
private: private:
TH2GL(const TH2GL&); // Not implemented TH2GL(const TH2GL&); // Not implemented
TH2GL& operator=(const TH2GL&); // Not implemented TH2GL& operator=(const TH2GL&); // Not implemented
protected: protected:
TH1 *fM; // fModel dynamic-casted to TH2 TH2 *fM; // Model object dynamic-casted to TH2.
TGLPlotPainter *fPlotPainter; TGLPlotPainter *fPlotPainter;
TGLPlotCoordinates fCoord; TGLPlotCoordinates fCoord;
public: public:
TH2GL(); TH2GL();
virtual ~TH2GL(); virtual ~TH2GL();
virtual Bool_t SetModel(TObject* obj, const Option_t* opt=0); virtual Bool_t SetModel(TObject* obj, const Option_t* opt=0);
virtual void SetBBox(); virtual void SetBBox();
virtual void DirectDraw(TGLRnrCtx & rnrCtx) const; virtual void DirectDraw(TGLRnrCtx & rnrCtx) const;
virtual Bool_t KeepDuringSmartRefresh() const { return kFALSE; } virtual Bool_t KeepDuringSmartRefresh() const { return kFALSE; }
// To support two-level selection // To support two-level selection
// virtual Bool_t SupportsSecondarySelect() const { return kTRUE; } // virtual Bool_t SupportsSecondarySelect() const { return kTRUE; }
// virtual void ProcessSelection(UInt_t* ptr, TGLViewer*, TGLScene*); // virtual void ProcessSelection(UInt_t* ptr, TGLViewer*, TGLScene*);
ClassDef(TH2GL, 0) // GL renderer for TH2 and TH3. ClassDef(TH2GL, 0); // GL renderer for TH2 and TH3.
}; // endclass TH2GL }; // endclass TH2GL
#endif #endif
 End of changes. 5 change blocks. 
4 lines changed or deleted 7 lines changed or added


 TH3.h   TH3.h 
// @(#)root/hist:$Id: TH3.h 28080 2009-04-03 07:30:43Z brun $ // @(#)root/hist:$Id: TH3.h 28964 2009-06-12 16:08:04Z moneta $
// Author: Rene Brun 27/10/95 // Author: Rene Brun 27/10/95
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 31 skipping to change at line 31
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
#ifndef ROOT_TH1 #ifndef ROOT_TH1
#include "TH1.h" #include "TH1.h"
#endif #endif
#ifndef ROOT_TAtt3D #ifndef ROOT_TAtt3D
#include "TAtt3D.h" #include "TAtt3D.h"
#endif #endif
class TH2;
class TProfile2D; class TProfile2D;
class TH3 : public TH1, public TAtt3D { class TH3 : public TH1, public TAtt3D {
protected: protected:
Double_t fTsumwy; //Total Sum of weight*Y Double_t fTsumwy; //Total Sum of weight*Y
Double_t fTsumwy2; //Total Sum of weight*Y*Y Double_t fTsumwy2; //Total Sum of weight*Y*Y
Double_t fTsumwxy; //Total Sum of weight*X*Y Double_t fTsumwxy; //Total Sum of weight*X*Y
Double_t fTsumwz; //Total Sum of weight*Z Double_t fTsumwz; //Total Sum of weight*Z
Double_t fTsumwz2; //Total Sum of weight*Z*Z Double_t fTsumwz2; //Total Sum of weight*Z*Z
skipping to change at line 101 skipping to change at line 102
virtual void GetStats(Double_t *stats) const; virtual void GetStats(Double_t *stats) const;
virtual Double_t Integral(Option_t *option="") const; virtual Double_t Integral(Option_t *option="") const;
virtual Double_t Integral(Int_t, Int_t, Option_t * ="") const {return 0; } virtual Double_t Integral(Int_t, Int_t, Option_t * ="") const {return 0; }
virtual Double_t Integral(Int_t, Int_t, Int_t, Int_t, Option_t * ="") co nst {return 0;} virtual Double_t Integral(Int_t, Int_t, Int_t, Int_t, Option_t * ="") co nst {return 0;}
virtual Double_t Integral(Int_t binx1, Int_t binx2, Int_t biny1, Int_t b iny2, Int_t binz1, Int_t binz2, Option_t *option="") const; virtual Double_t Integral(Int_t binx1, Int_t binx2, Int_t biny1, Int_t b iny2, Int_t binz1, Int_t binz2, Option_t *option="") const;
virtual Double_t Interpolate(Double_t x); virtual Double_t Interpolate(Double_t x);
virtual Double_t Interpolate(Double_t x, Double_t y); virtual Double_t Interpolate(Double_t x, Double_t y);
virtual Double_t Interpolate(Double_t x, Double_t y, Double_t z); virtual Double_t Interpolate(Double_t x, Double_t y, Double_t z);
virtual Double_t KolmogorovTest(const TH1 *h2, Option_t *option="") cons t; virtual Double_t KolmogorovTest(const TH1 *h2, Option_t *option="") cons t;
virtual Long64_t Merge(TCollection *list); virtual Long64_t Merge(TCollection *list);
TH1D *ProjectionX(const char *name="_px", Int_t firstybin=0,
Int_t lastybin=0, Int_t firstzbin=0,
Int_t lastzbin=0, Option_t *option="") cons
t; // *MENU*
TH1D *ProjectionY(const char *name="_py", Int_t firstxbin=0,
Int_t lastxbin=0, Int_t firstzbin=0,
Int_t lastzbin=0, Option_t *option="") cons
t; // *MENU*
TH1D *ProjectionZ(const char *name="_pz", Int_t firstxbin=0, Int_t lastxbin=0, Int_t firstybin=0, TH1D *ProjectionZ(const char *name="_pz", Int_t firstxbin=0, Int_t lastxbin=0, Int_t firstybin=0,
Int_t lastybin=0, Option_t *option="") cons t; // *MENU* Int_t lastybin=0, Option_t *option="") cons t; // *MENU*
TH1 *Project3D(Option_t *option="x") const; // *MENU* TH1 *Project3D(Option_t *option="x") const; // *MENU*
TProfile2D *Project3DProfile(Option_t *option="xy") const; // *MENU * TProfile2D *Project3DProfile(Option_t *option="xy") const; // *MENU *
virtual void PutStats(Double_t *stats); virtual void PutStats(Double_t *stats);
virtual void Reset(Option_t *option=""); virtual void Reset(Option_t *option="");
virtual void SetShowProjection(const char *option="xy",Int_t nbins=1 ); // *MENU* virtual void SetShowProjection(const char *option="xy",Int_t nbins=1 ); // *MENU*
protected:
TH1 *DoProject1D(char* title, char* name, TAxis* projX,
bool computeErrors, bool originalRange,
bool useUF, bool useOF) const;
TH2 *DoProject2D(char* title, char* name, TAxis* projX, TAxis* pr
ojY,
bool computeErrors, bool originalRange,
bool useUF, bool useOF) const;
TProfile2D *DoProjectProfile2D(char* title, char* name,TAxis* projX, TAx
is* projY,
bool originalRange, bool useUF, boo
l useOF) const;
ClassDef(TH3,5) //3-Dim histogram base class ClassDef(TH3,5) //3-Dim histogram base class
}; };
//________________________________________________________________________ //________________________________________________________________________
class TH3C : public TH3, public TArrayC { class TH3C : public TH3, public TArrayC {
public: public:
TH3C(); TH3C();
TH3C(const char *name,const char *title,Int_t nbinsx,Double_t xlow,Doubl e_t xup TH3C(const char *name,const char *title,Int_t nbinsx,Double_t xlow,Doubl e_t xup
,Int_t nbinsy,Double_t ylow,Double_t yup ,Int_t nbinsy,Double_t ylow,Double_t yup
 End of changes. 4 change blocks. 
1 lines changed or deleted 23 lines changed or added


 THStack.h   THStack.h 
// @(#)root/hist:$Id: THStack.h 26239 2008-11-17 14:55:10Z couet $ // @(#)root/hist:$Id: THStack.h 28509 2009-05-11 07:19:52Z brun $
// Author: Rene Brun 10/12/2001 // Author: Rene Brun 10/12/2001
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2001, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2001, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 73 skipping to change at line 73
virtual Double_t GetMaximum(Option_t *option=""); virtual Double_t GetMaximum(Option_t *option="");
virtual Double_t GetMinimum(Option_t *option=""); virtual Double_t GetMinimum(Option_t *option="");
TAxis *GetXaxis() const; TAxis *GetXaxis() const;
TAxis *GetYaxis() const; TAxis *GetYaxis() const;
virtual void ls(Option_t *option="") const; virtual void ls(Option_t *option="") const;
virtual void Modified(); virtual void Modified();
virtual void Paint(Option_t *chopt=""); virtual void Paint(Option_t *chopt="");
virtual void Print(Option_t *chopt="") const; virtual void Print(Option_t *chopt="") const;
virtual void RecursiveRemove(TObject *obj); virtual void RecursiveRemove(TObject *obj);
virtual void SavePrimitive(ostream &out, Option_t *option = ""); virtual void SavePrimitive(ostream &out, Option_t *option = "");
virtual void SetHistogram(TH1 *h) {fHistogram = h;}
virtual void SetMaximum(Double_t maximum=-1111); // *MENU* virtual void SetMaximum(Double_t maximum=-1111); // *MENU*
virtual void SetMinimum(Double_t minimum=-1111); // *MENU* virtual void SetMinimum(Double_t minimum=-1111); // *MENU*
ClassDef(THStack,2) //A collection of histograms ClassDef(THStack,2) //A collection of histograms
}; };
#endif #endif
 End of changes. 2 change blocks. 
1 lines changed or deleted 2 lines changed or added


 TLockFile.h   TLockFile.h 
// @(#)root/thread:$Id: TLockFile.h 20882 2007-11-19 11:31:26Z rdm $ // @(#)root/thread:$Id: TLockFile.h 28363 2009-04-27 15:12:11Z rdm $
// Author: Jan Fiete Grosse-Oetringhaus, 04.06.07 // Author: Jan Fiete Grosse-Oetringhaus, 04.06.07
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 38 skipping to change at line 38
// // // //
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
#ifndef ROOT_TObject #ifndef ROOT_TObject
#include "TObject.h" #include "TObject.h"
#endif #endif
#ifndef ROOT_TString #ifndef ROOT_TString
#include "TString.h" #include "TString.h"
#endif #endif
class TLockFile : public TObject class TLockFile : public TObject {
{
private: private:
TLockFile(const TLockFile&); // not implemented TLockFile(const TLockFile&); // not implemented
TLockFile& operator=(const TLockFile&); // not implemented TLockFile& operator=(const TLockFile&); // not implemented
protected: protected:
TString fPath; // path to file holding the lock TString fPath; // path to file holding the lock
Bool_t Lock(const char* path, Int_t timeLimit); Bool_t Lock(const char *path, Int_t timeLimit);
public: public:
TLockFile(const char* path, Int_t timeLimit = 0); TLockFile(const char *path, Int_t timeLimit = 0);
virtual ~TLockFile(); virtual ~TLockFile();
ClassDef(TLockFile, 0) //Lock an object using a file ClassDef(TLockFile, 0) //Lock an object using a file
}; };
#endif #endif
 End of changes. 4 change blocks. 
5 lines changed or deleted 5 lines changed or added


 TMath.h   TMath.h 
// @(#)root/mathcore:$Id: TMath.h 28094 2009-04-03 14:10:51Z moneta $ // @(#)root/mathcore:$Id: TMath.h 28382 2009-04-29 10:06:36Z moneta $
// Authors: Rene Brun, Anna Kreshuk, Eddy Offermann, Fons Rademakers 29/0 7/95 // Authors: Rene Brun, Anna Kreshuk, Eddy Offermann, Fons Rademakers 29/0 7/95
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 314 skipping to change at line 314
Double_t BesselY1(Double_t x); // Bessel function Y1(x) for posi tive x Double_t BesselY1(Double_t x); // Bessel function Y1(x) for posi tive x
Double_t StruveH0(Double_t x); // Struve functions of order 0 Double_t StruveH0(Double_t x); // Struve functions of order 0
Double_t StruveH1(Double_t x); // Struve functions of order 1 Double_t StruveH1(Double_t x); // Struve functions of order 1
Double_t StruveL0(Double_t x); // Modified Struve functions of o rder 0 Double_t StruveL0(Double_t x); // Modified Struve functions of o rder 0
Double_t StruveL1(Double_t x); // Modified Struve functions of o rder 1 Double_t StruveL1(Double_t x); // Modified Struve functions of o rder 1
Double_t DiLog(Double_t x); Double_t DiLog(Double_t x);
Double_t Erf(Double_t x); Double_t Erf(Double_t x);
Double_t ErfInverse(Double_t x); Double_t ErfInverse(Double_t x);
Double_t Erfc(Double_t x); Double_t Erfc(Double_t x);
inline Double_t ErfcInverse(Double_t x) {return TMath::ErfInverse(1-x);} Double_t ErfcInverse(Double_t x);
Double_t Freq(Double_t x); Double_t Freq(Double_t x);
Double_t Gamma(Double_t z); Double_t Gamma(Double_t z);
Double_t Gamma(Double_t a,Double_t x); Double_t Gamma(Double_t a,Double_t x);
Double_t GammaDist(Double_t x, Double_t gamma, Double_t mu=0, Double_t b eta=1); Double_t GammaDist(Double_t x, Double_t gamma, Double_t mu=0, Double_t b eta=1);
Double_t LnGamma(Double_t z); Double_t LnGamma(Double_t z);
} }
//---- Trig and other functions ------------------------------------------- ----- //---- Trig and other functions ------------------------------------------- -----
#include <float.h> #include <float.h>
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 TMinuitMinimizer.h   TMinuitMinimizer.h 
// @(#)root/minuit:$Id: TMinuitMinimizer.h 26866 2008-12-12 10:50:07Z monet a $ // @(#)root/minuit:$Id: TMinuitMinimizer.h 28946 2009-06-11 15:39:14Z monet a $
// Author: L. Moneta Wed Oct 25 16:28:55 2006 // Author: L. Moneta Wed Oct 25 16:28:55 2006
/********************************************************************** /**********************************************************************
* * * *
* Copyright (c) 2006 LCG ROOT Math Team, CERN/PH-SFT * * Copyright (c) 2006 LCG ROOT Math Team, CERN/PH-SFT *
* * * *
* * * *
**********************************************************************/ **********************************************************************/
// Header file for class TMinuitMinimizer // Header file for class TMinuitMinimizer
skipping to change at line 36 skipping to change at line 36
namespace ROOT { namespace ROOT {
namespace Minuit { namespace Minuit {
// enumeration specifying the type of TMinuit minimizers // enumeration specifying the type of TMinuit minimizers
enum EMinimizerType { enum EMinimizerType {
kMigrad, kMigrad,
kSimplex, kSimplex,
kCombined, kCombined,
kMigradImproved, kMigradImproved,
kScan kScan,
kSeek
}; };
} }
} }
/** /**
TMinuitMinimizer class: minimizer implementation based on TMinuit. TMinuitMinimizer class: minimizer implementation based on TMinuit.
*/ */
class TMinuitMinimizer : public ROOT::Math::Minimizer { class TMinuitMinimizer : public ROOT::Math::Minimizer {
skipping to change at line 108 skipping to change at line 109
/// set fixed variable (override if minimizer supports them ) /// set fixed variable (override if minimizer supports them )
virtual bool SetFixedVariable(unsigned int /* ivar */, const std::string & /* name */, double /* val */); virtual bool SetFixedVariable(unsigned int /* ivar */, const std::string & /* name */, double /* val */);
/// set the value of an existing variable /// set the value of an existing variable
virtual bool SetVariableValue(unsigned int , double ); virtual bool SetVariableValue(unsigned int , double );
/// method to perform the minimization /// method to perform the minimization
virtual bool Minimize(); virtual bool Minimize();
/// return minimum function value /// return minimum function value
virtual double MinValue() const { return fMinVal; } virtual double MinValue() const;
/// return expected distance reached from the minimum /// return expected distance reached from the minimum
virtual double Edm() const { return fEdm; } virtual double Edm() const;
/// return pointer to X values at the minimum /// return pointer to X values at the minimum
virtual const double * X() const { return &fParams.front(); } virtual const double * X() const { return &fParams.front(); }
/// return pointer to gradient values at the minimum /// return pointer to gradient values at the minimum
virtual const double * MinGradient() const { return 0; } // not availab le in Minuit2 virtual const double * MinGradient() const { return 0; } // not availab le in Minuit2
/// number of function calls to reach the minimum /// number of function calls to reach the minimum
virtual unsigned int NCalls() const { return 0; } virtual unsigned int NCalls() const;
/// this is <= Function().NDim() which is the total /// this is <= Function().NDim() which is the total
/// number of variables (free+ constrained ones) /// number of variables (free+ constrained ones)
virtual unsigned int NDim() const { return fDim; } virtual unsigned int NDim() const { return fDim; }
/// number of free variables (real dimension of the problem) /// number of free variables (real dimension of the problem)
/// this is <= Function().NDim() which is the total /// this is <= Function().NDim() which is the total
virtual unsigned int NFree() const { return fNFree; } virtual unsigned int NFree() const;
/// minimizer provides error and error matrix /// minimizer provides error and error matrix
virtual bool ProvidesError() const { return true; } virtual bool ProvidesError() const { return true; }
/// return errors at the minimum /// return errors at the minimum
virtual const double * Errors() const { return &fErrors.front(); } virtual const double * Errors() const { return &fErrors.front(); }
/** return covariance matrices elements /** return covariance matrices elements
if the variable is fixed the matrix is zero if the variable is fixed the matrix is zero
The ordering of the variables is the same as in errors The ordering of the variables is the same as in errors
*/ */
virtual double CovMatrix(unsigned int i, unsigned int j) const { virtual double CovMatrix(unsigned int i, unsigned int j) const {
return fCovar[i + fDim* j]; return ( fCovar.size() > (i + fDim* j) ) ? fCovar[i + fDim* j] : 0;
} }
///return status of covariance matrix
virtual int CovMatrixStatus() const;
///global correlation coefficient for variable i
virtual double GlobalCC(unsigned int ) const;
/// minos error for variable i, return false if Minos failed /// minos error for variable i, return false if Minos failed
virtual bool GetMinosError(unsigned int i, double & errLow, double & err Up); virtual bool GetMinosError(unsigned int i, double & errLow, double & err Up);
/** /**
perform a full calculation of the Hessian matrix for error calculatio
n
*/
virtual bool Hesse();
/**
scan a parameter i around the minimum. A minimization must have been done before, scan a parameter i around the minimum. A minimization must have been done before,
return false if it is not the case return false if it is not the case
*/ */
virtual bool Scan(unsigned int i, unsigned int &nstep, double * x, doubl e * y, double xmin = 0, double xmax = 0); virtual bool Scan(unsigned int i, unsigned int &nstep, double * x, doubl e * y, double xmin = 0, double xmax = 0);
/** /**
find the contour points (xi,xj) of the function for parameter i and j around the minimum find the contour points (xi,xj) of the function for parameter i and j around the minimum
The contour will be find for value of the function = Min + ErrorUp(); The contour will be find for value of the function = Min + ErrorUp();
*/ */
virtual bool Contour(unsigned int i, unsigned int j, unsigned int & npoi nts, double *xi, double *xj); virtual bool Contour(unsigned int i, unsigned int j, unsigned int & npoi nts, double *xi, double *xj);
skipping to change at line 174 skipping to change at line 186
protected: protected:
/// implementation of FCN for Minuit /// implementation of FCN for Minuit
static void Fcn( int &, double * , double & f, double * , int); static void Fcn( int &, double * , double & f, double * , int);
/// implementation of FCN for Minuit when user provided gradient is used /// implementation of FCN for Minuit when user provided gradient is used
static void FcnGrad( int &, double * g, double & f, double * , int); static void FcnGrad( int &, double * g, double & f, double * , int);
/// reset /// reset
void DoClear(); void DoClear();
/// retrieve minimum parameters and errors from TMinuit
void RetrieveParams();
/// retrieve error matrix from TMinuit
void RetrieveErrorMatrix();
private: private:
bool fUsed; bool fUsed;
bool fMinosRun; bool fMinosRun;
unsigned int fDim; unsigned int fDim;
unsigned int fNFree;
unsigned int fStrategy; unsigned int fStrategy;
double fMinVal;
double fEdm;
std::vector<double> fParams; std::vector<double> fParams;
std::vector<double> fErrors; std::vector<double> fErrors;
std::vector<double> fCovar; std::vector<double> fCovar;
ROOT::Minuit::EMinimizerType fType; ROOT::Minuit::EMinimizerType fType;
TMinuit * fMinuit; TMinuit * fMinuit;
// need to have a static copy of the function // need to have a static copy of the function
//NOTE: This is NOT thread safe. //NOTE: This is NOT thread safe.
static ROOT::Math::IMultiGenFunction * fgFunc; static ROOT::Math::IMultiGenFunction * fgFunc;
 End of changes. 11 change blocks. 
11 lines changed or deleted 27 lines changed or added


 TMonitor.h   TMonitor.h 
// @(#)root/net:$Id: TMonitor.h 26347 2008-11-21 14:28:56Z rdm $ // @(#)root/net:$Id: TMonitor.h 28779 2009-06-02 16:17:10Z rdm $
// Author: Fons Rademakers 09/01/97 // Author: Fons Rademakers 09/01/97
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 38 skipping to change at line 38
#ifndef ROOT_TObject #ifndef ROOT_TObject
#include "TObject.h" #include "TObject.h"
#endif #endif
#ifndef ROOT_TQObject #ifndef ROOT_TQObject
#include "TQObject.h" #include "TQObject.h"
#endif #endif
class TList; class TList;
class TSocket; class TSocket;
class TMonitor : public TObject , public TQObject { class TMonitor : public TObject, public TQObject {
friend class TSocketHandler; friend class TSocketHandler;
friend class TTimeOutTimer; friend class TTimeOutTimer;
friend class TXSlave; friend class TXSlave;
friend class TXSocket; friend class TXSocket;
private: private:
TList *fActive; //list of sockets to monitor TList *fActive; //list of sockets to monitor
TList *fDeActive; //list of (temporary) disabled sockets TList *fDeActive; //list of (temporary) disabled sockets
TSocket *fReady; //socket which is ready to be read or written TSocket *fReady; //socket which is ready to be read or written
Bool_t fMainLoop; //true if monitoring sockets within the main Bool_t fMainLoop; //true if monitoring sockets within the main even
//event loop t loop
Bool_t fInterrupt; //flags an interrupt to Select Bool_t fInterrupt; //flags an interrupt to Select
void SetReady(TSocket *sock); void SetReady(TSocket *sock);
void *GetSender() { return this; } // used to get gTQSender void *GetSender() { return this; } // used to get gTQSender
public: public:
enum EInterest { kRead = 1, kWrite = 2 }; enum EInterest { kRead = 1, kWrite = 2 };
TMonitor(Bool_t mainloop = kTRUE); TMonitor(Bool_t mainloop = kTRUE);
TMonitor(const TMonitor &m); TMonitor(const TMonitor &m);
 End of changes. 3 change blocks. 
4 lines changed or deleted 4 lines changed or added


 TNeuronInput.h   TNeuronInput.h 
// @(#)root/tmva $Id: TNeuronInput.h 20882 2007-11-19 11:31:26Z rdm $ // @(#)root/tmva $Id: TNeuronInput.h 29122 2009-06-22 06:51:30Z brun $
// Author: Matt Jachowski // Author: Matt Jachowski
/************************************************************************** ******** /************************************************************************** ********
* Project: TMVA - a Root-integrated toolkit for multivariate data analysis * * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
* Package: TMVA * * Package: TMVA *
* Class : TMVA::TNeuronInput * * Class : TMVA::TNeuronInput *
* * * *
* Description: * * Description: *
* Interface for TNeuron input calculation classes * * Interface for TNeuron input calculation classes *
* * * *
skipping to change at line 34 skipping to change at line 34
#define ROOT_TMVA_TNeuronInput #define ROOT_TMVA_TNeuronInput
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// // // //
// TNeuronInput // // TNeuronInput //
// // // //
// Interface for TNeuron input calculation classes // // Interface for TNeuron input calculation classes //
// // // //
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
#ifndef ROOT_TObject
#include "TObject.h" #include "TObject.h"
#endif
#ifndef ROOT_TString
#include "TString.h" #include "TString.h"
#endif
namespace TMVA { namespace TMVA {
class TNeuron; class TNeuron;
class TNeuronInput { class TNeuronInput {
public: public:
TNeuronInput() {} TNeuronInput() {}
 End of changes. 4 change blocks. 
1 lines changed or deleted 5 lines changed or added


 TNeuronInputAbs.h   TNeuronInputAbs.h 
// @(#)root/tmva $Id: TNeuronInputAbs.h 21630 2008-01-10 19:40:44Z brun $ // @(#)root/tmva $Id: TNeuronInputAbs.h 29122 2009-06-22 06:51:30Z brun $
// Author: Matt Jachowski // Author: Matt Jachowski
/************************************************************************** ******** /************************************************************************** ********
* Project: TMVA - a Root-integrated toolkit for multivariate data analysis * * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
* Package: TMVA * * Package: TMVA *
* Class : TMVA::TNeuronInputAbs * * Class : TMVA::TNeuronInputAbs *
* Web : http://tmva.sourceforge.net * * Web : http://tmva.sourceforge.net *
* * * *
* Description: * * Description: *
* TNeuron input calculator -- calculates the sum of the absolute valu es * * TNeuron input calculator -- calculates the sum of the absolute valu es *
skipping to change at line 35 skipping to change at line 35
#ifndef ROOT_TMVA_TNeuronInputAbs #ifndef ROOT_TMVA_TNeuronInputAbs
#define ROOT_TMVA_TNeuronInputAbs #define ROOT_TMVA_TNeuronInputAbs
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// // // //
// TNeuronInputAbs // // TNeuronInputAbs //
// // // //
// TNeuron input calculator -- calculates the sum of the absolute // // TNeuron input calculator -- calculates the sum of the absolute //
// values of the weighted inputs // // values of the weighted inputs //
// // // //
// Begin_Latex
// NeuronInput = #sum_{i} |y_{i}|
// End_Latex
// //
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// ROOT_VERSION(5,15,02) = (5<<16)+(15<<8)+2 = 364802 // ROOT_VERSION(5,15,02) = (5<<16)+(15<<8)+2 = 364802
// we use the hardcoded number here since CINT does not easily understand m acros // we use the hardcoded number here since CINT does not easily understand m acros
// we tried using rootcints -p option, but that causes rootcint to pick up // we tried using rootcints -p option, but that causes rootcint to pick up
// things from the ROOT version of TMVA // things from the ROOT version of TMVA
#if ROOT_VERSION_CODE >= 364802 #if ROOT_VERSION_CODE >= 364802
#ifndef ROOT_TMathBase #ifndef ROOT_TMathBase
#include "TMathBase.h" #include "TMathBase.h"
#endif #endif
#else #else
#ifndef ROOT_TMath #ifndef ROOT_TMath
#include "TMath.h" #include "TMath.h"
#endif #endif
#endif #endif
#ifndef ROOT_TObject
#include "TObject.h" #include "TObject.h"
#endif
#ifndef ROOT_TString
#include "TString.h" #include "TString.h"
#endif
#ifndef ROOT_TMVA_TNeuronInput #ifndef ROOT_TMVA_TNeuronInput
#include "TMVA/TNeuronInput.h" #include "TMVA/TNeuronInput.h"
#endif #endif
#ifndef ROOT_TMVA_TNeuron #ifndef ROOT_TMVA_TNeuron
#include "TMVA/TNeuron.h" #include "TMVA/TNeuron.h"
#endif #endif
namespace TMVA { namespace TMVA {
 End of changes. 5 change blocks. 
5 lines changed or deleted 5 lines changed or added


 TNeuronInputChooser.h   TNeuronInputChooser.h 
// @(#)root/tmva $Id: TNeuronInputChooser.h 20882 2007-11-19 11:31:26Z rdm $ // @(#)root/tmva $Id: TNeuronInputChooser.h 29122 2009-06-22 06:51:30Z brun $
// Author: Matt Jachowski // Author: Matt Jachowski
/************************************************************************** ******** /************************************************************************** ********
* Project: TMVA - a Root-integrated toolkit for multivariate data analysis * * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
* Package: TMVA * * Package: TMVA *
* Class : TMVA::TNeuronInputChooser * * Class : TMVA::TNeuronInputChooser *
* Web : http://tmva.sourceforge.net * * Web : http://tmva.sourceforge.net *
* * * *
* Description: * * Description: *
* Class for easily choosing neuron input functions. * * Class for easily choosing neuron input functions. *
skipping to change at line 36 skipping to change at line 36
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// // // //
// TNeuronInputChooser // // TNeuronInputChooser //
// // // //
// Class for easily choosing neuron input functions // // Class for easily choosing neuron input functions //
// // // //
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
#include <vector> #include <vector>
#ifndef ROOT_TString
#include "TString.h" #include "TString.h"
#endif
#ifndef ROOT_TMVA_TActivation #ifndef ROOT_TMVA_TActivation
#ifndef ROOT_TNeuronInput
#include "TNeuronInput.h" #include "TNeuronInput.h"
#endif #endif
#endif
#ifndef ROOT_TMVA_TNeuronInputSum #ifndef ROOT_TMVA_TNeuronInputSum
#ifndef ROOT_TNeuronInputSum
#include "TNeuronInputSum.h" #include "TNeuronInputSum.h"
#endif #endif
#endif
#ifndef ROOT_TMVA_TNeuronInputSqSum #ifndef ROOT_TMVA_TNeuronInputSqSum
#ifndef ROOT_TNeuronInputSqSum
#include "TNeuronInputSqSum.h" #include "TNeuronInputSqSum.h"
#endif #endif
#endif
#ifndef ROOT_TMVA_TNeuronInputAbs #ifndef ROOT_TMVA_TNeuronInputAbs
#ifndef ROOT_TNeuronInputAbs
#include "TNeuronInputAbs.h" #include "TNeuronInputAbs.h"
#endif #endif
#endif
namespace TMVA { namespace TMVA {
class TNeuron; class TNeuron;
class TNeuronInputChooser { class TNeuronInputChooser {
public: public:
TNeuronInputChooser() TNeuronInputChooser()
 End of changes. 11 change blocks. 
1 lines changed or deleted 11 lines changed or added


 TNeuronInputSqSum.h   TNeuronInputSqSum.h 
// @(#)root/tmva $Id: TNeuronInputSqSum.h 21630 2008-01-10 19:40:44Z brun $ // @(#)root/tmva $Id: TNeuronInputSqSum.h 29122 2009-06-22 06:51:30Z brun $
// Author: Matt Jachowski // Author: Matt Jachowski
/************************************************************************** ******** /************************************************************************** ********
* Project: TMVA - a Root-integrated toolkit for multivariate data analysis * * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
* Package: TMVA * * Package: TMVA *
* Class : TMVA::TNeuronInputSqSum * * Class : TMVA::TNeuronInputSqSum *
* Web : http://tmva.sourceforge.net * * Web : http://tmva.sourceforge.net *
* * * *
* Description: * * Description: *
* TNeuron input calculator -- calculates the square * * TNeuron input calculator -- calculates the square *
skipping to change at line 34 skipping to change at line 34
#ifndef ROOT_TMVA_TNeuronInputSqSum #ifndef ROOT_TMVA_TNeuronInputSqSum
#define ROOT_TMVA_TNeuronInputSqSum #define ROOT_TMVA_TNeuronInputSqSum
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// // // //
// TNeuronInputSqSum // // TNeuronInputSqSum //
// // // //
// TNeuron input calculator -- calculates the squared weighted sum of // // TNeuron input calculator -- calculates the squared weighted sum of //
// inputs // // inputs //
// // //
// Begin_Latex
// NeuronInput = #sum_{i} y_{i}^{2}
// End_Latex
//
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
#ifndef ROOT_TObject
#include "TObject.h" #include "TObject.h"
#endif
#ifndef ROOT_TString
#include "TString.h" #include "TString.h"
#endif
#ifndef ROOT_TMVA_TNeuronInput #ifndef ROOT_TMVA_TNeuronInput
#include "TMVA/TNeuronInput.h" #include "TMVA/TNeuronInput.h"
#endif #endif
#ifndef ROOT_TMVA_TNeuron #ifndef ROOT_TMVA_TNeuron
#include "TMVA/TNeuron.h" #include "TMVA/TNeuron.h"
#endif #endif
namespace TMVA { namespace TMVA {
 End of changes. 5 change blocks. 
6 lines changed or deleted 6 lines changed or added


 TNeuronInputSum.h   TNeuronInputSum.h 
// @(#)root/tmva $Id: TNeuronInputSum.h 21630 2008-01-10 19:40:44Z brun $ // @(#)root/tmva $Id: TNeuronInputSum.h 29122 2009-06-22 06:51:30Z brun $
// Author: Matt Jachowski // Author: Matt Jachowski
/************************************************************************** ******** /************************************************************************** ********
* Project: TMVA - a Root-integrated toolkit for multivariate data analysis * * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
* Package: TMVA * * Package: TMVA *
* Class : TMVA::TNeuronInputSum * * Class : TMVA::TNeuronInputSum *
* Web : http://tmva.sourceforge.net * * Web : http://tmva.sourceforge.net *
* * * *
* Description: * * Description: *
* TNeuron input calculator -- calculates the weighted sum of inputs. * * TNeuron input calculator -- calculates the weighted sum of inputs. *
skipping to change at line 32 skipping to change at line 32
************************************************************************** ********/ ************************************************************************** ********/
#ifndef ROOT_TMVA_TNeuronInputSum #ifndef ROOT_TMVA_TNeuronInputSum
#define ROOT_TMVA_TNeuronInputSum #define ROOT_TMVA_TNeuronInputSum
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// // // //
// TNeuronInputSum // // TNeuronInputSum //
// // // //
// TNeuron input calculator -- calculates the weighted sum of inputs // // TNeuron input calculator -- calculates the weighted sum of inputs //
// // //
// Begin_Latex
// NeuronInput = #sum_{i} y_{i}
// End_Latex
//
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
#ifndef ROOT_TObject
#include "TObject.h" #include "TObject.h"
#endif
#ifndef ROOT_TString
#include "TString.h" #include "TString.h"
#endif
#ifndef ROOT_TMVA_TNeuronInput #ifndef ROOT_TMVA_TNeuronInput
#include "TMVA/TNeuronInput.h" #include "TMVA/TNeuronInput.h"
#endif #endif
#ifndef ROOT_TMVA_TNeuron #ifndef ROOT_TMVA_TNeuron
#include "TMVA/TNeuron.h" #include "TMVA/TNeuron.h"
#endif #endif
namespace TMVA { namespace TMVA {
skipping to change at line 62 skipping to change at line 62
public: public:
TNeuronInputSum() {} TNeuronInputSum() {}
virtual ~TNeuronInputSum() {} virtual ~TNeuronInputSum() {}
// calculate input value for neuron // calculate input value for neuron
Double_t GetInput( const TNeuron* neuron ) const { Double_t GetInput( const TNeuron* neuron ) const {
if (neuron->IsInputNeuron()) return 0; if (neuron->IsInputNeuron()) return 0;
Double_t result = 0; Double_t result = 0;
for (Int_t i=0; i < neuron->NumPreLinks(); i++) { Int_t npl = neuron->NumPreLinks();
for (Int_t i=0; i < npl; i++) {
result += neuron->PreLinkAt(i)->GetWeightedValue(); result += neuron->PreLinkAt(i)->GetWeightedValue();
} }
return result; return result;
} }
// name of class // name of class
TString GetName() { return "Sum of weighted activations"; } TString GetName() { return "Sum of weighted activations"; }
ClassDef(TNeuronInputSum,0) // Calculates weighted sum of neuron inpu ts ClassDef(TNeuronInputSum,0) // Calculates weighted sum of neuron inpu ts
}; };
 End of changes. 6 change blocks. 
7 lines changed or deleted 8 lines changed or added


 TPad.h   TPad.h 
// @(#)root/gpad:$Id: TPad.h 27547 2009-02-20 14:09:12Z brun $ // @(#)root/gpad:$Id: TPad.h 28464 2009-05-06 12:37:21Z brun $
// Author: Rene Brun 12/12/94 // Author: Rene Brun 12/12/94
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 29 skipping to change at line 29
// A Graphics pad. // // A Graphics pad. //
// // // //
// // // //
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
#ifndef ROOT_TVirtualPad #ifndef ROOT_TVirtualPad
#include "TVirtualPad.h" #include "TVirtualPad.h"
#endif #endif
class TVirtualViewer3D; class TVirtualViewer3D;
class TVirtualPadPainter;
class TBrowser; class TBrowser;
class TBox; class TBox;
class TLegend; class TLegend;
class TPad : public TVirtualPad { class TPad : public TVirtualPad {
private: private:
TObject *fTip; //! tool tip associated with box TObject *fTip; //! tool tip associated with box
protected: protected:
skipping to change at line 131 skipping to change at line 132
void DestroyExternalViewer3D(); void DestroyExternalViewer3D();
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py); virtual Int_t DistancetoPrimitive(Int_t px, Int_t py);
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py); virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py);
virtual void HideToolTip(Int_t event); virtual void HideToolTip(Int_t event);
void PaintBorder(Color_t color, Bool_t tops); void PaintBorder(Color_t color, Bool_t tops);
virtual void PaintBorderPS(Double_t xl,Double_t yl,Double_t xt,Double_t yt,Int_t bmode,Int_t bsize,Int_t dark,Int_t light); virtual void PaintBorderPS(Double_t xl,Double_t yl,Double_t xt,Double_t yt,Int_t bmode,Int_t bsize,Int_t dark,Int_t light);
void PaintDate(); void PaintDate();
virtual void SavePrimitive(ostream &out, Option_t *option = ""); virtual void SavePrimitive(ostream &out, Option_t *option = "");
virtual void SetBatch(Bool_t batch=kTRUE); virtual void SetBatch(Bool_t batch=kTRUE);
TVirtualPadPainter *GetPainter();
private: private:
TPad(const TPad &pad); // cannot copy pads, use TObject::Clone() TPad(const TPad &pad); // cannot copy pads, use TObject::Clone()
TPad &operator=(const TPad &rhs); // idem TPad &operator=(const TPad &rhs); // idem
void CopyBackgroundPixmap(Int_t x, Int_t y); void CopyBackgroundPixmap(Int_t x, Int_t y);
void CopyBackgroundPixmaps(TPad *start, TPad *stop, Int_t x, Int_t y); void CopyBackgroundPixmaps(TPad *start, TPad *stop, Int_t x, Int_t y);
public: public:
// TPad status bits // TPad status bits
enum { enum {
skipping to change at line 339 skipping to change at line 341
virtual void SetTicks(Int_t valuex = 1, Int_t valuey = 1) {fTickx = valuex; fTicky = valuey; Modified();} virtual void SetTicks(Int_t valuex = 1, Int_t valuey = 1) {fTickx = valuex; fTicky = valuey; Modified();}
virtual void SetTickx(Int_t value = 1) {fTickx = value; Modified(); } // *TOGGLE* virtual void SetTickx(Int_t value = 1) {fTickx = value; Modified(); } // *TOGGLE*
virtual void SetTicky(Int_t value = 1) {fTicky = value; Modified(); } // *TOGGLE* virtual void SetTicky(Int_t value = 1) {fTicky = value; Modified(); } // *TOGGLE*
virtual void SetTitle(const char *title="") {fTitle = title;} virtual void SetTitle(const char *title="") {fTitle = title;}
virtual void SetTheta(Double_t theta=30) {fTheta = theta; Modified( );} virtual void SetTheta(Double_t theta=30) {fTheta = theta; Modified( );}
virtual void SetPhi(Double_t phi=30) {fPhi = phi; Modified();} virtual void SetPhi(Double_t phi=30) {fPhi = phi; Modified();}
virtual void SetToolTipText(const char *text, Long_t delayms = 1000 ); virtual void SetToolTipText(const char *text, Long_t delayms = 1000 );
virtual void SetVertical(Bool_t vert=kTRUE); virtual void SetVertical(Bool_t vert=kTRUE);
virtual void SetView(TView *view = 0); virtual void SetView(TView *view = 0);
virtual void SetViewer3D(TVirtualViewer3D *viewer3d) {fViewer3D = v iewer3d;} virtual void SetViewer3D(TVirtualViewer3D *viewer3d) {fViewer3D = v iewer3d;}
//
virtual void SetGLDevice(Int_t dev) {fGLDevice = dev;}
virtual void SetCopyGLDevice(Bool_t copy) {fCopyGLDevice = copy;} virtual void SetCopyGLDevice(Bool_t copy) {fCopyGLDevice = copy;}
//
virtual void Update(); virtual void Update();
/// virtual void UpdateFillAttributes(Int_t col, Int_t sty); /// virtual void UpdateFillAttributes(Int_t col, Int_t sty);
/// virtual void UpdateLineAttributes(Int_t col, Int_t sty, Int_t wi dth); /// virtual void UpdateLineAttributes(Int_t col, Int_t sty, Int_t wi dth);
/// virtual void UpdateMarkerAttributes(Int_t col, Int_t sty, Float_ t msiz); /// virtual void UpdateMarkerAttributes(Int_t col, Int_t sty, Float_ t msiz);
/// virtual void UpdateTextAttributes(Int_t align,Float_t angle,Int_ t col,Int_t font,Float_t tsize); /// virtual void UpdateTextAttributes(Int_t align,Float_t angle,Int_ t col,Int_t font,Float_t tsize);
Int_t UtoAbsPixel(Double_t u) const {return Int_t(fUtoAbsPix elk + u*fUtoPixel);} Int_t UtoAbsPixel(Double_t u) const {return Int_t(fUtoAbsPix elk + u*fUtoPixel);}
Int_t VtoAbsPixel(Double_t v) const {return Int_t(fVtoAbsPix elk + v*fVtoPixel);} Int_t VtoAbsPixel(Double_t v) const {return Int_t(fVtoAbsPix elk + v*fVtoPixel);}
Int_t UtoPixel(Double_t u) const; Int_t UtoPixel(Double_t u) const;
Int_t VtoPixel(Double_t v) const; Int_t VtoPixel(Double_t v) const;
virtual TObject *WaitPrimitive(const char *pname="", const char *emode= ""); virtual TObject *WaitPrimitive(const char *pname="", const char *emode= "");
 End of changes. 5 change blocks. 
3 lines changed or deleted 6 lines changed or added


 TParticle.h   TParticle.h 
// @(#)root/eg:$Id: TParticle.h 20882 2007-11-19 11:31:26Z rdm $ // @(#)root/eg:$Id: TParticle.h 28998 2009-06-15 12:47:44Z brun $
// Author: Rene Brun , Federico Carminati 26/04/99 // Author: Rene Brun , Federico Carminati 26/04/99
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
skipping to change at line 28 skipping to change at line 28
#ifndef ROOT_TNamed #ifndef ROOT_TNamed
#include "TNamed.h" #include "TNamed.h"
#endif #endif
#ifndef ROOT_TAttLine #ifndef ROOT_TAttLine
#include "TAttLine.h" #include "TAttLine.h"
#endif #endif
#ifndef ROOT_TAtt3D #ifndef ROOT_TAtt3D
#include "TAtt3D.h" #include "TAtt3D.h"
#endif #endif
#ifndef ROOT_X3DBuffer
#include "X3DBuffer.h"
#endif
#ifndef ROOT_TLorentzVector #ifndef ROOT_TLorentzVector
#include "TLorentzVector.h" #include "TLorentzVector.h"
#endif #endif
#ifndef ROOT_TParticlePDG
#include "TParticlePDG.h" class TParticlePDG;
#endif
#ifndef ROOT_TDatabasePDG
#include "TDatabasePDG.h"
#endif
class TParticle : public TObject, public TAttLine, public TAtt3D { class TParticle : public TObject, public TAttLine, public TAtt3D {
protected: protected:
Int_t fPdgCode; // PDG code of the particle Int_t fPdgCode; // PDG code of the particle
Int_t fStatusCode; // generation status code Int_t fStatusCode; // generation status code
Int_t fMother[2]; // Indices of the mother particles Int_t fMother[2]; // Indices of the mother particles
Int_t fDaughter[2]; // Indices of the daughter particle s Int_t fDaughter[2]; // Indices of the daughter particle s
Float_t fWeight; // particle weight Float_t fWeight; // particle weight
skipping to change at line 108 skipping to change at line 101
Int_t GetStatusCode () const { return fStatusCode; } Int_t GetStatusCode () const { return fStatusCode; }
Int_t GetPdgCode () const { return fPdgCode; } Int_t GetPdgCode () const { return fPdgCode; }
Int_t GetFirstMother () const { return fMother[0]; } Int_t GetFirstMother () const { return fMother[0]; }
Int_t GetMother (Int_t i) const { return fMother[i]; } Int_t GetMother (Int_t i) const { return fMother[i]; }
Int_t GetSecondMother () const { return fMother[1]; } Int_t GetSecondMother () const { return fMother[1]; }
Bool_t IsPrimary () const { return fMother[0]>- 1 ? kFALSE : kTRUE; } //Is this particle primary one? Bool_t IsPrimary () const { return fMother[0]>- 1 ? kFALSE : kTRUE; } //Is this particle primary one?
Int_t GetFirstDaughter() const { return fDaughter[0] ; } Int_t GetFirstDaughter() const { return fDaughter[0] ; }
Int_t GetDaughter (Int_t i) const { return fDaughter[i] ; } Int_t GetDaughter (Int_t i) const { return fDaughter[i] ; }
Int_t GetLastDaughter () const { return fDaughter[1] ; } Int_t GetLastDaughter () const { return fDaughter[1] ; }
Double_t GetCalcMass () const { return fCalcMass; } Double_t GetCalcMass () const { return fCalcMass; }
Double_t GetMass () { return GetPDG()->Ma ss(); } Double_t GetMass ();
Int_t GetNDaughters () const { return fDaughter[1] >0 ? fDaughter[1]-fDaughter[0]+1 : 0;} Int_t GetNDaughters () const { return fDaughter[1] >0 ? fDaughter[1]-fDaughter[0]+1 : 0;}
Float_t GetWeight () const { return fWeight; } Float_t GetWeight () const { return fWeight; }
void GetPolarisation(TVector3 &v); void GetPolarisation(TVector3 &v);
TParticlePDG* GetPDG (Int_t mode = 0); TParticlePDG* GetPDG (Int_t mode = 0);
Int_t Beauty () { return GetPDG()->Be Int_t Beauty ();
auty(); } Int_t Charm ();
Int_t Charm () { return GetPDG()->Ch Int_t Strangeness ();
arm(); }
Int_t Strangeness () { return GetPDG()->St
rangeness(); }
void Momentum(TLorentzVector &v) const { v.SetPxPyPzE(fPx,fP y,fPz,fE); } void Momentum(TLorentzVector &v) const { v.SetPxPyPzE(fPx,fP y,fPz,fE); }
void ProductionVertex(TLorentzVector &v) const { v.SetXYZT(fVx ,fVy,fVz,fVt); } void ProductionVertex(TLorentzVector &v) const { v.SetXYZT(fVx ,fVy,fVz,fVt); }
// ****** redefine several most oftenly used methods of LORENTZ_VECTOR // ****** redefine several most oftenly used methods of LORENTZ_VECTOR
Double_t Vx () const { return fVx; } Double_t Vx () const { return fVx; }
Double_t Vy () const { return fVy; } Double_t Vy () const { return fVy; }
Double_t Vz () const { return fVz; } Double_t Vz () const { return fVz; }
Double_t T () const { return fVt; } Double_t T () const { return fVt; }
Double_t R () const { return TMath::Sqrt( fVx*fVx+fVy*fVy); } //Radius of production vertex in cyl indrical system Double_t R () const { return TMath::Sqrt( fVx*fVx+fVy*fVy); } //Radius of production vertex in cyl indrical system
 End of changes. 5 change blocks. 
17 lines changed or deleted 7 lines changed or added


 TProof.h   TProof.h 
// @(#)root/proof:$Id: TProof.h 27933 2009-03-25 15:19:55Z ganis $ // @(#)root/proof:$Id: TProof.h 29133 2009-06-22 12:28:50Z brun $
// Author: Fons Rademakers 13/02/97 // Author: Fons Rademakers 13/02/97
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 92 skipping to change at line 92
class TProofServ; class TProofServ;
class TQueryResult; class TQueryResult;
class TSignalHandler; class TSignalHandler;
class TSlave; class TSlave;
class TSemaphore; class TSemaphore;
class TSocket; class TSocket;
class TTree; class TTree;
class TVirtualMutex; class TVirtualMutex;
class TFileCollection; class TFileCollection;
class TMap; class TMap;
class TProofDataSetManager; class TDataSetManager;
// protocol changes: // protocol changes:
// 1 -> 2: new arguments for Process() command, option added // 1 -> 2: new arguments for Process() command, option added
// 2 -> 3: package manager enabling protocol changed // 2 -> 3: package manager enabling protocol changed
// 3 -> 4: introduction of multi-level-master support // 3 -> 4: introduction of multi-level-master support
// 4 -> 5: added friends support // 4 -> 5: added friends support
// 5 -> 6: drop TFTP, support for asynchronous queries // 5 -> 6: drop TFTP, support for asynchronous queries
// 6 -> 7: support for multisessions, archieve, retrieve, ... // 6 -> 7: support for multisessions, archieve, retrieve, ...
// 7 -> 8: return number of entries in GetNextPacket // 7 -> 8: return number of entries in GetNextPacket
// 8 -> 9: support for stateless connection via xproofd // 8 -> 9: support for stateless connection via xproofd
skipping to change at line 116 skipping to change at line 116
// 12 -> 13: exchange version/architecture/compiler info // 12 -> 13: exchange version/architecture/compiler info
// 13 -> 14: new proofserv environment setting // 13 -> 14: new proofserv environment setting
// 14 -> 15: add support for entry lists; new version of TFileInfo // 14 -> 15: add support for entry lists; new version of TFileInfo
// 15 -> 16: add support for generic non-data based processing // 15 -> 16: add support for generic non-data based processing
// 16 -> 17: new dataset handling system; support for TFileCollection proce ssing // 16 -> 17: new dataset handling system; support for TFileCollection proce ssing
// 17 -> 18: support for reconnection on daemon restarts // 17 -> 18: support for reconnection on daemon restarts
// 18 -> 19: TProofProgressStatus used in kPROOF_PROGRESS, kPROOF_STOPPROCE SS // 18 -> 19: TProofProgressStatus used in kPROOF_PROGRESS, kPROOF_STOPPROCE SS
// and kPROOF_GETNEXTPACKET messages in Master - worker communica tion // and kPROOF_GETNEXTPACKET messages in Master - worker communica tion
// 19 -> 20: Fix the asynchronous mode (required changes in some messages) // 19 -> 20: Fix the asynchronous mode (required changes in some messages)
// 20 -> 21: Add support for session queuing // 20 -> 21: Add support for session queuing
// 21 -> 22: Add support for switching from sync to async while running ('C
trl-Z' functionality)
// 22 -> 23: New dataset features (default tree name; classification per fi
leserver)
// 23 -> 24: Merging optimization
// PROOF magic constants // PROOF magic constants
const Int_t kPROOF_Protocol = 21; // protocol versi on number const Int_t kPROOF_Protocol = 24; // protocol versi on number
const Int_t kPROOF_Port = 1093; // IANA registere d PROOF port const Int_t kPROOF_Port = 1093; // IANA registere d PROOF port
const char* const kPROOF_ConfFile = "proof.conf"; // default config file const char* const kPROOF_ConfFile = "proof.conf"; // default config file
const char* const kPROOF_ConfDir = "/usr/local/root"; // default c onfig dir const char* const kPROOF_ConfDir = "/usr/local/root"; // default c onfig dir
const char* const kPROOF_WorkDir = ".proof"; // default workin g directory const char* const kPROOF_WorkDir = ".proof"; // default workin g directory
const char* const kPROOF_CacheDir = "cache"; // file cache dir , under WorkDir const char* const kPROOF_CacheDir = "cache"; // file cache dir , under WorkDir
const char* const kPROOF_PackDir = "packages"; // package dir, u nder WorkDir const char* const kPROOF_PackDir = "packages"; // package dir, u nder WorkDir
const char* const kPROOF_QueryDir = "queries"; // query dir, und er WorkDir const char* const kPROOF_QueryDir = "queries"; // query dir, und er WorkDir
const char* const kPROOF_DataSetDir = "datasets"; // dataset dir, u nder WorkDir const char* const kPROOF_DataSetDir = "datasets"; // dataset dir, u nder WorkDir
const char* const kPROOF_CacheLockFile = "proof-cache-lock-"; // cache lock file const char* const kPROOF_CacheLockFile = "proof-cache-lock-"; // cache lock file
const char* const kPROOF_PackageLockFile = "proof-package-lock-"; // packag e lock file const char* const kPROOF_PackageLockFile = "proof-package-lock-"; // packag e lock file
skipping to change at line 158 skipping to change at line 161
const char* const kGUNZIP = "gunzip"; const char* const kGUNZIP = "gunzip";
#endif #endif
R__EXTERN TVirtualMutex *gProofMutex; R__EXTERN TVirtualMutex *gProofMutex;
typedef void (*PrintProgress_t)(Long64_t tot, Long64_t proc, Float_t procti me); typedef void (*PrintProgress_t)(Long64_t tot, Long64_t proc, Float_t procti me);
// PROOF Interrupt signal handler // PROOF Interrupt signal handler
class TProofInterruptHandler : public TSignalHandler { class TProofInterruptHandler : public TSignalHandler {
private: private:
TProof *fProof;
TProofInterruptHandler(const TProofInterruptHandler&); // Not implemente d TProofInterruptHandler(const TProofInterruptHandler&); // Not implemente d
TProofInterruptHandler& operator=(const TProofInterruptHandler&); // Not implemented TProofInterruptHandler& operator=(const TProofInterruptHandler&); // Not implemented
TProof *fProof;
public: public:
TProofInterruptHandler(TProof *p) TProofInterruptHandler(TProof *p)
: TSignalHandler(kSigInterrupt, kFALSE), fProof(p) { } : TSignalHandler(kSigInterrupt, kFALSE), fProof(p) { }
Bool_t Notify(); Bool_t Notify();
}; };
// Input handler for messages from TProofServ // Input handler for messages from TProofServ
class TProofInputHandler : public TFileHandler { class TProofInputHandler : public TFileHandler {
private: private:
TSocket *fSocket;
TProof *fProof;
TProofInputHandler(const TProofInputHandler&); // Not implemented TProofInputHandler(const TProofInputHandler&); // Not implemented
TProofInputHandler& operator=(const TProofInputHandler&); // Not impleme nted TProofInputHandler& operator=(const TProofInputHandler&); // Not impleme nted
TSocket *fSocket;
TProof *fProof;
public: public:
TProofInputHandler(TProof *p, TSocket *s); TProofInputHandler(TProof *p, TSocket *s);
Bool_t Notify(); Bool_t Notify();
Bool_t ReadNotify() { return Notify(); } Bool_t ReadNotify() { return Notify(); }
}; };
// Slaves info class // Slaves info class
class TSlaveInfo : public TObject { class TSlaveInfo : public TObject {
public: public:
enum ESlaveStatus { kActive, kNotActive, kBad }; enum ESlaveStatus { kActive, kNotActive, kBad };
skipping to change at line 212 skipping to change at line 213
const char *GetOrdinal() const { return fOrdinal; } const char *GetOrdinal() const { return fOrdinal; }
void SetStatus(ESlaveStatus stat) { fStatus = stat; } void SetStatus(ESlaveStatus stat) { fStatus = stat; }
Int_t Compare(const TObject *obj) const; Int_t Compare(const TObject *obj) const;
Bool_t IsSortable() const { return kTRUE; } Bool_t IsSortable() const { return kTRUE; }
void Print(Option_t *option="") const; void Print(Option_t *option="") const;
ClassDef(TSlaveInfo,2) //basic info on slave ClassDef(TSlaveInfo,2) //basic info on slave
}; };
// Small auxilliary class for merging progress notification
class TProofMergePrg {
private:
TString fExp;
Int_t fIdx;
Int_t fNWrks;
static char fgCr[4];
public:
TProofMergePrg() : fIdx(-1), fNWrks(-1) { }
const char *Export() { fExp.Form("%c (%d workers still sending) ", fg
Cr[fIdx], fNWrks);
return fExp.Data(); }
void DecreaseNWrks() { fNWrks--; }
void IncreaseIdx() { fIdx++; if (fIdx == 4) fIdx = 0; }
void Reset(Int_t n = -1) { fIdx = -1; SetNWrks(n); }
void SetNWrks(Int_t n) { fNWrks = n; }
};
class TProof : public TNamed, public TQObject { class TProof : public TNamed, public TQObject {
friend class TPacketizer; friend class TPacketizer;
friend class TPacketizerDev; friend class TPacketizerDev;
friend class TPacketizerAdaptive; friend class TPacketizerAdaptive;
friend class TProofLite; friend class TProofLite;
friend class TProofDataSetManager; friend class TDataSetManager;
friend class TProofServ; friend class TProofServ;
friend class TProofInputHandler; friend class TProofInputHandler;
friend class TProofInterruptHandler; friend class TProofInterruptHandler;
friend class TProofPlayer; friend class TProofPlayer;
friend class TProofPlayerLite; friend class TProofPlayerLite;
friend class TProofPlayerRemote; friend class TProofPlayerRemote;
friend class TProofProgressDialog; friend class TProofProgressDialog;
friend class TSlave; friend class TSlave;
friend class TSlaveLite; friend class TSlaveLite;
friend class TVirtualPacketizer; friend class TVirtualPacketizer;
skipping to change at line 317 skipping to change at line 336
kUploadDataSet = 1, //Upload a dataset kUploadDataSet = 1, //Upload a dataset
kCheckDataSetName = 2, //Check wheter dataset of this name exists kCheckDataSetName = 2, //Check wheter dataset of this name exists
kGetDataSets = 3, //List datasets saved on the master node kGetDataSets = 3, //List datasets saved on the master node
kRegisterDataSet = 4, //Save a TList object as a dataset kRegisterDataSet = 4, //Save a TList object as a dataset
kGetDataSet = 5, //Get a TFileCollection of TFileInfo objec ts kGetDataSet = 5, //Get a TFileCollection of TFileInfo objec ts
kVerifyDataSet = 6, //Try open all files from a dataset and re port results kVerifyDataSet = 6, //Try open all files from a dataset and re port results
kRemoveDataSet = 7, //Remove a dataset but leave files belongi ng to it kRemoveDataSet = 7, //Remove a dataset but leave files belongi ng to it
kMergeDataSet = 8, //Add new files to an existing dataset kMergeDataSet = 8, //Add new files to an existing dataset
kShowDataSets = 9, //Shows datasets, returns formatted output kShowDataSets = 9, //Shows datasets, returns formatted output
kGetQuota = 10, //Get quota info per group kGetQuota = 10, //Get quota info per group
kShowQuota = 11 //Show quotas kShowQuota = 11, //Show quotas
kSetDefaultTreeName = 12 //Set the default tree name
}; };
enum ESendFileOpt { enum ESendFileOpt {
kAscii = 0x0, kAscii = 0x0,
kBinary = 0x1, kBinary = 0x1,
kForce = 0x2, kForce = 0x2,
kForward = 0x4, kForward = 0x4,
kCpBin = 0x8, kCpBin = 0x8,
kCp = 0x10 kCp = 0x10
}; };
enum EProofWrkListAction { enum EProofWrkListAction {
skipping to change at line 388 skipping to change at line 408
Bool_t fSync; //true if type of currently processed query is sync Bool_t fSync; //true if type of currently processed query is sync
ERunStatus fRunStatus; //run status ERunStatus fRunStatus; //run status
Bool_t fIsWaiting; //true if queries have been enqueued Bool_t fIsWaiting; //true if queries have been enqueued
Bool_t fRedirLog; //redirect received log info Bool_t fRedirLog; //redirect received log info
TString fLogFileName; //name of the temp file for redirected logs TString fLogFileName; //name of the temp file for redirected logs
FILE *fLogFileW; //temp file to redirect logs FILE *fLogFileW; //temp file to redirect logs
FILE *fLogFileR; //temp file to read redirected logs FILE *fLogFileR; //temp file to read redirected logs
Bool_t fLogToWindowOnly; //send log to window only Bool_t fLogToWindowOnly; //send log to window only
TProofMergePrg fMergePrg; //Merging progress
TList *fWaitingSlaves; //stores a TPair of the slaves's TSock et and TMessage TList *fWaitingSlaves; //stores a TPair of the slaves's TSock et and TMessage
TList *fQueries; //list of TProofQuery objects TList *fQueries; //list of TProofQuery objects
Int_t fOtherQueries; //number of queries in list from previ ous sessions Int_t fOtherQueries; //number of queries in list from previ ous sessions
Int_t fDrawQueries; //number of draw queries during this s essions Int_t fDrawQueries; //number of draw queries during this s essions
Int_t fMaxDrawQueries; //max number of draw queries kept Int_t fMaxDrawQueries; //max number of draw queries kept
Int_t fSeqNum; //Remote sequential # of the last quer y submitted Int_t fSeqNum; //Remote sequential # of the last quer y submitted
Int_t fSessionID; //remote ID of the session Int_t fSessionID; //remote ID of the session
Bool_t fEndMaster; //true for a master in direct contact only with workers Bool_t fEndMaster; //true for a master in direct contact only with workers
skipping to change at line 414 skipping to change at line 436
TList *fInputData; //Input data objects sent over via fil e TList *fInputData; //Input data objects sent over via fil e
TString fInputDataFile; //File with input data objects TString fInputDataFile; //File with input data objects
PrintProgress_t fPrintProgress; //Function function to display progres s info in batch mode PrintProgress_t fPrintProgress; //Function function to display progres s info in batch mode
TVirtualMutex *fCloseMutex; // Avoid crashes in MarkBad or alike w hile closing TVirtualMutex *fCloseMutex; // Avoid crashes in MarkBad or alike w hile closing
TList *fLoadedMacros; // List of loaded macros (just file na mes) TList *fLoadedMacros; // List of loaded macros (just file na mes)
static TList *fgProofEnvList; // List of TNameds defining environmen t static TList *fgProofEnvList; // List of TNameds defining environmen t
// variables to pass to proofserv // variables to pass to proofserv
static TPluginHandler *fgLogViewer; // Log dialog box plugin
protected: protected:
enum ESlaves { kAll, kActive, kUnique, kAllUnique }; enum ESlaves { kAll, kActive, kUnique, kAllUnique };
Bool_t fMasterServ; //true if we are a master server Bool_t fMasterServ; //true if we are a master server
TUrl fUrl; //Url of the master TUrl fUrl; //Url of the master
TString fConfFile; //file containing config information TString fConfFile; //file containing config information
TString fConfDir; //directory containing cluster config i nformation TString fConfDir; //directory containing cluster config i nformation
TString fImage; //master's image name TString fImage; //master's image name
Int_t fProtocol; //remote PROOF server protocol version number Int_t fProtocol; //remote PROOF server protocol version number
TList *fSlaves; //list of all slave servers as in confi g file TList *fSlaves; //list of all slave servers as in confi g file
skipping to change at line 534 skipping to change at line 558
void TerminateWorker(TSlave *wrk); void TerminateWorker(TSlave *wrk);
void TerminateWorker(const char *ord); void TerminateWorker(const char *ord);
void ActivateAsyncInput(); void ActivateAsyncInput();
void DeActivateAsyncInput(); void DeActivateAsyncInput();
Int_t GetQueryReference(Int_t qry, TString &ref); Int_t GetQueryReference(Int_t qry, TString &ref);
void PrintProgress(Long64_t total, Long64_t processed, Float_t procT ime = -1.); void PrintProgress(Long64_t total, Long64_t processed, Float_t procT ime = -1.);
void ResetMergePrg();
void ParseConfigField(const char *config);
protected: protected:
TProof(); // For derived classes to use TProof(); // For derived classes to use
Int_t Init(const char *masterurl, const char *conffile, Int_t Init(const char *masterurl, const char *conffile,
const char *confdir, Int_t loglevel, const char *confdir, Int_t loglevel,
const char *alias = 0); const char *alias = 0);
virtual Bool_t StartSlaves(Bool_t attach = kFALSE); virtual Bool_t StartSlaves(Bool_t attach = kFALSE);
Int_t AddWorkers(TList *wrks); Int_t AddWorkers(TList *wrks);
Int_t RemoveWorkers(TList *wrks); Int_t RemoveWorkers(TList *wrks);
void SetPlayer(TVirtualProofPlayer *player); void SetPlayer(TVirtualProofPlayer *player);
skipping to change at line 575 skipping to change at line 603
TPluginHandler *GetProgressDialog() const { return fProgressDialog; } TPluginHandler *GetProgressDialog() const { return fProgressDialog; }
Int_t AssertPath(const char *path, Bool_t writable); Int_t AssertPath(const char *path, Bool_t writable);
void PrepareInputDataFile(TString &dataFile); void PrepareInputDataFile(TString &dataFile);
virtual void SendInputDataFile(); virtual void SendInputDataFile();
static void *SlaveStartupThread(void *arg); static void *SlaveStartupThread(void *arg);
static Int_t AssertDataSet(TDSet *dset, TList *input, static Int_t AssertDataSet(TDSet *dset, TList *input,
TProofDataSetManager *mgr, TString &emsg); TDataSetManager *mgr, TString &emsg);
// Input data handling // Input data handling
static Int_t GetInputData(TList *input, const char *cachedir, TString &e msg); static Int_t GetInputData(TList *input, const char *cachedir, TString &e msg);
static Int_t SaveInputData(TQueryResult *qr, const char *cachedir, TStri ng &emsg); static Int_t SaveInputData(TQueryResult *qr, const char *cachedir, TStri ng &emsg);
static Int_t SendInputData(TQueryResult *qr, TProof *p, TString &emsg); static Int_t SendInputData(TQueryResult *qr, TProof *p, TString &emsg);
// Parse CINT commands // Parse CINT commands
static Bool_t GetFileInCmd(const char *cmd, TString &fn); static Bool_t GetFileInCmd(const char *cmd, TString &fn);
public: public:
TProof(const char *masterurl, const char *conffile = kPROOF_ConfFile, TProof(const char *masterurl, const char *conffile = kPROOF_ConfFile,
skipping to change at line 626 skipping to change at line 654
Int_t Archive(Int_t query, const char *url); Int_t Archive(Int_t query, const char *url);
Int_t Archive(const char *queryref, const char *url = 0); Int_t Archive(const char *queryref, const char *url = 0);
Int_t CleanupSession(const char *sessiontag); Int_t CleanupSession(const char *sessiontag);
Long64_t Finalize(Int_t query = -1, Bool_t force = kFALSE); Long64_t Finalize(Int_t query = -1, Bool_t force = kFALSE);
Long64_t Finalize(const char *queryref, Bool_t force = kFALSE); Long64_t Finalize(const char *queryref, Bool_t force = kFALSE);
Int_t Remove(Int_t query, Bool_t all = kFALSE); Int_t Remove(Int_t query, Bool_t all = kFALSE);
Int_t Remove(const char *queryref, Bool_t all = kFALSE); Int_t Remove(const char *queryref, Bool_t all = kFALSE);
Int_t Retrieve(Int_t query, const char *path = 0); Int_t Retrieve(Int_t query, const char *path = 0);
Int_t Retrieve(const char *queryref, const char *path = 0); Int_t Retrieve(const char *queryref, const char *path = 0);
void DisableGoAsyn();
void GoAsynchronous();
void StopProcess(Bool_t abort, Int_t timeout = -1); void StopProcess(Bool_t abort, Int_t timeout = -1);
void Browse(TBrowser *b); void Browse(TBrowser *b);
Int_t SetParallel(Int_t nodes = 9999, Bool_t random = kFALSE); Int_t SetParallel(Int_t nodes = 9999, Bool_t random = kFALSE);
void SetLogLevel(Int_t level, UInt_t mask = TProofDebug::kAll); void SetLogLevel(Int_t level, UInt_t mask = TProofDebug::kAll);
void Close(Option_t *option=""); void Close(Option_t *option="");
virtual void Print(Option_t *option="") const; virtual void Print(Option_t *option="") const;
//-- cache and package management //-- cache and package management
skipping to change at line 678 skipping to change at line 708
Int_t opt = kAskUser, Int_t opt = kAskUser,
TList *skippedFiles = 0); TList *skippedFiles = 0);
virtual Bool_t RegisterDataSet(const char *name, virtual Bool_t RegisterDataSet(const char *name,
TFileCollection *dataset, const char* optStr = ""); TFileCollection *dataset, const char* optStr = "");
virtual TMap *GetDataSets(const char *uri = "", const char* optStr = "") ; virtual TMap *GetDataSets(const char *uri = "", const char* optStr = "") ;
virtual void ShowDataSets(const char *uri = "", const char* optStr = "" ); virtual void ShowDataSets(const char *uri = "", const char* optStr = "" );
TMap *GetDataSetQuota(const char* optStr = ""); TMap *GetDataSetQuota(const char* optStr = "");
void ShowDataSetQuota(Option_t* opt = 0); void ShowDataSetQuota(Option_t* opt = 0);
virtual Bool_t ExistsDataSet(const char *dataset);
void ShowDataSet(const char *dataset = "", const char* opt = "M") ; void ShowDataSet(const char *dataset = "", const char* opt = "M") ;
virtual Int_t RemoveDataSet(const char *dataset, const char* optStr = "" ); virtual Int_t RemoveDataSet(const char *dataset, const char* optStr = "" );
virtual Int_t VerifyDataSet(const char *dataset, const char* optStr = "" ); virtual Int_t VerifyDataSet(const char *dataset, const char* optStr = "" );
virtual TFileCollection *GetDataSet(const char *dataset, const char* opt Str = ""); virtual TFileCollection *GetDataSet(const char *dataset, const char* opt Str = "");
TList *FindDataSets(const char *searchString, const char* optStr = ""); TList *FindDataSets(const char *searchString, const char* optStr = "");
virtual Int_t SetDataSetTreeName( const char *dataset, const char *treen
ame);
const char *GetMaster() const { return fMaster; } const char *GetMaster() const { return fMaster; }
const char *GetConfDir() const { return fConfDir; } const char *GetConfDir() const { return fConfDir; }
const char *GetConfFile() const { return fConfFile; } const char *GetConfFile() const { return fConfFile; }
const char *GetUser() const { return fUrl.GetUser(); } const char *GetUser() const { return fUrl.GetUser(); }
const char *GetWorkDir() const { return fWorkDir; } const char *GetWorkDir() const { return fWorkDir; }
const char *GetSessionTag() const { return GetName(); } const char *GetSessionTag() const { return GetName(); }
const char *GetImage() const { return fImage; } const char *GetImage() const { return fImage; }
const char *GetUrl() { return fUrl.GetUrl(); } const char *GetUrl() { return fUrl.GetUrl(); }
Int_t GetPort() const { return fUrl.GetPort(); } Int_t GetPort() const { return fUrl.GetPort(); }
Int_t GetRemoteProtocol() const { return fProtocol; } Int_t GetRemoteProtocol() const { return fProtocol; }
skipping to change at line 817 skipping to change at line 850
void DeactivateWorker(const char *ord); void DeactivateWorker(const char *ord);
const char *GetDataPoolUrl() const { return fDataPoolUrl; } const char *GetDataPoolUrl() const { return fDataPoolUrl; }
void SetDataPoolUrl(const char *url) { fDataPoolUrl = url; } void SetDataPoolUrl(const char *url) { fDataPoolUrl = url; }
void SetPrintProgress(PrintProgress_t pp) { fPrintProgress = pp; } void SetPrintProgress(PrintProgress_t pp) { fPrintProgress = pp; }
// Opening and managing PROOF connections // Opening and managing PROOF connections
static TProof *Open(const char *url = 0, const char *conffile = 0, static TProof *Open(const char *url = 0, const char *conffile = 0,
const char *confdir = 0, Int_t loglevel = 0); const char *confdir = 0, Int_t loglevel = 0);
static void LogViewer(const char *url = 0, Int_t sessionidx = 0 );
static TProofMgr *Mgr(const char *url); static TProofMgr *Mgr(const char *url);
static void Reset(const char *url, Bool_t hard = kFALSE); static void Reset(const char *url, Bool_t hard = kFALSE);
static void AddEnvVar(const char *name, const char *value); static void AddEnvVar(const char *name, const char *value);
static void DelEnvVar(const char *name); static void DelEnvVar(const char *name);
static const TList *GetEnvVars(); static const TList *GetEnvVars();
static void ResetEnvVars(); static void ResetEnvVars();
// Input/output list utilities // Input/output list utilities
static Int_t GetParameter(TCollection *c, const char *par, TStri ng &value); static Int_t GetParameter(TCollection *c, const char *par, TStri ng &value);
 End of changes. 19 change blocks. 
11 lines changed or deleted 49 lines changed or added


 TProofLite.h   TProofLite.h 
// @(#)root/proof:$Id: TProofLite.h 26388 2008-11-22 23:28:11Z ganis $ // @(#)root/proof:$Id: TProofLite.h 29133 2009-06-22 12:28:50Z brun $
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
#ifndef ROOT_TProofLite #ifndef ROOT_TProofLite
#define ROOT_TProofLite #define ROOT_TProofLite
skipping to change at line 31 skipping to change at line 31
// // // //
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
#ifndef ROOT_TProof #ifndef ROOT_TProof
#include "TProof.h" #include "TProof.h"
#endif #endif
class TDSet; class TDSet;
class TList; class TList;
class TQueryResultManager; class TQueryResultManager;
class TProofDataSetManager; class TDataSetManager;
class TProofLockPath; class TProofLockPath;
class TProofMgr; class TProofMgr;
class TProofQueryResult; class TProofQueryResult;
class TServerSocket; class TServerSocket;
class TProofLite : public TProof { class TProofLite : public TProof {
friend class TProofPlayerLite; friend class TProofPlayerLite;
private: private:
skipping to change at line 54 skipping to change at line 54
TString fQueryDir; // Directory containing query results and status TString fQueryDir; // Directory containing query results and status
TString fDataSetDir; // Directory containing info about known data set s TString fDataSetDir; // Directory containing info about known data set s
TString fSockPath; // UNIX socket path for communication with worker s TString fSockPath; // UNIX socket path for communication with worker s
TServerSocket *fServSock; // Server socket to accept call backs TServerSocket *fServSock; // Server socket to accept call backs
Bool_t fForkStartup; // Startup N-1 workers forking the first worker Bool_t fForkStartup; // Startup N-1 workers forking the first worker
TProofLockPath *fCacheLock; //cache dir locker TProofLockPath *fCacheLock; //cache dir locker
TProofLockPath *fQueryLock; // Query dir locker TProofLockPath *fQueryLock; // Query dir locker
TQueryResultManager *fQMgr; // Query-result manager TQueryResultManager *fQMgr; // Query-result manager
TProofDataSetManager* fDataSetManager; // dataset manager TDataSetManager* fDataSetManager; // dataset manager
TProofLite(const TProofLite &); // not implemented TProofLite(const TProofLite &); // not implemented
void operator=(const TProofLite &); // idem void operator=(const TProofLite &); // idem
Int_t CleanupSandbox(); Int_t CleanupSandbox();
Int_t CreateSandbox(); Int_t CreateSandbox();
void NotifyStartUp(const char *action, Int_t done, Int_t tot); void NotifyStartUp(const char *action, Int_t done, Int_t tot);
Int_t SetProofServEnv(const char *ord); Int_t SetProofServEnv(const char *ord);
Int_t InitDataSetManager(); Int_t InitDataSetManager();
skipping to change at line 114 skipping to change at line 114
// Cache management // Cache management
void ShowCache(Bool_t all = kFALSE); void ShowCache(Bool_t all = kFALSE);
void ClearCache(const char *file = 0); void ClearCache(const char *file = 0);
// Query management // Query management
TList *GetListOfQueries(Option_t *opt = ""); TList *GetListOfQueries(Option_t *opt = "");
Int_t Remove(const char *ref, Bool_t all); Int_t Remove(const char *ref, Bool_t all);
// Dataset handling // Dataset handling
Bool_t RegisterDataSet(const char *dsName, TFileCollection *ds, const char *opt = ""); Bool_t RegisterDataSet(const char *dsName, TFileCollection *ds, const char *opt = "");
Bool_t ExistsDataSet(const char *uri);
TMap *GetDataSets(const char *uri = "", const char * = 0); TMap *GetDataSets(const char *uri = "", const char * = 0);
void ShowDataSets(const char *uri = "", const char * = 0); void ShowDataSets(const char *uri = "", const char * = 0);
TFileCollection *GetDataSet(const char *uri, const char * = 0); TFileCollection *GetDataSet(const char *uri, const char * = 0);
Int_t RemoveDataSet(const char *uri, const char * = 0); Int_t RemoveDataSet(const char *uri, const char * = 0);
Int_t VerifyDataSet(const char *uri, const char * = 0); Int_t VerifyDataSet(const char *uri, const char * = 0);
Int_t SetDataSetTreeName( const char *dataset, const char *treename);
// Browsing // Browsing
TTree *GetTreeHeader(TDSet *tdset); TTree *GetTreeHeader(TDSet *tdset);
static Int_t GetNumberOfWorkers(const char *url = 0); static Int_t GetNumberOfWorkers(const char *url = 0);
ClassDef(TProofLite,0) //PROOF control class ClassDef(TProofLite,0) //PROOF control class
}; };
#endif #endif
 End of changes. 5 change blocks. 
3 lines changed or deleted 5 lines changed or added


 TProofLog.h   TProofLog.h 
// @(#)root/proof:$Id: TProofLog.h 25918 2008-10-22 15:00:04Z ganis $ // @(#)root/proof:$Id: TProofLog.h 28808 2009-06-04 14:18:34Z ganis $
// Author: G. Ganis 31/08/06 // Author: G. Ganis 31/08/06
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2006, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2006, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 23 skipping to change at line 23
#define ROOT_TProofLog #define ROOT_TProofLog
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// // // //
// TProofLog // // TProofLog //
// // // //
// Implementation of the PROOF session log handler // // Implementation of the PROOF session log handler //
// // // //
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
#ifndef ROOT_TDatime
#include "TDatime.h"
#endif
#ifndef ROOT_TNamed #ifndef ROOT_TNamed
#include "TNamed.h" #include "TNamed.h"
#endif #endif
#ifndef ROOT_TQObject #ifndef ROOT_TQObject
#include "TQObject.h" #include "TQObject.h"
#endif #endif
class TMacro; class TMacro;
class TProofLogElem; class TProofLogElem;
class TProofMgr; class TProofMgr;
class TProofLog : public TNamed, public TQObject { class TProofLog : public TNamed, public TQObject {
friend class TProofLogElem; friend class TProofLogElem;
friend class TProofMgrLite; friend class TProofMgrLite;
friend class TXProofMgr; friend class TXProofMgr;
private: private:
TProofMgr *fMgr; // parent TProofMgr TProofMgr *fMgr; // parent TProofMgr
void *fFILE; // pointer logging file, if any void *fFILE; // pointer logging file, if any
TList *fElem; // list of TProofLogElem objects TList *fElem; // list of TProofLogElem objects
TDatime fStartTime; // Time at which this session started
TProofLogElem *Add(const char *ord, const char *url); TProofLogElem *Add(const char *ord, const char *url);
public: public:
// Screen or GUI box logging // Screen or GUI box logging
enum ELogLocationBit { enum ELogLocationBit {
kLogToBox = BIT(16) kLogToBox = BIT(16)
}; };
enum ERetrieveOpt { kLeading = 0x1, kTrailing = 0x2, enum ERetrieveOpt { kLeading = 0x1, kTrailing = 0x2,
kAll = 0x3, kGrep = 0x4 }; kAll = 0x3, kGrep = 0x4 };
skipping to change at line 69 skipping to change at line 72
void Display(const char *ord = "*", Int_t from = -10, Int_t to = -1); void Display(const char *ord = "*", Int_t from = -10, Int_t to = -1);
TList *GetListOfLogs() const { return fElem; } TList *GetListOfLogs() const { return fElem; }
Int_t Grep(const char *txt, Int_t from = 0); Int_t Grep(const char *txt, Int_t from = 0);
void Print(Option_t *opt = 0) const; void Print(Option_t *opt = 0) const;
void Prt(const char *what); void Prt(const char *what);
Int_t Retrieve(const char *ord = "*", Int_t Retrieve(const char *ord = "*",
TProofLog::ERetrieveOpt opt = TProofLog::kTrailing, TProofLog::ERetrieveOpt opt = TProofLog::kTrailing,
const char *fname = 0, const char *pattern = 0); const char *fname = 0, const char *pattern = 0);
Int_t Save(const char *ord = "*", const char *fname = 0, Option_t *opt= "w"); Int_t Save(const char *ord = "*", const char *fname = 0, Option_t *opt= "w");
TDatime StartTime() { return fStartTime; }
// Where to log // Where to log
void SetLogToBox(Bool_t lgbox = kFALSE) { SetBit(kLogToBox, lgbox); } void SetLogToBox(Bool_t lgbox = kFALSE) { SetBit(kLogToBox, lgbox); }
Bool_t LogToBox() { return (TestBit(kLogToBox)) ? kTRUE : kFALSE; } Bool_t LogToBox() { return (TestBit(kLogToBox)) ? kTRUE : kFALSE; }
static void SetMaxTransferSize(Long64_t maxsz); static void SetMaxTransferSize(Long64_t maxsz);
ClassDef(TProofLog,0) // PROOF session log handler ClassDef(TProofLog,0) // PROOF session log handler
}; };
class TProofLogElem : public TNamed { class TProofLogElem : public TNamed {
skipping to change at line 102 skipping to change at line 107
public: public:
TProofLogElem(const char *ord, const char *url, TProofLogElem(const char *ord, const char *url,
TProofLog *logger); TProofLog *logger);
virtual ~TProofLogElem(); virtual ~TProofLogElem();
void Display(Int_t from = 0, Int_t to = -1); void Display(Int_t from = 0, Int_t to = -1);
TMacro *GetMacro() const { return fMacro; } TMacro *GetMacro() const { return fMacro; }
const char * GetRole() { return fRole.Data(); } const char * GetRole() { return fRole.Data(); }
Int_t Grep(const char *txt, TString &res, Int_t from = 0); Int_t Grep(const char *txt, TString &res, Int_t from = 0);
Bool_t IsMaster() const { return (fRole == "master") ? kTRUE : kFALSE;
}
Bool_t IsSubMaster() const { return (fRole == "submaster") ? kTRUE : kF
ALSE; }
Bool_t IsWorker() const { return (fRole == "worker") ? kTRUE : kFALSE;
}
void Print(Option_t *opt = 0) const; void Print(Option_t *opt = 0) const;
void Prt(const char *what); void Prt(const char *what);
Int_t Retrieve(TProofLog::ERetrieveOpt opt = TProofLog::kTrailing, Int_t Retrieve(TProofLog::ERetrieveOpt opt = TProofLog::kTrailing,
const char *pattern = 0); const char *pattern = 0);
static Long64_t GetMaxTransferSize(); static Long64_t GetMaxTransferSize();
static void SetMaxTransferSize(Long64_t maxsz); static void SetMaxTransferSize(Long64_t maxsz);
ClassDef(TProofLogElem,0) // PROOF session log element ClassDef(TProofLogElem,0) // PROOF session log element
}; };
 End of changes. 6 change blocks. 
2 lines changed or deleted 13 lines changed or added


 TProofMgr.h   TProofMgr.h 
// @(#)root/proof:$Id: TProofMgr.h 27442 2009-02-12 19:15:43Z ganis $ // @(#)root/proof:$Id: TProofMgr.h 28746 2009-05-28 13:03:29Z ganis $
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2005, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2005, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
#ifndef ROOT_TProofMgr #ifndef ROOT_TProofMgr
#define ROOT_TProofMgr #define ROOT_TProofMgr
skipping to change at line 76 skipping to change at line 76
virtual Bool_t IsLite() const { return (fServType == kProofLite); } virtual Bool_t IsLite() const { return (fServType == kProofLite); }
virtual Bool_t IsProofd() const { return (fServType == kProofd); } virtual Bool_t IsProofd() const { return (fServType == kProofd); }
virtual Bool_t IsValid() const { return kTRUE; } virtual Bool_t IsValid() const { return kTRUE; }
virtual void SetInvalid() { } virtual void SetInvalid() { }
virtual TProof *AttachSession(Int_t, Bool_t = kFALSE); virtual TProof *AttachSession(Int_t, Bool_t = kFALSE);
virtual TProof *AttachSession(TProofDesc *, Bool_t = kFALSE); virtual TProof *AttachSession(TProofDesc *, Bool_t = kFALSE);
virtual TProof *CreateSession(const char * = 0, const char * = 0, In t_t = -1); virtual TProof *CreateSession(const char * = 0, const char * = 0, In t_t = -1);
virtual void DetachSession(Int_t, Option_t * = ""); virtual void DetachSession(Int_t, Option_t * = "");
virtual void DetachSession(TProof *, Option_t * = "");
virtual void DiscardSession(TProof *p);
virtual TProofDesc *GetProofDesc(Int_t id); virtual TProofDesc *GetProofDesc(Int_t id);
virtual TProofDesc *GetProofDesc(TProof *p);
virtual Int_t GetRemoteProtocol() const { return fRemoteProtocol; } virtual Int_t GetRemoteProtocol() const { return fRemoteProtocol; }
virtual TProofLog *GetSessionLogs(Int_t = 0, const char * = 0, const ch ar * = "-v \"| SvcMsg\"") virtual TProofLog *GetSessionLogs(Int_t = 0, const char * = 0, const ch ar * = "-v \"| SvcMsg\"")
{ return (TProofLog * )0; } { return (TProofLog * )0; }
virtual const char *GetUrl() { return fUrl.GetUrl(); } virtual const char *GetUrl() { return fUrl.GetUrl(); }
virtual Bool_t MatchUrl(const char *url); virtual Bool_t MatchUrl(const char *url);
virtual void ShowROOTVersions() { }
virtual TList *QuerySessions(Option_t *opt = "S"); virtual TList *QuerySessions(Option_t *opt = "S");
virtual TObjString *ReadBuffer(const char *, Long64_t, Int_t) virtual TObjString *ReadBuffer(const char *, Long64_t, Int_t)
{ return (TObjString *)0; } { return (TObjString *)0; }
virtual TObjString *ReadBuffer(const char *, const char *) virtual TObjString *ReadBuffer(const char *, const char *)
{ return (TObjString *)0; } { return (TObjString *)0; }
virtual Int_t Reset(Bool_t hard = kFALSE, const char *usr = 0); virtual Int_t Reset(Bool_t hard = kFALSE, const char *usr = 0);
virtual void ShowWorkers(); virtual void ShowWorkers();
virtual Int_t SendMsgToUsers(const char *, const char * = 0); virtual Int_t SendMsgToUsers(const char *, const char * = 0);
virtual void SetAlias(const char *alias="") { TNamed::SetTitle(al ias); } virtual void SetAlias(const char *alias="") { TNamed::SetTitle(al ias); }
virtual void SetROOTVersion(const char *) { } virtual void SetROOTVersion(const char *) { }
virtual void ShowROOTVersions() { }
virtual void ShutdownSession(Int_t id) { DetachSession(id,"S"); } virtual void ShutdownSession(Int_t id) { DetachSession(id,"S"); }
virtual void ShutdownSession(TProof *p); virtual void ShutdownSession(TProof *p) { DetachSession(p,"S"); }
static TList *GetListOfManagers(); static TList *GetListOfManagers();
static void SetTXProofMgrHook(TProofMgr_t pmh); static void SetTXProofMgrHook(TProofMgr_t pmh);
static TProofMgr *Create(const char *url, Int_t loglevel = -1, static TProofMgr *Create(const char *url, Int_t loglevel = -1,
const char *alias = 0, Bool_t xpd = kTRU E); const char *alias = 0, Bool_t xpd = kTRU E);
ClassDef(TProofMgr,0) // Abstract PROOF manager interface ClassDef(TProofMgr,0) // Abstract PROOF manager interface
}; };
 End of changes. 6 change blocks. 
3 lines changed or deleted 6 lines changed or added


 TProofProgressDialog.h   TProofProgressDialog.h 
// @(#)root/sessionviewer:$Id: TProofProgressDialog.h 25072 2008-08-06 09:2 6:41Z ganis $ // @(#)root/sessionviewer:$Id: TProofProgressDialog.h 28370 2009-04-28 06:4 3:41Z ganis $
// Author: Fons Rademakers 21/03/03 // Author: Fons Rademakers 21/03/03
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2003, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2003, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 56 skipping to change at line 56
friend class TProofProgressMemoryPlot; friend class TProofProgressMemoryPlot;
private: private:
enum EQueryStatus { kRunning = 0, kDone, kStopped, kAborted, kIncomplete }; enum EQueryStatus { kRunning = 0, kDone, kStopped, kAborted, kIncomplete };
TGTransientFrame *fDialog; // transient frame, main dialog window TGTransientFrame *fDialog; // transient frame, main dialog window
TGProgressBar *fBar; // progress bar TGProgressBar *fBar; // progress bar
TGTextButton *fClose; TGTextButton *fClose;
TGTextButton *fStop; TGTextButton *fStop;
TGTextButton *fAbort; TGTextButton *fAbort;
TGTextButton *fAsyn;
TGTextButton *fLog; TGTextButton *fLog;
TGTextButton *fRatePlot; TGTextButton *fRatePlot;
TGTextButton *fMemPlot; TGTextButton *fMemPlot;
TGCheckButton *fKeepToggle; TGCheckButton *fKeepToggle;
TGCheckButton *fLogQueryToggle; TGCheckButton *fLogQueryToggle;
TGTextBuffer *fTextQuery; TGTextBuffer *fTextQuery;
TGTextEntry *fEntry; TGTextEntry *fEntry;
TGLabel *fTitleLab; TGLabel *fTitleLab;
TGLabel *fFilesEvents; TGLabel *fFilesEvents;
TGLabel *fProcessed; TGLabel *fProcessed;
skipping to change at line 106 skipping to change at line 107
public: public:
TProofProgressDialog(TProof *proof, const char *selector, TProofProgressDialog(TProof *proof, const char *selector,
Int_t files, Long64_t first, Long64_t entries); Int_t files, Long64_t first, Long64_t entries);
virtual ~TProofProgressDialog(); virtual ~TProofProgressDialog();
void ResetProgressDialog(const char *sel, Int_t sz, Long64_t fst, Long64 _t ent); void ResetProgressDialog(const char *sel, Int_t sz, Long64_t fst, Long64 _t ent);
void Progress(Long64_t total, Long64_t processed); void Progress(Long64_t total, Long64_t processed);
void Progress(Long64_t total, Long64_t processed, Long64_t bytesread, void Progress(Long64_t total, Long64_t processed, Long64_t bytesread,
Float_t initTime, Float_t procTime, Float_t initTime, Float_t procTime,
Float_t evtrti, Float_t mbrti); Float_t evtrti, Float_t mbrti);
void DisableAsyn();
void IndicateStop(Bool_t aborted); void IndicateStop(Bool_t aborted);
void LogMessage(const char *msg, Bool_t all); void LogMessage(const char *msg, Bool_t all);
void CloseWindow(); void CloseWindow();
void DoClose(); void DoClose();
void DoLog(); void DoLog();
void DoKeep(Bool_t on); void DoKeep(Bool_t on);
void DoSetLogQuery(Bool_t on); void DoSetLogQuery(Bool_t on);
void DoStop(); void DoStop();
void DoAbort(); void DoAbort();
void DoAsyn();
void DoPlotRateGraph(); void DoPlotRateGraph();
void DoMemoryPlot(); void DoMemoryPlot();
ClassDef(TProofProgressDialog,0) //PROOF progress dialog ClassDef(TProofProgressDialog,0) //PROOF progress dialog
}; };
#endif #endif
 End of changes. 4 change blocks. 
1 lines changed or deleted 4 lines changed or added


 TProofProgressLog.h   TProofProgressLog.h 
// @(#)root/sessionviewer:$Id: TProofProgressLog.h 26823 2008-12-11 09:26:3 2Z ganis $ // @(#)root/sessionviewer:$Id: TProofProgressLog.h 28813 2009-06-04 15:10:4 9Z rdm $
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2005, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2005, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
#ifndef ROOT_TProofProgressLog #ifndef ROOT_TProofProgressLog
#define ROOT_TProofProgressLog #define ROOT_TProofProgressLog
skipping to change at line 26 skipping to change at line 26
// // // //
// Dialog used to display Proof session logs from the Proof progress // // Dialog used to display Proof session logs from the Proof progress //
// dialog. // // dialog. //
// It uses TProofMgr::GetSessionLogs() mechanism internally // // It uses TProofMgr::GetSessionLogs() mechanism internally //
// // // //
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
#ifndef ROOT_TGFrame #ifndef ROOT_TGFrame
#include "TGFrame.h" #include "TGFrame.h"
#endif #endif
#ifndef ROOT_TString
#include "TString.h"
#endif
class TGTextView; class TGTextView;
class TGTextButton; class TGTextButton;
class TProofProgressDialog; class TProofProgressDialog;
class TProofLog; class TProofLog;
class TGTextEntry; class TGTextEntry;
class TGNumberEntry; class TGNumberEntry;
class TGListBox; class TGListBox;
class TGSplitButton; class TGSplitButton;
class TGVerticalFrame;
class TProofProgressLog : public TGTransientFrame { class TProofProgressLog : public TGTransientFrame {
private: private:
enum ETextType { kRaw = 0, kStd = 1, kGrep = 2 }; enum ETextType { kRaw = 0, kStd = 1, kGrep = 2 };
TString fSessionUrl;
Int_t fSessionIdx;
TGTextView *fText; // text widget TGTextView *fText; // text widget
TGTextButton *fClose; // close button TGTextButton *fClose; // close button
TGListBox *fLogList; // list of workers TGListBox *fLogList; // list of workers
TGTextButton *fLogNew; // display logs button TGTextButton *fLogNew; // display logs button
TProofProgressDialog *fDialog; // owner dialog TProofProgressDialog *fDialog; // owner dialog
TProofLog *fProofLog; // the log TProofLog *fProofLog; // the log
TGNumberEntry *fLinesFrom; // starting line TGNumberEntry *fLinesFrom; // starting line
TGNumberEntry *fLinesTo; // ending line TGNumberEntry *fLinesTo; // ending line
TGTextEntry *fGrepText; // text to grep for in the logs TGTextEntry *fGrepText; // text to grep for in the logs
TGTextEntry *fUrlText; // url to connect to
TGNumberEntry *fSessNum; // relative index of the session to ge
t
TGTextEntry *fFileName; // file to save to TGTextEntry *fFileName; // file to save to
TGTextButton *fSave; // save button TGTextButton *fSave; // save button
TGTextButton *fGrepButton; //grep button TGTextButton *fGrepButton; //grep button
TGTextButton *fUrlButton; //rebuild button
TGCheckButton *fAllLines; // display all lines button TGCheckButton *fAllLines; // display all lines button
TGCheckButton *fRawLines; // display raw lines button TGCheckButton *fRawLines; // display raw lines button
TGSplitButton *fAllWorkers; // display all workers button TGSplitButton *fAllWorkers; // display all workers button
TGVerticalFrame *fVworkers; // Vertical frame
Bool_t fFullText; // 0 - when grep was called Bool_t fFullText; // 0 - when grep was called
Int_t fTextType; // Type of retrieval Int_t fTextType; // Type of retrieval
void Init(Int_t w = 700, Int_t h = 300);
public: public:
TProofProgressLog(TProofProgressDialog *d, Int_t w = 700, Int_t h = 300) ; TProofProgressLog(TProofProgressDialog *d, Int_t w = 700, Int_t h = 300) ;
TProofProgressLog(const char *url = 0, Int_t sessionidx = 0, Int_t w = 7 00, Int_t h = 300);
virtual ~TProofProgressLog(); virtual ~TProofProgressLog();
TGListBox* BuildLogList(TGFrame *parent); void BuildLogList(Bool_t create = kFALSE);
void DoLog(Bool_t grep=kFALSE); void DoLog(Bool_t grep=kFALSE);
void LogMessage(const char *msg, Bool_t all); void LogMessage(const char *msg, Bool_t all);
void Rebuild();
void LoadBuffer(const char *buffer); void LoadBuffer(const char *buffer);
void AddBuffer(const char *buffer); void AddBuffer(const char *buffer);
void LoadFile(const char *file); void LoadFile(const char *file);
void Clear(Option_t * = 0); void Clear(Option_t * = 0);
void Popup(); void Popup();
void SaveToFile(); void SaveToFile();
void NoLineEntry(); void NoLineEntry();
void Select(Int_t id); void Select(Int_t id, Bool_t all = kTRUE);
void SetUrl(const char *url) { fSessionUrl = url; }
// slots // slots
void CloseWindow(); void CloseWindow();
ClassDef(TProofProgressLog,0) //Class implementing a log graphic box ClassDef(TProofProgressLog,0) //Class implementing a log graphic box
}; };
#endif #endif
 End of changes. 11 change blocks. 
5 lines changed or deleted 23 lines changed or added


 TProofProgressMemoryPlot.h   TProofProgressMemoryPlot.h 
// @(#)root/sessionviewer:$Id: TProofProgressMemoryPlot.h 25845 2008-10-16 12:51:46Z rdm $ // @(#)root/sessionviewer:$Id: TProofProgressMemoryPlot.h 28564 2009-05-12 11:00:21Z ganis $
// Author: Anna Kreshuk 18/07/2008 // Author: Anna Kreshuk 18/07/2008
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2003, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2003, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 60 skipping to change at line 60
TMultiGraph *fWPlot; TMultiGraph *fWPlot;
TMultiGraph *fMPlot; TMultiGraph *fMPlot;
TMultiGraph *fAPlot; TMultiGraph *fAPlot;
Bool_t fFullLogs; Bool_t fFullLogs;
TGListBox* BuildLogList(TGFrame *parent); TGListBox* BuildLogList(TGFrame *parent);
TGraph* DoWorkerPlot(TProofLogElem *ple); TGraph* DoWorkerPlot(TProofLogElem *ple);
TGraph* DoMasterPlot(TProofLogElem *ple); TGraph* DoMasterPlot(TProofLogElem *ple);
TGraph* DoAveragePlot(Int_t &max_el, Int_t &min_el); TGraph* DoAveragePlot(Int_t &max_el, Int_t &min_el);
TGraph* DoAveragePlotOld(Int_t &max_el, Int_t &min_el); TGraph* DoAveragePlotOld(Int_t &max_el, Int_t &min_el);
Int_t ParseLine(TString l, Long64_t &v, Long64_t &r, Long64_t &e);
public: public:
TProofProgressMemoryPlot(TProofProgressDialog *d, Int_t w = 700, Int_t h = 300); TProofProgressMemoryPlot(TProofProgressDialog *d, Int_t w = 700, Int_t h = 300);
virtual ~TProofProgressMemoryPlot(); virtual ~TProofProgressMemoryPlot();
void Clear(Option_t * = 0); void Clear(Option_t * = 0);
void DoPlot(); void DoPlot();
void Select(Int_t id); void Select(Int_t id);
ClassDef(TProofProgressMemoryPlot,0) //PROOF progress memory plots ClassDef(TProofProgressMemoryPlot,0) //PROOF progress memory plots
}; };
 End of changes. 2 change blocks. 
1 lines changed or deleted 4 lines changed or added


 TProofServ.h   TProofServ.h 
// @(#)root/proof:$Id: TProofServ.h 27034 2008-12-19 15:30:06Z ganis $ // @(#)root/proof:$Id: TProofServ.h 29133 2009-06-22 12:28:50Z brun $
// Author: Fons Rademakers 16/02/97 // Author: Fons Rademakers 16/02/97
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 55 skipping to change at line 55
class TDSet; class TDSet;
class TProof; class TProof;
class TVirtualProofPlayer; class TVirtualProofPlayer;
class TProofLockPath; class TProofLockPath;
class TQueryResultManager; class TQueryResultManager;
class TSocket; class TSocket;
class THashList; class THashList;
class TList; class TList;
class TDSetElement; class TDSetElement;
class TMessage; class TMessage;
class TTimer; class TShutdownTimer;
class TReaperTimer; class TReaperTimer;
class TMutex; class TMutex;
class TFileCollection; class TFileCollection;
class TProofDataSetManager; class TDataSetManager;
class TFileHandler; class TFileHandler;
// Hook to external function setting up authentication related stuff // Hook to external function setting up authentication related stuff
// for old versions. // for old versions.
// For backward compatibility // For backward compatibility
typedef Int_t (*OldProofServAuthSetup_t)(TSocket *, Bool_t, Int_t, typedef Int_t (*OldProofServAuthSetup_t)(TSocket *, Bool_t, Int_t,
TString &, TString &, TString &); TString &, TString &, TString &);
class TProofServ : public TApplication { class TProofServ : public TApplication {
skipping to change at line 131 skipping to change at line 131
TList *fWaitingQueries; //list of TProofQueryResult waiting to be processed TList *fWaitingQueries; //list of TProofQueryResult waiting to be processed
Bool_t fIdle; //TRUE if idle Bool_t fIdle; //TRUE if idle
TList *fQueuedMsg; //list of messages waiting to be proces sed TList *fQueuedMsg; //list of messages waiting to be proces sed
TString fPrefix; //Prefix identifying the node TString fPrefix; //Prefix identifying the node
Bool_t fRealTimeLog; //TRUE if log messages should be send b ack in real-time Bool_t fRealTimeLog; //TRUE if log messages should be send b ack in real-time
TTimer *fShutdownTimer; // Timer used to shutdown out-of-contro TShutdownTimer *fShutdownTimer; // Timer used to shutdown out-of-contro
l sessions l sessions
TReaperTimer *fReaperTimer; // Timer used to control children state TReaperTimer *fReaperTimer; // Timer used to control children state
Int_t fInflateFactor; // Factor in 1/1000 to inflate the CPU time Int_t fInflateFactor; // Factor in 1/1000 to inflate the CPU time
TProofDataSetManager* fDataSetManager; // dataset manager Int_t fCompressMsg; // Compression level for messages
TDataSetManager* fDataSetManager; // dataset manager
Bool_t fLogToSysLog; //true if logs should be sent to syslog too Bool_t fLogToSysLog; //true if logs should be sent to syslog too
Bool_t fSendLogToMaster; // On workers, controls logs sending to master Bool_t fSendLogToMaster; // On workers, controls logs sending to master
// Quotas (-1 to disable) // Quotas (-1 to disable)
Int_t fMaxQueries; //Max number of queries fully kept Int_t fMaxQueries; //Max number of queries fully kept
Long64_t fMaxBoxSize; //Max size of the sandbox Long64_t fMaxBoxSize; //Max size of the sandbox
Long64_t fHWMBoxSize; //High-Water-Mark on the sandbox size Long64_t fHWMBoxSize; //High-Water-Mark on the sandbox size
// Memory limits (-1 to disable) set by envs ROOTPROOFASSOFT and RPPTPRO FOASHARD // Memory limits (-1 to disable) set by envs ROOTPROOFASSOFT and RPPTPRO FOASHARD
Long_t fVirtMemHWM; //Above this we terminate gently (in kB ) Long_t fVirtMemHWM; //Above this we terminate gently (in kB )
Long_t fVirtMemMax; //Hard limit enforced by the system (in kB) Long_t fVirtMemMax; //Hard limit enforced by the system (in kB)
// In bytes; default is 1MB
Long64_t fMsgSizeHWM; //High-Water-Mark on the size of messag
es with results
static FILE *fgErrorHandlerFile; // File where to log static FILE *fgErrorHandlerFile; // File where to log
static Int_t fgRecursive; // Keep track of recursive inputs durin g processing static Int_t fgRecursive; // Keep track of recursive inputs durin g processing
void RedirectOutput(const char *dir = 0, const char *mode = "w" ); void RedirectOutput(const char *dir = 0, const char *mode = "w" );
Int_t CatMotd(); Int_t CatMotd();
Int_t UnloadPackage(const char *package); Int_t UnloadPackage(const char *package);
Int_t UnloadPackages(); Int_t UnloadPackages();
Int_t OldAuthSetup(TString &wconf); Int_t OldAuthSetup(TString &wconf);
Int_t GetPriority(); Int_t GetPriority();
// Query handlers // Query handlers
TProofQueryResult *MakeQueryResult(Long64_t nentries, const char *opt, TProofQueryResult *MakeQueryResult(Long64_t nentries, const char *opt,
TList *inl, Long64_t first, TDSet *ds et, TList *inl, Long64_t first, TDSet *ds et,
const char *selec, TObject *elist); const char *selec, TObject *elist);
void SetQueryRunning(TProofQueryResult *pq); void SetQueryRunning(TProofQueryResult *pq);
// Results handling
void SendResults(TSocket *sock, TList *outlist = 0, TQueryResul
t *pq = 0);
protected: protected:
virtual void HandleArchive(TMessage *mess); virtual void HandleArchive(TMessage *mess);
virtual Int_t HandleCache(TMessage *mess); virtual Int_t HandleCache(TMessage *mess);
virtual void HandleCheckFile(TMessage *mess); virtual void HandleCheckFile(TMessage *mess);
virtual Int_t HandleDataSets(TMessage *mess); virtual Int_t HandleDataSets(TMessage *mess);
virtual void HandleFork(TMessage *mess); virtual void HandleFork(TMessage *mess);
virtual void HandleLibIncPath(TMessage *mess); virtual void HandleLibIncPath(TMessage *mess);
virtual void HandleProcess(TMessage *mess); virtual void HandleProcess(TMessage *mess);
virtual void HandleQueryList(TMessage *mess); virtual void HandleQueryList(TMessage *mess);
virtual void HandleRemove(TMessage *mess); virtual void HandleRemove(TMessage *mess);
skipping to change at line 219 skipping to change at line 227
TSocket *GetSocket() const { return fSocket; } TSocket *GetSocket() const { return fSocket; }
Float_t GetRealTime() const { return fRealTime; } Float_t GetRealTime() const { return fRealTime; }
Float_t GetCpuTime() const { return fCpuTime; } Float_t GetCpuTime() const { return fCpuTime; }
void GetOptions(Int_t *argc, char **argv); void GetOptions(Int_t *argc, char **argv);
TList *GetEnabledPackages() const { return fEnabledPackages; } TList *GetEnabledPackages() const { return fEnabledPackages; }
Int_t GetInflateFactor() const { return fInflateFactor; } Int_t GetInflateFactor() const { return fInflateFactor; }
Long_t GetVirtMemHWM() const { return fVirtMemHWM; } Long_t GetVirtMemHWM() const { return fVirtMemHWM; }
Long64_t GetMsgSizeHWM() const { return fMsgSizeHWM; }
const char *GetPrefix() const { return fPrefix; } const char *GetPrefix() const { return fPrefix; }
void FlushLogFile(); void FlushLogFile();
Int_t CopyFromCache(const char *name, Bool_t cpbin); Int_t CopyFromCache(const char *name, Bool_t cpbin);
Int_t CopyToCache(const char *name, Int_t opt = 0); Int_t CopyToCache(const char *name, Int_t opt = 0);
virtual EQueryAction GetWorkers(TList *workers, Int_t &prioritychange, virtual EQueryAction GetWorkers(TList *workers, Int_t &prioritychange,
Bool_t resume = kFALSE); Bool_t resume = kFALSE);
virtual void HandleException(Int_t sig); virtual void HandleException(Int_t sig);
 End of changes. 8 change blocks. 
7 lines changed or deleted 19 lines changed or added


 TQtBrush.h   TQtBrush.h 
// @(#)root/qt:$Id: TQtBrush.h 28205 2009-04-14 19:38:00Z brun $ // @(#)root/qt:$Id: TQtBrush.h 28837 2009-06-05 16:16:58Z brun $
// Author: Valeri Fine 21/01/2002 // Author: Valeri Fine 21/01/2002
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. *
* Copyright (C) 2002 by Valeri Fine. * * Copyright (C) 2002 by Valeri Fine. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 33 skipping to change at line 33
class QPixmap; class QPixmap;
#endif #endif
#include "Rtypes.h" #include "Rtypes.h"
// //
// TQtBrush creates the QBrush Qt object based on the ROOT "fill" attrib utes // TQtBrush creates the QBrush Qt object based on the ROOT "fill" attrib utes
// //
class TQtBrush : public QBrush class TQtBrush : public QBrush
{ {
protected: protected:
QColor fBackground; QColor fBackground;
int fStyle; int fStyle;
int fFasi; int fFasi;
// Reset the brush color to take in account the new transperency if neede int fAlpha; // transparency
d void SetColorOwn();
void ResetColor(){ SetColor(fBackground); }
public: public:
TQtBrush(); TQtBrush();
TQtBrush(const TQtBrush &src):QBrush(src) TQtBrush(const TQtBrush &src):QBrush(src)
{ {
fBackground=src.fBackground; fBackground=src.fBackground;
fStyle=src.fStyle; fStyle=src.fStyle;
fFasi=src.fFasi; fFasi=src.fFasi;
} }
virtual ~TQtBrush(){;} virtual ~TQtBrush(){;}
Bool_t IsTransparent() const; Bool_t IsTransparent() const;
void SetStyle(int newStyle=1000){ SetStyle(newStyle/1000,newStyle%1000) void SetStyle(int newStyle=1000){ if (newStyle < 0) fStyle = fFasi = -1;
; }; else SetStyle(newStyle/1000,newStyle%
1000);
};
void SetStyle(int style, int fasi); void SetStyle(int style, int fasi);
void SetColor(const QColor &color); void SetColor(const QColor &qtcolor);
void SetColor(Color_t cindex);
const QColor &GetColor() const { return fBackground;} const QColor &GetColor() const { return fBackground;}
int GetStyle() const { return 1000*fStyle + fFasi; } int GetStyle() const { return 1000*fStyle + fFasi; }
ClassDef(TQtBrush,0); // create QBrush object based on the ROOT "fill" a ttributes ClassDef(TQtBrush,0); // create QBrush object based on the ROOT "fill" a ttributes
}; };
inline Bool_t TQtBrush::IsTransparent() const inline Bool_t TQtBrush::IsTransparent() const
{ return fStyle >= 4000 && fStyle <= 4100 ? kTRUE : kFALSE; } { return fStyle >= 4000 && fStyle <= 4100 ? kTRUE : kFALSE; }
#endif #endif
 End of changes. 4 change blocks. 
10 lines changed or deleted 12 lines changed or added


 TQtWidget.h   TQtWidget.h 
// @(#)root/qt:$Id: TQtWidget.h 28205 2009-04-14 19:38:00Z brun $ // @(#)root/qt:$Id: TQtWidget.h 28862 2009-06-09 18:56:02Z brun $
// Author: Valeri Fine 21/01/2002 // Author: Valeri Fine 21/01/2002
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. *
* Copyright (C) 2003 by Valeri Fine. * * Copyright (C) 2003 by Valeri Fine. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 36 skipping to change at line 36
# include <QMouseEvent> # include <QMouseEvent>
# include <QCustomEvent> # include <QCustomEvent>
# include <QShowEvent> # include <QShowEvent>
# include <QFocusEvent> # include <QFocusEvent>
# include <QKeyEvent> # include <QKeyEvent>
# include <QResizeEvent> # include <QResizeEvent>
# include <QEvent> # include <QEvent>
# include <QPaintEvent> # include <QPaintEvent>
# include <QPaintDevice> # include <QPaintDevice>
# include <QSize> # include <QSize>
# include <QPoint>
# endif # endif
# include <qpixmap.h> # include <qpixmap.h>
#else #else
// List of the fake classes to the fake RootCint happy. // List of the fake classes to the fake RootCint happy.
class QWidget; class QWidget;
class QPixmap; class QPixmap;
class QMouseEvent; class QMouseEvent;
class QFocusEvent; class QFocusEvent;
class QCustomEvent; class QCustomEvent;
class QKeyEvent; class QKeyEvent;
class QShowEvent; class QShowEvent;
class QPaintEvent; class QPaintEvent;
class QPaintDevice; class QPaintDevice;
class QResizeEvent; class QResizeEvent;
class QSize; class QSize;
class QString; class QString;
class QEvent; class QEvent;
class QSizePolicy; class QSizePolicy;
class QContextMenuEvent; class QContextMenuEvent;
class QSize; class QSize;
class QPoint;
#endif #endif
class TApplication; class TApplication;
// //
// TQtWidget is a custom QWidget to back ROOT TCanvas. // TQtWidget is a custom QWidget to back ROOT TCanvas.
// //
// It can be used within Qt-based program and with Qt Designer as a "regula r" // It can be used within Qt-based program and with Qt Designer as a "regula r"
// Qt QWidget to create the Qt widget wihe builtin TCanvas' // Qt QWidget to create the Qt widget wihe builtin TCanvas'
// //
enum EEventTrackingBits { enum EEventTrackingBits {
kMousePressEvent = BIT(0), // emit signal as soon as TCanvas p rocessed mousePressEvent QMouseEvent kMousePressEvent = BIT(0), // emit signal as soon as TCanvas p rocessed mousePressEvent QMouseEvent
skipping to change at line 134 skipping to change at line 136
#endif #endif
virtual ~TQtWidget(); virtual ~TQtWidget();
void SetCanvas(TCanvas *c); void SetCanvas(TCanvas *c);
// inline TCanvas *GetCanvas() const { return fCanvas;} // inline TCanvas *GetCanvas() const { return fCanvas;}
TCanvas *GetCanvas() const; TCanvas *GetCanvas() const;
TQtWidgetBuffer &SetBuffer(); TQtWidgetBuffer &SetBuffer();
const TQtWidgetBuffer *GetBuffer() const; const TQtWidgetBuffer *GetBuffer() const;
QPixmap *GetOffScreenBuffer() const; QPixmap *GetOffScreenBuffer() const;
// overloaded methods // overloaded methods
void Resize (int w, int h);
void Resize (const QSize &size);
virtual void Erase (); virtual void Erase ();
bool IsDoubleBuffered() const { return fDoubleBufferOn; } bool IsDoubleBuffered() const { return fDoubleBufferOn; }
void SetDoubleBuffer(bool on=TRUE); void SetDoubleBuffer(bool on=TRUE);
virtual void SetSaveFormat(const char *format); virtual void SetSaveFormat(const char *format);
protected: protected:
friend class TGQt; friend class TGQt;
friend class TQtFeedBackWidget;
TCanvas *fCanvas; TCanvas *fCanvas;
TQtWidgetBuffer *fPixmapID; // Double buffer of this widget TQtWidgetBuffer *fPixmapID; // Double buffer of this widget
TQtWidgetBuffer *fPixmapScreen; // Double buffer for no-double buffer operation TQtWidgetBuffer *fPixmapScreen; // Double buffer for no-double buffer operation
bool fPaint; bool fPaint;
bool fSizeChanged; bool fSizeChanged;
bool fDoubleBufferOn; bool fDoubleBufferOn;
bool fEmbedded; bool fEmbedded;
QSize fSizeHint; QSize fSizeHint;
QWidget *fWrapper; QWidget *fWrapper;
QString fSaveFormat; QString fSaveFormat;
bool fInsidePaintEvent; bool fInsidePaintEvent;
QPoint fOldMousePos;
int fIgnoreLeaveEnter;
void SetRootID(QWidget *wrapper); void SetRootID(QWidget *wrapper);
QWidget *GetRootID() const; QWidget *GetRootID() const;
virtual void EmitCanvasPainted() { emit CanvasPainted(); } virtual void EmitCanvasPainted() { emit CanvasPainted(); }
TCanvas *Canvas(); TCanvas *Canvas();
bool paintFlag(bool mode=TRUE); bool paintFlag(bool mode=TRUE);
void AdjustBufferSize(); void AdjustBufferSize();
bool PaintingActive () const; bool PaintingActive () const;
void SetIgnoreLeaveEnter(int ignore=1);
virtual void enterEvent ( QEvent * ); virtual void enterEvent ( QEvent * );
#if (QT_VERSION > 0x039999) #if (QT_VERSION > 0x039999)
virtual void customEvent ( QEvent * ); virtual void customEvent ( QEvent * );
#else #else
virtual void customEvent ( QCustomEvent *); virtual void customEvent ( QCustomEvent *);
#endif #endif
virtual void contextMenuEvent ( QContextMenuEvent *); virtual void contextMenuEvent ( QContextMenuEvent *);
virtual void focusInEvent ( QFocusEvent * ); virtual void focusInEvent ( QFocusEvent * );
virtual void focusOutEvent ( QFocusEvent * ); virtual void focusOutEvent ( QFocusEvent * );
skipping to change at line 247 skipping to change at line 251
virtual bool Save(const char *fileName,const char *format,int quality =60) const; virtual bool Save(const char *fileName,const char *format,int quality =60) const;
#ifndef __CINT__ #ifndef __CINT__
signals: signals:
// emit the Qt signal when the double buffer of the TCamvas has been fil led up // emit the Qt signal when the double buffer of the TCamvas has been fil led up
void CanvasPainted(); // Signal the TCanvas has been painted onto the s creen void CanvasPainted(); // Signal the TCanvas has been painted onto the s creen
void Saved(bool ok); // Signal the TCanvas has been saved into the fil e void Saved(bool ok); // Signal the TCanvas has been saved into the fil e
void RootEventProcessed(TObject *selected, unsigned int event, TCanvas * c); void RootEventProcessed(TObject *selected, unsigned int event, TCanvas * c);
#endif #endif
#ifndef Q_MOC_RUN #ifndef Q_MOC_RUN
//MOC_SKIP_BEGIN
ClassDef(TQtWidget,0) // QWidget to back ROOT TCanvas (Can be used with Qt designer) ClassDef(TQtWidget,0) // QWidget to back ROOT TCanvas (Can be used with Qt designer)
//MOC_SKIP_END
#endif #endif
}; };
//_________________________________________________________________________ _____ //_________________________________________________________________________ _____
inline TCanvas *TQtWidget::GetCanvas() const { return fCanvas; } inline TCanvas *TQtWidget::GetCanvas() const { return fCanvas; }
//_________________________________________________________________________ _____ //_________________________________________________________________________ _____
inline const TQtWidgetBuffer *TQtWidget::GetBuffer() const { inline const TQtWidgetBuffer *TQtWidget::GetBuffer() const {
// return the current widget buffer; // return the current widget buffer;
return IsDoubleBuffered() ? fPixmapScreen : fPixmapID; return IsDoubleBuffered() ? fPixmapScreen : fPixmapID;
skipping to change at line 304 skipping to change at line 306
inline void TQtWidget::SetBit(UInt_t f) { fBits |= f & kBitMask; } inline void TQtWidget::SetBit(UInt_t f) { fBits |= f & kBitMask; }
inline void TQtWidget::ResetBit(UInt_t f) { fBits &= ~(f & kBitMask ); } inline void TQtWidget::ResetBit(UInt_t f) { fBits &= ~(f & kBitMask ); }
inline Bool_t TQtWidget::TestBit(UInt_t f) const { return (Bool_t) ((fBits & f) != 0); } inline Bool_t TQtWidget::TestBit(UInt_t f) const { return (Bool_t) ((fBits & f) != 0); }
inline Int_t TQtWidget::TestBits(UInt_t f) const { return (Int_t) (fBits & f); } inline Int_t TQtWidget::TestBits(UInt_t f) const { return (Int_t) (fBits & f); }
inline void TQtWidget::InvertBit(UInt_t f) { fBits ^= f & kBitMask; } inline void TQtWidget::InvertBit(UInt_t f) { fBits ^= f & kBitMask; }
inline void TQtWidget::EnableSignalEvents (UInt_t f){ SetBit (f); } inline void TQtWidget::EnableSignalEvents (UInt_t f){ SetBit (f); }
inline void TQtWidget::DisableSignalEvents (UInt_t f){ ResetBit(f); } inline void TQtWidget::DisableSignalEvents (UInt_t f){ ResetBit(f); }
inline Bool_t TQtWidget::IsSignalEventEnabled(UInt_t f) const { return Test Bit (f); } inline Bool_t TQtWidget::IsSignalEventEnabled(UInt_t f) const { return Test Bit (f); }
inline void TQtWidget::EmitSignal(UInt_t f) {if (IsSignalEventEnabled(f) ) EmitTestedSignal();} inline void TQtWidget::EmitSignal(UInt_t f) {if (IsSignalEventEnabled(f) ) EmitTestedSignal();}
inline void TQtWidget::SetIgnoreLeaveEnter(int ignore) { fIgnoreLeaveEnte r = ignore; }
#endif #endif
 End of changes. 10 change blocks. 
5 lines changed or deleted 8 lines changed or added


 TRecorder.h   TRecorder.h 
// @(#)root/gui:$Id: TRecorder.h 27723 2009-03-09 13:43:34Z bellenot $ // @(#)root/gui:$Id: TRecorder.h 29094 2009-06-19 10:02:24Z bellenot $
// Author: Katerina Opocenska 11/09/2008 // Author: Katerina Opocenska 11/09/2008
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2008, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2008, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 32 skipping to change at line 32
// Recorded events are: // // Recorded events are: //
// - Commands typed by user in commandline ('new TCanvas') // // - Commands typed by user in commandline ('new TCanvas') //
// - GUI events (mouse movement, button clicks, ...) // // - GUI events (mouse movement, button clicks, ...) //
// // // //
// All the recorded events from one session are stored in one TFile // // All the recorded events from one session are stored in one TFile //
// and can be replayed again anytime. // // and can be replayed again anytime. //
// // // //
// Recording // // Recording //
// ================================================================== // // ================================================================== //
// // // //
// 1] Start recording // // 1] To start recording //
// // // //
// TRecorder r(const char *filename, "NEW") // // TRecorder r(const char *filename, "NEW") //
// TRecorder r(const char *filename, "RECREATE") // // TRecorder r(const char *filename, "RECREATE") //
// // // //
// or: // // or: //
// // // //
// TRecorder::Start(const char *filename, ...) // // TRecorder *recorder = new TRecorder; //
// recorder->Start(const char *filename, ...) //
// // // //
// -filename Name of ROOT file in which to save // // -filename Name of ROOT file in which to save //
// recorded events. // // recorded events. //
// // // //
// 2] Stop recording // // 2] To stop recording //
// // // //
// TEventRecodrer::Stop() // // recorder->Stop() //
// // // //
// // // //
// IMPORTANT: // // IMPORTANT: //
// State capturing is part of recording. It means that if you want to // // State capturing is part of recording. It means that if you want to //
// record events for some object (window), creation of this object // // record events for some object (window), creation of this object //
// must be also recorded. // // must be also recorded. //
// // // //
// Example: // // Example: //
// -------- // // -------- //
// t = new TRecorder(); // Create a new recorder // // t = new TRecorder(); // Create a new recorder //
skipping to change at line 73 skipping to change at line 74
// // // //
// It is strongly recommended to start recording with empty ROOT // // It is strongly recommended to start recording with empty ROOT //
// environment, at least with no previously created ROOT GUI. // // environment, at least with no previously created ROOT GUI. //
// This ensures that only events for well known windows are stored. // // This ensures that only events for well known windows are stored. //
// Events for windows, which were not created during recording, // // Events for windows, which were not created during recording, //
// cannot be replayed. // // cannot be replayed. //
// // // //
// Replaying // // Replaying //
// =================================================================== // // =================================================================== //
// // // //
// 1] Start replaying // // 1] To start replaying //
// // // //
// TRecorder r(const char *filename) // // TRecorder r(const char *filename) //
// TRecorder r(const char *filename, "READ") // // TRecorder r(const char *filename, "READ") //
// // // //
// or: // // or: //
// // // //
// TRecorder::Replay(const char *filename, // // TRecorder *recorder = new TRecorder; //
// recorder->Replay(const char *filename, //
// Bool_t showMouseCursor = kTRUE); // // Bool_t showMouseCursor = kTRUE); //
// // // //
// -filename A name of file with recorded events // // -filename A name of file with recorded events //
// previously created with TRecorder::Start // // previously created with TRecorder::Start //
// // // //
// -showMouseCursor If kTRUE, mouse cursor is replayed as well. // // -showMouseCursor If kTRUE, mouse cursor is replayed as well. //
// In that case it is not recommended to use mouse // // In that case it is not recommended to use mouse //
// during replaying. // // during replaying. //
// // // //
// In general, it is not recommended to use mouse to change positions // // In general, it is not recommended to use mouse to change positions //
// and states of ROOT windows during replaying. // // and states of ROOT windows during replaying. //
// // // //
// IMPORTANT: // // IMPORTANT: //
// The state of ROOT environment before replaying of some events // // The state of ROOT environment before replaying of some events //
// must be exactly the same as before recording them. // // must be exactly the same as before recording them. //
// Therefore it is strongly recommended to start both recording // // Therefore it is strongly recommended to start both recording //
// and replaying with empty ROOT environment. // // and replaying with empty ROOT environment. //
// // // //
// 2] Pause replaying // // 2] To pause replaying //
// // // //
// TRecorder::Pause() // // recorder->Pause() //
// // // //
// Replaying is stopped until TRecorder::Resume() is called. // // Replaying is stopped until recorder->Resume() is called. //
// // // //
// // // //
// 3] Resume paused replaying // // 3] To resume paused replaying //
// // // //
// TRecorder::Resume() // // recorder->Resume() //
// // // //
// Resumes previously stopped replaying. // // Resumes previously stopped replaying. //
// // // //
// // // //
// 4] Stop replaying before its end // // 4] To stop replaying before its end //
// // // //
// TRecorder::Stop() // // recorder->Stop() //
// // // //
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
#ifndef ROOT_Riostream #ifndef ROOT_Riostream
#include "Riostream.h" #include "Riostream.h"
#endif #endif
#ifndef ROOT_TApplication #ifndef ROOT_TApplication
#include "TApplication.h" #include "TApplication.h"
#endif #endif
#ifndef ROOT_TError #ifndef ROOT_TError
skipping to change at line 434 skipping to change at line 436
// // // //
// PAUSED -> INACTIVE via TRecorder::ReplayStop (Stops paused // // PAUSED -> INACTIVE via TRecorder::ReplayStop (Stops paused //
// replaying) // // replaying) //
// // // //
// [TRecorderStates.JPG] // // [TRecorderStates.JPG] //
// // // //
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
class TRecorder : public TObject class TRecorder : public TObject
{ {
private: private:
TRecorderState *fRecorderState; // Current state of recorder TRecorderState *fRecorderState; //! Current state of recorder
protected: protected:
friend class TRecorderState; friend class TRecorderState;
friend class TRecorderInactive; friend class TRecorderInactive;
friend class TRecorderPaused; friend class TRecorderPaused;
friend class TRecorderRecording; friend class TRecorderRecording;
friend class TRecorderReplaying; friend class TRecorderReplaying;
TString fFilename; // Events file name
// Changes state to the new one. // Changes state to the new one.
// See class documentation for information about state changing. // See class documentation for information about state changing.
void ChangeState(TRecorderState* newstate, Bool_t deletePreviousState = kTRUE); void ChangeState(TRecorderState* newstate, Bool_t deletePreviousState = kTRUE);
public: public:
//---- Modes of replaying. Only kRealtime implemented so far //---- Modes of replaying. Only kRealtime implemented so far
enum EReplayModes { enum EReplayModes {
kRealtime kRealtime
}; };
//---- States of recorder. In every moment, recorder is in right //---- States of recorder. In every moment, recorder is in right
skipping to change at line 468 skipping to change at line 471
kReplaying kReplaying
}; };
// Creates recorder and sets its state as INACTIVE // Creates recorder and sets its state as INACTIVE
TRecorder(); TRecorder();
TRecorder(const char *filename, Option_t *option = "READ"); TRecorder(const char *filename, Option_t *option = "READ");
// Deletes recorder together with its current state // Deletes recorder together with its current state
virtual ~TRecorder(); virtual ~TRecorder();
void Browse(TBrowser *);
// Starts recording of events to the given file // Starts recording of events to the given file
void Start(const char *filename, Option_t *option = "RECREATE", Window_t *w = 0, Int_t winCount = 0); void Start(const char *filename, Option_t *option = "RECREATE", Window_t *w = 0, Int_t winCount = 0);
// Stops recording of events // Stops recording of events
void Stop(Bool_t guiCommand = kFALSE); void Stop(Bool_t guiCommand = kFALSE);
// Replays recorded events from given file // Replays recorded events from given file
Bool_t Replay(const char *filename, Bool_t showMouseCursor = kTRUE, TRec order::EReplayModes mode = kRealtime); Bool_t Replay(const char *filename, Bool_t showMouseCursor = kTRUE, TRec order::EReplayModes mode = kRealtime);
// Replays recorded events from current file
void Replay() { Replay(fFilename); } // *MENU*
// Pauses replaying // Pauses replaying
void Pause(); void Pause();
// Resumes paused replaying // Resumes paused replaying
void Resume(); void Resume();
// Stops (cancels) replaying // Stops (cancels) replaying
void ReplayStop(); void ReplayStop();
// Prints out the list of recorded commandline events // Prints out the list of recorded commandline events
skipping to change at line 498 skipping to change at line 506
// Prints out the list of recorded GUI events // Prints out the list of recorded GUI events
void ListGui(const char *filename); void ListGui(const char *filename);
// Gets current state of recorder // Gets current state of recorder
virtual TRecorder::ERecorderState GetState() const; virtual TRecorder::ERecorderState GetState() const;
// Saves all the canvases previous to the TRecorder // Saves all the canvases previous to the TRecorder
void PrevCanvases(const char *filename, Option_t *option); void PrevCanvases(const char *filename, Option_t *option);
ClassDef(TRecorder,1) // Class provides direct recorder/replayer interfa ce for a user. ClassDef(TRecorder,2) // Class provides direct recorder/replayer interfa ce for a user.
}; };
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// // // //
// TRecorderState // // TRecorderState //
// // // //
// Abstract class that defines interface for a state of recorder. // // Abstract class that defines interface for a state of recorder. //
// Inherited classes are: // // Inherited classes are: //
// - TRecorderInactive // // - TRecorderInactive //
// - TRecorderRecording // // - TRecorderRecording //
 End of changes. 19 change blocks. 
16 lines changed or deleted 24 lines changed or added


 TRootCanvas.h   TRootCanvas.h 
// @(#)root/gui:$Id: TRootCanvas.h 26760 2008-12-09 15:56:43Z brun $ // @(#)root/gui:$Id: TRootCanvas.h 28464 2009-05-06 12:37:21Z brun $
// Author: Fons Rademakers 15/01/98 // Author: Fons Rademakers 15/01/98
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 TRootEmbeddedCanvas.h   TRootEmbeddedCanvas.h 
// @(#)root/gui:$Id: TRootEmbeddedCanvas.h 23115 2008-04-10 13:35:37Z rdm $ // @(#)root/gui:$Id: TRootEmbeddedCanvas.h 28464 2009-05-06 12:37:21Z brun $
// Author: Fons Rademakers 15/07/98 // Author: Fons Rademakers 15/07/98
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 TSchemaRuleProcessor.h   TSchemaRuleProcessor.h 
// @(#)root/core:$Id: TSchemaRuleProcessor.h 25458 2008-09-19 06:10:23Z pca nal $ // @(#)root/core:$Id: TSchemaRuleProcessor.h 28845 2009-06-08 13:53:44Z rdm $
// author: Lukasz Janyst <ljanyst@cern.ch> // author: Lukasz Janyst <ljanyst@cern.ch>
#ifndef ROOT_TSchemaRuleProcessor #ifndef ROOT_TSchemaRuleProcessor
#define ROOT_TSchemaRuleProcessor #define ROOT_TSchemaRuleProcessor
#include <stdlib.h>
#include <string> #include <string>
#include <list> #include <list>
#include <utility> #include <utility>
#include <cstdlib> #include <cstdlib>
#include <iostream> #include <iostream>
#include "Rtypes.h" #include "Rtypes.h"
#if !defined(__CINT__) #if !defined(__CINT__)
// Do no clutter the dictionary (in particular with STL containers) // Do no clutter the dictionary (in particular with STL containers)
 End of changes. 2 change blocks. 
1 lines changed or deleted 2 lines changed or added


 TSpline1.h   TSpline1.h 
// @(#)root/tmva $Id: TSpline1.h 20882 2007-11-19 11:31:26Z rdm $ // @(#)root/tmva $Id: TSpline1.h 29122 2009-06-22 06:51:30Z brun $
// Author: Andreas Hoecker, Joerg Stelzer, Helge Voss, Kai Voss // Author: Andreas Hoecker, Joerg Stelzer, Helge Voss, Kai Voss
/************************************************************************** ******** /************************************************************************** ********
* Project: TMVA - a Root-integrated toolkit for multivariate data analysis * * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
* Package: TMVA * * Package: TMVA *
* Class : TSpline1 * * Class : TSpline1 *
* Web : http://tmva.sourceforge.net * * Web : http://tmva.sourceforge.net *
* * * *
* Description: * * Description: *
* Linear interpolation class; derivative of TSpline * * Linear interpolation class; derivative of TSpline *
* * * *
* Authors (alphabetical): * * Authors (alphabetical): *
* Andreas Hoecker <Andreas.Hocker@cern.ch> - CERN, Switzerland * * Andreas Hoecker <Andreas.Hocker@cern.ch> - CERN, Switzerland *
* Xavier Prudent <prudent@lapp.in2p3.fr> - LAPP, France *
* Helge Voss <Helge.Voss@cern.ch> - MPI-K Heidelberg, German y * * Helge Voss <Helge.Voss@cern.ch> - MPI-K Heidelberg, German y *
* Kai Voss <Kai.Voss@cern.ch> - U. of Victoria, Canada * * Kai Voss <Kai.Voss@cern.ch> - U. of Victoria, Canada *
* * * *
* Copyright (c) 2005: * * Copyright (c) 2005: *
* CERN, Switzerland * * CERN, Switzerland *
* U. of Victoria, Canada * * U. of Victoria, Canada *
* MPI-K Heidelberg, Germany * * MPI-K Heidelberg, Germany *
* LAPP, Annecy, France *
* * * *
* Redistribution and use in source and binary forms, with or without * * Redistribution and use in source and binary forms, with or without *
* modification, are permitted according to the terms listed in LICENSE * * modification, are permitted according to the terms listed in LICENSE *
* (http://tmva.sourceforge.net/LICENSE) * * (http://tmva.sourceforge.net/LICENSE) *
************************************************************************** ********/ ************************************************************************** ********/
#ifndef ROOT_TMVA_TSpline1 #ifndef ROOT_TMVA_TSpline1
#define ROOT_TMVA_TSpline1 #define ROOT_TMVA_TSpline1
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// // // //
// TSpline1 // // TSpline1 //
// // // //
// Linear interpolation class // // Linear interpolation class //
// // // //
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
#ifndef ROOT_TSpline
#include "TSpline.h" #include "TSpline.h"
#endif
namespace TMVA { namespace TMVA {
class TSpline1 : public TSpline { class TSpline1 : public TSpline {
public: public:
TSpline1( TString title, TGraph* theGraph ); TSpline1( const TString& title, TGraph* theGraph );
virtual ~TSpline1( void ); virtual ~TSpline1( void );
virtual Double_t Eval( Double_t x ) const; virtual Double_t Eval( Double_t x ) const;
// dummy implementations // dummy implementations
virtual void BuildCoeff( void ); virtual void BuildCoeff( void );
virtual void GetKnot( Int_t i, Double_t& x, Double_t& y ) const; virtual void GetKnot( Int_t i, Double_t& x, Double_t& y ) const;
const TGraph* GetGraph() const { return fGraph; }
private: private:
TGraph *fGraph; // graph that is splined TGraph *fGraph; // graph that is splined
ClassDef(TSpline1,0) //Linear interpolation class ClassDef(TSpline1,0) //Linear interpolation class
}; };
} // namespace TMVA } // namespace TMVA
#endif #endif
 End of changes. 7 change blocks. 
4 lines changed or deleted 6 lines changed or added


 TSpline2.h   TSpline2.h 
// @(#)root/tmva $Id: TSpline2.h 20882 2007-11-19 11:31:26Z rdm $ // @(#)root/tmva $Id: TSpline2.h 29122 2009-06-22 06:51:30Z brun $
// Author: Andreas Hoecker, Joerg Stelzer, Helge Voss, Kai Voss // Author: Andreas Hoecker, Joerg Stelzer, Helge Voss, Kai Voss
/************************************************************************** ******** /************************************************************************** ********
* Project: TMVA - a Root-integrated toolkit for multivariate data analysis * * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
* Package: TMVA * * Package: TMVA *
* Class : TSpline2 * * Class : TSpline2 *
* Web : http://tmva.sourceforge.net * * Web : http://tmva.sourceforge.net *
* * * *
* Description: * * Description: *
* Quadratic spline class; uses quadrax function for interpolation * * Quadratic spline class; uses quadrax function for interpolation *
* * * *
* Authors (alphabetical): * * Authors (alphabetical): *
* Andreas Hoecker <Andreas.Hocker@cern.ch> - CERN, Switzerland * * Andreas Hoecker <Andreas.Hocker@cern.ch> - CERN, Switzerland *
* Xavier Prudent <prudent@lapp.in2p3.fr> - LAPP, France *
* Helge Voss <Helge.Voss@cern.ch> - MPI-K Heidelberg, German y * * Helge Voss <Helge.Voss@cern.ch> - MPI-K Heidelberg, German y *
* Kai Voss <Kai.Voss@cern.ch> - U. of Victoria, Canada * * Kai Voss <Kai.Voss@cern.ch> - U. of Victoria, Canada *
* * * *
* Copyright (c) 2005: * * Copyright (c) 2005: *
* CERN, Switzerland * * CERN, Switzerland *
* U. of Victoria, Canada * * U. of Victoria, Canada *
* MPI-K Heidelberg, Germany * * MPI-K Heidelberg, Germany *
* LAPP, Annecy, France *
* * * *
* Redistribution and use in source and binary forms, with or without * * Redistribution and use in source and binary forms, with or without *
* modification, are permitted according to the terms listed in LICENSE * * modification, are permitted according to the terms listed in LICENSE *
* (http://tmva.sourceforge.net/LICENSE) * * (http://tmva.sourceforge.net/LICENSE) *
************************************************************************** ********/ ************************************************************************** ********/
#ifndef ROOT_TMVA_TSpline2 #ifndef ROOT_TMVA_TSpline2
#define ROOT_TMVA_TSpline2 #define ROOT_TMVA_TSpline2
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// // // //
// TSpline2 // // TSpline2 //
// // // //
// Quadratic interpolation class (using quadrax) // // Quadratic interpolation class (using quadrax) //
// // // //
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
#ifndef ROOT_TSpline
#include "TSpline.h" #include "TSpline.h"
#endif
namespace TMVA { namespace TMVA {
class TSpline2 : public TSpline { class TSpline2 : public TSpline {
public: public:
TSpline2( TString title, TGraph* theGraph ); TSpline2( const TString& title, TGraph* theGraph );
virtual ~TSpline2( void ); virtual ~TSpline2( void );
virtual Double_t Eval( Double_t x ) const; virtual Double_t Eval( Double_t x ) const;
// dummy implementations // dummy implementations
virtual void BuildCoeff( void ); virtual void BuildCoeff( void );
virtual void GetKnot( Int_t i, Double_t& x, Double_t& y ) const; virtual void GetKnot( Int_t i, Double_t& x, Double_t& y ) const;
private: private:
 End of changes. 6 change blocks. 
4 lines changed or deleted 4 lines changed or added


 TStreamerElement.h   TStreamerElement.h 
// @(#)root/meta:$Id: TStreamerElement.h 27938 2009-03-26 09:53:23Z pcanal $ // @(#)root/meta:$Id: TStreamerElement.h 28776 2009-06-02 15:16:39Z pcanal $
// Author: Rene Brun 12/10/2000 // Author: Rene Brun 12/10/2000
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 59 skipping to change at line 59
TMemberStreamer *fStreamer; //!pointer to element Streamer TMemberStreamer *fStreamer; //!pointer to element Streamer
TMethodCall *fMethod; //!pointer to TMethodCall TMethodCall *fMethod; //!pointer to TMethodCall
Double_t fXmin; //!Minimum of data member if a range is specified [xmin,xmax,nbits] Double_t fXmin; //!Minimum of data member if a range is specified [xmin,xmax,nbits]
Double_t fXmax; //!Maximum of data member if a range is specified [xmin,xmax,nbits] Double_t fXmax; //!Maximum of data member if a range is specified [xmin,xmax,nbits]
Double_t fFactor; //!Conversion factor if a range is sp ecified fFactor = (1<<nbits/(xmax-xmin) Double_t fFactor; //!Conversion factor if a range is sp ecified fFactor = (1<<nbits/(xmax-xmin)
public: public:
enum ESTLtype { kSTL = 300 /* TVirtualStreamerInfo::kSTL */, enum ESTLtype { kSTL = 300 /* TVirtualStreamerInfo::kSTL */,
kSTLstring = 365 /* TVirtualStreamerInfo::kSTLstring */, kSTLstring = 365 /* TVirtualStreamerInfo::kSTLstring */,
kSTLvector = 1, kSTLvector = 1,
kSTLlist = 2, kSTLdeque = 3, kSTLmap = 4, kSTLlist = 2, kSTLdeque = 3, kSTLmap = 4,
kSTLset = 5, kSTLmultimap=6, kSTLmultiset=7}; kSTLset = 5, kSTLmultimap= 6, kSTLmultiset = 7,
kSTLbitset = 8
};
// TStreamerElement status bits // TStreamerElement status bits
enum { enum {
kHasRange = BIT(6), kHasRange = BIT(6),
kCache = BIT(9), kCache = BIT(9),
kRepeat = BIT(10), kRepeat = BIT(10),
kRead = BIT(11), kRead = BIT(11),
kWrite = BIT(12), kWrite = BIT(12),
kDoNotDelete = BIT(13) kDoNotDelete = BIT(13)
}; };
 End of changes. 2 change blocks. 
4 lines changed or deleted 6 lines changed or added


 TString.h   TString.h 
// @(#)root/base:$Id: TString.h 27131 2009-01-13 16:08:04Z rdm $ // @(#)root/base:$Id: TString.h 29145 2009-06-22 15:22:22Z brun $
// Author: Fons Rademakers 04/08/95 // Author: Fons Rademakers 04/08/95
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 220 skipping to change at line 220
void Cow(); // Do copy on write as ne eded void Cow(); // Do copy on write as ne eded
void Cow(Ssiz_t nc); // Do copy on write as ne eded void Cow(Ssiz_t nc); // Do copy on write as ne eded
static Ssiz_t AdjustCapacity(Ssiz_t nc); static Ssiz_t AdjustCapacity(Ssiz_t nc);
void InitChar(char c); // Initialize from char void InitChar(char c); // Initialize from char
public: public:
enum EStripType { kLeading = 0x1, kTrailing = 0x2, kBoth = 0x3 }; enum EStripType { kLeading = 0x1, kTrailing = 0x2, kBoth = 0x3 };
enum ECaseCompare { kExact, kIgnoreCase }; enum ECaseCompare { kExact, kIgnoreCase };
TString(); // Null string TString(); // Null string
TString(Ssiz_t ic); // Suggested capacity explicit TString(Ssiz_t ic); // Suggested capacity
TString(const TString &s) : // Copy constructor TString(const TString &s) : // Copy constructor
fData(s.fData) { Pref()->AddReference(); } fData(s.fData) { Pref()->AddReference(); }
TString(const char *s); // Copy to embedded null TString(const char *s); // Copy to embedded null
TString(const char *s, Ssiz_t n); // Copy past any embedded nulls TString(const char *s, Ssiz_t n); // Copy past any embedded nulls
TString(const std::string &s); TString(const std::string &s);
TString(char c) : fData(0) { InitChar(c); } TString(char c) : fData(0) { InitChar(c); }
TString(char c, Ssiz_t s); TString(char c, Ssiz_t s);
TString(const TSubString &sub); TString(const TSubString &sub);
skipping to change at line 379 skipping to change at line 379
TString &ReplaceAll(const char *s1, Ssiz_t ls1, const char *s2, Ssiz _t ls2); // Find&Replace all s1 with s2 if any TString &ReplaceAll(const char *s1, Ssiz_t ls1, const char *s2, Ssiz _t ls2); // Find&Replace all s1 with s2 if any
void Resize(Ssiz_t n); // Truncate or add blanks as necessary void Resize(Ssiz_t n); // Truncate or add blanks as necessary
TSubString Strip(EStripType s = kTrailing, char c = ' '); TSubString Strip(EStripType s = kTrailing, char c = ' ');
TSubString Strip(EStripType s = kTrailing, char c = ' ') const; TSubString Strip(EStripType s = kTrailing, char c = ' ') const;
void ToLower(); // Change self to l ower-case void ToLower(); // Change self to l ower-case
void ToUpper(); // Change self to u pper-case void ToUpper(); // Change self to u pper-case
TObjArray *Tokenize(const TString &delim) const; TObjArray *Tokenize(const TString &delim) const;
Bool_t Tokenize(TString &tok, Ssiz_t &from, const char *delim = " ") const; Bool_t Tokenize(TString &tok, Ssiz_t &from, const char *delim = " ") const;
// Static member functions // Static member functions
static ULong_t Hash(const void *txt, Int_t ntxt); // Calculates hash index from any char string. static UInt_t Hash(const void *txt, Int_t ntxt); // Calculates hash index from any char string.
static Ssiz_t InitialCapacity(Ssiz_t ic = 15); // Initial allocati on capacity static Ssiz_t InitialCapacity(Ssiz_t ic = 15); // Initial allocati on capacity
static Ssiz_t MaxWaste(Ssiz_t mw = 15); // Max empty space before reclaim static Ssiz_t MaxWaste(Ssiz_t mw = 15); // Max empty space before reclaim
static Ssiz_t ResizeIncrement(Ssiz_t ri = 16); // Resizing increme nt static Ssiz_t ResizeIncrement(Ssiz_t ri = 16); // Resizing increme nt
static Ssiz_t GetInitialCapacity(); static Ssiz_t GetInitialCapacity();
static Ssiz_t GetResizeIncrement(); static Ssiz_t GetResizeIncrement();
static Ssiz_t GetMaxWaste(); static Ssiz_t GetMaxWaste();
static TString Format(const char *fmt, ...); static TString Format(const char *fmt, ...);
ClassDef(TString,1) //Basic string class ClassDef(TString,1) //Basic string class
}; };
 End of changes. 3 change blocks. 
3 lines changed or deleted 3 lines changed or added


 TTree.h   TTree.h 
// @(#)root/tree:$Id: TTree.h 27658 2009-02-28 05:34:57Z pcanal $ // @(#)root/tree:$Id: TTree.h 28831 2009-06-05 11:45:41Z pcanal $
// Author: Rene Brun 12/01/96 // Author: Rene Brun 12/01/96
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 315 skipping to change at line 315
virtual Int_t GetScanField() const { return fScanField; } virtual Int_t GetScanField() const { return fScanField; }
TTreeFormula *GetSelect() { return GetPlayer()->GetSelect() ; } TTreeFormula *GetSelect() { return GetPlayer()->GetSelect() ; }
virtual Long64_t GetSelectedRows() { return GetPlayer()->GetSelec tedRows(); } virtual Long64_t GetSelectedRows() { return GetPlayer()->GetSelec tedRows(); }
virtual Int_t GetTimerInterval() const { return fTimerInterval ; } virtual Int_t GetTimerInterval() const { return fTimerInterval ; }
virtual Long64_t GetTotBytes() const { return fTotBytes; } virtual Long64_t GetTotBytes() const { return fTotBytes; }
virtual TTree *GetTree() const { return const_cast<TTree*>(this ); } virtual TTree *GetTree() const { return const_cast<TTree*>(this ); }
virtual TVirtualIndex *GetTreeIndex() const { return fTreeIndex; } virtual TVirtualIndex *GetTreeIndex() const { return fTreeIndex; }
virtual Int_t GetTreeNumber() const { return 0; } virtual Int_t GetTreeNumber() const { return 0; }
virtual Int_t GetUpdate() const { return fUpdate; } virtual Int_t GetUpdate() const { return fUpdate; }
virtual TList *GetUserInfo(); virtual TList *GetUserInfo();
TTreeFormula *GetVar(Int_t i) { return GetPlayer()->GetVar(i) ; }
TTreeFormula *GetVar1() { return GetPlayer()->GetVar1(); } TTreeFormula *GetVar1() { return GetPlayer()->GetVar1(); }
TTreeFormula *GetVar2() { return GetPlayer()->GetVar2(); } TTreeFormula *GetVar2() { return GetPlayer()->GetVar2(); }
TTreeFormula *GetVar3() { return GetPlayer()->GetVar3(); } TTreeFormula *GetVar3() { return GetPlayer()->GetVar3(); }
TTreeFormula *GetVar4() { return GetPlayer()->GetVar4(); } TTreeFormula *GetVar4() { return GetPlayer()->GetVar4(); }
virtual Double_t *GetVal(Int_t i) { return GetPlayer()->GetVal(i ); }
virtual Double_t *GetV1() { return GetPlayer()->GetV1(); } virtual Double_t *GetV1() { return GetPlayer()->GetV1(); }
virtual Double_t *GetV2() { return GetPlayer()->GetV2(); } virtual Double_t *GetV2() { return GetPlayer()->GetV2(); }
virtual Double_t *GetV3() { return GetPlayer()->GetV3(); } virtual Double_t *GetV3() { return GetPlayer()->GetV3(); }
virtual Double_t *GetV4() { return GetPlayer()->GetV4(); } virtual Double_t *GetV4() { return GetPlayer()->GetV4(); }
virtual Double_t *GetW() { return GetPlayer()->GetW(); } virtual Double_t *GetW() { return GetPlayer()->GetW(); }
virtual Double_t GetWeight() const { return fWeight; } virtual Double_t GetWeight() const { return fWeight; }
virtual Long64_t GetZipBytes() const { return fZipBytes; } virtual Long64_t GetZipBytes() const { return fZipBytes; }
virtual void IncrementTotalBuffers(Int_t nbytes) { fTotalBuff ers += nbytes; } virtual void IncrementTotalBuffers(Int_t nbytes) { fTotalBuff ers += nbytes; }
Bool_t IsFolder() const { return kTRUE; } Bool_t IsFolder() const { return kTRUE; }
virtual Int_t LoadBaskets(Long64_t maxmemory = 2000000000); virtual Int_t LoadBaskets(Long64_t maxmemory = 2000000000);
skipping to change at line 353 skipping to change at line 355
#if defined(R__MANUAL_DICT) #if defined(R__MANUAL_DICT)
virtual Long64_t Process(void* selector, Option_t* option = "", L ong64_t nentries = 1000000000, Long64_t firstentry = 0); virtual Long64_t Process(void* selector, Option_t* option = "", L ong64_t nentries = 1000000000, Long64_t firstentry = 0);
#endif #endif
#else #else
virtual Long64_t Process(TSelector* selector, Option_t* option = "", Long64_t nentries = 1000000000, Long64_t firstentry = 0); virtual Long64_t Process(TSelector* selector, Option_t* option = "", Long64_t nentries = 1000000000, Long64_t firstentry = 0);
#endif #endif
virtual Long64_t Project(const char* hname, const char* varexp, c onst char* selection = "", Option_t* option = "", Long64_t nentries = 10000 00000, Long64_t firstentry = 0); virtual Long64_t Project(const char* hname, const char* varexp, c onst char* selection = "", Option_t* option = "", Long64_t nentries = 10000 00000, Long64_t firstentry = 0);
virtual TSQLResult *Query(const char* varexp = "", const char* selec tion = "", Option_t* option = "", Long64_t nentries = 1000000000, Long64_t firstentry = 0); virtual TSQLResult *Query(const char* varexp = "", const char* selec tion = "", Option_t* option = "", Long64_t nentries = 1000000000, Long64_t firstentry = 0);
virtual Long64_t ReadFile(const char* filename, const char* branc hDescriptor = ""); virtual Long64_t ReadFile(const char* filename, const char* branc hDescriptor = "");
virtual void Refresh(); virtual void Refresh();
virtual void RecursiveRemove(TObject *obj);
virtual void RemoveFriend(TTree*); virtual void RemoveFriend(TTree*);
virtual void Reset(Option_t* option = ""); virtual void Reset(Option_t* option = "");
virtual void ResetBranchAddress(TBranch *); virtual void ResetBranchAddress(TBranch *);
virtual void ResetBranchAddresses(); virtual void ResetBranchAddresses();
virtual Long64_t Scan(const char* varexp = "", const char* select ion = "", Option_t* option = "", Long64_t nentries = 1000000000, Long64_t f irstentry = 0); // *MENU* virtual Long64_t Scan(const char* varexp = "", const char* select ion = "", Option_t* option = "", Long64_t nentries = 1000000000, Long64_t f irstentry = 0); // *MENU*
virtual Bool_t SetAlias(const char* aliasName, const char* alia sFormula); virtual Bool_t SetAlias(const char* aliasName, const char* alia sFormula);
virtual void SetAutoSave(Long64_t autos = 10000000) { fAutoSa ve=autos; } virtual void SetAutoSave(Long64_t autos = 10000000) { fAutoSa ve=autos; }
virtual void SetBasketSize(const char* bname, Int_t buffsize = 16000); virtual void SetBasketSize(const char* bname, Int_t buffsize = 16000);
#if !defined(__CINT__) #if !defined(__CINT__)
virtual void SetBranchAddress(const char *bname,void *add, TBran ch **ptr = 0); virtual void SetBranchAddress(const char *bname,void *add, TBran ch **ptr = 0);
 End of changes. 4 change blocks. 
1 lines changed or deleted 4 lines changed or added


 TTreeCloner.h   TTreeCloner.h 
// @(#)root/tree:$Id: TTreeCloner.h 26028 2008-10-30 20:09:44Z brun $ // @(#)root/tree:$Id: TTreeCloner.h 28615 2009-05-13 18:50:17Z pcanal $
// Author: Philippe Canal 07/11/2005 // Author: Philippe Canal 07/11/2005
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 40 skipping to change at line 40
namespace std { namespace std {
using ::string; using ::string;
using ::vector; using ::vector;
} }
#endif #endif
class TBranch; class TBranch;
class TTree; class TTree;
class TTreeCloner { class TTreeCloner {
TString fWarningMsg; //Text of the error message lead to an 'in
valid' state
Bool_t fIsValid; Bool_t fIsValid;
Bool_t fNeedConversion; //True if the fast merge is not possible b
ut a slow merge might possible.
UInt_t fOptions;
TTree *fFromTree; TTree *fFromTree;
TTree *fToTree; TTree *fToTree;
Option_t *fMethod; Option_t *fMethod;
TObjArray fFromBranches; TObjArray fFromBranches;
TObjArray fToBranches; TObjArray fToBranches;
UInt_t fMaxBaskets; UInt_t fMaxBaskets;
UInt_t *fBasketBranchNum; //[fMaxBaskets] Index of the branch(es) of the basket. UInt_t *fBasketBranchNum; //[fMaxBaskets] Index of the branch(es) of the basket.
UInt_t *fBasketNum; //[fMaxBaskets] index of the basket within the branch. UInt_t *fBasketNum; //[fMaxBaskets] index of the basket within the branch.
skipping to change at line 68 skipping to change at line 72
Long64_t fToStartEntries; //Number of entries in the target tree bef ore any addition. Long64_t fToStartEntries; //Number of entries in the target tree bef ore any addition.
enum ECloneMethod { enum ECloneMethod {
kDefault = 0, kDefault = 0,
kSortBasketsByBranch = 1, kSortBasketsByBranch = 1,
kSortBasketsByOffset = 2, kSortBasketsByOffset = 2,
kSortBasketsByEntry = 3 kSortBasketsByEntry = 3
}; };
public: public:
TTreeCloner(TTree *from, TTree *to, Option_t *method); enum EClonerOptions {
kNone = 0,
kNoWarnings = BIT(1)
};
TTreeCloner(TTree *from, TTree *to, Option_t *method, UInt_t options = k
None);
virtual ~TTreeCloner(); virtual ~TTreeCloner();
void CloseOutWriteBaskets(); void CloseOutWriteBaskets();
UInt_t CollectBranches(TBranch *from, TBranch *to); UInt_t CollectBranches(TBranch *from, TBranch *to);
UInt_t CollectBranches(TObjArray *from, TObjArray *to); UInt_t CollectBranches(TObjArray *from, TObjArray *to);
UInt_t CollectBranches(); UInt_t CollectBranches();
void CollectBaskets(); void CollectBaskets();
void CopyMemoryBaskets(); void CopyMemoryBaskets();
void CopyStreamerInfos(); void CopyStreamerInfos();
void CopyProcessIds(); void CopyProcessIds();
const char *GetWarning() const { return fWarningMsg; }
Bool_t Exec(); Bool_t Exec();
Bool_t IsValid() { return fIsValid; } Bool_t IsValid() { return fIsValid; }
Bool_t NeedConversion() { return fNeedConversion; }
void SortBaskets(); void SortBaskets();
void WriteBaskets(); void WriteBaskets();
ClassDef(TTreeCloner,0); // helper used for the fast cloning of TTrees. ClassDef(TTreeCloner,0); // helper used for the fast cloning of TTrees.
}; };
#endif #endif
 End of changes. 6 change blocks. 
2 lines changed or deleted 16 lines changed or added


 TTreePlayer.h   TTreePlayer.h 
// @(#)root/treeplayer:$Id: TTreePlayer.h 20882 2007-11-19 11:31:26Z rdm $ // @(#)root/treeplayer:$Id: TTreePlayer.h 28514 2009-05-11 10:44:08Z brun $
// Author: Rene Brun 12/01/96 // Author: Rene Brun 12/01/96
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 90 skipping to change at line 90
virtual Int_t GetDimension() const {return fDimension;} virtual Int_t GetDimension() const {return fDimension;}
TH1 *GetHistogram() const {return fHistogram;} TH1 *GetHistogram() const {return fHistogram;}
virtual Long64_t GetEntries(const char *selection); virtual Long64_t GetEntries(const char *selection);
virtual Long64_t GetEntriesToProcess(Long64_t firstentry, Long64_t nent ries) const; virtual Long64_t GetEntriesToProcess(Long64_t firstentry, Long64_t nent ries) const;
virtual Int_t GetNfill() const {return fSelector->GetNfill();} virtual Int_t GetNfill() const {return fSelector->GetNfill();}
const char *GetScanFileName() const {return fScanFileName;} const char *GetScanFileName() const {return fScanFileName;}
TTreeFormula *GetSelect() const {return fSelector->GetSelect();} TTreeFormula *GetSelect() const {return fSelector->GetSelect();}
virtual Long64_t GetSelectedRows() const {return fSelectedRows;} virtual Long64_t GetSelectedRows() const {return fSelectedRows;}
TSelector *GetSelector() const {return fSelector;} TSelector *GetSelector() const {return fSelector;}
TSelector *GetSelectorFromFile() const {return fSelectorFromFile; } TSelector *GetSelectorFromFile() const {return fSelectorFromFile; }
TTreeFormula *GetVar(Int_t i) const {return fSelector->GetVar(i);};
TTreeFormula *GetVar1() const {return fSelector->GetVar1();} TTreeFormula *GetVar1() const {return fSelector->GetVar1();}
TTreeFormula *GetVar2() const {return fSelector->GetVar2();} TTreeFormula *GetVar2() const {return fSelector->GetVar2();}
TTreeFormula *GetVar3() const {return fSelector->GetVar3();} TTreeFormula *GetVar3() const {return fSelector->GetVar3();}
TTreeFormula *GetVar4() const {return fSelector->GetVar4();} TTreeFormula *GetVar4() const {return fSelector->GetVar4();}
virtual Double_t *GetVal(Int_t i) const {return fSelector->GetVal(i);};
virtual Double_t *GetV1() const {return fSelector->GetV1();} virtual Double_t *GetV1() const {return fSelector->GetV1();}
virtual Double_t *GetV2() const {return fSelector->GetV2();} virtual Double_t *GetV2() const {return fSelector->GetV2();}
virtual Double_t *GetV3() const {return fSelector->GetV3();} virtual Double_t *GetV3() const {return fSelector->GetV3();}
virtual Double_t *GetV4() const {return fSelector->GetV4();} virtual Double_t *GetV4() const {return fSelector->GetV4();}
virtual Double_t *GetW() const {return fSelector->GetW();} virtual Double_t *GetW() const {return fSelector->GetW();}
virtual Int_t MakeClass(const char *classname, Option_t *option); virtual Int_t MakeClass(const char *classname, Option_t *option);
virtual Int_t MakeCode(const char *filename); virtual Int_t MakeCode(const char *filename);
virtual Int_t MakeProxy(const char *classname, virtual Int_t MakeProxy(const char *classname,
const char *macrofilename = 0, const char *c utfilename = 0, const char *macrofilename = 0, const char *c utfilename = 0,
const char *option = 0, Int_t maxUnrolling = 3); const char *option = 0, Int_t maxUnrolling = 3);
 End of changes. 3 change blocks. 
1 lines changed or deleted 3 lines changed or added


 TUnuranContDist.h   TUnuranContDist.h 
// @(#)root/unuran:$Id: TUnuranContDist.h 21526 2007-12-20 10:42:41Z moneta $ // @(#)root/unuran:$Id: TUnuranContDist.h 28968 2009-06-12 16:41:43Z moneta $
// Authors: L. Moneta, J. Leydold Wed Feb 28 2007 // Authors: L. Moneta, J. Leydold Wed Feb 28 2007
/********************************************************************** /**********************************************************************
* * * *
* Copyright (c) 2006 LCG ROOT Math Team, CERN/PH-SFT * * Copyright (c) 2006 LCG ROOT Math Team, CERN/PH-SFT *
* * * *
* * * *
**********************************************************************/ **********************************************************************/
// Header file for class TUnuranContDist // Header file for class TUnuranContDist
#ifndef ROOT_Math_TUnuranContDist #ifndef ROOT_Math_TUnuranContDist
#define ROOT_Math_TUnuranContDist #define ROOT_Math_TUnuranContDist
#ifndef ROOT_Math_TUnuranBaseDist #ifndef ROOT_Math_TUnuranBaseDist
#include "TUnuranBaseDist.h" #include "TUnuranBaseDist.h"
#endif #endif
#ifndef ROOT_Math_IFunctionfwd
#include "Math/IFunctionfwd.h"
#endif
class TF1; class TF1;
//______________________________________________________________ //______________________________________________________________
/** /**
TUnuranContDist class describing one dimensional continous distribution. TUnuranContDist class describing one dimensional continous distribution.
It is used by TUnuran to generate random numbers according to this distr ibution via It is used by TUnuran to generate random numbers according to this distr ibution via
TUnuran::Sample() TUnuran::Sample()
The class can be constructed from a function (TF1) representing the prob ability density The class can be constructed from a function (TF1) representing the prob ability density
function of the distribution. Optionally the derivative of the pdf can a lso be passed. function of the distribution. Optionally the derivative of the pdf can a lso be passed.
skipping to change at line 59 skipping to change at line 63
By default the distribution has not domain set (it is defined between [-inf,+inf], no mode, no pdf area and no By default the distribution has not domain set (it is defined between [-inf,+inf], no mode, no pdf area and no
cdf explicity defined. UnuRan, if needed, can compute some of this qu antities, but the user if he knows them can cdf explicity defined. UnuRan, if needed, can compute some of this qu antities, but the user if he knows them can
set them in order to speed up the algorithm. For example in case of t he Cdf, if the user has not set it, a numerical set them in order to speed up the algorithm. For example in case of t he Cdf, if the user has not set it, a numerical
integration algorithm is used to estimate the Cdf from the Pdf. integration algorithm is used to estimate the Cdf from the Pdf.
In case an algorithm requires only the Cdf (no Pdf), an empty distrib ution can be constructed and then the user must In case an algorithm requires only the Cdf (no Pdf), an empty distrib ution can be constructed and then the user must
set afterwards the Cdf. set afterwards the Cdf.
*/ */
TUnuranContDist (TF1 * pdf = 0, TF1 * deriv = 0, bool isLogPdf = false ) ; TUnuranContDist (TF1 * pdf = 0, TF1 * deriv = 0, bool isLogPdf = false ) ;
/** /**
Destructor (no operations) Constructor as before but from a generic function object interface fo
r one-dim functions
*/
TUnuranContDist (const ROOT::Math::IGenFunction & pdf, const ROOT::Math:
:IGenFunction * dpdf = 0, bool isLogPdf = false);
/**
Destructor
*/ */
virtual ~TUnuranContDist () {} virtual ~TUnuranContDist ();
/** /**
Copy constructor Copy constructor
*/ */
TUnuranContDist(const TUnuranContDist &); TUnuranContDist(const TUnuranContDist &);
/** /**
Assignment operator Assignment operator
*/ */
TUnuranContDist & operator = (const TUnuranContDist & rhs); TUnuranContDist & operator = (const TUnuranContDist & rhs);
/** /**
Clone (required by base class) Clone (required by base class)
*/ */
TUnuranContDist * Clone() const { return new TUnuranContDist(*this); } virtual TUnuranContDist * Clone() const { return new TUnuranContDist(*th is); }
/** /**
set cdf distribution. If a method requires it set cdf distribution. If a method requires it
and is not set it is then estimated using numerical and is not set it is then estimated using numerical
integration from the pdf integration from the pdf
*/ */
void SetCdf(TF1 * cdf) { fCdf = cdf; } void SetCdf(TF1 * cdf);
/**
set cdf distribution using a generic function interface
*/
void SetCdf(const ROOT::Math::IGenFunction & cdf);
/** /**
Set the distribution domain. If min < max a domain is defined otherwi se is undefined Set the distribution domain. If min < max a domain is defined otherwi se is undefined
*/ */
void SetDomain(double xmin, double xmax) { void SetDomain(double xmin, double xmax) {
fXmin = xmin; fXmin = xmin;
fXmax = xmax; fXmax = xmax;
if (fXmin < fXmax) if (fXmin < fXmax)
fHasDomain = true; fHasDomain = true;
else else
skipping to change at line 165 skipping to change at line 179
/** /**
evaluate the integral (cdf) on the domain. Used by Unuran algorithm evaluate the integral (cdf) on the domain. Used by Unuran algorithm
*/ */
double Cdf(double x) const; double Cdf(double x) const;
protected: protected:
private: private:
mutable TF1 * fPdf; //pointer to the pdf const ROOT::Math::IGenFunction * fPdf; // pointer to the pdf
mutable TF1 * fDPdf; //pointer to the derivative of the pdf const ROOT::Math::IGenFunction * fDPdf; //pointer to the derivativ
mutable TF1 * fCdf; //pointer to the cdf e of the pdf
const ROOT::Math::IGenFunction * fCdf; //pointer to the cdf (cumul
ative dist.)
double fXmin; //lower value of the domain double fXmin; //lower value of the domain
double fXmax; //upper value of the domain double fXmax; //upper value of the domain
double fMode; //mode of the distribution double fMode; //mode of the distribution
double fArea; //area below pdf double fArea; //area below pdf
// flags // flags
bool fIsLogPdf; //flag to control if function pointer represent log of pdf bool fIsLogPdf; //flag to control if function pointer represent log of pdf
bool fHasDomain; //flag to control if distribution has a defined domain (otherwise is [-inf,+inf] bool fHasDomain; //flag to control if distribution has a defined domain (otherwise is [-inf,+inf]
bool fHasMode; //flag to control if distribution has a pre-com puted mode bool fHasMode; //flag to control if distribution has a pre-com puted mode
bool fHasArea; //flag to control if distribution has a pre-com puted area below the pdf bool fHasArea; //flag to control if distribution has a pre-com puted area below the pdf
mutable double fX[1]; //! cached vector for using TF1::EvalPar bool fOwnFunc; // flag to indicate if class manages the functi
on pointers
//mutable double fX[1]; //! cached vector for using TF1::EvalPar
ClassDef(TUnuranContDist,1) //Wrapper class for one dimensional continu ous distribution ClassDef(TUnuranContDist,1) //Wrapper class for one dimensional continu ous distribution
}; };
#endif /* ROOT_Math_TUnuranContDist */ #endif /* ROOT_Math_TUnuranContDist */
 End of changes. 9 change blocks. 
9 lines changed or deleted 31 lines changed or added


 TUnuranDiscrDist.h   TUnuranDiscrDist.h 
// @(#)root/unuran:$Id: TUnuranDiscrDist.h 21526 2007-12-20 10:42:41Z monet a $ // @(#)root/unuran:$Id: TUnuranDiscrDist.h 28968 2009-06-12 16:41:43Z monet a $
// Authors: L. Moneta, J. Leydold Wed Feb 28 2007 // Authors: L. Moneta, J. Leydold Wed Feb 28 2007
/********************************************************************** /**********************************************************************
* * * *
* Copyright (c) 2006 LCG ROOT Math Team, CERN/PH-SFT * * Copyright (c) 2006 LCG ROOT Math Team, CERN/PH-SFT *
* * * *
* * * *
**********************************************************************/ **********************************************************************/
// Header file for class TUnuranDiscrDist // Header file for class TUnuranDiscrDist
#ifndef ROOT_Math_TUnuranDiscrDist #ifndef ROOT_Math_TUnuranDiscrDist
#define ROOT_Math_TUnuranDiscrDist #define ROOT_Math_TUnuranDiscrDist
#ifndef ROOT_Math_TUnuranBaseDist #ifndef ROOT_Math_TUnuranBaseDist
#include "TUnuranBaseDist.h" #include "TUnuranBaseDist.h"
#endif #endif
#ifndef ROOT_Math_IFunctionfwd
#include "Math/IFunctionfwd.h"
#endif
#include <vector> #include <vector>
class TF1; class TF1;
//____________________________________________________________________ //____________________________________________________________________
/** /**
TUnuranDiscrDist class for one dimensional discrete distribution. TUnuranDiscrDist class for one dimensional discrete distribution.
It is used by TUnuran to generate integer random numbers according to th is distribution via It is used by TUnuran to generate integer random numbers according to th is distribution via
TUnuran::SampleDiscr(). TUnuran::SampleDiscr().
skipping to change at line 50 skipping to change at line 54
Derivative() method. Derivative() method.
Some extra information (like distribution mode, cdf function, probabilit y sum, etc..) Some extra information (like distribution mode, cdf function, probabilit y sum, etc..)
can be set as well otherwise will be estimated internally if required. can be set as well otherwise will be estimated internally if required.
*/ */
class TUnuranDiscrDist : public TUnuranBaseDist { class TUnuranDiscrDist : public TUnuranBaseDist {
public: public:
/** /**
Constructor from a generic function object specifying the pdf
*/
TUnuranDiscrDist (const ROOT::Math::IGenFunction & func );
/**
Constructor from a TF1 objects specifying the pdf Constructor from a TF1 objects specifying the pdf
*/ */
TUnuranDiscrDist (TF1 * func = 0); TUnuranDiscrDist (TF1 * func );
/** /**
Constructor from a vector of probability Constructor from a vector of probability
*/ */
template<class Iterator> template<class Iterator>
TUnuranDiscrDist (Iterator * begin, Iterator * end) : TUnuranDiscrDist (Iterator * begin, Iterator * end) :
fPVec(begin,end), fPVec(begin,end),
fPmf(0), fPmf(0),
fCdf(0), fCdf(0),
fXmin(1), fXmin(1),
fXmax(-1), fXmax(-1),
fMode(0), fMode(0),
fSum(0), fSum(0),
fHasDomain(0), fHasDomain(0),
fHasMode(0), fHasMode(0),
fHasSum(0) {} fHasSum(0),
fOwnFunc(false)
{}
/** /**
Destructor (no operations) Destructor
*/ */
~TUnuranDiscrDist () {} virtual ~TUnuranDiscrDist ();
/** /**
Copy constructor Copy constructor
*/ */
TUnuranDiscrDist(const TUnuranDiscrDist &); TUnuranDiscrDist(const TUnuranDiscrDist &);
/** /**
Assignment operator Assignment operator
*/ */
TUnuranDiscrDist & operator = (const TUnuranDiscrDist & rhs); TUnuranDiscrDist & operator = (const TUnuranDiscrDist & rhs);
/** /**
Clone (required by base class) Clone (required by base class)
*/ */
TUnuranDiscrDist * Clone() const { return new TUnuranDiscrDist(*this); } virtual TUnuranDiscrDist * Clone() const { return new TUnuranDiscrDist(*
this); }
/**
set cdf distribution from a generic function interface. If a method r
equires it
and is not set it is estimated numerically
*/
void SetCdf(const ROOT::Math::IGenFunction & cdf);
/** /**
set cdf distribution. If a method requires it set cdf distribution from a TF1 pointer. If a method requires it
and is not set it is estimated numerically and is not set it is estimated numerically
*/ */
void SetCdf(TF1 * cdf) { fCdf = cdf; } void SetCdf(TF1 * cdf);
/** /**
Set the distribution domain, by default the domain is [0,INT_MAX] Set the distribution domain, by default the domain is [0,INT_MAX]
If xmin >= xmax a domain is removed If xmin >= xmax a domain is removed
*/ */
void SetDomain(int xmin, int xmax) { void SetDomain(int xmin, int xmax) {
fXmin = xmin; fXmin = xmin;
fXmax = xmax; fXmax = xmax;
if (fXmin < fXmax) if (fXmin < fXmax)
fHasDomain = true; fHasDomain = true;
skipping to change at line 176 skipping to change at line 193
/** /**
evaluate the integral (cdf) on the given domain evaluate the integral (cdf) on the given domain
*/ */
double Cdf(int x) const; double Cdf(int x) const;
protected: protected:
private: private:
std::vector<double> fPVec; //Vector of the probabilities std::vector<double> fPVec; //Vector of the probabilities
mutable TF1 * fPmf; //pointer to a function calculating the mutable std::vector<double> fPVecSum; //Vector of the sum of the pro
probability babilities
mutable TF1 * fCdf; //pointer to the cumulative distribution const ROOT::Math::IGenFunction *fPmf; //pointer to a function calculat
function ing the probability
const ROOT::Math::IGenFunction *fCdf; //pointer to the cumulative dis
tribution function
int fXmin; //lower value of the domain int fXmin; //lower value of the domain
int fXmax; //upper value of the domain int fXmax; //upper value of the domain
int fMode; //mode of the distribution int fMode; //mode of the distribution
double fSum; //total sum of the probabilities in the gi ven domain double fSum; //total sum of the probabilities in the gi ven domain
// flags // flags
bool fHasDomain; //flag to control if distribution has a de fined domain (otherwise is [0,INT_MAX]) bool fHasDomain; //flag to control if distribution has a de fined domain (otherwise is [0,INT_MAX])
bool fHasMode; //flag to control if distribution has a pr e-computed mode bool fHasMode; //flag to control if distribution has a pr e-computed mode
bool fHasSum; //flag to control if distribution has a pr e-computed sum of the probabilities bool fHasSum; //flag to control if distribution has a pr e-computed sum of the probabilities
mutable double fX[1]; //! cached vector for using TF1::EvalPar bool fOwnFunc; // flag to control if distribution owns th e funcitno pointers
ClassDef(TUnuranDiscrDist,1) //Wrapper class for one dimensional discre te distribution ClassDef(TUnuranDiscrDist,1) //Wrapper class for one dimensional discre te distribution
}; };
#endif /* ROOT_Math_TUnuranDiscrDist */ #endif /* ROOT_Math_TUnuranDiscrDist */
 End of changes. 12 change blocks. 
14 lines changed or deleted 35 lines changed or added


 TUnuranMultiContDist.h   TUnuranMultiContDist.h 
// @(#)root/unuran:$Id: TUnuranMultiContDist.h 21526 2007-12-20 10:42:41Z m oneta $ // @(#)root/unuran:$Id: TUnuranMultiContDist.h 28968 2009-06-12 16:41:43Z m oneta $
// Authors: L. Moneta, J. Leydold Wed Feb 28 2007 // Authors: L. Moneta, J. Leydold Wed Feb 28 2007
/********************************************************************** /**********************************************************************
* * * *
* Copyright (c) 2006 LCG ROOT Math Team, CERN/PH-SFT * * Copyright (c) 2006 LCG ROOT Math Team, CERN/PH-SFT *
* * * *
* * * *
**********************************************************************/ **********************************************************************/
// Header file for class TUnuranMultiContDist // Header file for class TUnuranMultiContDist
#ifndef ROOT_Math_TUnuranMultiContDist #ifndef ROOT_Math_TUnuranMultiContDist
#define ROOT_Math_TUnuranMultiContDist #define ROOT_Math_TUnuranMultiContDist
#ifndef ROOT_Math_TUnuranBaseDist #ifndef ROOT_Math_TUnuranBaseDist
#include "TUnuranBaseDist.h" #include "TUnuranBaseDist.h"
#endif #endif
#ifndef ROOT_Math_IFunction
#include "Math/IFunction.h"
#endif
#include <vector> #include <vector>
class TF1; class TF1;
//_________________________________________________________________________ __________________ //_________________________________________________________________________ __________________
/** /**
TUnuranMultiContDist class describing multi dimensional continuous distr ibutions. TUnuranMultiContDist class describing multi dimensional continuous distr ibutions.
It is used by TUnuran to generate a set of random numbers according to t his distribution via It is used by TUnuran to generate a set of random numbers according to t his distribution via
TUnuran::Sample(double *). TUnuran::Sample(double *).
The class can be constructed from a multi-dimensional function (TF1 poin ter, which can be actually also a The class can be constructed from a multi-dimensional function (TF1 poin ter, which can be actually also a
skipping to change at line 56 skipping to change at line 60
/** /**
Constructor from a TF1 object representing the Probability density fu nciton. Constructor from a TF1 object representing the Probability density fu nciton.
The derivatives of the Pdf are estimated, when required by the UNURAN algorithm, The derivatives of the Pdf are estimated, when required by the UNURAN algorithm,
using numerical derivation. using numerical derivation.
If a value of dim 0 is passed , the dimension of the function is take n from TF1::GetNdim(). If a value of dim 0 is passed , the dimension of the function is take n from TF1::GetNdim().
This works only for 2D and 3D (for TF2 and TF3 objects). This works only for 2D and 3D (for TF2 and TF3 objects).
*/ */
TUnuranMultiContDist (TF1 * func = 0, unsigned int dim = 0, bool isLogPd f = false); TUnuranMultiContDist (TF1 * func = 0, unsigned int dim = 0, bool isLogPd f = false);
/** /**
Destructor (no operations) Constructor as before but from a generic function object interface fo
r multi-dim functions
*/
TUnuranMultiContDist (const ROOT::Math::IMultiGenFunction & pdf, bool is
LogPdf = false);
/**
Destructor
*/ */
virtual ~TUnuranMultiContDist () {} virtual ~TUnuranMultiContDist ();
/** /**
Copy constructor Copy constructor
*/ */
TUnuranMultiContDist(const TUnuranMultiContDist &); TUnuranMultiContDist(const TUnuranMultiContDist &);
/** /**
Assignment operator Assignment operator
*/ */
TUnuranMultiContDist & operator = (const TUnuranMultiContDist & rhs); TUnuranMultiContDist & operator = (const TUnuranMultiContDist & rhs);
/** /**
Clone (required by base class) Clone (required by base class)
*/ */
TUnuranMultiContDist * Clone() const { return new TUnuranMultiContDist(* this); } virtual TUnuranMultiContDist * Clone() const { return new TUnuranMultiCo ntDist(*this); }
/** /**
get number of dimension of the distribution get number of dimension of the distribution
*/ */
unsigned int NDim() const { unsigned int NDim() const {
return fDim; return fPdf->NDim();
} }
/** /**
set the domain of the distribution giving an array of minimum and max imum values set the domain of the distribution giving an array of minimum and max imum values
By default otherwise the domain is undefined, i.e. is [-inf,+inf] By default otherwise the domain is undefined, i.e. is [-inf,+inf]
To remove the domain do a SetDomain(0,0). To remove the domain do a SetDomain(0,0).
There is no possibility to have a domain defined in only one coordina te. Use instead inf or DOUBLE_MAX to There is no possibility to have a domain defined in only one coordina te. Use instead inf or DOUBLE_MAX to
specify un infinite domain in that coordinate specify un infinite domain in that coordinate
*/ */
void SetDomain(const double *xmin, const double *xmax) { void SetDomain(const double *xmin, const double *xmax) {
if (xmin == 0 || xmax == 0) return; if (xmin == 0 || xmax == 0) return;
fXmin = std::vector<double>(xmin,xmin+fDim); fXmin = std::vector<double>(xmin,xmin+NDim());
fXmax = std::vector<double>(xmax,xmax+fDim); fXmax = std::vector<double>(xmax,xmax+NDim());
} }
/** /**
set the mode of the distribution (coordinates of the distribution max imum values) set the mode of the distribution (coordinates of the distribution max imum values)
*/ */
void SetMode(double * x) { void SetMode(double * x) {
fMode = std::vector<double>(x,x+fDim); fMode = std::vector<double>(x,x+NDim());
} }
/** /**
get the distribution lower domain values. Return a null pointer if do main is not defined get the distribution lower domain values. Return a null pointer if do main is not defined
*/ */
const double * GetLowerDomain() const { const double * GetLowerDomain() const {
if (fXmin.size() == 0 || ( fXmin.size() != fXmax.size() ) ) return 0; if (fXmin.size() == 0 || ( fXmin.size() != fXmax.size() ) ) return 0;
return &fXmin[0];; return &fXmin[0];
} }
/** /**
get the distribution upper domain values. Return a null pointer if do main is not defined get the distribution upper domain values. Return a null pointer if do main is not defined
*/ */
const double * GetUpperDomain() const { const double * GetUpperDomain() const {
if (fXmax.size() == 0 || ( fXmin.size() != fXmax.size() ) ) return 0; if (fXmax.size() == 0 || ( fXmin.size() != fXmax.size() ) ) return 0;
return &fXmax[0];; return &fXmax[0];
} }
/** /**
get the mode (vector of coordinate positions of the maxima of the dis tribution) get the mode (vector of coordinate positions of the maxima of the dis tribution)
If a mode has not defined return a NULL pointer If a mode has not defined return a NULL pointer
*/ */
const double * GetMode( ) const { const double * GetMode( ) const {
if (fMode.size() == 0 ) return 0; if (fMode.size() == 0 ) return 0;
return &fMode.front(); return &fMode.front();
} }
skipping to change at line 148 skipping to change at line 157
*/ */
void Gradient( const double * x, double * grad) const; void Gradient( const double * x, double * grad) const;
/** /**
evaluate the partial derivative for the given coordinate. Used by Unu Ran evaluate the partial derivative for the given coordinate. Used by Unu Ran
*/ */
double Derivative( const double * x, int icoord) const; double Derivative( const double * x, int icoord) const;
private: private:
mutable TF1 * fPdf; //pointer to the pdf const ROOT::Math::IMultiGenFunction * fPdf; //pointer to the pdf
unsigned int fDim; //number of function dimension
std::vector<double> fXmin; //vector with lower x values of the doma in std::vector<double> fXmin; //vector with lower x values of the doma in
std::vector<double> fXmax; //vector with upper x values of the doma in std::vector<double> fXmax; //vector with upper x values of the doma in
std::vector<double> fMode; //vector representing the x coordinates of the maximum of the pdf std::vector<double> fMode; //vector representing the x coordinates of the maximum of the pdf
bool fIsLogPdf; //flag to control if function pointer re present log of pdf bool fIsLogPdf; //flag to control if function pointer re present log of pdf
bool fOwnFunc; // flag to indicate if class manages the function pointers
ClassDef(TUnuranMultiContDist,1) //Wrapper class for multi dimensional continuous distribution ClassDef(TUnuranMultiContDist,1) //Wrapper class for multi dimensional continuous distribution
}; };
#endif /* ROOT_Math_TUnuranMultiContDist */ #endif /* ROOT_Math_TUnuranMultiContDist */
 End of changes. 12 change blocks. 
12 lines changed or deleted 23 lines changed or added


 TVirtualMC.h   TVirtualMC.h 
// @(#)root/vmc:$Name: $:$Id: TVirtualMC.h 27260 2009-01-27 16:26:34Z ivan a $ // @(#)root/vmc:$Name: $:$Id: TVirtualMC.h 28872 2009-06-10 09:47:55Z ivan a $
// Authors: Ivana Hrivnacova, Rene Brun, Federico Carminati 13/04/2002 // Authors: Ivana Hrivnacova, Rene Brun, Federico Carminati 13/04/2002
/************************************************************************* /*************************************************************************
* Copyright (C) 2006, Rene Brun and Fons Rademakers. * * Copyright (C) 2006, Rene Brun and Fons Rademakers. *
* Copyright (C) 2002, ALICE Experiment at CERN. * * Copyright (C) 2002, ALICE Experiment at CERN. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 424 skipping to change at line 424
// number copy number of topvol (relevant for gsposp) // number copy number of topvol (relevant for gsposp)
// nlevel number of levels in the tree structure // nlevel number of levels in the tree structure
// to be written out, starting from topvol // to be written out, starting from topvol
// (Geant3 only) // (Geant3 only)
virtual void WriteEuclid(const char* filnam, const char* topvol, virtual void WriteEuclid(const char* filnam, const char* topvol,
Int_t number, Int_t nlevel) = 0; Int_t number, Int_t nlevel) = 0;
// Set geometry from Root (built via TGeo) // Set geometry from Root (built via TGeo)
virtual void SetRootGeometry() = 0; virtual void SetRootGeometry() = 0;
// Activate the parameters defined in tracking media
// (DEEMAX, STMIN, STEMAX), which are, be default, ignored.
// In Geant4 case, only STEMAX is taken into account.
// In FLUKA, all tracking media parameters are ignored.
virtual void SetUserParameters(Bool_t isUserParameters);
// //
// get methods // get methods
// ------------------------------------------------ // ------------------------------------------------
// //
// Return the unique numeric identifier for volume name volName // Return the unique numeric identifier for volume name volName
virtual Int_t VolId(const char* volName) const = 0; virtual Int_t VolId(const char* volName) const = 0;
// Return the volume name for a given volume identifier id // Return the volume name for a given volume identifier id
virtual const char* VolName(Int_t id) const = 0; virtual const char* VolName(Int_t id) const = 0;
skipping to change at line 902 skipping to change at line 908
static TVirtualMC* fgMC; // Monte Carlo singleton instance static TVirtualMC* fgMC; // Monte Carlo singleton instance
TVirtualMCStack* fStack; //! Particles stack TVirtualMCStack* fStack; //! Particles stack
TVirtualMCDecayer* fDecayer; //! External decayer TVirtualMCDecayer* fDecayer; //! External decayer
TRandom* fRandom; //! Random number generator TRandom* fRandom; //! Random number generator
TVirtualMagField* fMagField;//! Magnetic field TVirtualMagField* fMagField;//! Magnetic field
ClassDef(TVirtualMC,1) //Interface to Monte Carlo ClassDef(TVirtualMC,1) //Interface to Monte Carlo
}; };
// new functions
inline void TVirtualMC::SetUserParameters(Bool_t /*isUserParameters*/) {
// Activate the parameters defined in tracking media
// (DEEMAX, STMIN, STEMAX), which are, be default, ignored.
// In Geant4 case, only STEMAX is taken into account.
// In FLUKA, all tracking media parameters are ignored.
Warning("SetUserParameters", "New function - not yet implemented.");
}
R__EXTERN TVirtualMC *gMC; R__EXTERN TVirtualMC *gMC;
#endif //ROOT_TVirtualMC #endif //ROOT_TVirtualMC
 End of changes. 3 change blocks. 
1 lines changed or deleted 17 lines changed or added


 TVirtualTreePlayer.h   TVirtualTreePlayer.h 
// @(#)root/tree:$Id: TVirtualTreePlayer.h 21642 2008-01-11 14:55:52Z rdm $ // @(#)root/tree:$Id: TVirtualTreePlayer.h 28514 2009-05-11 10:44:08Z brun $
// Author: Rene Brun 30/08/99 // Author: Rene Brun 30/08/99
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 61 skipping to change at line 61
virtual Long64_t DrawSelect(const char *varexp, const char *select ion, Option_t *option virtual Long64_t DrawSelect(const char *varexp, const char *select ion, Option_t *option
,Long64_t nentries, Long64_t firstentr y) = 0; ,Long64_t nentries, Long64_t firstentr y) = 0;
virtual Int_t Fit(const char *formula ,const char *varexp, cons t char *selection,Option_t *option ,Option_t *goption virtual Int_t Fit(const char *formula ,const char *varexp, cons t char *selection,Option_t *option ,Option_t *goption
,Long64_t nentries, Long64_t firstentry) = 0; ,Long64_t nentries, Long64_t firstentry) = 0;
virtual Int_t GetDimension() const = 0; virtual Int_t GetDimension() const = 0;
virtual TH1 *GetHistogram() const = 0; virtual TH1 *GetHistogram() const = 0;
virtual Int_t GetNfill() const = 0; virtual Int_t GetNfill() const = 0;
virtual Long64_t GetEntries(const char *) = 0; virtual Long64_t GetEntries(const char *) = 0;
virtual Long64_t GetSelectedRows() const = 0; virtual Long64_t GetSelectedRows() const = 0;
virtual TTreeFormula *GetSelect() const = 0; virtual TTreeFormula *GetSelect() const = 0;
virtual TTreeFormula *GetVar(Int_t) const = 0;
virtual TTreeFormula *GetVar1() const = 0; virtual TTreeFormula *GetVar1() const = 0;
virtual TTreeFormula *GetVar2() const = 0; virtual TTreeFormula *GetVar2() const = 0;
virtual TTreeFormula *GetVar3() const = 0; virtual TTreeFormula *GetVar3() const = 0;
virtual TTreeFormula *GetVar4() const = 0; virtual TTreeFormula *GetVar4() const = 0;
virtual Double_t *GetVal(Int_t) const = 0;
virtual Double_t *GetV1() const = 0; virtual Double_t *GetV1() const = 0;
virtual Double_t *GetV2() const = 0; virtual Double_t *GetV2() const = 0;
virtual Double_t *GetV3() const = 0; virtual Double_t *GetV3() const = 0;
virtual Double_t *GetV4() const = 0; virtual Double_t *GetV4() const = 0;
virtual Double_t *GetW() const = 0; virtual Double_t *GetW() const = 0;
virtual Int_t MakeClass(const char *classname, const char *opti on) = 0; virtual Int_t MakeClass(const char *classname, const char *opti on) = 0;
virtual Int_t MakeCode(const char *filename) = 0; virtual Int_t MakeCode(const char *filename) = 0;
virtual Int_t MakeProxy(const char *classname, virtual Int_t MakeProxy(const char *classname,
const char *macrofilename = 0, const ch ar *cutfilename = 0, const char *macrofilename = 0, const ch ar *cutfilename = 0,
const char *option = 0, Int_t maxUnroll ing = 3) = 0; const char *option = 0, Int_t maxUnroll ing = 3) = 0;
 End of changes. 3 change blocks. 
1 lines changed or deleted 3 lines changed or added


 TWebFile.h   TWebFile.h 
// @(#)root/net:$Id: TWebFile.h 27463 2009-02-17 08:17:49Z brun $ // @(#)root/net:$Id: TWebFile.h 28645 2009-05-15 17:51:47Z rdm $
// Author: Fons Rademakers 17/01/97 // Author: Fons Rademakers 17/01/97
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 49 skipping to change at line 49
mutable Long64_t fSize; // file size mutable Long64_t fSize; // file size
TSocket *fSocket; // socket for HTTP/1.1 (stays alive bet ween calls) TSocket *fSocket; // socket for HTTP/1.1 (stays alive bet ween calls)
TUrl fProxy; // proxy URL TUrl fProxy; // proxy URL
Bool_t fHasModRoot; // true if server has mod_root installe d Bool_t fHasModRoot; // true if server has mod_root installe d
Bool_t fHTTP11; // true if server support HTTP/1.1 Bool_t fHTTP11; // true if server support HTTP/1.1
Bool_t fNoProxy; // don't use proxy Bool_t fNoProxy; // don't use proxy
static TUrl fgProxy; // globally set proxy URL static TUrl fgProxy; // globally set proxy URL
TWebFile() : fSocket(0) { } TWebFile() : fSocket(0) { }
void Init(Bool_t); void Init(Bool_t);
void CheckProxy(); void CheckProxy();
Int_t GetHead(); TString BasicAuthentication();
Int_t GetLine(TSocket *s, char *line, Int_t size); Int_t GetHead();
Int_t GetFromWeb(char *buf, Int_t len, const TString &msg); Int_t GetLine(TSocket *s, char *line, Int_t size);
Int_t GetFromWeb10(char *buf, Int_t len, const TString &msg); Int_t GetFromWeb(char *buf, Int_t len, const TString &msg);
Bool_t ReadBuffer10(char *buf, Int_t len); Int_t GetFromWeb10(char *buf, Int_t len, const TString &msg);
Bool_t ReadBuffers10(char *buf, Long64_t *pos, Int_t *len, Int_t nbuf); Bool_t ReadBuffer10(char *buf, Int_t len);
Bool_t ReadBuffers10(char *buf, Long64_t *pos, Int_t *len, Int_t nbuf);
public: public:
TWebFile(const char *url, Option_t *opt=""); TWebFile(const char *url, Option_t *opt="");
TWebFile(TUrl url, Option_t *opt=""); TWebFile(TUrl url, Option_t *opt="");
virtual ~TWebFile(); virtual ~TWebFile();
Long64_t GetSize() const; Long64_t GetSize() const;
Bool_t IsOpen() const; Bool_t IsOpen() const;
Int_t ReOpen(Option_t *mode); Int_t ReOpen(Option_t *mode);
Bool_t ReadBuffer(char *buf, Int_t len); Bool_t ReadBuffer(char *buf, Int_t len);
 End of changes. 2 change blocks. 
9 lines changed or deleted 10 lines changed or added


 TXMLParser.h   TXMLParser.h 
// @(#)root/xmlparser:$Id: TXMLParser.h 21809 2008-01-22 16:11:46Z brun $ // @(#)root/xmlparser:$Id: TXMLParser.h 28833 2009-06-05 14:08:12Z rdm $
// Author: Jose Lo 12/4/2005 // Author: Jose Lo 12/4/2005
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2005, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2005, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 26 skipping to change at line 26
// // // //
// TXMLParser // // TXMLParser //
// // // //
// TXMLParser is an abstract class which interfaces with Libxml2. // // TXMLParser is an abstract class which interfaces with Libxml2. //
// Libxml2 is the XML C parser and toolkit developed for the Gnome // // Libxml2 is the XML C parser and toolkit developed for the Gnome //
// project. // // project. //
// // // //
// The libxml library provides two interfaces to the parser, a DOM // // The libxml library provides two interfaces to the parser, a DOM //
// style tree interface and a SAX style event based interface. // // style tree interface and a SAX style event based interface. //
// // // //
// TXMLParser is the parent class of TSAXParser, which is // // TXMLParser is parent class of TSAXParser and TDOMParser, which are //
// a SAX interface of libxml and TDOMParser, a DOM interface of libxml.// // a SAX interface and DOM interface of libxml. //
// // // //
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
#ifndef ROOT_TQObject #ifndef ROOT_TQObject
#include "TQObject.h" #include "TQObject.h"
#endif #endif
#ifndef ROOT_TObject #ifndef ROOT_TObject
#include "TObject.h" #include "TObject.h"
#endif #endif
 End of changes. 2 change blocks. 
3 lines changed or deleted 3 lines changed or added


 TXProofMgr.h   TXProofMgr.h 
// @(#)root/proofx:$Id: TXProofMgr.h 26951 2008-12-16 12:04:38Z ganis $ // @(#)root/proofx:$Id: TXProofMgr.h 28746 2009-05-28 13:03:29Z ganis $
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2005, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2005, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
#ifndef ROOT_TXProofMgr #ifndef ROOT_TXProofMgr
#define ROOT_TXProofMgr #define ROOT_TXProofMgr
skipping to change at line 64 skipping to change at line 64
Bool_t HandleInput(const void *); Bool_t HandleInput(const void *);
Bool_t HandleError(const void *in = 0); Bool_t HandleError(const void *in = 0);
Bool_t IsValid() const { return fSocket; } Bool_t IsValid() const { return fSocket; }
void SetInvalid(); void SetInvalid();
TProof *AttachSession(Int_t id, Bool_t gui = kFALSE) TProof *AttachSession(Int_t id, Bool_t gui = kFALSE)
{ return TProofMgr::AttachSession(id, gui); } { return TProofMgr::AttachSession(id, gui); }
TProof *AttachSession(TProofDesc *d, Bool_t gui = kFALSE); TProof *AttachSession(TProofDesc *d, Bool_t gui = kFALSE);
void DetachSession(Int_t, Option_t * = ""); void DetachSession(Int_t, Option_t * = "");
void DetachSession(TProof *, Option_t * = "");
TProofLog *GetSessionLogs(Int_t ridx = 0, const char *stag = 0, TProofLog *GetSessionLogs(Int_t ridx = 0, const char *stag = 0,
const char *pattern = "-v \"| SvcMsg\""); const char *pattern = "-v \"| SvcMsg\"");
Bool_t MatchUrl(const char *url); Bool_t MatchUrl(const char *url);
void ShowROOTVersions(); void ShowROOTVersions();
TList *QuerySessions(Option_t *opt = "S"); TList *QuerySessions(Option_t *opt = "S");
TObjString *ReadBuffer(const char *file, Long64_t ofs, Int_t len); TObjString *ReadBuffer(const char *file, Long64_t ofs, Int_t len);
TObjString *ReadBuffer(const char *file, const char *pattern); TObjString *ReadBuffer(const char *file, const char *pattern);
Int_t Reset(Bool_t hard = kFALSE, const char *usr = 0); Int_t Reset(Bool_t hard = kFALSE, const char *usr = 0);
Int_t SendMsgToUsers(const char *msg, const char *usr = 0); Int_t SendMsgToUsers(const char *msg, const char *usr = 0);
void SetROOTVersion(const char *tag); void SetROOTVersion(const char *tag);
 End of changes. 2 change blocks. 
1 lines changed or deleted 2 lines changed or added


 TXProofServ.h   TXProofServ.h 
// @(#)root/proofx:$Id: TXProofServ.h 27034 2008-12-19 15:30:06Z ganis $ // @(#)root/proofx:$Id: TXProofServ.h 29233 2009-06-26 08:07:47Z brun $
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2005, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2005, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
#ifndef ROOT_TXProofServ #ifndef ROOT_TXProofServ
#define ROOT_TXProofServ #define ROOT_TXProofServ
skipping to change at line 66 skipping to change at line 66
Bool_t resume = kFALSE); Bool_t resume = kFALSE);
Bool_t HandleError(const void *in = 0); // Error Handler Bool_t HandleError(const void *in = 0); // Error Handler
Bool_t HandleInput(const void *in = 0); // Input handler Bool_t HandleInput(const void *in = 0); // Input handler
void HandleUrgentData(); void HandleUrgentData();
void HandleSigPipe(); void HandleSigPipe();
void HandleTermination(); void HandleTermination();
void ReleaseWorker(const char *ord); void ReleaseWorker(const char *ord);
void SetInputSocket(Bool_t on = kTRUE);
void Terminate(Int_t status); void Terminate(Int_t status);
ClassDef(TXProofServ,0) //XRD PROOF Server Application Interface ClassDef(TXProofServ,0) //XRD PROOF Server Application Interface
}; };
#endif #endif
 End of changes. 2 change blocks. 
2 lines changed or deleted 1 lines changed or added


 TestStatSampler.h   TestStatSampler.h 
skipping to change at line 63 skipping to change at line 63
// Common Initialization // Common Initialization
virtual void Initialize(RooAbsArg& testStatistic, RooArgSet& paramsOf Interest, RooArgSet& nuisanceParameters) = 0; virtual void Initialize(RooAbsArg& testStatistic, RooArgSet& paramsOf Interest, RooArgSet& nuisanceParameters) = 0;
// Set the Pdf, add to the the workspace if not already there // Set the Pdf, add to the the workspace if not already there
virtual void SetPdf(RooAbsPdf&) = 0; virtual void SetPdf(RooAbsPdf&) = 0;
// specify the parameters of interest in the interval // specify the parameters of interest in the interval
virtual void SetParameters(RooArgSet&) = 0; virtual void SetParameters(RooArgSet&) = 0;
// specify the nuisance parameters (eg. the rest of the parameters) // specify the nuisance parameters (eg. the rest of the parameters)
virtual void SetNuisanceParameters(RooArgSet&) = 0; virtual void SetNuisanceParameters(RooArgSet&) = 0;
// specify the observables in the dataset (needed to evaluate the tes
t statistic)
virtual void SetObservables(RooArgSet& ) = 0;
// set the size of the test (rate of Type I error) ( Eg. 0.05 for a 9 5% Confidence Interval) // set the size of the test (rate of Type I error) ( Eg. 0.05 for a 9 5% Confidence Interval)
virtual void SetTestSize(Double_t size) = 0; virtual void SetTestSize(Double_t size) = 0;
// set the confidence level for the interval (eg. 0.95 for a 95% Conf idence Interval) // set the confidence level for the interval (eg. 0.95 for a 95% Conf idence Interval)
virtual void SetConfidenceLevel(Double_t cl) = 0; virtual void SetConfidenceLevel(Double_t cl) = 0;
// Set the TestStatistic (want the argument to be a function of the d ata & parameter points // Set the TestStatistic (want the argument to be a function of the d ata & parameter points
virtual void SetTestStatistic(RooAbsArg&) const = 0; virtual void SetTestStatistic(RooAbsArg&) const = 0;
protected: protected:
 End of changes. 1 change blocks. 
0 lines changed or deleted 3 lines changed or added


 TestStatistic.h   TestStatistic.h 
skipping to change at line 42 skipping to change at line 42
public: public:
// TestStatistic(); // TestStatistic();
virtual ~TestStatistic() {} virtual ~TestStatistic() {}
// Main interface to evaluate the test statistic on a dataset // Main interface to evaluate the test statistic on a dataset
virtual Double_t Evaluate(RooAbsData& data, RooArgSet& paramsOfInterest ) = 0; virtual Double_t Evaluate(RooAbsData& data, RooArgSet& paramsOfInterest ) = 0;
virtual const RooAbsArg* GetTestStatistic() const = 0; virtual const RooAbsArg* GetTestStatistic() const = 0;
virtual const TString GetVarName() const = 0;
protected: protected:
ClassDef(TestStatistic,1) // Interface for tools setting limits (pr oducing confidence intervals) ClassDef(TestStatistic,1) // Interface for tools setting limits (pr oducing confidence intervals)
}; };
} }
#endif #endif
 End of changes. 1 change blocks. 
0 lines changed or deleted 2 lines changed or added


 Timer.h   Timer.h 
// @(#)root/tmva $Id: Timer.h 20882 2007-11-19 11:31:26Z rdm $ // @(#)root/tmva $Id: Timer.h 29195 2009-06-24 10:39:49Z brun $
// Author: Andreas Hoecker, Joerg Stelzer, Helge Voss // Author: Andreas Hoecker, Joerg Stelzer, Helge Voss
/************************************************************************** ******** /************************************************************************** ********
* Project: TMVA - a Root-integrated toolkit for multivariate data analysis * * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
* Package: TMVA * * Package: TMVA *
* Class : Timer * * Class : Timer *
* Web : http://tmva.sourceforge.net * * Web : http://tmva.sourceforge.net *
* * * *
* Description: * * Description: *
* Timing information for methods training * * Timing information for methods training *
skipping to change at line 39 skipping to change at line 39
#define ROOT_TMVA_Timer #define ROOT_TMVA_Timer
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// // // //
// Timer // // Timer //
// // // //
// Timing information for training and evaluation of MVA methods // // Timing information for training and evaluation of MVA methods //
// // // //
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
#ifndef ROOT_time
#include "time.h" #include "time.h"
#endif
#ifndef ROOT_TString
#include "TString.h" #include "TString.h"
#endif
#ifndef ROOT_TStopwatch
#include "TStopwatch.h" #include "TStopwatch.h"
#ifndef ROOT_TMVA_MsgLogger
#include "TMVA/MsgLogger.h"
#endif #endif
// ensure that clock_t is always defined // ensure that clock_t is always defined
#if defined(__SUNPRO_CC) && defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE - 0 == 500 ) #if defined(__SUNPRO_CC) && defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE - 0 == 500 )
#ifndef _CLOCK_T #ifndef _CLOCK_T
#define _CLOCK_T #define _CLOCK_T
typedef long clock_t; // relative time in a specified resolution typedef long clock_t; // relative time in a specified resolution
#endif /* ifndef _CLOCK_T */ #endif /* ifndef _CLOCK_T */
#endif // SUN and XOPENSOURCE=500 #endif // SUN and XOPENSOURCE=500
namespace TMVA { namespace TMVA {
class MsgLogger;
class Timer : public TStopwatch { class Timer : public TStopwatch {
public: public:
Timer( const char* prefix = "", Bool_t colourfulOutput = kTRUE ); Timer( const char* prefix = "", Bool_t colourfulOutput = kTRUE );
Timer( Int_t ncounts, const char* prefix = "", Bool_t colourfulOutput = kTRUE ); Timer( Int_t ncounts, const char* prefix = "", Bool_t colourfulOutput = kTRUE );
virtual ~Timer( void ); virtual ~Timer( void );
void Init ( Int_t ncounts ); void Init ( Int_t ncounts );
void Reset( void ); void Reset( void );
// when the "Scientific" flag set, time is returned with subdecimals // when the "Scientific" flag set, time is returned with subdecimals
// for algorithm timing measurement // for algorithm timing measurement
TString GetElapsedTime ( Bool_t Scientific = kTRUE ); TString GetElapsedTime ( Bool_t Scientific = kTRUE );
TString GetLeftTime ( Int_t icounts ); Double_t ElapsedSeconds ( void );
void DrawProgressBar ( Int_t ); TString GetLeftTime ( Int_t icounts );
void DrawProgressBar ( TString ); void DrawProgressBar( Int_t );
void DrawProgressBar ( void ); void DrawProgressBar( TString );
void DrawProgressBar( void );
private: private:
Double_t ElapsedSeconds( void );
TString SecToText ( Double_t, Bool_t ) const; TString SecToText ( Double_t, Bool_t ) const;
Int_t fNcounts; // reference number of "counts" Int_t fNcounts; // reference number of "counts"
TString fPrefix; // prefix for outputs TString fPrefix; // prefix for outputs
Bool_t fColourfulOutput; // flag for use of colors Bool_t fColourfulOutput; // flag for use of colors
static const TString fgClassName; // used for output static const TString fgClassName; // used for output
static const Int_t fgNbins; // number of bins in progress bar static const Int_t fgNbins; // number of bins in progress bar
MsgLogger* fLogger; // the output logger mutable MsgLogger* fLogger; // the output logger
MsgLogger& Log() const { return *fLogger; }
ClassDef(Timer,0) // Timing information for training and evaluation o f MVA methods ClassDef(Timer,0) // Timing information for training and evaluation o f MVA methods
}; };
} // namespace } // namespace
#endif #endif
 End of changes. 9 change blocks. 
11 lines changed or deleted 16 lines changed or added


 Tools.h   Tools.h 
// @(#)root/tmva $Id: Tools.h 27320 2009-02-02 06:40:36Z brun $ // @(#)root/tmva $Id: Tools.h 29229 2009-06-25 16:11:59Z brun $
// Author: Andreas Hoecker, Joerg Stelzer, Helge Voss, Kai Voss // Author: Andreas Hoecker, Joerg Stelzer, Helge Voss, Kai Voss
/************************************************************************** ******** /************************************************************************** ********
* Project: TMVA - a Root-integrated toolkit for multivariate data analysis * * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
* Package: TMVA * * Package: TMVA *
* Class : Tools * * Class : Tools *
* Web : http://tmva.sourceforge.net * * Web : http://tmva.sourceforge.net *
* * * *
* Description: * * Description: *
* Global auxiliary applications and data treatment routines * * Global auxiliary applications and data treatment routines *
* * * *
* Authors (alphabetical): * * Authors (alphabetical): *
* Andreas Hoecker <Andreas.Hocker@cern.ch> - CERN, Switzerland * * Andreas Hoecker <Andreas.Hocker@cern.ch> - CERN, Switzerland *
* Xavier Prudent <prudent@lapp.in2p3.fr> - LAPP, France *
* Helge Voss <Helge.Voss@cern.ch> - MPI-K Heidelberg, German y * * Helge Voss <Helge.Voss@cern.ch> - MPI-K Heidelberg, German y *
* Kai Voss <Kai.Voss@cern.ch> - U. of Victoria, Canada * * Kai Voss <Kai.Voss@cern.ch> - U. of Victoria, Canada *
* * * *
* Copyright (c) 2005: * * Copyright (c) 2005: *
* CERN, Switzerland * * CERN, Switzerland *
* U. of Victoria, Canada * * U. of Victoria, Canada *
* MPI-K Heidelberg, Germany * * MPI-K Heidelberg, Germany *
* LAPP, Annecy, France *
* * * *
* Redistribution and use in source and binary forms, with or without * * Redistribution and use in source and binary forms, with or without *
* modification, are permitted according to the terms listed in LICENSE * * modification, are permitted according to the terms listed in LICENSE *
* (http://tmva.sourceforge.net/LICENSE) * * (http://tmva.sourceforge.net/LICENSE) *
************************************************************************** ********/ ************************************************************************** ********/
#ifndef ROOT_TMVA_Tools #ifndef ROOT_TMVA_Tools
#define ROOT_TMVA_Tools #define ROOT_TMVA_Tools
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// // // //
// Tools (namespace) // // Tools (namespace) //
// // // //
// Global auxiliary applications and data treatment routines // // Global auxiliary applications and data treatment routines //
// // // //
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
#include <vector> #include <vector>
#include <string> #include <sstream>
#include <iostream>
#include <iomanip>
#ifndef ROOT_TMVA_TXMLEngine
#ifndef ROOT_TXMLEngine
#include "TXMLEngine.h"
#endif
#endif
#ifndef ROOT_TMVA_TMatrixDSymEigen #ifndef ROOT_TMVA_TMatrixDSymEigen
#ifndef ROOT_TMatrixDSymEigen
#include "TMatrixDSymEigen.h" #include "TMatrixDSymEigen.h"
#endif #endif
#ifndef ROOT_TMVA_MsgLogger #endif
#include "TMVA/MsgLogger.h" #ifndef ROOT_TMVA_Types
#include "TMVA/Types.h"
#endif #endif
class TList; class TList;
class TTree; class TTree;
class TString; class TString;
class TH1; class TH1;
class TH2;
class TH2F;
class TSpline; class TSpline;
namespace TMVA { namespace TMVA {
class Event; class Event;
class PDF; class PDF;
class MsgLogger;
class Tools { class Tools {
private: private:
Tools(); Tools();
public: public:
// destructor // destructor
~Tools(); ~Tools();
// accessor to single instance // accessor to single instance
static Tools& Instance() { return fgTools?*(fgTools): *(fgTools = new static Tools& Instance();
Tools()); } static void DestroyInstance();
// simple statistics operations on tree entries // simple statistics operations on tree entries
void ComputeStat( TTree* theTree, const TString theVarName, void ComputeStat( const std::vector<TMVA::Event*>&, std::vector<Floa
Double_t&, Double_t&, Double_t&, t_t>*,
Double_t&, Double_t&, Double_t&, Bool_t nor Double_t&, Double_t&, Double_t&,
m = kFALSE ); Double_t&, Double_t&, Double_t&, Int_t signalClass
, Bool_t norm = kFALSE );
// compute variance from sums // compute variance from sums
inline Double_t ComputeVariance( Double_t sumx2, Double_t sumx, Int_t nx ); inline Double_t ComputeVariance( Double_t sumx2, Double_t sumx, Int_t nx );
// creates histograms normalized to one // creates histograms normalized to one
TH1* ProjNormTH1F( TTree* theTree, TString theVarName, TH1* projNormTH1F( TTree* theTree, const TString& theVarName,
TString name, Int_t nbins, const TString& name, Int_t nbins,
Double_t xmin, Double_t xmax, TString cut ) Double_t xmin, Double_t xmax, const TString& cut )
; ;
// normalize histogram by its integral // normalize histogram by its integral
Double_t NormHist( TH1* theHist, Double_t norm = 1.0 ); Double_t NormHist( TH1* theHist, Double_t norm = 1.0 );
// parser for TString phrase with items separated by a character // parser for TString phrase with items separated by a character
TList* ParseFormatLine( TString theString, const char * sep = ":" ); TList* ParseFormatLine( TString theString, const char * sep = ":" );
// parse option string for ANN methods // parse option string for ANN methods
std::vector<Int_t>* ParseANNOptionString( TString theOptions, Int_t n var, std::vector<Int_t>* ParseANNOptionString( TString theOptions, Int_t n var,
std::vector<Int_t>* nodes ) ; std::vector<Int_t>* nodes ) ;
skipping to change at line 109 skipping to change at line 122
// turns covariance into correlation matrix // turns covariance into correlation matrix
const TMatrixD* GetCorrelationMatrix( const TMatrixD* covMat ); const TMatrixD* GetCorrelationMatrix( const TMatrixD* covMat );
// check spline quality by comparison with initial histogram // check spline quality by comparison with initial histogram
Bool_t CheckSplines( const TH1*, const TSpline* ); Bool_t CheckSplines( const TH1*, const TSpline* );
// normalization of variable output // normalization of variable output
Double_t NormVariable( Double_t x, Double_t xmin, Double_t xmax ); Double_t NormVariable( Double_t x, Double_t xmin, Double_t xmax );
// return separation of two histograms or PDFs // return separation of two histograms
Double_t GetSeparation( const TH1& S, const TH1& B ) const; Double_t GetSeparation( TH1* S, TH1* B ) const;
Double_t GetSeparation( const PDF& pdfS, const PDF& pdfB ) const; Double_t GetSeparation( const PDF& pdfS, const PDF& pdfB ) const;
// vector rescaling // vector rescaling
std::vector<Double_t> MVADiff( std::vector<Double_t>&, std::vector<Do uble_t>& ); std::vector<Double_t> MVADiff( std::vector<Double_t>&, std::vector<Do uble_t>& );
void Scale( std::vector<Double_t>&, Double_t ); void Scale( std::vector<Double_t>&, Double_t );
void Scale( std::vector<Float_t>&, Float_t ); void Scale( std::vector<Float_t>&, Float_t );
// re-arrange a vector of arrays (vectors) in a way such that the fir st array // re-arrange a vector of arrays (vectors) in a way such that the fir st array
// is ordered, and the other arrays reshuffeld accordingly // is ordered, and the other arrays reshuffeld accordingly
void UsefulSortDescending( std::vector< std::vector<Double_t> >&, std ::vector<TString>* vs = 0 ); void UsefulSortDescending( std::vector< std::vector<Double_t> >&, std ::vector<TString>* vs = 0 );
void UsefulSortAscending ( std::vector< std::vector<Double_t> >& ); void UsefulSortAscending ( std::vector< std::vector<Double_t> >&, std ::vector<TString>* vs = 0 );
void UsefulSortDescending( std::vector<Double_t>& ); void UsefulSortDescending( std::vector<Double_t>& );
void UsefulSortAscending ( std::vector<Double_t>& ); void UsefulSortAscending ( std::vector<Double_t>& );
Int_t GetIndexMaxElement ( std::vector<Double_t>& ); Int_t GetIndexMaxElement ( std::vector<Double_t>& );
Int_t GetIndexMinElement ( std::vector<Double_t>& ); Int_t GetIndexMinElement ( std::vector<Double_t>& );
// check if input string contains regular expression // check if input string contains regular expression
Bool_t ContainsRegularExpression( const TString& s ); Bool_t ContainsRegularExpression( const TString& s );
TString ReplaceRegularExpressions( const TString& s, const TString& r eplace = "+" ); TString ReplaceRegularExpressions( const TString& s, const TString& r eplace = "+" );
// routines for formatted output ----------------- // routines for formatted output -----------------
void FormattedOutput( const std::vector<Double_t>&, const std::vector <TString>&, void FormattedOutput( const std::vector<Double_t>&, const std::vector <TString>&,
const TString titleVars, const TString titleVal ues, MsgLogger& logger, const TString titleVars, const TString titleVal ues, MsgLogger& logger,
TString format = "%+1.3f" ); TString format = "%+1.3f" );
void FormattedOutput( const TMatrixD&, const std::vector<TString>&, M sgLogger& logger ); void FormattedOutput( const TMatrixD&, const std::vector<TString>&, M sgLogger& logger );
void FormattedOutput( const TMatrixD&, const std::vector<TString>& ve
rt, const std::vector<TString>& horiz,
MsgLogger& logger );
void WriteFloatArbitraryPrecision( Float_t val, ostream& os ); void WriteFloatArbitraryPrecision( Float_t val, ostream& os );
void ReadFloatArbitraryPrecision ( Float_t& val, istream& is ); void ReadFloatArbitraryPrecision ( Float_t& val, istream& is );
// check variable range and set var to lower or upper if out of range // for histogramming
template<typename T> TString GetXTitleWithUnit( const TString& title, const TString& unit
inline Bool_t VerifyRange( MsgLogger& mlog, const char *varstr, T& va );
r, T vmin, T vmax ); TString GetYTitleWithUnit( const TH1& h, const TString& unit, Bool_t
normalised );
template<typename T>
inline Bool_t VerifyRange( MsgLogger& mlog, const char *varstr, T& va // Mutual Information method for non-linear correlations estimates in
r, T vmin, T vmax, T vdef ); 2D histogram
// Author: Moritz Backes, Geneva (2009)
template<typename T> Double_t GetMutualInformation( const TH2F& );
inline Int_t VerifyRange( T& var, T vmin, T vmax );
// Correlation Ratio method for non-linear correlations estimates in
// output logger 2D histogram
MsgLogger& Logger() const; // Author: Moritz Backes, Geneva (2009)
Double_t GetCorrelationRatio( const TH2F& );
TH2F* TransposeHist ( const TH2F& );
// check if "silent" or "verbose" option in configuration string
Bool_t CheckForSilentOption ( const TString& ) const;
Bool_t CheckForVerboseOption( const TString& ) const;
// color information
const TString& Color( const TString& ); const TString& Color( const TString& );
// print welcome message (to be called from, eg, .TMVAlogon) // print welcome message (to be called from, eg, .TMVAlogon)
enum EWelcomeMessage { kStandardWelcomeMsg = 1, enum EWelcomeMessage { kStandardWelcomeMsg = 1,
kIsometricWelcomeMsg, kIsometricWelcomeMsg,
kBlockWelcomeMsg, kBlockWelcomeMsg,
kLeanWelcomeMsg, kLeanWelcomeMsg,
kLogoWelcomeMsg, kLogoWelcomeMsg,
kSmall1WelcomeMsg, kSmall1WelcomeMsg,
kSmall2WelcomeMsg, kSmall2WelcomeMsg,
kOriginalWelcomeMsgColor, kOriginalWelcomeMsgColor,
kOriginalWelcomeMsgBW }; kOriginalWelcomeMsgBW };
void TMVAWelcomeMessage(); void TMVAWelcomeMessage();
void TMVAWelcomeMessage( MsgLogger& logger, EWelcomeMessage m = kStan dardWelcomeMsg ); void TMVAWelcomeMessage( MsgLogger& logger, EWelcomeMessage m = kStan dardWelcomeMsg );
void TMVAVersionMessage( MsgLogger& logger ); void TMVAVersionMessage( MsgLogger& logger );
void ROOTVersionMessage( MsgLogger& logger ); void ROOTVersionMessage( MsgLogger& logger );
const TString fRegexp; // string tools
mutable MsgLogger* fLogger;
static Tools* fgTools; std::vector<TString> SplitString( const TString& theOpt, const char s
eparator ) const;
// variables
const TString fRegexp;
mutable MsgLogger* fLogger;
MsgLogger& Log() const { return *fLogger; }
static Tools* fgTools;
// xml tools
TString StringFromInt ( Long_t i );
TString StringFromDouble ( Double_t d );
void WriteTMatrixDToXML ( void* node, const char* name, TMatri
xD* mat );
void WriteTVectorDToXML ( void* node, const char* name, TVecto
rD* vec );
void ReadTMatrixDFromXML( void* node, const char* name, TMatri
xD* mat );
void ReadTVectorDFromXML( void* node, const char* name, TVecto
rD* vec );
Bool_t HistoHasEquidistantBins(const TH1& h);
template<typename T>
void ReadAttr ( void* node, const char* , T& value );
template<typename T>
void AddAttr ( void* node, const char* , const T& value, I
nt_t precision = 16 );
void* AddChild ( void* parent, const char* childname, const
char* content = 0 );
void* GetChild ( void* parent, const char* childname=0 );
void* GetNextChild( void* prevchild, const char* childname=0 );
const char* GetContent ( void* node );
TXMLEngine& xmlengine() { return *fXMLEngine; }
TXMLEngine* fXMLEngine;
private:
// utilities for correlation ratio
Double_t GetYMean_binX( const TH2& , Int_t bin_x );
}; // Common tools }; // Common tools
#if !defined(__CINT__) || defined(__MAKECINT__)
Tools& gTools(); // global accessor Tools& gTools(); // global accessor
#endif
} // namespace TMVA } // namespace TMVA
//_______________________________________________________________________ //_______________________________________________________________________
inline Double_t TMVA::Tools::ComputeVariance( Double_t sumx2, Double_t sumx
, Int_t nx )
{
// compute variance from given sums
if (nx<2) return 0;
return (sumx2 - ((sumx*sumx)/static_cast<Double_t>(nx)))/static_cast<Dou
ble_t>(nx-1);
}
//_______________________________________________________________________
template<typename T> template<typename T>
inline Int_t TMVA::Tools::VerifyRange( T& var, T vmin, T vmax ) void TMVA::Tools::ReadAttr( void* node, const char* attrname, T& value )
{ {
// check range and return +1 if above, -1 if below or 0 if inside // add attribute from xml
if (var>vmax) return 1; const char* val = xmlengine().GetAttr(node, attrname);
if (var<vmin) return -1; std::stringstream s(val);
return 0; s >> value;
} }
//_______________________________________________________________________ //_______________________________________________________________________
template<typename T> template<typename T>
inline Bool_t TMVA::Tools::VerifyRange( TMVA::MsgLogger& mlog, const char * varstr, T& var, T vmin, T vmax ) void TMVA::Tools::AddAttr( void* node, const char* attrname, const T& value , Int_t precision )
{ {
// verify range and print out message // add attribute to xml
// if outside range, set to closest limit std::stringstream s;
Int_t dir = TMVA::Tools::VerifyRange(var,vmin,vmax); s.precision( precision );
Bool_t modif=kFALSE; s << std::scientific << value;
if (dir==1) { gTools().xmlengine().NewAttr(node, 0, attrname, s.str().c_str());
modif = kTRUE;
var=vmax;
}
if (dir==-1) {
modif = kTRUE;
var=vmin;
}
if (modif) {
mlog << kWARNING << "Option <" << varstr << "> " << (dir==1 ? "above"
:"below") << " allowed range. Reset to new value = " << var << Endl;
}
return modif;
} }
//_______________________________________________________________________ //_______________________________________________________________________
template<typename T> inline Double_t TMVA::Tools::ComputeVariance( Double_t sumx2, Double_t sumx
inline Bool_t TMVA::Tools::VerifyRange( TMVA::MsgLogger& mlog, const char * , Int_t nx )
varstr, T& var, T vmin, T vmax, T vdef )
{ {
// verify range and print out message // compute variance from given sums
// if outside range, set to given default value if (nx<2) return 0;
Int_t dir = TMVA::Tools::VerifyRange(var,vmin,vmax); return (sumx2 - ((sumx*sumx)/static_cast<Double_t>(nx)))/static_cast<Dou
Bool_t modif=kFALSE; ble_t>(nx-1);
if (dir!=0) {
modif = kTRUE;
var=vdef;
}
if (modif) {
mlog << kWARNING << "Option <" << varstr << "> " << (dir==1 ? "above"
:"below") << " allowed range. Reset to default value = " << var << Endl;
}
return modif;
} }
#endif #endif
 End of changes. 29 change blocks. 
88 lines changed or deleted 118 lines changed or added


 ToyMCSampler.h   ToyMCSampler.h 
skipping to change at line 23 skipping to change at line 23
#define ROOSTATS_ToyMCSampler #define ROOSTATS_ToyMCSampler
//_________________________________________________ //_________________________________________________
/* /*
BEGIN_HTML BEGIN_HTML
<p> <p>
ToyMCSampler is a simple implementation of the TestStatSampler interface. ToyMCSampler is a simple implementation of the TestStatSampler interface.
It generates Toy Monte Carlo for a given parameter point, and evaluates a It generates Toy Monte Carlo for a given parameter point, and evaluates a
test statistic that the user specifies (passed via the RooStats::TestStatis tic interface). test statistic that the user specifies (passed via the RooStats::TestStatis tic interface).
We need to provide a nice way for the user to: Development notes: We need to provide a nice way for the user to:
<ul> <ul>
<li>specify the number of toy experiments (needed to probe a given confid ence level)</li> <li>specify the number of toy experiments (needed to probe a given confid ence level)</li>
<li>specify if the number of events per toy experiment should be fixed (c onditioning) or floating (unconditional)</li> <li>specify if the number of events per toy experiment should be fixed (c onditioning) or floating (unconditional)</li>
<li>specify if any auxiliary observations should be fixed (conditioning) or floating (unconditional)</li> <li>specify if any auxiliary observations should be fixed (conditioning) or floating (unconditional)</li>
<li>specify if nuisance paramters should be part of the toy MC: eg: integ rated out (Bayesian marginalization)</li> <li>specify if nuisance paramters should be part of the toy MC: eg: integ rated out (Bayesian marginalization)</li>
</ul> </ul>
All of these should be made fairly explicit in the interface. All of these should be made fairly explicit in the interface.
</p> </p>
END_HTML END_HTML
skipping to change at line 49 skipping to change at line 49
#endif #endif
#include <vector> #include <vector>
#include <sstream> #include <sstream>
#include "RooStats/TestStatSampler.h" #include "RooStats/TestStatSampler.h"
#include "RooStats/SamplingDistribution.h" #include "RooStats/SamplingDistribution.h"
#include "RooStats/TestStatistic.h" #include "RooStats/TestStatistic.h"
#include "RooStats/RooStatsUtils.h" #include "RooStats/RooStatsUtils.h"
#ifndef __CINT__
#include "RooGlobalFunc.h" #include "RooGlobalFunc.h"
#endif
#include "RooWorkspace.h" #include "RooWorkspace.h"
#include "RooMsgService.h"
#include "RooAbsPdf.h"
#include "TRandom.h" #include "TRandom.h"
#include "RooDataSet.h" #include "RooDataSet.h"
namespace RooStats { namespace RooStats {
class ToyMCSampler : public TestStatSampler { class ToyMCSampler : public TestStatSampler {
public: public:
ToyMCSampler(TestStatistic &ts) { ToyMCSampler(TestStatistic &ts) {
fTestStat = &ts; fTestStat = &ts;
fWS = new RooWorkspace(); fWS = new RooWorkspace();
fOwnsWorkspace = true; fOwnsWorkspace = true;
fDataName = ""; fDataName = "";
fPdfName = ""; fPdfName = "";
fPOI = 0; fPOI = 0;
fNuisParams=0; fNuisParams=0;
fObservables=0;
fExtended = kTRUE; fExtended = kTRUE;
fRand = new TRandom(); fRand = new TRandom();
fCounter=0; fCounter=0;
fVarName = fTestStat->GetVarName();
fLastDataSet = 0;
} }
virtual ~ToyMCSampler() { virtual ~ToyMCSampler() {
if(fOwnsWorkspace) delete fWS; if(fOwnsWorkspace) delete fWS;
if(fRand) delete fRand; if(fRand) delete fRand;
if(fLastDataSet) delete fLastDataSet;
} }
// Extended interface to append to sampling distribution more samples // Extended interface to append to sampling distribution more samples
virtual SamplingDistribution* AppendSamplingDistribution(RooArgSet& all Parameters, virtual SamplingDistribution* AppendSamplingDistribution(RooArgSet& all Parameters,
SamplingDistrib ution* last, SamplingDistrib ution* last,
Int_t additiona lMC) { Int_t additiona lMC) {
Int_t tmp = fNtoys; Int_t tmp = fNtoys;
fNtoys = additionalMC; fNtoys = additionalMC;
SamplingDistribution* newSamples = GetSamplingDistribution(allParamet ers); SamplingDistribution* newSamples = GetSamplingDistribution(allParamet ers);
skipping to change at line 97 skipping to change at line 105
if(last){ if(last){
last->Add(newSamples); last->Add(newSamples);
delete newSamples; delete newSamples;
return last; return last;
} }
return newSamples; return newSamples;
} }
// Main interface to get a SamplingDistribution // Main interface to get a SamplingDistribution
virtual SamplingDistribution* GetSamplingDistribution(RooArgSet& allPar ameters) { virtual SamplingDistribution* GetSamplingDistribution(RooArgSet& allPar ameters) {
std::vector<Double_t> testStatVec; std::vector<Double_t> testStatVec;
// cout << " about to generate sampling dist " << endl; // cout << " about to generate sampling dist " << endl;
RooMsgService::instance().setGlobalKillBelow(RooMsgService::ERROR) ; RooMsgService::instance().setGlobalKillBelow(RooFit::ERROR) ;
RooMsgService::instance().setGlobalKillBelow(RooMsgService::DEBUG) ;
for(Int_t i=0; i<fNtoys; ++i){ for(Int_t i=0; i<fNtoys; ++i){
//cout << " on toy number " << i << endl; //cout << " on toy number " << i << endl;
// RooAbsData* toydata = (RooAbsData*)GenerateToyData(allParame ters); // RooAbsData* toydata = (RooAbsData*)GenerateToyData(allParame ters);
// testStatVec.push_back( fTestStat->Evaluate(*toydata, allPara meters) ); // testStatVec.push_back( fTestStat->Evaluate(*toydata, allPara meters) );
// delete toydata; // delete toydata;
RooDataSet* toydata = (RooDataSet*)GenerateToyData(allParameters); RooDataSet* toydata = (RooDataSet*)GenerateToyData(allParameters);
testStatVec.push_back( fTestStat->Evaluate(*toydata, allParameters) ); testStatVec.push_back( fTestStat->Evaluate(*toydata, allParameters) );
delete toydata;
// want to clean up memory, but delete toydata causes problem with
// nll->setData(data, noclone) because pointer to last data set is n
o longer valid
// delete toydata;
// instead, delete previous data set
if(fLastDataSet) delete fLastDataSet;
fLastDataSet = toydata;
} }
// cout << " generated sampling dist " << endl; // cout << " generated sampling dist " << endl;
return new SamplingDistribution( MakeName(allParameters), return new SamplingDistribution( "temp",//MakeName(allParameters).c_s
"Sampling Distribution of Test Statist tr(),
ic", testStatVec ); "Sampling Distribution of Test Statis
tic", testStatVec, fVarName );
} }
virtual RooAbsData* GenerateToyData(RooArgSet& allParameters) const { virtual RooAbsData* GenerateToyData(RooArgSet& allParameters) const {
// This method generates a toy dataset for the given parameter point .
// cout << "fNevents = " << fNevents << endl; // cout << "fNevents = " << fNevents << endl;
RooAbsPdf* pdf = fWS->pdf(fPdfName); RooAbsPdf* pdf = fWS->pdf(fPdfName);
// need a nicer way to specify observables in the dataset if(!fObservables){
RooArgSet* observables = pdf->getVariables(); cout << "Observables not specified in ToyMCSampler, will try to det
ermine. "
// Set the parameters to desired values for generating toys << "Will ignore all constant parameters, parameters of interes
RooStats::SetParameters(&allParameters, observables); t, and nuisance parameters." << endl;
RooArgSet* observables = pdf->getVariables();
if(fPOI) observables->remove(*fPOI, kFALSE, kTRUE); RemoveConstantParameters(observables); // observables might be set
if(fNuisParams) observables->remove(*fNuisParams, kFALSE, kTRUE); constant, this is just a guess
// observables->Print("verbose"); if(fPOI) observables->remove(*fPOI, kFALSE, kTRUE);
if(fNuisParams) observables->remove(*fNuisParams, kFALSE, kTRUE);
cout << "will use the following as observables when generating data
" << endl;
observables->Print();
fObservables=observables;
}
//fluctuate the number of events if fExtended is on. //fluctuate the number of events if fExtended is on.
// This is a bit slippery for number counting expts. where entry in data and // This is a bit slippery for number counting expts. where entry in data and
// model is number of events, and so number of entries in data alway s =1. // model is number of events, and so number of entries in data alway s =1.
Int_t nEvents = fNevents; Int_t nEvents = fNevents;
if(fExtended) { if(fExtended) {
if( pdf->expectedEvents(*observables) > 0){ if( pdf->expectedEvents(*fObservables) > 0){
// if PDF knows expected events use it instead // if PDF knows expected events use it instead
nEvents = fRand->Poisson(pdf->expectedEvents(*observables)); nEvents = fRand->Poisson(pdf->expectedEvents(*fObservables));
} else{ } else{
nEvents = fRand->Poisson(fNevents); nEvents = fRand->Poisson(fNevents);
} }
} }
// Set the parameters to desired values for generating toys
RooArgSet* parameters = pdf->getParameters(fObservables);
RooStats::SetParameters(&allParameters, parameters);
/* /*
cout << "expected events = " << pdf->expectedEvents(*observables) cout << "expected events = " << pdf->expectedEvents(*observables)
<< "fExtended = " << fExtended << "fExtended = " << fExtended
<< "fNevents = " << fNevents << " fNevents " << "fNevents = " << fNevents << " fNevents "
<< "generating" << nEvents << " events " << endl; << "generating" << nEvents << " events " << endl;
*/ */
RooAbsData* data = (RooAbsData*)pdf->generate(*observables, nEvents) RooFit::MsgLevel level = RooMsgService::instance().globalKillBelow()
; ;
delete observables; RooMsgService::instance().setGlobalKillBelow(RooFit::ERROR) ;
// delete pdf;
// cout << "nEvents = " << nEvents << endl;
RooAbsData* data = (RooAbsData*)pdf->generate(*fObservables, nEvents
);
RooMsgService::instance().setGlobalKillBelow(level) ;
delete parameters;
return data; return data;
} }
// helper method to create meaningful names for sampling dist // helper method to create meaningful names for sampling dist
const char* MakeName(RooArgSet& /*params*/){ string MakeName(RooArgSet& /*params*/){
/*
std::string name;
TIter itr = params.createIterator();
RooRealVar* myarg;
while ((myarg = (RooRealVar *)itr.Next())) {
name += myarg->GetName();
std::stringstream str;
str<<"_"<< myarg->getVal() << "__";
name += str.str();
}
*/
std::stringstream str; std::stringstream str;
str<<"SamplingDist_"<< fCounter; str<<"SamplingDist_"<< fCounter;
fCounter++; fCounter++;
return str.str().c_str();
// WVE -- Return pointer to static buffer
static char buf[1024] ;
strcpy(buf,str.str().c_str()) ;
return buf ;
} }
// Main interface to evaluate the test statistic on a dataset // Main interface to evaluate the test statistic on a dataset
virtual Double_t EvaluateTestStatistic(RooAbsData& data, RooArgSet& al lParameters) { virtual Double_t EvaluateTestStatistic(RooAbsData& data, RooArgSet& al lParameters) {
return fTestStat->Evaluate(data, allParameters); return fTestStat->Evaluate(data, allParameters);
} }
// Get the TestStatistic // Get the TestStatistic
virtual const RooAbsArg* GetTestStatistic() const { virtual const RooAbsArg* GetTestStatistic() const {
return fTestStat->GetTestStatistic();} return fTestStat->GetTestStatistic();}
skipping to change at line 239 skipping to change at line 256
// specify the name of the dataset in the workspace to be used // specify the name of the dataset in the workspace to be used
virtual void SetData(const char* name) {fDataName = name;} virtual void SetData(const char* name) {fDataName = name;}
// specify the name of the PDF in the workspace to be used // specify the name of the PDF in the workspace to be used
virtual void SetPdf(const char* name) {fPdfName = name;} virtual void SetPdf(const char* name) {fPdfName = name;}
// specify the parameters of interest in the interval // specify the parameters of interest in the interval
virtual void SetParameters(RooArgSet& set) {fPOI = &set;} virtual void SetParameters(RooArgSet& set) {fPOI = &set;}
// specify the nuisance parameters (eg. the rest of the parameters) // specify the nuisance parameters (eg. the rest of the parameters)
virtual void SetNuisanceParameters(RooArgSet& set) {fNuisParams = &se t;} virtual void SetNuisanceParameters(RooArgSet& set) {fNuisParams = &se t;}
// specify the observables in the dataset (needed to evaluate the tes
t statistic)
virtual void SetObservables(RooArgSet& set) {fObservables = &set;}
// set the size of the test (rate of Type I error) ( Eg. 0.05 for a 9 5% Confidence Interval) // set the size of the test (rate of Type I error) ( Eg. 0.05 for a 9 5% Confidence Interval)
virtual void SetTestSize(Double_t size) {fSize = size;} virtual void SetTestSize(Double_t size) {fSize = size;}
// set the confidence level for the interval (eg. 0.95 for a 95% Conf idence Interval) // set the confidence level for the interval (eg. 0.95 for a 95% Conf idence Interval)
virtual void SetConfidenceLevel(Double_t cl) {fSize = 1.-cl;} virtual void SetConfidenceLevel(Double_t cl) {fSize = 1.-cl;}
// Set the TestStatistic (want the argument to be a function of the d ata & parameter points // Set the TestStatistic (want the argument to be a function of the d ata & parameter points
virtual void SetTestStatistic(RooAbsArg&) const {} virtual void SetTestStatistic(RooAbsArg&) const {}
private: private:
Double_t fSize; Double_t fSize;
RooWorkspace* fWS; // a workspace that owns all the components to be used by the calculator RooWorkspace* fWS; // a workspace that owns all the components to be used by the calculator
Bool_t fOwnsWorkspace; // flag if this object owns its workspace Bool_t fOwnsWorkspace; // flag if this object owns its workspace
const char* fPdfName; // name of common PDF in workspace const char* fPdfName; // name of common PDF in workspace
const char* fDataName; // name of data set in workspace const char* fDataName; // name of data set in workspace
RooArgSet* fPOI; // RooArgSet specifying parameters of interest for interval RooArgSet* fPOI; // RooArgSet specifying parameters of interest for interval
RooArgSet* fNuisParams;// RooArgSet specifying nuisance parameters f or interval RooArgSet* fNuisParams;// RooArgSet specifying nuisance parameters f or interval
TestStatistic* fTestStat; mutable RooArgSet* fObservables; // RooArgSet specifying the observab
Int_t fNtoys; les in the dataset (needed to evaluate the test statistic)
Int_t fNevents; TestStatistic* fTestStat; // pointer to the test statistic that is be
Bool_t fExtended; ing sampled
TRandom* fRand; Int_t fNtoys; // number of toys to generate
Int_t fNevents; // number of events per toy (may be ignored depending
on settings)
Bool_t fExtended; // if nEvents should fluctuate
TRandom* fRand; // random generator
TString fVarName; // name of test statistic
Int_t fCounter; // counter for naming sampling dist objects
Int_t fCounter; RooDataSet* fLastDataSet; // work around for memory issues in nllvar- >setData(data, noclone)
protected: protected:
ClassDef(ToyMCSampler,1) // A simple implementation of the TestStat Sampler interface ClassDef(ToyMCSampler,1) // A simple implementation of the TestStat Sampler interface
}; };
} }
#endif #endif
 End of changes. 23 change blocks. 
45 lines changed or deleted 79 lines changed or added


 TypeBase.h   TypeBase.h 
// @(#)root/reflex:$Id: TypeBase.h 28064 2009-04-02 13:31:29Z axel $ // @(#)root/reflex:$Id: TypeBase.h 28733 2009-05-28 04:34:44Z pcanal $
// Author: Stefan Roiser 2004 // Author: Stefan Roiser 2004
// Copyright CERN, CH-1211 Geneva 23, 2004-2006, All rights reserved. // Copyright CERN, CH-1211 Geneva 23, 2004-2006, All rights reserved.
// //
// Permission to use, copy, modify, and distribute this software for any // Permission to use, copy, modify, and distribute this software for any
// purpose is hereby granted without fee, provided that this copyright and // purpose is hereby granted without fee, provided that this copyright and
// permissions notice appear in all copies and derivatives. // permissions notice appear in all copies and derivatives.
// //
// This software is provided "as is" without express or implied warranty. // This software is provided "as is" without express or implied warranty.
skipping to change at line 136 skipping to change at line 136
*/ */
Type FinalType() const; Type FinalType() const;
/** /**
* GenerateDict will produce the dictionary information of this type * GenerateDict will produce the dictionary information of this type
* @param generator a reference to the dictionary generator instance * @param generator a reference to the dictionary generator instance
*/ */
virtual void GenerateDict(DictionaryGenerator &generator) const; virtual void GenerateDict(DictionaryGenerator &generator) const;
/** /**
* GetBasePosition will return fBasePosition
* @return The position where the unscoped Name starts in the typenam
e
*/
size_t GetBasePosition() const;
/**
* IsAbstract will return true if the the class is abstract * IsAbstract will return true if the the class is abstract
* @return true if the class is abstract * @return true if the class is abstract
*/ */
virtual bool IsAbstract() const; virtual bool IsAbstract() const;
/** /**
* IsArray returns true if the At represents a Array * IsArray returns true if the At represents a Array
* @return true if At represents a Array * @return true if At represents a Array
*/ */
bool IsArray() const; bool IsArray() const;
skipping to change at line 495 skipping to change at line 501
#include "Reflex/TypeTemplate.h" #include "Reflex/TypeTemplate.h"
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline size_t Reflex::TypeBase::CalculateSize() const { inline size_t Reflex::TypeBase::CalculateSize() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return fSize; return fSize;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline size_t Reflex::TypeBase::GetBasePosition() const {
//-------------------------------------------------------------------------
------
return fBasePosition;
}
//-------------------------------------------------------------------------
------
inline bool Reflex::TypeBase::IsAbstract() const { inline bool Reflex::TypeBase::IsAbstract() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return false; return false;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline bool Reflex::TypeBase::IsArray() const { inline bool Reflex::TypeBase::IsArray() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return ( fTypeType == ARRAY ); return ( fTypeType == ARRAY );
} }
 End of changes. 3 change blocks. 
1 lines changed or deleted 16 lines changed or added


 Types.h   Types.h 
// @(#)root/tmva $Id: Types.h 26050 2008-11-01 09:18:41Z brun $ // @(#)root/tmva $Id: Types.h 29195 2009-06-24 10:39:49Z brun $
// Author: Andreas Hoecker, Joerg Stelzer, Helge Voss // Author: Andreas Hoecker, Joerg Stelzer, Helge Voss
/************************************************************************** ******** /************************************************************************** ********
* Project: TMVA - a Root-integrated toolkit for multivariate data analysis * * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
* Package: TMVA * * Package: TMVA *
* Class : Types * * Class : Types *
* Web : http://tmva.sourceforge.net * * Web : http://tmva.sourceforge.net *
* * * *
* Description: * * Description: *
* GLobal types (singleton class) * * GLobal types (singleton class) *
skipping to change at line 33 skipping to change at line 33
* Redistribution and use in source and binary forms, with or without * * Redistribution and use in source and binary forms, with or without *
* modification, are permitted according to the terms listed in LICENSE * * modification, are permitted according to the terms listed in LICENSE *
* (http://mva.sourceforge.net/license.txt) * * (http://mva.sourceforge.net/license.txt) *
************************************************************************** ********/ ************************************************************************** ********/
#ifndef ROOT_TMVA_Types #ifndef ROOT_TMVA_Types
#define ROOT_TMVA_Types #define ROOT_TMVA_Types
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// // // //
// Singleton class for TMVA typedefs and enums // // Types //
// //
// Singleton class for Global types used by TMVA //
// // // //
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
#include <map>
#ifndef ROOT_Rtypes
#include "Rtypes.h" #include "Rtypes.h"
#include "TString.h" #endif
#ifndef ROOT_TMVA_MsgLogger #ifndef ROOT_TString
#include "TMVA/MsgLogger.h" #include "TString.h"
#endif #endif
namespace TMVA { namespace TMVA {
class MsgLogger;
// message types for MsgLogger
// define outside of Types class to facilite access
enum EMsgType {
kDEBUG = 1,
kVERBOSE = 2,
kINFO = 3,
kWARNING = 4,
kERROR = 5,
kFATAL = 6,
kSILENT = 7
};
class Types { class Types {
public: public:
// available MVA methods in TMVA // available MVA methods
enum EMVA { enum EMVA {
kVariable = 0, kVariable = 0,
kCuts , kCuts ,
kSeedDistance , kSeedDistance ,
kLikelihood , kLikelihood ,
kPDERS , kPDERS ,
kHMatrix , kHMatrix ,
kFisher , kFisher ,
kKNN , kKNN ,
kCFMlpANN , kCFMlpANN ,
kTMlpANN , kTMlpANN ,
kBDT , kBDT ,
kDT ,
kRuleFit , kRuleFit ,
kSVM , kSVM ,
kMLP , kMLP ,
kBayesClassifier, kBayesClassifier,
kFDA , kFDA ,
kCommittee , kCommittee ,
kMaxMethod , kBoost ,
kPlugins kPDEFoam ,
kLD ,
kPlugins ,
kMaxMethod
}; };
// available variable transformations
enum EVariableTransform { enum EVariableTransform {
kNone = 0, kIdentity = 0,
kDecorrelated, kDecorrelated,
kNormalized,
kPCA, kPCA,
kMaxVariableTransform, kGaussDecorr,
kGaussDecorr kMaxVariableTransform
};
// type of analysis
enum EAnalysisType {
kClassification = 0,
kRegression,
kNoAnalysisType,
kMaxAnalysisType
}; };
enum ESBType { enum ESBType {
kSignal = 0, // Never change this number - it is elsewhere assume d to be zero ! kSignal = 0, // Never change this number - it is elsewhere assume d to be zero !
kBackground, kBackground,
kSBBoth, kSBBoth,
kMaxSBType, kMaxSBType,
kTrueType kTrueType
}; };
enum ETreeType { kTraining = 0, kTesting, kMaxTreeType }; enum ETreeType {
kTraining = 0,
kTesting,
kMaxTreeType,
kValidation,
kTrainingOriginal
};
enum EBoostStage {
kBoostProcBegin=0,
kBeforeTraining,
kBeforeBoosting,
kAfterBoosting,
kBoostValidation,
kBoostProcEnd
};
public: public:
static Types& Instance() { return fgTypesPtr ? *fgTypesPtr : *(fgType sPtr = new Types()); } static Types& Instance() { return fgTypesPtr ? *fgTypesPtr : *(fgType sPtr = new Types()); }
~Types() {} static void DestroyInstance() { if (fgTypesPtr != 0) { delete fgTyp
esPtr; fgTypesPtr = 0; } }
~Types();
Types::EMVA GetMethodType( const TString& method ) const;
TString GetMethodName( Types::EMVA method ) const;
TMVA::Types::EMVA GetMethodType( const TString& method ) const; Bool_t AddTypeMapping(Types::EMVA method, const TString& metho dname);
private: private:
Types(); Types();
static Types* fgTypesPtr; static Types* fgTypesPtr;
private: private:
std::map<TString, TMVA::Types::EMVA> fStr2type; // types-to-text map std::map<TString, TMVA::Types::EMVA> fStr2type; // types-to-text map
mutable MsgLogger fLogger; // message logger mutable MsgLogger* fLogger; // message logger
MsgLogger& Log() const { return *fLogger; }
}; };
} }
#endif #endif
 End of changes. 17 change blocks. 
16 lines changed or deleted 69 lines changed or added


 UnBinData.h   UnBinData.h 
// @(#)root/mathcore:$Id: UnBinData.h 27169 2009-01-16 09:46:05Z moneta $ // @(#)root/mathcore:$Id: UnBinData.h 28946 2009-06-11 15:39:14Z moneta $
// Author: L. Moneta Wed Aug 30 11:15:23 2006 // Author: L. Moneta Wed Aug 30 11:15:23 2006
/********************************************************************** /**********************************************************************
* * * *
* Copyright (c) 2006 LCG ROOT Math Team, CERN/PH-SFT * * Copyright (c) 2006 LCG ROOT Math Team, CERN/PH-SFT *
* * * *
* * * *
**********************************************************************/ **********************************************************************/
// Header file for class UnBinData // Header file for class UnBinData
#ifndef ROOT_Fit_UnBinData #ifndef ROOT_Fit_UnBinData
#define ROOT_Fit_UnBinData #define ROOT_Fit_UnBinData
#ifndef ROOT_Fit_DataVector #ifndef ROOT_Fit_DataVector
#include "Fit/DataVector.h" #include "Fit/DataVector.h"
#endif #endif
#ifndef ROOT_Math_Error
#include "Math/Error.h"
#endif
namespace ROOT { namespace ROOT {
namespace Fit { namespace Fit {
//_________________________________________________________________________ __________ //_________________________________________________________________________ __________
/** /**
Class describing the unbinned data sets (just x coordinates values) of a ny dimensions Class describing the unbinned data sets (just x coordinates values) of a ny dimensions
There is the option to construct UnBindata copying the data i n (using the DataVector class) There is the option to construct UnBindata copying the data i n (using the DataVector class)
or using pointer to external data (DataWrapper) class. or using pointer to external data (DataWrapper) class.
In general is found to be more efficient to copy the data. In general is found to be more efficient to copy the data.
In case of really large data sets for limiting memory consump tion then the other option can be used In case of really large data sets for limiting memory consump tion then the other option can be used
Specialized constructor exists for using external data up to 3 dimensions. Specialized constructor exists for using external data up to 3 dimensions.
When the data are copying in the number of points can be set later (or re-set) using Initialize and When the data are copying in the number of points can be set later (or re-set) using Initialize and
the data are pushed in (one by one) using the Add method. the data are inserted one by one using the Add method.
It is mandatory to set the size before using the Add method.
@ingroup FitData @ingroup FitData
*/ */
class UnBinData : public FitData { class UnBinData : public FitData {
public : public :
/** /**
constructor from dimension of point and max number of points (to pre -allocate vector) constructor from dimension of point and max number of points (to pre -allocate vector)
*/ */
explicit UnBinData(unsigned int maxpoints = 0, unsigned int dim = 1 ); explicit UnBinData(unsigned int maxpoints = 0, unsigned int dim = 1 );
/** /**
constructor from option and default range constructor from range and default option
*/ */
explicit UnBinData (const DataOptions & opt, unsigned int maxpoints = 0 , unsigned int dim = 1); explicit UnBinData (const DataRange & range, unsigned int maxpoints = 0 , unsigned int dim = 1);
/** /**
constructor from options and range constructor from options and range
*/ */
UnBinData (const DataOptions & opt, const DataRange & range, unsigned i nt maxpoints = 0, unsigned int dim = 1 ); UnBinData (const DataOptions & opt, const DataRange & range, unsigned i nt maxpoints = 0, unsigned int dim = 1 );
/** /**
constructor for 1D external data constructor for 1D external data (data are not copied inside)
*/ */
UnBinData(unsigned int n, const double * dataX ); UnBinData(unsigned int n, const double * dataX );
/** /**
constructor for 2D external data constructor for 2D external data (data are not copied inside)
*/ */
UnBinData(unsigned int n, const double * dataX, const double * dataY ); UnBinData(unsigned int n, const double * dataX, const double * dataY );
/** /**
constructor for 3D external data constructor for 3D external data (data are not copied inside)
*/ */
UnBinData(unsigned int n, const double * dataX, const double * dataY, co nst double * dataZ ); UnBinData(unsigned int n, const double * dataX, const double * dataY, co nst double * dataZ );
/** /**
constructor for multi-dim external data constructor for multi-dim external data (data are not copied inside)
Uses as argument an iterator of a list (or vector) containing the con st double * of the data Uses as argument an iterator of a list (or vector) containing the con st double * of the data
An example could be the std::vector<const double *>::begin An example could be the std::vector<const double *>::begin
*/ */
template<class Iterator> template<class Iterator>
UnBinData(unsigned int n, unsigned int dim, Iterator dataItr ) : UnBinData(unsigned int n, unsigned int dim, Iterator dataItr ) :
FitData( ), FitData( ),
fDim(dim), fDim(dim),
fNPoints(n), fNPoints(n),
fDataVector(0) fDataVector(0)
{ {
fDataWrapper = new DataWrapper(dim, dataItr); fDataWrapper = new DataWrapper(dim, dataItr);
} }
/**
constructor for 1D data and a range (data are copied inside according
to the given range)
*/
UnBinData(unsigned int maxpoints, const double * dataX, const DataRange
& range);
/**
constructor for 2D data and a range (data are copied inside according
to the given range)
*/
UnBinData(unsigned int maxpoints, const double * dataX, const double * d
ataY, const DataRange & range);
/**
constructor for 3D data and a range (data are copied inside according
to the given range)
*/
UnBinData(unsigned int maxpoints, const double * dataX, const double * d
ataY, const double * dataZ, const DataRange & range);
/**
constructor for multi-dim external data and a range (data are copied
inside according to the range)
Uses as argument an iterator of a list (or vector) containing the con
st double * of the data
An example could be the std::vector<const double *>::begin
*/
template<class Iterator>
UnBinData(unsigned int maxpoints, unsigned int dim, Iterator dataItr, co
nst DataRange & range ) :
FitData( ),
fDim(dim),
fNPoints(0),
fDataVector(0),
fDataWrapper(0)
{
unsigned int n = dim*maxpoints;
if ( n > MaxSize() ) {
MATH_ERROR_MSGVAL("UnBinData","Invalid data size n - no allocation
done", n );
}
else if (n > 0) {
fDataVector = new DataVector(n);
// use data wrapper to get the data
ROOT::Fit::DataWrapper wdata(dim, dataItr);
for (unsigned int i = 0; i < maxpoints; ++i) {
bool isInside = true;
for (unsigned int icoord = 0; icoord < dim; ++icoord)
isInside &= range.IsInside( wdata.Coords(i)[icoord], icoord
);
if ( isInside ) Add(wdata.Coords(i));
}
if (fNPoints < maxpoints) (fDataVector->Data()).resize(fDim*fNPoin
ts);
}
}
private: private:
/// copy constructor (private) /// copy constructor (private)
UnBinData(const UnBinData &) : FitData() {} UnBinData(const UnBinData &) : FitData() {}
/// assignment operator (private) /// assignment operator (private)
UnBinData & operator= (const UnBinData &) { return *this; } UnBinData & operator= (const UnBinData &) { return *this; }
public: public:
#ifdef LATER #ifdef LATER
/** /**
skipping to change at line 148 skipping to change at line 200
unsigned int DataSize() const { unsigned int DataSize() const {
return fDataVector->Size(); return fDataVector->Size();
} }
/** /**
add one dim coordinate data add one dim coordinate data
*/ */
void Add(double x) { void Add(double x) {
int index = fNPoints*PointSize(); int index = fNPoints*PointSize();
assert(fDataVector != 0); assert(fDataVector != 0);
assert(PointSize() == 1);
assert (index + PointSize() <= DataSize() );
(fDataVector->Data())[ index ] = x;
fNPoints++;
}
/**
add 2-dim coordinate data
*/
void Add(double x, double y) {
int index = fNPoints*PointSize();
assert(fDataVector != 0);
assert(PointSize() == 2);
assert (index + PointSize() <= DataSize() );
(fDataVector->Data())[ index ] = x;
(fDataVector->Data())[ index+1 ] = y;
fNPoints++;
}
/**
add 3-dim coordinate data
*/
void Add(double x, double y, double z) {
int index = fNPoints*PointSize();
assert(fDataVector != 0);
assert(PointSize() == 3);
assert (index + PointSize() <= DataSize() ); assert (index + PointSize() <= DataSize() );
(fDataVector->Data())[ index ] = x; (fDataVector->Data())[ index ] = x;
(fDataVector->Data())[ index+1 ] = y;
(fDataVector->Data())[ index+2 ] = z;
fNPoints++; fNPoints++;
} }
/** /**
add multi-dim coordinate data add multi-dim coordinate data
*/ */
void Add(double *x) { void Add(const double *x) {
int index = fNPoints*PointSize(); int index = fNPoints*PointSize();
assert(fDataVector != 0); assert(fDataVector != 0);
assert (index + PointSize() <= DataSize() ); assert (index + PointSize() <= DataSize() );
double * itr = &( (fDataVector->Data()) [ index ]); double * itr = &( (fDataVector->Data()) [ index ]);
for (unsigned int i = 0; i < fDim; ++i) for (unsigned int i = 0; i < fDim; ++i)
*itr++ = x[i]; *itr++ = x[i];
 End of changes. 13 change blocks. 
9 lines changed or deleted 105 lines changed or added


 UnionBuilder.h   UnionBuilder.h 
// @(#)root/reflex:$Id: UnionBuilder.h 27061 2008-12-28 17:50:04Z axel $ // @(#)root/reflex:$Id: UnionBuilder.h 28733 2009-05-28 04:34:44Z pcanal $
// Author: Stefan Roiser 2004 // Author: Stefan Roiser 2004
// Copyright CERN, CH-1211 Geneva 23, 2004-2006, All rights reserved. // Copyright CERN, CH-1211 Geneva 23, 2004-2006, All rights reserved.
// //
// Permission to use, copy, modify, and distribute this software for any // Permission to use, copy, modify, and distribute this software for any
// purpose is hereby granted without fee, provided that this copyright and // purpose is hereby granted without fee, provided that this copyright and
// permissions notice appear in all copies and derivatives. // permissions notice appear in all copies and derivatives.
// //
// This software is provided "as is" without express or implied warranty. // This software is provided "as is" without express or implied warranty.
skipping to change at line 95 skipping to change at line 95
* @size Size of the union * @size Size of the union
*/ */
void SetSizeOf(size_t size); void SetSizeOf(size_t size);
/* /*
* ToType will return the currently produced Type (class) * ToType will return the currently produced Type (class)
* @return the type currently being built * @return the type currently being built
*/ */
Type ToType(); Type ToType();
protected:
friend class UnionBuilder;
/**
* EnableCallback Enable or disable the callback call in the destructor
* @param enable true to enable callback call, false to disable callbac
k call
*/
void EnableCallback(const bool enable = true);
private: private:
/** the union currently being built */ /** the union currently being built */
Union* fUnion; Union* fUnion;
/** the last union item built */ /** the last union item built */
Member fLastMember; Member fLastMember;
/** flag, fire callback in destructor */
bool fCallbackEnabled;
}; // class UnionBuilderImpl }; // class UnionBuilderImpl
/** /**
* @class UnionBuilder UnionBuilder.h Reflex/Builder/UnionBuilder.h * @class UnionBuilder UnionBuilder.h Reflex/Builder/UnionBuilder.h
* @author Stefan Roiser * @author Stefan Roiser
* @date 30/3/2004 * @date 30/3/2004
* @ingroup RefBld * @ingroup RefBld
*/ */
class RFLX_API UnionBuilder { class RFLX_API UnionBuilder {
skipping to change at line 184 skipping to change at line 197
* @size Size of the union * @size Size of the union
*/ */
UnionBuilder& SetSizeOf(size_t size); UnionBuilder& SetSizeOf(size_t size);
/* /*
* ToType will return the currently produced Type (class) * ToType will return the currently produced Type (class)
* @return the type currently being built * @return the type currently being built
*/ */
Type ToType(); Type ToType();
protected:
#ifdef G__COMMON_H
friend int ::G__search_tagname(const char*, int);
#endif
/**
* EnableCallback Enable or disable the callback call in the destructor
* @param enable true to enable callback call, false to disable callbac
k call
*/
UnionBuilder& EnableCallback(const bool enable = true);
private: private:
/** the union information */ /** the union information */
UnionBuilderImpl fUnionBuilderImpl; UnionBuilderImpl fUnionBuilderImpl;
}; //class UnionBuilder }; //class UnionBuilder
} // namespace Reflex } // namespace Reflex
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
 End of changes. 4 change blocks. 
1 lines changed or deleted 28 lines changed or added


 VariableBuilder.h   VariableBuilder.h 
// @(#)root/reflex:$Id: VariableBuilder.h 22729 2008-03-19 10:20:10Z pcanal $ // @(#)root/reflex:$Id: VariableBuilder.h 28992 2009-06-15 09:20:22Z axel $
// Author: Stefan Roiser 2004 // Author: Stefan Roiser 2004
// Copyright CERN, CH-1211 Geneva 23, 2004-2006, All rights reserved. // Copyright CERN, CH-1211 Geneva 23, 2004-2006, All rights reserved.
// //
// Permission to use, copy, modify, and distribute this software for any // Permission to use, copy, modify, and distribute this software for any
// purpose is hereby granted without fee, provided that this copyright and // purpose is hereby granted without fee, provided that this copyright and
// permissions notice appear in all copies and derivatives. // permissions notice appear in all copies and derivatives.
// //
// This software is provided "as is" without express or implied warranty. // This software is provided "as is" without express or implied warranty.
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 VariableDecorrTransform.h   VariableDecorrTransform.h 
// @(#)root/tmva $Id: VariableDecorrTransform.h 27320 2009-02-02 06:40:36Z brun $ // @(#)root/tmva $Id: VariableDecorrTransform.h 29122 2009-06-22 06:51:30Z brun $
// Author: Andreas Hoecker, Joerg Stelzer, Helge Voss // Author: Andreas Hoecker, Joerg Stelzer, Helge Voss
/************************************************************************** ******** /************************************************************************** ********
* Project: TMVA - a Root-integrated toolkit for multivariate data analysis * * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
* Package: TMVA * * Package: TMVA *
* Class : VariableDecorrTransform * * Class : VariableDecorrTransform *
* Web : http://tmva.sourceforge.net * * Web : http://tmva.sourceforge.net *
* * * *
* Description: * * Description: *
* Decorrelation of input variables * * Decorrelation of input variables *
skipping to change at line 33 skipping to change at line 33
* Redistribution and use in source and binary forms, with or without * * Redistribution and use in source and binary forms, with or without *
* modification, are permitted according to the terms listed in LICENSE * * modification, are permitted according to the terms listed in LICENSE *
* (http://tmva.sourceforge.net/LICENSE) * * (http://tmva.sourceforge.net/LICENSE) *
************************************************************************** ********/ ************************************************************************** ********/
#ifndef ROOT_TMVA_VariableDecorrTransform #ifndef ROOT_TMVA_VariableDecorrTransform
#define ROOT_TMVA_VariableDecorrTransform #define ROOT_TMVA_VariableDecorrTransform
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// // // //
// Decorrelation transformation of input variables // // VariableDecorrTransform //
// //
// Linear interpolation class //
// // // //
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
#include "TMatrixD.h" #ifndef ROOT_TMatrixDfwd
#include "TMatrixDfwd.h"
#endif
#ifndef ROOT_TMVA_VariableTransformBase #ifndef ROOT_TMVA_VariableTransformBase
#include "TMVA/VariableTransformBase.h" #include "TMVA/VariableTransformBase.h"
#endif #endif
namespace TMVA { namespace TMVA {
class VariableDecorrTransform : public VariableTransformBase { class VariableDecorrTransform : public VariableTransformBase {
public: public:
VariableDecorrTransform( std::vector<TMVA::VariableInfo>& ); VariableDecorrTransform( DataSetInfo& dsi );
virtual ~VariableDecorrTransform( void ); virtual ~VariableDecorrTransform( void );
void ApplyTransformation( Types::ESBType type = Types::kMaxSBType ) void Initialize();
const; Bool_t PrepareTransformation( const std::vector<Event*>& );
Bool_t PrepareTransformation( TTree* inputTree );
// virtual const Event* Transform(const Event* const, Types::ESB
Type type = Types::kMaxSBType) const;
virtual const Event* Transform(const Event* const, Int_t cls ) const;
virtual const Event* InverseTransform(const Event* const, Int_t cls )
const;
void WriteTransformationToStream ( std::ostream& ) const; void WriteTransformationToStream ( std::ostream& ) const;
void ReadTransformationFromStream( std::istream& ); void ReadTransformationFromStream( std::istream& );
virtual void PrintTransformation( ostream & o ); virtual void AttachXMLTo(void* parent);
virtual void ReadFromXML( void* trfnode );
// provides string vector describing explicit transformation virtual void PrintTransformation( ostream & o );
std::vector<TString>* GetTransformationStrings( Types::ESBType type )
const;
// writer of function code // writer of function code
virtual void MakeFunction( std::ostream& fout, const TString& fncName virtual void MakeFunction( std::ostream& fout, const TString& fncName
, Int_t part ); , Int_t part, UInt_t trCounter, Int_t cls );
// provides string vector giving explicit transformation
std::vector<TString>* GetTransformationStrings( Int_t cls ) const;
private: private:
TMatrixD* fDecorrMatrix[2]; //! Decorrelation matrix [signal/back // mutable Event* fTransformedEvent; //! local event
ground] copy
std::vector<TMatrixD*> fDecorrMatrices; //! Decorrelation matrix
[class0/class1/.../all classes]
void GetSQRMats( TTree* tr ); void CalcSQRMats( const std::vector<Event*>&, Int_t maxCls );
void GetCovarianceMatrix( TTree* tr, Bool_t isSignal, TMatrixDBase* m std::vector<TMatrixDSym*>* CalcCovarianceMatrices( const std::vector<
at ); Event*>& events, Int_t maxCls );
ClassDef(VariableDecorrTransform,0) // Variable transformation: decor relation ClassDef(VariableDecorrTransform,0) // Variable transformation: decor relation
}; };
} // namespace TMVA } // namespace TMVA
#endif #endif
 End of changes. 10 change blocks. 
18 lines changed or deleted 31 lines changed or added


 VariableIdentityTransform.h   VariableIdentityTransform.h 
// @(#)root/tmva $Id: VariableIdentityTransform.h 21630 2008-01-10 19:40:44 Z brun $ // @(#)root/tmva $Id: VariableIdentityTransform.h 29196 2009-06-24 11:16:34 Z brun $
// Author: Andreas Hoecker, Joerg Stelzer, Helge Voss // Author: Andreas Hoecker, Joerg Stelzer, Helge Voss
/************************************************************************** ******** /************************************************************************** ********
* Project: TMVA - a Root-integrated toolkit for multivariate data analysis * * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
* Package: TMVA * * Package: TMVA *
* Class : VariableIdentityTransform * * Class : VariableIdentityTransform *
* Web : http://tmva.sourceforge.net * * Web : http://tmva.sourceforge.net *
* * * *
* Description: * * Description: *
* Identity transform * * Identity transform *
skipping to change at line 35 skipping to change at line 35
* (http://tmva.sourceforge.net/LICENSE) * * (http://tmva.sourceforge.net/LICENSE) *
************************************************************************** ********/ ************************************************************************** ********/
#ifndef ROOT_TMVA_VariableIdentityTransform #ifndef ROOT_TMVA_VariableIdentityTransform
#define ROOT_TMVA_VariableIdentityTransform #define ROOT_TMVA_VariableIdentityTransform
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// // // //
// VariableIdentityTransform // // VariableIdentityTransform //
// // // //
// Linear interpolation class //
// //
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
#ifndef ROOT_TMVA_VariableTransformBase #ifndef ROOT_TMVA_VariableTransformBase
#include "TMVA/VariableTransformBase.h" #include "TMVA/VariableTransformBase.h"
#endif #endif
namespace TMVA { namespace TMVA {
class VariableIdentityTransform : public VariableTransformBase { class VariableIdentityTransform : public VariableTransformBase {
public: public:
VariableIdentityTransform( std::vector<TMVA::VariableInfo>& ); VariableIdentityTransform( DataSetInfo& dsi );
virtual ~VariableIdentityTransform( void ) {} virtual ~VariableIdentityTransform( void ) {}
void ApplyTransformation( Types::ESBType type = Types::kMaxSBType ) void Initialize();
const; Bool_t PrepareTransformation( const std::vector<Event*>& );
Bool_t PrepareTransformation( TTree* inputTree );
void WriteTransformationToStream ( std::ostream& ) const {} void WriteTransformationToStream ( std::ostream& ) const {}
void ReadTransformationFromStream( std::istream& ) { SetCreated(); } void ReadTransformationFromStream( std::istream& ) { SetCreated(); }
virtual TMVA::Event& GetEvent() const { return GetEventRaw(); } virtual void AttachXMLTo(void* parent);
virtual void ReadFromXML( void* trfnode );
// provides string vector describing explicit transformation virtual const Event* Transform(const Event* const, Int_t cls ) const;
std::vector<TString>* GetTransformationStrings( Types::ESBType ) cons virtual const Event* InverseTransform(const Event* const ev, Int_t cl
t; s ) const { return Transform( ev, cls ); }
// writer of function code // writer of function code
virtual void MakeFunction(std::ostream& fout, const TString& fncName, Int_t part); virtual void MakeFunction(std::ostream& fout, const TString& fncName, Int_t part, UInt_t trCounter, Int_t cls );
ClassDef(VariableIdentityTransform,0) // Variable transformation: ide ntity ClassDef(VariableIdentityTransform,0) // Variable transformation: ide ntity
}; };
} // namespace TMVA } // namespace TMVA
#endif #endif
 End of changes. 7 change blocks. 
10 lines changed or deleted 12 lines changed or added


 VariableInfo.h   VariableInfo.h 
// @(#)root/tmva $Id: VariableInfo.h 20882 2007-11-19 11:31:26Z rdm $ // @(#)root/tmva $Id: VariableInfo.h 29122 2009-06-22 06:51:30Z brun $
// Author: Andreas Hoecker, Joerg Stelzer, Helge Voss // Author: Andreas Hoecker, Joerg Stelzer, Helge Voss
/************************************************************************** ******** /************************************************************************** ********
* Project: TMVA - a Root-integrated toolkit for multivariate data analysis * * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
* Package: TMVA * * Package: TMVA *
* Class : Option * * Class : Option *
* Web : http://tmva.sourceforge.net * * Web : http://tmva.sourceforge.net *
* * * *
* Description: * * Description: *
* Variable type info * * Variable type info *
skipping to change at line 56 skipping to change at line 56
#ifndef ROOT_TMVA_Types #ifndef ROOT_TMVA_Types
#include "TMVA/Types.h" #include "TMVA/Types.h"
#endif #endif
namespace TMVA { namespace TMVA {
class VariableInfo { class VariableInfo {
public: public:
VariableInfo( const TString& expression, int varCounter, char varType VariableInfo( const TString& expression, const TString& title, const
= 'F', void * external = 0, TString& unit,
Double_t min = 0, Double_t max = 0 ); Int_t varCounter, char varType = 'F', void* external =
0,
Double_t min = 0, Double_t max = 0, Bool_t normalized=k
TRUE );
VariableInfo(); VariableInfo();
VariableInfo( const VariableInfo& other ); VariableInfo( const VariableInfo& other );
~VariableInfo() {} ~VariableInfo() {}
const TString& GetExpression() const { return fExpression; } const TString& GetExpression() const { return fExpression; }
const TString& GetInternalVarName() const { return fInternalVarName; const TString& GetInternalName() const { return fInternalName; }
} const TString& GetLabel() const { return fLabel; }
const TString& GetTitle() const { return fTitle; }
const TString& GetUnit() const { return fUnit; }
char GetVarType() const { return fVarType; } char GetVarType() const { return fVarType; }
Double_t GetMin () const { return fXminNorm; } Double_t GetMin () const { return fXminNorm; }
Double_t GetMax () const { return fXmaxNorm; } Double_t GetMax () const { return fXmaxNorm; }
Double_t GetMean() const { return fXmeanNorm; } Double_t GetMean() const { return fXmeanNorm; }
Double_t GetRMS () const { return fXrmsNorm; } Double_t GetRMS () const { return fXrmsNorm; }
void SetExpression(const TString& s) { fExpression = s void SetMin ( Double_t v ) { fXminNorm = v; }
; } void SetMax ( Double_t v ) { fXmaxNorm = v; }
void SetInternalVarName(const TString& s) { fInternalVarNam void SetMean ( Double_t v ) { fXmeanNorm = v; }
e = s; } void SetRMS ( Double_t v ) { fXrmsNorm = v; }
void SetVarType(char c) { fVarType = c; void SetExternalLink( void* p ) { fExternalData = p; }
} void ResetMinMax() { fXminNorm = 1e30; fXmaxNorm = -1e30; }
void SetMin (Double_t v) { fXminNorm = v; } void WriteToStream ( std::ostream& o ) const;
void SetMax (Double_t v) { fXmaxNorm = v; } void ReadFromStream( std::istream& istr );
void SetMean(Double_t v) { fXmeanNorm = v; } void ReadFromXML ( void* varnode );
void SetRMS (Double_t v) { fXrmsNorm = v; } void AddToXML ( void* varnode );
void SetExternalLink(void* p) { fExternalData = p; }
void ResetMinMax() {fXminNorm = 1e30; fXmaxNorm = -1e30; };
void WriteToStream(std::ostream& o) const;
void ReadFromStream(std::istream& istr);
void* GetExternalLink() const { return fExternalData; } void* GetExternalLink() const { return fExternalData; }
// assignment operator (does not copy external link) // assignment operator (does not copy external link)
VariableInfo& operator=(const TMVA::VariableInfo& rhs); VariableInfo& operator=(const TMVA::VariableInfo& rhs);
private: private:
TString fExpression; //! the variable expression (can be a form // should not be set from outside this class
ula) void SetExpression ( const TString& s ) { fExpression =
TString fInternalVarName; //! the internal variable name s; }
void SetLabel ( const TString& s ) { fLabel = s; }
void SetTitle ( const TString& s ) { fTitle = s; }
void SetUnit ( const TString& s ) { fUnit = s; }
void SetInternalVarName( const TString& s ) { fInternalName
= s; }
void SetVarType ( char c ) { fVarType = c;
}
TString fExpression; //! original variable expression (can be a
formula)
TString fInternalName; //! internal variable name (needs to be re
gular expression)
TString fLabel; //! variable label, set by "mylabel := var
1 + var2", this is a shortcut
TString fTitle; //! title for axis labels in plots; set by
second string in AddVariable
TString fUnit; //! unit for axis labels in plots; set by
third string in AddVariable
Char_t fVarType; //! the variable type to be used internall y ('F'-default or 'I') Char_t fVarType; //! the variable type to be used internall y ('F'-default or 'I')
Double_t fXminNorm; //! minimum value for correlated/decorrela ted/PCA variable Double_t fXminNorm; //! minimum value for correlated/decorrela ted/PCA variable
Double_t fXmaxNorm; //! maximum value for correlated/decorrela ted/PCA variable Double_t fXmaxNorm; //! maximum value for correlated/decorrela ted/PCA variable
Double_t fXmeanNorm; //! mean value for correlated/decorrelated /PCA variable Double_t fXmeanNorm; //! mean value for correlated/decorrelated /PCA variable
Double_t fXrmsNorm; //! rms value for correlated/decorrelated/ PCA variable Double_t fXrmsNorm; //! rms value for correlated/decorrelated/ PCA variable
Bool_t fNormalized; //! variable gets normalized
void* fExternalData; //! if the variable content is linked to a n external pointer void* fExternalData; //! if the variable content is linked to a n external pointer
TString fExternalDataType;//! type of external variable (int, long, double, float) - to be done JS
Int_t fVarCounter; //! dummy variable Int_t fVarCounter; //! dummy variable
}; };
} }
#endif #endif
 End of changes. 8 change blocks. 
26 lines changed or deleted 46 lines changed or added


 VariablePCATransform.h   VariablePCATransform.h 
// @(#)root/tmva $Id: VariablePCATransform.h 21630 2008-01-10 19:40:44Z bru n $ // @(#)root/tmva $Id: VariablePCATransform.h 29122 2009-06-22 06:51:30Z bru n $
// Author: Andreas Hoecker, Joerg Stelzer, Helge Voss // Author: Andreas Hoecker, Joerg Stelzer, Helge Voss
/************************************************************************** ******** /************************************************************************** ********
* Project: TMVA - a Root-integrated toolkit for multivariate data analysis * * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
* Package: TMVA * * Package: TMVA *
* Class : VariablePCATransform * * Class : VariablePCATransform *
* Web : http://tmva.sourceforge.net * * Web : http://tmva.sourceforge.net *
* * * *
* Description: * * Description: *
* Principal value composition of input variables * * Principal value composition of input variables *
skipping to change at line 31 skipping to change at line 31
* MPI-K Heidelberg, Germany * * MPI-K Heidelberg, Germany *
* * * *
* Redistribution and use in source and binary forms, with or without * * Redistribution and use in source and binary forms, with or without *
* modification, are permitted according to the terms listed in LICENSE * * modification, are permitted according to the terms listed in LICENSE *
* (http://tmva.sourceforge.net/LICENSE) * * (http://tmva.sourceforge.net/LICENSE) *
************************************************************************** ********/ ************************************************************************** ********/
#ifndef ROOT_TMVA_VariablePCATransform #ifndef ROOT_TMVA_VariablePCATransform
#define ROOT_TMVA_VariablePCATransform #define ROOT_TMVA_VariablePCATransform
//////////////////////////////////////////////////////////////////////////
// //
// VariablePCATransform //
// //
// Linear interpolation class //
// //
//////////////////////////////////////////////////////////////////////////
#ifndef ROOT_TPrincipal
#include "TPrincipal.h" #include "TPrincipal.h"
#endif
#ifndef ROOT_TMVA_VariableTransformBase #ifndef ROOT_TMVA_VariableTransformBase
#include "TMVA/VariableTransformBase.h" #include "TMVA/VariableTransformBase.h"
#endif #endif
namespace TMVA { namespace TMVA {
class VariablePCATransform : public VariableTransformBase { class VariablePCATransform : public VariableTransformBase {
public: public:
VariablePCATransform( std::vector<TMVA::VariableInfo>& ); VariablePCATransform( DataSetInfo& dsi );
virtual ~VariablePCATransform( void ); virtual ~VariablePCATransform( void );
void ApplyTransformation( Types::ESBType type = Types::kMaxSBType ) void Initialize();
const; Bool_t PrepareTransformation( const std::vector<Event*>& );
Bool_t PrepareTransformation( TTree* inputTree );
virtual const Event* Transform(const Event* const, Int_t cls ) const;
virtual const Event* InverseTransform(const Event* const, Int_t cls )
const;
void WriteTransformationToStream ( std::ostream& ) const; void WriteTransformationToStream ( std::ostream& ) const;
void ReadTransformationFromStream( std::istream& ); void ReadTransformationFromStream( std::istream& );
// provides string vector describing explicit transformation virtual void AttachXMLTo(void* parent);
std::vector<TString>* GetTransformationStrings( Types::ESBType type = virtual void ReadFromXML( void* trfnode );
Types::kMaxSBType ) const;
// writer of function code // writer of function code
virtual void MakeFunction( std::ostream& fout, const TString& fncName , Int_t part ); virtual void MakeFunction( std::ostream& fout, const TString& fncName , Int_t part, UInt_t trCounter, Int_t cls );
private: private:
void CalculatePrincipalComponents( TTree* originalTree ); void CalculatePrincipalComponents( const std::vector<Event*>& );
void X2P( const Double_t*, Double_t*, Int_t index ) const; std::vector<Double_t> X2P( const std::vector<Float_t>&, Int_t cls ) c
onst;
TPrincipal* fPCA[2]; //! PCA [signal/background] // mutable Event* fTransformedEvent;
// store relevant parts of PCA locally // store relevant parts of PCA locally
TVectorD* fMeanValues[2]; // mean values std::vector<TVectorD*> fMeanValues; // mean values
TMatrixD* fEigenVectors[2]; // eigenvectors std::vector<TMatrixD*> fEigenVectors; // eigenvectors
ClassDef(VariablePCATransform,0) // Variable transformation: Principa l Value Composition ClassDef(VariablePCATransform,0) // Variable transformation: Principa l Value Composition
}; };
} // namespace TMVA } // namespace TMVA
#endif #endif
 End of changes. 10 change blocks. 
14 lines changed or deleted 27 lines changed or added


 VariableTransformBase.h   VariableTransformBase.h 
// @(#)root/tmva $Id: VariableTransformBase.h 21630 2008-01-10 19:40:44Z br un $ // @(#)root/tmva $Id: VariableTransformBase.h 29195 2009-06-24 10:39:49Z br un $
// Author: Andreas Hoecker, Joerg Stelzer, Helge Voss // Author: Andreas Hoecker, Joerg Stelzer, Helge Voss
/************************************************************************** ******** /************************************************************************** ********
* Project: TMVA - a Root-integrated toolkit for multivariate data analysis * * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
* Package: TMVA * * Package: TMVA *
* Class : VariableTransformBase * * Class : VariableTransformBase *
* Web : http://tmva.sourceforge.net * * Web : http://tmva.sourceforge.net *
* * * *
* Description: * * Description: *
* Pre-transformation of input variables (base class) * * Pre-transformation of input variables (base class) *
skipping to change at line 35 skipping to change at line 35
* (http://tmva.sourceforge.net/LICENSE) * * (http://tmva.sourceforge.net/LICENSE) *
************************************************************************** ********/ ************************************************************************** ********/
#ifndef ROOT_TMVA_VariableTransformBase #ifndef ROOT_TMVA_VariableTransformBase
#define ROOT_TMVA_VariableTransformBase #define ROOT_TMVA_VariableTransformBase
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// // // //
// VariableTransformBase // // VariableTransformBase //
// // // //
// Linear interpolation class //
// //
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
#include <vector> #include <vector>
#include "TTree.h"
#ifndef ROOT_TH1
#include "TH1.h" #include "TH1.h"
#endif
#ifndef ROOT_TDirectory
#include "TDirectory.h" #include "TDirectory.h"
#endif
#ifndef ROOT_TString
#include "TString.h" #include "TString.h"
#endif
#ifndef ROOT_TMVA_Types
#include "TMVA/Types.h"
#endif
#ifndef ROOT_TMVA_Event #ifndef ROOT_TMVA_Event
#include "TMVA/Event.h" #include "TMVA/Event.h"
#endif #endif
#ifndef ROOT_TMVA_VariableInfo #ifndef ROOT_TMVA_VariableInfo
#include "TMVA/VariableInfo.h" #include "TMVA/VariableInfo.h"
#endif #endif
#ifndef ROOT_TMVA_MsgLogger #ifndef ROOT_TMVA_DataSetInfo
#include "TMVA/MsgLogger.h" #include "TMVA/DataSetInfo.h"
#endif #endif
namespace TMVA { namespace TMVA {
class Ranking;
class VariableTransformBase : public TObject { class VariableTransformBase : public TObject {
public: public:
VariableTransformBase( std::vector<TMVA::VariableInfo>&, Types::EVari ableTransform tf ); VariableTransformBase( DataSetInfo& dsi, Types::EVariableTransform tf , const TString& trfName );
virtual ~VariableTransformBase( void ); virtual ~VariableTransformBase( void );
virtual void ApplyTransformation( Types::ESBType type = Types::kMax virtual void Initialize() = 0;
SBType ) const = 0; virtual Bool_t PrepareTransformation( const std::vector<Event*>
virtual Bool_t PrepareTransformation( TTree* inputTree ) = 0; & ) = 0;
void PlotVariables( TTree* theTree ); virtual const Event* Transform ( const Event* const, Int_t cls
) const = 0;
virtual const Event* InverseTransform( const Event* const, Int_t cls
) const = 0;
// accessors // accessors
void SetEnabled ( Bool_t e ) { fEnabled = e; } void SetEnabled ( Bool_t e ) { fEnabled = e; }
void SetNormalise( Bool_t n ) { fNormalise = n; } void SetNormalise( Bool_t n ) { fNormalise = n; }
Bool_t IsEnabled() const { return fEnabled; } Bool_t IsEnabled() const { return fEnabled; }
Bool_t IsCreated() const { return fCreated; } Bool_t IsCreated() const { return fCreated; }
Bool_t IsNormalised() const { return fNormalise; } Bool_t IsNormalised() const { return fNormalise; }
void CreateEvent() const;
virtual TMVA::Event& GetEvent() const {
if (fEvent==0) CreateEvent();
return *fEvent;
}
TMVA::Event& GetEventRaw() const {
if (fEventRaw==0) fEventRaw = new TMVA::Event(fVariables);
return *fEventRaw;
}
// provides string vector describing explicit transformation
virtual std::vector<TString>* GetTransformationStrings( Types::ESBTyp
e type = Types::kMaxSBType ) const = 0;
void SetUseSignalTransform( Bool_t e=kTRUE) { fUseSignalTransform = e ; } void SetUseSignalTransform( Bool_t e=kTRUE) { fUseSignalTransform = e ; }
Bool_t UseSignalTransform() const { return fUseSignalTransform; }
virtual const char* GetName() const { return fTransformName; } virtual const char* GetName() const { return fTransformName.Data(); }
TString GetShortName() const { TString a(fTransformName); a.ReplaceAl
UInt_t GetNVariables() const { return fVariables.size(); } l("Transform",""); return a; }
void SetRootOutputBaseDir(TDirectory * dir) { fOutputBaseDir = dir; }
Bool_t ReadEvent( TTree* tr, UInt_t evidx, Types::ESBType type ) cons
t;
const std::vector<TMVA::VariableInfo>& Variables() const { return fVa
riables; }
const VariableInfo& Variable(Int_t ivar) const { return fVariables[iv
ar]; }
VariableInfo& Variable(Int_t ivar) { return fVariables[ivar]; }
const VariableInfo& Variable(const TString& var) const { return fVari
ables[FindVar(var)]; }
VariableInfo& Variable(const TString& var) { return fVariables[
FindVar(var)]; }
Int_t FindVar(const TString& var) const { // don't use
in loops, it is slow
for (UInt_t ivar=0; ivar<GetNVariables(); ivar++)
if (var == fVariables[ivar].GetInternalVarName()) return ivar;
return -1;
}
void WriteVarsToStream ( std::ostream& o, const TSt
ring& prefix = "" ) const;
void ReadVarsFromStream ( std::istream& istr );
virtual void WriteTransformationToStream ( std::ostream& o ) const = 0; virtual void WriteTransformationToStream ( std::ostream& o ) const = 0;
virtual void ReadTransformationFromStream( std::istream& istr ) = 0; virtual void ReadTransformationFromStream( std::istream& istr ) = 0;
// variable ranking virtual void AttachXMLTo(void* parent) = 0;
Ranking* GetVariableRanking() const { return fRanking; } virtual void ReadFromXML( void* trfnode ) = 0;
void PrintVariableRanking() const;
Types::EVariableTransform GetVariableTransform() const { return fVari ableTransform; } Types::EVariableTransform GetVariableTransform() const { return fVari ableTransform; }
virtual void PrintTransformation(ostream &) {};
// writer of function code // writer of function code
virtual void MakeFunction(std::ostream& fout, const TString& fncName, virtual void MakeFunction( std::ostream& fout, const TString& fncName
Int_t part) = 0; , Int_t part,
UInt_t trCounter, Int_t cls ) = 0;
// provides string vector giving explicit transformation
virtual std::vector<TString>* GetTransformationStrings( Int_t cls ) c
onst;
virtual void PrintTransformation( ostream & ) {}
const std::vector<TMVA::VariableInfo>& Variables() const { return fVa
riables; }
const std::vector<TMVA::VariableInfo>& Targets() const { return fTa
rgets; }
MsgLogger& Log() const { return *fLogger; }
protected: protected:
void CalcNorm( TTree * ); void CalcNorm( const std::vector<Event*>& );
void SetCreated( Bool_t c = kTRUE ) { fCreated = c; } void SetCreated( Bool_t c = kTRUE ) { fCreated = c; }
void SetNVariables( UInt_t i ) { fNVars = i; }
void SetName( const TString& c ) { fTransformName = c; } void SetName( const TString& c ) { fTransformName = c; }
void ResetBranchAddresses( TTree* tree ) const; UInt_t GetNVariables() const { return fDsi.GetNVariables(); }
UInt_t GetNTargets() const { return fDsi.GetNTargets(); }
DataSetInfo& fDsi;
Bool_t fUseSignalTransform; // true if transformatio std::vector<TMVA::VariableInfo>& Variables() { return fVariables; }
n bases on signal data std::vector<TMVA::VariableInfo>& Targets() { return fTargets; }
mutable TMVA::Event* fEvent; // this is the event Int_t GetNClasses() const { return fDsi.GetNClasses(); }
mutable TMVA::Event* fEventRaw; // this is the untransformed even
t
TDirectory* GetOutputBaseDir() const { return fOutputBase mutable Event* fTransformedEvent; // holds the current
Dir; } transformed event
mutable Event* fBackTransformedEvent; // holds the current
back-transformed event
private: private:
Types::EVariableTransform fVariableTransform; // Decorrelation, PCA, etc. Types::EVariableTransform fVariableTransform; // Decorrelation, PCA, etc.
void UpdateNorm( Int_t ivar, Double_t x ); void UpdateNorm( Int_t ivar, Double_t x );
Bool_t fEnabled; // has been enabled
Bool_t fCreated; // has been created
Bool_t fNormalise; // normalise input variables
TString fTransformName;
std::vector<TMVA::VariableInfo> fVariables; // event variables [save
d to weight file]
mutable TTree* fCurrentTree; // pointer to tree
mutable Size_t fCurrentEvtIdx; // current event index
TDirectory* fOutputBaseDir; // directory
Ranking* fRanking; // ranking object Bool_t fUseSignalTransform; // true if tran
sformation bases on signal data
Bool_t fEnabled; // has been ena
bled
Bool_t fCreated; // has been cre
ated
Bool_t fNormalise; // normalise in
put variables
UInt_t fNVars; // number of va
riables
TString fTransformName; // name of tran
sformation
std::vector<TMVA::VariableInfo> fVariables; // event variab
les [saved to weight file]
std::vector<TMVA::VariableInfo> fTargets; // event target
s [saved to weight file --> TODO ]
protected: protected:
mutable MsgLogger fLogger; // message logger mutable MsgLogger* fLogger; //! message logger
ClassDef(VariableTransformBase,0) // Base class for variable trans formations ClassDef(VariableTransformBase,0) // Base class for variable trans formations
}; };
} // namespace TMVA } // namespace TMVA
#endif #endif
 End of changes. 26 change blocks. 
87 lines changed or deleted 75 lines changed or added


 Version.h   Version.h 
// @(#)root/tmva $Id: Version.h 27320 2009-02-02 06:40:36Z brun $ // @(#)root/tmva $Id: Version.h 29211 2009-06-25 10:47:22Z brun $
// Author: Andreas Hoecker, Joerg Stelzer, Fredrik Tegenfeldt, Helge Voss // Author: Andreas Hoecker, Joerg Stelzer, Fredrik Tegenfeldt, Helge Voss
/************************************************************************** ******** /************************************************************************** ********
* Project: TMVA - a Root-integrated toolkit for multivariate data analysis * * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
* Package: TMVA * * Package: TMVA *
* Class : Version * * Class : Version *
* Web : http://tmva.sourceforge.net * * Web : http://tmva.sourceforge.net *
* * * *
* Description: * * Description: *
* Current TMVA Version - filled automatically during cvs tagging * * Current TMVA Version - filled automatically during cvs tagging *
skipping to change at line 41 skipping to change at line 41
#define ROOT_TMVA_Version #define ROOT_TMVA_Version
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// // // //
// Version // // Version //
// // // //
// Automatically filled by cvs tagger: development/tmvaTag.py // // Automatically filled by cvs tagger: development/tmvaTag.py //
// // // //
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
#define TMVA_RELEASE "3.9.7" #define TMVA_RELEASE "4.0.1"
#define TMVA_RELEASE_DATE "Feb 01, 2009" #define TMVA_RELEASE_DATE "Jun 25, 2009"
#define TMVA_RELEASE_TIME "22:20:05" #define TMVA_RELEASE_TIME "12:27:36"
#define TMVA_VERSION_CODE 198919 #define TMVA_VERSION_CODE 262145
#define TMVA_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c)) #define TMVA_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
#endif #endif
 End of changes. 2 change blocks. 
5 lines changed or deleted 5 lines changed or added


 Volume.h   Volume.h 
// @(#)root/tmva $Id: Volume.h 20882 2007-11-19 11:31:26Z rdm $ // @(#)root/tmva $Id: Volume.h 29122 2009-06-22 06:51:30Z brun $
// Author: Andreas Hoecker, Joerg Stelzer, Helge Voss, Kai Voss // Author: Andreas Hoecker, Joerg Stelzer, Helge Voss, Kai Voss
/************************************************************************** ******** /************************************************************************** ********
* Project: TMVA - a Root-integrated toolkit for multivariate data analysis * * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
* Package: TMVA * * Package: TMVA *
* Class : Volume * * Class : Volume *
* Web : http://tmva.sourceforge.net * * Web : http://tmva.sourceforge.net *
* * * *
* Description: * * Description: *
* Volume for BinarySearchTree * * Volume for BinarySearchTree *
skipping to change at line 43 skipping to change at line 43
// Volume // // Volume //
// // // //
// Volume for BinarySearchTree // // Volume for BinarySearchTree //
// // // //
// volume element: cubic variable space beteen upper and lower bonds of // // volume element: cubic variable space beteen upper and lower bonds of //
// nvar-dimensional variable space // // nvar-dimensional variable space //
// // // //
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
#include <vector> #include <vector>
#ifndef ROOT_Rtypes
#include "Rtypes.h" #include "Rtypes.h"
#endif
//#include "time.h" //#include "time.h"
namespace TMVA { namespace TMVA {
class Volume { class Volume {
public: public:
// constructors // constructors
Volume( std::vector<Float_t>* l, std::vector<Float_t>* u = 0); Volume( std::vector<Float_t>* l, std::vector<Float_t>* u = 0);
 End of changes. 3 change blocks. 
1 lines changed or deleted 3 lines changed or added


 WrappedMultiTF1.h   WrappedMultiTF1.h 
// @(#)root/mathmore:$Id: WrappedMultiTF1.h 27273 2009-01-28 09:07:01Z mone ta $ // @(#)root/mathmore:$Id: WrappedMultiTF1.h 28964 2009-06-12 16:08:04Z mone ta $
// Author: L. Moneta Wed Sep 6 09:52:26 2006 // Author: L. Moneta Wed Sep 6 09:52:26 2006
/********************************************************************** /**********************************************************************
* * * *
* Copyright (c) 2006 LCG ROOT Math Team, CERN/PH-SFT * * Copyright (c) 2006 LCG ROOT Math Team, CERN/PH-SFT *
* * * *
* * * *
**********************************************************************/ **********************************************************************/
// Header file for class WrappedTFunction // Header file for class WrappedTFunction
skipping to change at line 45 skipping to change at line 45
@ingroup CppFunctions @ingroup CppFunctions
*/ */
class WrappedMultiTF1 : public ROOT::Math::IParamMultiFunction { class WrappedMultiTF1 : public ROOT::Math::IParamMultiFunction {
public: public:
typedef ROOT::Math::IParamMultiFunction BaseParamFunc; typedef ROOT::Math::IParamMultiFunction BaseParamFunc;
typedef ROOT::Math::IParamMultiFunction::BaseFunc BaseFunc; typedef ROOT::Math::IParamMultiFunction::BaseFunc BaseFunc;
/** /**
constructor from a function pointer. constructor from a function pointer to a TF1
If dim = 0 dimension is taken from TF1::GetNdim().
IN case of multi-dimensional function created using directly TF1 obje
ct the dimension
returned by TF1::GetNdim is always 1. The user must then pass the cor
rect value of dim
*/ */
WrappedMultiTF1 (TF1 & f ) : WrappedMultiTF1 (TF1 & f, unsigned int dim = 0 );
fFunc(&f),
fParams(f.GetParameters(),f.GetParameters()+f.GetNpar())
{ }
/** /**
Destructor (no operations). Function pointer is not owned Destructor (no operations). Function pointer is not owned
*/ */
virtual ~WrappedMultiTF1 () {} virtual ~WrappedMultiTF1 () {}
/** /**
Copy constructor Copy constructor
*/ */
WrappedMultiTF1(const WrappedMultiTF1 & rhs) : WrappedMultiTF1(const WrappedMultiTF1 & rhs);
BaseFunc(),
BaseParamFunc(),
fFunc(rhs.fFunc),
fParams(rhs.fParams)
{}
/** /**
Assignment operator Assignment operator
*/ */
WrappedMultiTF1 & operator = (const WrappedMultiTF1 & rhs) { WrappedMultiTF1 & operator = (const WrappedMultiTF1 & rhs);
if (this == &rhs) return *this; // time saving self-test
fFunc = rhs.fFunc;
fParams = rhs.fParams;
return *this;
}
/** @name interface inherited from IFunction */ /** @name interface inherited from IFunction */
/** /**
Clone the wrapper but not the original function Clone the wrapper but not the original function
*/ */
IMultiGenFunction * Clone() const { IMultiGenFunction * Clone() const {
return new WrappedMultiTF1(*this); return new WrappedMultiTF1(*this);
} }
/// function dimension /// function dimension
unsigned int NDim() const { unsigned int NDim() const {
return fFunc->GetNdim(); return fDim;
} }
/** @name interface inherited from IParamFunction */ /** @name interface inherited from IParamFunction */
/// get the parameter values (return values cached inside, those inside TF1 might be different) /// get the parameter values (return values cached inside, those inside TF1 might be different)
const double * Parameters() const { const double * Parameters() const {
return (fParams.size() > 0) ? &fParams.front() : 0; return (fParams.size() > 0) ? &fParams.front() : 0;
} }
/// set parameter values (only the cached one in this class,leave unchan ges those of TF1) /// set parameter values (only the cached one in this class,leave unchan ges those of TF1)
skipping to change at line 123 skipping to change at line 112
private: private:
/// evaluate function passing coordinates x and vector of parameters /// evaluate function passing coordinates x and vector of parameters
double DoEvalPar (const double * x, const double * p ) const { double DoEvalPar (const double * x, const double * p ) const {
if (fFunc->GetMethodCall() ) fFunc->InitArgs(x,p); // needed for in terpreted functions if (fFunc->GetMethodCall() ) fFunc->InitArgs(x,p); // needed for in terpreted functions
return fFunc->EvalPar(x,p); return fFunc->EvalPar(x,p);
} }
TF1 * fFunc; // pointer to ROOT function TF1 * fFunc; // pointer to ROOT function
unsigned int fDim; // cached value of dimension
std::vector<double> fParams; // cached vector with parameter values std::vector<double> fParams; // cached vector with parameter values
}; };
} // end namespace Fit } // end namespace Fit
} // end namespace ROOT } // end namespace ROOT
#endif /* ROOT_Fit_WrappedMultiTF1 */ #endif /* ROOT_Fit_WrappedMultiTF1 */
 End of changes. 7 change blocks. 
20 lines changed or deleted 12 lines changed or added


 WrappedTF1.h   WrappedTF1.h 
// @(#)root/mathmore:$Id: WrappedTF1.h 27273 2009-01-28 09:07:01Z moneta $ // @(#)root/mathmore:$Id: WrappedTF1.h 28964 2009-06-12 16:08:04Z moneta $
// Author: L. Moneta Wed Sep 6 09:52:26 2006 // Author: L. Moneta Wed Sep 6 09:52:26 2006
/********************************************************************** /**********************************************************************
* * * *
* Copyright (c) 2006 LCG ROOT Math Team, CERN/PH-SFT * * Copyright (c) 2006 LCG ROOT Math Team, CERN/PH-SFT *
* * * *
* * * *
**********************************************************************/ **********************************************************************/
// Header file for class WrappedTFunction // Header file for class WrappedTF1
#ifndef ROOT_Math_WrappedTF1 #ifndef ROOT_Math_WrappedTF1
#define ROOT_Math_WrappedTF1 #define ROOT_Math_WrappedTF1
#ifndef ROOT_Math_IParamFunction #ifndef ROOT_Math_IParamFunction
#include "Math/IParamFunction.h" #include "Math/IParamFunction.h"
#endif #endif
#ifndef ROOT_TF1 #ifndef ROOT_TF1
#include "TF1.h" #include "TF1.h"
#endif #endif
#include <cmath>
namespace ROOT { namespace ROOT {
namespace Math { namespace Math {
/** /**
Class to Wrap a ROOT Function class (like TF1) in a IParamFunction inte rface Class to Wrap a ROOT Function class (like TF1) in a IParamFunction inte rface
of one dimensions to be used in the ROOT::Math numerical algorithms of one dimensions to be used in the ROOT::Math numerical algorithms
The parameter are stored in this wrapper class, so the TF1 parameter va lues are not used for evaluating the function. The parameter are stored in this wrapper class, so the TF1 parameter va lues are not used for evaluating the function.
We use TF1 only for the function evaluation. We use TF1 only for the function evaluation.
skipping to change at line 49 skipping to change at line 48
class WrappedTF1 : public ROOT::Math::IParamGradFunction { class WrappedTF1 : public ROOT::Math::IParamGradFunction {
public: public:
typedef ROOT::Math::IParamGradFunction BaseGradFunc; typedef ROOT::Math::IParamGradFunction BaseGradFunc;
typedef ROOT::Math::IParamGradFunction::BaseFunc BaseFunc; typedef ROOT::Math::IParamGradFunction::BaseFunc BaseFunc;
WrappedTF1() {} WrappedTF1() {}
/** /**
constructor from a function pointer. constructor from a TF1 function pointer.
*/ */
WrappedTF1 ( TF1 & f ) : WrappedTF1 ( TF1 & f );
fLinear(false),
fPolynomial(false),
fFunc(&f),
fParams(f.GetParameters(),f.GetParameters()+f.GetNpar())
{
// init the pointers for CINT
if (fFunc->GetMethodCall() ) fFunc->InitArgs(fX, &fParams.front() );
// distinguish case of polynomial functions and linear functions
if (fFunc->GetNumber() >= 300 && fFunc->GetNumber() < 310) {
fLinear = true;
fPolynomial = true;
}
// check that in case function is linear the linear terms are not zer
o
if (fFunc->IsLinear() ) {
unsigned int ip = 0;
fLinear = true;
while (fLinear && ip < fParams.size() ) {
fLinear &= (fFunc->GetLinearPart(ip) != 0) ;
ip++;
}
}
}
/** /**
Destructor (no operations). TF1 Function pointer is not owned Destructor (no operations). TF1 Function pointer is not owned
*/ */
virtual ~WrappedTF1 () {} virtual ~WrappedTF1 () {}
/** /**
Copy constructor Copy constructor
*/ */
WrappedTF1(const WrappedTF1 & rhs) : WrappedTF1(const WrappedTF1 & rhs);
BaseFunc(),
BaseGradFunc(),
fLinear(rhs.fLinear),
fPolynomial(rhs.fPolynomial),
fFunc(rhs.fFunc),
fParams(rhs.fParams)
{
fFunc->InitArgs(fX,&fParams.front() );
}
/** /**
Assignment operator Assignment operator
*/ */
WrappedTF1 & operator = (const WrappedTF1 & rhs) { WrappedTF1 & operator = (const WrappedTF1 & rhs);
if (this == &rhs) return *this; // time saving self-test
fLinear = rhs.fLinear;
fPolynomial = rhs.fPolynomial;
fFunc = rhs.fFunc;
fFunc->InitArgs(fX, &fParams.front() );
fParams = rhs.fParams;
return *this;
}
/** @name interface inherited from IFunction */ /** @name interface inherited from IFunction */
/** /**
Clone the wrapper but not the original function Clone the wrapper but not the original function
*/ */
ROOT::Math::IGenFunction * Clone() const { ROOT::Math::IGenFunction * Clone() const {
return new WrappedTF1(*this); return new WrappedTF1(*this);
} }
skipping to change at line 143 skipping to change at line 101
} }
/// return parameter name (this is stored in TF1) /// return parameter name (this is stored in TF1)
std::string ParameterName(unsigned int i) const { std::string ParameterName(unsigned int i) const {
return std::string(fFunc->GetParName(i)); return std::string(fFunc->GetParName(i));
} }
using BaseGradFunc::operator(); using BaseGradFunc::operator();
/// evaluate the derivative of the function with respect to the paramete rs /// evaluate the derivative of the function with respect to the paramete rs
void ParameterGradient(double x, const double * par, double * grad ) co void ParameterGradient(double x, const double * par, double * grad ) co
nst { nst;
if (!fLinear) {
// need to set parameter values
fFunc->SetParameters( par );
static const double kEps = 0.001;
// no need to call InitArgs (it is called in TF1::GradientPar)
fFunc->GradientPar(&x,grad,kEps);
}
else {
unsigned int np = NPar();
for (unsigned int i = 0; i < np; ++i)
grad[i] = DoParameterDerivative(x, par, i);
}
}
static void SetDerivStepSize(double eps) { fgEps = eps; } static void SetDerivStepSize(double eps) { fgEps = eps; }
private: private:
/// evaluate function passing coordinates x and vector of parameters /// evaluate function passing coordinates x and vector of parameters
double DoEvalPar (double x, const double * p ) const { double DoEvalPar (double x, const double * p ) const {
fX[0] = x; fX[0] = x;
if (fFunc->GetMethodCall() ) fFunc->InitArgs(fX,p); // needed for in terpreted functions if (fFunc->GetMethodCall() ) fFunc->InitArgs(fX,p); // needed for in terpreted functions
return fFunc->EvalPar(fX,p); return fFunc->EvalPar(fX,p);
skipping to change at line 180 skipping to change at line 125
/// re-implement for better efficiency /// re-implement for better efficiency
double DoEval (double x) const { double DoEval (double x) const {
// no need to call InitArg for interpreted functions (done in ctor) // no need to call InitArg for interpreted functions (done in ctor)
// use EvalPar since it is much more efficient than Eval // use EvalPar since it is much more efficient than Eval
fX[0] = x; fX[0] = x;
const double * p = (fParams.size() > 0) ? &fParams.front() : 0; const double * p = (fParams.size() > 0) ? &fParams.front() : 0;
return fFunc->EvalPar(fX, p ); return fFunc->EvalPar(fX, p );
} }
/// return the function derivatives w.r.t. x /// return the function derivatives w.r.t. x
double DoDerivative( double x ) const { double DoDerivative( double x ) const;
// parameter are passed as non-const in Derivative
double * p = (fParams.size() > 0) ? const_cast<double *>( &fParams.f
ront()) : 0;
return fFunc->Derivative(x,p,fgEps);
}
/// evaluate the derivative of the function with respect to the paramete rs /// evaluate the derivative of the function with respect to the paramete rs
double DoParameterDerivative(double x, const double * p, unsigned int i double DoParameterDerivative(double x, const double * p, unsigned int i
par ) const { par ) const;
// not very efficient - use ParameterGradient
if (! fLinear ) {
fFunc->SetParameters( p );
return fFunc->GradientPar(ipar, &x,fgEps);
}
else if (fPolynomial) {
// case of polynomial function (no parameter dependency)
return std::pow(x, static_cast<int>(ipar) );
}
else {
// case of general linear function (bbuilt with ++ )
const TFormula * df = dynamic_cast<const TFormula*>( fFunc->GetLin
earPart(ipar) );
assert(df != 0);
fX[0] = x;
// hack since TFormula::EvalPar is not const
return (const_cast<TFormula*> ( df) )->EvalPar( fX ) ; // derivati
ves should not depend on parameters since func is linear
}
}
bool fLinear; // flag for linear functions bool fLinear; // flag for linear functions
bool fPolynomial; // flag for polynomial functions bool fPolynomial; // flag for polynomial functions
TF1 * fFunc; // pointer to ROOT function TF1 * fFunc; // pointer to ROOT function
mutable double fX[1]; //! cached vector for x value (needed for TF1::EvalPar signature) mutable double fX[1]; //! cached vector for x value (needed for TF1::EvalPar signature)
std::vector<double> fParams; // cached vector with parameter values std::vector<double> fParams; // cached vector with parameter values
static double fgEps; // epsilon used in derivative calculation static double fgEps; // epsilon used in derivative calculation
}; };
 End of changes. 10 change blocks. 
92 lines changed or deleted 11 lines changed or added


 cintdictversion.h   cintdictversion.h 
skipping to change at line 18 skipping to change at line 18
************************************************************************ ************************************************************************
* Copyright(c) 1995~2008 Masaharu Goto (cint@pcroot.cern.ch) * Copyright(c) 1995~2008 Masaharu Goto (cint@pcroot.cern.ch)
* *
* For the licensing terms see the file COPYING * For the licensing terms see the file COPYING
* *
************************************************************************/ ************************************************************************/
#ifndef INCLUDE_CINTDICTVERSION #ifndef INCLUDE_CINTDICTVERSION
#define INCLUDE_CINTDICTVERSION #define INCLUDE_CINTDICTVERSION
#define G__CINTDICTVERSION 20090417 #define G__CINTDICTVERSION 20090608
#endif /* INCLUDE_CINTDICTVERSION */ #endif /* INCLUDE_CINTDICTVERSION */
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 compiledata.h   compiledata.h 
/* This is file is automatically generated */ /* This is file is automatically generated */
#define BUILD_ARCH "linux" #define BUILD_ARCH "linux"
#define BUILD_NODE "Linux lxbuild147.cern.ch 2.6.18-92.1.18.el5 #1 SMP Wed #define BUILD_NODE "Linux lxbuild147.cern.ch 2.6.18-128.1.10.el5 #1 SMP Fri
Nov 12 06:49:06 EST 2008 i686 i686 i386 GNU/Linux" May 8 10:39:02 CEST 2009 i686 i686 i386 GNU/Linux"
#define COMPILER "/afs/cern.ch/sw/lcg/contrib/gcc/4.3/slc4_ia32_gcc34/bin/g #define COMPILER "/afs/cern.ch/sw/lcg/contrib/gcc/4.3/i686-slc5-gcc34-opt/b
++" in/g++"
#define COMPILERVERS "gcc432" #define COMPILERVERS "gcc432"
#define MAKESHAREDLIB "cd $BuildDir ; g++ -c $Opt -pipe -m32 -Wall -W -Wov erloaded-virtual -fPIC -pthread $IncludePath $SourceFiles ; g++ $ObjectFil es -shared -Wl,-soname,$LibName.so -m32 -O2 $LinkedLibs -o $SharedLib" #define MAKESHAREDLIB "cd $BuildDir ; g++ -c $Opt -pipe -m32 -Wall -W -Wov erloaded-virtual -fPIC -pthread $IncludePath $SourceFiles ; g++ $ObjectFil es -shared -Wl,-soname,$LibName.so -m32 -O2 $LinkedLibs -o $SharedLib"
#define MAKEEXE "cd $BuildDir ; g++ -c -pipe -m32 -Wall -W -Woverloaded-vi rtual -fPIC -pthread $IncludePath $SourceFiles; g++ $ObjectFiles -m32 -O2 -o $ExeName $LinkedLibs -lm -ldl -pthread -rdynamic" #define MAKEEXE "cd $BuildDir ; g++ -c -pipe -m32 -Wall -W -Woverloaded-vi rtual -fPIC -pthread $IncludePath $SourceFiles; g++ $ObjectFiles -m32 -O2 -o $ExeName $LinkedLibs -lm -ldl -pthread -rdynamic"
#define CXXOPT "-O2" #define CXXOPT "-O2"
#define CXXDEBUG "-g" #define CXXDEBUG "-g"
#define ROOTBUILD "" #define ROOTBUILD ""
#define LINKEDLIBS "-L$ROOTSYS/lib -lCore -lCint -lMathCore -lRint " #define LINKEDLIBS "-L$ROOTSYS/lib -lCore -lCint -lMathCore -lRint "
#define INCLUDEPATH "-I$ROOTSYS/include" #define INCLUDEPATH "-I$ROOTSYS/include"
#define OBJEXT "o" #define OBJEXT "o"
#define SOEXT "so" #define SOEXT "so"
 End of changes. 1 change blocks. 
4 lines changed or deleted 4 lines changed or added


 gl2ps.h   gl2ps.h 
/* $Id: gl2ps.h,v 1.1.1.1 2007/04/04 16:01:43 mtadel Exp $ */ // @(#)root/gl:$Id$
/* /*
* GL2PS, an OpenGL to PostScript Printing Library * GL2PS, an OpenGL to PostScript Printing Library
* Copyright (C) 1999-2005 Christophe Geuzaine <geuz@geuz.org> * Copyright (C) 1999-2009 C. Geuzaine
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of either: * modify it under the terms of either:
* *
* a) the GNU Library General Public License as published by the Free * a) the GNU Library General Public License as published by the Free
* Software Foundation, either version 2 of the License, or (at your * Software Foundation, either version 2 of the License, or (at your
* option) any later version; or * option) any later version; or
* *
* b) the GL2PS License as published by Christophe Geuzaine, either * b) the GL2PS License as published by Christophe Geuzaine, either
* version 2 of the License, or (at your option) any later version. * version 2 of the License, or (at your option) any later version.
skipping to change at line 41 skipping to change at line 41
* For the latest info about gl2ps, see http://www.geuz.org/gl2ps/. * For the latest info about gl2ps, see http://www.geuz.org/gl2ps/.
* Please report all bugs and problems to <gl2ps@geuz.org>. * Please report all bugs and problems to <gl2ps@geuz.org>.
*/ */
#ifndef __GL2PS_H__ #ifndef __GL2PS_H__
#define __GL2PS_H__ #define __GL2PS_H__
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
/* Define GL2PSDLL at compile time to build a Windows dll */ #include <TGLIncludes.h>
#if defined (WIN32) || defined(_WIN32) #define GL2PSDLL_API
# if defined(_MSC_VER)
# pragma warning(disable:4115)
# endif
# include <windows.h>
# if defined(GL2PSDLL)
# if defined(GL2PSDLL_EXPORTS)
# define GL2PSDLL_API __declspec(dllexport)
# else
# define GL2PSDLL_API __declspec(dllimport)
# endif
# else
# define GL2PSDLL_API
# endif
#else
# define GL2PSDLL_API
#endif
#include <GL/gl.h> /* Support for compressed PostScript/PDF/SVG and for embedded PNG
images in SVG */
/* Support for compressed PostScript/PDF */ #if defined(HAVE_ZLIB) || defined(HAVE_LIBZ)
# define GL2PS_HAVE_ZLIB
#if defined(HAVE_ZLIB) || defined(HAVE_LIBZ) || defined(GL2PS_HAVE_ZLIB) # if defined(HAVE_LIBPNG) || defined(HAVE_PNG)
# include <zlib.h> # define GL2PS_HAVE_LIBPNG
# if !defined(GL2PS_HAVE_ZLIB)
# define GL2PS_HAVE_ZLIB
# endif # endif
#endif #endif
/* Version number */ /* Version number */
#define GL2PS_MAJOR_VERSION 1 #define GL2PS_MAJOR_VERSION 1
#define GL2PS_MINOR_VERSION 2 #define GL2PS_MINOR_VERSION 3
#define GL2PS_PATCH_VERSION 6 #define GL2PS_PATCH_VERSION 3
#define GL2PS_EXTRA_VERSION ""
#define GL2PS_VERSION (GL2PS_MAJOR_VERSION + \ #define GL2PS_VERSION (GL2PS_MAJOR_VERSION + \
0.01 * GL2PS_MINOR_VERSION + \ 0.01 * GL2PS_MINOR_VERSION + \
0.0001 * GL2PS_PATCH_VERSION) 0.0001 * GL2PS_PATCH_VERSION)
/* Output file format */ #define GL2PS_COPYRIGHT "(C) 1999-2009 C. Geuzaine"
/* Output file formats (the values and the ordering are important!) */
#define GL2PS_PS 1 #define GL2PS_PS 0
#define GL2PS_EPS 2 #define GL2PS_EPS 1
#define GL2PS_TEX 3 #define GL2PS_TEX 2
#define GL2PS_PDF 4 #define GL2PS_PDF 3
#define GL2PS_SVG 4
#define GL2PS_PGF 5
/* Sorting algorithms */ /* Sorting algorithms */
#define GL2PS_NO_SORT 1 #define GL2PS_NO_SORT 1
#define GL2PS_SIMPLE_SORT 2 #define GL2PS_SIMPLE_SORT 2
#define GL2PS_BSP_SORT 3 #define GL2PS_BSP_SORT 3
/* Message levels and error codes */ /* Message levels and error codes */
#define GL2PS_SUCCESS 0 #define GL2PS_SUCCESS 0
skipping to change at line 159 skipping to change at line 147
#endif #endif
GL2PSDLL_API GLint gl2psBeginPage(const char *title, const char *producer, GL2PSDLL_API GLint gl2psBeginPage(const char *title, const char *producer,
GLint viewport[4], GLint format, GLint so rt, GLint viewport[4], GLint format, GLint so rt,
GLint options, GLint colormode, GLint options, GLint colormode,
GLint colorsize, GL2PSrgba *colormap, GLint colorsize, GL2PSrgba *colormap,
GLint nr, GLint ng, GLint nb, GLint buffe rsize, GLint nr, GLint ng, GLint nb, GLint buffe rsize,
FILE *stream, const char *filename); FILE *stream, const char *filename);
GL2PSDLL_API GLint gl2psEndPage(void); GL2PSDLL_API GLint gl2psEndPage(void);
GL2PSDLL_API GLint gl2psSetOptions(GLint options); GL2PSDLL_API GLint gl2psSetOptions(GLint options);
GL2PSDLL_API GLint gl2psGetOptions(GLint *options);
GL2PSDLL_API GLint gl2psBeginViewport(GLint viewport[4]); GL2PSDLL_API GLint gl2psBeginViewport(GLint viewport[4]);
GL2PSDLL_API GLint gl2psEndViewport(void); GL2PSDLL_API GLint gl2psEndViewport(void);
GL2PSDLL_API GLint gl2psText(const char *str, const char *fontname, GL2PSDLL_API GLint gl2psText(const char *str, const char *fontname,
GLshort fontsize); GLshort fontsize);
GL2PSDLL_API GLint gl2psTextOpt(const char *str, const char *fontname, GL2PSDLL_API GLint gl2psTextOpt(const char *str, const char *fontname,
GLshort fontsize, GLint align, GLfloat angl e); GLshort fontsize, GLint align, GLfloat angl e);
GL2PSDLL_API GLint gl2psSpecial(GLint format, const char *str);
GL2PSDLL_API GLint gl2psDrawPixels(GLsizei width, GLsizei height, GL2PSDLL_API GLint gl2psDrawPixels(GLsizei width, GLsizei height,
GLint xorig, GLint yorig, GLint xorig, GLint yorig,
GLenum format, GLenum type, const void * pixels); GLenum format, GLenum type, const void * pixels);
GL2PSDLL_API GLint gl2psEnable(GLint mode); GL2PSDLL_API GLint gl2psEnable(GLint mode);
GL2PSDLL_API GLint gl2psDisable(GLint mode); GL2PSDLL_API GLint gl2psDisable(GLint mode);
GL2PSDLL_API GLint gl2psPointSize(GLfloat value); GL2PSDLL_API GLint gl2psPointSize(GLfloat value);
GL2PSDLL_API GLint gl2psLineWidth(GLfloat value); GL2PSDLL_API GLint gl2psLineWidth(GLfloat value);
GL2PSDLL_API GLint gl2psBlendFunc(GLenum sfactor, GLenum dfactor); GL2PSDLL_API GLint gl2psBlendFunc(GLenum sfactor, GLenum dfactor);
/* undocumented */ /* undocumented */
GL2PSDLL_API GLint gl2psDrawImageMap(GLsizei width, GLsizei height, GL2PSDLL_API GLint gl2psDrawImageMap(GLsizei width, GLsizei height,
const GLfloat position[3], const GLfloat position[3],
const unsigned char *imagemap); const unsigned char *imagemap);
GL2PSDLL_API const char *gl2psGetFileExtension(GLint format);
GL2PSDLL_API const char *gl2psGetFormatDescription(GLint format);
#if defined(__cplusplus) #if defined(__cplusplus)
} }
#endif #endif
#endif /* __GL2PS_H__ */ #endif /* __GL2PS_H__ */
 End of changes. 12 change blocks. 
34 lines changed or deleted 26 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/