| CombinedCalculator.h | | CombinedCalculator.h | |
|
| // @(#)root/roostats:$Id: CombinedCalculator.h 30462 2009-09-25 16:05:55Z m
oneta $ | | // @(#)root/roostats:$Id: CombinedCalculator.h 31276 2009-11-18 15:06: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_CombinedCalculator | | #ifndef ROOSTATS_CombinedCalculator | |
| | | | |
| skipping to change at line 80 | | skipping to change at line 80 | |
| // | | // | |
| | | | |
| namespace RooStats { | | namespace RooStats { | |
| | | | |
| class CombinedCalculator : public IntervalCalculator, public HypoTestCal
culator { | | class CombinedCalculator : public IntervalCalculator, public HypoTestCal
culator { | |
| | | | |
| public: | | public: | |
| | | | |
| CombinedCalculator() : | | CombinedCalculator() : | |
| fPdf(0), | | fPdf(0), | |
|
| fData(0), | | fData(0) | |
| fPOI(0), | | | |
| fNullParams(0), | | | |
| fAlternateParams(0), | | | |
| fNuisParams(0) | | | |
| {} | | {} | |
| | | | |
| CombinedCalculator(RooAbsData& data, RooAbsPdf& pdf, const RooArgSet&
paramsOfInterest, | | CombinedCalculator(RooAbsData& data, RooAbsPdf& pdf, const RooArgSet&
paramsOfInterest, | |
| Double_t size = 0.05, const RooArgSet* nullParams
= 0, const RooArgSet* altParams = 0, const RooArgSet* nuisParams = 0) : | | Double_t size = 0.05, const RooArgSet* nullParams
= 0, const RooArgSet* altParams = 0, const RooArgSet* nuisParams = 0) : | |
| | | | |
| fPdf(&pdf), | | fPdf(&pdf), | |
| fData(&data), | | fData(&data), | |
|
| fPOI(¶msOfInterest), | | fPOI(paramsOfInterest) | |
| fNullParams(nullParams), | | | |
| fAlternateParams(altParams), | | | |
| fNuisParams(nuisParams) | | | |
| { | | { | |
|
| | | if (nullParams) fNullParams.add(*nullParams); | |
| | | if (altParams) fAlternateParams.add(*altParams); | |
| | | if (nuisParams) fNuisParams.add(*nuisParams); | |
| SetTestSize(size); | | SetTestSize(size); | |
| } | | } | |
| | | | |
| // constructor from data and model configuration | | // constructor from data and model configuration | |
| CombinedCalculator(RooAbsData& data, const ModelConfig& model, | | CombinedCalculator(RooAbsData& data, const ModelConfig& model, | |
| Double_t size = 0.05) : | | Double_t size = 0.05) : | |
| fPdf(0), | | fPdf(0), | |
|
| fData(&data), | | fData(&data) | |
| fPOI(0), | | | |
| fNullParams(0), | | | |
| fAlternateParams(0), | | | |
| fNuisParams(0) | | | |
| { | | { | |
| SetModel(model); | | SetModel(model); | |
| SetTestSize(size); | | SetTestSize(size); | |
| } | | } | |
| | | | |
| // destructor. | | // destructor. | |
| virtual ~CombinedCalculator() { } | | virtual ~CombinedCalculator() { } | |
|
| // if( fOwnsWorkspace && fWS) delete fWS; | | | |
| // // commented out b/c currently the calculator does not own thes | | | |
| e. Change if we clone. | | | |
| // // if (fWS) delete fWS; | | | |
| // // if (fNullParams) delete fNullParams; | | | |
| // // if (fAlternateParams) delete fAlternateParams; | | | |
| // // if (fPOI) delete fPOI; | | | |
| // // if (fNuisParams) delete fNuisParams; | | | |
| // } | | | |
| | | | |
| // Main interface to get a ConfInterval, pure virtual | | // Main interface to get a ConfInterval, pure virtual | |
| virtual ConfInterval* GetInterval() const = 0; | | virtual ConfInterval* GetInterval() const = 0; | |
| // main interface to get a HypoTestResult, pure virtual | | // main interface to get a HypoTestResult, pure virtual | |
| virtual HypoTestResult* GetHypoTest() const = 0; | | virtual HypoTestResult* GetHypoTest() const = 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) {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;} | |
| // 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 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) { | |
| fData = &data; | | fData = &data; | |
| } | | } | |
| | | | |
|
| // set the model | | // set the model (in this case can set only the parameters for the nu
ll hypothesis) | |
| virtual void SetModel(const ModelConfig & model) { | | virtual void SetModel(const ModelConfig & model) { | |
| fPdf = model.GetPdf(); | | fPdf = model.GetPdf(); | |
|
| fPOI = model.GetParametersOfInterest(); | | if (model.GetParametersOfInterest()) SetParameters(*model.GetParam | |
| fNullParams = model.GetSnapshot(); | | etersOfInterest()); | |
| fNuisParams = model.GetNuisanceParameters(); | | if (model.GetSnapshot()) SetNullParameters(*model.GetSnapshot()); | |
| | | if (model.GetNuisanceParameters()) SetNuisanceParameters(*model.Ge | |
| | | tNuisanceParameters()); | |
| } | | } | |
| | | | |
| virtual void SetNullModel( const ModelConfig &) { // to be understoo
d what to do | | virtual void SetNullModel( const ModelConfig &) { // to be understoo
d what to do | |
| } | | } | |
| virtual void SetAlternateModel(const ModelConfig &) { // to be under
stood what to do | | virtual void SetAlternateModel(const ModelConfig &) { // to be under
stood what to do | |
| } | | } | |
| | | | |
| /* specific setting - keep for convenience- some of them could be re
moved */ | | /* specific setting - keep for convenience- some of them could be re
moved */ | |
| | | | |
| // Set the Pdf | | // Set the Pdf | |
| virtual void SetPdf(RooAbsPdf& pdf) { fPdf = &pdf; } | | virtual void SetPdf(RooAbsPdf& pdf) { fPdf = &pdf; } | |
| | | | |
| // specify the parameters of interest in the interval | | // specify the parameters of interest in the interval | |
|
| virtual void SetParameters(const RooArgSet& set) {fPOI = &set;} | | virtual void SetParameters(const RooArgSet& set) { fPOI.removeAll(); | |
| | | fPOI.add(set); } | |
| | | | |
| // specify the nuisance parameters (eg. the rest of the parameters) | | // specify the nuisance parameters (eg. the rest of the parameters) | |
|
| virtual void SetNuisanceParameters(const RooArgSet& set) {fNuisParams
= &set;} | | virtual void SetNuisanceParameters(const RooArgSet& set) {fNuisParams
.removeAll(); fNuisParams.add(set);} | |
| | | | |
| // set parameter values for the null if using a common PDF | | // set parameter values for the null if using a common PDF | |
|
| virtual void SetNullParameters(const RooArgSet& set) {fNullParams = & | | virtual void SetNullParameters(const RooArgSet& set) {fNullParams.rem | |
| set;} | | oveAll(); fNullParams.add(set);} | |
| | | | |
| // set parameter values for the alternate if using a common PDF | | // set parameter values for the alternate if using a common PDF | |
|
| virtual void SetAlternateParameters(const RooArgSet& set) {fAlternate
Params = &set;} | | virtual void SetAlternateParameters(const RooArgSet& set) {fAlternate
Params.removeAll(); fAlternateParams.add(set);} | |
| | | | |
| protected: | | protected: | |
| | | | |
| RooAbsPdf * GetPdf() const { return fPdf; } | | RooAbsPdf * GetPdf() const { return fPdf; } | |
| RooAbsData * GetData() const { return fData; } | | RooAbsData * GetData() const { return fData; } | |
| | | | |
| 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) | |
| | | | |
| RooAbsPdf * fPdf; | | RooAbsPdf * fPdf; | |
| RooAbsData * fData; | | RooAbsData * fData; | |
|
| const RooArgSet* fPOI; // RooArgSet specifying parameters of interes | | RooArgSet fPOI; // RooArgSet specifying parameters of interest for i | |
| t for interval | | nterval | |
| const RooArgSet* fNullParams; // RooArgSet specifying null parameters | | RooArgSet fNullParams; // RooArgSet specifying null parameters for hy | |
| for hypothesis test | | pothesis test | |
| const RooArgSet* fAlternateParams; // RooArgSet specifying alternate | | RooArgSet fAlternateParams; // RooArgSet specifying alternate paramet | |
| parameters for hypothesis test // Is it used ???? | | ers for hypothesis test // Is it used ???? | |
| const RooArgSet* fNuisParams;// RooArgSet specifying nuisance parame | | RooArgSet fNuisParams;// RooArgSet specifying nuisance parameters fo | |
| ters for interval | | r interval | |
| | | | |
| ClassDef(CombinedCalculator,1) // A base class that is for tools that
can be both HypoTestCalculators and IntervalCalculators | | ClassDef(CombinedCalculator,1) // A base class that is for tools that
can be both HypoTestCalculators and IntervalCalculators | |
| | | | |
| }; | | }; | |
| } | | } | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 13 change blocks. |
| 41 lines changed or deleted | | 29 lines changed or added | |
|
| Dinv.h | | Dinv.h | |
|
| // @(#)root/smatrix:$Id: Dinv.h 30459 2009-09-25 15:38:26Z moneta $ | | // @(#)root/smatrix:$Id: Dinv.h 30561 2009-10-05 14:23:15Z 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 67 | | skipping to change at line 67 | |
| Cramers rule. | | Cramers rule. | |
| | | | |
| @author T. Glebe | | @author T. Glebe | |
| */ | | */ | |
| //=========================================================================
===== | | //=========================================================================
===== | |
| // Inverter class | | // Inverter class | |
| //=========================================================================
===== | | //=========================================================================
===== | |
| template <unsigned int idim, unsigned int n = idim> | | template <unsigned int idim, unsigned int n = idim> | |
| class Inverter { | | class Inverter { | |
| public: | | public: | |
|
| /// | | /// matrix inversion for a generic square matrix using LU factorization | |
| | | /// (code originally from CERNLIB and then ported in C++ for CLHEP) | |
| | | /// implementation is in file Math/MatrixInversion.icc | |
| template <class MatrixRep> | | template <class MatrixRep> | |
| static bool Dinv(MatrixRep& rhs) { | | static bool Dinv(MatrixRep& rhs) { | |
| | | | |
|
| #ifdef XXX | | | |
| if (n < 1 || n > idim) { | | | |
| return false; | | | |
| } | | | |
| #endif | | | |
| | | | |
| #ifdef OLD_IMPL | | | |
| | | | |
| /* Initialized data */ | | | |
| static unsigned int work[n]; | | | |
| for(unsigned int i=0; i<n; ++i) work[i] = 0; | | | |
| | | | |
| static typename MatrixRep::value_type det = 0; | | | |
| | | | |
| /* Function Body */ | | | |
| | | | |
| /* N.GT.3 CASES. FACTORIZE MATRIX AND INVERT. */ | | | |
| if (Dfactir<MatrixRep,n,idim>(rhs,det,work) == false) { | | | |
| std::cerr << "Dfactir failed!!" << std::endl; | | | |
| return false; | | | |
| } | | | |
| return Dfinv<MatrixRep,n,idim>(rhs,work); | | | |
| #else | | | |
| | | | |
| /* Initialized data */ | | /* Initialized data */ | |
|
| unsigned int work[n+1]; | | unsigned int work[n+1] = {0}; | |
| for(unsigned int i=0; i<n+1; ++i) work[i] = 0; | | | |
| | | | |
|
| static typename MatrixRep::value_type det = 0; | | static typename MatrixRep::value_type det(0); | |
| | | | |
| if (DfactMatrix(rhs,det,work) != 0) { | | if (DfactMatrix(rhs,det,work) != 0) { | |
| std::cerr << "Dfact_matrix failed!!" << std::endl; | | std::cerr << "Dfact_matrix failed!!" << std::endl; | |
| return false; | | return false; | |
| } | | } | |
| | | | |
| int ifail = DfinvMatrix(rhs,work); | | int ifail = DfinvMatrix(rhs,work); | |
| if (ifail == 0) return true; | | if (ifail == 0) return true; | |
| return false; | | return false; | |
|
| #endif | | | |
| } // Dinv | | } // Dinv | |
| | | | |
|
| // symmetric function (copy in a general one) | | /// symmetric matrix inversion using | |
| | | /// Bunch-kaufman pivoting method | |
| | | /// implementation in Math/MatrixInversion.icc | |
| template <class T> | | template <class T> | |
| static bool Dinv(MatRepSym<T,idim> & rhs) { | | static bool Dinv(MatRepSym<T,idim> & rhs) { | |
|
| // not very efficient but need to re-do Dsinv for new storage of | | | |
| // symmetric matrices | | | |
| #ifdef OLD_IMPL | | | |
| MatRepStd<T,idim> tmp; | | | |
| for (unsigned int i = 0; i< idim*idim; ++i) | | | |
| tmp[i] = rhs[i]; | | | |
| if (! Inverter<idim>::Dinv(tmp) ) return false; | | | |
| // recopy the data | | | |
| for (unsigned int i = 0; i< idim*n; ++i) | | | |
| rhs[i] = tmp[i]; | | | |
| | | | |
| return true; | | | |
| #else | | | |
| int ifail = 0; | | int ifail = 0; | |
| InvertBunchKaufman(rhs,ifail); | | InvertBunchKaufman(rhs,ifail); | |
| if (ifail == 0) return true; | | if (ifail == 0) return true; | |
| return false; | | return false; | |
|
| #endif | | | |
| } | | } | |
| | | | |
| /** | | /** | |
|
| Bunch-Kaufman method for inversion of symmetric matrices | | LU Factorization method for inversion of general square matrices | |
| | | (see implementation in Math/MatrixInversion.icc) | |
| */ | | */ | |
| template <class T> | | template <class T> | |
| static int DfactMatrix(MatRepStd<T,idim,n> & rhs, T & det, unsigned int *
work); | | static int DfactMatrix(MatRepStd<T,idim,n> & rhs, T & det, unsigned int *
work); | |
|
| | | /** | |
| | | LU inversion of general square matrices. To be called after DFactMatri | |
| | | x | |
| | | (see implementation in Math/MatrixInversion.icc) | |
| | | */ | |
| template <class T> | | template <class T> | |
| static int DfinvMatrix(MatRepStd<T,idim,n> & rhs, unsigned int * work); | | static int DfinvMatrix(MatRepStd<T,idim,n> & rhs, unsigned int * work); | |
| | | | |
| /** | | /** | |
| Bunch-Kaufman method for inversion of symmetric matrices | | Bunch-Kaufman method for inversion of symmetric matrices | |
| */ | | */ | |
| template <class T> | | template <class T> | |
| static void InvertBunchKaufman(MatRepSym<T,idim> & rhs, int &ifail); | | static void InvertBunchKaufman(MatRepSym<T,idim> & rhs, int &ifail); | |
| | | | |
| }; // class Inverter | | }; // class Inverter | |
| | | | |
| skipping to change at line 234 | | skipping to change at line 203 | |
| // Inverter<2>: Cramers rule | | // Inverter<2>: Cramers rule | |
| //=========================================================================
===== | | //=========================================================================
===== | |
| | | | |
| template <> | | template <> | |
| class Inverter<2> { | | class Inverter<2> { | |
| public: | | public: | |
| /// | | /// | |
| template <class MatrixRep> | | template <class MatrixRep> | |
| static bool Dinv(MatrixRep& rhs) { | | static bool Dinv(MatrixRep& rhs) { | |
| | | | |
|
| typename MatrixRep::value_type det = rhs[0] * rhs[3] - rhs[2] * rhs[1]; | | typedef typename MatrixRep::value_type T; | |
| | | T det = rhs[0] * rhs[3] - rhs[2] * rhs[1]; | |
| | | | |
|
| if (det == 0.) { return false; } | | if (det == T(0.) ) { return false; } | |
| | | | |
|
| // use 1.0f to remove warning on Windows | | T s = T(1.0) / det; | |
| typename MatrixRep::value_type s = 1.0f / det; | | | |
| | | | |
|
| typename MatrixRep::value_type c11 = s * rhs[3]; | | T c11 = s * rhs[3]; | |
| | | | |
| rhs[2] = -s * rhs[2]; | | rhs[2] = -s * rhs[2]; | |
| rhs[1] = -s * rhs[1]; | | rhs[1] = -s * rhs[1]; | |
| rhs[3] = s * rhs[0]; | | rhs[3] = s * rhs[0]; | |
| rhs[0] = c11; | | rhs[0] = c11; | |
| | | | |
| return true; | | return true; | |
| } | | } | |
| | | | |
| // specialization for the symmetric matrices | | // specialization for the symmetric matrices | |
| template <class T> | | template <class T> | |
| static bool Dinv(MatRepSym<T,2> & rep) { | | static bool Dinv(MatRepSym<T,2> & rep) { | |
| | | | |
| T * rhs = rep.Array(); | | T * rhs = rep.Array(); | |
| | | | |
| T det = rhs[0] * rhs[2] - rhs[1] * rhs[1]; | | T det = rhs[0] * rhs[2] - rhs[1] * rhs[1]; | |
| | | | |
|
| if (det == 0.) { return false; } | | if (det == T(0.)) { return false; } | |
| | | | |
|
| T s = 1.0f / det; | | T s = T(1.0) / det; | |
| T c11 = s * rhs[2]; | | T c11 = s * rhs[2]; | |
| | | | |
| rhs[1] = -s * rhs[1]; | | rhs[1] = -s * rhs[1]; | |
| rhs[2] = s * rhs[0]; | | rhs[2] = s * rhs[0]; | |
| rhs[0] = c11; | | rhs[0] = c11; | |
| return true; | | return true; | |
| } | | } | |
| | | | |
| }; | | }; | |
| | | | |
| /** | | /** | |
|
| 3x3 direct matrix inversion suing Cramer Rule | | 3x3 direct matrix inversion using Cramer Rule | |
| use only for FastInverter | | use only for FastInverter | |
| */ | | */ | |
| //=========================================================================
===== | | //=========================================================================
===== | |
| // FastInverter<3> | | // FastInverter<3> | |
| //=========================================================================
===== | | //=========================================================================
===== | |
| | | | |
| template <> | | template <> | |
| class FastInverter<3> { | | class FastInverter<3> { | |
| public: | | public: | |
| /// | | /// | |
| | | | |
End of changes. 18 change blocks. |
| 54 lines changed or deleted | | 24 lines changed or added | |
|
| Factory.h | | Factory.h | |
|
| // @(#)root/tmva $Id: Factory.h 29122 2009-06-22 06:51:30Z 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 | | | |
| * | | | |
| * Joerg Stelzer <stelzer@cern.ch> - DESY, Germany | | | |
| * | | | |
| * Peter Speckmayer <peter.speckmayer@cern.ch> - CERN, Switzerland | | | |
| * | | | |
| * 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 | | | |
| * | | | |
| * | | | |
| * | | | |
| * 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> | | | |
| #ifndef ROOT_TCut | | | |
| #include "TCut.h" | | | |
| #endif | | | |
| | | | |
| #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 | | | |
| | | | |
| class TFile; | | | |
| class TTree; | | | |
| class TDirectory; | | | |
| | | | |
| namespace TMVA { | | | |
| | | | |
| class IMethod; | | | |
| class MethodBase; | | | |
| class DataInputHandler; | | | |
| class DataSetInfo; | | | |
| class VariableTransformBase; | | | |
| | | | |
| class Factory : public Configurable { | | | |
| public: | | | |
| | | | |
| typedef std::vector<IMethod*> MVector; | | | |
| | | | |
| // no default constructor | | | |
| Factory( TString theJobName, TFile* theTargetFile, TString theOption | | | |
| = "" ); | | | |
| | | | |
| // default destructor | | | |
| virtual ~Factory(); | | | |
| | | | |
| virtual const char* GetName() const { return "Factory"; } | | | |
| | | | |
| // add events to training and testing trees | | | |
| void AddSignalTrainingEvent ( const std::vector<Double_t>& event, | | | |
| Double_t weight = 1.0 ); | | | |
| void AddBackgroundTrainingEvent( const std::vector<Double_t>& event, | | | |
| Double_t weight = 1.0 ); | | | |
| void AddSignalTestEvent ( const std::vector<Double_t>& event, | | | |
| Double_t weight = 1.0 ); | | | |
| void AddBackgroundTestEvent ( const std::vector<Double_t>& event, | | | |
| Double_t weight = 1.0 ); | | | |
| void AddTrainingEvent( const TString& className, const std::vector<Do | | | |
| uble_t>& event, Double_t weight ); | | | |
| void AddTestEvent ( const TString& className, const std::vector<Do | | | |
| uble_t>& event, Double_t weight ); | | | |
| void AddEvent ( const TString& className, Types::ETreeType tt, | | | |
| const std::vector<Double_t>& event, Double_t weight ); | | | |
| Bool_t UserAssignEvents(UInt_t clIndex); | | | |
| TTree* CreateEventAssignTrees( const TString& name ); | | | |
| | | | |
| DataSetInfo& AddDataSet( DataSetInfo& ); | | | |
| DataSetInfo& AddDataSet( const TString& ); | | | |
| | | | |
| // special case: signal/background | | | |
| | | | |
| // Data input related | | | |
| void SetInputTrees( const TString& signalFileName, const TString& bac | | | |
| kgroundFileName, | | | |
| Double_t signalWeight=1.0, Double_t backgroundWei | | | |
| ght=1.0 ); | | | |
| void SetInputTrees( TTree* inputTree, const TCut& SigCut, const TCut& | | | |
| BgCut ); | | | |
| // Set input trees at once | | | |
| void SetInputTrees( TTree* signal, TTree* background, | | | |
| Double_t signalWeight=1.0, Double_t backgroundWei | | | |
| ght=1.0) ; | | | |
| | | | |
| void AddSignalTree( TTree* signal, Double_t weight=1.0, Types::ETr | | | |
| eeType treetype = Types::kMaxTreeType ); | | | |
| void AddSignalTree( TString datFileS, Double_t weight=1.0, Types::ETr | | | |
| eeType 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); | | | |
| | | | |
| void AddBackgroundTree( TTree* background, Double_t weight=1.0, Types | | | |
| ::ETreeType treetype = Types::kMaxTreeType ); | | | |
| void AddBackgroundTree( TString datFileB, 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 ); | | | |
| | | | |
| void SetSignalWeightExpression( const TString& variable ); | | | |
| void SetBackgroundWeightExpression( const TString& variable ); | | | |
| | | | |
| // special case: regression | | | |
| void AddRegressionTree( TTree* tree, Double_t weight = 1.0, | | | |
| Types::ETreeType treetype = Types::kMaxTreeTy | | | |
| pe ) { | | | |
| AddTree( tree, "Regression", weight, "", treetype ); | | | |
| } | | | |
| | | | |
| // general | | | |
| | | | |
| // Data input related | | | |
| void SetTree( TTree* tree, const TString& className, Double_t weight | | | |
| ); // depreciated | | | |
| void AddTree( TTree* tree, const TString& className, Double_t weight= | | | |
| 1.0, | | | |
| const TCut& cut = "", | | | |
| Types::ETreeType tt = Types::kMaxTreeType ); | | | |
| void AddTree( TTree* tree, const TString& className, Double_t weight, | | | |
| const TCut& cut, const TString& treeType ); | | | |
| | | | |
| // set input variable | | | |
| void SetInputVariables ( std::vector<TString>* theVariables ); // de | | | |
| preciated | | | |
| void AddVariable ( const TString& expression, const TString& t | | | |
| itle, const TString& unit, | | | |
| char type='F', Double_t min = 0, Double_t m | | | |
| ax = 0 ); | | | |
| void AddVariable ( const TString& expression, char type='F', | | | |
| Double_t min = 0, Double_t max = 0 ); | | | |
| void AddTarget ( const TString& expression, const TString& t | | | |
| itle = "", const TString& unit = "", | | | |
| Double_t min = 0, Double_t max = 0 ); | | | |
| void AddRegressionTarget( const TString& expression, const TString& t | | | |
| itle = "", const TString& unit = "", | | | |
| Double_t min = 0, Double_t max = 0 ) | | | |
| { | | | |
| AddTarget( expression, title, unit, min, max ); | | | |
| } | | | |
| void AddSpectator ( const TString& expression, const TString& | | | |
| title = "", const TString& unit = "", | | | |
| Double_t min = 0, Double_t max = 0 ); | | | |
| | | | |
| // set weight for class | | | |
| void SetWeightExpression( const TString& variable, const TString& cla | | | |
| ssName = "" ); | | | |
| | | | |
| // set cut for class | | | |
| void SetCut( const TString& cut, const TString& className = "" ); | | | |
| void SetCut( const TCut& cut, const TString& className = "" ); | | | |
| void AddCut( const TString& cut, const TString& className = "" ); | | | |
| void AddCut( const TCut& cut, const TString& className = "" ); | | | |
| | | | |
| // prepare input tree for training | | | |
| void PrepareTrainingAndTestTree( const TCut& cut, const TString& spli | | | |
| tOpt ); | | | |
| void PrepareTrainingAndTestTree( TCut sigcut, TCut bkgcut, const TStr | | | |
| ing& splitOpt ); | | | |
| | | | |
| // ... deprecated, kept for backwards compatibility | | | |
| void PrepareTrainingAndTestTree( const TCut& cut, Int_t Ntrain, Int_t | | | |
| Ntest = -1 ); | | | |
| | | | |
| void PrepareTrainingAndTestTree( const TCut& cut, Int_t NsigTrain, In | | | |
| t_t NbkgTrain, Int_t NsigTest, Int_t NbkgTest, | | | |
| const TString& otherOpt="SplitMode=R | | | |
| andom:!V" ); | | | |
| | | | |
| MethodBase* BookMethod( TString theMethodName, TString methodTitle, T | | | |
| String theOption = "" ); | | | |
| MethodBase* BookMethod( Types::EMVA theMethod, TString methodTitle, | | | |
| TString theOption = "" ); | | | |
| MethodBase* BookMethod( TMVA::Types::EMVA /*theMethod*/, | | | |
| TString /*methodTitle*/, | | | |
| TString /*methodOption*/, | | | |
| TMVA::Types::EMVA /*theCommittee*/, | | | |
| TString /*committeeOption = ""*/ ) { return 0 | | | |
| ; } | | | |
| | | | |
| // training for all booked methods | | | |
| void TrainAllMethods ( TString what = "Classification | | | |
| " ); | | | |
| void TrainAllMethodsForClassification( void ) { TrainAllMethods( "Cla | | | |
| ssification" ); } | | | |
| void TrainAllMethodsForRegression ( void ) { TrainAllMethods( "Reg | | | |
| ression" ); } | | | |
| | | | |
| // testing | | | |
| void TestAllMethods(); | | | |
| | | | |
| // 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 ); | | | |
| | | | |
| // 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; | | | |
| | | | |
| static TDirectory* RootBaseDir() { return (TDirectory*)fgTargetFile; | | | |
| } | | | |
| | | | |
| private: | | | |
| | | | |
| // the beautiful greeting message | | | |
| void Greetings(); | | | |
| | | | |
| void WriteDataInformation(); | | | |
| | | | |
| DataInputHandler& DataInput() { return *fDataInputHandler; } | | | |
| DataSetInfo& DefaultDataSetInfo(); | | | |
| void SetInputTreesFromEventAssignTrees(); | | | |
| | | | |
| private: | | | |
| | | | |
| // data members | | | |
| | | | |
| static TFile* fgTargetFile; //! ROOT | | | |
| output file | | | |
| | | | |
| DataInputHandler* fDataInputHandler; | | | |
| | | | |
| std::vector<TMVA::VariableTransformBase*> fDefaultTrfs; //! list | | | |
| of transformations on default DataSet | | | |
| | | | |
| // cd to local directory | | | |
| TString fOptions; //! optio | | | |
| n string given by construction (presently only "V") | | | |
| TString fTransformations; //! List | | | |
| of transformations to test | | | |
| Bool_t fVerbose; //! verbo | | | |
| se mode | | | |
| | | | |
| MVector fMethods; //! all M | | | |
| VA methods | | | |
| TString fJobName; //! jobna | | | |
| me, used as extension 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 | | | |
| std::vector<TTree*> fTrainAssignTree; //! for e | | | |
| ach class: tmp tree if user wants to assign the events directly | | | |
| std::vector<TTree*> fTestAssignTree; //! for e | | | |
| ach class: tmp tree if user wants to assign the events directly | | | |
| | | | |
| Int_t fATreeType; // typ | | | |
| e of event (=classIndex) | | | |
| Float_t fATreeWeight; // wei | | | |
| ght of the event | | | |
| Float_t* fATreeEvent; // eve | | | |
| nt variables | | | |
| | | | |
|
| 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. |
| 342 lines changed or deleted | | 38 lines changed or added | |
|
| FeldmanCousins.h | | FeldmanCousins.h | |
|
| // @(#)root/roostats:$Id: FeldmanCousins.h 26805 2009-01-13 17:45:57Z cranm
er $ | | // @(#)root/roostats:$Id: FeldmanCousins.h 31276 2009-11-18 15:06:42Z monet
a $ | |
| // 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_FeldmanCousins | | #ifndef ROOSTATS_FeldmanCousins | |
| | | | |
| skipping to change at line 55 | | skipping to change at line 55 | |
| 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 the DataSet | | // Set the DataSet | |
| virtual void SetData(RooAbsData& data) { fData = &data; } | | virtual void SetData(RooAbsData& data) { fData = &data; } | |
| // Set the Pdf | | // Set the Pdf | |
| virtual void SetPdf(RooAbsPdf& pdf) { fPdf = &pdf; } | | virtual void SetPdf(RooAbsPdf& pdf) { fPdf = &pdf; } | |
|
| | | | |
| // specify the parameters of interest in the interval | | // specify the parameters of interest in the interval | |
|
| virtual void SetParameters(const RooArgSet& set) {fPOI = &set;} | | virtual void SetParameters(const RooArgSet& set) { fPOI.removeAll(); | |
| | | fPOI.add(set); } | |
| | | | |
| // specify the nuisance parameters (eg. the rest of the parameters) | | // specify the nuisance parameters (eg. the rest of the parameters) | |
|
| virtual void SetNuisanceParameters(const RooArgSet& set) {fNuisParams | | virtual void SetNuisanceParameters(const RooArgSet& set) {fNuisParams | |
| = &set;} | | .removeAll(); fNuisParams.add(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;} | |
| | | | |
| virtual void SetModel(const ModelConfig &); | | virtual void SetModel(const ModelConfig &); | |
| | | | |
| RooAbsData* GetPointsToScan() { | | RooAbsData* GetPointsToScan() { | |
| if(!fPointsToTest) CreateParameterPoints(); | | if(!fPointsToTest) CreateParameterPoints(); | |
| return fPointsToTest; | | return fPointsToTest; | |
| | | | |
| skipping to change at line 96 | | skipping to change at line 99 | |
| | | | |
| // 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) | |
| RooAbsPdf * fPdf; // common PDF | | RooAbsPdf * fPdf; // common PDF | |
| RooAbsData * fData; // data set | | RooAbsData * fData; // data set | |
|
| const RooArgSet* fPOI; // RooArgSet specifying parameters of interes | | RooArgSet fPOI; // RooArgSet specifying parameters of interest for i | |
| t for interval | | nterval | |
| const RooArgSet* fNuisParams;// RooArgSet specifying nuisance parame | | RooArgSet fNuisParams;// RooArgSet specifying nuisance parameters fo | |
| ters for interval | | r interval | |
| mutable ToyMCSampler* fTestStatSampler; // the test statistic sampler | | mutable ToyMCSampler* fTestStatSampler; // the test statistic sampler | |
| mutable RooAbsData* fPointsToTest; // points to perform the construct
ion | | 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_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 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 | | bool fCreateBelt; // controls use if ConfidenceBelt should be saved t
o a TFile | |
| | | | |
| | | | |
End of changes. 5 change blocks. |
| 8 lines changed or deleted | | 12 lines changed or added | |
|
| FitResult.h | | FitResult.h | |
|
| // @(#)root/mathcore:$Id: FitResult.h 28957 2009-06-12 13:40:04Z moneta $ | | // @(#)root/mathcore:$Id: FitResult.h 31261 2009-11-18 07:31:51Z 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 113 | | skipping to change at line 113 | |
| double MinFcnValue() const { return fVal; } | | double MinFcnValue() const { return fVal; } | |
| | | | |
| ///Number of function calls to find minimum | | ///Number of function calls to find minimum | |
| unsigned int NCalls() const { return fNCalls; } | | unsigned int NCalls() const { return fNCalls; } | |
| | | | |
| ///Expected distance from minimum | | ///Expected distance from minimum | |
| double Edm() const { return fEdm; } | | double Edm() const { return fEdm; } | |
| | | | |
| /// get total number of parameters | | /// get total number of parameters | |
| unsigned int NTotalParameters() const { return fParams.size(); } | | unsigned int NTotalParameters() const { return fParams.size(); } | |
|
| | | /// total number of parameters (abbreviation) | |
| | | unsigned int NPar() const { return NTotalParameters(); } | |
| | | | |
| /// get total number of free parameters | | /// get total number of free parameters | |
| unsigned int NFreeParameters() const { return fNFree; } | | unsigned int NFreeParameters() const { return fNFree; } | |
| | | | |
| /// minimizer status code | | /// minimizer status code | |
| int Status() const { return fStatus; } | | int Status() const { return fStatus; } | |
| | | | |
| /** fitting quantities **/ | | /** fitting quantities **/ | |
| | | | |
| /// Return pointer to model (fit) function with fitted parameter values. | | /// Return pointer to model (fit) function with fitted parameter values. | |
| | | | |
| skipping to change at line 135 | | skipping to change at line 137 | |
| /// Chi2 fit value | | /// Chi2 fit value | |
| /// in case of likelihood must be computed ? | | /// in case of likelihood must be computed ? | |
| double Chi2() const { return fChi2; } | | double Chi2() const { return fChi2; } | |
| | | | |
| /// Number of degree of freedom | | /// Number of degree of freedom | |
| unsigned int Ndf() const { return fNdf; } | | unsigned int Ndf() const { return fNdf; } | |
| | | | |
| /// p value of the fit (chi2 probability) | | /// p value of the fit (chi2 probability) | |
| double Prob() const; | | double Prob() const; | |
| | | | |
|
| /// parameter errors | | /// parameter errors (return st::vector) | |
| const std::vector<double> & Errors() const { return fErrors; } | | const std::vector<double> & Errors() const { return fErrors; } | |
|
| | | /// parameter errors (return const pointer) | |
| | | const double * GetErrors() const { return &fErrors.front(); } | |
| | | | |
|
| /// parameter values | | /// parameter values (return std::vector) | |
| const std::vector<double> & Parameters() const { return fParams; } | | const std::vector<double> & Parameters() const { return fParams; } | |
|
| | | /// parameter values (return const pointer) | |
| | | const double * GetParams() const { return &fParams.front();} | |
| | | | |
| /// 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; | |
| } | | } | |
| | | | |
| /// set the Minos errors for parameter i (called by the Fitter class whe
n running Minos) | | /// set the Minos errors for parameter i (called by the Fitter class whe
n running Minos) | |
| | | | |
| skipping to change at line 204 | | skipping to change at line 210 | |
| | | | |
| /// 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) const { | | void GetCorrelationMatrix(Matrix & mat) const { | |
| unsigned int npar = fErrors.size(); | | unsigned int npar = fErrors.size(); | |
| assert(fCovMatrix.size() == npar*(npar+1)/2); | | assert(fCovMatrix.size() == npar*(npar+1)/2); | |
| for (unsigned int i = 0; i< npar; ++i) { | | for (unsigned int i = 0; i< npar; ++i) { | |
| for (unsigned int j = 0; j<=i; ++j) { | | 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) | | mat(i,j) = (tmp > 0) ? fCovMatrix[j + i*(i+1)/2 ] / std::sqrt(t | |
| mat(i,j) = 0; | | mp) : 0; | |
| else | | | |
| mat(i,j) = fCovMatrix[j + i*(i+1)/2 ] / std::sqrt(tmp); | | | |
| | | | |
| if (i != j) mat(j,i) = mat(i,j); | | 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 261 | | skipping to change at line 262 | |
| bool IsParameterBound(unsigned int ipar) const; | | bool IsParameterBound(unsigned int ipar) const; | |
| | | | |
| /// query if a parameter is fixed | | /// query if a parameter is fixed | |
| bool IsParameterFixed(unsigned int ipar) const; | | bool IsParameterFixed(unsigned int ipar) const; | |
| | | | |
| /// get name of parameter | | /// get name of parameter | |
| std::string GetParameterName(unsigned int ipar) const; | | std::string GetParameterName(unsigned int ipar) const; | |
| | | | |
| protected: | | protected: | |
| | | | |
|
| private: | | protected: | |
| | | | |
| /// Return pointer non const pointer to model (fit) function with fitted
parameter values. | | /// Return pointer non const pointer to model (fit) function with fitted
parameter values. | |
| /// used by Fitter class | | /// used by Fitter class | |
| IModelFunction * ModelFunction() { return fFitFunc; } | | IModelFunction * ModelFunction() { return fFitFunc; } | |
| void SetModelFunction(IModelFunction * func) { fFitFunc = func; } | | void SetModelFunction(IModelFunction * func) { fFitFunc = func; } | |
| | | | |
| friend class Fitter; | | friend class Fitter; | |
| | | | |
| bool fValid; // flag for indicating valid fit | | bool fValid; // flag for indicating valid fit | |
| bool fNormalized; // flag for indicating is errors are normalized | | bool fNormalized; // flag for indicating is errors are normalized | |
| unsigned int fNFree; // number of fit free parameters (total paramet
ers are in size of parameter vector) | | unsigned int fNFree; // number of fit free parameters (total paramet
ers are in size of parameter vector) | |
| unsigned int fNdf; // number of degree of freedom | | unsigned int fNdf; // number of degree of freedom | |
| unsigned int fNCalls; // number of function calls | | unsigned int fNCalls; // number of function calls | |
| int fStatus; // minimizer status code | | int fStatus; // minimizer status code | |
| 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. I
t 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::map<unsigned int, std::pair<double,double> > fMinosErrors; // map
contains 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 of changes. 10 change blocks. |
| 11 lines changed or deleted | | 13 lines changed or added | |
|
| G__ci.h | | G__ci.h | |
| | | | |
| skipping to change at line 419 | | skipping to change at line 419 | |
| | | | |
| /* temporary file generation */ | | /* temporary file generation */ | |
| #if defined(G__WIN32) | | #if defined(G__WIN32) | |
| #define G__TMPFILE | | #define G__TMPFILE | |
| #endif | | #endif | |
| | | | |
| /*********************************************************************** | | /*********************************************************************** | |
| * Define G__EH_DUMMY_DELETE in order to avoid some compiler dependency | | * Define G__EH_DUMMY_DELETE in order to avoid some compiler dependency | |
| * about 'void operator delete(void*,[DLLID]_tag*);' | | * about 'void operator delete(void*,[DLLID]_tag*);' | |
| ***********************************************************************/ | | ***********************************************************************/ | |
|
| #if defined(__HP_aCC) || defined(G__VISUAL) | | #if defined(__HP_aCC) || defined(G__VISUAL) || defined(__INTEL_COMPILER) | |
| #define G__EH_DUMMY_DELETE | | #define G__EH_DUMMY_DELETE | |
| #endif | | #endif | |
| | | | |
| #ifdef G__NONANSI | | #ifdef G__NONANSI | |
| #ifdef G__ANSIHEADER | | #ifdef G__ANSIHEADER | |
| #undef G__ANSIHEADER | | #undef G__ANSIHEADER | |
| #endif | | #endif | |
| #endif | | #endif | |
| | | | |
| #ifndef G__IF_DUMMY | | #ifndef G__IF_DUMMY | |
| | | | |
| skipping to change at line 1807 | | skipping to change at line 1807 | |
| extern G__EXPORT int G__stepmode G__P((int stepmode)); | | extern G__EXPORT int G__stepmode G__P((int stepmode)); | |
| extern G__EXPORT int G__tracemode G__P((int tracemode)); | | extern G__EXPORT int G__tracemode G__P((int tracemode)); | |
| extern G__EXPORT int G__setbreakpoint G__P((const char *breakline,const cha
r *breakfile)); | | extern G__EXPORT int G__setbreakpoint G__P((const char *breakline,const cha
r *breakfile)); | |
| extern G__EXPORT int G__getstepmode G__P((void)); | | extern G__EXPORT int G__getstepmode G__P((void)); | |
| extern G__EXPORT int G__gettracemode G__P((void)); | | extern G__EXPORT int G__gettracemode G__P((void)); | |
| extern G__EXPORT int G__printlinenum G__P((void)); | | extern G__EXPORT int G__printlinenum G__P((void)); | |
| extern G__EXPORT int G__search_typename2 G__P((G__CONST char *typenamein,in
t typein,int tagnum,int reftype,int parent_tagnum)); | | extern G__EXPORT int G__search_typename2 G__P((G__CONST char *typenamein,in
t typein,int tagnum,int reftype,int parent_tagnum)); | |
| extern G__EXPORT void G__set_atpause G__P((void (*p2f)())); | | extern G__EXPORT void G__set_atpause G__P((void (*p2f)())); | |
| extern G__EXPORT void G__set_aterror G__P((void (*p2f)())); | | extern G__EXPORT void G__set_aterror G__P((void (*p2f)())); | |
| extern G__EXPORT void G__p2f_void_void G__P((void* p2f)); | | extern G__EXPORT void G__p2f_void_void G__P((void* p2f)); | |
|
| extern G__EXPORT void G__setglobalcomp G__P((int globalcomp)); | | extern G__EXPORT int G__setglobalcomp G__P((int globalcomp)); | |
| extern G__EXPORT const char *G__getmakeinfo G__P((const char *item)); | | extern G__EXPORT const char *G__getmakeinfo G__P((const char *item)); | |
| extern G__EXPORT const char *G__getmakeinfo1 G__P((const char *item)); | | extern G__EXPORT const char *G__getmakeinfo1 G__P((const char *item)); | |
| extern G__EXPORT int G__get_security_error G__P((void)); | | extern G__EXPORT int G__get_security_error G__P((void)); | |
| extern G__EXPORT char* G__map_cpp_name G__P((const char *in)); | | extern G__EXPORT char* G__map_cpp_name G__P((const char *in)); | |
| extern G__EXPORT char* G__Charref G__P((G__value *buf)); | | extern G__EXPORT char* G__Charref G__P((G__value *buf)); | |
| extern G__EXPORT short* G__Shortref G__P((G__value *buf)); | | extern G__EXPORT short* G__Shortref G__P((G__value *buf)); | |
| extern G__EXPORT int* G__Intref G__P((G__value *buf)); | | extern G__EXPORT int* G__Intref G__P((G__value *buf)); | |
| extern G__EXPORT long* G__Longref G__P((G__value *buf)); | | extern G__EXPORT long* G__Longref G__P((G__value *buf)); | |
| extern G__EXPORT unsigned char* G__UCharref G__P((G__value *buf)); | | extern G__EXPORT unsigned char* G__UCharref G__P((G__value *buf)); | |
| #ifdef G__BOOL4BYTE | | #ifdef G__BOOL4BYTE | |
| | | | |
| skipping to change at line 2027 | | skipping to change at line 2027 | |
| static void (*G__breakkey) G__P((int signame)); | | static void (*G__breakkey) G__P((int signame)); | |
| static int (*G__stepmode) G__P((int stepmode)); | | static int (*G__stepmode) G__P((int stepmode)); | |
| static int (*G__tracemode) G__P((int tracemode)); | | static int (*G__tracemode) G__P((int tracemode)); | |
| static int (*G__getstepmode) G__P((void)); | | static int (*G__getstepmode) G__P((void)); | |
| static int (*G__gettracemode) G__P((void)); | | static int (*G__gettracemode) G__P((void)); | |
| static int (*G__printlinenum) G__P((void)); | | static int (*G__printlinenum) G__P((void)); | |
| static int (*G__search_typename2) G__P((G__CONST char *typenamein,int typei
n,int tagnum,int reftype,int parent_tagnum)); | | static int (*G__search_typename2) G__P((G__CONST char *typenamein,int typei
n,int tagnum,int reftype,int parent_tagnum)); | |
| static void (*G__set_atpause) G__P((void (*p2f)())); | | static void (*G__set_atpause) G__P((void (*p2f)())); | |
| static void (*G__set_aterror) G__P((void (*p2f)())); | | static void (*G__set_aterror) G__P((void (*p2f)())); | |
| static void (*G__p2f_void_void) G__P((void* p2f)); | | static void (*G__p2f_void_void) G__P((void* p2f)); | |
|
| static void (*G__setglobalcomp) G__P((int globalcomp)); | | static int (*G__setglobalcomp) G__P((int globalcomp)); | |
| static char* (*G__getmakeinfo) G__P((char *item)); | | static char* (*G__getmakeinfo) G__P((char *item)); | |
| static int (*G__get_security_error) G__P((void)); | | static int (*G__get_security_error) G__P((void)); | |
| static char* (*G__map_cpp_name) G__P((char *in)); | | static char* (*G__map_cpp_name) G__P((char *in)); | |
| static char* (*G__Charref) G__P((G__value *buf)); | | static char* (*G__Charref) G__P((G__value *buf)); | |
| static short* (*G__Shortref) G__P((G__value *buf)); | | static short* (*G__Shortref) G__P((G__value *buf)); | |
| static int* (*G__Intref) G__P((G__value *buf)); | | static int* (*G__Intref) G__P((G__value *buf)); | |
| static long* (*G__Longref) G__P((G__value *buf)); | | static long* (*G__Longref) G__P((G__value *buf)); | |
| static unsigned char* (*G__UCharref) G__P((G__value *buf)); | | static unsigned char* (*G__UCharref) G__P((G__value *buf)); | |
| static unsigned short* (*G__UShortref) G__P((G__value *buf)); | | static unsigned short* (*G__UShortref) G__P((G__value *buf)); | |
| static unsigned int* (*G__UIntref) G__P((G__value *buf)); | | static unsigned int* (*G__UIntref) G__P((G__value *buf)); | |
| | | | |
End of changes. 3 change blocks. |
| 3 lines changed or deleted | | 3 lines changed or added | |
|
| HFitInterface.h | | HFitInterface.h | |
|
| // @(#)root/hist:$Id: HFitInterface.h 26866 2008-12-12 10:50:07Z moneta $ | | // @(#)root/hist:$Id: HFitInterface.h 31207 2009-11-16 16:52:00Z moneta $ | |
| // Author: L. Moneta Thu Aug 31 10:40:20 2006 | | // Author: L. Moneta Thu Aug 31 10:40:20 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 HFitInterface | | // Header file for class HFitInterface | |
| // set of free functions used to couple the ROOT data object with the fitti
ng classes | | // set of free functions used to couple the ROOT data object with the fitti
ng classes | |
| | | | |
| // avoid including this file when running CINT since free functions cannot
be re-defined | | // avoid including this file when running CINT since free functions cannot
be re-defined | |
| #if !defined(__CINT__) || defined(__MAKECINT__) | | #if !defined(__CINT__) || defined(__MAKECINT__) | |
| | | | |
| #ifndef ROOT_HFitInterface | | #ifndef ROOT_HFitInterface | |
| #define ROOT_HFitInterface | | #define ROOT_HFitInterface | |
| | | | |
| class TH1; | | class TH1; | |
|
| | | class THnSparse; | |
| class TF1; | | class TF1; | |
| class TF2; | | class TF2; | |
| class TGraph; | | class TGraph; | |
| class TGraphErrors; | | class TGraphErrors; | |
| class TGraph2D; | | class TGraph2D; | |
| class TMultiGraph; | | class TMultiGraph; | |
| struct Foption_t; | | struct Foption_t; | |
| | | | |
|
| | | #include "TFitResultPtr.h" | |
| | | | |
| namespace ROOT { | | namespace ROOT { | |
| | | | |
| namespace Math { | | namespace Math { | |
| class MinimizerOptions; | | class MinimizerOptions; | |
| } | | } | |
| | | | |
| namespace Fit { | | namespace Fit { | |
| | | | |
| //class BinData; | | //class BinData; | |
| class FitResult; | | class FitResult; | |
| class DataRange; | | class DataRange; | |
| class BinData; | | class BinData; | |
| class UnBinData; | | class UnBinData; | |
|
| | | class SparseData; | |
| | | | |
| #ifndef __CINT__ // does not link on Windows (why ??) | | #ifndef __CINT__ // does not link on Windows (why ??) | |
| | | | |
| /** | | /** | |
|
| | | Decode list of options into fitOption | |
| | | */ | |
| | | void FitOptionsMake(const char *option, Foption_t &fitOption); | |
| | | | |
| | | /** | |
| fitting function for a TH1 (called from TH1::Fit) | | fitting function for a TH1 (called from TH1::Fit) | |
| */ | | */ | |
|
| int FitObject(TH1 * h1, TF1 *f1, Foption_t & option, const ROOT::Math
::MinimizerOptions & moption, const char *goption, ROOT::Fit::DataRange & r
ange); | | TFitResultPtr FitObject(TH1 * h1, TF1 *f1, Foption_t & option, const
ROOT::Math::MinimizerOptions & moption, const char *goption, ROOT::Fit::Dat
aRange & range); | |
| | | | |
| /** | | /** | |
| fitting function for a TGraph (called from TGraph::Fit) | | fitting function for a TGraph (called from TGraph::Fit) | |
| */ | | */ | |
|
| int FitObject(TGraph * gr, TF1 *f1 , Foption_t & option , const ROOT:
:Math::MinimizerOptions & moption, const char *goption, ROOT::Fit::DataRang
e & range); | | TFitResultPtr FitObject(TGraph * gr, TF1 *f1 , Foption_t & option , c
onst ROOT::Math::MinimizerOptions & moption, const char *goption, ROOT::Fit
::DataRange & range); | |
| | | | |
| /** | | /** | |
| fitting function for a MultiGraph (called from TMultiGraph::Fit) | | fitting function for a MultiGraph (called from TMultiGraph::Fit) | |
| */ | | */ | |
|
| int FitObject(TMultiGraph * mg, TF1 *f1 , Foption_t & option , const
ROOT::Math::MinimizerOptions & moption, const char *goption, ROOT::Fit::Dat
aRange & range); | | TFitResultPtr FitObject(TMultiGraph * mg, TF1 *f1 , Foption_t & optio
n , const ROOT::Math::MinimizerOptions & moption, const char *goption, ROOT
::Fit::DataRange & range); | |
| | | | |
| /** | | /** | |
| fitting function for a TGraph2D (called from TGraph2D::Fit) | | fitting function for a TGraph2D (called from TGraph2D::Fit) | |
| */ | | */ | |
|
| int FitObject(TGraph2D * gr, TF1 *f1 , Foption_t & option , const ROO | | TFitResultPtr FitObject(TGraph2D * gr, TF1 *f1 , Foption_t & option , | |
| T::Math::MinimizerOptions & moption, const char *goption, ROOT::Fit::DataRa | | const ROOT::Math::MinimizerOptions & moption, const char *goption, ROOT::F | |
| nge & range); | | it::DataRange & range); | |
| | | | |
| | | /** | |
| | | fitting function for a THnSparse (called from THnSparse::Fit) | |
| | | */ | |
| | | TFitResultPtr FitObject(THnSparse * s1, TF1 *f1, Foption_t & option, | |
| | | const ROOT::Math::MinimizerOptions & moption, const char *goption, ROOT::Fi | |
| | | t::DataRange & range); | |
| #endif | | #endif | |
| | | | |
| /** | | /** | |
| fit an unbin data set (from tree or from histogram buffer) | | fit an unbin data set (from tree or from histogram buffer) | |
| using a TF1 pointer and fit options. | | using a TF1 pointer and fit options. | |
| N.B. ownership of fit data is passed to the UnBinFit function whi
ch will be responsible of | | N.B. ownership of fit data is passed to the UnBinFit function whi
ch will be responsible of | |
| deleting the data after the fit. User calling this function MUST
NOT delete UnBinData after | | deleting the data after the fit. User calling this function MUST
NOT delete UnBinData after | |
| calling it. | | calling it. | |
| */ | | */ | |
| int UnBinFit(ROOT::Fit::UnBinData * data, TF1 * f1 , Foption_t & opti
on , const ROOT::Math::MinimizerOptions & moption); | | int UnBinFit(ROOT::Fit::UnBinData * data, TF1 * f1 , Foption_t & opti
on , const ROOT::Math::MinimizerOptions & moption); | |
| | | | |
| /** | | /** | |
| fill the data vector from a TH1. Pass also the TF1 function which
is | | fill the data vector from a TH1. Pass also the TF1 function which
is | |
| needed in case of integral option and to reject points rejected b
y the function | | needed in case of integral option and to reject points rejected b
y the function | |
| */ | | */ | |
| void FillData ( BinData & dv, const TH1 * hist, TF1 * func = 0); | | void FillData ( BinData & dv, const TH1 * hist, TF1 * func = 0); | |
| | | | |
| /** | | /** | |
|
| | | fill the data vector from a TH1 with sparse data. Pass also the T | |
| | | F1 function which is | |
| | | needed in case of integral option and to reject points rejected b | |
| | | y the function | |
| | | */ | |
| | | void FillData ( SparseData & dv, const TH1 * hist, TF1 * func = 0); | |
| | | | |
| | | /** | |
| | | fill the data vector from a THnSparse. Pass also the TF1 function | |
| | | which is | |
| | | needed in case of integral option and to reject points rejected b | |
| | | y the function | |
| | | */ | |
| | | void FillData ( SparseData & dv, const THnSparse * hist, TF1 * func | |
| | | = 0); | |
| | | | |
| | | /** | |
| | | fill the data vector from a THnSparse. Pass also the TF1 function | |
| | | which is | |
| | | needed in case of integral option and to reject points rejected b | |
| | | y the function | |
| | | */ | |
| | | void FillData ( BinData & dv, const THnSparse * hist, TF1 * func = 0 | |
| | | ); | |
| | | | |
| | | /** | |
| fill the data vector from a TGraph2D. Pass also the TF1 function
which is | | fill the data vector from a TGraph2D. Pass also the TF1 function
which is | |
| needed in case of integral option and to reject points rejected b
y the function | | needed in case of integral option and to reject points rejected b
y the function | |
| */ | | */ | |
| void FillData ( BinData & dv, const TGraph2D * gr, TF1 * func = 0); | | void FillData ( BinData & dv, const TGraph2D * gr, TF1 * func = 0); | |
| | | | |
| /** | | /** | |
| fill the data vector from a TGraph. Pass also the TF1 function wh
ich is | | fill the data vector from a TGraph. Pass also the TF1 function wh
ich is | |
| needed in case to exclude points rejected by the function | | needed in case to exclude points rejected by the function | |
| */ | | */ | |
| void FillData ( BinData & dv, const TGraph * gr, TF1 * func = 0 ); | | void FillData ( BinData & dv, const TGraph * gr, TF1 * func = 0 ); | |
| /** | | /** | |
| fill the data vector from a TMultiGraph. Pass also the TF1 functi
on which is | | fill the data vector from a TMultiGraph. Pass also the TF1 functi
on which is | |
| needed in case to exclude points rejected by the function | | needed in case to exclude points rejected by the function | |
| */ | | */ | |
| void FillData ( BinData & dv, const TMultiGraph * gr, TF1 * func =
0); | | void FillData ( BinData & dv, const TMultiGraph * gr, TF1 * func =
0); | |
| | | | |
| /** | | /** | |
|
| | | compute initial parameter for an exponential function given the f | |
| | | it data | |
| | | Set the constant and slope assuming a simple exponential going th | |
| | | rough xmin and xmax | |
| | | of the data set | |
| | | */ | |
| | | void InitExpo(const ROOT::Fit::BinData & data, TF1 * f1 ); | |
| | | | |
| | | /** | |
| compute initial parameter for gaussian function given the fit dat
a | | compute initial parameter for gaussian function given the fit dat
a | |
| Set the sigma limits for zero top 10* initial rms values | | Set the sigma limits for zero top 10* initial rms values | |
| Set the initial parameter values in the TF1 | | Set the initial parameter values in the TF1 | |
| */ | | */ | |
| void InitGaus(const ROOT::Fit::BinData & data, TF1 * f1 ); | | void InitGaus(const ROOT::Fit::BinData & data, TF1 * f1 ); | |
| | | | |
| /** | | /** | |
|
| | | compute initial parameter for 2D gaussian function given the fit | |
| | | data | |
| | | Set the sigma limits for zero top 10* initial rms values | |
| | | Set the initial parameter values in the TF1 | |
| | | */ | |
| | | void Init2DGaus(const ROOT::Fit::BinData & data, TF1 * f1 ); | |
| | | | |
| | | /** | |
| compute confidence intervals at level cl for a fitted histogram h1
in a TGraphErrors gr | | compute confidence intervals at level cl for a fitted histogram h1
in a TGraphErrors gr | |
| */ | | */ | |
| bool GetConfidenceIntervals(const TH1 * h1, const ROOT::Fit::FitResul
t & r, TGraphErrors * gr, double cl = 0.95); | | bool GetConfidenceIntervals(const TH1 * h1, const ROOT::Fit::FitResul
t & r, TGraphErrors * gr, double cl = 0.95); | |
| | | | |
| } // end namespace Fit | | } // end namespace Fit | |
| | | | |
| } // end namespace ROOT | | } // end namespace ROOT | |
| | | | |
| #endif /* ROOT_Fit_TH1Interface */ | | #endif /* ROOT_Fit_TH1Interface */ | |
| | | | |
| | | | |
End of changes. 12 change blocks. |
| 7 lines changed or deleted | | 66 lines changed or added | |
|
| HybridCalculator.h | | HybridCalculator.h | |
|
| // @(#)root/roostats:$Id: HybridCalculator.h 30462 2009-09-25 16:05:55Z mon
eta $ | | // @(#)root/roostats:$Id: HybridCalculator.h 31285 2009-11-18 16:38:36Z 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 25 | | skipping to change at line 25 | |
| | | | |
| #ifndef ROOSTATS_HybridCalculator | | #ifndef ROOSTATS_HybridCalculator | |
| #define ROOSTATS_HybridCalculator | | #define ROOSTATS_HybridCalculator | |
| | | | |
| #ifndef ROOSTATS_HypoTestCalculator | | #ifndef ROOSTATS_HypoTestCalculator | |
| #include "RooStats/HypoTestCalculator.h" | | #include "RooStats/HypoTestCalculator.h" | |
| #endif | | #endif | |
| | | | |
| #include <vector> | | #include <vector> | |
| | | | |
|
| #ifndef ROOSTATS_HypoTestResult | | #ifndef ROOSTATS_HybridResult | |
| #include "RooStats/HybridResult.h" | | #include "RooStats/HybridResult.h" | |
| #endif | | #endif | |
| | | | |
| #ifndef ROOSTATS_ModelConfig | | #ifndef ROOSTATS_ModelConfig | |
| #include "RooStats/ModelConfig.h" | | #include "RooStats/ModelConfig.h" | |
| #endif | | #endif | |
| | | | |
| class TH1; | | class TH1; | |
| | | | |
| namespace RooStats { | | namespace RooStats { | |
| | | | |
|
| | | class HybridResult; | |
| | | | |
| class HybridCalculator : public HypoTestCalculator , public TNamed { | | class HybridCalculator : public HypoTestCalculator , public TNamed { | |
| | | | |
| public: | | public: | |
| | | | |
|
| /// Dummy Constructor with only name and title | | /// Dummy Constructor with only name | |
| HybridCalculator(const char *name = 0, | | explicit HybridCalculator(const char *name = 0); | |
| const char *title = 0); | | | |
| | | /// Constructor for HybridCalculator from pdf instances but without a | |
| /// Constructor for HybridCalculator | | data-set | |
| HybridCalculator(const char *name, | | HybridCalculator(RooAbsPdf& sb_model, | |
| const char *title, | | | |
| RooAbsPdf& sb_model, | | | |
| RooAbsPdf& b_model, | | RooAbsPdf& b_model, | |
| RooArgList& observables, | | RooArgList& observables, | |
| const RooArgSet* nuisance_parameters = 0, | | const RooArgSet* nuisance_parameters = 0, | |
| RooAbsPdf* prior_pdf = 0, | | RooAbsPdf* prior_pdf = 0, | |
|
| bool GenerateBinned = false); //Nils 31.7.09 | | bool GenerateBinned = false, int testStatistics = 1,
int ntoys = 1000 ); | |
| | | | |
| /// 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, | |
| const RooArgSet* nuisance_parameters = 0, | | const RooArgSet* nuisance_parameters = 0, | |
| RooAbsPdf* prior_pdf = 0, | | RooAbsPdf* prior_pdf = 0, | |
|
| bool GenerateBinned = false); //Nils 31.7.09 | | bool GenerateBinned = false, int testStatistics = 1, | |
| | | int ntoys = 1000 ); | |
| /// Constructor for HybridCalculator using name, title, a data set an | | | |
| d pdf instances | | | |
| HybridCalculator(const char *name, | | | |
| const char *title, | | | |
| RooAbsData& data, | | | |
| RooAbsPdf& sb_model, | | | |
| RooAbsPdf& b_model, | | | |
| const RooArgSet* nuisance_parameters = 0, | | | |
| RooAbsPdf* prior_pdf = 0, | | | |
| bool GenerateBinned = false); //Nils 31.7.09 | | | |
| | | | |
|
| /// Constructor for HybridCalculator with ModelConfig | | /// Constructor passing a ModelConfig for the SBmodel and a ModelConf | |
| HybridCalculator(const char *name, | | ig for the B Model | |
| const char *title, | | HybridCalculator(RooAbsData& data, | |
| RooAbsData& data, | | | |
| const ModelConfig& sb_model, | | const ModelConfig& sb_model, | |
|
| const ModelConfig& b_model); | | const ModelConfig& b_model, | |
| | | bool GenerateBinned = false, int testStatistics = 1, | |
| | | int ntoys = 1000 ); | |
| | | | |
| public: | | public: | |
| | | | |
| /// Destructor of HybridCalculator | | /// Destructor of HybridCalculator | |
| virtual ~HybridCalculator(); | | virtual ~HybridCalculator(); | |
| | | | |
| /// inherited methods from HypoTestCalculator interface | | /// inherited methods from HypoTestCalculator interface | |
| virtual HybridResult* GetHypoTest() const; | | virtual HybridResult* GetHypoTest() const; | |
| | | | |
| // inherited setter methods from HypoTestCalculator | | // inherited setter methods from HypoTestCalculator | |
| | | | |
| skipping to change at line 120 | | skipping to change at line 108 | |
| // additional methods specific for HybridCalculator | | // additional methods specific for HybridCalculator | |
| // set a prior pdf for the nuisance parameters | | // set a prior pdf for the nuisance parameters | |
| void SetNuisancePdf(RooAbsPdf & prior_pdf) { | | void SetNuisancePdf(RooAbsPdf & prior_pdf) { | |
| fPriorPdf = &prior_pdf; | | fPriorPdf = &prior_pdf; | |
| fUsePriorPdf = true; // if set by default turn it on | | fUsePriorPdf = true; // if set by default turn it on | |
| } | | } | |
| | | | |
| // set the nuisance parameters to be marginalized | | // set the nuisance parameters to be marginalized | |
| void SetNuisanceParameters(const RooArgSet & params) { fNuisanceParam
eters = ¶ms; } | | void SetNuisanceParameters(const RooArgSet & params) { fNuisanceParam
eters = ¶ms; } | |
| | | | |
|
| // set number of toy MC | | // set number of toy MC (Default is 1000) | |
| void SetNumberOfToys(unsigned int ntoys) { fNToys = ntoys; } | | void SetNumberOfToys(unsigned int ntoys) { fNToys = ntoys; } | |
|
| | | unsigned int GetNumberOfToys() { return fNToys; } | |
| | | | |
| | | // return number of toys used | |
| | | unsigned int GetNumberOfToys() const { return fNToys; } | |
| | | | |
| // 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; } | |
| | | | |
| // control to use bin data generation | | // control to use bin data generation | |
| void SetGenerateBinned(bool on = true) { fGenerateBinned = on; } | | void SetGenerateBinned(bool on = true) { fGenerateBinned = on; } | |
| | | | |
|
| void SetTestStatistics(int index); | | /// set the desired test statistics: | |
| | | /// index=1 : 2 * log( L_sb / L_b ) (DEFAULT) | |
| | | /// index=2 : number of generated events | |
| | | /// index=3 : profiled likelihood ratio | |
| | | /// if the index is different to any of those values, the default is | |
| | | used | |
| | | void SetTestStatistic(int index); | |
| | | | |
| HybridResult* Calculate(TH1& data, unsigned int nToys, bool usePriors
) const; | | HybridResult* Calculate(TH1& data, unsigned int nToys, bool usePriors
) const; | |
| HybridResult* Calculate(RooAbsData& data, unsigned int nToys, bool us
ePriors) 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; | |
| | | | |
| | | | |
End of changes. 11 change blocks. |
| 30 lines changed or deleted | | 31 lines changed or added | |
|
| HybridPlot.h | | HybridPlot.h | |
|
| // @(#)root/roostats:$Id: HybridPlot.h 30462 2009-09-25 16:05:55Z moneta $ | | // @(#)root/roostats:$Id: HybridPlot.h 30654 2009-10-09 15:07:52Z moneta $ | |
| | | | |
| /************************************************************************* | | /************************************************************************* | |
| * 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 29 | | skipping to change at line 29 | |
| #include <vector> | | #include <vector> | |
| #include <iostream> | | #include <iostream> | |
| | | | |
| #ifndef ROOT_TNamed | | #ifndef ROOT_TNamed | |
| #include "TNamed.h" | | #include "TNamed.h" | |
| #endif | | #endif | |
| | | | |
| // these should be maybe forward decleared | | // these should be maybe forward decleared | |
| // by moving implementations in source file | | // by moving implementations in source file | |
| #include "TH1.h" | | #include "TH1.h" | |
|
| #include "TCanvas.h" | | | |
| | | | |
| class TLine; | | class TLine; | |
| class TLegend; | | class TLegend; | |
|
| | | class TH1; | |
| | | class TVirtualPad; | |
| | | | |
| namespace RooStats { | | namespace RooStats { | |
| | | | |
| class HybridPlot : public TNamed { | | class HybridPlot : public TNamed { | |
| | | | |
| public: | | public: | |
| | | | |
| /// Constructor | | /// Constructor | |
| HybridPlot(const char* name, | | HybridPlot(const char* name, | |
| const char* title, | | const char* title, | |
|
| std::vector<double> sb_values, | | const std::vector<double> & sb_values, | |
| std::vector<double> b_values, | | const std::vector<double> & b_values, | |
| double testStat_data, | | double testStat_data, | |
| int n_bins, | | int n_bins, | |
| bool verbosity=true); | | bool verbosity=true); | |
| | | | |
| /// Destructor | | /// Destructor | |
| ~HybridPlot(); | | ~HybridPlot(); | |
| | | | |
|
| /// Draw on canvas | | /// Draw on current pad | |
| void Draw (const char* options=""); | | void Draw (const char* options=""); | |
| | | | |
| /// All the objects are written to rootfile | | /// All the objects are written to rootfile | |
| void DumpToFile (const char* RootFileName, const char* options); | | void DumpToFile (const char* RootFileName, const char* options); | |
| | | | |
| /// Get B histo mean | | /// Get B histo mean | |
| double GetBmean(){return fB_histo->GetMean();}; | | double GetBmean(){return fB_histo->GetMean();}; | |
| | | | |
| /// Get B histo RMS | | /// Get B histo RMS | |
| double GetBrms(){return fB_histo->GetRMS();}; | | double GetBrms(){return fB_histo->GetRMS();}; | |
| | | | |
| skipping to change at line 92 | | skipping to change at line 93 | |
| /// Get SB histo RMS | | /// Get SB histo RMS | |
| double GetSBrms(){return fSb_histo->GetRMS();}; | | double GetSBrms(){return fSb_histo->GetRMS();}; | |
| | | | |
| /// Get SB histo integration extremes to obtain the requested area fr
action | | /// Get SB histo integration extremes to obtain the requested area fr
action | |
| double* GetSBIntExtremes(double frac) | | double* GetSBIntExtremes(double frac) | |
| {return GetHistoPvals(fSb_histo,frac);}; | | {return GetHistoPvals(fSb_histo,frac);}; | |
| | | | |
| /// Get B histo | | /// Get B histo | |
| TH1F* GetSBhisto(){return fSb_histo;} | | TH1F* GetSBhisto(){return fSb_histo;} | |
| | | | |
|
| /// from Statistical plot | | /// Get the pad (or canvas) where it has been drawn | |
| | | TVirtualPad * GetCanvas() { return fPad; } | |
| /// Get the canvas | | | |
| TCanvas* GetCanvas(){return fCanvas;} | | | |
| | | | |
| /// Set the canvas | | | |
| void SetCanvas(TCanvas* new_canvas){fCanvas=new_canvas;} | | | |
| | | | |
| /// Write an image on disk | | /// Write an image on disk | |
|
| void DumpToImage (const char* filename){fCanvas->Print(filename);} | | void DumpToImage (const char* filename); | |
| | | | |
| // moved from Rsc.h | | | |
| | | | |
| /// Get the center of the histo | | /// Get the center of the histo | |
| double GetHistoCenter(TH1* histo, double n_rms=1,bool display_result=
false); | | double GetHistoCenter(TH1* histo, double n_rms=1,bool display_result=
false); | |
| | | | |
| /// Get the "effective sigmas" of the histo | | /// Get the "effective sigmas" of the histo | |
| double* GetHistoPvals (TH1* histo, double percentage); | | double* GetHistoPvals (TH1* histo, double percentage); | |
| | | | |
| /// Get the median of an histogram | | /// Get the median of an histogram | |
| double GetMedian(TH1* histo); | | double GetMedian(TH1* histo); | |
| | | | |
| private: | | private: | |
| | | | |
| TH1F* fSb_histo; // The sb Histo | | TH1F* fSb_histo; // The sb Histo | |
| TH1F* fSb_histo_shaded; // The sb Histo shaded | | TH1F* fSb_histo_shaded; // The sb Histo shaded | |
| TH1F* fB_histo; // The b Histo | | TH1F* fB_histo; // The b Histo | |
| TH1F* fB_histo_shaded; // The b Histo shaded | | TH1F* fB_histo_shaded; // The b Histo shaded | |
| TLine* fData_testStat_line; // The line for the data value of the tes
t statistic | | TLine* fData_testStat_line; // The line for the data value of the tes
t statistic | |
| TLegend* fLegend; // The legend of the plot | | TLegend* fLegend; // The legend of the plot | |
|
| | | TVirtualPad * fPad; // The pad where it has been drawn | |
| bool fVerbose; // verbosity flag | | bool fVerbose; // verbosity flag | |
|
| TCanvas* fCanvas; // plot canvas | | | |
| | | | |
| ClassDef(HybridPlot,1) // Provides the plots for an HybridResult | | ClassDef(HybridPlot,1) // Provides the plots for an HybridResult | |
| }; | | }; | |
| } | | } | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 9 change blocks. |
| 16 lines changed or deleted | | 10 lines changed or added | |
|
| HybridResult.h | | HybridResult.h | |
|
| // @(#)root/roostats:$Id: HybridResult.h 30462 2009-09-25 16:05:55Z moneta
$ | | // @(#)root/roostats:$Id: HybridResult.h 31276 2009-11-18 15:06:42Z moneta
$ | |
| | | | |
| /************************************************************************* | | /************************************************************************* | |
| * 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 31 | | skipping to change at line 31 | |
| #endif | | #endif | |
| | | | |
| namespace RooStats { | | namespace RooStats { | |
| | | | |
| class HybridPlot; | | class HybridPlot; | |
| | | | |
| class HybridResult : public HypoTestResult { | | class HybridResult : public HypoTestResult { | |
| | | | |
| public: | | public: | |
| | | | |
|
| | | /// Default constructor | |
| | | explicit HybridResult(const char *name = 0); | |
| | | | |
| /// Constructor for HybridResult | | /// Constructor for HybridResult | |
|
| HybridResult(const char *name,const char *title,std::vector<double>&
testStat_sb_vals, | | HybridResult(const char *name,std::vector<double>& testStat_sb_vals, | |
| std::vector<double>& testStat_b_vals, bool sumLargerValu
es=true); | | std::vector<double>& testStat_b_vals, bool sumLargerValu
es=true); | |
| | | | |
|
| HybridResult(const char *name,const char *title); | | | |
| | | | |
| /// Default constructor for HybridResult | | | |
| HybridResult(); | | | |
| | | | |
| /// Destructor of HybridResult | | /// Destructor of HybridResult | |
| virtual ~HybridResult(); | | virtual ~HybridResult(); | |
| | | | |
| void SetDataTestStatistics(double testStat_data_val); | | void SetDataTestStatistics(double testStat_data_val); | |
| | | | |
| void Add(HybridResult* other); | | void Add(HybridResult* other); | |
|
| | | | |
| HybridPlot* GetPlot(const char* name,const char* title, int n_bins); | | HybridPlot* GetPlot(const char* name,const char* title, int n_bins); | |
|
| | | | |
| void PrintMore(const char* options); | | void PrintMore(const char* options); | |
| | | | |
| /// Get test statistics values for the sb model | | /// Get test statistics values for the sb model | |
| std::vector<double> GetTestStat_sb(){return fTestStat_sb;} | | std::vector<double> GetTestStat_sb(){return fTestStat_sb;} | |
| | | | |
| /// Get test statistics values for the b model | | /// Get test statistics values for the b model | |
| std::vector<double> GetTestStat_b(){return fTestStat_b;} | | std::vector<double> GetTestStat_b(){return fTestStat_b;} | |
| | | | |
| /// Get test statistics value for data | | /// Get test statistics value for data | |
| double GetTestStat_data(){ return fTestStat_data;} | | double GetTestStat_data(){ return fTestStat_data;} | |
| | | | |
| // Return p-value for null hypothesis | | // Return p-value for null hypothesis | |
| Double_t NullPValue() const; | | Double_t NullPValue() const; | |
| | | | |
| // Return p-value for alternate hypothesis | | // Return p-value for alternate hypothesis | |
| Double_t AlternatePValue() const; | | Double_t AlternatePValue() const; | |
| | | | |
|
| | | /// The error on the "confidence level" of the null hypothesis | |
| | | Double_t CLbError() const; | |
| | | | |
| | | /// The error on the "confidence level" of the alternative hypothesis | |
| | | Double_t CLsplusbError() const; | |
| | | | |
| | | /// The error on the ratio CLs+b/CLb | |
| | | Double_t CLsError() const; | |
| | | | |
| private: | | private: | |
|
| | | | |
| std::vector<double> fTestStat_b; // vector of results for B-only toy-
MC | | std::vector<double> fTestStat_b; // vector of results for B-only toy-
MC | |
| std::vector<double> fTestStat_sb; // vector of results for S+B toy-MC | | std::vector<double> fTestStat_sb; // vector of results for S+B toy-MC | |
| double fTestStat_data; // results (test statistics) evaluated for dat
a | | double fTestStat_data; // results (test statistics) evaluated for dat
a | |
| | | | |
| mutable bool fComputationsNulDoneFlag; // flag if the fNullPValue com
putation have been already done or not (ie need to be refreshed) | | mutable bool fComputationsNulDoneFlag; // flag if the fNullPValue com
putation have been already done or not (ie need to be refreshed) | |
| mutable bool fComputationsAltDoneFlag; // flag if the fAlternatePValu
e computation have been already done or not (ie need to be refreshed) | | mutable bool fComputationsAltDoneFlag; // flag if the fAlternatePValu
e computation have been already done or not (ie need to be refreshed) | |
| bool fSumLargerValues; // p-value for velues of testStat >= testStat_
data (or testStat <= testStat_data) | | bool fSumLargerValues; // p-value for velues of testStat >= testStat_
data (or testStat <= testStat_data) | |
| | | | |
| protected: | | protected: | |
| | | | |
| | | | |
End of changes. 8 change blocks. |
| 7 lines changed or deleted | | 17 lines changed or added | |
|
| LikelihoodInterval.h | | LikelihoodInterval.h | |
|
| // @(#)root/roostats:$Id: LikelihoodInterval.h 30512 2009-09-28 17:24:48Z m
oneta $ | | // @(#)root/roostats:$Id: LikelihoodInterval.h 31276 2009-11-18 15:06: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 26 | | skipping to change at line 26 | |
| #endif | | #endif | |
| | | | |
| #ifndef ROO_ARG_SET | | #ifndef ROO_ARG_SET | |
| #include "RooArgSet.h" | | #include "RooArgSet.h" | |
| #endif | | #endif | |
| | | | |
| #ifndef ROO_ABS_REAL | | #ifndef ROO_ABS_REAL | |
| #include "RooAbsReal.h" | | #include "RooAbsReal.h" | |
| #endif | | #endif | |
| | | | |
|
| | | #ifndef ROOT_Math_IFunctionfwd | |
| | | #include "Math/IFunctionfwd.h" | |
| | | #endif | |
| | | | |
| | | #include <map> | |
| | | #include <memory> | |
| | | | |
| | | namespace ROOT { | |
| | | namespace Math { | |
| | | class Minimizer; | |
| | | } | |
| | | } | |
| | | | |
| namespace RooStats { | | namespace RooStats { | |
| | | | |
| class LikelihoodInterval : public ConfInterval { | | class LikelihoodInterval : public ConfInterval { | |
| | | | |
| public: | | public: | |
| | | | |
|
| LikelihoodInterval(); | | // defult constructor | |
| LikelihoodInterval(const char* name); | | explicit LikelihoodInterval(const char* name = 0); | |
| LikelihoodInterval(const char* name, const char* title); | | | |
| LikelihoodInterval(const char* name, RooAbsReal*, const RooArgSet*); | | /// construct the interval from a Profile Likelihood object, paramete | |
| LikelihoodInterval(const char* name, const char* title, RooAbsReal*, | | r of interest and optionally a snapshot of | |
| const RooArgSet*); | | /// POI with their best fit values | |
| | | LikelihoodInterval(const char* name, RooAbsReal*, const RooArgSet*, | |
| | | RooArgSet * = 0); | |
| | | | |
| | | // destructor | |
| virtual ~LikelihoodInterval(); | | virtual ~LikelihoodInterval(); | |
| | | | |
|
| virtual Bool_t IsInInterval(const RooArgSet&); | | // check if given point is in the interval | |
| virtual void SetConfidenceLevel(Double_t cl) {fConfidenceLevel = cl;} | | virtual Bool_t IsInInterval(const RooArgSet&) const; | |
| | | | |
| | | // set the confidence level for the interval (e.g 0.682 for a 1-sigma | |
| | | interval) | |
| | | virtual void SetConfidenceLevel(Double_t cl) {fConfidenceLevel = cl; | |
| | | ResetLimits(); } | |
| | | | |
| | | // return confidence level | |
| virtual Double_t ConfidenceLevel() const {return fConfidenceLevel;} | | virtual Double_t ConfidenceLevel() const {return fConfidenceLevel;} | |
| | | | |
|
| // do we want it to return list of parameters | | // return a cloned list of parameters of interest. User manages the | |
| virtual RooArgSet* GetParameters() const; | | return object | |
| | | virtual RooArgSet* GetParameters() const; | |
| | | | |
|
| // check if parameters are correct. (dummy implementation to start) | | // check if parameters are correct (i.e. they are the POI of this int
erval) | |
| Bool_t CheckParameters(const RooArgSet&) const ; | | Bool_t CheckParameters(const RooArgSet&) const ; | |
| | | | |
|
| // Method to return lower limit on a given parameter | | // return the lower bound of the interval on a given parameter | |
| Double_t LowerLimit(RooRealVar& param) ; | | Double_t LowerLimit(const RooRealVar& param) ; | |
| Double_t UpperLimit(RooRealVar& param) ; | | | |
| | | // return the upper bound of the interval on a given parameter | |
| | | Double_t UpperLimit(const RooRealVar& param) ; | |
| | | | |
|
| | | // find both lower and upper interval boundaries for a given paramete | |
| | | r | |
| | | // retun false if the bounds have not been found | |
| | | Bool_t FindLimits(const RooRealVar & param, double & lower, double &u | |
| | | pper); | |
| | | | |
| | | /** | |
| | | return the 2D-contour points for the given subset of parameters | |
| | | by default make the contour using 30 points. The User has to preal | |
| | | locate the x and y array which will return | |
| | | the set of x and y points defining the contour. | |
| | | The return value of the funciton specify the number of contour poi | |
| | | nt found. | |
| | | In case of error a zero is returned | |
| | | */ | |
| | | Int_t GetContourPoints(const RooRealVar & paramX, const RooRealVar & | |
| | | paramY, Double_t * x, Double_t *y, Int_t npoints = 30); | |
| | | | |
| | | // return the profile log-likelihood ratio function | |
| RooAbsReal* GetLikelihoodRatio() {return fLikelihoodRatio;} | | RooAbsReal* GetLikelihoodRatio() {return fLikelihoodRatio;} | |
| | | | |
|
| | | // return a pointer to a snapshot with best fit parameter of interest | |
| | | const RooArgSet * GetBestFitParameters() const { return fBestFitParam | |
| | | s; } | |
| | | | |
| | | protected: | |
| | | | |
| | | // reset the cached limit values | |
| | | void ResetLimits(); | |
| | | | |
| | | // internal function to create the minimizer for finding the contours | |
| | | bool CreateMinimizer(); | |
| | | | |
| private: | | private: | |
| | | | |
|
| const RooArgSet* fParameters; // parameters of interest for this inte | | RooArgSet fParameters; // parameters of interest for this interval | |
| rval | | RooArgSet * fBestFitParams; // snapshot of the model parameters with | |
| RooAbsReal* fLikelihoodRatio; // likelihood ratio function used to ma | | best fit value (managed internally) | |
| ke contours | | RooAbsReal* fLikelihoodRatio; // likelihood ratio function used to ma | |
| | | ke contours (managed internally) | |
| 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) | |
|
| | | std::map<std::string, double> fLowerLimits; // map with cached lower | |
| | | bound values | |
| | | std::map<std::string, double> fUpperLimits; // map with cached upper | |
| | | bound values | |
| | | std::auto_ptr<ROOT::Math::Minimizer > fMinimizer; //! transient point | |
| | | er to minimizer class used to find limits and contour | |
| | | std::auto_ptr<RooFunctor> fFunctor; //! transient pointer | |
| | | to functor class used by the minimizer | |
| | | std::auto_ptr<ROOT::Math::IMultiGenFunction> fMinFunc; //! transient | |
| | | pointer to the minimization function | |
| | | | |
| 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 | |
| | | | |
| }; | | }; | |
| } | | } | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 11 change blocks. |
| 19 lines changed or deleted | | 88 lines changed or added | |
|
| MCMCCalculator.h | | MCMCCalculator.h | |
|
| // @(#)root/roostats:$Id: MCMCCalculator.h 26805 2009-06-17 14:31:02Z kbela
sco $ | | // @(#)root/roostats:$Id: MCMCCalculator.h 31276 2009-11-18 15:06:42Z monet
a $ | |
| // Authors: Kevin Belasco 17/06/2009 | | // Authors: Kevin Belasco 17/06/2009 | |
| // Authors: Kyle Cranmer 17/06/2009 | | // Authors: Kyle Cranmer 17/06/2009 | |
| /************************************************************************* | | /************************************************************************* | |
| * 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 61 | | skipping to change at line 61 | |
| class MCMCCalculator : public IntervalCalculator, public TNamed { | | class MCMCCalculator : public IntervalCalculator, public TNamed { | |
| | | | |
| public: | | public: | |
| // default constructor | | // default constructor | |
| MCMCCalculator(); | | MCMCCalculator(); | |
| | | | |
| // This constructor will set up a basic settings package including a | | // This constructor will set up a basic settings package including a | |
| // ProposalFunction, number of iterations, burn in steps, confidence | | // ProposalFunction, number of iterations, burn in steps, confidence | |
| // level, and interval determination method. Any of these basic | | // level, and interval determination method. Any of these basic | |
| // settings can be overridden by calling one of the Set...() methods. | | // settings can be overridden by calling one of the Set...() methods. | |
|
| MCMCCalculator(RooAbsData& data, RooAbsPdf& pdf, const RooArgSet& par | | // Force to pass the a prior PDF for the parameter of interest | |
| amsOfInterest); | | MCMCCalculator(RooAbsData& data, RooAbsPdf& pdf, const RooArgSet& par | |
| | | amsOfInterest, RooAbsPdf & priorPdf ); | |
| | | | |
|
| | | // Constructor as before but without a prior. | |
| | | // In this case it is assumed the prior is already included in the mo | |
| | | del | |
| | | // This constructor will set up a basic settings package including a | |
| | | // ProposalFunction, number of iterations, burn in steps, confidence | |
| | | // level, and interval determination method. Any of these basic | |
| | | // settings can be overridden by calling one of the Set...() methods. | |
| | | MCMCCalculator(RooAbsData& data, RooAbsPdf& pdf, const RooArgSet& par | |
| | | amsOfInterest ); | |
| | | | |
| | | // Constructor from a ModelConfig class. | |
| // This constructor will set up a basic settings package including a | | // This constructor will set up a basic settings package including a | |
| // ProposalFunction, number of iterations, burn in steps, confidence | | // ProposalFunction, number of iterations, burn in steps, confidence | |
| // level, and interval determination method. Any of these basic | | // level, and interval determination method. Any of these basic | |
| // settings can be overridden by calling one of the Set...() methods. | | // settings can be overridden by calling one of the Set...() methods. | |
| MCMCCalculator(RooAbsData& data, const ModelConfig& model); | | MCMCCalculator(RooAbsData& data, const ModelConfig& model); | |
|
| // MCMCCalculator(RooWorkspace& ws, RooAbsData& data, RooAbsPdf& pdf, | | | |
| // RooArgSet& paramsOfInterest); | | | |
| | | | |
| // alternate constructor, no automatic basic settings | | // alternate constructor, no automatic basic settings | |
| MCMCCalculator(RooAbsData& data, const ModelConfig& model, ProposalFu
nction& proposalFunction, | | MCMCCalculator(RooAbsData& data, const ModelConfig& model, ProposalFu
nction& proposalFunction, | |
| Int_t numIters, RooArgList* axes = NULL, Double_t size
= 0.05); | | Int_t numIters, RooArgList* axes = NULL, Double_t size
= 0.05); | |
| // MCMCCalculator(RooWorkspace& ws, RooAbsData& data, RooAbsPdf& pdf
, | | // MCMCCalculator(RooWorkspace& ws, RooAbsData& data, RooAbsPdf& pdf
, | |
| // const RooArgSet& paramsOfInterest, ProposalFunction& proposalFu
nction, | | // const RooArgSet& paramsOfInterest, ProposalFunction& proposalFu
nction, | |
| // Int_t numIters, RooArgList* axes = NULL, Double_t size = 0.05); | | // Int_t numIters, RooArgList* axes = NULL, Double_t size = 0.05); | |
| | | | |
| // alternate constructor, no automatic basic settings | | // alternate constructor, no automatic basic settings | |
| MCMCCalculator(RooAbsData& data, RooAbsPdf& pdf, | | MCMCCalculator(RooAbsData& data, RooAbsPdf& pdf, | |
|
| const RooArgSet& paramsOfInterest, ProposalFunction& proposalFunct
ion, | | const RooArgSet& paramsOfInterest, RooAbsPdf & priorPd
f, ProposalFunction& proposalFunction, | |
| Int_t numIters, RooArgList* axes = NULL, Double_t size = 0.05); | | Int_t numIters, RooArgList* axes = NULL, Double_t size = 0.05); | |
| | | | |
| virtual ~MCMCCalculator() {} | | virtual ~MCMCCalculator() {} | |
| | | | |
| // Main interface to get a ConfInterval | | // Main interface to get a ConfInterval | |
| virtual MCMCInterval* GetInterval() const; | | virtual MCMCInterval* 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;} | |
| | | | |
| virtual void SetModel(const ModelConfig & model); | | virtual void SetModel(const ModelConfig & model); | |
| | | | |
|
| // Set the DataSet, add to the the workspace if not already there | | // Set the DataSet if not already there | |
| virtual void SetData(RooAbsData& data) { fData = &data; } | | virtual void SetData(RooAbsData& data) { fData = &data; } | |
| | | | |
|
| // Set the Pdf, add to the the workspace if not already there | | // Set the Pdf if not already there | |
| virtual void SetPdf(RooAbsPdf& pdf) { fPdf = &pdf; } | | virtual void SetPdf(RooAbsPdf& pdf) { fPdf = &pdf; } | |
| | | | |
|
| | | // Set the Prior Pdf if not already there | |
| | | virtual void SetPriorPdf(RooAbsPdf& pdf) { fPriorPdf = &pdf; } | |
| | | | |
| // specify the parameters of interest in the interval | | // specify the parameters of interest in the interval | |
|
| virtual void SetParameters(const RooArgSet& set) { fPOI = &set; } | | virtual void SetParameters(const RooArgSet& set) { fPOI.removeAll(); | |
| | | fPOI.add(set); } | |
| | | | |
| // specify the nuisance parameters (eg. the rest of the parameters) | | // specify the nuisance parameters (eg. the rest of the parameters) | |
|
| virtual void SetNuisanceParameters(const RooArgSet& set) {fNuisParams | | virtual void SetNuisanceParameters(const RooArgSet& set) {fNuisParams | |
| = &set;} | | .removeAll(); fNuisParams.add(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 proposal function for suggesting new points for the MCMC | | // set the proposal function for suggesting new points for the MCMC | |
| virtual void SetProposalFunction(ProposalFunction& proposalFunction) | | virtual void SetProposalFunction(ProposalFunction& proposalFunction) | |
| { fPropFunc = &proposalFunction; } | | { fPropFunc = &proposalFunction; } | |
|
| | | | |
| // set the number of iterations to run the metropolis algorithm | | // set the number of iterations to run the metropolis algorithm | |
| virtual void SetNumIters(Int_t numIters) | | virtual void SetNumIters(Int_t numIters) | |
| { fNumIters = numIters; } | | { fNumIters = numIters; } | |
|
| | | | |
| // set the number of steps in the chain to discard as burn-in, | | // set the number of steps in the chain to discard as burn-in, | |
| // starting from the first | | // starting from the first | |
| virtual void SetNumBurnInSteps(Int_t numBurnInSteps) | | virtual void SetNumBurnInSteps(Int_t numBurnInSteps) | |
| { fNumBurnInSteps = numBurnInSteps; } | | { fNumBurnInSteps = numBurnInSteps; } | |
| | | | |
| // set the number of bins to create for each axis when constructing t
he interval | | // set the number of bins to create for each axis when constructing t
he interval | |
| virtual void SetNumBins(Int_t numBins) { fNumBins = numBins; } | | virtual void SetNumBins(Int_t numBins) { fNumBins = numBins; } | |
| // set which variables to put on each axis | | // set which variables to put on each axis | |
| virtual void SetAxes(RooArgList& axes) | | virtual void SetAxes(RooArgList& axes) | |
| { fAxes = &axes; } | | { fAxes = &axes; } | |
| // set whether to use kernel estimation to determine the interval | | // set whether to use kernel estimation to determine the interval | |
| virtual void SetUseKeys(Bool_t useKeys) { fUseKeys = useKeys; } | | virtual void SetUseKeys(Bool_t useKeys) { fUseKeys = useKeys; } | |
| // set whether to use sparse histogram (if using histogram at all) | | // set whether to use sparse histogram (if using histogram at all) | |
| virtual void SetUseSparseHist(Bool_t useSparseHist) | | virtual void SetUseSparseHist(Bool_t useSparseHist) | |
| { fUseSparseHist = useSparseHist; } | | { fUseSparseHist = useSparseHist; } | |
| | | | |
| protected: | | protected: | |
| | | | |
|
| Double_t fSize; // size of the test (eg. specified rate of Type I err | | Double_t fSize; // size of the test (eg. specified rate of T | |
| or) | | ype I error) | |
| //RooWorkspace* fWS; // owns all the components used by the calculato | | RooArgSet fPOI; // parameters of interest for interval | |
| r | | RooArgSet fNuisParams; // nuisance parameters for interval (not rea | |
| const RooArgSet * fPOI; // parameters of interest for interval | | lly used) | |
| const RooArgSet * fNuisParams; // nuisance parameters for interval | | | |
| //Bool_t fOwnsWorkspace; // whether we own the workspace | | | |
| mutable ProposalFunction* fPropFunc; // Proposal function for MCMC in
tegration | | mutable ProposalFunction* fPropFunc; // Proposal function for MCMC in
tegration | |
|
| RooAbsPdf * fPdf; // pointer to common PDF (owned by the workspace) | | RooAbsPdf * fPdf; // pointer to common PDF (owned by the works | |
| RooAbsData * fData; // pointer to the data (owned by the workspace) | | pace) | |
| // const char* fPdfName; // name of common PDF in workspace | | RooAbsPdf * fPriorPdf; // pointer to prior PDF (owned by the works | |
| // const char* fDataName; // name of data set in workspace | | pace) | |
| | | RooAbsData * fData; // pointer to the data (owned by the workspac | |
| | | e) | |
| Int_t fNumIters; // number of iterations to run metropolis algorithm | | Int_t fNumIters; // number of iterations to run metropolis algorithm | |
| Int_t fNumBurnInSteps; // number of iterations to discard as burn-in,
starting from the first | | Int_t fNumBurnInSteps; // number of iterations to discard as burn-in,
starting from the first | |
| Int_t fNumBins; // set the number of bins to create for each | | Int_t fNumBins; // set the number of bins to create for each | |
| // axis when constructing the interval | | // axis when constructing the interval | |
| RooArgList * fAxes; // which variables to put on each axis | | RooArgList * fAxes; // which variables to put on each axis | |
| Bool_t fUseKeys; // whether to use kernel estimation to determine int
erval | | Bool_t fUseKeys; // whether to use kernel estimation to determine int
erval | |
| Bool_t fUseSparseHist; // whether to use sparse histogram (if using h
ist at all) | | Bool_t fUseSparseHist; // whether to use sparse histogram (if using h
ist at all) | |
| | | | |
| void SetupBasicUsage(); | | void SetupBasicUsage(); | |
| void SetBins(const RooAbsCollection& coll, Int_t numBins) const | | void SetBins(const RooAbsCollection& coll, Int_t numBins) const | |
| | | | |
End of changes. 16 change blocks. |
| 22 lines changed or deleted | | 42 lines changed or added | |
|
| MCMCInterval.h | | MCMCInterval.h | |
|
| // @(#)root/roostats:$Id: MCMCInterval.h 26805 2009-06-17 14:31:02Z kbelasc
o $ | | // @(#)root/roostats:$Id: MCMCInterval.h 31276 2009-11-18 15:06:42Z moneta
$ | |
| // Authors: Kevin Belasco 17/06/2009 | | // Authors: Kevin Belasco 17/06/2009 | |
| // Authors: Kyle Cranmer 17/06/2009 | | // Authors: Kyle Cranmer 17/06/2009 | |
| /************************************************************************* | | /************************************************************************* | |
| * 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 28 | | skipping to change at line 28 | |
| | | | |
| #ifndef ROOSTATS_ConfInterval | | #ifndef ROOSTATS_ConfInterval | |
| #include "RooStats/ConfInterval.h" | | #include "RooStats/ConfInterval.h" | |
| #endif | | #endif | |
| #ifndef ROO_ARG_SET | | #ifndef ROO_ARG_SET | |
| #include "RooArgSet.h" | | #include "RooArgSet.h" | |
| #endif | | #endif | |
| #ifndef ROO_ARG_LIST | | #ifndef ROO_ARG_LIST | |
| #include "RooArgList.h" | | #include "RooArgList.h" | |
| #endif | | #endif | |
|
| #ifndef ROO_DATA_HIST | | // #ifndef ROO_DATA_HIST | |
| #include "RooDataHist.h" | | // #include "RooDataHist.h" | |
| #endif | | // #endif | |
| #ifndef ROO_DATA_SET | | // #ifndef ROO_DATA_SET | |
| #include "RooDataSet.h" | | // #include "RooDataSet.h" | |
| #endif | | // #endif | |
| #ifndef ROO_REAL_VAR | | // #ifndef ROO_REAL_VAR | |
| #include "RooRealVar.h" | | // #include "RooRealVar.h" | |
| #endif | | // #endif | |
| #ifndef ROO_KEYS_PDF | | // #ifndef ROO_KEYS_PDF | |
| #include "RooNDKeysPdf.h" | | // #include "RooNDKeysPdf.h" | |
| #endif | | // #endif | |
| #ifndef ROOSTATS_MarkovChain | | #ifndef ROOSTATS_MarkovChain | |
| #include "RooStats/MarkovChain.h" | | #include "RooStats/MarkovChain.h" | |
| #endif | | #endif | |
|
| #ifndef ROOT_TH1 | | // #ifndef ROOT_TH1 | |
| #include "TH1.h" | | // #include "TH1.h" | |
| #endif | | // #endif | |
| #ifndef ROO_PRODUCT | | // #ifndef ROO_PRODUCT | |
| #include "RooProduct.h" | | // #include "RooProduct.h" | |
| #endif | | // #endif | |
| #ifndef RooStats_Heavyside | | // #ifndef RooStats_Heavyside | |
| #include "RooStats/Heavyside.h" | | // #include "RooStats/Heavyside.h" | |
| #endif | | // #endif | |
| #ifndef ROO_PRODUCT | | // #ifndef ROO_PRODUCT | |
| #include "RooProduct.h" | | // #include "RooProduct.h" | |
| #endif | | // #endif | |
| #ifndef ROOT_THnSparse | | // #ifndef ROOT_THnSparse | |
| #include "THnSparse.h" | | // #include "THnSparse.h" | |
| #endif | | // #endif | |
| | | | |
| | | class RooNDKeysPdf; | |
| | | class RooProduct; | |
| | | | |
| namespace RooStats { | | namespace RooStats { | |
| | | | |
|
| | | class Heavyside; | |
| | | | |
| class MCMCInterval : public ConfInterval { | | class MCMCInterval : public ConfInterval { | |
| | | | |
| public: | | public: | |
|
| MCMCInterval(); | | | |
| MCMCInterval(const char* name); | | // default constructor | |
| MCMCInterval(const char* name, const char* title); | | explicit MCMCInterval(const char* name = 0); | |
| MCMCInterval(const char* name, const char* title, const RooArgSet& pa | | | |
| rameters, | | // constructor from parameter of interest and Markov chain object | |
| | | MCMCInterval(const char* name, const RooArgSet& parameters, | |
| MarkovChain& chain); | | MarkovChain& chain); | |
| | | | |
| enum {DEFAULT_NUM_BINS = 50}; | | enum {DEFAULT_NUM_BINS = 50}; | |
| | | | |
|
| virtual ~MCMCInterval() | | virtual ~MCMCInterval(); | |
| { | | | |
| delete[] fAxes; | | | |
| delete fHist; | | | |
| delete fChain; | | | |
| // kbelasco: check here for memory management errors | | | |
| delete fDataHist; | | | |
| delete fSparseHist; | | | |
| delete fKeysPdf; | | | |
| delete fProduct; | | | |
| delete fHeavyside; | | | |
| delete fKeysDataHist; | | | |
| delete fCutoffVar; | | | |
| } | | | |
| | | | |
| // determine whether this point is in the confidence interval | | // determine whether this point is in the confidence interval | |
|
| virtual Bool_t IsInInterval(const RooArgSet& point); | | virtual Bool_t IsInInterval(const RooArgSet& point) const; | |
| | | | |
| // set the desired confidence level (see GetActualConfidenceLevel()) | | // set the desired confidence level (see GetActualConfidenceLevel()) | |
| // Note: calling this function triggers the algorithm that determines | | // Note: calling this function triggers the algorithm that determines | |
| // the interval, so call this after initializing all other aspects | | // the interval, so call this after initializing all other aspects | |
| // of this IntervalCalculator | | // of this IntervalCalculator | |
| // Also, calling this function again with a different confidence leve
l | | // Also, calling this function again with a different confidence leve
l | |
| // retriggers the calculation of the interval | | // retriggers the calculation of the interval | |
| virtual void SetConfidenceLevel(Double_t cl); | | virtual void SetConfidenceLevel(Double_t cl); | |
| | | | |
| // get the desired confidence level (see GetActualConfidenceLevel()) | | // get the desired confidence level (see GetActualConfidenceLevel()) | |
| | | | |
| skipping to change at line 118 | | skipping to change at line 112 | |
| | | | |
| // get the cutoff RooNDKeysPdf value for being considered in the | | // get the cutoff RooNDKeysPdf value for being considered in the | |
| // confidence interval | | // confidence interval | |
| virtual Double_t GetKeysPdfCutoff(); | | virtual Double_t GetKeysPdfCutoff(); | |
| //virtual Double_t GetKeysPdfCutoff() { return fKeysCutoff; } | | //virtual Double_t GetKeysPdfCutoff() { return fKeysCutoff; } | |
| | | | |
| // get the actual value of the confidence level for this interval. | | // get the actual value of the confidence level for this interval. | |
| virtual Double_t GetActualConfidenceLevel(); | | virtual Double_t GetActualConfidenceLevel(); | |
| | | | |
| // get the sum of all bin weights | | // get the sum of all bin weights | |
|
| virtual Double_t GetSumOfWeights() const | | virtual Double_t GetSumOfWeights() const; | |
| { return fDataHist->sum(kFALSE); } | | | |
| | | | |
| // whether the specified confidence level is a floor for the actual | | // whether the specified confidence level is a floor for the actual | |
| // confidence level (strict), or a ceiling (not strict) | | // confidence level (strict), or a ceiling (not strict) | |
| virtual void SetHistStrict(Bool_t isHistStrict) { fIsHistStrict = isH
istStrict; } | | virtual void SetHistStrict(Bool_t isHistStrict) { fIsHistStrict = isH
istStrict; } | |
| | | | |
| // check if parameters are correct. (dummy implementation to start) | | // check if parameters are correct. (dummy implementation to start) | |
| Bool_t CheckParameters(const RooArgSet& point) const; | | Bool_t CheckParameters(const RooArgSet& point) const; | |
| | | | |
| // Set the parameters of interest for this interval | | // Set the parameters of interest for this interval | |
| // and change other internal data members accordingly | | // and change other internal data members accordingly | |
| | | | |
| skipping to change at line 266 | | skipping to change at line 259 | |
| << "negative epsilon value" << endl; | | << "negative epsilon value" << endl; | |
| else | | else | |
| fEpsilon = epsilon; | | fEpsilon = epsilon; | |
| } | | } | |
| | | | |
| private: | | private: | |
| inline Bool_t AcceptableConfLevel(Double_t confLevel); | | inline Bool_t AcceptableConfLevel(Double_t confLevel); | |
| | | | |
| protected: | | protected: | |
| // data members | | // data members | |
|
| const RooArgSet * fParameters; // parameters of interest for this int
erval | | RooArgSet fParameters; // parameters of interest for this interval | |
| MarkovChain* fChain; // the markov chain | | MarkovChain* fChain; // the markov chain | |
| RooDataHist* fDataHist; // the binned Markov Chain data | | RooDataHist* fDataHist; // the binned Markov Chain data | |
| RooNDKeysPdf* fKeysPdf; // the kernel estimation pdf | | RooNDKeysPdf* fKeysPdf; // the kernel estimation pdf | |
| RooProduct* fProduct; // the (keysPdf * heavyside) product | | RooProduct* fProduct; // the (keysPdf * heavyside) product | |
| Heavyside* fHeavyside; // the Heavyside function | | Heavyside* fHeavyside; // the Heavyside function | |
| RooDataHist* fKeysDataHist; // data hist representing product | | RooDataHist* fKeysDataHist; // data hist representing product | |
| TH1* fHist; // the binned Markov Chain data | | TH1* fHist; // the binned Markov Chain data | |
| THnSparse* fSparseHist; // the binned Markov Chain data | | THnSparse* fSparseHist; // the binned Markov Chain data | |
| 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) | |
| Double_t fHistConfLevel; // the actual conf level determined by hist | | Double_t fHistConfLevel; // the actual conf level determined by hist | |
| | | | |
End of changes. 9 change blocks. |
| 51 lines changed or deleted | | 43 lines changed or added | |
|
| Minimizer.h | | Minimizer.h | |
|
| // @(#)root/mathcore:$Id: Minimizer.h 28946 2009-06-11 15:39:14Z moneta $ | | // @(#)root/mathcore:$Id: Minimizer.h 31180 2009-11-16 10:54:05Z 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 92 | | skipping to change at line 92 | |
| #ifndef DEBUG | | #ifndef DEBUG | |
| fDebug(0), | | fDebug(0), | |
| #else | | #else | |
| fDebug(3), | | fDebug(3), | |
| #endif | | #endif | |
| fStrategy(1), | | fStrategy(1), | |
| fStatus(-1), | | fStatus(-1), | |
| fMaxCalls(0), | | fMaxCalls(0), | |
| fMaxIter(0), | | fMaxIter(0), | |
| fTol(1.E-6), | | fTol(1.E-6), | |
|
| | | fPrec(-1), | |
| fUp(1.) | | fUp(1.) | |
| {} | | {} | |
| | | | |
| /** | | /** | |
| Destructor (no operations) | | Destructor (no operations) | |
| */ | | */ | |
| virtual ~Minimizer () {} | | virtual ~Minimizer () {} | |
| | | | |
| private: | | private: | |
| // usually copying is non trivial, so we make this unaccessible | | // usually copying is non trivial, so we make this unaccessible | |
| | | | |
| skipping to change at line 268 | | skipping to change at line 269 | |
| errLow = 0; errUp = 0; | | errLow = 0; errUp = 0; | |
| return false; | | return false; | |
| } | | } | |
| | | | |
| /** | | /** | |
| perform a full calculation of the Hessian matrix for error calculatio
n | | perform a full calculation of the Hessian matrix for error calculatio
n | |
| */ | | */ | |
| virtual bool Hesse() { return false; } | | virtual bool Hesse() { return false; } | |
| | | | |
| /** | | /** | |
|
| scan function minimum for variable i. Variable and funciton must be s | | scan function minimum for variable i. Variable and function must be s | |
| et before using Scan | | et before using Scan | |
| Return false if an error or if minimizer does not support this funcit | | Return false if an error or if minimizer does not support this functi | |
| onality | | 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 | |
| The contour will be find for value of the function = Min + ErrorUp(); | | The contour will be find for value of the function = Min + ErrorUp(); | |
| */ | | */ | |
| | | | |
| skipping to change at line 291 | | skipping to change at line 292 | |
| double * /* xi */, double * /* xj */) { | | double * /* xi */, double * /* xj */) { | |
| return false; | | return false; | |
| } | | } | |
| | | | |
| /// return reference to the objective function | | /// return reference to the objective function | |
| ///virtual const ROOT::Math::IGenFunction & Function() const = 0; | | ///virtual const ROOT::Math::IGenFunction & Function() const = 0; | |
| | | | |
| /// print the result according to set level (implemented for TMinuit for
mantaining Minuit-style printing) | | /// print the result according to set level (implemented for TMinuit for
mantaining Minuit-style printing) | |
| virtual void PrintResults() {} | | virtual void PrintResults() {} | |
| | | | |
|
| // get name of variables (override if minimizer support storing of varia | | /// get name of variables (override if minimizer support storing of vari | |
| ble names) | | able names) | |
| //virtual std::string VariableName(unsigned int ivar) const { return "x_ | | /// return an empty string if variable is not found | |
| " + ROOT::Math::Util::ToString(ivar); } | | virtual std::string VariableName(unsigned int ) const { return std::stri | |
| | | ng();} // return empty string | |
| | | | |
| | | /// get index of variable given a variable given a name | |
| | | /// return -1 if variable is not found | |
| | | virtual int VariableIndex(const std::string &) const { return -1; } | |
| | | | |
| /** minimizer configuration parameters **/ | | /** minimizer configuration parameters **/ | |
| | | | |
| /// set print level | | /// set print level | |
| int PrintLevel() const { return fDebug; } | | int PrintLevel() const { return fDebug; } | |
| | | | |
| /// max number of function calls | | /// max number of function calls | |
| unsigned int MaxFunctionCalls() { return fMaxCalls; } | | unsigned int MaxFunctionCalls() { return fMaxCalls; } | |
| | | | |
| /// max iterations | | /// max iterations | |
| unsigned int MaxIterations() { return fMaxIter; } | | unsigned int MaxIterations() { return fMaxIter; } | |
| | | | |
| /// absolute tolerance | | /// absolute tolerance | |
| double Tolerance() const { return fTol; } | | double Tolerance() const { return fTol; } | |
| | | | |
|
| | | /// precision of minimizer in the evaluation of the objective function | |
| | | /// ( a value <=0 corresponds to the let the minimizer choose its defaul | |
| | | t one) | |
| | | double Precision() const { return fPrec; } | |
| | | | |
| /// strategy | | /// strategy | |
| int Strategy() const { return fStrategy; } | | int Strategy() const { return fStrategy; } | |
| | | | |
| /// status code of minimizer | | /// status code of minimizer | |
| int Status() const { return fStatus; } | | int Status() const { return fStatus; } | |
| | | | |
| /// return the statistical scale used for calculate the error | | /// return the statistical scale used for calculate the error | |
| /// is typically 1 for Chi2 and 0.5 for likelihood minimization | | /// is typically 1 for Chi2 and 0.5 for likelihood minimization | |
| double ErrorDef() const { return fUp; } | | double ErrorDef() const { return fUp; } | |
| | | | |
| | | | |
| skipping to change at line 333 | | skipping to change at line 343 | |
| | | | |
| ///set maximum of function calls | | ///set maximum of function calls | |
| void SetMaxFunctionCalls(unsigned int maxfcn) { if (maxfcn > 0) fMaxCall
s = maxfcn; } | | void SetMaxFunctionCalls(unsigned int maxfcn) { if (maxfcn > 0) fMaxCall
s = maxfcn; } | |
| | | | |
| /// set maximum iterations (one iteration can have many function calls) | | /// set maximum iterations (one iteration can have many function calls) | |
| void SetMaxIterations(unsigned int maxiter) { if (maxiter > 0) fMaxIter
= maxiter; } | | void SetMaxIterations(unsigned int maxiter) { if (maxiter > 0) fMaxIter
= maxiter; } | |
| | | | |
| /// set the tolerance | | /// set the tolerance | |
| void SetTolerance(double tol) { fTol = tol; } | | void SetTolerance(double tol) { fTol = tol; } | |
| | | | |
|
| | | /// set in the minimizer the objective function evaluation precision | |
| | | /// ( a value <=0 means the minimizer will choose its optimal value auto | |
| | | matically, i.e. default case) | |
| | | void SetPrecision(double prec) { fPrec = prec; } | |
| | | | |
| ///set the strategy | | ///set the strategy | |
| void SetStrategy(int strategyLevel) { fStrategy = strategyLevel; } | | void SetStrategy(int strategyLevel) { fStrategy = strategyLevel; } | |
| | | | |
| /// set scale for calculating the errors | | /// set scale for calculating the errors | |
| void SetErrorDef(double up) { fUp = up; } | | void SetErrorDef(double up) { fUp = up; } | |
| | | | |
| /// flag to check if minimizer needs to perform accurate error analysis
(e.g. run Hesse for Minuit) | | /// flag to check if minimizer needs to perform accurate error analysis
(e.g. run Hesse for Minuit) | |
| void SetValidError(bool on) { fValidError = on; } | | void SetValidError(bool on) { fValidError = on; } | |
| | | | |
| protected: | | protected: | |
| | | | |
| //private: | | //private: | |
| | | | |
| // keep protected to be accessible by the derived classes | | // keep protected to be accessible by the derived classes | |
| | | | |
| bool fValidError; // flag to control if errors have been vali
dated (Hesse has been run in case of Minuit) | | bool fValidError; // flag to control if errors have been vali
dated (Hesse has been run in case of Minuit) | |
| int fDebug; // print level | | int fDebug; // print level | |
| int fStrategy; // minimizer strategy | | int fStrategy; // minimizer strategy | |
| int fStatus; // status of minimizer | | int fStatus; // status of minimizer | |
|
| unsigned int fMaxCalls; // max number of funciton calls | | unsigned int fMaxCalls; // max number of function calls | |
| unsigned int fMaxIter; // max number or iterations used to find th
e minimum | | unsigned int fMaxIter; // max number or iterations used to find th
e minimum | |
| double fTol; // tolerance (absolute) | | double fTol; // tolerance (absolute) | |
|
| | | double fPrec; // precision | |
| double fUp; // error scale | | double fUp; // error scale | |
| | | | |
| }; | | }; | |
| | | | |
| } // end namespace Math | | } // end namespace Math | |
| | | | |
| } // end namespace ROOT | | } // end namespace ROOT | |
| | | | |
| #endif /* ROOT_Math_Minimizer */ | | #endif /* ROOT_Math_Minimizer */ | |
| | | | |
End of changes. 8 change blocks. |
| 10 lines changed or deleted | | 27 lines changed or added | |
|
| Minuit2Minimizer.h | | Minuit2Minimizer.h | |
| | | | |
| skipping to change at line 121 | | skipping to change at line 121 | |
| 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 */); | |
| /// set variable | | /// set variable | |
| virtual bool SetVariableValue(unsigned int ivar, double val); | | virtual bool SetVariableValue(unsigned int ivar, double val); | |
| virtual bool SetVariableValues(const double * val); | | virtual bool SetVariableValues(const double * val); | |
| | | | |
| /// get name of variables (override if minimizer support storing of vari
able names) | | /// get name of variables (override if minimizer support storing of vari
able names) | |
| virtual std::string VariableName(unsigned int ivar) const; | | virtual std::string VariableName(unsigned int ivar) const; | |
| | | | |
|
| /// method to perform the minimization | | /// get index of variable given a variable given a name | |
| | | /// return -1 if variable is not found | |
| | | virtual int VariableIndex(const std::string & name) const; | |
| | | | |
| | | /** | |
| | | method to perform the minimization. | |
| | | Return false in case the minimization did not converge. In this case | |
| | | a | |
| | | status code different than zero is set | |
| | | (retrieved by the derived method Minimizer::Status() )" | |
| | | | |
| | | status = 1 : Covariance was made pos defined | |
| | | status = 2 : Hesse is invalid | |
| | | status = 3 : Edm is above max | |
| | | status = 4 : Reached call limit | |
| | | status = 5 : Any other failure | |
| | | */ | |
| virtual bool Minimize(); | | virtual bool Minimize(); | |
| | | | |
| /// return minimum function value | | /// return minimum function value | |
| virtual double MinValue() const { return fState.Fval(); } | | virtual double MinValue() const { return fState.Fval(); } | |
| | | | |
| /// return expected distance reached from the minimum | | /// return expected distance reached from the minimum | |
| virtual double Edm() const { return fState.Edm(); } | | virtual double Edm() const { return fState.Edm(); } | |
| | | | |
| /// return pointer to X values at the minimum | | /// return pointer to X values at the minimum | |
| virtual const double * X() const { | | virtual const double * X() const { | |
| | | | |
| skipping to change at line 190 | | skipping to change at line 205 | |
| 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 | |
| */ | | */ | |
| virtual double GlobalCC(unsigned int i) const; | | virtual double GlobalCC(unsigned int i) const; | |
| | | | |
| /** | | /** | |
| get the minos error for parameter i, return false if Minos failed | | get the minos error for parameter i, return false if Minos failed | |
| A minimizaiton must be performed befre, return false if no minimizati
on has been done | | A minimizaiton must be performed befre, return false if no minimizati
on has been done | |
|
| | | In case of Minos failed the status error is updated as following | |
| | | status += 10 * minosStatus where the minos status is: | |
| | | status = 1 : maximum number of function calls exceeded when runni | |
| | | ng for lower error | |
| | | status = 2 : maximum number of function calls exceeded when runni | |
| | | ng for upper error | |
| | | status = 3 : new minimum found when running for lower error | |
| | | status = 4 : new minimum found when running for upper error | |
| | | status = 5 : any other failure | |
| | | | |
| */ | | */ | |
| virtual bool GetMinosError(unsigned int i, double & errLow, double & err
Up); | | virtual bool GetMinosError(unsigned int i, double & errLow, double & err
Up); | |
| | | | |
| /** | | /** | |
| 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, 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 | | 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 | | If a valid minimum exists the calculation is done on the minimum poin
t otherwise is performed | |
| in the current set values of parameters | | in the current set values of parameters | |
|
| | | Status code of minimizer is updated according to the following conven | |
| | | tion (in case Hesse failed) | |
| | | status += 100*hesseStatus where hesse status is: | |
| | | status = 1 : hesse failed | |
| | | status = 2 : matrix inversion failed | |
| | | status = 3 : matrix is not pos defined | |
| */ | | */ | |
| virtual bool Hesse(); | | 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 | |
| | | | |
| | | | |
End of changes. 4 change blocks. |
| 2 lines changed or deleted | | 34 lines changed or added | |
|
| NeymanConstruction.h | | NeymanConstruction.h | |
|
| // @(#)root/roostats:$Id: NeymanConstruction.h 26805 2009-01-13 17:45:57Z c
ranmer $ | | // @(#)root/roostats:$Id: NeymanConstruction.h 31276 2009-11-18 15:06: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_NeymanConstruction | | #ifndef ROOSTATS_NeymanConstruction | |
| | | | |
| skipping to change at line 41 | | skipping to change at line 41 | |
| | | | |
| namespace RooStats { | | namespace RooStats { | |
| | | | |
| class ConfInterval; | | class ConfInterval; | |
| | | | |
| class NeymanConstruction : public IntervalCalculator, public TNamed { | | class NeymanConstruction : public IntervalCalculator, public TNamed { | |
| | | | |
| 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 | |
| | | | |
| skipping to change at line 76 | | skipping to change at line 77 | |
| } | | } | |
| // 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;} | |
| | | | |
| virtual void SetModel(const ModelConfig &); | | virtual void SetModel(const ModelConfig &); | |
| | | | |
| // Set the DataSet | | // Set the DataSet | |
| virtual void SetData(RooAbsData& data) { fData = &data; } | | virtual void SetData(RooAbsData& data) { fData = &data; } | |
| | | | |
| // 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) { fPdf = &pdf; } | | virtual void SetPdf(RooAbsPdf& pdf) { fPdf = &pdf; } | |
| | | | |
| // specify the parameters of interest in the interval | | // specify the parameters of interest in the interval | |
|
| virtual void SetParameters(const RooArgSet& set) {fPOI = &set;} | | virtual void SetParameters(const RooArgSet& set) { fPOI.removeAll(); | |
| | | fPOI.add(set); } | |
| | | | |
| // specify the nuisance parameters (eg. the rest of the parameters) | | // specify the nuisance parameters (eg. the rest of the parameters) | |
|
| virtual void SetNuisanceParameters(const RooArgSet& set) {fNuisParams | | virtual void SetNuisanceParameters(const RooArgSet& set) {fNuisParams | |
| = &set;} | | .removeAll(); fNuisParams.add(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;} | |
| | | | |
| 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){ | | void SaveBeltToFile(bool flag=true){ | |
| fSaveBeltToFile = flag; | | fSaveBeltToFile = flag; | |
| if(flag) fCreateBelt = true; | | if(flag) fCreateBelt = true; | |
| } | | } | |
| void CreateConfBelt(bool flag=true){fCreateBelt = flag;} | | 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) | |
| RooAbsPdf * fPdf; // common PDF | | RooAbsPdf * fPdf; // common PDF | |
| RooAbsData * fData; // data set | | RooAbsData * fData; // data set | |
|
| const RooArgSet* fPOI; // RooArgSet specifying parameters of interes | | RooArgSet fPOI; // RooArgSet specifying parameters of interest for i | |
| t for interval | | nterval | |
| const RooArgSet* fNuisParams;// RooArgSet specifying nuisance parame | | RooArgSet fNuisParams;// RooArgSet specifying nuisance parameters fo | |
| ters for interval | | r interval | |
| TestStatSampler* fTestStatSampler; | | TestStatSampler* fTestStatSampler; | |
| RooAbsData* 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 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 | | 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) | |
| | | | |
End of changes. 6 change blocks. |
| 8 lines changed or deleted | | 13 lines changed or added | |
|
| PointSetInterval.h | | PointSetInterval.h | |
|
| // @(#)root/roostats:$Id: PointSetInterval.cxx 26317 2009-01-13 15:31:05Z c
ranmer $ | | // @(#)root/roostats:$Id: PointSetInterval.h 31276 2009-11-18 15:06:42Z mon
eta $ | |
| // 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_PointSetInterval | | #ifndef RooStats_PointSetInterval | |
| | | | |
| skipping to change at line 25 | | skipping to change at line 25 | |
| #include "RooArgSet.h" | | #include "RooArgSet.h" | |
| #endif | | #endif | |
| #ifndef ROO_TREE_DATA | | #ifndef ROO_TREE_DATA | |
| #include "RooAbsData.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: | | | |
| // RooArgSet* fParameters; // parameter of interest | | | |
| Double_t fConfidenceLevel; // confidence level | | | |
| RooAbsData* fParameterPointsInInterval; // either a histogram (RooDataH | | | |
| ist) or a tree (RooDataSet) | | | |
| | | | |
| public: | | public: | |
|
| // constructors,destructors | | | |
| PointSetInterval(); | | // default constructors | |
| PointSetInterval(const char* name); | | explicit PointSetInterval(const char* name = 0); | |
| PointSetInterval(const char* name, const char* title); | | | |
| | | // constructor from name and data set specifying the interval points | |
| PointSetInterval(const char* name, RooAbsData&); | | PointSetInterval(const char* name, RooAbsData&); | |
|
| PointSetInterval(const char* name, const char* title, RooAbsData&); | | | |
| | | // destructor | |
| virtual ~PointSetInterval(); | | virtual ~PointSetInterval(); | |
| | | | |
|
| virtual Bool_t IsInInterval(const RooArgSet&); | | // check if parameter is in the interval | |
| | | virtual Bool_t IsInInterval(const RooArgSet&) const; | |
| | | | |
| | | // set the confidence level for the interval | |
| virtual void SetConfidenceLevel(Double_t cl) {fConfidenceLevel = cl;} | | virtual void SetConfidenceLevel(Double_t cl) {fConfidenceLevel = cl;} | |
|
| | | | |
| | | // return the confidence level for the interval | |
| 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 | | // return a cloned list with the parameter of interest | |
| virtual RooArgSet* GetParameters() const; | | virtual RooArgSet* GetParameters() const; | |
| | | | |
|
| // Accessor for making plots | | // return a copy of the data set (points) defining this interval | |
| RooAbsData* GetParameterPoints() const {return (RooAbsData*)fParameterP
ointsInInterval->Clone();} | | RooAbsData* GetParameterPoints() const {return (RooAbsData*)fParameterP
ointsInInterval->Clone();} | |
| | | | |
|
| // check if parameters are correct. (dummy implementation to start) | | // return a cloned list with the parameter of interest | |
| Bool_t CheckParameters(const RooArgSet&) const ; | | Bool_t CheckParameters(const RooArgSet&) const ; | |
| | | | |
|
| // Method to return lower limit on a given parameter | | // return lower limit on a given parameter | |
| Double_t LowerLimit(RooRealVar& param) ; | | Double_t LowerLimit(RooRealVar& param) ; | |
|
| | | | |
| | | // return upper limit on a given parameter | |
| Double_t UpperLimit(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] | |
| | | | |
|
| | | private: | |
| | | | |
| | | // RooArgSet* fParameters; // parameter of interest | |
| | | Double_t fConfidenceLevel; // confidence level | |
| | | RooAbsData* fParameterPointsInInterval; // either a histogram (RooDataH | |
| | | ist) or a tree (RooDataSet) | |
| | | | |
| }; | | }; | |
| } | | } | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 14 change blocks. |
| 16 lines changed or deleted | | 29 lines changed or added | |
|
| ProfileLikelihoodCalculator.h | | ProfileLikelihoodCalculator.h | |
|
| // @(#)root/roostats:$Id: ProfileLikelihoodCalculator.h 30512 2009-09-28 17
:24:48Z moneta $ | | // @(#)root/roostats:$Id: ProfileLikelihoodCalculator.h 31276 2009-11-18 15
:06:42Z moneta $ | |
| // 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 | |
| | | | |
| skipping to change at line 28 | | skipping to change at line 28 | |
| #include "RooStats/LikelihoodInterval.h" | | #include "RooStats/LikelihoodInterval.h" | |
| | | | |
| namespace RooStats { | | namespace RooStats { | |
| | | | |
| class LikelihoodInterval; | | class LikelihoodInterval; | |
| | | | |
| class ProfileLikelihoodCalculator : public CombinedCalculator, public TN
amed { | | class ProfileLikelihoodCalculator : public CombinedCalculator, public TN
amed { | |
| | | | |
| public: | | public: | |
| | | | |
|
| | | // default constructor (needed for I/O) | |
| ProfileLikelihoodCalculator(); | | ProfileLikelihoodCalculator(); | |
| | | | |
|
| | | /// constructor from data, from a full model pdf describing both para | |
| | | meter of interest and nuisance parameters | |
| | | /// and from the set specifying the parameter of interest (POI). | |
| | | /// There is no need to specify the nuisance parameters since they ar | |
| | | e all other parameters of the model. | |
| | | /// When using the calculator for performing an hypothesis test one n | |
| | | eeds to provide also a snapshot (a copy) | |
| | | /// defining the null parameters and their value. There is no need to | |
| | | pass the alternate parameters. These | |
| | | /// will be obtained by the value maximazing the likelihood function | |
| ProfileLikelihoodCalculator(RooAbsData& data, RooAbsPdf& pdf, const R
ooArgSet& paramsOfInterest, | | ProfileLikelihoodCalculator(RooAbsData& data, RooAbsPdf& pdf, const R
ooArgSet& paramsOfInterest, | |
| Double_t size = 0.05, const RooArgSet* nu
llParams = 0 ); | | Double_t size = 0.05, const RooArgSet* nu
llParams = 0 ); | |
| | | | |
|
| | | /// constructor from data and a model configuration | |
| | | /// If the ModelConfig defines a prior pdf for any of the parameters | |
| | | those will be included as constrained terms in the | |
| | | /// likelihood function | |
| ProfileLikelihoodCalculator(RooAbsData& data, ModelConfig & model, Do
uble_t size = 0.05); | | ProfileLikelihoodCalculator(RooAbsData& data, ModelConfig & model, Do
uble_t size = 0.05); | |
| | | | |
| virtual ~ProfileLikelihoodCalculator(); | | virtual ~ProfileLikelihoodCalculator(); | |
| | | | |
|
| // main interface, implemented | | /// Return a likelihood interval. A global fit to the likelihood is p | |
| | | erformed and | |
| | | /// the interval is constructed using the the profile likelihood rati | |
| | | o function of the POI | |
| virtual LikelihoodInterval* GetInterval() const ; | | virtual LikelihoodInterval* GetInterval() const ; | |
| | | | |
|
| // main interface, implemented | | /// Return the hypothesis test result obtained from the likelihood ra | |
| | | tio of the | |
| | | /// maximum likelihood value with the null parameters fixed to their | |
| | | values, with respect keeping all parameters | |
| | | /// floating (global maximum likelihood value). | |
| virtual HypoTestResult* GetHypoTest() const; | | virtual HypoTestResult* GetHypoTest() const; | |
| | | | |
| protected: | | protected: | |
| | | | |
|
| | | // clear internal fit result | |
| | | void DoReset() const; | |
| | | | |
| | | // perform a global fit | |
| | | void DoGlobalFit() const; | |
| | | | |
| 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. | |
|
| | | | |
| | | mutable RooFitResult * fFitResult; // internal result of gloabl fit | |
| | | | |
| }; | | }; | |
| } | | } | |
| #endif | | #endif | |
| | | | |
End of changes. 8 change blocks. |
| 3 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/ | | #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 | | i686-slc5-gcc43-opt PYTHONDIR=/afs/cern.ch/sw/lcg/external/Python/2.5.4p2/i | |
| 6-slc5-gcc43-opt --fail-on-missing --enable-cintex --enable-explicitlink -- | | 686-slc5-gcc43-opt --fail-on-missing --enable-cintex --enable-explicitlink | |
| enable-gdml --enable-genvector --enable-mathmore --enable-minuit2 --enable- | | --enable-gdml --enable-genvector --enable-krb5 --enable-mathmore --enable-m | |
| mysql --enable-oracle --enable-python --enable-qt --enable-qtgsi --enable-r | | inuit2 --enable-mysql --enable-oracle --enable-python --enable-qt --enable- | |
| eflex --enable-roofit --enable-table --enable-unuran --with-castor-incdir=/ | | qtgsi --enable-reflex --enable-roofit --enable-table --enable-unuran --with | |
| afs/cern.ch/sw/lcg/external/castor/2.1.7-24/i686-slc5-gcc43-opt/usr/include | | -castor-incdir=/afs/cern.ch/sw/lcg/external/castor/2.1.8-10/i686-slc5-gcc43 | |
| /shift --with-castor-libdir=/afs/cern.ch/sw/lcg/external/castor/2.1.7-24/i6 | | -opt/usr/include/shift --with-castor-libdir=/afs/cern.ch/sw/lcg/external/ca | |
| 86-slc5-gcc43-opt/usr/lib --with-cern-libdir=/afs/cern.ch/sw/lcg/external/c | | stor/2.1.8-10/i686-slc5-gcc43-opt/usr/lib --with-cern-libdir=/afs/cern.ch/s | |
| ernlib/2006a/i686-slc5-gcc43-opt/lib --with-dcap-libdir=/afs/cern.ch/sw/lcg | | w/lcg/external/cernlib/2006a/i686-slc5-gcc43-opt/lib --with-dcap-libdir=/af | |
| /external/dcache_client/1.9.3/i686-slc5-gcc43-opt/dcap/lib --with-dcap-incd | | s/cern.ch/sw/lcg/external/dcache_client/1.9.3/i686-slc5-gcc43-opt/dcap/lib | |
| ir=/afs/cern.ch/sw/lcg/external/dcache_client/1.9.3/i686-slc5-gcc43-opt/dca | | --with-dcap-incdir=/afs/cern.ch/sw/lcg/external/dcache_client/1.9.3/i686-sl | |
| p/include --with-fftw3-incdir=/afs/cern.ch/sw/lcg/external/fftw3/3.1.2/i686 | | c5-gcc43-opt/dcap/include --with-fftw3-incdir=/afs/cern.ch/sw/lcg/external/ | |
| -slc5-gcc43-opt/include --with-fftw3-libdir=/afs/cern.ch/sw/lcg/external/ff | | fftw3/3.1.2/i686-slc5-gcc43-opt/include --with-fftw3-libdir=/afs/cern.ch/sw | |
| tw3/3.1.2/i686-slc5-gcc43-opt/lib --with-gccxml=/afs/cern.ch/sw/lcg/externa | | /lcg/external/fftw3/3.1.2/i686-slc5-gcc43-opt/lib --with-gccxml=/afs/cern.c | |
| l/gccxml/0.9.0_20090601/i686-slc5-gcc43-opt/bin --with-gfal-libdir=/afs/cer | | h/sw/lcg/external/gccxml/0.9.0_20090601/i686-slc5-gcc43-opt/bin --with-gfal | |
| n.ch/sw/lcg/external/Grid/gfal/1.11.7-1/i686-slc5-gcc43-opt/lib --with-gfal | | -libdir=/afs/cern.ch/sw/lcg/external/Grid/gfal/1.11.8-3/i686-slc5-gcc43-opt | |
| -incdir=/afs/cern.ch/sw/lcg/external/Grid/gfal/1.11.7-1/i686-slc5-gcc43-opt | | /lib --with-gfal-incdir=/afs/cern.ch/sw/lcg/external/Grid/gfal/1.11.8-3/i68 | |
| /include --with-globus-incdir=/afs/cern.ch/sw/lcg/external/Grid/globus/4.0. | | 6-slc5-gcc43-opt/include --with-globus-incdir=/afs/cern.ch/sw/lcg/external/ | |
| 3-VDT-1.6.0/i686-slc5-gcc43-opt/globus/include --with-globus-libdir=/afs/ce | | Grid/globus/4.0.3-VDT-1.6.0/i686-slc5-gcc43-opt/globus/include --with-globu | |
| rn.ch/sw/lcg/external/Grid/globus/4.0.3-VDT-1.6.0/i686-slc5-gcc43-opt/globu | | s-libdir=/afs/cern.ch/sw/lcg/external/Grid/globus/4.0.3-VDT-1.6.0/i686-slc5 | |
| s/lib --with-gsl-incdir=/afs/cern.ch/sw/lcg/external/GSL/1.10/i686-slc5-gcc | | -gcc43-opt/globus/lib --with-gsl-incdir=/afs/cern.ch/sw/lcg/external/GSL/1. | |
| 43-opt/include --with-gsl-libdir=/afs/cern.ch/sw/lcg/external/GSL/1.10/i686 | | 10/i686-slc5-gcc43-opt/include --with-gsl-libdir=/afs/cern.ch/sw/lcg/extern | |
| -slc5-gcc43-opt/lib --with-mysql-incdir=/afs/cern.ch/sw/lcg/external/mysql/ | | al/GSL/1.10/i686-slc5-gcc43-opt/lib --with-mysql-incdir=/afs/cern.ch/sw/lcg | |
| 5.0.18/i686-slc5-gcc43-opt/include --with-mysql-libdir=/afs/cern.ch/sw/lcg/ | | /external/mysql/5.0.18/i686-slc5-gcc43-opt/include --with-mysql-libdir=/afs | |
| external/mysql/5.0.18/i686-slc5-gcc43-opt/lib --with-oracle-incdir=/afs/cer | | /cern.ch/sw/lcg/external/mysql/5.0.18/i686-slc5-gcc43-opt/lib --with-oracle | |
| n.ch/sw/lcg/external/oracle/10.2.0.4p1-full/i686-slc5-gcc43-opt/include --w | | -incdir=/afs/cern.ch/sw/lcg/external/oracle/11.2.0.1.0/i686-slc5-gcc43-opt/ | |
| ith-oracle-libdir=/afs/cern.ch/sw/lcg/external/oracle/10.2.0.4p1-full/i686- | | include --with-oracle-libdir=/afs/cern.ch/sw/lcg/external/oracle/11.2.0.1.0 | |
| slc5-gcc43-opt/lib --with-shift-incdir=/afs/cern.ch/sw/lcg/external/castor/ | | /i686-slc5-gcc43-opt/lib --with-shift-incdir=/afs/cern.ch/sw/lcg/external/c | |
| 2.1.7-24/i686-slc5-gcc43-opt/usr/include/shift --with-shift-libdir=/afs/cer | | astor/2.1.8-10/i686-slc5-gcc43-opt/usr/include/shift --with-shift-libdir=/a | |
| n.ch/sw/lcg/external/castor/2.1.7-24/i686-slc5-gcc43-opt/usr/lib" | | fs/cern.ch/sw/lcg/external/castor/2.1.8-10/i686-slc5-gcc43-opt/usr/lib --wi | |
| | | th-pythia6-libdir=/afs/cern.ch/user/b/bellenot/scratch0/dist/pythia6/i686-s | |
| | | lc5-gcc43-opt --with-pythia8-incdir=/afs/cern.ch/user/b/bellenot/scratch0/d | |
| | | ist/pythia8/i686-slc5-gcc43-opt/include --with-pythia8-libdir=/afs/cern.ch/ | |
| | | user/b/bellenot/scratch0/dist/pythia8/i686-slc5-gcc43-opt/lib --with-gviz-i | |
| | | ncdir=/build/bellenot/libraries/i686-slc5-gcc43-opt/graphviz-2.24.0/include | |
| | | /graphviz --with-gviz-libdir=/build/bellenot/libraries/i686-slc5-gcc43-opt/ | |
| | | graphviz-2.24.0/lib" | |
| | | #define R__CONFIGUREFEATURES "asimage astiff builtin_afterimage builtin_ft | |
| | | gl builtin_freetype builtin_glew builtin_pcre builtin_zlib castor cint5 cin | |
| | | tex editline dcache exceptions explicitlink fftw3 gviz gdml genvector gfal | |
| | | krb5 ldap mathmore memstat minuit2 mysql opengl oracle pythia6 pythia8 pyth | |
| | | on qt qtgsi reflex roofit rfio shadowpw shared ssl table tmva unuran xft xm | |
| | | l xrootd thread" | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 1 change blocks. |
| 31 lines changed or deleted | | 44 lines changed or added | |
|
| RooAbsPdf.h | | RooAbsPdf.h | |
| | | | |
| skipping to change at line 87 | | skipping to change at line 87 | |
| Bool_t _resampleProto ; | | Bool_t _resampleProto ; | |
| TString _dsetName ; | | TString _dsetName ; | |
| } ; | | } ; | |
| | | | |
| GenSpec* prepareMultiGen(const RooArgSet &whatVars, | | GenSpec* prepareMultiGen(const RooArgSet &whatVars, | |
| 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()) ; | |
| RooDataSet* generate(GenSpec&) const ; | | RooDataSet* generate(GenSpec&) const ; | |
| | | | |
|
| RooDataHist *generateBinned(const RooArgSet &whatVars, Int_t nEvents, con
st RooCmdArg& arg1, | | RooDataHist *generateBinned(const RooArgSet &whatVars, Double_t nEvents,
const RooCmdArg& arg1, | |
| const RooCmdArg& arg2=RooCmdArg::none(), const
RooCmdArg& arg3=RooCmdArg::none(), | | const RooCmdArg& arg2=RooCmdArg::none(), const
RooCmdArg& arg3=RooCmdArg::none(), | |
| const RooCmdArg& arg4=RooCmdArg::none(), const
RooCmdArg& arg5=RooCmdArg::none()) ; | | const RooCmdArg& arg4=RooCmdArg::none(), const
RooCmdArg& arg5=RooCmdArg::none()) ; | |
| RooDataHist *generateBinned(const RooArgSet &whatVars, | | RooDataHist *generateBinned(const RooArgSet &whatVars, | |
| const RooCmdArg& arg1=RooCmdArg::none(),const
RooCmdArg& arg2=RooCmdArg::none(), | | const RooCmdArg& arg1=RooCmdArg::none(),const
RooCmdArg& arg2=RooCmdArg::none(), | |
| const RooCmdArg& arg3=RooCmdArg::none(),const
RooCmdArg& arg4=RooCmdArg::none(), | | const RooCmdArg& arg3=RooCmdArg::none(),const
RooCmdArg& arg4=RooCmdArg::none(), | |
| const RooCmdArg& arg5=RooCmdArg::none(),const
RooCmdArg& arg6=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; | | RooDataHist *generateBinned(const RooArgSet &whatVars, Double_t nEvents,
Bool_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. |
| 2 lines changed or deleted | | 2 lines changed or added | |
|
| RooCompositeDataStore.h | | RooCompositeDataStore.h | |
| /**************************************************************************
*** | | /**************************************************************************
*** | |
| * Project: RooFit
* | | * Project: RooFit
* | |
| * Package: RooFitCore
* | | * Package: RooFitCore
* | |
|
| * File: $Id: RooCompositeDataStore.h 30333 2009-09-21 15:39:17Z wouter
$ | | * File: $Id: RooCompositeDataStore.h 31258 2009-11-17 22:41:06Z wouter
$ | |
| * Authors:
* | | * Authors:
* | |
| * WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu
* | | * WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu
* | |
| * DK, David Kirkby, UC Irvine, dkirkby@uci.edu
* | | * DK, David Kirkby, UC Irvine, dkirkby@uci.edu
* | |
| *
* | | *
* | |
| * 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)
* | |
| | | | |
| skipping to change at line 51 | | skipping to change at line 51 | |
| RooCompositeDataStore(const RooCompositeDataStore& other, const char* new
name=0) ; | | RooCompositeDataStore(const RooCompositeDataStore& other, const char* new
name=0) ; | |
| RooCompositeDataStore(const RooCompositeDataStore& other, const RooArgSet
& vars, const char* newname=0) ; | | RooCompositeDataStore(const RooCompositeDataStore& other, const RooArgSet
& vars, const char* newname=0) ; | |
| virtual ~RooCompositeDataStore() ; | | virtual ~RooCompositeDataStore() ; | |
| | | | |
| // Write current row | | // Write current row | |
| virtual Int_t fill() ; | | virtual Int_t fill() ; | |
| | | | |
| // Retrieve a row | | // Retrieve a row | |
| using RooAbsDataStore::get ; | | using RooAbsDataStore::get ; | |
| virtual const RooArgSet* get(Int_t index) const ; | | virtual const RooArgSet* get(Int_t index) const ; | |
|
| | | virtual Double_t weight() const ; | |
| | | virtual Double_t weight(Int_t index) const ; | |
| | | virtual Double_t weightError(RooAbsData::ErrorType etype=RooAbsData::Pois | |
| | | son) const ; | |
| | | virtual void weightError(Double_t& lo, Double_t& hi, RooAbsData::ErrorTyp | |
| | | e etype=RooAbsData::Poisson) const ; | |
| | | virtual Bool_t isWeighted() const ; | |
| | | | |
| // Change observable name | | // Change observable name | |
| virtual Bool_t changeObservableName(const char* from, const char* to) ; | | virtual Bool_t changeObservableName(const char* from, const char* to) ; | |
| | | | |
| // Add one or more columns | | // Add one or more columns | |
| 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) ; | |
| | | | |
| // Merge column-wise | | // Merge column-wise | |
| RooAbsDataStore* merge(const RooArgSet& allvars, std::list<RooAbsDataStor
e*> dstoreList) ; | | RooAbsDataStore* merge(const RooArgSet& allvars, std::list<RooAbsDataStor
e*> dstoreList) ; | |
| | | | |
| skipping to change at line 82 | | skipping to change at line 87 | |
| virtual const RooAbsArg* cacheOwner() { return 0 ; } | | virtual const RooAbsArg* cacheOwner() { return 0 ; } | |
| virtual void setArgStatus(const RooArgSet& set, Bool_t active) ; | | virtual void setArgStatus(const RooArgSet& set, Bool_t active) ; | |
| virtual void resetCache() ; | | virtual void resetCache() ; | |
| | | | |
| protected: | | protected: | |
| | | | |
| void attachCache(const RooAbsArg* newOwner, const RooArgSet& cachedVars)
; | | void attachCache(const RooAbsArg* newOwner, const RooArgSet& cachedVars)
; | |
| | | | |
| std::map<std::string,RooAbsDataStore*> _dataMap ; | | std::map<std::string,RooAbsDataStore*> _dataMap ; | |
| RooCategory* _indexCat ; | | RooCategory* _indexCat ; | |
|
| | | mutable RooAbsDataStore* _curStore ; //! Datastore associated with curren | |
| | | t event | |
| | | mutable Int_t _curIndex ; //! Index associated with current event | |
| | | | |
| ClassDef(RooCompositeDataStore,1) // Composite Data Storage class | | ClassDef(RooCompositeDataStore,1) // Composite Data Storage class | |
| }; | | }; | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 3 change blocks. |
| 1 lines changed or deleted | | 11 lines changed or added | |
|
| RooDataSet.h | | RooDataSet.h | |
| | | | |
| skipping to change at line 75 | | skipping to change at line 75 | |
| 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. | |
| static RooDataSet *read(const char *filename, const RooArgList &variables
, | | static RooDataSet *read(const char *filename, const RooArgList &variables
, | |
| const char *opts= "", const char* commonPath="", | | const char *opts= "", const char* commonPath="", | |
| const char *indexCatName=0) ; | | const char *indexCatName=0) ; | |
| Bool_t write(const char* filename) ; | | Bool_t write(const char* filename) ; | |
| | | | |
|
| void setWeightVar(const char* name=0) ; | | /* void setWeightVar(const char* name=0) ; */ | |
| void setWeightVar(const RooAbsArg& arg) { | | /* void setWeightVar(const RooAbsArg& arg) { */ | |
| // Interpret given argument as event weight | | /* // Interpret given argument as event weight */ | |
| setWeightVar(arg.GetName()) ; | | /* setWeightVar(arg.GetName()) ; */ | |
| } | | /* } */ | |
| virtual Bool_t isWeighted() const { | | virtual Bool_t isWeighted() const ; | |
| // Return true if dataset contains weighted events | | | |
| return _wgtVar ? kTRUE : kFALSE ; | | | |
| } | | | |
| virtual Bool_t isNonPoissonWeighted() const ; | | virtual Bool_t isNonPoissonWeighted() const ; | |
| | | | |
| virtual Double_t weight() const ; | | virtual Double_t weight() const ; | |
| virtual void weightError(Double_t& lo, Double_t& hi,ErrorType etype=SumW2
) const ; | | virtual void weightError(Double_t& lo, Double_t& hi,ErrorType etype=SumW2
) const ; | |
| Double_t weightError(ErrorType etype=SumW2) const ; | | Double_t weightError(ErrorType etype=SumW2) const ; | |
| | | | |
| 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 | |
| | | | |
| skipping to change at line 133 | | skipping to change at line 130 | |
| virtual RooAbsData* cacheClone(const RooAbsArg* newCacheOwner, const RooA
rgSet* newCacheVars, const char* newName=0) ; | | virtual RooAbsData* cacheClone(const RooAbsArg* newCacheOwner, const RooA
rgSet* newCacheVars, const char* newName=0) ; | |
| | | | |
| friend class RooProdGenContext ; | | friend class RooProdGenContext ; | |
| | | | |
| 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, const char* wgtVarName=
0); | |
| | | | |
| 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,2) // Unbinned data set | | ClassDef(RooDataSet,2) // Unbinned data set | |
| }; | | }; | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 2 change blocks. |
| 10 lines changed or deleted | | 7 lines changed or added | |
|
| RooGlobalFunc.h | | RooGlobalFunc.h | |
| | | | |
| skipping to change at line 121 | | skipping to change at line 121 | |
| RooCmdArg Weight(Double_t wgt) ; | | RooCmdArg Weight(Double_t wgt) ; | |
| RooCmdArg Index(RooCategory& icat) ; | | RooCmdArg Index(RooCategory& icat) ; | |
| RooCmdArg Import(const char* state, TH1& histo) ; | | RooCmdArg Import(const char* state, TH1& histo) ; | |
| RooCmdArg Import(const char* state, RooDataHist& dhist) ; | | RooCmdArg Import(const char* state, RooDataHist& dhist) ; | |
| RooCmdArg Import(TH1& histo) ; | | RooCmdArg Import(TH1& histo) ; | |
| | | | |
| // RooDataSet::ctor arguments | | // RooDataSet::ctor arguments | |
| 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 Link(const char* state, RooDataSet& data) ; | | RooCmdArg Link(const char* state, RooAbsData& data) ; | |
| RooCmdArg Import(RooDataSet& data) ; | | RooCmdArg Import(RooDataSet& data) ; | |
| RooCmdArg Import(TTree& tree) ; | | RooCmdArg Import(TTree& tree) ; | |
| RooCmdArg ImportFromFile(const char* fname, const char* tname) ; | | RooCmdArg ImportFromFile(const char* fname, const char* tname) ; | |
| 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(Int_t) ; | | RooCmdArg DataError(Int_t) ; | |
| RooCmdArg NumCPU(Int_t nCPU, Bool_t interleave=kFALSE) ; | | RooCmdArg NumCPU(Int_t nCPU, Bool_t interleave=kFALSE) ; | |
| | | | |
| skipping to change at line 202 | | skipping to change at line 202 | |
| | | | |
| // 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 NumEvents(Double_t numEvents) ; | |
| RooCmdArg ExpectedData(Bool_t flag=kTRUE) ; | | RooCmdArg ExpectedData(Bool_t flag=kTRUE) ; | |
| RooCmdArg Asimov(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 | |
| | | | |
End of changes. 2 change blocks. |
| 1 lines changed or deleted | | 2 lines changed or added | |
|
| RooTreeDataStore.h | | RooTreeDataStore.h | |
| /**************************************************************************
*** | | /**************************************************************************
*** | |
| * Project: RooFit
* | | * Project: RooFit
* | |
| * Package: RooFitCore
* | | * Package: RooFitCore
* | |
|
| * File: $Id: RooTreeDataStore.h 30333 2009-09-21 15:39:17Z wouter $ | | * File: $Id: RooTreeDataStore.h 31258 2009-11-17 22:41:06Z wouter $ | |
| * Authors:
* | | * Authors:
* | |
| * WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu
* | | * WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu
* | |
| * DK, David Kirkby, UC Irvine, dkirkby@uci.edu
* | | * DK, David Kirkby, UC Irvine, dkirkby@uci.edu
* | |
| *
* | | *
* | |
| * 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)
* | |
| | | | |
| skipping to change at line 32 | | skipping to change at line 32 | |
| class RooAbsArg ; | | class RooAbsArg ; | |
| class RooArgList ; | | class RooArgList ; | |
| class TTree ; | | class TTree ; | |
| class RooFormulaVar ; | | class RooFormulaVar ; | |
| class RooArgSet ; | | class RooArgSet ; | |
| | | | |
| class RooTreeDataStore : public RooAbsDataStore { | | class RooTreeDataStore : public RooAbsDataStore { | |
| public: | | public: | |
| | | | |
| RooTreeDataStore() ; | | RooTreeDataStore() ; | |
|
| RooTreeDataStore(TTree* t, const RooArgSet& vars) ; | | RooTreeDataStore(TTree* t, const RooArgSet& vars, const char* wgtVarName=
0) ; | |
| | | | |
| // Empty ctor | | // Empty ctor | |
|
| RooTreeDataStore(const char* name, const char* title, const RooArgSet& va
rs) ; | | RooTreeDataStore(const char* name, const char* title, const RooArgSet& va
rs, const char* wgtVarName=0) ; | |
| virtual RooAbsDataStore* clone(const RooArgSet& vars, const char* newname
=0) const { return new RooTreeDataStore(*this,vars,newname) ; } | | virtual RooAbsDataStore* clone(const RooArgSet& vars, const char* newname
=0) const { return new RooTreeDataStore(*this,vars,newname) ; } | |
| | | | |
| // Ctors from TTree | | // Ctors from TTree | |
|
| RooTreeDataStore(const char* name, const char* title, const RooArgSet& va | | RooTreeDataStore(const char* name, const char* title, const RooArgSet& va | |
| rs, TTree& t, const RooFormulaVar& select) ; | | rs, TTree& t, const RooFormulaVar& select, const char* wgtVarName=0) ; | |
| RooTreeDataStore(const char* name, const char* title, const RooArgSet& va | | RooTreeDataStore(const char* name, const char* title, const RooArgSet& va | |
| rs, TTree& t, const char* selExpr=0) ; | | rs, TTree& t, const char* selExpr=0, const char* wgtVarName=0) ; | |
| | | | |
| // Ctors from DataStore | | // Ctors from DataStore | |
|
| RooTreeDataStore(const char* name, const char* title, const RooArgSet& va | | RooTreeDataStore(const char* name, const char* title, const RooArgSet& va | |
| rs, const RooAbsDataStore& tds, const RooFormulaVar& select) ; | | rs, const RooAbsDataStore& tds, const RooFormulaVar& select, const char* wg | |
| RooTreeDataStore(const char* name, const char* title, const RooArgSet& va | | tVarName=0) ; | |
| rs, const RooAbsDataStore& tds, const char* selExpr=0) ; | | RooTreeDataStore(const char* name, const char* title, const RooArgSet& va | |
| | | rs, const RooAbsDataStore& tds, const char* selExpr=0, const char* wgtVarNa | |
| | | me=0) ; | |
| | | | |
| RooTreeDataStore(const char *name, const char *title, RooAbsDataStore& td
s, | | RooTreeDataStore(const char *name, const char *title, RooAbsDataStore& td
s, | |
| const RooArgSet& vars, const RooFormulaVar* cutVar, const
char* cutRange, | | const RooArgSet& vars, const RooFormulaVar* cutVar, const
char* cutRange, | |
|
| Int_t nStart, Int_t nStop, Bool_t /*copyCache*/) ; | | Int_t nStart, Int_t nStop, Bool_t /*copyCache*/, const ch
ar* wgtVarName=0) ; | |
| | | | |
| RooTreeDataStore(const RooTreeDataStore& other, const char* newname=0) ; | | RooTreeDataStore(const RooTreeDataStore& other, const char* newname=0) ; | |
| RooTreeDataStore(const RooTreeDataStore& other, const RooArgSet& vars, co
nst char* newname=0) ; | | RooTreeDataStore(const RooTreeDataStore& other, const RooArgSet& vars, co
nst char* newname=0) ; | |
| virtual ~RooTreeDataStore() ; | | virtual ~RooTreeDataStore() ; | |
| | | | |
| // Write current row | | // Write current row | |
| virtual Int_t fill() ; | | virtual Int_t fill() ; | |
| | | | |
| // Retrieve a row | | // Retrieve a row | |
| using RooAbsDataStore::get ; | | using RooAbsDataStore::get ; | |
| virtual const RooArgSet* get(Int_t index) const ; | | virtual const RooArgSet* get(Int_t index) const ; | |
|
| | | virtual Double_t weight() const ; | |
| | | virtual Double_t weightError(RooAbsData::ErrorType etype=RooAbsData::Pois | |
| | | son) const ; | |
| | | virtual void weightError(Double_t& lo, Double_t& hi, RooAbsData::ErrorTyp | |
| | | e etype=RooAbsData::Poisson) const ; | |
| | | virtual Double_t weight(Int_t index) const ; | |
| | | virtual Bool_t isWeighted() const { return (_wgtVar!=0||_extWgtArray!=0) | |
| | | ; } | |
| | | | |
| // Change observable name | | // Change observable name | |
| virtual Bool_t changeObservableName(const char* from, const char* to) ; | | virtual Bool_t changeObservableName(const char* from, const char* to) ; | |
| | | | |
| // Add one or more columns | | // Add one or more columns | |
| 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) ; | |
| | | | |
| // Merge column-wise | | // Merge column-wise | |
| RooAbsDataStore* merge(const RooArgSet& allvars, std::list<RooAbsDataStor
e*> dstoreList) ; | | RooAbsDataStore* merge(const RooArgSet& allvars, std::list<RooAbsDataStor
e*> dstoreList) ; | |
| | | | |
| skipping to change at line 102 | | skipping to change at line 107 | |
| virtual void cacheArgs(const RooAbsArg* owner, RooArgSet& varSet, const R
ooArgSet* nset=0) ; | | virtual void cacheArgs(const RooAbsArg* owner, RooArgSet& varSet, const R
ooArgSet* nset=0) ; | |
| virtual const RooAbsArg* cacheOwner() { return _cacheOwner ; } | | virtual const RooAbsArg* cacheOwner() { return _cacheOwner ; } | |
| virtual void setArgStatus(const RooArgSet& set, Bool_t active) ; | | virtual void setArgStatus(const RooArgSet& set, Bool_t active) ; | |
| virtual void resetCache() ; | | virtual void resetCache() ; | |
| | | | |
| void loadValues(const TTree *t, const RooFormulaVar* select=0, const char
* rangeName=0, Int_t nStart=0, Int_t nStop=2000000000) ; | | void loadValues(const TTree *t, const RooFormulaVar* select=0, const char
* rangeName=0, Int_t nStart=0, Int_t nStop=2000000000) ; | |
| void loadValues(const RooAbsDataStore *tds, const RooFormulaVar* select=0
, const char* rangeName=0, Int_t nStart=0, Int_t nStop=2000000000) ; | | void loadValues(const RooAbsDataStore *tds, const RooFormulaVar* select=0
, const char* rangeName=0, Int_t nStart=0, Int_t nStop=2000000000) ; | |
| | | | |
| virtual void checkInit() const; | | virtual void checkInit() const; | |
| | | | |
|
| | | void setExternalWeightArray(Double_t* arrayWgt, Double_t* arrayWgtErrLo, | |
| | | Double_t* arrayWgtErrHi, Double_t* arraySumW2) { | |
| | | _extWgtArray = arrayWgt ; | |
| | | _extWgtErrLoArray = arrayWgtErrLo ; | |
| | | _extWgtErrHiArray = arrayWgtErrHi ; | |
| | | _extSumW2Array = arraySumW2 ; | |
| | | } | |
| | | | |
| protected: | | protected: | |
| | | | |
|
| | | RooArgSet varsNoWeight(const RooArgSet& allVars, const char* wgtName=0) ; | |
| | | RooRealVar* weightVar(const RooArgSet& allVars, const char* wgtName=0) ; | |
| | | | |
| void initialize(); | | void initialize(); | |
| void attachCache(const RooAbsArg* newOwner, const RooArgSet& cachedVars)
; | | void attachCache(const RooAbsArg* newOwner, const RooArgSet& cachedVars)
; | |
| | | | |
| // TTree Branch buffer size control | | // TTree Branch buffer size control | |
| void setBranchBufferSize(Int_t size) { _defTreeBufSize = size ; } | | void setBranchBufferSize(Int_t size) { _defTreeBufSize = size ; } | |
| Int_t getBranchBufferSize() const { return _defTreeBufSize ; } | | Int_t getBranchBufferSize() const { return _defTreeBufSize ; } | |
| | | | |
| static Int_t _defTreeBufSize ; | | static Int_t _defTreeBufSize ; | |
| | | | |
| void createTree(const char* name, const char* title) ; | | void createTree(const char* name, const char* title) ; | |
| TTree *_tree ; // TTree holding the data points | | TTree *_tree ; // TTree holding the data points | |
| TTree *_cacheTree ; //! TTree holding the cached function values | | TTree *_cacheTree ; //! TTree holding the cached function values | |
| const RooAbsArg* _cacheOwner ; //! Object owning cache contents | | const RooAbsArg* _cacheOwner ; //! Object owning cache contents | |
| mutable Bool_t _defCtor ;//! Was object constructed with default ctor? | | mutable Bool_t _defCtor ;//! Was object constructed with default ctor? | |
| | | | |
|
| ClassDef(RooTreeDataStore,1) // TTree-based Data Storage class | | RooArgSet _varsww ; | |
| | | RooRealVar* _wgtVar ; // Pointer to weight variable (if set) | |
| | | | |
| | | Double_t* _extWgtArray ; //! External weight array | |
| | | Double_t* _extWgtErrLoArray ; //! External weight array - low error | |
| | | Double_t* _extWgtErrHiArray ; //! External weight array - high error | |
| | | Double_t* _extSumW2Array ; //! External sum of weights array | |
| | | | |
| | | mutable Double_t _curWgt ; // Weight of current event | |
| | | mutable Double_t _curWgtErrLo ; // Weight of current event | |
| | | mutable Double_t _curWgtErrHi ; // Weight of current event | |
| | | mutable Double_t _curWgtErr ; // Weight of current event | |
| | | | |
| | | ClassDef(RooTreeDataStore,2) // TTree-based Data Storage class | |
| }; | | }; | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 10 change blocks. |
| 13 lines changed or deleted | | 47 lines changed or added | |
|
| RootFinder.h | | RootFinder.h | |
|
| // @(#)root/tmva $Id: RootFinder.h 29195 2009-06-24 10:39:49Z brun $ | | // @(#)root/mathmore:$Id: RootFinder.h 25486 2008-09-22 12:43:03Z moneta $ | |
| // Author: Andreas Hoecker, Joerg Stelzer, Helge Voss, Kai Voss | | // Authors: L. Moneta, A. Zsenei 08/2005 | |
| | | | |
|
| /************************************************************************** | | /********************************************************************** | |
| ******** | | * * | |
| * Project: TMVA - a Root-integrated toolkit for multivariate data analysis | | * Copyright (c) 2004 ROOT Foundation, CERN/PH-SFT * | |
| * | | * * | |
| * Package: TMVA | | * This library is free software; you can redistribute it and/or * | |
| * | | * modify it under the terms of the GNU General Public License * | |
| * Class : RootFinder | | * as published by the Free Software Foundation; either version 2 * | |
| * | | * of the License, or (at your option) any later version. * | |
| * Web : http://tmva.sourceforge.net | | * * | |
| * | | * This library is distributed in the hope that it will be useful, * | |
| * | | * but WITHOUT ANY WARRANTY; without even the implied warranty of * | |
| * | | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * | |
| * Description: | | * General Public License for more details. * | |
| * | | * * | |
| * Root finding using Brents algorithm | | * You should have received a copy of the GNU General Public License * | |
| * | | * along with this library (see file COPYING); if not, write * | |
| * (translated from CERNLIB function RZERO) | | * to the Free Software Foundation, Inc., 59 Temple Place, Suite * | |
| * | | * 330, Boston, MA 02111-1307 USA, or contact the author. * | |
| * | | * * | |
| * | | **********************************************************************/ | |
| * Authors (alphabetical): | | | |
| * | | // Header file for class RootFinder | |
| * Andreas Hoecker <Andreas.Hocker@cern.ch> - CERN, Switzerland | | // | |
| * | | // Created by: moneta at Sun Nov 14 16:59:55 2004 | |
| * Helge Voss <Helge.Voss@cern.ch> - MPI-K Heidelberg, German | | // | |
| y * | | // Last update: Sun Nov 14 16:59:55 2004 | |
| * Kai Voss <Kai.Voss@cern.ch> - U. of Victoria, Canada | | // | |
| * | | #ifndef ROOT_Math_RootFinder | |
| * | | #define ROOT_Math_RootFinder | |
| * | | | |
| * Copyright (c) 2005: | | | |
| * | | | |
| * CERN, Switzerland | | | |
| * | | | |
| * U. of Victoria, Canada | | | |
| * | | | |
| * MPI-K Heidelberg, Germany | | | |
| * | | | |
| * | | | |
| * | | | |
| * 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_RootFinder | | | |
| #define ROOT_TMVA_RootFinder | | | |
| | | | |
| ////////////////////////////////////////////////////////////////////////// | | | |
| // // | | | |
| // RootFinder // | | | |
| // // | | | |
| // Root finding using Brents algorithm // | | | |
| // (translated from CERNLIB function RZERO) // | | | |
| // // | | | |
| ////////////////////////////////////////////////////////////////////////// | | | |
| | | | |
|
| #ifndef ROOT_TObject | | #ifndef ROOT_Math_IFunctionfwd | |
| #include "TObject.h" | | #include "Math/IFunctionfwd.h" | |
| #endif | | #endif | |
| | | | |
|
| namespace TMVA { | | #ifndef ROOT_Math_IRootFinderMethod | |
| | | #include "Math/IRootFinderMethod.h" | |
| class MsgLogger; | | #endif | |
| | | | |
| class RootFinder : public TObject { | | | |
| | | | |
| public: | | | |
| | | | |
| RootFinder( Double_t (*rootVal)( Double_t ), | | | |
| Double_t rootMin, Double_t rootMax, | | | |
| Int_t maxIterations = 100, | | | |
| Double_t absTolerance = 0.0 ); | | | |
| virtual ~RootFinder( void ); | | | |
| | | | |
| // returns the root of the function | | | |
| Double_t Root( Double_t refValue ); | | | |
| | | | |
|
| private: | | /** | |
| | | @defgroup RootFinders One-dimensional Root-Finding algorithms | |
| | | @ingroup NumAlgo | |
| | | */ | |
| | | | |
| | | namespace ROOT { | |
| | | namespace Math { | |
| | | | |
| | | //_________________________________________________________________________ | |
| | | ____________ | |
| | | /** | |
| | | Class to find the Root of one dimensional functions. | |
| | | The class is templated on the type of Root solver algorithms. | |
| | | The possible types of Root-finding algorithms are: | |
| | | <ul> | |
| | | <li>Root Bracketing Algorithms which they do not require function | |
| | | derivatives | |
| | | <ol> | |
| | | <li>Roots::Bisection | |
| | | <li>Roots::FalsePos | |
| | | <li>Roots::Brent | |
| | | </ol> | |
| | | <li>Root Finding Algorithms using Derivatives | |
| | | <ol> | |
| | | <li>Roots::Newton | |
| | | <li>Roots::Secant | |
| | | <li>Roots::Steffenson | |
| | | </ol> | |
| | | </ul> | |
| | | | |
| | | This class does not cupport copying | |
| | | | |
| | | @ingroup RootFinders | |
| | | | |
| | | */ | |
| | | | |
| | | class RootFinder { | |
| | | | |
| | | public: | |
| | | | |
| | | enum EType { kBRENT, // Methods | |
| | | from MathCore | |
| | | kGSL_BISECTION, kGSL_FALSE_POS, kGSL_BRENT, // GSL Nor | |
| | | mal | |
| | | kGSL_NEWTON, kGSL_SECANT, kGSL_STEFFENSON // GSL Der | |
| | | ivatives | |
| | | }; | |
| | | | |
| | | /** | |
| | | Construct a Root-Finder algorithm | |
| | | */ | |
| | | RootFinder(RootFinder::EType type = RootFinder::kBRENT); | |
| | | virtual ~RootFinder(); | |
| | | | |
| | | private: | |
| | | // usually copying is non trivial, so we make this unaccessible | |
| | | RootFinder(const RootFinder & ) {} | |
| | | RootFinder & operator = (const RootFinder & rhs) | |
| | | { | |
| | | if (this == &rhs) return *this; // time saving self-test | |
| | | return *this; | |
| | | } | |
| | | | |
| | | public: | |
| | | | |
| | | int SetMethod(RootFinder::EType type = RootFinder::kBRENT); | |
| | | | |
| | | /** | |
| | | Provide to the solver the function and the initial search inter | |
| | | val [xlow, xup] | |
| | | for algorithms not using derivatives (bracketing algorithms) | |
| | | The templated function f must be of a type implementing the \a | |
| | | operator() method, | |
| | | <em> double operator() ( double x ) </em> | |
| | | Returns non zero if interval is not valid (i.e. does not contai | |
| | | ns a root) | |
| | | */ | |
| | | | |
| | | int SetFunction( const IGenFunction & f, double xlow, double xup) | |
| | | { | |
| | | return fSolver->SetFunction( f, xlow, xup); | |
| | | } | |
| | | | |
| | | /** | |
| | | Provide to the solver the function and an initial estimate of t | |
| | | he root, | |
| | | for algorithms using derivatives. | |
| | | The templated function f must be of a type implementing the \a | |
| | | operator() | |
| | | and the \a Gradient() methods. | |
| | | <em> double operator() ( double x ) </em> | |
| | | Returns non zero if starting point is not valid | |
| | | */ | |
| | | | |
| | | int SetFunction( const IGradFunction & f, double xstart) { | |
| | | return fSolver->SetFunction( f, xstart); | |
| | | } | |
| | | | |
| | | template<class Function, class Derivative> | |
| | | int Solve(Function f, Derivative d, double start, | |
| | | int maxIter = 100, double absTol = 1E-3, double relTol = | |
| | | 1E-6); | |
| | | | |
| | | template<class Function> | |
| | | int Solve(Function f, double min, double max, | |
| | | int maxIter = 100, double absTol = 1E-3, double relTol = | |
| | | 1E-6); | |
| | | | |
| | | /** | |
| | | Compute the roots iterating until the estimate of the Root is | |
| | | within the required tolerance returning | |
| | | the iteration Status | |
| | | */ | |
| | | int Solve( int maxIter = 100, double absTol = 1E-3, double relTol | |
| | | = 1E-6) { | |
| | | return fSolver->Solve( maxIter, absTol, relTol ); | |
| | | } | |
| | | | |
| | | /** | |
| | | Return the number of iteration performed to find the Root. | |
| | | */ | |
| | | int Iterations() const { | |
| | | return fSolver->Iterations(); | |
| | | } | |
| | | | |
| | | /** | |
| | | Perform a single iteration and return the Status | |
| | | */ | |
| | | int Iterate() { | |
| | | return fSolver->Iterate(); | |
| | | } | |
| | | | |
| | | /** | |
| | | Return the current and latest estimate of the Root | |
| | | */ | |
| | | double Root() const { | |
| | | return fSolver->Root(); | |
| | | } | |
| | | | |
| | | /** | |
| | | Return the current and latest estimate of the lower value of th | |
| | | e Root-finding interval (for bracketing algorithms) | |
| | | */ | |
| | | /* double XLower() const { */ | |
| | | /* return fSolver->XLower(); */ | |
| | | /* } */ | |
| | | | |
| | | /** | |
| | | Return the current and latest estimate of the upper value of th | |
| | | e Root-finding interval (for bracketing algorithms) | |
| | | */ | |
| | | /* double XUpper() const { */ | |
| | | /* return fSolver->XUpper(); */ | |
| | | /* } */ | |
| | | | |
| | | /** | |
| | | Get Name of the Root-finding solver algorithm | |
| | | */ | |
| | | const char * Name() const { | |
| | | return fSolver->Name(); | |
| | | } | |
| | | | |
| | | #ifdef LATER | |
| | | /** | |
| | | Test convertgence Status of current iteration using interval va | |
| | | lues (for bracketing algorithms) | |
| | | */ | |
| | | static int TestInterval( double xlow, double xup, double epsAbs, d | |
| | | ouble epsRel) { | |
| | | return GSLRootHelper::TestInterval(xlow, xup, epsAbs, epsRel); | |
| | | } | |
| | | | |
| | | /** | |
| | | Test convergence Status of current iteration using last Root es | |
| | | timates (for algorithms using function derivatives) | |
| | | */ | |
| | | static int TestDelta( double r1, double r0, double epsAbs, double | |
| | | epsRel) { | |
| | | return GSLRootHelper::TestDelta(r1, r0, epsAbs, epsRel); | |
| | | } | |
| | | | |
| | | /** | |
| | | Test function residual | |
| | | */ | |
| | | static int TestResidual(double f, double epsAbs) { | |
| | | return GSLRootHelper::TestResidual(f, epsAbs); | |
| | | } | |
| | | #endif | |
| | | | |
|
| Double_t fRootMin; // minimum root value | | protected: | |
| Double_t fRootMax; // maximum root value | | | |
| Int_t fMaxIter; // maximum number of iterations | | | |
| Double_t fAbsTol; // absolute tolerance deviation | | | |
| | | | |
|
| // function pointer | | private: | |
| Double_t (*fGetRootVal)( Double_t ); | | | |
| | | | |
|
| mutable MsgLogger* fLogger; //! message logger | | IRootFinderMethod* fSolver; // type of algorithm to be used | |
| MsgLogger& Log() const { return *fLogger; } | | | |
| | | | |
|
| ClassDef(RootFinder,0) // Root finding using Brents algorithm | | }; | |
| }; | | | |
| | | | |
|
| } // namespace TMVA | | } // namespace Math | |
| | | } // namespace ROOT | |
| | | | |
| | | #include "Math/WrappedFunction.h" | |
| | | #include "Math/Functor.h" | |
| | | | |
| | | template<class Function, class Derivative> | |
| | | int ROOT::Math::RootFinder::Solve(Function f, Derivative d, double start, | |
| | | int maxIter, double absTol, double relTol | |
| | | ) | |
| | | { | |
| | | ROOT::Math::GradFunctor1D wf(f, d); | |
| | | if (fSolver) fSolver->SetFunction(wf, start); | |
| | | return Solve(maxIter, absTol, relTol); | |
| | | } | |
| | | | |
| | | template<class Function> | |
| | | int ROOT::Math::RootFinder::Solve(Function f, double min, double max, | |
| | | int maxIter, double absTol, double relTol | |
| | | ) | |
| | | { | |
| | | ROOT::Math::WrappedFunction<Function> wf(f); | |
| | | if (fSolver) fSolver->SetFunction(wf, min, max); | |
| | | return Solve(maxIter, absTol, relTol); | |
| | | } | |
| | | | |
|
| #endif | | #endif /* ROOT_Math_RootFinder */ | |
| | | | |
End of changes. 11 change blocks. |
| 92 lines changed or deleted | | 253 lines changed or added | |
|
| SimpleInterval.h | | SimpleInterval.h | |
|
| // @(#)root/roostats:$Id: SimpleInterval.h 30512 2009-09-28 17:24:48Z monet
a $ | | // @(#)root/roostats:$Id: SimpleInterval.h 31285 2009-11-18 16:38:36Z monet
a $ | |
| // 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_SimpleInterval | | #ifndef RooStats_SimpleInterval | |
| #define RooStats_SimpleInterval | | #define RooStats_SimpleInterval | |
| | | | |
| #ifndef ROO_ARG_SET | | #ifndef ROO_ARG_SET | |
| #include "RooArgSet.h" | | #include "RooArgSet.h" | |
| #endif | | #endif | |
| #ifndef RooStats_ConfInterval | | #ifndef RooStats_ConfInterval | |
| #include "RooStats/ConfInterval.h" | | #include "RooStats/ConfInterval.h" | |
| #endif | | #endif | |
| | | | |
|
| | | class RooRealVar; | |
| | | | |
| namespace RooStats { | | namespace RooStats { | |
| class SimpleInterval : public ConfInterval { | | class SimpleInterval : public ConfInterval { | |
|
| protected: | | | |
| RooArgSet* fParameters; // parameter of interest | | | |
| Double_t fLowerLimit; // lower limit | | | |
| Double_t fUpperLimit; // upper limit | | | |
| Double_t fConfidenceLevel; // confidence level | | | |
| | | | |
| public: | | public: | |
|
| // constructors,destructors | | // default constructors | |
| SimpleInterval(); | | explicit SimpleInterval(const char* name = 0); | |
| SimpleInterval(const char* name); | | | |
| SimpleInterval(const char* name, const char* title); | | // constructor from name, the Parameter of interest and lower/upper bou | |
| SimpleInterval(const char* name, RooAbsArg* var, Double_t, Double_t); | | nd values | |
| SimpleInterval(const char* name, const char* title, RooAbsArg* var, Dou | | SimpleInterval(const char* name, const RooRealVar & var, Double_t lower | |
| ble_t, Double_t); | | , Double_t upper, Double_t cl); | |
| | | | |
| | | // destructor | |
| virtual ~SimpleInterval(); | | virtual ~SimpleInterval(); | |
| | | | |
|
| virtual Bool_t IsInInterval(const RooArgSet&); | | // check if parameter is in the interval | |
| virtual void SetConfidenceLevel(Double_t cl) {fConfidenceLevel = cl;} | | virtual Bool_t IsInInterval(const RooArgSet&) const; | |
| | | | |
| | | // set the confidence level for the interval. Simple interval is define | |
| | | d at construction time so this function | |
| | | // has no effect | |
| | | virtual void SetConfidenceLevel(Double_t ) {} | |
| | | | |
| | | // return the confidence interval | |
| virtual Double_t ConfidenceLevel() const {return fConfidenceLevel;} | | virtual Double_t ConfidenceLevel() const {return fConfidenceLevel;} | |
| | | | |
|
| // Method to return lower limit | | // return the interval lower limit | |
| virtual Double_t LowerLimit() {return fLowerLimit;} | | virtual Double_t LowerLimit() {return fLowerLimit;} | |
|
| // Method to return upper limit | | // return the interval upper limit | |
| virtual Double_t UpperLimit() {return fUpperLimit;} | | virtual Double_t UpperLimit() {return fUpperLimit;} | |
| | | | |
|
| // do we want it to return list of parameters | | // return a cloned list with the parameter of interest | |
| virtual RooArgSet* GetParameters() const; | | virtual RooArgSet* GetParameters() const; | |
| | | | |
|
| // check if parameters are correct. (dummy implementation to start) | | // check if parameters are correct (i.e. they are the POI of this inter
val) | |
| Bool_t CheckParameters(const RooArgSet&) const ; | | Bool_t CheckParameters(const RooArgSet&) const ; | |
| | | | |
| protected: | | protected: | |
|
| | | | |
| ClassDef(SimpleInterval,1) // Concrete implementation of ConfInterval
for simple 1-D intervals in the form [a,b] | | ClassDef(SimpleInterval,1) // Concrete implementation of ConfInterval
for simple 1-D intervals in the form [a,b] | |
| | | | |
|
| | | RooArgSet fParameters; // set containing the parameter of interest | |
| | | Double_t fLowerLimit; // lower interval limit | |
| | | Double_t fUpperLimit; // upper interval limit | |
| | | Double_t fConfidenceLevel; // confidence level | |
| | | | |
| }; | | }; | |
| } | | } | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 11 change blocks. |
| 19 lines changed or deleted | | 31 lines changed or added | |
|
| TBranchSTL.h | | TBranchSTL.h | |
|
| // @(#)root/tree:$Id: TBranchSTL.h 21867 2008-01-28 08:34:00Z brun $ | | // @(#)root/tree:$Id: TBranchSTL.h 31252 2009-11-17 20:12:32Z pcanal $ | |
| // author: Lukasz Janyst <ljanyst@cern.ch> | | // author: Lukasz Janyst <ljanyst@cern.ch> | |
| | | | |
| //-------------------------------------------------------------------------
----- | | //-------------------------------------------------------------------------
----- | |
| // file: TBranchSTL.h | | // file: TBranchSTL.h | |
| //-------------------------------------------------------------------------
----- | | //-------------------------------------------------------------------------
----- | |
| | | | |
| #ifndef ROOT_TBranchSTL | | #ifndef ROOT_TBranchSTL | |
| #define ROOT_TBranchSTL | | #define ROOT_TBranchSTL | |
| | | | |
| #include "TBranch.h" | | #include "TBranch.h" | |
| | | | |
| skipping to change at line 37 | | skipping to change at line 37 | |
| Int_t buffsize, Int_t splitlevel ); | | Int_t buffsize, Int_t splitlevel ); | |
| TBranchSTL( TBranch* parent, const char* name, | | TBranchSTL( TBranch* parent, const char* name, | |
| TVirtualCollectionProxy* collProxy, | | TVirtualCollectionProxy* collProxy, | |
| Int_t buffsize, Int_t splitlevel, | | Int_t buffsize, Int_t splitlevel, | |
| TStreamerInfo* info, Int_t id ); | | TStreamerInfo* info, Int_t id ); | |
| virtual ~TBranchSTL(); | | virtual ~TBranchSTL(); | |
| virtual void Browse( TBrowser *b ); | | virtual void Browse( TBrowser *b ); | |
| virtual Bool_t IsFolder() const; | | virtual Bool_t IsFolder() const; | |
| virtual Int_t Fill(); | | virtual Int_t Fill(); | |
| virtual void FillLeaves( TBuffer& b ); | | virtual void FillLeaves( TBuffer& b ); | |
|
| | | virtual const char *GetClassName() const { return fClassName.Data(
); } | |
| virtual Int_t GetEntry( Long64_t entry = 0, Int_t getall = 0
); | | virtual Int_t GetEntry( Long64_t entry = 0, Int_t getall = 0
); | |
|
| virtual TStreamerInfo* GetInfo(); | | virtual TStreamerInfo *GetInfo() const; | |
| | | virtual void Print(Option_t*) const; | |
| virtual void ReadLeaves( TBuffer& b ); | | virtual void ReadLeaves( TBuffer& b ); | |
| virtual void SetAddress( void* addr ); | | virtual void SetAddress( void* addr ); | |
| | | | |
| ClassDef( TBranchSTL, 1 ) //Branch handling STL collection of pointer
s | | ClassDef( TBranchSTL, 1 ) //Branch handling STL collection of pointer
s | |
| | | | |
| private: | | private: | |
| | | | |
| #ifndef __CINT__ | | #ifndef __CINT__ | |
| struct ElementBranchHelper_t | | struct ElementBranchHelper_t | |
| { | | { | |
| | | | |
| skipping to change at line 71 | | skipping to change at line 73 | |
| BranchMap_t fBranchMap; //! Branch map | | BranchMap_t fBranchMap; //! Branch map | |
| std::vector<ElementBranchHelper_t> fBranchVector; //! Branch vector | | std::vector<ElementBranchHelper_t> fBranchVector; //! Branch vector | |
| #endif // __CINT__ | | #endif // __CINT__ | |
| | | | |
| TVirtualCollectionProxy* fCollProxy; //! Collection proxy | | TVirtualCollectionProxy* fCollProxy; //! Collection proxy | |
| TBranch* fParent; //! Parent of this branch | | TBranch* fParent; //! Parent of this branch | |
| TClass* fIndArrayCl; //! Class of the ind array | | TClass* fIndArrayCl; //! Class of the ind array | |
| TIndArray fInd; //! Indices | | TIndArray fInd; //! Indices | |
| TString fContName; // Class name of referenced
object | | TString fContName; // Class name of referenced
object | |
| TString fClassName; // Name of the parent class,
if we're the data member | | TString fClassName; // Name of the parent class,
if we're the data member | |
|
| Int_t fClassVersion; // Version number of the cla
ss | | mutable Int_t fClassVersion; // Version number of the cla
ss | |
| UInt_t fClCheckSum; // Class checksum | | UInt_t fClCheckSum; // Class checksum | |
|
| TStreamerInfo* fInfo; //! The streamer info | | mutable TStreamerInfo *fInfo; //! The streamer info | |
| char* fObject; //! Pointer to object at addr
ess or the | | char* fObject; //! Pointer to object at addr
ess or the | |
| Int_t fID; // Element serial number in
the streamer info | | Int_t fID; // Element serial number in
the streamer info | |
| }; | | }; | |
| | | | |
| #endif // ROOT_TBranchSTL | | #endif // ROOT_TBranchSTL | |
| | | | |
End of changes. 5 change blocks. |
| 4 lines changed or deleted | | 6 lines changed or added | |
|
| TBrowserImp.h | | TBrowserImp.h | |
|
| // @(#)root/base:$Id: TBrowserImp.h 20877 2007-11-19 11:17:07Z rdm $ | | // @(#)root/base:$Id: TBrowserImp.h 30884 2009-10-27 12:26:33Z rdm $ | |
| // Author: Fons Rademakers 15/11/95 | | // Author: Fons Rademakers 15/11/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 28 | | skipping to change at line 28 | |
| // // | | // // | |
| // ABC describing GUI independent browser implementation protocol. // | | // ABC describing GUI independent browser implementation protocol. // | |
| // // | | // // | |
| ////////////////////////////////////////////////////////////////////////// | | ////////////////////////////////////////////////////////////////////////// | |
| | | | |
| #ifndef ROOT_TObject | | #ifndef ROOT_TObject | |
| #include "TObject.h" | | #include "TObject.h" | |
| #endif | | #endif | |
| | | | |
| class TBrowser; | | class TBrowser; | |
|
| | | class TGMainFrame; | |
| | | | |
| class TBrowserImp { | | class TBrowserImp { | |
| | | | |
| protected: | | protected: | |
| TBrowser *fBrowser; //TBrowser associated with this implementation | | TBrowser *fBrowser; //TBrowser associated with this implementation | |
| Bool_t fShowCycles; //Show object cycle numbers in browser | | Bool_t fShowCycles; //Show object cycle numbers in browser | |
| | | | |
| TBrowserImp(const TBrowserImp& br) | | TBrowserImp(const TBrowserImp& br) | |
| : fBrowser(br.fBrowser), fShowCycles(br.fShowCycles) { } | | : fBrowser(br.fBrowser), fShowCycles(br.fShowCycles) { } | |
| TBrowserImp& operator=(const TBrowserImp& br) | | TBrowserImp& operator=(const TBrowserImp& br) | |
| | | | |
| skipping to change at line 66 | | skipping to change at line 67 | |
| virtual void Refresh(Bool_t = kFALSE) { } | | virtual void Refresh(Bool_t = kFALSE) { } | |
| virtual void Show() { } | | virtual void Show() { } | |
| virtual void SetDrawOption(Option_t *option=""); | | virtual void SetDrawOption(Option_t *option=""); | |
| virtual Option_t *GetDrawOption() const { return 0; } | | virtual Option_t *GetDrawOption() const { return 0; } | |
| | | | |
| virtual Long_t ExecPlugin(const char *, const char *, const char *, I
nt_t, Int_t) { return 0; } | | virtual Long_t ExecPlugin(const char *, const char *, const char *, I
nt_t, Int_t) { return 0; } | |
| virtual void SetStatusText(const char *, Int_t) { } | | virtual void SetStatusText(const char *, Int_t) { } | |
| virtual void StartEmbedding(Int_t, Int_t) { } | | virtual void StartEmbedding(Int_t, Int_t) { } | |
| virtual void StopEmbedding(const char *) { } | | virtual void StopEmbedding(const char *) { } | |
| | | | |
|
| | | virtual TGMainFrame *GetMainFrame() const { return 0; } | |
| | | | |
| virtual TBrowser *GetBrowser() const { return fBrowser; } | | virtual TBrowser *GetBrowser() const { return fBrowser; } | |
| virtual void SetBrowser(TBrowser *b) { fBrowser = b; } | | virtual void SetBrowser(TBrowser *b) { fBrowser = b; } | |
| | | | |
| ClassDef(TBrowserImp,0) //ABC describing browser implementation protoco
l | | ClassDef(TBrowserImp,0) //ABC describing browser implementation protoco
l | |
| }; | | }; | |
| | | | |
| inline TBrowserImp::TBrowserImp(TBrowser *, const char *, UInt_t, UInt_t, O
ption_t *) | | inline TBrowserImp::TBrowserImp(TBrowser *, const char *, UInt_t, UInt_t, O
ption_t *) | |
| : fBrowser(0), fShowCycles(kFALSE) { } | | : fBrowser(0), fShowCycles(kFALSE) { } | |
| inline TBrowserImp::TBrowserImp(TBrowser *, const char *, Int_t, Int_t, UIn
t_t, UInt_t, Option_t *) | | inline TBrowserImp::TBrowserImp(TBrowser *, const char *, Int_t, Int_t, UIn
t_t, UInt_t, Option_t *) | |
| : fBrowser(0), fShowCycles(kFALSE) { } | | : fBrowser(0), fShowCycles(kFALSE) { } | |
| | | | |
End of changes. 3 change blocks. |
| 1 lines changed or deleted | | 4 lines changed or added | |
|
| TDocParser.h | | TDocParser.h | |
|
| // @(#)root/html:$Id: TDocParser.h 27897 2009-03-20 13:27:04Z axel $ | | // @(#)root/html:$Id: TDocParser.h 31111 2009-11-12 09:57:56Z axel $ | |
| // Author: Axel Naumann 2007-01-09 | | // Author: Axel Naumann 2007-01-09 | |
| | | | |
| /************************************************************************* | | /************************************************************************* | |
| * 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 46 | | skipping to change at line 46 | |
| #ifndef ROOT_Riosfwd | | #ifndef ROOT_Riosfwd | |
| #include "Riosfwd.h" | | #include "Riosfwd.h" | |
| #endif | | #endif | |
| | | | |
| class TBaseClass; | | class TBaseClass; | |
| class TClass; | | class TClass; | |
| class TClassDocOutput; | | class TClassDocOutput; | |
| class TDocOutput; | | class TDocOutput; | |
| class THtml; | | class THtml; | |
| | | | |
|
| | | class TDocMethodWrapper: public TObject { | |
| | | public: | |
| | | virtual TMethod* GetMethod() const = 0; | |
| | | virtual Int_t GetOverloadIdx() const = 0; | |
| | | }; | |
| | | | |
| class TDocParser: public TObject { | | class TDocParser: public TObject { | |
| protected: | | protected: | |
| enum EDocContext { | | enum EDocContext { | |
| kIgnore, | | kIgnore, | |
| kDocFunc, | | kDocFunc, | |
| kDocClass, | | kDocClass, | |
| kNumDocContexts | | kNumDocContexts | |
| }; | | }; | |
| | | | |
| public: | | public: | |
| | | | |
| skipping to change at line 83 | | skipping to change at line 89 | |
| kDirective, | | kDirective, | |
| kString, | | kString, | |
| kKeyword, | | kKeyword, | |
| kCPP, | | kCPP, | |
| kVerbatim, | | kVerbatim, | |
| kNumParseContexts, | | kNumParseContexts, | |
| kParseContextMask = BIT(4) - 1 | | kParseContextMask = BIT(4) - 1 | |
| }; | | }; | |
| enum EParseContextFlag { | | enum EParseContextFlag { | |
| kCXXComment = BIT(4), // kComment is a C++ comment, or macro/html/lat
ex content is surrounded by /* */ | | kCXXComment = BIT(4), // kComment is a C++ comment, or macro/html/lat
ex content is surrounded by /* */ | |
|
| kParseContextFlagMask = ~(BIT(4) - 1) | | kParseContextFlagMask = (UInt_t)(~(BIT(4) - 1)) | |
| | | | |
| }; | | | |
| | | | |
|
| class TMethodWrapper: public TObject { | | | |
| public: | | | |
| virtual const TMethod* GetMethod() const = 0; | | | |
| }; | | }; | |
| | | | |
| protected: | | protected: | |
| THtml* fHtml; // THtml object using us | | THtml* fHtml; // THtml object using us | |
| TDocOutput* fDocOutput; // TDocOutput invoking us | | TDocOutput* fDocOutput; // TDocOutput invoking us | |
| UInt_t fLineNo; // current line number | | UInt_t fLineNo; // current line number | |
| TString fLineRaw; // current line | | TString fLineRaw; // current line | |
| TString fLineStripped; // current line without surrounding spa
ces | | TString fLineStripped; // current line without surrounding spa
ces | |
| TString fLineComment; // current line with links and dire
ctives for doc | | TString fLineComment; // current line with links and dire
ctives for doc | |
| TString fLineSource; // current line with links | | TString fLineSource; // current line with links | |
| TString fComment; // current comment | | TString fComment; // current comment | |
| TString fFirstClassDoc; // first class-doc found - per file, ta
ken if fLastClassDoc is empty | | TString fFirstClassDoc; // first class-doc found - per file, ta
ken if fLastClassDoc is empty | |
| TString fLastClassDoc; // last class-doc found - becomes class
doc at ClassImp or first method | | TString fLastClassDoc; // last class-doc found - becomes class
doc at ClassImp or first method | |
| TClass* fCurrentClass; // current class context of sources bei
ng parsed | | TClass* fCurrentClass; // current class context of sources bei
ng parsed | |
| TClass* fRecentClass; // recently seen class context of sourc
es being parsed, e.g. for Convert() | | TClass* fRecentClass; // recently seen class context of sourc
es being parsed, e.g. for Convert() | |
| TString fCurrentModule; // current module context of sources be
ing parsed | | TString fCurrentModule; // current module context of sources be
ing parsed | |
| TString fCurrentMethodTag;// name_idx of the currently parsed met
hod | | TString fCurrentMethodTag;// name_idx of the currently parsed met
hod | |
| Int_t fDirectiveCount; // index of directive for current metho
d | | Int_t fDirectiveCount; // index of directive for current metho
d | |
| Long_t fLineNumber; // source line number | | Long_t fLineNumber; // source line number | |
| TString fCurrentFile; // current source / header file name | | TString fCurrentFile; // current source / header file name | |
|
| std::map<std::string /*name*/, Int_t > fMethodCounts; // current cla
ss's method names | | std::map<std::string /*name*/, Int_t > fMethodCounts; // number of u
ndocumented overloads | |
| EDocContext fDocContext; // current context of parsed sources fo
r documenting | | EDocContext fDocContext; // current context of parsed sources fo
r documenting | |
| std::list<UInt_t> fParseContext; // current context of parsed sources | | std::list<UInt_t> fParseContext; // current context of parsed sources | |
| Bool_t fCheckForMethod; // whether to check the current line fo
r a method | | Bool_t fCheckForMethod; // whether to check the current line fo
r a method | |
| enum { | | enum { | |
| kClassDoc_Uninitialized, | | kClassDoc_Uninitialized, | |
| kClassDoc_LookingNothingFound, | | kClassDoc_LookingNothingFound, | |
| kClassDoc_LookingHaveSomething, | | kClassDoc_LookingHaveSomething, | |
| kClassDoc_Written, | | kClassDoc_Written, | |
| kClassDoc_Ignore, | | kClassDoc_Ignore, | |
| kClassDoc_NumStates | | kClassDoc_NumStates | |
| | | | |
End of changes. 5 change blocks. |
| 8 lines changed or deleted | | 9 lines changed or added | |
|
| TEveCalo.h | | TEveCalo.h | |
|
| // @(#)root/eve:$Id: TEveCalo.h 30384 2009-09-23 17:54:23Z matevz $ | | // @(#)root/eve:$Id: TEveCalo.h 31075 2009-11-10 20:03:38Z 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 39 | | skipping to change at line 39 | |
| public TAttBBox, | | public TAttBBox, | |
| public TEveProjectable | | public TEveProjectable | |
| { | | { | |
| friend class TEveCaloVizEditor; | | friend class TEveCaloVizEditor; | |
| | | | |
| private: | | private: | |
| TEveCaloViz(const TEveCaloViz&); // Not implemented | | TEveCaloViz(const TEveCaloViz&); // Not implemented | |
| TEveCaloViz& operator=(const TEveCaloViz&); // Not implemented | | TEveCaloViz& operator=(const TEveCaloViz&); // Not implemented | |
| | | | |
| protected: | | protected: | |
|
| TEveCaloData* fData; // event data reference | | TEveCaloData* fData; // event data reference | |
| | | Bool_t fCellIdCacheOK; // data cell ids cache state | |
| | | | |
| Double_t fEtaMin; | | Double_t fEtaMin; | |
| Double_t fEtaMax; | | Double_t fEtaMax; | |
| | | | |
| Double_t fPhi; | | Double_t fPhi; | |
| Double_t fPhiOffset; // phi range +/- offset | | Double_t fPhiOffset; // phi range +/- offset | |
| | | | |
| Bool_t fAutoRange; // set eta phi limits on DataChanged() | | Bool_t fAutoRange; // set eta phi limits on DataChanged() | |
| | | | |
| Float_t fBarrelRadius; // barrel raidus in cm | | Float_t fBarrelRadius; // barrel raidus in cm | |
| | | | |
| skipping to change at line 61 | | skipping to change at line 62 | |
| | | | |
| Float_t fPlotEt; // plot E or Et. | | Float_t fPlotEt; // plot E or Et. | |
| | | | |
| Float_t fMaxTowerH; // bounding box z dimesion | | Float_t fMaxTowerH; // bounding box z dimesion | |
| Bool_t fScaleAbs; | | Bool_t fScaleAbs; | |
| Float_t fMaxValAbs; | | Float_t fMaxValAbs; | |
| | | | |
| Bool_t fValueIsColor; // Interpret signal value as RGBA col
or. | | Bool_t fValueIsColor; // Interpret signal value as RGBA col
or. | |
| TEveRGBAPalette* fPalette; // Pointer to signal-color palette. | | TEveRGBAPalette* fPalette; // Pointer to signal-color palette. | |
| | | | |
|
| Bool_t fCellIdCacheOK; // Flag cell ids cache state | | | |
| | | | |
| void AssignCaloVizParameters(TEveCaloViz* cv); | | void AssignCaloVizParameters(TEveCaloViz* cv); | |
| | | | |
| void SetupColorHeight(Float_t value, Int_t slice, Float_t& height) const
; | | void SetupColorHeight(Float_t value, Int_t slice, Float_t& height) const
; | |
| | | | |
| virtual void BuildCellIdCache() = 0; | | virtual void BuildCellIdCache() = 0; | |
| | | | |
| public: | | public: | |
| TEveCaloViz(TEveCaloData* data=0, const char* n="TEveCaloViz", const cha
r* t=""); | | TEveCaloViz(TEveCaloData* data=0, const char* n="TEveCaloViz", const cha
r* t=""); | |
| | | | |
| virtual ~TEveCaloViz(); | | virtual ~TEveCaloViz(); | |
| | | | |
|
| TEveCaloData* GetData() const { return fData; } | | virtual TEveElement* ForwardSelection(); | |
| virtual void SetData(TEveCaloData* d); | | virtual TEveElement* ForwardEdit(); | |
| virtual void DataChanged(); | | | |
| | | virtual void Paint(Option_t* option=""); | |
| | | | |
|
| | | virtual TClass* ProjectedClass(const TEveProjection* p) const; | |
| virtual Float_t GetValToHeight() const; | | virtual Float_t GetValToHeight() const; | |
|
| | | virtual void CellSelectionChanged() {} | |
| | | | |
| | | TEveCaloData* GetData() const { return fData; } | |
| | | void SetData(TEveCaloData* d); | |
| | | void DataChanged(); Float_t GetMaxVal() const; | |
| | | | |
| | | void AssertCellIdCache() const; | |
| | | void InvalidateCellIdCache() { fCellIdCacheOK=kFALSE; ResetBBox(); }; | |
| | | | |
| Float_t GetDataSliceThreshold(Int_t slice) const; | | Float_t GetDataSliceThreshold(Int_t slice) const; | |
| void SetDataSliceThreshold(Int_t slice, Float_t val); | | void SetDataSliceThreshold(Int_t slice, Float_t val); | |
| Color_t GetDataSliceColor(Int_t slice) const; | | Color_t GetDataSliceColor(Int_t slice) const; | |
| void SetDataSliceColor(Int_t slice, Color_t col); | | void SetDataSliceColor(Int_t slice, Color_t col); | |
| | | | |
| Float_t GetBarrelRadius() const { return fBarrelRadius; } | | Float_t GetBarrelRadius() const { return fBarrelRadius; } | |
| void SetBarrelRadius(Float_t r) { fBarrelRadius = r; ResetBBox(); } | | void SetBarrelRadius(Float_t r) { fBarrelRadius = r; ResetBBox(); } | |
| Float_t GetEndCapPos () const { return fEndCapPos; } | | Float_t GetEndCapPos () const { return fEndCapPos; } | |
| void SetEndCapPos (Float_t z) { fEndCapPos = z; ResetBBox(); } | | void SetEndCapPos (Float_t z) { fEndCapPos = z; ResetBBox(); } | |
| | | | |
| Bool_t GetPlotEt() const { return fPlotEt; } | | Bool_t GetPlotEt() const { return fPlotEt; } | |
|
| virtual void SetPlotEt(Bool_t x); | | void SetPlotEt(Bool_t x); | |
| | | | |
| void SetMaxTowerH(Float_t x) { fMaxTowerH = x; } | | void SetMaxTowerH(Float_t x) { fMaxTowerH = x; } | |
| Float_t GetMaxTowerH() const { return fMaxTowerH; } | | Float_t GetMaxTowerH() const { return fMaxTowerH; } | |
| void SetScaleAbs(Bool_t x) { fScaleAbs = x; } | | void SetScaleAbs(Bool_t x) { fScaleAbs = x; } | |
| Bool_t GetScaleAbs() const { return fScaleAbs; } | | Bool_t GetScaleAbs() const { return fScaleAbs; } | |
| void SetMaxValAbs(Float_t x) { fMaxValAbs = x; } | | void SetMaxValAbs(Float_t x) { fMaxValAbs = x; } | |
| Float_t GetMaxValAbs() const { return fMaxValAbs; } | | Float_t GetMaxValAbs() const { return fMaxValAbs; } | |
| | | | |
|
| Float_t GetMaxVal() const; | | | |
| | | | |
| Float_t GetTransitionEta() const; | | Float_t GetTransitionEta() const; | |
| Float_t GetTransitionTheta() const; | | Float_t GetTransitionTheta() const; | |
| | | | |
| TEveRGBAPalette* GetPalette() const { return fPalette; } | | TEveRGBAPalette* GetPalette() const { return fPalette; } | |
| void SetPalette(TEveRGBAPalette* p); | | void SetPalette(TEveRGBAPalette* p); | |
|
| | | | |
| TEveRGBAPalette* AssertPalette(); | | TEveRGBAPalette* AssertPalette(); | |
|
| | | Bool_t GetValueIsColor() const { return fValueIsColor;} | |
| | | void SetValueIsColor(Bool_t x) { fValueIsColor = x;} | |
| | | | |
|
| Bool_t GetValueIsColor() const { return fValueIsColor;} | | Bool_t GetAutoRange() const { return fAutoRange; } | |
| void SetValueIsColor(Bool_t x) { fValueIsColor = x;} | | void SetAutoRange(Bool_t x) { fAutoRange = x; } | |
| | | | |
| void SetEta(Float_t l, Float_t u); | | void SetEta(Float_t l, Float_t u); | |
| Float_t GetEta() const { return 0.5f*(fEtaMin+fEtaMax); } | | Float_t GetEta() const { return 0.5f*(fEtaMin+fEtaMax); } | |
| Float_t GetEtaMin() const { return fEtaMin; } | | Float_t GetEtaMin() const { return fEtaMin; } | |
| Float_t GetEtaMax() const { return fEtaMax; } | | Float_t GetEtaMax() const { return fEtaMax; } | |
| Float_t GetEtaRng() const { return fEtaMax-fEtaMin; } | | Float_t GetEtaRng() const { return fEtaMax-fEtaMin; } | |
| | | | |
|
| virtual void SetPhi(Float_t phi) { SetPhiWithRng(phi, fPhiOffset); } | | void SetPhi(Float_t phi) { SetPhiWithRng(phi, fPhiOffset); } | |
| virtual void SetPhiRng(Float_t rng) { SetPhiWithRng(fPhi, rng); } | | void SetPhiRng(Float_t rng) { SetPhiWithRng(fPhi, rng); } | |
| virtual void SetPhiWithRng(Float_t x, Float_t r); | | void SetPhiWithRng(Float_t x, Float_t r); | |
| Float_t GetPhi() const { return fPhi; } | | Float_t GetPhi() const { return fPhi; } | |
| Float_t GetPhiMin() const { return fPhi-fPhiOffset; } | | Float_t GetPhiMin() const { return fPhi-fPhiOffset; } | |
| Float_t GetPhiMax() const { return fPhi+fPhiOffset; } | | Float_t GetPhiMax() const { return fPhi+fPhiOffset; } | |
| Float_t GetPhiRng() const { return 2.0f*fPhiOffset; } | | Float_t GetPhiRng() const { return 2.0f*fPhiOffset; } | |
| | | | |
|
| Bool_t GetAutoRange() const { return fAutoRange; } | | Bool_t CellInEtaPhiRng (TEveCaloData::CellData_t&) const; | |
| void SetAutoRange(Bool_t x) { fAutoRange = x; } | | | |
| | | | |
| void InvalidateCellIdCache() { fCellIdCacheOK=kFALSE; ResetBBox(); } | | | |
| | | | |
| virtual void Paint(Option_t* option=""); | | | |
| | | | |
| virtual TClass* ProjectedClass() const; | | | |
| | | | |
| ClassDef(TEveCaloViz, 0); // Base-class for visualization of calorimeter
eventdata. | | ClassDef(TEveCaloViz, 0); // Base-class for visualization of calorimeter
eventdata. | |
| }; | | }; | |
| | | | |
| /**************************************************************************
/ | | /**************************************************************************
/ | |
| /**************************************************************************
/ | | /**************************************************************************
/ | |
| | | | |
| class TEveCalo3D : public TEveCaloViz | | class TEveCalo3D : public TEveCaloViz | |
| { | | { | |
| friend class TEveCalo3DGL; | | friend class TEveCalo3DGL; | |
| private: | | private: | |
| TEveCalo3D(const TEveCalo3D&); // Not implemented | | TEveCalo3D(const TEveCalo3D&); // Not implemented | |
| TEveCalo3D& operator=(const TEveCalo3D&); // Not implemented | | TEveCalo3D& operator=(const TEveCalo3D&); // Not implemented | |
| | | | |
| protected: | | protected: | |
| TEveCaloData::vCellId_t fCellList; | | TEveCaloData::vCellId_t fCellList; | |
|
| | | TEveCaloData::vCellId_t fCellListSelected; | |
| | | | |
| Bool_t fRnrEndCapFrame; | | Bool_t fRnrEndCapFrame; | |
| Bool_t fRnrBarrelFrame; | | Bool_t fRnrBarrelFrame; | |
| | | | |
| Color_t fFrameColor; | | Color_t fFrameColor; | |
| UChar_t fFrameTransparency; | | UChar_t fFrameTransparency; | |
| | | | |
| virtual void BuildCellIdCache(); | | virtual void BuildCellIdCache(); | |
| | | | |
| public: | | public: | |
| TEveCalo3D(TEveCaloData* d=0, const char* n="TEveCalo3D", const char* t=
"xx"); | | TEveCalo3D(TEveCaloData* d=0, const char* n="TEveCalo3D", const char* t=
"xx"); | |
| virtual ~TEveCalo3D() {} | | virtual ~TEveCalo3D() {} | |
| virtual void ComputeBBox(); | | virtual void ComputeBBox(); | |
| | | | |
| virtual Bool_t CanEditMainColor() const { return kTRUE; } | | virtual Bool_t CanEditMainColor() const { return kTRUE; } | |
| virtual Bool_t CanEditMainTransparency() const { return kTRUE; } | | virtual Bool_t CanEditMainTransparency() const { return kTRUE; } | |
| | | | |
| void SetRnrFrame(Bool_t e, Bool_t b) { fRnrEndCapFrame = e; fRnr
BarrelFrame = b; } | | void SetRnrFrame(Bool_t e, Bool_t b) { fRnrEndCapFrame = e; fRnr
BarrelFrame = b; } | |
| void GetRnrFrame(Bool_t &e, Bool_t &b) const { e = fRnrEndCapFrame; b =
fRnrBarrelFrame; } | | void GetRnrFrame(Bool_t &e, Bool_t &b) const { e = fRnrEndCapFrame; b =
fRnrBarrelFrame; } | |
| | | | |
|
| virtual void SetFrameTransparency(UChar_t x) { fFrameTransparency = x; } | | void SetFrameTransparency(UChar_t x) { fFrameTransparency = x; } | |
| UChar_t GetFrameTransparency() const { return fFrameTransparency; } | | UChar_t GetFrameTransparency() const { return fFrameTransparency; } | |
| | | | |
| ClassDef(TEveCalo3D, 0); // Class for 3D visualization of calorimeter ev
ent data. | | ClassDef(TEveCalo3D, 0); // Class for 3D visualization of calorimeter ev
ent data. | |
| }; | | }; | |
| | | | |
| /**************************************************************************
/ | | /**************************************************************************
/ | |
| /**************************************************************************
/ | | /**************************************************************************
/ | |
| | | | |
| class TEveCalo2D : public TEveCaloViz, | | class TEveCalo2D : public TEveCaloViz, | |
| public TEveProjected | | public TEveProjected | |
| { | | { | |
| friend class TEveCalo2DGL; | | friend class TEveCalo2DGL; | |
|
| | | | |
| | | typedef std::vector<TEveCaloData::vCellId_t*> vBinCells_t; | |
| | | typedef std::vector<TEveCaloData::vCellId_t*>::iterator vBinCells_i; | |
| | | | |
| private: | | private: | |
| TEveCalo2D(const TEveCalo2D&); // Not implemented | | TEveCalo2D(const TEveCalo2D&); // Not implemented | |
| TEveCalo2D& operator=(const TEveCalo2D&); // Not implemented | | TEveCalo2D& operator=(const TEveCalo2D&); // Not implemented | |
| | | | |
| TEveProjection::EPType_e fOldProjectionType; | | TEveProjection::EPType_e fOldProjectionType; | |
| | | | |
| protected: | | protected: | |
| std::vector<TEveCaloData::vCellId_t*> fCellLists; | | std::vector<TEveCaloData::vCellId_t*> fCellLists; | |
|
| std::vector<Int_t> fBinIds; | | | |
| | | std::vector<TEveCaloData::vCellId_t*> fCellListsSelected; | |
| | | std::vector<Int_t> fBinIdsSelected; | |
| | | | |
| | | Float_t fMaxESumBin; | |
| | | Float_t fMaxEtSumBin; | |
| | | | |
| virtual void BuildCellIdCache(); | | virtual void BuildCellIdCache(); | |
| | | | |
|
| | | virtual void SetDepthLocal(Float_t x) { fDepth = x; } | |
| | | | |
| public: | | public: | |
| TEveCalo2D(const char* n="TEveCalo2D", const char* t=""); | | TEveCalo2D(const char* n="TEveCalo2D", const char* t=""); | |
| virtual ~TEveCalo2D(); | | virtual ~TEveCalo2D(); | |
| | | | |
| virtual void SetProjection(TEveProjectionManager* proj, TEveProjectable*
model); | | virtual void SetProjection(TEveProjectionManager* proj, TEveProjectable*
model); | |
| virtual void UpdateProjection(); | | virtual void UpdateProjection(); | |
|
| virtual void SetDepth(Float_t x){fDepth = x;} | | | |
| | | | |
| virtual void ComputeBBox(); | | virtual void ComputeBBox(); | |
| | | | |
|
| | | virtual void CellSelectionChanged(); | |
| | | | |
| | | virtual Float_t GetValToHeight() const; | |
| | | | |
| ClassDef(TEveCalo2D, 0); // Class for visualization of projected calorim
eter event data. | | ClassDef(TEveCalo2D, 0); // Class for visualization of projected calorim
eter event data. | |
| }; | | }; | |
| /**************************************************************************
/ | | /**************************************************************************
/ | |
| /**************************************************************************
/ | | /**************************************************************************
/ | |
| | | | |
| class TEveCaloLego : public TEveCaloViz | | class TEveCaloLego : public TEveCaloViz | |
| { | | { | |
| friend class TEveCaloLegoGL; | | friend class TEveCaloLegoGL; | |
| friend class TEveCaloLegoOverlay; | | friend class TEveCaloLegoOverlay; | |
| | | | |
| public: | | public: | |
| enum EProjection_e { kAuto, k3D, k2D }; | | enum EProjection_e { kAuto, k3D, k2D }; | |
|
| enum E2DMode_e { kValColor, kValSize }; | | enum E2DMode_e { kValColor, kValSize, kValSizeOutline }; | |
| enum EBoxMode_e { kNone, kFrontBack, kBack}; | | enum EBoxMode_e { kNone, kFrontBack, kBack}; | |
| | | | |
| private: | | private: | |
| TEveCaloLego(const TEveCaloLego&); // Not implemented | | TEveCaloLego(const TEveCaloLego&); // Not implemented | |
| TEveCaloLego& operator=(const TEveCaloLego&); // Not implemented | | TEveCaloLego& operator=(const TEveCaloLego&); // Not implemented | |
| | | | |
| protected: | | protected: | |
| TEveCaloData::vCellId_t fCellList; | | TEveCaloData::vCellId_t fCellList; | |
| | | | |
| Color_t fFontColor; | | Color_t fFontColor; | |
| | | | |
| skipping to change at line 246 | | skipping to change at line 263 | |
| Int_t fPixelsPerBin; | | Int_t fPixelsPerBin; | |
| Bool_t fNormalizeRebin; | | Bool_t fNormalizeRebin; | |
| | | | |
| EProjection_e fProjection; | | EProjection_e fProjection; | |
| E2DMode_e f2DMode; | | E2DMode_e f2DMode; | |
| EBoxMode_e fBoxMode; // additional scale info | | EBoxMode_e fBoxMode; // additional scale info | |
| | | | |
| Bool_t fDrawHPlane; | | Bool_t fDrawHPlane; | |
| Float_t fHPlaneVal; | | Float_t fHPlaneVal; | |
| | | | |
|
| Int_t fTowerPicked; | | | |
| Int_t fBinStep; | | Int_t fBinStep; | |
| | | | |
| Int_t fDrawNumberCellPixels; | | Int_t fDrawNumberCellPixels; | |
| Int_t fCellPixelFontSize; | | Int_t fCellPixelFontSize; | |
| | | | |
| virtual void BuildCellIdCache(); | | virtual void BuildCellIdCache(); | |
| | | | |
| public: | | public: | |
| TEveCaloLego(TEveCaloData* data=0, const char* n="TEveCaloLego", const c
har* t=""); | | TEveCaloLego(TEveCaloData* data=0, const char* n="TEveCaloLego", const c
har* t=""); | |
|
| | | | |
| virtual ~TEveCaloLego(){} | | virtual ~TEveCaloLego(){} | |
| | | | |
|
| | | virtual void ComputeBBox(); | |
| virtual void SetData(TEveCaloData* d); | | virtual void SetData(TEveCaloData* d); | |
| | | | |
| Color_t GetFontColor() const { return fFontColor; } | | Color_t GetFontColor() const { return fFontColor; } | |
| void SetFontColor(Color_t ci) { fFontColor=ci; } | | void SetFontColor(Color_t ci) { fFontColor=ci; } | |
| | | | |
| Color_t GetGridColor() const { return fGridColor; } | | Color_t GetGridColor() const { return fGridColor; } | |
| void SetGridColor(Color_t ci) { fGridColor=ci; } | | void SetGridColor(Color_t ci) { fGridColor=ci; } | |
| | | | |
| Color_t GetPlaneColor() const { return fPlaneColor; } | | Color_t GetPlaneColor() const { return fPlaneColor; } | |
| void SetPlaneColor(Color_t ci) { fPlaneColor=ci; } | | void SetPlaneColor(Color_t ci) { fPlaneColor=ci; } | |
| | | | |
| skipping to change at line 300 | | skipping to change at line 316 | |
| | | | |
| void SetBoxMode(EBoxMode_e p) { fBoxMode = p; } | | void SetBoxMode(EBoxMode_e p) { fBoxMode = p; } | |
| EBoxMode_e GetBoxMode() { return fBoxMode; } | | EBoxMode_e GetBoxMode() { return fBoxMode; } | |
| | | | |
| Bool_t GetDrawHPlane() const { return fDrawHPlane; } | | Bool_t GetDrawHPlane() const { return fDrawHPlane; } | |
| void SetDrawHPlane(Bool_t s) { fDrawHPlane = s;} | | void SetDrawHPlane(Bool_t s) { fDrawHPlane = s;} | |
| | | | |
| Float_t GetHPlaneVal() const { return fHPlaneVal; } | | Float_t GetHPlaneVal() const { return fHPlaneVal; } | |
| void SetHPlaneVal(Float_t s) { fHPlaneVal = s;} | | void SetHPlaneVal(Float_t s) { fHPlaneVal = s;} | |
| | | | |
|
| Int_t GetTowerPicked() const { return fTowerPicked; } | | | |
| void SetTowerPicked(Int_t p) { fTowerPicked = p;} | | | |
| | | | |
| Int_t GetDrawNumberCellPixels() { return fDrawNumberCellPixels; } | | Int_t GetDrawNumberCellPixels() { return fDrawNumberCellPixels; } | |
| void SetDrawNumberCellPixels(Int_t x) { fDrawNumberCellPixels = x; } | | void SetDrawNumberCellPixels(Int_t x) { fDrawNumberCellPixels = x; } | |
| Int_t GetCellPixelFontSize() { return fCellPixelFontSize; } | | Int_t GetCellPixelFontSize() { return fCellPixelFontSize; } | |
| void SetCellPixelFontSize(Int_t x) { fCellPixelFontSize = x; } | | void SetCellPixelFontSize(Int_t x) { fCellPixelFontSize = x; } | |
| | | | |
|
| virtual void ComputeBBox(); | | | |
| | | | |
| ClassDef(TEveCaloLego, 0); // Class for visualization of calorimeter hi
stogram data. | | ClassDef(TEveCaloLego, 0); // Class for visualization of calorimeter hi
stogram data. | |
| }; | | }; | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 26 change blocks. |
| 35 lines changed or deleted | | 46 lines changed or added | |
|
| TEveCaloData.h | | TEveCaloData.h | |
|
| // @(#)root/eve:$Id: TEveCaloData.h 29302 2009-07-02 08:37:01Z matevz $ | | // @(#)root/eve:$Id: TEveCaloData.h 31075 2009-11-10 20:03:38Z 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. * | |
| *************************************************************************/ | | *************************************************************************/ | |
| | | | |
| #ifndef ROOT_TEveCaloData | | #ifndef ROOT_TEveCaloData | |
| #define ROOT_TEveCaloData | | #define ROOT_TEveCaloData | |
| | | | |
| #include <vector> | | #include <vector> | |
|
| #include "Rtypes.h" | | #include "TEveElement.h" | |
| #include "TEveUtil.h" | | | |
| | | | |
| class TH2F; | | class TH2F; | |
| class TAxis; | | class TAxis; | |
| class THStack; | | class THStack; | |
| | | | |
|
| class TEveCaloData: public TEveRefBackPtr | | class TEveCaloData: public TEveElement, | |
| | | public TNamed | |
| { | | { | |
| public: | | public: | |
| struct SliceInfo_t | | struct SliceInfo_t | |
| { | | { | |
| TString fName; // Name of the slice, eg. ECAL, HCAL. | | TString fName; // Name of the slice, eg. ECAL, HCAL. | |
| Float_t fThreshold; // Only display towers with higher energy. | | Float_t fThreshold; // Only display towers with higher energy. | |
|
| Int_t fID; // Unique identification of the slice. | | | |
| Color_t fColor; // Color used to draw this longitudinal slice. | | Color_t fColor; // Color used to draw this longitudinal slice. | |
|
| TH2F *fHist; | | | |
| | | | |
|
| SliceInfo_t(): fName(""), fThreshold(0), fID(-1), fColor(Color_t(4)), | | SliceInfo_t(): fName(""), fThreshold(0), fColor(kRed) {} | |
| fHist(0){} | | | |
| SliceInfo_t(TH2F* h): fName(""), fThreshold(0), fID(-1), fColor(Color | | | |
| _t(4)), fHist(h) {} | | | |
| | | | |
| virtual ~SliceInfo_t() {} | | virtual ~SliceInfo_t() {} | |
| | | | |
| void Setup(const char* name, Float_t threshold, Color_t col) | | void Setup(const char* name, Float_t threshold, Color_t col) | |
| { | | { | |
| fName = name; | | fName = name; | |
| fThreshold = threshold; | | fThreshold = threshold; | |
| fColor = col; | | fColor = col; | |
| }; | | }; | |
| | | | |
| | | | |
| skipping to change at line 151 | | skipping to change at line 148 | |
| TAxis* fEtaAxis; | | TAxis* fEtaAxis; | |
| TAxis* fPhiAxis; | | TAxis* fPhiAxis; | |
| | | | |
| Bool_t fWrapTwoPi; | | 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; | |
| | | | |
|
| | | vCellId_t fCellsSelected; | |
| | | | |
| public: | | public: | |
|
| TEveCaloData(); | | TEveCaloData(const char* n="TEveCalData", const char* t=""); | |
| virtual ~TEveCaloData() {} | | virtual ~TEveCaloData() {} | |
| | | | |
|
| | | virtual void SelectElement(Bool_t state); | |
| | | virtual void FillImpliedSelectedSet(Set_t& impSelSet); | |
| | | | |
| virtual void GetCellList(Float_t etaMin, Float_t etaMax, | | virtual void GetCellList(Float_t etaMin, Float_t etaMax, | |
| Float_t phi, Float_t phiRng, | | Float_t phi, Float_t phiRng, | |
| vCellId_t &out) const = 0; | | vCellId_t &out) const = 0; | |
| | | | |
|
| | | vCellId_t& GetCellsSelected() { return fCellsSelected; } | |
| | | void PrintCellsSelected(); | |
| | | | |
| virtual void Rebin(TAxis *ax, TAxis *ay, vCellId_t &in, Bool_t et, Re
binData_t &out) const = 0; | | virtual void Rebin(TAxis *ax, TAxis *ay, vCellId_t &in, Bool_t et, Re
binData_t &out) const = 0; | |
| | | | |
| virtual void GetCellData(const CellId_t &id, CellData_t& data) const
= 0; | | virtual void GetCellData(const CellId_t &id, CellData_t& data) const
= 0; | |
| | | | |
| virtual void InvalidateUsersCellIdCache(); | | virtual void InvalidateUsersCellIdCache(); | |
| virtual void DataChanged(); | | virtual void DataChanged(); | |
|
| | | virtual void CellSelectionChanged(); | |
| | | | |
| Int_t GetNSlices() const { return fSliceInfos.size(); } | | Int_t GetNSlices() const { return fSliceInfos.size(); } | |
| SliceInfo_t& RefSliceInfo(Int_t s) { return fSliceInfos[s]; } | | SliceInfo_t& RefSliceInfo(Int_t s) { return fSliceInfos[s]; } | |
| void SetSliceThreshold(Int_t slice, Float_t threshold); | | void SetSliceThreshold(Int_t slice, Float_t threshold); | |
| Float_t GetSliceThreshold(Int_t slice) const; | | Float_t GetSliceThreshold(Int_t slice) const; | |
| void SetSliceColor(Int_t slice, Color_t col); | | void SetSliceColor(Int_t slice, Color_t col); | |
| Color_t GetSliceColor(Int_t slice) const; | | Color_t GetSliceColor(Int_t slice) const; | |
| | | | |
| virtual void GetEtaLimits(Double_t &min, Double_t &max) const = 0; | | virtual void GetEtaLimits(Double_t &min, Double_t &max) const = 0; | |
| | | | |
| | | | |
| skipping to change at line 282 | | skipping to change at line 288 | |
| | | | |
| virtual void GetCellData(const TEveCaloData::CellId_t &id, TEveCaloData:
:CellData_t& data) const; | | virtual void GetCellData(const TEveCaloData::CellId_t &id, TEveCaloData:
:CellData_t& data) const; | |
| | | | |
| virtual void GetEtaLimits(Double_t &min, Double_t &max) const; | | virtual void GetEtaLimits(Double_t &min, Double_t &max) const; | |
| virtual void GetPhiLimits(Double_t &min, Double_t &max) const; | | virtual void GetPhiLimits(Double_t &min, Double_t &max) const; | |
| | | | |
| virtual void DataChanged(); | | virtual void DataChanged(); | |
| | | | |
| THStack* GetStack() { return fHStack; } | | THStack* GetStack() { return fHStack; } | |
| | | | |
|
| | | TH2F* GetHist(Int_t slice) const; | |
| | | | |
| Int_t AddHistogram(TH2F* hist); | | Int_t AddHistogram(TH2F* hist); | |
| | | | |
| ClassDef(TEveCaloDataHist, 0); // Manages calorimeter TH2F event data. | | ClassDef(TEveCaloDataHist, 0); // Manages calorimeter TH2F event data. | |
| }; | | }; | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 12 change blocks. |
| 11 lines changed or deleted | | 17 lines changed or added | |
|
| TEveCaloLegoGL.h | | TEveCaloLegoGL.h | |
|
| // @(#)root/eve:$Id: TEveCaloLegoGL.h 30384 2009-09-23 17:54:23Z matevz $ | | // @(#)root/eve:$Id: TEveCaloLegoGL.h 30929 2009-10-30 15:18:51Z 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. * | |
| *************************************************************************/ | | *************************************************************************/ | |
| | | | |
| | | | |
| skipping to change at line 29 | | skipping to change at line 29 | |
| #include "TEveVSDStructs.h" | | #include "TEveVSDStructs.h" | |
| #include "TEveCalo.h" | | #include "TEveCalo.h" | |
| | | | |
| #include <map> | | #include <map> | |
| | | | |
| class TEveCaloLego; | | class TEveCaloLego; | |
| | | | |
| class TEveCaloLegoGL : public TGLObject | | class TEveCaloLegoGL : public TGLObject | |
| { | | { | |
| private: | | private: | |
|
| TEveCaloLegoGL(const TEveCaloLegoGL&); // Not implemented | | struct Cell2D_t | |
| TEveCaloLegoGL& operator=(const TEveCaloLegoGL&); // Not implemented | | { | |
| | | Int_t fId; | |
| mutable Float_t fDataMax; // cached | | Float_t fSumVal; | |
| | | Int_t fMaxSlice; | |
| | | | |
| | | Float_t fX0, fX1, fY0, fY1; | |
| | | | |
| | | Cell2D_t(Int_t id, Float_t sumVal, Int_t maxSlice) | |
| | | { | |
| | | fId = id; | |
| | | fSumVal = sumVal; | |
| | | fMaxSlice = maxSlice; | |
| | | } | |
| | | | |
| | | void SetGeom(Float_t x0, Float_t x1, Float_t y0, Float_t y1) | |
| | | { | |
| | | fX0 = x0; fX1 = x1; | |
| | | fY0 = y0; fY1 = y1; | |
| | | } | |
| | | | |
| | | Float_t MinSize() { return TMath::Min(fX1- fX0, fY1 - fY0); } | |
| | | Float_t X() { return 0.5*(fX0 + fX1); } | |
| | | Float_t Y() { return 0.5*(fY0 + fY1); } | |
| | | }; | |
| | | | |
|
| mutable Color_t fGridColor; // cached | | typedef std::vector<Cell2D_t> vCell2D_t; | |
| mutable Color_t fFontColor; // cached | | typedef std::vector<Cell2D_t>::iterator vCell2D_i; | |
| | | | |
|
| // axis | | typedef std::map<Int_t, UInt_t> SliceDLMap_t; | |
| mutable TAxis *fEtaAxis; | | typedef std::map<Int_t, UInt_t>::iterator SliceDLMap_i; | |
| mutable TAxis *fPhiAxis; | | | |
| mutable TAxis *fZAxis; | | | |
| | | | |
|
| | | // histogram base | |
| | | mutable Float_t fDataMax; | |
| | | mutable Color_t fGridColor; | |
| | | mutable Color_t fFontColor; | |
| | | | |
| | | mutable TAxis *fEtaAxis; | |
| | | mutable TAxis *fPhiAxis; | |
| | | mutable TAxis *fZAxis; | |
| mutable TEveVector fXAxisTitlePos; | | mutable TEveVector fXAxisTitlePos; | |
| mutable TEveVector fYAxisTitlePos; | | mutable TEveVector fYAxisTitlePos; | |
| mutable TEveVector fZAxisTitlePos; | | mutable TEveVector fZAxisTitlePos; | |
| mutable TEveVector fBackPlaneXConst[2]; | | mutable TEveVector fBackPlaneXConst[2]; | |
| mutable TEveVector fBackPlaneYConst[2]; | | mutable TEveVector fBackPlaneYConst[2]; | |
| | | | |
| mutable TGLAxisPainter fAxisPainter; | | mutable TGLAxisPainter fAxisPainter; | |
| | | | |
|
| | | // cached | |
| | | TEveCaloLego *fM; | |
| | | mutable Bool_t fDLCacheOK; | |
| | | mutable vCell2D_t fCells2D; | |
| | | | |
| | | mutable TEveCaloData::RebinData_t fRebinData; | |
| | | mutable Float_t fMaxValRebin; | |
| | | mutable Float_t fValToPixel; // top logaritmic viewvie | |
| | | w | |
| | | mutable Int_t fCurrentPixelsPerBin; | |
| | | | |
| | | mutable SliceDLMap_t fDLMap; | |
| | | mutable Bool_t fCells3D; | |
| | | | |
| | | TEveCaloLegoGL(const TEveCaloLegoGL&); // Stop default | |
| | | TEveCaloLegoGL& operator=(const TEveCaloLegoGL&); // Stop default | |
| | | | |
| protected: | | protected: | |
| Int_t GetGridStep(TGLRnrCtx &rnrCtx) const; | | Int_t GetGridStep(TGLRnrCtx &rnrCtx) const; | |
| void RebinAxis(TAxis *orig, TAxis *curr) const; | | void RebinAxis(TAxis *orig, TAxis *curr) const; | |
| | | | |
| void SetAxis3DTitlePos(TGLRnrCtx &rnrCtx, Float_t x0, Float_t x1, Flo
at_t y0, Float_t y1) const; | | void SetAxis3DTitlePos(TGLRnrCtx &rnrCtx, Float_t x0, Float_t x1, Flo
at_t y0, Float_t y1) const; | |
| void DrawAxis3D(TGLRnrCtx &rnrCtx) const; | | void DrawAxis3D(TGLRnrCtx &rnrCtx) const; | |
| void DrawAxis2D(TGLRnrCtx &rnrCtx) const; | | void DrawAxis2D(TGLRnrCtx &rnrCtx) const; | |
| void DrawHistBase(TGLRnrCtx &rnrCtx) const; | | void DrawHistBase(TGLRnrCtx &rnrCtx) const; | |
| | | | |
|
| void DrawCells2D(TGLRnrCtx & rnrCtx) const; | | // top view | |
| | | void PrepareCell2DData(TEveCaloData::vCellId_t& cellList, vCell2D_t& | |
| | | cells2D) const; | |
| | | void PrepareCell2DDataRebin(TEveCaloData::RebinData_t& rebinData, vCe | |
| | | ll2D_t& cells2D) const; | |
| | | void DrawCells2D(TGLRnrCtx & rnrCtx, vCell2D_t& cells2D) const; | |
| | | | |
|
| | | // 3D view | |
| void DrawCells3D(TGLRnrCtx & rnrCtx) const; | | void DrawCells3D(TGLRnrCtx & rnrCtx) const; | |
| void MakeQuad(Float_t x, Float_t y, Float_t z, Float_t xw, Float_t yw
, Float_t zh) const; | | void MakeQuad(Float_t x, Float_t y, Float_t z, Float_t xw, Float_t yw
, Float_t zh) const; | |
|
| void MakeDisplayList() const; | | void Make3DDisplayList(TEveCaloData::vCellId_t& cellList, SliceDLMap_ | |
| | | t& map, Bool_t select) const; | |
| | | void Make3DDisplayListRebin(TEveCaloData::RebinData_t& rebinData, Sli | |
| | | ceDLMap_t& map, Bool_t select) const; | |
| | | | |
| void WrapTwoPi(Float_t &min, Float_t &max) const; | | void WrapTwoPi(Float_t &min, Float_t &max) const; | |
| | | | |
|
| TEveCaloLego *fM; // Model object. | | | |
| mutable Bool_t fDLCacheOK; | | | |
| | | | |
| typedef std::map<Int_t, UInt_t> SliceDLMap_t; | | | |
| typedef std::map<Int_t, UInt_t>::iterator SliceDLMap_i; | | | |
| | | | |
| mutable SliceDLMap_t fDLMap; | | | |
| mutable TEveCaloData::RebinData_t fRebinData; | | | |
| | | | |
| mutable Bool_t fCells3D; | | | |
| public: | | public: | |
| TEveCaloLegoGL(); | | TEveCaloLegoGL(); | |
| virtual ~TEveCaloLegoGL(); | | virtual ~TEveCaloLegoGL(); | |
| | | | |
| 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 DLCacheDrop(); | | virtual void DLCacheDrop(); | |
| virtual void DLCachePurge(); | | virtual void DLCachePurge(); | |
| | | | |
| virtual void DirectDraw(TGLRnrCtx & rnrCtx) const; | | virtual void DirectDraw(TGLRnrCtx & rnrCtx) const; | |
|
| | | virtual void DrawHighlight(TGLRnrCtx& rnrCtx, const TGLPhysicalShape* | |
| | | ps) const; | |
| | | | |
| virtual Bool_t SupportsSecondarySelect() const { return kTRUE; } | | virtual Bool_t SupportsSecondarySelect() const { return kTRUE; } | |
|
| | | virtual Bool_t AlwaysSecondarySelect() 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 | |
| { | | { | |
| if (fM->GetData()->GetWrapTwoPi()) | | if (fM->GetData()->GetWrapTwoPi()) | |
| { | | { | |
| | | | |
End of changes. 12 change blocks. |
| 23 lines changed or deleted | | 70 lines changed or added | |
|
| TEveCompound.h | | TEveCompound.h | |
|
| // @(#)root/eve:$Id: TEveCompound.h 27157 2009-01-15 14:05:12Z brun $ | | // @(#)root/eve:$Id: TEveCompound.h 30849 2009-10-23 13:45:23Z 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. * | |
| *************************************************************************/ | | *************************************************************************/ | |
| | | | |
| #ifndef ROOT_TEveCompound | | #ifndef ROOT_TEveCompound | |
| #define ROOT_TEveCompound | | #define ROOT_TEveCompound | |
| | | | |
| #include "TEveElement.h" | | #include "TEveElement.h" | |
| #include "TEveProjectionBases.h" | | #include "TEveProjectionBases.h" | |
| | | | |
| //=========================================================================
===== | | //=========================================================================
===== | |
| // TEveCompound | | // TEveCompound | |
| //=========================================================================
===== | | //=========================================================================
===== | |
| | | | |
|
| class TEveCompound : public TEveElementList, | | class TEveCompound : public TEveElementList | |
| public TEveProjectable | | | |
| { | | { | |
| private: | | private: | |
| TEveCompound(const TEveCompound&); // Not implemented | | TEveCompound(const TEveCompound&); // Not implemented | |
| TEveCompound& operator=(const TEveCompound&); // Not implemented | | TEveCompound& operator=(const TEveCompound&); // Not implemented | |
| | | | |
| protected: | | protected: | |
| Short_t fCompoundOpen; // If more than zero, tag new children as compou
nd members. | | Short_t fCompoundOpen; // If more than zero, tag new children as compou
nd members. | |
| | | | |
| public: | | public: | |
| TEveCompound(const char* n="TEveCompound", const char* t="", | | TEveCompound(const char* n="TEveCompound", const char* t="", | |
| | | | |
| skipping to change at line 49 | | skipping to change at line 48 | |
| Bool_t IsCompoundOpen() const { return fCompoundOpen > 0; } | | Bool_t IsCompoundOpen() const { return fCompoundOpen > 0; } | |
| | | | |
| virtual void SetMainColor(Color_t color); | | virtual void SetMainColor(Color_t color); | |
| | | | |
| 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(); | |
| | | | |
| virtual void FillImpliedSelectedSet(Set_t& impSelSet); | | virtual void FillImpliedSelectedSet(Set_t& impSelSet); | |
| | | | |
|
| virtual TClass* ProjectedClass() const; | | virtual TClass* ProjectedClass(const TEveProjection* p) const; | |
| | | | |
| ClassDef(TEveCompound, 0); // Container for managing compounds of TEveEl
ements. | | ClassDef(TEveCompound, 0); // Container for managing compounds of TEveEl
ements. | |
| }; | | }; | |
| | | | |
| //=========================================================================
===== | | //=========================================================================
===== | |
| // TEveCompoundProjected | | // TEveCompoundProjected | |
| //=========================================================================
===== | | //=========================================================================
===== | |
| | | | |
| class TEveCompoundProjected : public TEveCompound, | | class TEveCompoundProjected : public TEveCompound, | |
| public TEveProjected | | public TEveProjected | |
| { | | { | |
| private: | | private: | |
| TEveCompoundProjected(const TEveCompoundProjected&); // Not i
mplemented | | TEveCompoundProjected(const TEveCompoundProjected&); // Not i
mplemented | |
| TEveCompoundProjected& operator=(const TEveCompoundProjected&); // Not i
mplemented | | TEveCompoundProjected& operator=(const TEveCompoundProjected&); // Not i
mplemented | |
| | | | |
| protected: | | protected: | |
|
| | | virtual void SetDepthLocal(Float_t /*d*/) {} | |
| | | | |
| public: | | public: | |
| TEveCompoundProjected(); | | TEveCompoundProjected(); | |
| virtual ~TEveCompoundProjected() {} | | virtual ~TEveCompoundProjected() {} | |
| | | | |
| virtual void SetMainColor(Color_t color); | | virtual void SetMainColor(Color_t color); | |
| | | | |
|
| // Abstract from TEveProjected, we seem not to care. | | | |
| virtual void SetDepth(Float_t /*d*/) {} | | | |
| virtual void UpdateProjection() {} | | virtual void UpdateProjection() {} | |
| | | | |
| ClassDef(TEveCompoundProjected, 0); // Projected TEveCompund container. | | ClassDef(TEveCompoundProjected, 0); // Projected TEveCompund container. | |
| }; | | }; | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 5 change blocks. |
| 6 lines changed or deleted | | 4 lines changed or added | |
|
| TEveElement.h | | TEveElement.h | |
|
| // @(#)root/eve:$Id: TEveElement.h 29499 2009-07-16 16:51:38Z matevz $ | | // @(#)root/eve:$Id: TEveElement.h 31234 2009-11-17 14:57:10Z 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_TEveElement | | #ifndef ROOT_TEveElement | |
| #define ROOT_TEveElement | | #define ROOT_TEveElement | |
| | | | |
| #include "TEveUtil.h" | | #include "TEveUtil.h" | |
|
| | | #include "TEveProjectionBases.h" | |
| | | | |
| #include "TNamed.h" | | #include "TNamed.h" | |
| #include "TRef.h" | | #include "TRef.h" | |
| | | | |
| class TGListTree; | | class TGListTree; | |
| class TGListTreeItem; | | class TGListTreeItem; | |
| class TGPicture; | | class TGPicture; | |
| | | | |
| class TEveCompound; | | class TEveCompound; | |
| class TEveTrans; | | class TEveTrans; | |
| | | | |
| skipping to change at line 104 | | skipping to change at line 105 | |
| TEveTrans *fMainTrans; // Pointer to main transformati
on matrix. | | TEveTrans *fMainTrans; // Pointer to main transformati
on matrix. | |
| | | | |
| sLTI_t fItems; //! Set of list-tree-items. | | sLTI_t fItems; //! Set of list-tree-items. | |
| | | | |
| TRef fSource; // External object that is repr
esented by this element. | | TRef fSource; // External object that is repr
esented by this element. | |
| void *fUserData; //! Externally assigned and cont
rolled user data. | | void *fUserData; //! Externally assigned and cont
rolled user data. | |
| | | | |
| virtual void PreDeleteElement(); | | virtual void PreDeleteElement(); | |
| virtual void RemoveElementsInternal(); | | virtual void RemoveElementsInternal(); | |
| | | | |
|
| | | static const char* ToString(Bool_t b); | |
| | | | |
| public: | | public: | |
| TEveElement(); | | TEveElement(); | |
| TEveElement(Color_t& main_color); | | TEveElement(Color_t& main_color); | |
| TEveElement(const TEveElement& e); | | TEveElement(const TEveElement& e); | |
| virtual ~TEveElement(); | | virtual ~TEveElement(); | |
| | | | |
|
| virtual TEveElement* CloneElement() const { return new TEveElement(*this
); } | | virtual TEveElement* CloneElement() const; | |
| virtual TEveElement* CloneElementRecurse(Int_t level=0) const; | | virtual TEveElement* CloneElementRecurse(Int_t level=0) const; | |
| virtual void CloneChildrenRecurse(TEveElement* dest, Int_t level
=0) const; | | virtual void CloneChildrenRecurse(TEveElement* dest, Int_t level
=0) const; | |
| | | | |
| virtual const char* GetElementName() const; | | virtual const char* GetElementName() const; | |
| virtual const char* GetElementTitle() const; | | virtual const char* GetElementTitle() const; | |
| virtual void SetElementName (const char* name); | | virtual void SetElementName (const char* name); | |
| virtual void SetElementTitle(const char* title); | | virtual void SetElementTitle(const char* title); | |
| virtual void SetElementNameTitle(const char* name, const char* title); | | virtual void SetElementNameTitle(const char* name, const char* title); | |
| virtual void NameTitleChanged(); | | virtual void NameTitleChanged(); | |
| | | | |
| | | | |
| skipping to change at line 167 | | skipping to change at line 170 | |
| List_ci BeginChildren() const { return fChildren.begin(); } | | List_ci BeginChildren() const { return fChildren.begin(); } | |
| List_ci EndChildren() const { return fChildren.end(); } | | List_ci EndChildren() const { return fChildren.end(); } | |
| Int_t NumChildren() const { return fChildren.size(); } | | Int_t NumChildren() const { return fChildren.size(); } | |
| Bool_t HasChildren() const { return !fChildren.empty(); } | | Bool_t HasChildren() const { return !fChildren.empty(); } | |
| | | | |
| Bool_t HasChild(TEveElement* el); | | Bool_t HasChild(TEveElement* el); | |
| TEveElement* FindChild(const TString& name, const TClass* cls=0); | | TEveElement* FindChild(const TString& name, const TClass* cls=0); | |
| TEveElement* FindChild(TPRegexp& regexp, const TClass* cls=0); | | TEveElement* FindChild(TPRegexp& regexp, const TClass* cls=0); | |
| Int_t FindChildren(List_t& matches, const TString& name, const T
Class* cls=0); | | Int_t FindChildren(List_t& matches, const TString& name, const T
Class* cls=0); | |
| Int_t FindChildren(List_t& matches, TPRegexp& regexp, const TClas
s* cls=0); | | Int_t FindChildren(List_t& matches, TPRegexp& regexp, const TClas
s* cls=0); | |
|
| TEveElement* FirstChild() const { return fChildren.front(); } | | TEveElement* FirstChild() const; | |
| TEveElement* LastChild () const { return fChildren.back(); } | | TEveElement* LastChild () const; | |
| | | | |
| void EnableListElements (Bool_t rnr_self=kTRUE, Bool_t rnr_children=kTR
UE); // *MENU* | | void EnableListElements (Bool_t rnr_self=kTRUE, Bool_t rnr_children=kTR
UE); // *MENU* | |
| void DisableListElements(Bool_t rnr_self=kFALSE, Bool_t rnr_children=kFA
LSE); // *MENU* | | void DisableListElements(Bool_t rnr_self=kFALSE, Bool_t rnr_children=kFA
LSE); // *MENU* | |
| | | | |
|
| Bool_t GetDestroyOnZeroRefCnt() const { return fDestroyOnZeroRefCnt; } | | Bool_t GetDestroyOnZeroRefCnt() const; | |
| void SetDestroyOnZeroRefCnt(Bool_t d) { fDestroyOnZeroRefCnt = d; } | | void SetDestroyOnZeroRefCnt(Bool_t d); | |
| | | | |
|
| Int_t GetDenyDestroy() const { return fDenyDestroy; } | | Int_t GetDenyDestroy() const; | |
| void IncDenyDestroy() { ++fDenyDestroy; } | | void IncDenyDestroy(); | |
| void DecDenyDestroy() { if (--fDenyDestroy <= 0) CheckReferenceC | | void DecDenyDestroy(); | |
| ount("TEveElement::DecDenyDestroy "); } | | | |
| | | Int_t GetParentIgnoreCnt() const; | |
| Int_t GetParentIgnoreCnt() const { return fParentIgnoreCnt; } | | void IncParentIgnoreCnt(); | |
| void IncParentIgnoreCnt() { ++fParentIgnoreCnt; } | | void DecParentIgnoreCnt(); | |
| void DecParentIgnoreCnt() { if (--fParentIgnoreCnt <= 0) CheckRe | | | |
| ferenceCount("TEveElement::DecParentIgnoreCnt "); } | | | |
| | | | |
| virtual void PadPaint(Option_t* option); | | virtual void PadPaint(Option_t* option); | |
| | | | |
| virtual TObject* GetObject (const TEveException& eh="TEveElement::G
etObject ") const; | | virtual TObject* GetObject (const TEveException& eh="TEveElement::G
etObject ") const; | |
| virtual TObject* GetEditorObject(const TEveException& eh="TEveElement::G
etEditorObject ") const { return GetObject(eh); } | | virtual TObject* GetEditorObject(const TEveException& eh="TEveElement::G
etEditorObject ") const { return GetObject(eh); } | |
| virtual TObject* GetRenderObject(const TEveException& eh="TEveElement::G
etRenderObject ") const { return GetObject(eh); } | | virtual TObject* GetRenderObject(const TEveException& eh="TEveElement::G
etRenderObject ") const { return GetObject(eh); } | |
| | | | |
| // -------------------------------- | | // -------------------------------- | |
| | | | |
| virtual void ExpandIntoListTree(TGListTree* ltree, TGListTreeItem* paren
t); | | virtual void ExpandIntoListTree(TGListTree* ltree, TGListTreeItem* paren
t); | |
| | | | |
| skipping to change at line 302 | | skipping to change at line 305 | |
| Short_t fImpliedSelected; //! | | Short_t fImpliedSelected; //! | |
| Short_t fImpliedHighlighted; //! | | Short_t fImpliedHighlighted; //! | |
| | | | |
| public: | | public: | |
| typedef void (TEveElement::* Select_foo) (Bool_t); | | typedef void (TEveElement::* Select_foo) (Bool_t); | |
| typedef void (TEveElement::* ImplySelect_foo) (); | | typedef void (TEveElement::* ImplySelect_foo) (); | |
| | | | |
| Bool_t IsPickable() const { return fPickable; } | | Bool_t IsPickable() const { return fPickable; } | |
| void SetPickable(Bool_t p) { fPickable = p; } | | void SetPickable(Bool_t p) { fPickable = p; } | |
| | | | |
|
| void SelectElement(Bool_t state); | | virtual TEveElement* ForwardSelection(); | |
| void IncImpliedSelected(); | | virtual TEveElement* ForwardEdit(); | |
| void DecImpliedSelected(); | | | |
| | | virtual void SelectElement(Bool_t state); | |
| void HighlightElement(Bool_t state); | | virtual void IncImpliedSelected(); | |
| void IncImpliedHighlighted(); | | virtual void DecImpliedSelected(); | |
| void DecImpliedHighlighted(); | | | |
| | | virtual void HighlightElement(Bool_t state); | |
| | | virtual void IncImpliedHighlighted(); | |
| | | virtual void DecImpliedHighlighted(); | |
| | | | |
| virtual void FillImpliedSelectedSet(Set_t& impSelSet); | | virtual void FillImpliedSelectedSet(Set_t& impSelSet); | |
| | | | |
| virtual UChar_t GetSelectedLevel() const; | | virtual UChar_t GetSelectedLevel() const; | |
| | | | |
| // Change-stamping and change bits | | // Change-stamping and change bits | |
| //--------------------------------- | | //--------------------------------- | |
| | | | |
| enum EChangeBits | | enum EChangeBits | |
| { | | { | |
| | | | |
| skipping to change at line 380 | | skipping to change at line 386 | |
| protected: | | protected: | |
| TObject* fObject; // External object holding the visual data. | | TObject* fObject; // External object holding the visual data. | |
| Bool_t fOwnObject; // Is object owned / should be deleted on destruct
ion. | | Bool_t fOwnObject; // Is object owned / should be deleted on destruct
ion. | |
| | | | |
| public: | | public: | |
| TEveElementObjectPtr(TObject* obj, Bool_t own=kTRUE); | | TEveElementObjectPtr(TObject* obj, Bool_t own=kTRUE); | |
| TEveElementObjectPtr(TObject* obj, Color_t& mainColor, Bool_t own=kTRUE)
; | | TEveElementObjectPtr(TObject* obj, Color_t& mainColor, Bool_t own=kTRUE)
; | |
| TEveElementObjectPtr(const TEveElementObjectPtr& e); | | TEveElementObjectPtr(const TEveElementObjectPtr& e); | |
| virtual ~TEveElementObjectPtr(); | | virtual ~TEveElementObjectPtr(); | |
| | | | |
|
| virtual TEveElementObjectPtr* CloneElement() const { return new TEveElem
entObjectPtr(*this); } | | virtual TEveElementObjectPtr* CloneElement() const; | |
| | | | |
| virtual TObject* GetObject(const TEveException& eh="TEveElementObjectPtr
::GetObject ") const; | | virtual TObject* GetObject(const TEveException& eh="TEveElementObjectPtr
::GetObject ") const; | |
| virtual void ExportToCINT(char* var_name); | | virtual void ExportToCINT(char* var_name); | |
| | | | |
| Bool_t GetOwnObject() const { return fOwnObject; } | | Bool_t GetOwnObject() const { return fOwnObject; } | |
| void SetOwnObject(Bool_t o) { fOwnObject = o; } | | void SetOwnObject(Bool_t o) { fOwnObject = o; } | |
| | | | |
| ClassDef(TEveElementObjectPtr, 0); // TEveElement with external TObject
as a holder of visualization data. | | ClassDef(TEveElementObjectPtr, 0); // TEveElement with external TObject
as a holder of visualization data. | |
| }; | | }; | |
| | | | |
| /**************************************************************************
****/ | | /**************************************************************************
****/ | |
| // TEveElementList | | // TEveElementList | |
| /**************************************************************************
****/ | | /**************************************************************************
****/ | |
| | | | |
| class TEveElementList : public TEveElement, | | class TEveElementList : public TEveElement, | |
|
| public TNamed | | public TNamed, | |
| | | public TEveProjectable | |
| { | | { | |
| private: | | private: | |
| TEveElementList& operator=(const TEveElementList&); // Not implemented | | TEveElementList& operator=(const TEveElementList&); // Not implemented | |
| | | | |
| protected: | | protected: | |
| Color_t fColor; // Color of the object. | | Color_t fColor; // Color of the object. | |
| Bool_t fDoColor; // Should serve fColor as the main color of the
object. | | Bool_t fDoColor; // Should serve fColor as the main color of the
object. | |
| TClass *fChildClass; // Class of acceptable children, others are reje
cted. | | TClass *fChildClass; // Class of acceptable children, others are reje
cted. | |
| | | | |
| public: | | public: | |
| TEveElementList(const char* n="TEveElementList", const char* t="", | | TEveElementList(const char* n="TEveElementList", const char* t="", | |
| Bool_t doColor=kFALSE); | | Bool_t doColor=kFALSE); | |
| TEveElementList(const TEveElementList& e); | | TEveElementList(const TEveElementList& e); | |
| virtual ~TEveElementList() {} | | virtual ~TEveElementList() {} | |
| | | | |
|
| virtual TEveElementList* CloneElement() const { return new TEveElementLi
st(*this); } | | virtual TEveElementList* CloneElement() const; | |
| | | | |
| virtual const char* GetElementName() const { return GetName(); } | | virtual const char* GetElementName() const { return GetName(); } | |
| virtual const char* GetElementTitle() const { return GetTitle(); } | | virtual const char* GetElementTitle() const { return GetTitle(); } | |
| | | | |
| virtual void SetElementName (const char* name) | | virtual void SetElementName (const char* name) | |
| { TNamed::SetName(name); NameTitleChanged(); } | | { TNamed::SetName(name); NameTitleChanged(); } | |
| | | | |
| virtual void SetElementTitle(const char* title) | | virtual void SetElementTitle(const char* title) | |
| { TNamed::SetTitle(title); NameTitleChanged(); } | | { TNamed::SetTitle(title); NameTitleChanged(); } | |
| | | | |
| virtual void SetElementNameTitle(const char* name, const char* title) | | virtual void SetElementNameTitle(const char* name, const char* title) | |
| { TNamed::SetNameTitle(name, title); NameTitleChanged(); } | | { TNamed::SetNameTitle(name, title); NameTitleChanged(); } | |
| | | | |
| virtual Bool_t CanEditMainColor() const { return fDoColor; } | | virtual Bool_t CanEditMainColor() const { return fDoColor; } | |
| | | | |
| TClass* GetChildClass() const { return fChildClass; } | | TClass* GetChildClass() const { return fChildClass; } | |
| void SetChildClass(TClass* c) { fChildClass = c; } | | void SetChildClass(TClass* c) { fChildClass = c; } | |
| | | | |
| virtual Bool_t AcceptElement(TEveElement* el); | | virtual Bool_t AcceptElement(TEveElement* el); | |
| | | | |
|
| | | virtual TClass* ProjectedClass(const TEveProjection* p) const; | |
| | | | |
| ClassDef(TEveElementList, 0); // List of TEveElement objects with a poss
ibility to limit the class of accepted elements. | | ClassDef(TEveElementList, 0); // List of TEveElement objects with a poss
ibility to limit the class of accepted elements. | |
| }; | | }; | |
| | | | |
|
| | | /************************************************************************** | |
| | | ****/ | |
| | | // TEveElementListProjected | |
| | | /************************************************************************** | |
| | | ****/ | |
| | | | |
| | | class TEveElementListProjected : public TEveElementList, | |
| | | public TEveProjected | |
| | | { | |
| | | private: | |
| | | TEveElementListProjected(const TEveElementListProjected&); // | |
| | | Not implemented | |
| | | TEveElementListProjected& operator=(const TEveElementListProjected&); // | |
| | | Not implemented | |
| | | | |
| | | protected: | |
| | | virtual void SetDepthLocal(Float_t d); | |
| | | | |
| | | public: | |
| | | TEveElementListProjected(); | |
| | | virtual ~TEveElementListProjected() {} | |
| | | | |
| | | virtual void UpdateProjection(); | |
| | | | |
| | | ClassDef(TEveElementListProjected, 0); // Projected TEveElementList. | |
| | | }; | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 13 change blocks. |
| 25 lines changed or deleted | | 59 lines changed or added | |
|
| TEveGedEditor.h | | TEveGedEditor.h | |
|
| // @(#)root/eve:$Id: TEveGedEditor.h 21310 2007-12-10 19:05:45Z matevz $ | | // @(#)root/eve:$Id: TEveGedEditor.h 31326 2009-11-19 17:04:40Z 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_TEveGedEditor | | #ifndef ROOT_TEveGedEditor | |
| #define ROOT_TEveGedEditor | | #define ROOT_TEveGedEditor | |
| | | | |
| #include "TGedEditor.h" | | #include "TGedEditor.h" | |
|
| | | #include "TGedFrame.h" | |
| | | | |
| class TEveElement; | | class TEveElement; | |
| | | | |
|
| | | //========================================================================= | |
| | | ===== | |
| | | // TEveGedEditor | |
| | | //========================================================================= | |
| | | ===== | |
| | | | |
| class TEveGedEditor : public TGedEditor | | class TEveGedEditor : public TGedEditor | |
| { | | { | |
| TEveGedEditor(const TEveGedEditor&); // Not implemented | | TEveGedEditor(const TEveGedEditor&); // Not implemented | |
| TEveGedEditor& operator=(const TEveGedEditor&); // Not implemented | | TEveGedEditor& operator=(const TEveGedEditor&); // Not implemented | |
| | | | |
|
| | | public: | |
| | | typedef TGedFrame* (*NameFrameCreator_t)(TEveGedEditor*, const TGWindow* | |
| | | parent, const char* tab_name); | |
| | | | |
| protected: | | protected: | |
| TEveElement *fElement; // Cached eve-element pointer. | | TEveElement *fElement; // Cached eve-element pointer. | |
| TObject *fObject; // Cached tobj pointer. | | TObject *fObject; // Cached tobj pointer. | |
| | | | |
|
| | | virtual TGedFrame* CreateNameFrame(const TGWindow* parent, const char* t | |
| | | ab_name); | |
| | | | |
| | | static Int_t fgMaxExtraEditors; | |
| | | static TList *fgExtraEditors; | |
| | | | |
| public: | | public: | |
|
| TEveGedEditor(TCanvas* canvas=0, Int_t width=250, Int_t height=400); | | TEveGedEditor(TCanvas* canvas=0, UInt_t width=250, UInt_t height=400); | |
| virtual ~TEveGedEditor() {} | | virtual ~TEveGedEditor(); | |
| | | | |
| | | virtual void CloseWindow(); | |
| | | virtual void DeleteWindow(); | |
| | | | |
| TEveElement* GetEveElement() const; | | TEveElement* GetEveElement() const; | |
| | | | |
| void DisplayElement(TEveElement* re); | | void DisplayElement(TEveElement* re); | |
| void DisplayObject(TObject* obj); | | void DisplayObject(TObject* obj); | |
| | | | |
| virtual void SetModel(TVirtualPad* pad, TObject* obj, Int_t event); | | virtual void SetModel(TVirtualPad* pad, TObject* obj, Int_t event); | |
| virtual void Update(TGedFrame* gframe=0); | | virtual void Update(TGedFrame* gframe=0); | |
| | | | |
|
| // virtual Bool_t HandleButton(Event_t *event); | | // --- Statics for extra editors. --- | |
| | | | |
| | | static void SpawnNewEditor(TObject* obj); | |
| | | static void ElementChanged(TEveElement* el); | |
| | | static void ElementDeleted(TEveElement* el); | |
| | | | |
| | | static void DestroyEditors(); | |
| | | | |
| ClassDef(TEveGedEditor, 0); // Specialization of TGedEditor for proper u
pdate propagation to TEveManager. | | ClassDef(TEveGedEditor, 0); // Specialization of TGedEditor for proper u
pdate propagation to TEveManager. | |
| }; | | }; | |
| | | | |
|
| | | //========================================================================= | |
| | | ===== | |
| | | // TEveGedNameFrame | |
| | | //========================================================================= | |
| | | ===== | |
| | | | |
| | | class TEveGedNameFrame : public TGedFrame | |
| | | { | |
| | | private: | |
| | | TEveGedNameFrame(const TEveGedNameFrame&); // Not implemented | |
| | | TEveGedNameFrame& operator=(const TEveGedNameFrame&); // Not implemented | |
| | | | |
| | | protected: | |
| | | TGTextButton *fNCButton; // Name/Class button. | |
| | | | |
| | | public: | |
| | | TEveGedNameFrame(const TGWindow *p=0, Int_t width=140, Int_t height=30, | |
| | | UInt_t options=kChildFrame | kHorizontalFrame); | |
| | | virtual ~TEveGedNameFrame(); | |
| | | | |
| | | virtual void SetModel(TObject* obj); | |
| | | | |
| | | void SpawnEditorClone(); | |
| | | | |
| | | ClassDef(TEveGedNameFrame, 0); // Top name-frame used in EVE. | |
| | | }; | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 8 change blocks. |
| 4 lines changed or deleted | | 57 lines changed or added | |
|
| TEveProjectionBases.h | | TEveProjectionBases.h | |
|
| // @(#)root/eve:$Id: TEveProjectionBases.h 24004 2008-05-24 20:08:56Z matev
z $ | | // @(#)root/eve:$Id: TEveProjectionBases.h 30840 2009-10-23 09:03:14Z matev
z $ | |
| // 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_TEveProjectionBases | | #ifndef ROOT_TEveProjectionBases | |
| #define ROOT_TEveProjectionBases | | #define ROOT_TEveProjectionBases | |
| | | | |
| #include "TEveUtil.h" | | #include "TEveUtil.h" | |
| | | | |
|
| #include <list> | | | |
| | | | |
| class TBuffer3D; | | class TBuffer3D; | |
| | | | |
| class TEveElement; | | class TEveElement; | |
| | | | |
|
| | | class TEveProjection; | |
| class TEveProjected; | | class TEveProjected; | |
| class TEveProjectionManager; | | class TEveProjectionManager; | |
| | | | |
| //////////////////////////////////////////////////////////////// | | //////////////////////////////////////////////////////////////// | |
| // // | | // // | |
| // TEveProjectable // | | // TEveProjectable // | |
| // // | | // // | |
| // Abstract base class for non-linear projectable objects. // | | // Abstract base class for non-linear projectable objects. // | |
| // // | | // // | |
| //////////////////////////////////////////////////////////////// | | //////////////////////////////////////////////////////////////// | |
| | | | |
| skipping to change at line 50 | | skipping to change at line 49 | |
| protected: | | protected: | |
| typedef std::list<TEveProjected*> ProjList_t; | | typedef std::list<TEveProjected*> ProjList_t; | |
| typedef std::list<TEveProjected*>::iterator ProjList_i; | | typedef std::list<TEveProjected*>::iterator ProjList_i; | |
| | | | |
| ProjList_t fProjectedList; // references to projected instances. | | ProjList_t fProjectedList; // references to projected instances. | |
| | | | |
| public: | | public: | |
| TEveProjectable(); | | TEveProjectable(); | |
| virtual ~TEveProjectable(); | | virtual ~TEveProjectable(); | |
| | | | |
|
| virtual TClass* ProjectedClass() const = 0; | | virtual TClass* ProjectedClass(const TEveProjection* p) const = 0; | |
| | | | |
| virtual Bool_t HasProjecteds() const { return ! fProjectedList.empty();
} | | virtual Bool_t HasProjecteds() const { return ! fProjectedList.empty();
} | |
| | | | |
| virtual void AddProjected(TEveProjected* p) { fProjectedList.push_bac
k(p); } | | virtual void AddProjected(TEveProjected* p) { fProjectedList.push_bac
k(p); } | |
| virtual void RemoveProjected(TEveProjected* p) { fProjectedList.remove(p
); } | | virtual void RemoveProjected(TEveProjected* p) { fProjectedList.remove(p
); } | |
| | | | |
| virtual void AddProjectedsToSet(std::set<TEveElement*>& set); | | virtual void AddProjectedsToSet(std::set<TEveElement*>& set); | |
| | | | |
| virtual void PropagateVizParams(TEveElement* el=0); | | virtual void PropagateVizParams(TEveElement* el=0); | |
| virtual void PropagateRenderState(Bool_t rnr_self, Bool_t rnr_children); | | virtual void PropagateRenderState(Bool_t rnr_self, Bool_t rnr_children); | |
| | | | |
| skipping to change at line 85 | | skipping to change at line 84 | |
| { | | { | |
| private: | | private: | |
| TEveProjected(const TEveProjected&); // Not implemented | | TEveProjected(const TEveProjected&); // Not implemented | |
| TEveProjected& operator=(const TEveProjected&); // Not implemented | | TEveProjected& operator=(const TEveProjected&); // Not implemented | |
| | | | |
| protected: | | protected: | |
| TEveProjectionManager *fManager; // manager | | TEveProjectionManager *fManager; // manager | |
| TEveProjectable *fProjectable; // link to original object | | TEveProjectable *fProjectable; // link to original object | |
| Float_t fDepth; // z coordinate | | Float_t fDepth; // z coordinate | |
| | | | |
|
| | | void SetDepthCommon(Float_t d, TEveElement* el, Float_t* bbox); | |
| | | virtual void SetDepthLocal(Float_t d) = 0; | |
| | | | |
| public: | | public: | |
| TEveProjected(); | | TEveProjected(); | |
| virtual ~TEveProjected(); | | virtual ~TEveProjected(); | |
| | | | |
| TEveProjectable* GetProjectable() const { return fProjectable; } | | TEveProjectable* GetProjectable() const { return fProjectable; } | |
| | | | |
| virtual void SetProjection(TEveProjectionManager* mng, TEveProjectable*
model); | | virtual void SetProjection(TEveProjectionManager* mng, TEveProjectable*
model); | |
| virtual void UnRefProjectable(TEveProjectable* assumed_parent); | | virtual void UnRefProjectable(TEveProjectable* assumed_parent); | |
| | | | |
|
| virtual void SetDepth(Float_t d) = 0; | | | |
| | | | |
| virtual void UpdateProjection() = 0; | | virtual void UpdateProjection() = 0; | |
| | | | |
|
| void SetDepthCommon(Float_t d, TEveElement* el, Float_t* bbox); | | virtual void SetDepth(Float_t d); | |
| | | | |
| ClassDef(TEveProjected, 0); // Abstract base class for classes that hold
results of a non-linear projection transformation. | | ClassDef(TEveProjected, 0); // Abstract base class for classes that hold
results of a non-linear projection transformation. | |
| }; | | }; | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 7 change blocks. |
| 7 lines changed or deleted | | 7 lines changed or added | |
|
| TEveProjections.h | | TEveProjections.h | |
|
| // @(#)root/eve:$Id: TEveProjections.h 26367 2008-11-21 18:08:30Z matevz $ | | // @(#)root/eve:$Id: TEveProjections.h 30840 2009-10-23 09:03:14Z 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_TEveProjections | | #ifndef ROOT_TEveProjections | |
| #define ROOT_TEveProjections | | #define ROOT_TEveProjections | |
| | | | |
| #include "TEveVSDStructs.h" | | #include "TEveVSDStructs.h" | |
| | | | |
| #include <vector> | | #include <vector> | |
| | | | |
|
| //////////////////////////////////////////////////////////////// | | //========================================================================= | |
| // // | | ===== | |
| // TEveProjection // | | // TEveProjection | |
| // // | | //========================================================================= | |
| //////////////////////////////////////////////////////////////// | | ===== | |
| | | | |
| class TEveProjection | | class TEveProjection | |
| { | | { | |
| public: | | public: | |
|
| enum EPType_e { kPT_Unknown, kPT_RPhi, kPT_RhoZ, kPT_End };// type | | enum EPType_e { kPT_Unknown, kPT_RPhi, kPT_RhoZ, kPT_3D, kPT_End }; // | |
| enum EPProc_e { kPP_Plane, kPP_Distort, kPP_Full }; // procedur | | projection type | |
| e | | enum EPProc_e { kPP_Plane, kPP_Distort, kPP_Full }; // | |
| enum EGeoMode_e { kGM_Unknown, kGM_Polygons, kGM_Segments }; // reconstr | | projection procedure | |
| uction of geometry | | enum EGeoMode_e { kGM_Unknown, kGM_Polygons, kGM_Segments }; // | |
| | | strategy for geometry projections | |
| | | | |
| struct PreScaleEntry_t | | struct PreScaleEntry_t | |
| { | | { | |
| Float_t fMin, fMax; | | Float_t fMin, fMax; | |
| Float_t fOffset; | | Float_t fOffset; | |
| Float_t fScale; | | Float_t fScale; | |
| | | | |
| PreScaleEntry_t() : | | PreScaleEntry_t() : | |
| fMin(0), fMax(0), fOffset(0), fScale(1) {} | | fMin(0), fMax(0), fOffset(0), fScale(1) {} | |
| PreScaleEntry_t(Float_t min, Float_t max, Float_t off, Float_t scale)
: | | PreScaleEntry_t(Float_t min, Float_t max, Float_t off, Float_t scale)
: | |
| | | | |
| skipping to change at line 60 | | skipping to change at line 58 | |
| | | | |
| protected: | | protected: | |
| EPType_e fType; // type | | EPType_e fType; // type | |
| EGeoMode_e fGeoMode; // strategy of polygon projection (w
hat to try first) | | EGeoMode_e fGeoMode; // strategy of polygon projection (w
hat to try first) | |
| TString fName; // name | | TString fName; // name | |
| | | | |
| TEveVector fCenter; // center of distortion | | TEveVector fCenter; // center of distortion | |
| TEveVector fZeroPosVal; // projected origin (0, 0, 0) | | TEveVector fZeroPosVal; // projected origin (0, 0, 0) | |
| | | | |
| Bool_t fUsePreScale; // use pre-scaling | | Bool_t fUsePreScale; // use pre-scaling | |
|
| vPreScale_t fPreScales[2]; // scaling before the distortion | | vPreScale_t fPreScales[3]; // scaling before the distortion | |
| | | | |
| Float_t fDistortion; // distortion | | Float_t fDistortion; // distortion | |
| Float_t fFixR; // radius from which scaling remains
constant | | Float_t fFixR; // radius from which scaling remains
constant | |
| Float_t fFixZ; // z-coordinate from which scaling r
emains constant | | Float_t fFixZ; // z-coordinate from which scaling r
emains constant | |
| Float_t fPastFixRFac; // relative scaling factor beyond fF
ixR as 10^x | | Float_t fPastFixRFac; // relative scaling factor beyond fF
ixR as 10^x | |
| Float_t fPastFixZFac; // relative scaling factor beyond fF
ixZ as 10^x | | Float_t fPastFixZFac; // relative scaling factor beyond fF
ixZ as 10^x | |
| Float_t fScaleR; // scale factor to keep projected ra
dius at fFixR fixed | | Float_t fScaleR; // scale factor to keep projected ra
dius at fFixR fixed | |
| Float_t fScaleZ; // scale factor to keep projected z-
coordinate at fFixZ fixed | | Float_t fScaleZ; // scale factor to keep projected z-
coordinate at fFixZ fixed | |
| Float_t fPastFixRScale; // relative scaling beyond fFixR | | Float_t fPastFixRScale; // relative scaling beyond fFixR | |
| Float_t fPastFixZScale; // relative scaling beyond fFixZ | | Float_t fPastFixZScale; // relative scaling beyond fFixZ | |
| Float_t fMaxTrackStep; // maximum distance between two poin
ts on a track | | Float_t fMaxTrackStep; // maximum distance between two poin
ts on a track | |
| | | | |
| TEveVector fLowLimit; // convergence of point +infinity | | TEveVector fLowLimit; // convergence of point +infinity | |
| TEveVector fUpLimit; // convergence of point -infinity | | TEveVector fUpLimit; // convergence of point -infinity | |
| | | | |
|
| | | void PreScaleVariable(Int_t dim, Float_t& v); | |
| | | | |
| public: | | public: | |
| TEveProjection(); | | TEveProjection(); | |
| virtual ~TEveProjection() {} | | virtual ~TEveProjection() {} | |
| | | | |
|
| virtual void ProjectPoint(Float_t&, Float_t&, Float_t&, EPProc_e | | virtual Bool_t Is2D() const = 0; | |
| p = kPP_Full ) = 0; | | virtual Bool_t Is3D() const = 0; | |
| virtual void ProjectPointFv(Float_t* v) { ProjectPoint(v[0], v[1] | | | |
| , v[2]); } | | virtual void ProjectPoint(Float_t& x, Float_t& y, Float_t& z, Flo | |
| virtual void ProjectVector(TEveVector& v); | | at_t d, EPProc_e p = kPP_Full) = 0; | |
| | | virtual void ProjectPointfv(Float_t* v, Float_t d); | |
| | | virtual void ProjectPointdv(Double_t* v, Float_t d); | |
| | | virtual void ProjectVector(TEveVector& v, Float_t d); | |
| | | | |
|
| const char* GetName() { return fName.Data(); } | | const Char_t* GetName() const { return fName.Data(); } | |
| void SetName(const char* txt) { fName = txt; } | | void SetName(const Char_t* txt) { fName = txt; } | |
| | | | |
|
| virtual void SetCenter(TEveVector& v) { fCenter = v; UpdateLimit( | | virtual void SetCenter(TEveVector& v) { fCenter = v; UpdateLimi | |
| ); } | | t(); } | |
| virtual Float_t* GetProjectedCenter() { return fCenter.Arr(); } | | virtual Float_t* GetProjectedCenter() { return fCenter.Arr(); } | |
| | | | |
|
| void SetType(EPType_e t) { fType = t; } | | void SetType(EPType_e t) { fType = t; } | |
| EPType_e GetType() { return fType; } | | EPType_e GetType() const { return fType; } | |
| | | | |
|
| void SetGeoMode(EGeoMode_e m) { fGeoMode = m; } | | void SetGeoMode(EGeoMode_e m) { fGeoMode = m; } | |
| EGeoMode_e GetGeoMode() { return fGeoMode; } | | EGeoMode_e GetGeoMode() const { return fGeoMode; } | |
| | | | |
| virtual void UpdateLimit(); | | virtual void UpdateLimit(); | |
| | | | |
| Bool_t GetUsePreScale() const { return fUsePreScale; } | | Bool_t GetUsePreScale() const { return fUsePreScale; } | |
| void SetUsePreScale(Bool_t x) { fUsePreScale = x; } | | void SetUsePreScale(Bool_t x) { fUsePreScale = x; } | |
| | | | |
| void PreScalePoint(Float_t& x, Float_t& y); | | void PreScalePoint(Float_t& x, Float_t& y); | |
|
| | | void PreScalePoint(Float_t& x, Float_t& y, Float_t& z); | |
| void AddPreScaleEntry(Int_t coord, Float_t max_val, Float_t scale); | | void AddPreScaleEntry(Int_t coord, Float_t max_val, Float_t scale); | |
| void ChangePreScaleEntry(Int_t coord, Int_t entry, Float_t new_scale
); | | void ChangePreScaleEntry(Int_t coord, Int_t entry, Float_t new_scale
); | |
| void ClearPreScales(); | | void ClearPreScales(); | |
| | | | |
| void SetDistortion(Float_t d); | | void SetDistortion(Float_t d); | |
| Float_t GetDistortion() const { return fDistortion; } | | Float_t GetDistortion() const { return fDistortion; } | |
| Float_t GetFixR() const { return fFixR; } | | Float_t GetFixR() const { return fFixR; } | |
| Float_t GetFixZ() const { return fFixZ; } | | Float_t GetFixZ() const { return fFixZ; } | |
| void SetFixR(Float_t x); | | void SetFixR(Float_t x); | |
| void SetFixZ(Float_t x); | | void SetFixZ(Float_t x); | |
| | | | |
| skipping to change at line 132 | | skipping to change at line 137 | |
| // utils to draw axis | | // utils to draw axis | |
| virtual Float_t GetValForScreenPos(Int_t ax, Float_t value); | | virtual Float_t GetValForScreenPos(Int_t ax, Float_t value); | |
| virtual Float_t GetScreenVal(Int_t ax, Float_t value); | | virtual Float_t GetScreenVal(Int_t ax, Float_t value); | |
| Float_t GetLimit(Int_t i, Bool_t pos) { return pos ? fUpLimi
t[i] : fLowLimit[i]; } | | Float_t GetLimit(Int_t i, Bool_t pos) { return pos ? fUpLimi
t[i] : fLowLimit[i]; } | |
| | | | |
| static Float_t fgEps; // resolution of projected points | | static Float_t fgEps; // resolution of projected points | |
| | | | |
| ClassDef(TEveProjection, 0); // Base for specific classes that implement
non-linear projections. | | ClassDef(TEveProjection, 0); // Base for specific classes that implement
non-linear projections. | |
| }; | | }; | |
| | | | |
|
| //////////////////////////////////////////////////////////////// | | //========================================================================= | |
| // // | | ===== | |
| // TEveRhoZProjection // | | // TEveRhoZProjection | |
| // // | | //========================================================================= | |
| //////////////////////////////////////////////////////////////// | | ===== | |
| | | | |
| class TEveRhoZProjection: public TEveProjection | | class TEveRhoZProjection: public TEveProjection | |
| { | | { | |
| private: | | private: | |
| TEveVector fProjectedCenter; // projected center of distortion. | | TEveVector fProjectedCenter; // projected center of distortion. | |
| | | | |
| public: | | public: | |
| TEveRhoZProjection(); | | TEveRhoZProjection(); | |
| virtual ~TEveRhoZProjection() {} | | virtual ~TEveRhoZProjection() {} | |
| | | | |
|
| virtual void ProjectPoint(Float_t& x, Float_t& y, Float_t& z, EPP | | virtual Bool_t Is2D() const { return kTRUE; } | |
| roc_e proc = kPP_Full); | | virtual Bool_t Is3D() const { return kFALSE; } | |
| | | | |
| | | virtual void ProjectPoint(Float_t& x, Float_t& y, Float_t& z, Flo | |
| | | at_t d, EPProc_e proc = kPP_Full); | |
| | | | |
| virtual void SetCenter(TEveVector& center); | | virtual void SetCenter(TEveVector& center); | |
| virtual Float_t* GetProjectedCenter() { return fProjectedCenter.Arr()
; } | | virtual Float_t* GetProjectedCenter() { return fProjectedCenter.Arr()
; } | |
| | | | |
| virtual void UpdateLimit(); | | virtual void UpdateLimit(); | |
| | | | |
| virtual Bool_t AcceptSegment(TEveVector& v1, TEveVector& v2, Float_
t tolerance); | | virtual Bool_t AcceptSegment(TEveVector& v1, TEveVector& v2, Float_
t tolerance); | |
| virtual void SetDirectionalVector(Int_t screenAxis, TEveVector& v
ec); | | virtual void SetDirectionalVector(Int_t screenAxis, TEveVector& v
ec); | |
| | | | |
| ClassDef(TEveRhoZProjection, 0); // Rho/Z non-linear projection. | | ClassDef(TEveRhoZProjection, 0); // Rho/Z non-linear projection. | |
| }; | | }; | |
| | | | |
|
| //////////////////////////////////////////////////////////////// | | //========================================================================= | |
| // // | | ===== | |
| // TEveRPhiProjection // | | // TEveRPhiProjection | |
| // // | | //========================================================================= | |
| //////////////////////////////////////////////////////////////// | | ===== | |
| | | | |
| class TEveRPhiProjection : public TEveProjection | | class TEveRPhiProjection : public TEveProjection | |
| { | | { | |
| public: | | public: | |
| TEveRPhiProjection(); | | TEveRPhiProjection(); | |
| virtual ~TEveRPhiProjection() {} | | virtual ~TEveRPhiProjection() {} | |
| | | | |
|
| virtual void ProjectPoint(Float_t& x, Float_t& y, Float_t& z, EPProc_e p | | virtual Bool_t Is2D() const { return kTRUE; } | |
| roc = kPP_Full); | | virtual Bool_t Is3D() const { return kFALSE; } | |
| | | | |
| | | virtual void ProjectPoint(Float_t& x, Float_t& y, Float_t& z, Float_t | |
| | | d, EPProc_e proc = kPP_Full); | |
| | | | |
| ClassDef(TEveRPhiProjection, 0); // XY non-linear projection. | | ClassDef(TEveRPhiProjection, 0); // XY non-linear projection. | |
| }; | | }; | |
| | | | |
|
| | | //========================================================================= | |
| | | ===== | |
| | | // TEve3DProjection | |
| | | //========================================================================= | |
| | | ===== | |
| | | | |
| | | class TEve3DProjection : public TEveProjection | |
| | | { | |
| | | public: | |
| | | TEve3DProjection(); | |
| | | virtual ~TEve3DProjection() {} | |
| | | | |
| | | virtual Bool_t Is2D() const { return kFALSE; } | |
| | | virtual Bool_t Is3D() const { return kTRUE; } | |
| | | | |
| | | virtual void ProjectPoint(Float_t& x, Float_t& y, Float_t& z, Float_t | |
| | | d, EPProc_e proc = kPP_Full); | |
| | | | |
| | | ClassDef(TEve3DProjection, 0); // 3D scaling "projection" | |
| | | }; | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 16 change blocks. |
| 40 lines changed or deleted | | 74 lines changed or added | |
|
| TEveTrack.h | | TEveTrack.h | |
|
| // @(#)root/eve:$Id: TEveTrack.h 29816 2009-08-18 15:51:02Z matevz $ | | // @(#)root/eve:$Id: TEveTrack.h 30840 2009-10-23 09:03:14Z 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 116 | | skipping to change at line 116 | |
| //------------------------------------------------------------------- | | //------------------------------------------------------------------- | |
| | | | |
| virtual void SecSelected(TEveTrack*); // *SIGNAL* | | virtual void SecSelected(TEveTrack*); // *SIGNAL* | |
| virtual void SetLineStyle(Style_t lstyle); | | virtual void SetLineStyle(Style_t lstyle); | |
| | | | |
| virtual const TGPicture* GetListTreeIcon(Bool_t open=kFALSE); | | virtual const TGPicture* GetListTreeIcon(Bool_t open=kFALSE); | |
| | | | |
| virtual void CopyVizParams(const TEveElement* el); | | virtual void CopyVizParams(const TEveElement* el); | |
| virtual void WriteVizParams(ostream& out, const TString& var); | | virtual void WriteVizParams(ostream& out, const TString& var); | |
| | | | |
|
| virtual TClass* ProjectedClass() const; | | virtual TClass* ProjectedClass(const TEveProjection* p) const; | |
| | | | |
| Bool_t ShouldBreakTrack() const; | | Bool_t ShouldBreakTrack() const; | |
| | | | |
| UChar_t GetBreakProjectedTracks() const { return fBreakProjectedTrac
ks; } | | UChar_t GetBreakProjectedTracks() const { return fBreakProjectedTrac
ks; } | |
| void SetBreakProjectedTracks(UChar_t bt) { fBreakProjectedTracks = bt
; } | | void SetBreakProjectedTracks(UChar_t bt) { fBreakProjectedTracks = bt
; } | |
| | | | |
| static Bool_t GetDefaultBreakProjectedTracks() { return fgDefau
ltBreakProjectedTracks; } | | static Bool_t GetDefaultBreakProjectedTracks() { return fgDefau
ltBreakProjectedTracks; } | |
| static void SetDefaultBreakProjectedTracks(Bool_t bt) { fgDefaultBreak
ProjectedTracks = bt; } | | static void SetDefaultBreakProjectedTracks(Bool_t bt) { fgDefaultBreak
ProjectedTracks = bt; } | |
| | | | |
| ClassDef(TEveTrack, 1); // Track with given vertex, momentum and optiona
l referece-points (path-marks) along its path. | | ClassDef(TEveTrack, 1); // Track with given vertex, momentum and optiona
l referece-points (path-marks) along its path. | |
| }; | | }; | |
| | | | |
| /**************************************************************************
****/ | | /**************************************************************************
****/ | |
| // TEveTrackList | | // TEveTrackList | |
| /**************************************************************************
****/ | | /**************************************************************************
****/ | |
| | | | |
| class TEveTrackList : public TEveElementList, | | class TEveTrackList : public TEveElementList, | |
|
| public TEveProjectable, | | | |
| public TAttMarker, | | public TAttMarker, | |
| public TAttLine | | public TAttLine | |
| { | | { | |
| friend class TEveTrackListEditor; | | friend class TEveTrackListEditor; | |
| | | | |
| private: | | private: | |
| TEveTrackList(const TEveTrackList&); // Not implemented | | TEveTrackList(const TEveTrackList&); // Not implemented | |
| TEveTrackList& operator=(const TEveTrackList&); // Not implemented | | TEveTrackList& operator=(const TEveTrackList&); // Not implemented | |
| | | | |
| protected: | | protected: | |
| | | | |
| skipping to change at line 222 | | skipping to change at line 221 | |
| Float_t GetLimP() const { return fLimP; } | | Float_t GetLimP() const { return fLimP; } | |
| | | | |
| //------------------------------------------------------------------- | | //------------------------------------------------------------------- | |
| | | | |
| TEveTrack* FindTrackByLabel(Int_t label); // *MENU* | | TEveTrack* FindTrackByLabel(Int_t label); // *MENU* | |
| TEveTrack* FindTrackByIndex(Int_t index); // *MENU* | | TEveTrack* FindTrackByIndex(Int_t index); // *MENU* | |
| | | | |
| virtual void CopyVizParams(const TEveElement* el); | | virtual void CopyVizParams(const TEveElement* el); | |
| virtual void WriteVizParams(ostream& out, const TString& var); | | virtual void WriteVizParams(ostream& out, const TString& var); | |
| | | | |
|
| virtual TClass* ProjectedClass() const; | | virtual TClass* ProjectedClass(const TEveProjection* p) const; | |
| | | | |
| ClassDef(TEveTrackList, 1); // A list of tracks supporting change of com
mon attributes and selection based on track parameters. | | ClassDef(TEveTrackList, 1); // A list of tracks supporting change of com
mon attributes and selection based on track parameters. | |
| }; | | }; | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 4 change blocks. |
| 4 lines changed or deleted | | 3 lines changed or added | |
|
| TEveTrackProjected.h | | TEveTrackProjected.h | |
|
| // @(#)root/eve:$Id: TEveTrackProjected.h 25422 2008-09-16 20:50:49Z matevz
$ | | // @(#)root/eve:$Id: TEveTrackProjected.h 30840 2009-10-23 09:03:14Z 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 38 | | skipping to change at line 38 | |
| | | | |
| Int_t GetBreakPointIdx(Int_t start); | | Int_t GetBreakPointIdx(Int_t start); | |
| void GetBreakPoint(Int_t N, Bool_t back, Float_t& x, Float_t& y, Float_
t& z); | | void GetBreakPoint(Int_t N, Bool_t back, Float_t& x, Float_t& y, Float_
t& z); | |
| | | | |
| TEveVector* fOrigPnts; // original track points | | TEveVector* fOrigPnts; // original track points | |
| | | | |
| protected: | | protected: | |
| std::vector<Int_t> fBreakPoints; // indices of track break-points | | std::vector<Int_t> fBreakPoints; // indices of track break-points | |
| TEveProjection *fProjection; // projection | | TEveProjection *fProjection; // projection | |
| | | | |
|
| | | virtual void SetDepthLocal(Float_t d); | |
| | | | |
| public: | | public: | |
| TEveTrackProjected(); | | TEveTrackProjected(); | |
| virtual ~TEveTrackProjected() {} | | virtual ~TEveTrackProjected() {} | |
| | | | |
| virtual void SetProjection(TEveProjectionManager* mng, TEveProjectable*
model); | | virtual void SetProjection(TEveProjectionManager* mng, TEveProjectable*
model); | |
| | | | |
|
| virtual void SetDepth(Float_t d); | | | |
| | | | |
| virtual void UpdateProjection(); | | virtual void UpdateProjection(); | |
| virtual void MakeTrack(Bool_t recurse=kTRUE); | | virtual void MakeTrack(Bool_t recurse=kTRUE); | |
| | | | |
| void PrintLineSegments(); | | void PrintLineSegments(); | |
| | | | |
| virtual void SecSelected(TEveTrack*); // marked as signal in TEveTrack | | virtual void SecSelected(TEveTrack*); // marked as signal in TEveTrack | |
| | | | |
| ClassDef(TEveTrackProjected, 1); // Projected copy of a TEveTrack. | | ClassDef(TEveTrackProjected, 1); // Projected copy of a TEveTrack. | |
| }; | | }; | |
| | | | |
| | | | |
| skipping to change at line 67 | | skipping to change at line 67 | |
| // TEveTrackListProjected | | // TEveTrackListProjected | |
| /**************************************************************************
****/ | | /**************************************************************************
****/ | |
| | | | |
| class TEveTrackListProjected : public TEveTrackList, | | class TEveTrackListProjected : public TEveTrackList, | |
| public TEveProjected | | public TEveProjected | |
| { | | { | |
| private: | | private: | |
| TEveTrackListProjected(const TEveTrackListProjected&); // Not
implemented | | TEveTrackListProjected(const TEveTrackListProjected&); // Not
implemented | |
| TEveTrackListProjected& operator=(const TEveTrackListProjected&); // Not
implemented | | TEveTrackListProjected& operator=(const TEveTrackListProjected&); // Not
implemented | |
| | | | |
|
| | | protected: | |
| | | virtual void SetDepthLocal(Float_t d); | |
| | | | |
| public: | | public: | |
| TEveTrackListProjected(); | | TEveTrackListProjected(); | |
| virtual ~TEveTrackListProjected() {} | | virtual ~TEveTrackListProjected() {} | |
| | | | |
| virtual void SetProjection(TEveProjectionManager* proj, TEveProjectable*
model); | | virtual void SetProjection(TEveProjectionManager* proj, TEveProjectable*
model); | |
|
| virtual void SetDepth(Float_t d); | | | |
| virtual void UpdateProjection() {} | | virtual void UpdateProjection() {} | |
| | | | |
|
| | | virtual void SetDepth(Float_t d); | |
| virtual void SetDepth(Float_t d, TEveElement* el); | | virtual void SetDepth(Float_t d, TEveElement* el); | |
| | | | |
| ClassDef(TEveTrackListProjected, 1); // Specialization of TEveTrackList
for holding TEveTrackProjected objects. | | ClassDef(TEveTrackListProjected, 1); // Specialization of TEveTrackList
for holding TEveTrackProjected objects. | |
| }; | | }; | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 6 change blocks. |
| 4 lines changed or deleted | | 7 lines changed or added | |
|
| TEveVSD.h | | TEveVSD.h | |
|
| // @(#)root/eve:$Id: TEveVSD.h 27157 2009-01-15 14:05:12Z brun $ | | // @(#)root/eve:$Id: TEveVSD.h 31363 2009-11-21 11:31:07Z 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 25 | | skipping to change at line 25 | |
| #include "TEveUtil.h" | | #include "TEveUtil.h" | |
| #include "TEveVSDStructs.h" | | #include "TEveVSDStructs.h" | |
| #include "TTree.h" | | #include "TTree.h" | |
| | | | |
| class TEveVSD : public TObject | | class TEveVSD : public TObject | |
| { | | { | |
| TEveVSD(const TEveVSD&); // Not implemented | | TEveVSD(const TEveVSD&); // Not implemented | |
| TEveVSD& operator=(const TEveVSD&); // Not implemented | | TEveVSD& operator=(const TEveVSD&); // Not implemented | |
| | | | |
| protected: | | protected: | |
|
| Int_t fBuffSize; | | TFile *fFile; //! | |
| | | TDirectory *fDirectory; //! | |
| | | | |
|
| TFile* fFile; //! | | Int_t fBuffSize; //! | |
| TDirectory* fDirectory; //! | | Int_t fVerbose; //! | |
| | | | |
| public: | | public: | |
| TTree* fTreeK; //! Kinematics. | | TTree* fTreeK; //! Kinematics. | |
| TTree* fTreeH; //! Hits. | | TTree* fTreeH; //! Hits. | |
| TTree* fTreeC; //! Clusters. | | TTree* fTreeC; //! Clusters. | |
| TTree* fTreeR; //! Reconstructed tracks. | | TTree* fTreeR; //! Reconstructed tracks. | |
| TTree* fTreeKK; //! Kinks. | | TTree* fTreeKK; //! Kinks. | |
| TTree* fTreeV0; //! VO's. | | TTree* fTreeV0; //! VO's. | |
| TTree* fTreeCC; //! Cascades. | | TTree* fTreeCC; //! Cascades. | |
| TTree* fTreeGI; //! Sim-Rec cross references. | | TTree* fTreeGI; //! Sim-Rec cross references. | |
| | | | |
| skipping to change at line 51 | | skipping to change at line 52 | |
| TEveHit fH, *fpH; //! | | TEveHit fH, *fpH; //! | |
| TEveCluster fC, *fpC; //! | | TEveCluster fC, *fpC; //! | |
| TEveRecTrack fR, *fpR; //! | | TEveRecTrack fR, *fpR; //! | |
| TEveRecKink fKK, *fpKK; //! | | TEveRecKink fKK, *fpKK; //! | |
| TEveRecV0 fV0, *fpV0; //! | | TEveRecV0 fV0, *fpV0; //! | |
| TEveRecCascade fCC, *fpCC; //! | | TEveRecCascade fCC, *fpCC; //! | |
| TEveMCRecCrossRef fGI, *fpGI; //! | | TEveMCRecCrossRef fGI, *fpGI; //! | |
| | | | |
| public: | | public: | |
| TEveVSD(const char* name="TEveVSD", const char* title=""); | | TEveVSD(const char* name="TEveVSD", const char* title=""); | |
|
| | | virtual ~TEveVSD(); | |
| | | | |
| virtual void SetDirectory(TDirectory* dir); | | virtual void SetDirectory(TDirectory* dir); | |
| | | | |
| virtual void CreateTrees(); | | virtual void CreateTrees(); | |
| virtual void DeleteTrees(); | | virtual void DeleteTrees(); | |
| | | | |
| virtual void CreateBranches(); | | virtual void CreateBranches(); | |
|
| virtual void SetBranchAddresses(); | | | |
| | | | |
| virtual void WriteTrees(); | | virtual void WriteTrees(); | |
|
| virtual void LoadTrees(); | | | |
| | | | |
|
| virtual void LoadVSD(const char* vsd_file_name, | | virtual void LoadTrees(); | |
| const char* dir_name="Event0"); | | virtual void SetBranchAddresses(); | |
| | | | |
| static void DisableTObjectStreamersForVSDStruct(); | | static void DisableTObjectStreamersForVSDStruct(); | |
| | | | |
| ClassDef(TEveVSD, 1); // Visualization Summary Data - a collection of tr
ees holding standard event data in experiment independant format. | | ClassDef(TEveVSD, 1); // Visualization Summary Data - a collection of tr
ees holding standard event data in experiment independant format. | |
| }; | | }; | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 7 change blocks. |
| 9 lines changed or deleted | | 8 lines changed or added | |
|
| TEveViewer.h | | TEveViewer.h | |
|
| // @(#)root/eve:$Id: TEveViewer.h 29323 2009-07-03 10:57:51Z matevz $ | | // @(#)root/eve:$Id: TEveViewer.h 31299 2009-11-18 21:06:28Z 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 56 | | skipping to change at line 56 | |
| TEveViewer(const char* n="TEveViewer", const char* t=""); | | TEveViewer(const char* n="TEveViewer", const char* t=""); | |
| virtual ~TEveViewer(); | | virtual ~TEveViewer(); | |
| | | | |
| virtual void PreUndock(); | | virtual void PreUndock(); | |
| virtual void PostDock(); | | virtual void PostDock(); | |
| | | | |
| TGLViewer* GetGLViewer() const { return fGLViewer; } | | TGLViewer* GetGLViewer() const { return fGLViewer; } | |
| void SetGLViewer(TGLViewer* viewer, TGFrame* frame); | | void SetGLViewer(TGLViewer* viewer, TGFrame* frame); | |
| | | | |
| TGLSAViewer* SpawnGLViewer(TGedEditor* ged); | | TGLSAViewer* SpawnGLViewer(TGedEditor* ged); | |
|
| TGLEmbeddedViewer* SpawnGLEmbeddedViewer(Int_t border=0); | | TGLEmbeddedViewer* SpawnGLEmbeddedViewer(TGedEditor* ged, Int_t border=0
); | |
| | | | |
| void Redraw(Bool_t resetCameras=kFALSE); | | void Redraw(Bool_t resetCameras=kFALSE); | |
| | | | |
| virtual void AddScene(TEveScene* scene); | | virtual void AddScene(TEveScene* scene); | |
| | | | |
| virtual void RemoveElementLocal(TEveElement* el); | | virtual void RemoveElementLocal(TEveElement* el); | |
| virtual void RemoveElementsLocal(); | | virtual void RemoveElementsLocal(); | |
| | | | |
| virtual TObject* GetEditorObject(const TEveException& eh="TEveViewer::Ge
tEditorObject ") const; | | virtual TObject* GetEditorObject(const TEveException& eh="TEveViewer::Ge
tEditorObject ") const; | |
| | | | |
| | | | |
| skipping to change at line 112 | | skipping to change at line 112 | |
| void RepaintChangedViewers(Bool_t resetCameras, Bool_t dropLogicals); | | void RepaintChangedViewers(Bool_t resetCameras, Bool_t dropLogicals); | |
| void RepaintAllViewers(Bool_t resetCameras, Bool_t dropLogicals); | | void RepaintAllViewers(Bool_t resetCameras, Bool_t dropLogicals); | |
| void DeleteAnnotations(); | | void DeleteAnnotations(); | |
| | | | |
| void SceneDestructing(TEveScene* scene); | | void SceneDestructing(TEveScene* scene); | |
| | | | |
| // -------------------------------- | | // -------------------------------- | |
| | | | |
| 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); | |
|
| | | void OnReClicked(TObject *obj, UInt_t button, UInt_t state); | |
| | | void OnUnClicked(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; } | | Float_t GetColorBrightness() const { return fBrightness; } | |
| void SetColorBrightness(Float_t b); | | void SetColorBrightness(Float_t b); | |
| | | | |
| Bool_t UseLightColorSet() const { return fUseLightColorSet; } | | Bool_t UseLightColorSet() const { return fUseLightColorSet; } | |
| | | | |
End of changes. 3 change blocks. |
| 2 lines changed or deleted | | 4 lines changed or added | |
|
| TEventIter.h | | TEventIter.h | |
|
| // @(#)root/proofplayer:$Id: TEventIter.h 29126 2009-06-22 09:05:46Z brun $ | | // @(#)root/proofplayer:$Id: TEventIter.h 30859 2009-10-24 14:53:07Z ganis
$ | |
| // 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 79 | | skipping to change at line 79 | |
| TEntryList *fEntryList; //! entry list for processing | | TEntryList *fEntryList; //! entry list for processing | |
| Long64_t fEntryListPos; //! current position in the entrylist | | Long64_t fEntryListPos; //! current position in the entrylist | |
| | | | |
| Int_t LoadDir(); // Load the directory pointed to by fElem | | Int_t LoadDir(); // Load the directory pointed to by fElem | |
| | | | |
| public: | | public: | |
| TEventIter(); | | TEventIter(); | |
| TEventIter(TDSet *dset, TSelector *sel, Long64_t first, Long64_t num); | | TEventIter(TDSet *dset, TSelector *sel, Long64_t first, Long64_t num); | |
| virtual ~TEventIter(); | | virtual ~TEventIter(); | |
| | | | |
|
| | | virtual Long64_t GetCacheSize() = 0; | |
| | | virtual Int_t GetLearnEntries() = 0; | |
| virtual Long64_t GetNextEvent() = 0; | | virtual Long64_t GetNextEvent() = 0; | |
| virtual void StopProcess(Bool_t abort); | | virtual void StopProcess(Bool_t abort); | |
| | | | |
| static TEventIter *Create(TDSet *dset, TSelector *sel, Long64_t first, L
ong64_t num); | | static TEventIter *Create(TDSet *dset, TSelector *sel, Long64_t first, L
ong64_t num); | |
| | | | |
| ClassDef(TEventIter,0) // Event iterator used by TProofPlayer's | | ClassDef(TEventIter,0) // Event iterator used by TProofPlayer's | |
| }; | | }; | |
| | | | |
| //------------------------------------------------------------------------ | | //------------------------------------------------------------------------ | |
| | | | |
| | | | |
| skipping to change at line 100 | | skipping to change at line 102 | |
| | | | |
| private: | | private: | |
| Long64_t fNum; | | Long64_t fNum; | |
| Long64_t fCurrent; | | Long64_t fCurrent; | |
| | | | |
| public: | | public: | |
| TEventIterUnit(); | | TEventIterUnit(); | |
| TEventIterUnit(TDSet *dset, TSelector *sel, Long64_t num); | | TEventIterUnit(TDSet *dset, TSelector *sel, Long64_t num); | |
| ~TEventIterUnit() { } | | ~TEventIterUnit() { } | |
| | | | |
|
| | | Long64_t GetCacheSize() {return -1;} | |
| | | Int_t GetLearnEntries() {return -1;} | |
| Long64_t GetNextEvent(); | | Long64_t GetNextEvent(); | |
| | | | |
| ClassDef(TEventIterUnit,0) // Event iterator for objects | | ClassDef(TEventIterUnit,0) // Event iterator for objects | |
| }; | | }; | |
| | | | |
| //------------------------------------------------------------------------ | | //------------------------------------------------------------------------ | |
| | | | |
| class TEventIterObj : public TEventIter { | | class TEventIterObj : public TEventIter { | |
| | | | |
| private: | | private: | |
| TString fClassName; // class name of objects to iterate over | | TString fClassName; // class name of objects to iterate over | |
| TList *fKeys; // list of keys | | TList *fKeys; // list of keys | |
| TIter *fNextKey; // next key in directory | | TIter *fNextKey; // next key in directory | |
| TObject *fObj; // object found | | TObject *fObj; // object found | |
| | | | |
| public: | | public: | |
| TEventIterObj(); | | TEventIterObj(); | |
| TEventIterObj(TDSet *dset, TSelector *sel, Long64_t first, Long64_t num)
; | | TEventIterObj(TDSet *dset, TSelector *sel, Long64_t first, Long64_t num)
; | |
| ~TEventIterObj(); | | ~TEventIterObj(); | |
| | | | |
|
| | | Long64_t GetCacheSize() {return -1;} | |
| | | Int_t GetLearnEntries() {return -1;} | |
| Long64_t GetNextEvent(); | | Long64_t GetNextEvent(); | |
| | | | |
| ClassDef(TEventIterObj,0) // Event iterator for objects | | ClassDef(TEventIterObj,0) // Event iterator for objects | |
| }; | | }; | |
| | | | |
| //------------------------------------------------------------------------ | | //------------------------------------------------------------------------ | |
| class TEventIterTree : public TEventIter { | | class TEventIterTree : public TEventIter { | |
| | | | |
| private: | | private: | |
| TString fTreeName; // name of the tree object to iterate over | | TString fTreeName; // name of the tree object to iterate over | |
| 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 fTreeCacheIsLearning; // Whether cache is in learning phase | |
| 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 | |
|
| | | Bool_t fUseParallelUnzip; // Control usage of parallel unzip | |
| 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; | | Bool_t fIsLocal; | |
| TFile *fFile; | | TFile *fFile; | |
| TList *fTrees; | | TList *fTrees; | |
| TFileTree(const char *name, TFile *f, Bool_t islocal); | | TFileTree(const char *name, TFile *f, Bool_t islocal); | |
| virtual ~TFileTree(); | | virtual ~TFileTree(); | |
| }; | | }; | |
| | | | |
| TTree* Load(TDSetElement *elem, Bool_t &localfile); | | 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 GetCacheSize(); | |
| | | Int_t GetLearnEntries(); | |
| Long64_t GetNextEvent(); | | Long64_t GetNextEvent(); | |
| | | | |
| ClassDef(TEventIterTree,0) // Event iterator for Trees | | ClassDef(TEventIterTree,0) // Event iterator for Trees | |
| }; | | }; | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 7 change blocks. |
| 1 lines changed or deleted | | 11 lines changed or added | |
|
| TFile.h | | TFile.h | |
|
| // @(#)root/io:$Id: TFile.h 23122 2008-04-10 14:56:30Z rdm $ | | // @(#)root/io:$Id: TFile.h 30926 2009-10-30 12:50:27Z brun $ | |
| // Author: Rene Brun 28/11/94 | | // Author: Rene Brun 28/11/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 54 | | skipping to change at line 54 | |
| enum EAsyncOpenStatus { kAOSNotAsync = -1, kAOSFailure = 0, | | enum EAsyncOpenStatus { kAOSNotAsync = -1, kAOSFailure = 0, | |
| kAOSInProgress = 1, kAOSSuccess = 2 }; | | kAOSInProgress = 1, kAOSSuccess = 2 }; | |
| // Open timeout constants | | // Open timeout constants | |
| enum EOpenTimeOut { kInstantTimeout = 0, kEternalTimeout = 999999999 }; | | enum EOpenTimeOut { kInstantTimeout = 0, kEternalTimeout = 999999999 }; | |
| | | | |
| protected: | | protected: | |
| Double_t fSumBuffer; //Sum of buffer sizes of objects writt
en so far | | Double_t fSumBuffer; //Sum of buffer sizes of objects writt
en so far | |
| Double_t fSum2Buffer; //Sum of squares of buffer sizes of ob
jects written so far | | Double_t fSum2Buffer; //Sum of squares of buffer sizes of ob
jects written so far | |
| Long64_t fBytesWrite; //Number of bytes written to this file | | Long64_t fBytesWrite; //Number of bytes written to this file | |
| Long64_t fBytesRead; //Number of bytes read from this file | | Long64_t fBytesRead; //Number of bytes read from this file | |
|
| | | Long64_t fBytesReadExtra; //Number of extra bytes (overhead) rea
d by the readahead buffer | |
| Long64_t fBEGIN; //First used byte in file | | Long64_t fBEGIN; //First used byte in file | |
| Long64_t fEND; //Last used byte in file | | Long64_t fEND; //Last used byte in file | |
| Long64_t fSeekFree; //Location on disk of free segments st
ructure | | Long64_t fSeekFree; //Location on disk of free segments st
ructure | |
| Long64_t fSeekInfo; //Location on disk of StreamerInfo rec
ord | | Long64_t fSeekInfo; //Location on disk of StreamerInfo rec
ord | |
| Int_t fD; //File descriptor | | Int_t fD; //File descriptor | |
| Int_t fVersion; //File format version | | Int_t fVersion; //File format version | |
| Int_t fCompress; //Compression level from 0(not compres
sed) to 9 (max compression) | | Int_t fCompress; //Compression level from 0(not compres
sed) to 9 (max compression) | |
| Int_t fNbytesFree; //Number of bytes for free segments st
ructure | | Int_t fNbytesFree; //Number of bytes for free segments st
ructure | |
| Int_t fNbytesInfo; //Number of bytes for StreamerInfo rec
ord | | Int_t fNbytesInfo; //Number of bytes for StreamerInfo rec
ord | |
| Int_t fWritten; //Number of objects written so far | | Int_t fWritten; //Number of objects written so far | |
| | | | |
| skipping to change at line 94 | | skipping to change at line 95 | |
| TUrl fUrl; //!URL of file | | TUrl fUrl; //!URL of file | |
| | | | |
| TList *fInfoCache; //!Cached list of the streamer infos i
n this file | | TList *fInfoCache; //!Cached list of the streamer infos i
n this file | |
| TList *fOpenPhases; //!Time info about open phases | | TList *fOpenPhases; //!Time info about open phases | |
| | | | |
| static TList *fgAsyncOpenRequests; //List of handles for pending open
requests | | static TList *fgAsyncOpenRequests; //List of handles for pending open
requests | |
| | | | |
| static TString fgCacheFileDir; //Directory where to locally s
tage files | | static TString fgCacheFileDir; //Directory where to locally s
tage files | |
| static Bool_t fgCacheFileDisconnected; //Indicates, we trust in the f
iles in the cache dir without stat on the cached file | | static Bool_t fgCacheFileDisconnected; //Indicates, we trust in the f
iles in the cache dir without stat on the cached file | |
| static Bool_t fgCacheFileForce; //Indicates, to force all READ
to CACHEREAD | | static Bool_t fgCacheFileForce; //Indicates, to force all READ
to CACHEREAD | |
|
| static UInt_t fgOpenTimeout; //Timeout for open operations in ms - 0 | | static UInt_t fgOpenTimeout; //Timeout for open operations | |
| corresponds to blocking i/o | | in ms - 0 corresponds to blocking i/o | |
| static Bool_t fgOnlyStaged ; //Before the file is opened, it is check | | static Bool_t fgOnlyStaged ; //Before the file is opened, i | |
| ed, that the file is staged, if not, the open fails | | t is checked, that the file is staged, if not, the open fails | |
| static Long64_t fgBytesWrite; //Number of bytes written by all TFile o | | static Long64_t fgBytesWrite; //Number of bytes written by a | |
| bjects | | ll TFile objects | |
| static Long64_t fgBytesRead; //Number of bytes read by all TFile obje | | static Long64_t fgBytesRead; //Number of bytes read by all | |
| cts | | TFile objects | |
| static Long64_t fgFileCounter; //Counter for all opened files | | static Long64_t fgFileCounter; //Counter for all opened files | |
| static Int_t fgReadCalls; //Number of bytes read from all TFile ob | | static Int_t fgReadCalls; //Number of bytes read from al | |
| jects | | l TFile objects | |
| static Bool_t fgReadInfo; //if true (default) ReadStreamerInfo is | | static Int_t fgReadaheadSize; //Readahead buffer size | |
| called when opening a file | | static Bool_t fgReadInfo; //if true (default) ReadStream | |
| | | erInfo is called when opening a file | |
| | | | |
| virtual EAsyncOpenStatus GetAsyncOpenStatus() { return fAsyncOpenStatus;
} | | virtual EAsyncOpenStatus GetAsyncOpenStatus() { return fAsyncOpenStatus;
} | |
|
| Long64_t GetRelOffset() const { return fOffset - fArchiveOffset; } | | | |
| virtual void Init(Bool_t create); | | virtual void Init(Bool_t create); | |
| Bool_t FlushWriteCache(); | | Bool_t FlushWriteCache(); | |
| Int_t ReadBufferViaCache(char *buf, Int_t len); | | Int_t ReadBufferViaCache(char *buf, Int_t len); | |
| Int_t WriteBufferViaCache(const char *buf, Int_t len); | | Int_t WriteBufferViaCache(const char *buf, Int_t len); | |
| | | | |
| // Interface to basic system I/O routines | | // Interface to basic system I/O routines | |
| virtual Int_t SysOpen(const char *pathname, Int_t flags, UInt_t mode)
; | | virtual Int_t SysOpen(const char *pathname, Int_t flags, UInt_t mode)
; | |
| virtual Int_t SysClose(Int_t fd); | | virtual Int_t SysClose(Int_t fd); | |
| virtual Int_t SysRead(Int_t fd, void *buf, Int_t len); | | virtual Int_t SysRead(Int_t fd, void *buf, Int_t len); | |
| virtual Int_t SysWrite(Int_t fd, const void *buf, Int_t len); | | virtual Int_t SysWrite(Int_t fd, const void *buf, Int_t len); | |
| | | | |
| skipping to change at line 180 | | skipping to change at line 181 | |
| virtual Int_t GetErrno() const; | | virtual Int_t GetErrno() const; | |
| virtual void ResetErrno() const; | | virtual void ResetErrno() const; | |
| Int_t GetFd() const { return fD; } | | Int_t GetFd() const { return fD; } | |
| virtual const TUrl *GetEndpointUrl() const { return &fUrl; } | | virtual const TUrl *GetEndpointUrl() const { return &fUrl; } | |
| TObjArray *GetListOfProcessIDs() const {return fProcessIDs;} | | TObjArray *GetListOfProcessIDs() const {return fProcessIDs;} | |
| TList *GetListOfFree() const { return fFree; } | | TList *GetListOfFree() const { return fFree; } | |
| virtual Int_t GetNfree() const { return fFree->GetSize(); } | | virtual Int_t GetNfree() const { return fFree->GetSize(); } | |
| virtual Int_t GetNProcessIDs() const { return fNProcessIDs; } | | virtual Int_t GetNProcessIDs() const { return fNProcessIDs; } | |
| Option_t *GetOption() const { return fOption.Data(); } | | Option_t *GetOption() const { return fOption.Data(); } | |
| virtual Long64_t GetBytesRead() const { return fBytesRead; } | | virtual Long64_t GetBytesRead() const { return fBytesRead; } | |
|
| | | virtual Long64_t GetBytesReadExtra() const { return fBytesReadExtra;
} | |
| virtual Long64_t GetBytesWritten() const; | | virtual Long64_t GetBytesWritten() const; | |
| virtual Int_t GetReadCalls() const { return fReadCalls; } | | virtual Int_t GetReadCalls() const { return fReadCalls; } | |
| Int_t GetVersion() const { return fVersion; } | | Int_t GetVersion() const { return fVersion; } | |
| Int_t GetRecordHeader(char *buf, Long64_t first, Int_t max
bytes, | | Int_t GetRecordHeader(char *buf, Long64_t first, Int_t max
bytes, | |
| Int_t &nbytes, Int_t &objlen, Int_t
&keylen); | | Int_t &nbytes, Int_t &objlen, Int_t
&keylen); | |
| virtual Int_t GetNbytesInfo() const {return fNbytesInfo;} | | virtual Int_t GetNbytesInfo() const {return fNbytesInfo;} | |
| virtual Int_t GetNbytesFree() const {return fNbytesFree;} | | virtual Int_t GetNbytesFree() const {return fNbytesFree;} | |
|
| | | Long64_t GetRelOffset() const { return fOffset - fArchiveOffs
et; } | |
| virtual Long64_t GetSeekFree() const {return fSeekFree;} | | virtual Long64_t GetSeekFree() const {return fSeekFree;} | |
| virtual Long64_t GetSeekInfo() const {return fSeekInfo;} | | virtual Long64_t GetSeekInfo() const {return fSeekInfo;} | |
| virtual Long64_t GetSize() const; | | virtual Long64_t GetSize() const; | |
| virtual TList *GetStreamerInfoList(); | | virtual TList *GetStreamerInfoList(); | |
| const TList *GetStreamerInfoCache(); | | const TList *GetStreamerInfoCache(); | |
| virtual void IncrementProcessIDs() { fNProcessIDs++; } | | virtual void IncrementProcessIDs() { fNProcessIDs++; } | |
| virtual Bool_t IsArchive() const { return fIsArchive; } | | virtual Bool_t IsArchive() const { return fIsArchive; } | |
| Bool_t IsBinary() const { return TestBit(kBinaryFile); } | | Bool_t IsBinary() const { return TestBit(kBinaryFile); } | |
| Bool_t IsRaw() const { return !fIsRootFile; } | | Bool_t IsRaw() const { return !fIsRootFile; } | |
| virtual Bool_t IsOpen() const; | | virtual Bool_t IsOpen() const; | |
| | | | |
| skipping to change at line 251 | | skipping to change at line 254 | |
| | | | |
| static EFileType GetType(const char *name, Option_t *option = "", TSt
ring *prefix = 0); | | static EFileType GetType(const char *name, Option_t *option = "", TSt
ring *prefix = 0); | |
| | | | |
| static EAsyncOpenStatus GetAsyncOpenStatus(const char *name); | | static EAsyncOpenStatus GetAsyncOpenStatus(const char *name); | |
| static EAsyncOpenStatus GetAsyncOpenStatus(TFileOpenHandle *handle); | | static EAsyncOpenStatus GetAsyncOpenStatus(TFileOpenHandle *handle); | |
| static const TUrl *GetEndpointUrl(const char *name); | | static const TUrl *GetEndpointUrl(const char *name); | |
| | | | |
| static Long64_t GetFileBytesRead(); | | static Long64_t GetFileBytesRead(); | |
| static Long64_t GetFileBytesWritten(); | | static Long64_t GetFileBytesWritten(); | |
| static Int_t GetFileReadCalls(); | | static Int_t GetFileReadCalls(); | |
|
| | | static Int_t GetReadaheadSize(); | |
| | | | |
| static void SetFileBytesRead(Long64_t bytes = 0); | | static void SetFileBytesRead(Long64_t bytes = 0); | |
| static void SetFileBytesWritten(Long64_t bytes = 0); | | static void SetFileBytesWritten(Long64_t bytes = 0); | |
| static void SetFileReadCalls(Int_t readcalls = 0); | | static void SetFileReadCalls(Int_t readcalls = 0); | |
|
| | | static void SetReadaheadSize(Int_t bufsize = 256000); | |
| static void SetReadStreamerInfo(Bool_t readinfo=kTRUE); | | static void SetReadStreamerInfo(Bool_t readinfo=kTRUE); | |
| | | | |
| static Long64_t GetFileCounter(); | | static Long64_t GetFileCounter(); | |
| static void IncrementFileCounter(); | | static void IncrementFileCounter(); | |
| | | | |
| static Bool_t SetCacheFileDir(const char *cacheDir, Bool_t operate
Disconnected = kTRUE, | | static Bool_t SetCacheFileDir(const char *cacheDir, Bool_t operate
Disconnected = kTRUE, | |
| Bool_t forceCacheread = kFALSE); | | Bool_t forceCacheread = kFALSE); | |
| static const char *GetCacheFileDir(); | | static const char *GetCacheFileDir(); | |
| static Bool_t ShrinkCacheFileDir(Long64_t shrinkSize, Long_t clean
upInteval = 0); | | static Bool_t ShrinkCacheFileDir(Long64_t shrinkSize, Long_t clean
upInteval = 0); | |
| static Bool_t Cp(const char *src, const char *dst, Bool_t progress
bar = kTRUE, | | static Bool_t Cp(const char *src, const char *dst, Bool_t progress
bar = kTRUE, | |
| UInt_t buffersize = 1000000); | | UInt_t buffersize = 1000000); | |
| | | | |
| static UInt_t SetOpenTimeout(UInt_t timeout); // in ms | | static UInt_t SetOpenTimeout(UInt_t timeout); // in ms | |
| static UInt_t GetOpenTimeout(); // in ms | | static UInt_t GetOpenTimeout(); // in ms | |
| static Bool_t SetOnlyStaged(Bool_t onlystaged); | | static Bool_t SetOnlyStaged(Bool_t onlystaged); | |
| static Bool_t GetOnlyStaged(); | | static Bool_t GetOnlyStaged(); | |
| | | | |
|
| ClassDef(TFile,7) //ROOT file | | ClassDef(TFile,8) //ROOT file | |
| }; | | }; | |
| | | | |
| // | | // | |
| // Class holding info about the file being opened | | // Class holding info about the file being opened | |
| // | | // | |
| class TFileOpenHandle : public TNamed { | | class TFileOpenHandle : public TNamed { | |
| | | | |
| friend class TFile; | | friend class TFile; | |
| friend class TAlienFile; | | friend class TAlienFile; | |
| | | | |
| | | | |
End of changes. 9 change blocks. |
| 16 lines changed or deleted | | 21 lines changed or added | |
|
| TFitEditor.h | | TFitEditor.h | |
|
| // @(#)root/fitpanel:$Id: TFitEditor.h 30461 2009-09-25 16:01:13Z moneta $ | | // @(#)root/fitpanel:$Id: TFitEditor.h 31212 2009-11-16 17:30:21Z 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 35 | | skipping to change at line 35 | |
| #endif | | #endif | |
| #ifndef ROOT_TGButton | | #ifndef ROOT_TGButton | |
| #include "TGButton.h" | | #include "TGButton.h" | |
| #endif | | #endif | |
| | | | |
| #include "Foption.h" | | #include "Foption.h" | |
| #include "Math/MinimizerOptions.h" | | #include "Math/MinimizerOptions.h" | |
| #include "Fit/DataRange.h" | | #include "Fit/DataRange.h" | |
| | | | |
| #include <vector> | | #include <vector> | |
|
| | | #include <map> | |
| | | #include <utility> | |
| | | | |
| //--- Object types | | //--- Object types | |
| enum EObjectType { | | enum EObjectType { | |
| kObjectHisto, | | kObjectHisto, | |
| kObjectGraph, | | kObjectGraph, | |
| kObjectGraph2D, | | kObjectGraph2D, | |
| kObjectHStack, | | kObjectHStack, | |
| kObjectTree, | | kObjectTree, | |
| kObjectMultiGraph | | kObjectMultiGraph | |
| }; | | }; | |
| | | | |
| skipping to change at line 67 | | skipping to change at line 69 | |
| class TAxis; | | class TAxis; | |
| class TF1; | | class TF1; | |
| | | | |
| class TFitEditor : public TGMainFrame { | | class TFitEditor : public TGMainFrame { | |
| | | | |
| protected: | | protected: | |
| TGTab *fTab; // tab widget holding the editor | | TGTab *fTab; // tab widget holding the editor | |
| TGCompositeFrame *fTabContainer; // main tab container | | TGCompositeFrame *fTabContainer; // main tab container | |
| TGCompositeFrame *fGeneral; // general tab | | TGCompositeFrame *fGeneral; // general tab | |
| TGCompositeFrame *fMinimization; // minimization tab | | TGCompositeFrame *fMinimization; // minimization tab | |
|
| | | TGTextButton *fUpdateButton; // updates data from gROOT and g
Directory | |
| TGTextButton *fFitButton; // performs fitting | | TGTextButton *fFitButton; // performs fitting | |
| TGTextButton *fResetButton; // resets fit parameters | | TGTextButton *fResetButton; // resets fit parameters | |
| TGTextButton *fCloseButton; // close the fit panel | | TGTextButton *fCloseButton; // close the fit panel | |
| TGLabel *fSelLabel; // contains selected fit functio
n | | TGLabel *fSelLabel; // contains selected fit functio
n | |
| TGComboBox *fDataSet; // contains list of data set to
be fitted | | TGComboBox *fDataSet; // contains list of data set to
be fitted | |
| TGComboBox *fTypeFit; // contains the types of functio
ns to be selected | | TGComboBox *fTypeFit; // contains the types of functio
ns to be selected | |
| TGComboBox *fFuncList; // contains function list | | TGComboBox *fFuncList; // contains function list | |
| TGTextEntry *fEnteredFunc; // contains user function file n
ame | | TGTextEntry *fEnteredFunc; // contains user function file n
ame | |
| TGTextButton *fUserButton; // opens a dialog for user-defin
ed fit method | | TGTextButton *fUserButton; // opens a dialog for user-defin
ed fit method | |
| TGRadioButton *fNone; // set no operation mode | | TGRadioButton *fNone; // set no operation mode | |
| | | | |
| skipping to change at line 128 | | skipping to change at line 131 | |
| TAxis *fZaxis; // z-axis | | TAxis *fZaxis; // z-axis | |
| | | | |
| // structure holding parameter value and limits | | // structure holding parameter value and limits | |
| struct FuncParamData_t { | | struct FuncParamData_t { | |
| FuncParamData_t() { | | FuncParamData_t() { | |
| fP[0] = 0; fP[1] = 0; fP[2] = 0; | | fP[0] = 0; fP[1] = 0; fP[2] = 0; | |
| } | | } | |
| 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::multimap<TObject*, TF1*> fPrevFit; // Previous succesful fits. | |
| | | std::vector<TF1*> fSystemFuncs; // functions managed by the fitp | |
| | | anel | |
| | | | |
| 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 *fLibGSL; // set GSL as minimization libra
ry | | TGRadioButton *fLibGSL; // set GSL as minimization libra
ry | |
| TGRadioButton *fLibGenetics; // set Genetic/GALib as minimiza
tion library | | TGRadioButton *fLibGenetics; // set Genetic/GALib as minimiza
tion library | |
| TGComboBox *fMinMethodList; // set the minimization method | | TGComboBox *fMinMethodList; // set the minimization method | |
| 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); | | protected: | |
| | | void GetFunctionsFromSystem(); | |
| | | void ProcessTreeInput(TObject* objSelected, Int_t selected, | |
| | | TString variables, TString cuts); | |
| | | TF1* FindFunction(); | |
| | | void FillDataSetList(); | |
| TGComboBox* BuildMethodList(TGFrame *parent, Int_t id); | | TGComboBox* BuildMethodList(TGFrame *parent, Int_t id); | |
| void GetRanges(ROOT::Fit::DataRange&); | | void GetRanges(ROOT::Fit::DataRange&); | |
| TF1* GetFitFunction(); | | TF1* GetFitFunction(); | |
| TList* GetFitObjectListOfFunctions(); | | TList* GetFitObjectListOfFunctions(); | |
| void DrawSelection(bool restore = false); | | void DrawSelection(bool restore = false); | |
| Int_t CheckFunctionString(const char* str); | | Int_t CheckFunctionString(const char* str); | |
| void CreateFunctionGroup(); | | void CreateFunctionGroup(); | |
| void CreateGeneralTab(); | | void CreateGeneralTab(); | |
| void CreateMinimizationTab(); | | void CreateMinimizationTab(); | |
| void MakeTitle(TGCompositeFrame *parent, const char *title); | | void MakeTitle(TGCompositeFrame *parent, const char *title); | |
| | | | |
| skipping to change at line 170 | | skipping to change at line 179 | |
| private: | | private: | |
| TFitEditor(const TFitEditor&); // not implemented | | TFitEditor(const TFitEditor&); // not implemented | |
| TFitEditor& operator=(const TFitEditor&); // not implemented | | TFitEditor& operator=(const TFitEditor&); // not implemented | |
| | | | |
| void RetrieveOptions(Foption_t&, TString&, ROOT::Math::MinimizerOptions&
, Int_t); | | void RetrieveOptions(Foption_t&, TString&, ROOT::Math::MinimizerOptions&
, Int_t); | |
| | | | |
| public: | | public: | |
| TFitEditor(TVirtualPad* pad, TObject *obj); | | TFitEditor(TVirtualPad* pad, TObject *obj); | |
| virtual ~TFitEditor(); | | virtual ~TFitEditor(); | |
| | | | |
|
| // static TFitEditor *&GetFP(); | | TList* GetListOfFittingFunctions(TObject* obj = 0); | |
| static TFitEditor *GetInstance(TVirtualPad* pad, TObject *obj); | | | |
| | | static TFitEditor *GetInstance(TVirtualPad* pad = 0, TObject *obj = 0); | |
| virtual Option_t *GetDrawOption() const; | | virtual Option_t *GetDrawOption() const; | |
| virtual void Hide(); | | virtual void Hide(); | |
| virtual void Show(TVirtualPad* pad, TObject *obj); | | virtual void Show(TVirtualPad* pad, TObject *obj); | |
| | | | |
| void ShowObjectName(TObject* obj); | | void ShowObjectName(TObject* obj); | |
| Bool_t SetObjectType(TObject* obj); | | Bool_t SetObjectType(TObject* obj); | |
| virtual void Terminate(); | | virtual void Terminate(); | |
| void UpdateGUI(); | | void UpdateGUI(); | |
| | | | |
| virtual void CloseWindow(); | | virtual void CloseWindow(); | |
| | | | |
| skipping to change at line 202 | | skipping to change at line 212 | |
| | | | |
| // 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); | | 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 DoUpdate(); | |
| 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); | |
| virtual void DoLinearFit(); | | virtual void DoLinearFit(); | |
| virtual void DoNoChi2(); | | virtual void DoNoChi2(); | |
| virtual void DoNoSelection(); | | virtual void DoNoSelection(); | |
| virtual void DoNoStoreDrawing(); | | virtual void DoNoStoreDrawing(); | |
| virtual void DoReset(); | | virtual void DoReset(); | |
| virtual void DoSetParameters(); | | virtual void DoSetParameters(); | |
| | | | |
| skipping to change at line 228 | | skipping to change at line 239 | |
| 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(Int_t ); | | 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; | |
| | | | |
|
| | | friend class FitEditorUnitTesting; | |
| ClassDef(TFitEditor,0) //Fit Panel interface | | ClassDef(TFitEditor,0) //Fit Panel interface | |
| }; | | }; | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 9 change blocks. |
| 6 lines changed or deleted | | 19 lines changed or added | |
|
| TGLAnnotation.h | | TGLAnnotation.h | |
|
| // @(#)root/gl:$Id: TGLAnnotation.h 27560 2009-02-20 21:41:28Z matevz $ | | // @(#)root/gl:$Id: TGLAnnotation.h 30994 2009-11-05 17:20:24Z matevz $ | |
| // Author: Matevz and Alja Tadel 20/02/2009 | | // Author: Matevz and Alja Tadel 20/02/2009 | |
| | | | |
| /************************************************************************* | | /************************************************************************* | |
| * 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 33 | | skipping to change at line 33 | |
| class TGMainFrame; | | class TGMainFrame; | |
| | | | |
| class TGLAnnotation : public TGLOverlayElement | | class TGLAnnotation : public TGLOverlayElement | |
| { | | { | |
| private: | | private: | |
| TGLAnnotation(const TGLAnnotation&); // Not implemented | | TGLAnnotation(const TGLAnnotation&); // Not implemented | |
| TGLAnnotation& operator=(const TGLAnnotation&); // Not implemented | | TGLAnnotation& operator=(const TGLAnnotation&); // Not implemented | |
| | | | |
| void MakeEditor(); | | void MakeEditor(); | |
| | | | |
|
| protected: | | | |
| TGMainFrame *fMainFrame; | | | |
| TGTextEdit *fTextEdit; | | | |
| | | | |
| TGLViewer *fParent; | | | |
| | | | |
| TString fText; // annotation text | | | |
| Float_t fLabelFontSize; // relative font size | | | |
| TGLFont fLabelFont; // font used to render labels | | | |
| TGLFont fMenuFont; // font used to render menu buttons | | | |
| | | | |
| Pixel_t fBackColor; // background color | | | |
| Pixel_t fBackHighColor; // background active color | | | |
| Pixel_t fTextColor; // text color | | | |
| Pixel_t fTextHighColor; // text active color | | | |
| Float_t fAlpha; // label transparency | | | |
| | | | |
| Float_t fPosX; // x position [0, 1] | | Float_t fPosX; // x position [0, 1] | |
| Float_t fPosY; // y position [0, 1] | | Float_t fPosY; // y position [0, 1] | |
| | | | |
| Int_t fMouseX, fMouseY; //! last mouse position | | Int_t fMouseX, fMouseY; //! last mouse position | |
| Bool_t fInDrag; //! | | Bool_t fInDrag; //! | |
|
| | | Float_t fDrawW, fDrawH; //! width/height of drawn annotation | |
| | | Float_t fDrawY; //! y-position of annotation box | |
| | | | |
| TGLVector3 fPointer; // picked location in 3D space | | TGLVector3 fPointer; // picked location in 3D space | |
| Bool_t fActive; // active item identifier | | Bool_t fActive; // active item identifier | |
| | | | |
|
| | | TGMainFrame *fMainFrame; // editors | |
| | | TGTextEdit *fTextEdit; // editors | |
| | | | |
| | | static Color_t fgBackColor; | |
| | | static Color_t fgTextColor; | |
| | | | |
| | | protected: | |
| | | TGLViewer *fParent; | |
| | | | |
| | | TString fText; // annotation text | |
| | | Float_t fTextSize; // relative font size | |
| | | TGLFont fFont; // font used to render labels | |
| | | TGLFont fMenuFont; // font used to render menu buttons | |
| | | TGLFont::ETextAlignH_e fTextAlign; | |
| | | | |
| | | Color_t fBackColor; // background color | |
| | | Color_t fTextColor; // text color | |
| | | Char_t fTransparency; // transparency of background | |
| | | | |
| | | Bool_t fDrawRefLine; // draw 3D refrence line | |
| | | Bool_t fUseColorSet; // use color set from rnrCtx | |
| | | | |
| public: | | public: | |
|
| | | TGLAnnotation(TGLViewerBase *parent, const char *text, Float_t posx, Flo
at_t posy); | |
| TGLAnnotation(TGLViewerBase *parent, const char *text, Float_t posx, Flo
at_t posy, TGLVector3 ref); | | TGLAnnotation(TGLViewerBase *parent, const char *text, Float_t posx, Flo
at_t posy, TGLVector3 ref); | |
| virtual ~TGLAnnotation(); | | virtual ~TGLAnnotation(); | |
| | | | |
|
| | | void SetTransparency(Char_t x) { fTransparency = x;} | |
| | | Char_t GetTransparency() const { return fTransparency;} | |
| | | void SetUseColorSet(Bool_t x) { fUseColorSet = x; } | |
| | | Bool_t GetUseColorSet() const { return fUseColorSet;} | |
| | | void SetBackColor(Color_t x) { fBackColor = x;} | |
| | | Color_t GetBackColor() const { return fBackColor;} | |
| | | void SetTextColor(Color_t x) { fTextColor = x; } | |
| | | Color_t GetTextColor() const { return fTextColor;} | |
| | | void SetTextSize(Float_t x) { fTextSize = x; } | |
| | | Float_t GetTextSize() const { return fTextSize;} | |
| | | TGLFont::ETextAlignH_e GetTextAlign() const { return fTextAlign; } | |
| | | void SetTextAlign(TGLFont::ETextAlignH_e a) { fTextAlign = a; } | |
| | | | |
| virtual Bool_t MouseEnter(TGLOvlSelectRecord& selRec); | | virtual Bool_t MouseEnter(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(); | |
| | | | |
| void CloseEditor(); | | void CloseEditor(); | |
| | | | |
| void UpdateText(); | | void UpdateText(); | |
| | | | |
| virtual void Render(TGLRnrCtx& rnrCtx); | | virtual void Render(TGLRnrCtx& rnrCtx); | |
| | | | |
End of changes. 6 change blocks. |
| 18 lines changed or deleted | | 39 lines changed or added | |
|
| TGLLogicalShape.h | | TGLLogicalShape.h | |
|
| // @(#)root/gl:$Id: TGLLogicalShape.h 26250 2008-11-17 20:56:44Z matevz $ | | // @(#)root/gl:$Id: TGLLogicalShape.h 30811 2009-10-19 13:22:46Z 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 48 | | skipping to change at line 48 | |
| public: | | public: | |
| enum ELODAxes { kLODAxesNone = 0, // LOD will be set to high or pixel. | | enum ELODAxes { kLODAxesNone = 0, // LOD will be set to high or pixel. | |
| kLODAxesX = 1 << 0, | | kLODAxesX = 1 << 0, | |
| kLODAxesY = 1 << 1, | | kLODAxesY = 1 << 1, | |
| kLODAxesZ = 1 << 2, | | kLODAxesZ = 1 << 2, | |
| kLODAxesAll = kLODAxesX | kLODAxesY | kLODAxesZ | | kLODAxesAll = kLODAxesX | kLODAxesY | kLODAxesZ | |
| }; | | }; | |
| | | | |
| protected: | | protected: | |
| mutable UInt_t fRef; //! physical instance ref cou
nting | | mutable UInt_t fRef; //! physical instance ref cou
nting | |
|
| mutable TGLPhysicalShape * fFirstPhysical; //! first replica | | mutable TGLPhysicalShape *fFirstPhysical; //! first replica | |
| | | | |
| TObject *fExternalObj; //! Also plays the role of ID. | | TObject *fExternalObj; //! Also plays the role of ID. | |
| TGLBoundingBox fBoundingBox; //! Shape's bounding box. | | TGLBoundingBox fBoundingBox; //! Shape's bounding box. | |
| mutable TGLScene *fScene; //! scene where object is stored (can b
e zero!) | | mutable TGLScene *fScene; //! scene where object is stored (can b
e zero!) | |
| mutable UInt_t fDLBase; //! display-list id base | | mutable UInt_t fDLBase; //! display-list id base | |
| mutable Int_t fDLSize; //! display-list size for different LOD
s | | mutable Int_t fDLSize; //! display-list size for different LOD
s | |
| mutable UShort_t fDLValid; //! display-list validity bit-field | | mutable UShort_t fDLValid; //! display-list validity bit-field | |
| mutable Bool_t fDLCache; //! use display list caching | | mutable Bool_t fDLCache; //! use display list caching | |
| mutable Bool_t fRefStrong; //! Strong ref (delete on 0 ref); not i
n scene | | mutable Bool_t fRefStrong; //! Strong ref (delete on 0 ref); not i
n scene | |
| mutable Bool_t fOwnExtObj; //! External object is a fake | | mutable Bool_t fOwnExtObj; //! External object is a fake | |
| | | | |
| skipping to change at line 76 | | skipping to change at line 76 | |
| virtual ~TGLLogicalShape(); | | virtual ~TGLLogicalShape(); | |
| | | | |
| // Physical shape reference-counting, replica management | | // Physical shape reference-counting, replica management | |
| UInt_t Ref() const { return fRef; } | | UInt_t Ref() const { return fRef; } | |
| void AddRef(TGLPhysicalShape* phys) const; | | void AddRef(TGLPhysicalShape* phys) const; | |
| void SubRef(TGLPhysicalShape* phys) const; | | void SubRef(TGLPhysicalShape* phys) const; | |
| void StrongRef(Bool_t strong) const { fRefStrong = strong; } | | void StrongRef(Bool_t strong) const { fRefStrong = strong; } | |
| void DestroyPhysicals(); | | void DestroyPhysicals(); | |
| UInt_t UnrefFirstPhysical(); | | UInt_t UnrefFirstPhysical(); | |
| | | | |
|
| const TGLPhysicalShape * GetFirstPhysical() const { return fFirstPhysica
l; } | | const TGLPhysicalShape* GetFirstPhysical() const { return fFirstPhysical
; } | |
| | | | |
|
| TObject * ID() const { return fExternalObj; } | | TObject* ID() const { return fExternalObj; } | |
| TObject * GetExternal() const { return fExternalObj; } | | TObject* GetExternal() const { return fExternalObj; } | |
| TGLScene * GetScene() const { return fScene; } | | TGLScene* GetScene() const { return fScene; } | |
| | | | |
| const TGLBoundingBox & BoundingBox() const { return fBoundingBox; } | | const TGLBoundingBox& BoundingBox() const { return fBoundingBox; } | |
| virtual void UpdateBoundingBox() {} | | virtual void UpdateBoundingBox() {} | |
| void UpdateBoundingBoxesOfPhysicals(); | | void UpdateBoundingBoxesOfPhysicals(); | |
| | | | |
| // Display List Caching | | // Display List Caching | |
| Bool_t SetDLCache(Bool_t cached); | | Bool_t SetDLCache(Bool_t cached); | |
| virtual Bool_t ShouldDLCache(const TGLRnrCtx & rnrCtx) const; | | virtual Bool_t ShouldDLCache(const TGLRnrCtx & rnrCtx) const; | |
| virtual UInt_t DLOffset(Short_t /*lod*/) const { return 0; } | | virtual UInt_t DLOffset(Short_t /*lod*/) const { return 0; } | |
| virtual void DLCacheClear(); | | virtual void DLCacheClear(); | |
| virtual void DLCacheDrop(); | | virtual void DLCacheDrop(); | |
| virtual void DLCachePurge(); | | virtual void DLCachePurge(); | |
| | | | |
| virtual ELODAxes SupportedLODAxes() const { return kLODAxesNone; } | | virtual ELODAxes SupportedLODAxes() const { return kLODAxesNone; } | |
| virtual Short_t QuantizeShapeLOD(Short_t shapeLOD, Short_t combiLOD) co
nst; | | virtual Short_t QuantizeShapeLOD(Short_t shapeLOD, Short_t combiLOD) co
nst; | |
|
| virtual void Draw(TGLRnrCtx & rnrCtx) const; | | virtual void Draw(TGLRnrCtx& rnrCtx) const; | |
| virtual void DirectDraw(TGLRnrCtx & rnrCtx) const = 0; // Actual dra | | virtual void DirectDraw(TGLRnrCtx& rnrCtx) const = 0; // Actual draw | |
| w method (non DL cached) | | method (non DL cached) | |
| | | | |
| | | virtual void DrawHighlight(TGLRnrCtx& rnrCtx, const TGLPhysicalShape | |
| | | * pshp) const; | |
| | | | |
| virtual Bool_t IgnoreSizeForOfInterest() const { return kFALSE; } | | virtual Bool_t IgnoreSizeForOfInterest() const { return kFALSE; } | |
| | | | |
| // Override in sub-classes that do direct object rendering (e.g. TGLObje
ct). | | // Override in sub-classes that do direct object rendering (e.g. TGLObje
ct). | |
| virtual Bool_t KeepDuringSmartRefresh() const { return kFALSE; } | | virtual Bool_t KeepDuringSmartRefresh() const { return kFALSE; } | |
| // Override in sub-classes that support secondary selection (e.g. TPoint
Set3DGL). | | // Override in sub-classes that support secondary selection (e.g. TPoint
Set3DGL). | |
| virtual Bool_t SupportsSecondarySelect() const { return kFALSE; } | | virtual Bool_t SupportsSecondarySelect() const { return kFALSE; } | |
|
| virtual void ProcessSelection(TGLRnrCtx & rnrCtx, TGLSelectRecord & re | | virtual Bool_t AlwaysSecondarySelect() const { return kFALSE; } | |
| c); | | virtual void ProcessSelection(TGLRnrCtx& rnrCtx, TGLSelectRecord& rec) | |
| | | ; | |
| | | | |
| void InvokeContextMenu(TContextMenu & menu, UInt_t x, UInt_t y) const; | | void InvokeContextMenu(TContextMenu & menu, UInt_t x, UInt_t y) const; | |
| | | | |
| ClassDef(TGLLogicalShape,0) // a logical (non-placed, local frame) drawa
ble object | | ClassDef(TGLLogicalShape,0) // a logical (non-placed, local frame) drawa
ble object | |
| }; | | }; | |
| | | | |
| #endif // ROOT_TGLLogicalShape | | #endif // ROOT_TGLLogicalShape | |
| | | | |
End of changes. 6 change blocks. |
| 15 lines changed or deleted | | 19 lines changed or added | |
|
| TGLSAViewer.h | | TGLSAViewer.h | |
|
| // @(#)root/gl:$Id: TGLSAViewer.h 26849 2008-12-11 21:39:15Z matevz $ | | // @(#)root/gl:$Id: TGLSAViewer.h 31299 2009-11-18 21:06:28Z matevz $ | |
| // Author: Richard Maunder / Timur Pocheptsov | | // Author: Richard Maunder / Timur Pocheptsov | |
| | | | |
| /************************************************************************* | | /************************************************************************* | |
| * 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_TGLSAViewer | | #ifndef ROOT_TGLSAViewer | |
| #define ROOT_TGLSAViewer | | #define ROOT_TGLSAViewer | |
| | | | |
|
| #ifndef ROOT_TGLViewer | | | |
| #include "TGLViewer.h" | | #include "TGLViewer.h" | |
|
| #endif | | | |
| | | | |
| #ifndef ROOT_TString | | | |
| #include "TString.h" | | #include "TString.h" | |
|
| #endif | | | |
| | | | |
|
| | | class TGLSAFrame; | |
| class TGWindow; | | class TGWindow; | |
| class TGFrame; | | class TGFrame; | |
| class TGCompositeFrame; | | class TGCompositeFrame; | |
| class TGPopupMenu; | | class TGPopupMenu; | |
|
| | | class TGButton; | |
| | | | |
| class TGedEditor; | | class TGedEditor; | |
|
| class TGLPShapeObj; | | | |
| class TGLEventHandler; | | class TGLEventHandler; | |
| class TGMenuBar; | | class TGMenuBar; | |
| | | | |
| //_________________________________________________________________________
_____ | | //_________________________________________________________________________
_____ | |
| // | | // | |
| // TGLSAViewer | | // TGLSAViewer | |
| // | | // | |
| // The top-level standalone GL viewer. | | // The top-level standalone GL viewer. | |
| | | | |
| class TGLSAViewer : public TGLViewer | | class TGLSAViewer : public TGLViewer | |
| | | | |
| skipping to change at line 54 | | skipping to change at line 50 | |
| kGLPerspYOZ, kGLPerspXOZ, kGLPerspXOY, | | kGLPerspYOZ, kGLPerspXOZ, kGLPerspXOY, | |
| kGLXOY, kGLXOZ, kGLZOY, | | kGLXOY, kGLXOZ, kGLZOY, | |
| kGLXnOY, kGLXnOZ, kGLZnOY, | | kGLXnOY, kGLXnOZ, kGLZnOY, | |
| kGLOrthoRotate, kGLOrthoDolly, | | kGLOrthoRotate, kGLOrthoDolly, | |
| kGLSaveEPS, kGLSavePDF, kGLSavePNG, kGLSaveGIF, kGLSaveAnimGIF, | | kGLSaveEPS, kGLSavePDF, kGLSavePNG, kGLSaveGIF, kGLSaveAnimGIF, | |
| kGLSaveJPG, kGLSaveAS, kGLCloseViewer, kGLQuitROOT, | | kGLSaveJPG, kGLSaveAS, kGLCloseViewer, kGLQuitROOT, | |
| kGLEditObject }; | | kGLEditObject }; | |
| | | | |
| private: | | private: | |
| // GUI components | | // GUI components | |
|
| TGCompositeFrame *fFrame; | | TGLSAFrame *fFrame; | |
| TGPopupMenu *fFileMenu; | | TGPopupMenu *fFileMenu; | |
| TGPopupMenu *fFileSaveMenu; | | TGPopupMenu *fFileSaveMenu; | |
| TGPopupMenu *fCameraMenu; | | TGPopupMenu *fCameraMenu; | |
| TGPopupMenu *fHelpMenu; | | TGPopupMenu *fHelpMenu; | |
| | | | |
| // Ged | | // Ged | |
| TGCompositeFrame *fLeftVerticalFrame; | | TGCompositeFrame *fLeftVerticalFrame; | |
|
| TGedEditor *fGedEditor; | | | |
| TGLPShapeObj *fPShapeWrap; | | | |
| | | | |
| TGCompositeFrame *fRightVerticalFrame; | | TGCompositeFrame *fRightVerticalFrame; | |
| | | | |
| TString fDirName; | | TString fDirName; | |
| Int_t fTypeIdx; | | Int_t fTypeIdx; | |
| Bool_t fOverwrite; | | Bool_t fOverwrite; | |
| TGMenuBar *fMenuBar; | | TGMenuBar *fMenuBar; | |
|
| | | TGButton *fMenuBut; | |
| | | Bool_t fHideMenuBar; | |
| Bool_t fDeleteMenuBar; | | Bool_t fDeleteMenuBar; | |
| | | | |
| // Initial window positioning | | // Initial window positioning | |
| static const Int_t fgInitX; | | static const Int_t fgInitX; | |
| static const Int_t fgInitY; | | static const Int_t fgInitY; | |
| static const Int_t fgInitW; | | static const Int_t fgInitW; | |
| static const Int_t fgInitH; | | static const Int_t fgInitH; | |
| | | | |
| static const char *fgHelpText1; | | static const char *fgHelpText1; | |
| static const char *fgHelpText2; | | static const char *fgHelpText2; | |
| | | | |
| void CreateMenus(); | | void CreateMenus(); | |
| void CreateFrames(); | | void CreateFrames(); | |
| | | | |
| // non-copyable class | | // non-copyable class | |
| TGLSAViewer(const TGLSAViewer &); | | TGLSAViewer(const TGLSAViewer &); | |
| TGLSAViewer & operator = (const TGLSAViewer &); | | TGLSAViewer & operator = (const TGLSAViewer &); | |
| | | | |
| public: | | public: | |
| TGLSAViewer(TVirtualPad *pad); | | TGLSAViewer(TVirtualPad *pad); | |
|
| TGLSAViewer(const TGWindow *parent, TVirtualPad *pad, TGedEditor *ged =
0); | | TGLSAViewer(const TGWindow *parent, TVirtualPad *pad, TGedEditor *ged=0)
; | |
| ~TGLSAViewer(); | | ~TGLSAViewer(); | |
| | | | |
| virtual void CreateGLWidget(); | | virtual void CreateGLWidget(); | |
| virtual void DestroyGLWidget(); | | virtual void DestroyGLWidget(); | |
| | | | |
| virtual const char* GetName() const { return "GLViewer"; } | | virtual const char* GetName() const { return "GLViewer"; } | |
| | | | |
|
| virtual void SelectionChanged(); // *SIGNAL* | | virtual void SelectionChanged(); | |
| virtual void OverlayDragFinished(); // *SIGNAL* | | | |
| | | | |
| virtual void RefreshPadEditor(TObject* changed=0); | | | |
| | | | |
| void Show(); | | void Show(); | |
| void Close(); | | void Close(); | |
| void DeleteMenuBar(); | | void DeleteMenuBar(); | |
|
| | | void DisableCloseMenuEntries(); | |
| | | void EnableMenuBarHiding(); | |
| | | | |
| | | void HandleMenuBarHiding(Event_t* ev); | |
| | | | |
| // GUI events - editors, frame etc | | // GUI events - editors, frame etc | |
| Bool_t ProcessFrameMessage(Long_t msg, Long_t parm1, Long_t); | | Bool_t ProcessFrameMessage(Long_t msg, Long_t parm1, Long_t); | |
| | | | |
|
| TGCompositeFrame* GetFrame() const { return fFrame; } | | TGCompositeFrame* GetFrame() const; | |
| TGCompositeFrame* GetLeftVerticalFrame() const { return fLeftVerticalFra
me; } | | TGCompositeFrame* GetLeftVerticalFrame() const { return fLeftVerticalFra
me; } | |
|
| TGedEditor* GetGedEditor() const { return fGedEditor; } | | | |
| | | | |
| void ToggleEditObject(); | | void ToggleEditObject(); | |
| void ToggleOrthoRotate(); | | void ToggleOrthoRotate(); | |
| void ToggleOrthoDolly(); | | void ToggleOrthoDolly(); | |
| | | | |
| ClassDef(TGLSAViewer, 0); // Standalone GL viewer. | | ClassDef(TGLSAViewer, 0); // Standalone GL viewer. | |
| }; | | }; | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 15 change blocks. |
| 17 lines changed or deleted | | 13 lines changed or added | |
|
| TGLSelectRecord.h | | TGLSelectRecord.h | |
|
| // @(#)root/gl:$Id: TGLSelectRecord.h 20882 2007-11-19 11:31:26Z rdm $ | | // @(#)root/gl:$Id: TGLSelectRecord.h 30886 2009-10-27 13:37:11Z 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_TGLSelectRecord | | #ifndef ROOT_TGLSelectRecord | |
| #define ROOT_TGLSelectRecord | | #define ROOT_TGLSelectRecord | |
| | | | |
| skipping to change at line 72 | | skipping to change at line 72 | |
| | | | |
| ClassDef(TGLSelectRecordBase, 0) // Base class for GL selection records. | | ClassDef(TGLSelectRecordBase, 0) // Base class for GL selection records. | |
| }; | | }; | |
| | | | |
| /**************************************************************************
/ | | /**************************************************************************
/ | |
| // TGLSelectRecord | | // TGLSelectRecord | |
| /**************************************************************************
/ | | /**************************************************************************
/ | |
| | | | |
| class TGLSelectRecord : public TGLSelectRecordBase | | class TGLSelectRecord : public TGLSelectRecordBase | |
| { | | { | |
|
| | | public: | |
| | | enum ESecSelResult { kNone, kEnteringSelection, kLeavingSelection, kModi | |
| | | fyingInternalSelection }; | |
| | | | |
| protected: | | protected: | |
| // Secondary data (scene dependent) - use | | // Secondary data (scene dependent) - use | |
| // TGLSceneBase::ResolveSelectRecord to fill. | | // TGLSceneBase::ResolveSelectRecord to fill. | |
| Bool_t fTransparent; | | Bool_t fTransparent; | |
| TGLSceneInfo *fSceneInfo; // SceneInfo | | TGLSceneInfo *fSceneInfo; // SceneInfo | |
| TGLPhysicalShape *fPhysShape; // PhysicalShape, if applicable | | TGLPhysicalShape *fPhysShape; // PhysicalShape, if applicable | |
| TObject *fObject; // Master TObject, if applicable | | TObject *fObject; // Master TObject, if applicable | |
| void *fSpecific; // Scene specific, if applicable | | void *fSpecific; // Scene specific, if applicable | |
|
| | | Bool_t fMultiple; // Mutliple selection, requested by event | |
| | | handler | |
| | | | |
| | | ESecSelResult fSecSelRes; // Result of ProcessSelection; | |
| | | | |
| public: | | public: | |
| TGLSelectRecord(); | | TGLSelectRecord(); | |
| TGLSelectRecord(UInt_t* data); | | TGLSelectRecord(UInt_t* data); | |
| TGLSelectRecord(const TGLSelectRecord& rec); | | TGLSelectRecord(const TGLSelectRecord& rec); | |
| virtual ~TGLSelectRecord(); | | virtual ~TGLSelectRecord(); | |
| | | | |
| TGLSelectRecord& operator=(const TGLSelectRecord& rec); | | TGLSelectRecord& operator=(const TGLSelectRecord& rec); | |
| | | | |
| virtual void Set(UInt_t* data); | | virtual void Set(UInt_t* data); | |
| virtual void Reset(); | | virtual void Reset(); | |
| | | | |
| Bool_t GetTransparent() const { return fTransparent; } | | Bool_t GetTransparent() const { return fTransparent; } | |
| TGLSceneInfo * GetSceneInfo() const { return fSceneInfo; } | | TGLSceneInfo * GetSceneInfo() const { return fSceneInfo; } | |
| TGLPhysicalShape * GetPhysShape() const { return fPhysShape; } | | TGLPhysicalShape * GetPhysShape() const { return fPhysShape; } | |
| TObject * GetObject() const { return fObject; } | | TObject * GetObject() const { return fObject; } | |
| void * GetSpecific() const { return fSpecific; } | | void * GetSpecific() const { return fSpecific; } | |
|
| | | Bool_t GetMultiple() const { return fMultiple; } | |
| | | | |
| | | ESecSelResult GetSecSelResult() const { return fSecSelRes; } | |
| | | | |
| void SetTransparent(Bool_t t) { fTransparent = t; } | | void SetTransparent(Bool_t t) { fTransparent = t; } | |
| void SetSceneInfo (TGLSceneInfo* si) { fSceneInfo = si; } | | void SetSceneInfo (TGLSceneInfo* si) { fSceneInfo = si; } | |
| void SetPhysShape (TGLPhysicalShape* pshp) { fPhysShape = pshp; } | | void SetPhysShape (TGLPhysicalShape* pshp) { fPhysShape = pshp; } | |
| void SetObject (TObject* obj) { fObject = obj; } | | void SetObject (TObject* obj) { fObject = obj; } | |
| void SetSpecific (void* spec) { fSpecific = spec; } | | void SetSpecific (void* spec) { fSpecific = spec; } | |
|
| | | void SetMultiple (Bool_t multi) { fMultiple = multi; } | |
| | | | |
| | | void SetSecSelResult(ESecSelResult r) { fSecSelRes = r; } | |
| | | | |
| void Print(); | | void Print(); | |
| | | | |
| static Bool_t AreSameSelectionWise(const TGLSelectRecord& r1, | | static Bool_t AreSameSelectionWise(const TGLSelectRecord& r1, | |
| const TGLSelectRecord& r2); | | const TGLSelectRecord& r2); | |
| | | | |
| ClassDef(TGLSelectRecord, 0) // Standard GL selection record. | | ClassDef(TGLSelectRecord, 0) // Standard GL selection record. | |
| }; | | }; | |
| | | | |
| /**************************************************************************
/ | | /**************************************************************************
/ | |
| | | | |
End of changes. 5 change blocks. |
| 1 lines changed or deleted | | 15 lines changed or added | |
|
| TGLViewer.h | | TGLViewer.h | |
|
| // @(#)root/gl:$Id: TGLViewer.h 30384 2009-09-23 17:54:23Z matevz $ | | // @(#)root/gl:$Id: TGLViewer.h 31299 2009-11-18 21:06:28Z 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 47 | | skipping to change at line 47 | |
| class TGLViewerEditor; | | class TGLViewerEditor; | |
| class TGLWidget; | | class TGLWidget; | |
| class TGLLightSet; | | class TGLLightSet; | |
| class TGLClipSet; | | class TGLClipSet; | |
| class TGLManipSet; | | class TGLManipSet; | |
| class TGLCameraOverlay; | | class TGLCameraOverlay; | |
| class TGLContextIdentity; | | class TGLContextIdentity; | |
| class TTimer; | | class TTimer; | |
| | | | |
| class TContextMenu; | | class TContextMenu; | |
|
| | | class TGedEditor; | |
| | | class TGLPShapeObj; | |
| | | | |
| class TGLViewer : public TVirtualViewer3D, | | class TGLViewer : public TVirtualViewer3D, | |
| public TGLViewerBase, | | public TGLViewerBase, | |
| public TQObject | | public TQObject | |
| | | | |
| { | | { | |
| friend class TGLOutput; | | friend class TGLOutput; | |
| friend class TGLEventHandler; | | friend class TGLEventHandler; | |
| public: | | public: | |
| | | | |
| enum ECameraType { kCameraPerspXOZ, kCameraPerspYOZ, kCameraPerspXOY, | | enum ECameraType { kCameraPerspXOZ, kCameraPerspYOZ, kCameraPerspXOY, | |
| kCameraOrthoXOY, kCameraOrthoXOZ, kCameraOrthoZOY, | | kCameraOrthoXOY, kCameraOrthoXOZ, kCameraOrthoZOY, | |
| kCameraOrthoXnOY, kCameraOrthoXnOZ, kCameraOrthoZnOY
}; | | kCameraOrthoXnOY, kCameraOrthoXnOZ, kCameraOrthoZnOY
}; | |
| | | | |
|
| | | enum ESecSelType { kOnRequest, kOnKeyMod1 }; | |
| | | | |
| private: | | private: | |
| TGLViewer(const TGLViewer &); // Not implemented | | TGLViewer(const TGLViewer &); // Not implemented | |
| TGLViewer & operator=(const TGLViewer &); // Not implemented | | TGLViewer & operator=(const TGLViewer &); // Not implemented | |
| | | | |
| void InitSecondaryObjects(); | | void InitSecondaryObjects(); | |
| | | | |
| protected: | | protected: | |
| // External handles | | // External handles | |
| TVirtualPad *fPad; //! external pad - remove replace with sign
al | | TVirtualPad *fPad; //! external pad - remove replace with sign
al | |
| | | | |
| | | | |
| skipping to change at line 102 | | skipping to change at line 106 | |
| // 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 | |
|
| | | TGedEditor *fGedEditor; //! GED editor | |
| | | TGLPShapeObj *fPShapeWrap; | |
| | | | |
| // Mouse ineraction | | // Mouse ineraction | |
| public: | | public: | |
| enum EPushAction { kPushStd, | | enum EPushAction { kPushStd, | |
| kPushCamCenter, kPushAnnotate }; | | kPushCamCenter, kPushAnnotate }; | |
| enum EDragAction { kDragNone, | | enum EDragAction { kDragNone, | |
| kDragCameraRotate, kDragCameraTruck, kDragCameraDol
ly, | | kDragCameraRotate, kDragCameraTruck, kDragCameraDol
ly, | |
| kDragOverlay }; | | kDragOverlay }; | |
| protected: | | protected: | |
| EPushAction fPushAction; | | EPushAction fPushAction; | |
| | | | |
| skipping to change at line 170 | | skipping to change at line 176 | |
| | | | |
| protected: | | protected: | |
| TGLWidget *fGLWidget; | | TGLWidget *fGLWidget; | |
| Int_t fGLDevice; //!for embedded gl viewer | | Int_t fGLDevice; //!for embedded gl viewer | |
| TGLContextIdentity *fGLCtxId; //!for embedded gl viewer | | TGLContextIdentity *fGLCtxId; //!for embedded gl viewer | |
| | | | |
| // Updata/camera-reset behaviour | | // Updata/camera-reset behaviour | |
| Bool_t fIgnoreSizesOnUpdate; // ignore sizes of bounding-
boxes on update | | Bool_t fIgnoreSizesOnUpdate; // ignore sizes of bounding-
boxes on update | |
| Bool_t fResetCamerasOnUpdate; // reposition camera on each
update | | Bool_t fResetCamerasOnUpdate; // reposition camera on each
update | |
| Bool_t fResetCamerasOnNextUpdate; // reposition camera on next
update | | Bool_t fResetCamerasOnNextUpdate; // reposition camera on next
update | |
|
| Bool_t fResetCameraOnDoubleClick; // reposition camera on doub
le-click | | | |
| | | | |
| public: | | public: | |
| TGLViewer(TVirtualPad* pad, Int_t x, Int_t y, Int_t width, Int_t height)
; | | TGLViewer(TVirtualPad* pad, Int_t x, Int_t y, Int_t width, Int_t height)
; | |
| TGLViewer(TVirtualPad* pad); | | TGLViewer(TVirtualPad* pad); | |
| virtual ~TGLViewer(); | | virtual ~TGLViewer(); | |
| | | | |
| void ResetInitGL(); | | void ResetInitGL(); | |
| | | | |
| // TVirtualViewer3D interface ... mostly a facade | | // TVirtualViewer3D interface ... mostly a facade | |
| | | | |
| | | | |
| skipping to change at line 203 | | skipping to change at line 208 | |
| virtual Int_t AddObject(const TBuffer3D&, Bool_t* = 0) { return TBuffer
3D::kNone; } | | virtual Int_t AddObject(const TBuffer3D&, Bool_t* = 0) { return TBuffer
3D::kNone; } | |
| virtual Int_t AddObject(UInt_t, const TBuffer3D&, Bool_t* = 0) { return
TBuffer3D::kNone; } | | virtual Int_t AddObject(UInt_t, const TBuffer3D&, Bool_t* = 0) { return
TBuffer3D::kNone; } | |
| virtual Bool_t OpenComposite(const TBuffer3D&, Bool_t* = 0) { return kFA
LSE; } | | virtual Bool_t OpenComposite(const TBuffer3D&, Bool_t* = 0) { return kFA
LSE; } | |
| virtual void CloseComposite() {} | | virtual void CloseComposite() {} | |
| virtual void AddCompositeOp(UInt_t) {} | | virtual void AddCompositeOp(UInt_t) {} | |
| | | | |
| virtual void PrintObjects(); | | virtual void PrintObjects(); | |
| virtual void ResetCameras() { SetupCameras(kTRUE); } | | virtual void ResetCameras() { SetupCameras(kTRUE); } | |
| virtual void ResetCamerasAfterNextUpdate() { fResetCamerasOnNextUpdate
= kTRUE; } | | virtual void ResetCamerasAfterNextUpdate() { fResetCamerasOnNextUpdate
= kTRUE; } | |
| | | | |
|
| virtual void RefreshPadEditor(TObject* = 0) {} | | | |
| | | | |
| TGLWidget* GetGLWidget() { return fGLWidget; } | | TGLWidget* GetGLWidget() { return fGLWidget; } | |
| | | | |
| virtual void CreateGLWidget() {} | | virtual void CreateGLWidget() {} | |
| virtual void DestroyGLWidget() {} | | virtual void DestroyGLWidget() {} | |
| | | | |
| Int_t GetDev() const { return fGLDevice; } | | Int_t GetDev() const { return fGLDevice; } | |
| Bool_t GetSmartRefresh() const { return fSmartRefresh; } | | Bool_t GetSmartRefresh() const { return fSmartRefresh; } | |
| void SetSmartRefresh(Bool_t smart_ref) { fSmartRefresh = smart_ref; } | | void SetSmartRefresh(Bool_t smart_ref) { fSmartRefresh = smart_ref; } | |
| | | | |
| TGLColorSet& RefDarkColorSet() { return fDarkColorSet; } | | TGLColorSet& RefDarkColorSet() { return fDarkColorSet; } | |
| | | | |
| skipping to change at line 284 | | skipping to change at line 287 | |
| | | | |
| // Request methods post cross thread request via TROOT::ProcessLineFast(
). | | // Request methods post cross thread request via TROOT::ProcessLineFast(
). | |
| void RequestDraw(Short_t LOD = TGLRnrCtx::kLODMed); // Cross thread draw
request | | void RequestDraw(Short_t LOD = TGLRnrCtx::kLODMed); // Cross thread draw
request | |
| virtual void PreRender(); | | virtual void PreRender(); | |
| virtual void PostRender(); | | virtual void PostRender(); | |
| void DoDraw(); | | void DoDraw(); | |
| | | | |
| void DrawGuides(); | | void DrawGuides(); | |
| void DrawDebugInfo(); | | void DrawDebugInfo(); | |
| | | | |
|
| Bool_t RequestSelect(Int_t x, Int_t y, Bool_t trySecSel=kFALSE); // Cros | | Bool_t RequestSelect(Int_t x, Int_t y); // Cross thread select | |
| s thread select request | | request | |
| Bool_t DoSelect(Int_t x, Int_t y, Bool_t trySecSel=kFALSE); // Wind | | Bool_t DoSelect(Int_t x, Int_t y); // First level selecton | |
| ow coords origin top left | | (shapes/objects). | |
| | | Bool_t RequestSecondarySelect(Int_t x, Int_t y); // Cross thread seconda | |
| | | ry select request | |
| | | Bool_t DoSecondarySelect(Int_t x, Int_t y); // Second level selecto | |
| | | n (inner structure). | |
| void ApplySelection(); | | void ApplySelection(); | |
| | | | |
| Bool_t RequestOverlaySelect(Int_t x, Int_t y); // Cross thread select re
quest | | Bool_t RequestOverlaySelect(Int_t x, Int_t y); // Cross thread select re
quest | |
| Bool_t DoOverlaySelect(Int_t x, Int_t y); // Window coords origin t
op left | | Bool_t DoOverlaySelect(Int_t x, Int_t y); // Window coords origin t
op left | |
| | | | |
| // Saving of screen image | | // Saving of screen image | |
| Bool_t SavePicture(); | | Bool_t SavePicture(); | |
| Bool_t SavePicture(const TString &fileName); | | Bool_t SavePicture(const TString &fileName); | |
| Bool_t SavePictureUsingBB (const TString &fileName); | | Bool_t SavePictureUsingBB (const TString &fileName); | |
| Bool_t SavePictureUsingFBO(const TString &fileName, Int_t w, Int_t h, Fl
oat_t pixel_object_scale=0); | | Bool_t SavePictureUsingFBO(const TString &fileName, Int_t w, Int_t h, Fl
oat_t pixel_object_scale=0); | |
| | | | |
| skipping to change at line 313 | | skipping to change at line 318 | |
| void SetFader(Float_t x) { fFader = x; } | | void SetFader(Float_t x) { fFader = x; } | |
| void AutoFade(Float_t fade, Float_t time=1, Int_t steps=10); | | void AutoFade(Float_t fade, Float_t time=1, Int_t steps=10); | |
| | | | |
| // Update/camera-reset | | // Update/camera-reset | |
| void UpdateScene(); | | void UpdateScene(); | |
| Bool_t GetIgnoreSizesOnUpdate() const { return fIgnoreSizesOnUpda
te; } | | Bool_t GetIgnoreSizesOnUpdate() const { return fIgnoreSizesOnUpda
te; } | |
| void SetIgnoreSizesOnUpdate(Bool_t v) { fIgnoreSizesOnUpdate = v;
} | | void SetIgnoreSizesOnUpdate(Bool_t v) { fIgnoreSizesOnUpdate = v;
} | |
| void ResetCurrentCamera(); | | void ResetCurrentCamera(); | |
| Bool_t GetResetCamerasOnUpdate() const { return fResetCamerasOnUpd
ate; } | | Bool_t GetResetCamerasOnUpdate() const { return fResetCamerasOnUpd
ate; } | |
| void SetResetCamerasOnUpdate(Bool_t v) { fResetCamerasOnUpdate = v
; } | | void SetResetCamerasOnUpdate(Bool_t v) { fResetCamerasOnUpdate = v
; } | |
|
| Bool_t GetResetCameraOnDoubleClick() const { return fResetCameraOnDoub | | | |
| leClick; } | | | |
| void SetResetCameraOnDoubleClick(Bool_t v) { fResetCameraOnDoubleClick | | | |
| = v; } | | | |
| | | | |
| virtual void PostSceneBuildSetup(Bool_t resetCameras); | | virtual void PostSceneBuildSetup(Bool_t resetCameras); | |
| | | | |
|
| virtual void SelectionChanged(); // *SIGNAL* | | | |
| virtual void OverlayDragFinished(); // *SIGNAL* | | | |
| virtual void MouseIdle(TGLPhysicalShape*,UInt_t,UInt_t); // *SIGNAL* | | virtual void MouseIdle(TGLPhysicalShape*,UInt_t,UInt_t); // *SIGNAL* | |
| virtual void MouseOver(TGLPhysicalShape*); // *SIGNAL* | | virtual void MouseOver(TGLPhysicalShape*); // *SIGNAL* | |
| virtual void MouseOver(TGLPhysicalShape*, UInt_t state); // *SIGNAL* | | virtual void MouseOver(TGLPhysicalShape*, UInt_t state); // *SIGNAL* | |
| virtual void Activated() { Emit("Activated()"); } // *SIGNAL* | | virtual void Activated() { Emit("Activated()"); } // *SIGNAL* | |
| virtual void Clicked(TObject *obj); //*SIGNAL* | | virtual void Clicked(TObject *obj); //*SIGNAL* | |
| virtual void Clicked(TObject *obj, UInt_t button, UInt_t state); //*SIGN
AL* | | virtual void Clicked(TObject *obj, UInt_t button, UInt_t state); //*SIGN
AL* | |
|
| | | virtual void ReClicked(TObject *obj, UInt_t button, UInt_t state); //*SI | |
| | | GNAL* | |
| | | virtual void UnClicked(TObject *obj, UInt_t button, UInt_t state); //*SI | |
| | | GNAL* | |
| virtual void DoubleClicked() { Emit("DoubleClicked()"); } // *SIGNAL* | | virtual void DoubleClicked() { Emit("DoubleClicked()"); } // *SIGNAL* | |
| | | | |
| TGEventHandler *GetEventHandler() const { return fEventHandler; } | | TGEventHandler *GetEventHandler() const { return fEventHandler; } | |
| virtual void SetEventHandler(TGEventHandler *handler); | | virtual void SetEventHandler(TGEventHandler *handler); | |
| | | | |
|
| | | TGedEditor* GetGedEditor() const { return fGedEditor; } | |
| | | virtual void SetGedEditor(TGedEditor* ed) { fGedEditor = ed; } | |
| | | | |
| | | virtual void SelectionChanged(); | |
| | | virtual void OverlayDragFinished(); | |
| | | virtual void RefreshPadEditor(TObject* obj=0); | |
| | | | |
| virtual void RemoveOverlayElement(TGLOverlayElement* el); | | virtual void RemoveOverlayElement(TGLOverlayElement* el); | |
| | | | |
| TGLSelectRecord& GetSelRec() { return fSelRec; } | | TGLSelectRecord& GetSelRec() { return fSelRec; } | |
| TGLOvlSelectRecord& GetOvlSelRec() { return fOvlSelRec; } | | TGLOvlSelectRecord& GetOvlSelRec() { return fOvlSelRec; } | |
| TGLOverlayElement* GetCurrentOvlElm() const { return fCurrentOvlElm; } | | TGLOverlayElement* GetCurrentOvlElm() const { return fCurrentOvlElm; } | |
| void ClearCurrentOvlElm(); | | void ClearCurrentOvlElm(); | |
| | | | |
| ClassDef(TGLViewer,0) // Standard ROOT GL viewer. | | ClassDef(TGLViewer,0) // Standard ROOT GL viewer. | |
| }; | | }; | |
| | | | |
| | | | |
End of changes. 11 change blocks. |
| 14 lines changed or deleted | | 26 lines changed or added | |
|
| TH1.h | | TH1.h | |
|
| // @(#)root/hist:$Id: TH1.h 30001 2009-09-01 13:41:50Z brun $ | | // @(#)root/hist:$Id: TH1.h 31207 2009-11-16 16:52:00Z 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 74 | | skipping to change at line 74 | |
| | | | |
| class TF1; | | class TF1; | |
| class TH1D; | | class TH1D; | |
| class TBrowser; | | class TBrowser; | |
| class TDirectory; | | class TDirectory; | |
| class TList; | | class TList; | |
| class TCollection; | | class TCollection; | |
| class TVirtualFFT; | | class TVirtualFFT; | |
| class TVirtualHistPainter; | | class TVirtualHistPainter; | |
| | | | |
|
| | | #include "TFitResultPtr.h" | |
| | | | |
| class TH1 : public TNamed, public TAttLine, public TAttFill, public TAttMar
ker { | | class TH1 : public TNamed, public TAttLine, public TAttFill, public TAttMar
ker { | |
| | | | |
| protected: | | protected: | |
| Int_t fNcells; //number of bins(1D), cells (2D) +U/Ove
rflows | | Int_t fNcells; //number of bins(1D), cells (2D) +U/Ove
rflows | |
| TAxis fXaxis; //X axis descriptor | | TAxis fXaxis; //X axis descriptor | |
| TAxis fYaxis; //Y axis descriptor | | TAxis fYaxis; //Y axis descriptor | |
| TAxis fZaxis; //Z axis descriptor | | TAxis fZaxis; //Z axis descriptor | |
| Short_t fBarOffset; //(1000*offset) for bar charts or legos | | Short_t fBarOffset; //(1000*offset) for bar charts or legos | |
| Short_t fBarWidth; //(1000*width) for bar charts or legos | | Short_t fBarWidth; //(1000*width) for bar charts or legos | |
| Double_t fEntries; //Number of entries | | Double_t fEntries; //Number of entries | |
| | | | |
| skipping to change at line 115 | | skipping to change at line 117 | |
| | | | |
| public: | | public: | |
| static Int_t FitOptionsMake(Option_t *option, Foption_t &Foption); | | static Int_t FitOptionsMake(Option_t *option, Foption_t &Foption); | |
| | | | |
| private: | | private: | |
| Int_t AxisChoice(Option_t *axis) const; | | Int_t AxisChoice(Option_t *axis) const; | |
| void Build(); | | void Build(); | |
| | | | |
| TH1& operator=(const TH1&); // Not implemented | | TH1& operator=(const TH1&); // Not implemented | |
| | | | |
|
| | | static bool CheckConsistency(const TH1* h1, const TH1* h2); | |
| | | | |
| protected: | | protected: | |
| TH1(); | | TH1(); | |
| TH1(const char *name,const char *title,Int_t nbinsx,Double_t xlow,Double
_t xup); | | TH1(const char *name,const char *title,Int_t nbinsx,Double_t xlow,Double
_t xup); | |
| TH1(const char *name,const char *title,Int_t nbinsx,const Float_t *xbins
); | | TH1(const char *name,const char *title,Int_t nbinsx,const Float_t *xbins
); | |
| TH1(const char *name,const char *title,Int_t nbinsx,const Double_t *xbin
s); | | TH1(const char *name,const char *title,Int_t nbinsx,const Double_t *xbin
s); | |
| virtual void Copy(TObject &hnew) const; | | virtual void Copy(TObject &hnew) const; | |
| virtual Int_t BufferFill(Double_t x, Double_t w); | | virtual Int_t BufferFill(Double_t x, Double_t w); | |
| virtual Bool_t FindNewAxisLimits(const TAxis* axis, const Double_t poi
nt, Double_t& newMin, Double_t &newMax); | | virtual Bool_t FindNewAxisLimits(const TAxis* axis, const Double_t poi
nt, Double_t& newMin, Double_t &newMax); | |
| virtual void SavePrimitiveHelp(ostream &out, const char *hname, Opti
on_t *option = ""); | | virtual void SavePrimitiveHelp(ostream &out, const char *hname, Opti
on_t *option = ""); | |
| static Bool_t RecomputeAxisLimits(TAxis& destAxis, const TAxis& anAxi
s); | | static Bool_t RecomputeAxisLimits(TAxis& destAxis, const TAxis& anAxi
s); | |
| static Bool_t SameLimitsAndNBins(const TAxis& axis1, const TAxis& axi
s2); | | static Bool_t SameLimitsAndNBins(const TAxis& axis1, const TAxis& axi
s2); | |
| | | | |
|
| virtual Int_t DoFit(TF1 *f1,Option_t *option,Option_t *goption, Doubl
e_t xmin, Double_t xmax); | | | |
| virtual Double_t DoIntegral(Int_t ix1, Int_t ix2, Int_t iy1, Int_t iy2,
Int_t iz1, Int_t iz2, Double_t & err, | | virtual Double_t DoIntegral(Int_t ix1, Int_t ix2, Int_t iy1, Int_t iy2,
Int_t iz1, Int_t iz2, Double_t & err, | |
| Option_t * opt, Bool_t doerr = kFALSE) const
; | | Option_t * opt, Bool_t doerr = kFALSE) const
; | |
| | | | |
| public: | | public: | |
| // TH1 status bits | | // TH1 status bits | |
| enum { | | enum { | |
| kNoStats = BIT(9), // don't draw stats box | | kNoStats = BIT(9), // don't draw stats box | |
| kUserContour = BIT(10), // user specified contour levels | | kUserContour = BIT(10), // user specified contour levels | |
| kCanRebin = BIT(11), // can rebin axis | | kCanRebin = BIT(11), // can rebin axis | |
| kLogX = BIT(15), // X-axis in log scale | | kLogX = BIT(15), // X-axis in log scale | |
| | | | |
| skipping to change at line 192 | | skipping to change at line 195 | |
| virtual Int_t Fill(const char *name, Double_t w); | | virtual Int_t Fill(const char *name, Double_t w); | |
| virtual void FillN(Int_t ntimes, const Double_t *x, const Double_t *
w, Int_t stride=1); | | virtual void FillN(Int_t ntimes, const Double_t *x, const Double_t *
w, Int_t stride=1); | |
| virtual void FillN(Int_t, const Double_t *, const Double_t *, const
Double_t *, Int_t) {;} | | virtual void FillN(Int_t, const Double_t *, const Double_t *, const
Double_t *, Int_t) {;} | |
| virtual void FillRandom(const char *fname, Int_t ntimes=5000); | | virtual void FillRandom(const char *fname, Int_t ntimes=5000); | |
| virtual void FillRandom(TH1 *h, Int_t ntimes=5000); | | virtual void FillRandom(TH1 *h, Int_t ntimes=5000); | |
| virtual Int_t FindBin(Double_t x, Double_t y=0, Double_t z=0); | | virtual Int_t FindBin(Double_t x, Double_t y=0, Double_t z=0); | |
| virtual Int_t FindFirstBinAbove(Double_t threshold=0, Int_t axis=1) c
onst; | | virtual Int_t FindFirstBinAbove(Double_t threshold=0, Int_t axis=1) c
onst; | |
| virtual Int_t FindLastBinAbove (Double_t threshold=0, Int_t axis=1) c
onst; | | virtual Int_t FindLastBinAbove (Double_t threshold=0, Int_t axis=1) c
onst; | |
| virtual TObject *FindObject(const char *name) const; | | virtual TObject *FindObject(const char *name) const; | |
| virtual TObject *FindObject(const TObject *obj) const; | | virtual TObject *FindObject(const TObject *obj) const; | |
|
| virtual Int_t Fit(const char *formula ,Option_t *option="" ,Option_t | | virtual TFitResultPtr Fit(const char *formula ,Option_t *option="" ,O | |
| *goption="", Double_t xmin=0, Double_t xmax=0); // *MENU* | | ption_t *goption="", Double_t xmin=0, Double_t xmax=0); // *MENU* | |
| virtual Int_t Fit(TF1 *f1 ,Option_t *option="" ,Option_t *goption="", | | virtual TFitResultPtr Fit(TF1 *f1 ,Option_t *option="" ,Option_t *gop | |
| Double_t xmin=0, Double_t xmax=0); | | tion="", Double_t xmin=0, Double_t xmax=0); | |
| virtual void FitPanel(); // *MENU* | | virtual void FitPanel(); // *MENU* | |
| TH1 *GetAsymmetry(TH1* h2, Double_t c2=1, Double_t dc2=0); | | TH1 *GetAsymmetry(TH1* h2, Double_t c2=1, Double_t dc2=0); | |
| Int_t GetBufferLength() const {return fBuffer ? (Int_t)fBuffe
r[0] : 0;} | | Int_t GetBufferLength() const {return fBuffer ? (Int_t)fBuffe
r[0] : 0;} | |
| Int_t GetBufferSize () const {return fBufferSize;} | | Int_t GetBufferSize () const {return fBufferSize;} | |
| const Double_t *GetBuffer() const {return fBuffer;} | | const Double_t *GetBuffer() const {return fBuffer;} | |
| static Int_t GetDefaultBufferSize(); | | static Int_t GetDefaultBufferSize(); | |
| virtual Double_t *GetIntegral(); | | virtual Double_t *GetIntegral(); | |
| | | | |
| TList *GetListOfFunctions() const { return fFunctions; } | | TList *GetListOfFunctions() const { return fFunctions; } | |
| | | | |
| | | | |
| skipping to change at line 299 | | skipping to change at line 302 | |
| 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 ResetStats(); | |
| 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. 6 change blocks. |
| 7 lines changed or deleted | | 10 lines changed or added | |
|
| THnSparse.h | | THnSparse.h | |
|
| // @(#)root/hist:$Id: THnSparse.h 30458 2009-09-25 15:30:16Z moneta $ | | // @(#)root/hist:$Id: THnSparse.h 31207 2009-11-16 16:52:00Z moneta $ | |
| // Author: Axel Naumann (2007-09-11) | | // Author: Axel Naumann (2007-09-11) | |
| | | | |
| /************************************************************************* | | /************************************************************************* | |
| * 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 54 | | skipping to change at line 54 | |
| #endif | | #endif | |
| #ifndef ROOT_TArrayS | | #ifndef ROOT_TArrayS | |
| #include "TArrayS.h" | | #include "TArrayS.h" | |
| #endif | | #endif | |
| #ifndef ROOT_TArrayC | | #ifndef ROOT_TArrayC | |
| #include "TArrayC.h" | | #include "TArrayC.h" | |
| #endif | | #endif | |
| | | | |
| class TAxis; | | class TAxis; | |
| class TCollection; | | class TCollection; | |
|
| | | class TFitResultPtr; | |
| class TH1; | | class TH1; | |
| class TH1D; | | class TH1D; | |
| class TH2D; | | class TH2D; | |
| class TH3D; | | class TH3D; | |
| class TF1; | | class TF1; | |
| | | | |
| class THnSparseArrayChunk: public TObject { | | class THnSparseArrayChunk: public TObject { | |
| private: | | private: | |
| | | | |
| THnSparseArrayChunk(const THnSparseArrayChunk&); // Not implemented | | THnSparseArrayChunk(const THnSparseArrayChunk&); // Not implemented | |
| | | | |
| skipping to change at line 168 | | skipping to change at line 169 | |
| Bool_t IsInRange(Int_t *coord) const; | | Bool_t IsInRange(Int_t *coord) const; | |
| TH1* CreateHist(const char* name, const char* title, | | TH1* CreateHist(const char* name, const char* title, | |
| const TObjArray* axes, Bool_t keepTargetAxis) const; | | const TObjArray* axes, Bool_t keepTargetAxis) const; | |
| TObject* ProjectionAny(Int_t ndim, const Int_t* dim, | | TObject* ProjectionAny(Int_t ndim, const Int_t* dim, | |
| Bool_t wantSparse, Option_t* option = "") const; | | Bool_t wantSparse, Option_t* option = "") const; | |
| | | | |
| public: | | public: | |
| virtual ~THnSparse(); | | virtual ~THnSparse(); | |
| | | | |
| static THnSparse* CreateSparse(const char* name, const char* title, | | static THnSparse* CreateSparse(const char* name, const char* title, | |
|
| const TH1* axes, Int_t ChunkSize = 1024 *
16); | | const TH1* h1, Int_t ChunkSize = 1024 * 1
6); | |
| | | | |
| Int_t GetNChunks() const { return fBinContent.GetEntriesFast(); } | | Int_t GetNChunks() const { return fBinContent.GetEntriesFast(); } | |
| TObjArray* GetListOfAxes() { return &fAxes; } | | TObjArray* GetListOfAxes() { return &fAxes; } | |
| TAxis* GetAxis(Int_t dim) const { return (TAxis*)fAxes[dim]; } | | TAxis* GetAxis(Int_t dim) const { return (TAxis*)fAxes[dim]; } | |
| | | | |
| Long_t Fill(const Double_t *x, Double_t w = 1.) { | | Long_t Fill(const Double_t *x, Double_t w = 1.) { | |
| if (GetCalculateErrors()) { | | if (GetCalculateErrors()) { | |
| for (Int_t d = 0; d < fNdimensions; ++d) { | | for (Int_t d = 0; d < fNdimensions; ++d) { | |
| const Double_t xd = x[d]; | | const Double_t xd = x[d]; | |
| fTsumwx[d] += w * xd; | | fTsumwx[d] += w * xd; | |
| fTsumwx2[d] += w * xd * xd; | | fTsumwx2[d] += w * xd * xd; | |
| } | | } | |
| } | | } | |
| return Fill(GetBin(x), w); | | return Fill(GetBin(x), w); | |
| } | | } | |
| Long_t Fill(const char* name[], Double_t w = 1.) { | | Long_t Fill(const char* name[], Double_t w = 1.) { | |
| return Fill(GetBin(name), w); | | return Fill(GetBin(name), w); | |
| } | | } | |
| | | | |
|
| | | TFitResultPtr Fit(TF1 *f1 ,Option_t *option = "", Option_t *goption = "" | |
| | | ); | |
| | | TList* GetListOfFunctions() { return 0; } | |
| | | | |
| Double_t GetEntries() const { return fEntries; } | | Double_t GetEntries() const { return fEntries; } | |
| Double_t GetWeightSum() const { return fTsumw; } | | Double_t GetWeightSum() const { return fTsumw; } | |
| Long64_t GetNbins() const { return fFilledBins; } | | Long64_t GetNbins() const { return fFilledBins; } | |
| Int_t GetNdimensions() const { return fNdimensions; } | | Int_t GetNdimensions() const { return fNdimensions; } | |
| Bool_t GetCalculateErrors() const { return fTsumw2 >= 0.; } | | Bool_t GetCalculateErrors() const { return fTsumw2 >= 0.; } | |
| void CalculateErrors(Bool_t calc = kTRUE) { | | void CalculateErrors(Bool_t calc = kTRUE) { | |
| // Calculate errors (or not if "calc" == kFALSE) | | // Calculate errors (or not if "calc" == kFALSE) | |
| if (calc) Sumw2(); | | if (calc) Sumw2(); | |
| else fTsumw2 = -1.; | | else fTsumw2 = -1.; | |
| } | | } | |
| | | | |
End of changes. 4 change blocks. |
| 2 lines changed or deleted | | 7 lines changed or added | |
|
| TImage.h | | TImage.h | |
|
| // @(#)root/graf:$Id: TImage.h 23087 2008-04-09 14:10:56Z rdm $ | | // @(#)root/graf:$Id: TImage.h 30544 2009-10-02 15:33:12Z couet $ | |
| // Author: Fons Rademakers, Reiner Rohlfs 15/10/2001 | | // Author: Fons Rademakers, Reiner Rohlfs 15/10/2001 | |
| | | | |
| /************************************************************************* | | /************************************************************************* | |
| * Copyright (C) 2001-2001, Rene Brun, Fons Rademakers and Reiner Rohlfs * | | * Copyright (C) 2001-2001, Rene Brun, Fons Rademakers and Reiner Rohlfs * | |
| * 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_TImage | | #ifndef ROOT_TImage | |
| #define ROOT_TImage | | #define ROOT_TImage | |
| | | | |
| ////////////////////////////////////////////////////////////////////////// | | ////////////////////////////////////////////////////////////////////////// | |
| // // | | // // | |
| // TImage // | | // TImage // | |
| // // | | // // | |
| // Abstract interface to image processing library. // | | // Abstract interface to image processing library. // | |
|
| // It allows for the reading and writing of images in different // | | | |
| // formats, several image manipulations (scaling, tiling, merging, // | | | |
| // etc.) and displaying in pads. // | | | |
| // // | | // // | |
| ////////////////////////////////////////////////////////////////////////// | | ////////////////////////////////////////////////////////////////////////// | |
| | | | |
| #ifndef ROOT_TNamed | | #ifndef ROOT_TNamed | |
| #include "TNamed.h" | | #include "TNamed.h" | |
| #endif | | #endif | |
| | | | |
| #ifndef ROOT_TAttImage | | #ifndef ROOT_TAttImage | |
| #include "TAttImage.h" | | #include "TAttImage.h" | |
| #endif | | #endif | |
| | | | |
| skipping to change at line 139 | | skipping to change at line 136 | |
| virtual TObject *Clone(const char *) const { return 0; } | | virtual TObject *Clone(const char *) const { return 0; } | |
| | | | |
| // Input / output | | // Input / output | |
| virtual void ReadImage(const char * /*file*/, EImageFileTypes /*type*/ =
TImage::kUnknown) {} | | virtual void ReadImage(const char * /*file*/, EImageFileTypes /*type*/ =
TImage::kUnknown) {} | |
| virtual void WriteImage(const char * /*file*/, EImageFileTypes /*type*/
= TImage::kUnknown) {} | | virtual void WriteImage(const char * /*file*/, EImageFileTypes /*type*/
= TImage::kUnknown) {} | |
| virtual void SetImage(const Double_t * /*imageData*/, UInt_t /*width*/,
UInt_t /*height*/, TImagePalette * /*palette*/ = 0) {} | | virtual void SetImage(const Double_t * /*imageData*/, UInt_t /*width*/,
UInt_t /*height*/, TImagePalette * /*palette*/ = 0) {} | |
| virtual void SetImage(const TArrayD & /*imageData*/, UInt_t /*width*/, T
ImagePalette * /*palette*/ = 0) {} | | virtual void SetImage(const TArrayD & /*imageData*/, UInt_t /*width*/, T
ImagePalette * /*palette*/ = 0) {} | |
| virtual void SetImage(const TVectorD & /*imageData*/, UInt_t /*width*/,
TImagePalette * /*palette*/ = 0) {} | | virtual void SetImage(const TVectorD & /*imageData*/, UInt_t /*width*/,
TImagePalette * /*palette*/ = 0) {} | |
| virtual void SetImage(Pixmap_t /*pxm*/, Pixmap_t /*mask*/ = 0) {} | | virtual void SetImage(Pixmap_t /*pxm*/, Pixmap_t /*mask*/ = 0) {} | |
| | | | |
|
| // Pad conversions | | // Create an image from the given pad. (See TASImage::FromPad) | |
| virtual void FromPad(TVirtualPad * /*pad*/, Int_t /*x*/ = 0, Int_t /*y*/
= 0, UInt_t /*w*/ = 0, UInt_t /*h*/ = 0) {} | | virtual void FromPad(TVirtualPad * /*pad*/, Int_t /*x*/ = 0, Int_t /*y*/
= 0, UInt_t /*w*/ = 0, UInt_t /*h*/ = 0) {} | |
| | | | |
|
| // Transformations | | // Restore the image original size. (See TASImage::UnZoom) | |
| virtual void UnZoom() {} | | virtual void UnZoom() {} | |
|
| | | | |
| | | // Zoom the image. (See TASImage::Zoom) | |
| virtual void Zoom(UInt_t /*offX*/, UInt_t /*offY*/, UInt_t /*width*/, UI
nt_t /*height*/) {} | | virtual void Zoom(UInt_t /*offX*/, UInt_t /*offY*/, UInt_t /*width*/, UI
nt_t /*height*/) {} | |
|
| | | | |
| | | // Flip the image by a multiple of 90 degrees. (See TASImage::Flip) | |
| virtual void Flip(Int_t /*flip*/ = 180) {} | | virtual void Flip(Int_t /*flip*/ = 180) {} | |
|
| | | | |
| | | // Converts image to Gray. (See TASImage::Gray) | |
| virtual void Gray(Bool_t /*on*/ = kTRUE) {} | | virtual void Gray(Bool_t /*on*/ = kTRUE) {} | |
| virtual Bool_t IsGray() const { return kFALSE; } | | virtual Bool_t IsGray() const { return kFALSE; } | |
|
| | | | |
| | | // Mirror the image. (See TASImage::Mirror) | |
| virtual void Mirror(Bool_t /*vert*/ = kTRUE) {} | | virtual void Mirror(Bool_t /*vert*/ = kTRUE) {} | |
|
| | | | |
| | | // Scale the image. (See TASImage::Scale) | |
| virtual void Scale(UInt_t /*width*/, UInt_t /*height*/) {} | | virtual void Scale(UInt_t /*width*/, UInt_t /*height*/) {} | |
|
| | | | |
| | | // Slice the image. (See TASImage::Slice) | |
| virtual void Slice(UInt_t /*xStart*/, UInt_t /*xEnd*/, UInt_t /*yStart*/
, UInt_t /*yEnd*/, | | virtual void Slice(UInt_t /*xStart*/, UInt_t /*xEnd*/, UInt_t /*yStart*/
, UInt_t /*yEnd*/, | |
| UInt_t /*toWidth*/, UInt_t /*toHeight*/) {} | | UInt_t /*toWidth*/, UInt_t /*toHeight*/) {} | |
|
| | | | |
| | | // Tile the image. (See TASImage::Tile) | |
| virtual void Tile(UInt_t /*width*/, UInt_t /*height*/) {} | | virtual void Tile(UInt_t /*width*/, UInt_t /*height*/) {} | |
|
| | | | |
| | | // Crop the image. (See TASImage::Crop) | |
| virtual void Crop(Int_t /*x*/ = 0, Int_t /*y*/ = 0, UInt_t /*width*/ = 0
, UInt_t /*height*/ = 0) {} | | virtual void Crop(Int_t /*x*/ = 0, Int_t /*y*/ = 0, UInt_t /*width*/ = 0
, UInt_t /*height*/ = 0) {} | |
|
| | | | |
| | | // Enlarge image. (See TASImage::Pad) | |
| virtual void Pad(const char * /*color*/ = "#FFFFFFFF", UInt_t /*left*/ =
0, | | virtual void Pad(const char * /*color*/ = "#FFFFFFFF", UInt_t /*left*/ =
0, | |
| UInt_t /*right*/ = 0, UInt_t /*top*/ = 0, UInt_t /*botto
m*/ = 0) {} | | UInt_t /*right*/ = 0, UInt_t /*top*/ = 0, UInt_t /*botto
m*/ = 0) {} | |
|
| | | | |
| | | // Gaussian blurr. (See TASImage::Blur) | |
| virtual void Blur(Double_t /*horizontal*/ = 3, Double_t /*vertical*/ = 3
) { } | | virtual void Blur(Double_t /*horizontal*/ = 3, Double_t /*vertical*/ = 3
) { } | |
|
| | | | |
| | | // Reduces colordepth of an image. (See TASImage::Vectorize) | |
| virtual Double_t *Vectorize(UInt_t /*max_colors*/ = 256, UInt_t /*dither
*/ = 4, Int_t /*opaque_threshold*/ = 0) { return 0; } | | virtual Double_t *Vectorize(UInt_t /*max_colors*/ = 256, UInt_t /*dither
*/ = 4, Int_t /*opaque_threshold*/ = 0) { return 0; } | |
|
| | | | |
| | | // (See TASImage::HSV) | |
| virtual void HSV(UInt_t /*hue*/ = 0, UInt_t /*radius*/ = 360, Int_t /*H*
/ = 0, Int_t /*S*/ = 0, Int_t /*V*/ = 0, | | virtual void HSV(UInt_t /*hue*/ = 0, UInt_t /*radius*/ = 360, Int_t /*H*
/ = 0, Int_t /*S*/ = 0, Int_t /*V*/ = 0, | |
| Int_t /*x*/ = 0, Int_t /*y*/ = 0, UInt_t /*width*/ = 0,
UInt_t /*height*/ = 0) {} | | Int_t /*x*/ = 0, Int_t /*y*/ = 0, UInt_t /*width*/ = 0,
UInt_t /*height*/ = 0) {} | |
|
| | | | |
| | | // Render multipoint gradient inside a rectangle. (See TASImage::Gradien | |
| | | t) | |
| virtual void Gradient(UInt_t /*angle*/ = 0, const char * /*colors*/ = "#
FFFFFF #000000", const char * /*offsets*/ = 0, | | virtual void Gradient(UInt_t /*angle*/ = 0, const char * /*colors*/ = "#
FFFFFF #000000", const char * /*offsets*/ = 0, | |
| Int_t /*x*/ = 0, Int_t /*y*/ = 0, UInt_t /*width*/
= 0, UInt_t /*height*/ = 0) {} | | Int_t /*x*/ = 0, Int_t /*y*/ = 0, UInt_t /*width*/
= 0, UInt_t /*height*/ = 0) {} | |
|
| | | | |
| | | // Merge two images. (See TASImage::Merge) | |
| virtual void Merge(const TImage * /*im*/, const char * /*op*/ = "alphabl
end", Int_t /*x*/ = 0, Int_t /*y*/ = 0) {} | | virtual void Merge(const TImage * /*im*/, const char * /*op*/ = "alphabl
end", Int_t /*x*/ = 0, Int_t /*y*/ = 0) {} | |
|
| | | | |
| | | // Append image. (See TASImage::Append) | |
| virtual void Append(const TImage * /*im*/, const char * /*option*/ = "+"
, const char * /*color*/ = "#00000000") {} | | virtual void Append(const TImage * /*im*/, const char * /*option*/ = "+"
, const char * /*color*/ = "#00000000") {} | |
|
| | | | |
| | | // Bevel effect. (See TASImage::Bevel) | |
| virtual void Bevel(Int_t /*x*/ = 0, Int_t /*y*/ = 0, UInt_t /*width*/ =
0, UInt_t /*height*/ = 0, | | virtual void Bevel(Int_t /*x*/ = 0, Int_t /*y*/ = 0, UInt_t /*width*/ =
0, UInt_t /*height*/ = 0, | |
| const char * /*hi*/ = "#ffdddddd", const char * /*lo*
/ = "#ff555555", | | const char * /*hi*/ = "#ffdddddd", const char * /*lo*
/ = "#ff555555", | |
| UShort_t /*thick*/ = 1, Bool_t /*pressed*/ = kFALSE)
{} | | UShort_t /*thick*/ = 1, Bool_t /*pressed*/ = kFALSE)
{} | |
|
| virtual void DrawText(Int_t /*x*/ = 0, Int_t /*y*/ = 0, const char * /*t | | | |
| ext*/ = "", Int_t /*size*/ = 12, | | | |
| const char * /*color*/ = 0, const char * /*font*/ | | | |
| = "fixed", | | | |
| EText3DType /*type*/ = TImage::kPlain, const char | | | |
| * /*fore_file*/ = 0, Float_t /*angle*/ = 0) { } | | | |
| virtual void DrawText(TText * /*text*/, Int_t /*x*/ = 0, Int_t /*y*/ = 0 | | | |
| ) { } | | | |
| | | | |
|
| // vector graphics | | | |
| virtual void BeginPaint(Bool_t /*fast*/ = kTRUE) {} | | virtual void BeginPaint(Bool_t /*fast*/ = kTRUE) {} | |
| virtual void EndPaint() {} | | virtual void EndPaint() {} | |
| virtual void DrawLine(UInt_t /*x1*/, UInt_t /*y1*/, UInt_t /*x2*/, UInt_
t /*y2*/, | | virtual void DrawLine(UInt_t /*x1*/, UInt_t /*y1*/, UInt_t /*x2*/, UInt_
t /*y2*/, | |
| const char * /*col*/ = "#000000", UInt_t /*thick*/
= 1) {} | | const char * /*col*/ = "#000000", UInt_t /*thick*/
= 1) {} | |
| virtual void DrawDashLine(UInt_t /*x1*/, UInt_t /*y1*/, UInt_t /*x2*/, U
Int_t /*y2*/, UInt_t /*nDash*/, | | virtual void DrawDashLine(UInt_t /*x1*/, UInt_t /*y1*/, UInt_t /*x2*/, U
Int_t /*y2*/, UInt_t /*nDash*/, | |
| const char * /*pDash*/, const char * /*col*/ =
"#000000", UInt_t /*thick*/ = 1) {} | | const char * /*pDash*/, const char * /*col*/ =
"#000000", UInt_t /*thick*/ = 1) {} | |
| virtual void DrawBox(Int_t /*x1*/, Int_t /*y1*/, Int_t /*x2*/, Int_t /*y
2*/, | | virtual void DrawBox(Int_t /*x1*/, Int_t /*y1*/, Int_t /*x2*/, Int_t /*y
2*/, | |
| const char * /*col*/ = "#000000", UInt_t /*thick*/
= 1, Int_t /*mode*/ = 0) {} | | const char * /*col*/ = "#000000", UInt_t /*thick*/
= 1, Int_t /*mode*/ = 0) {} | |
| virtual void DrawRectangle(UInt_t /*x*/, UInt_t /*y*/, UInt_t /*w*/, UIn
t_t /*h*/, | | virtual void DrawRectangle(UInt_t /*x*/, UInt_t /*y*/, UInt_t /*w*/, UIn
t_t /*h*/, | |
| const char * /*col*/ = "#000000", UInt_t /*th
ick*/ = 1) {} | | const char * /*col*/ = "#000000", UInt_t /*th
ick*/ = 1) {} | |
| virtual void FillRectangle(const char * /*col*/ = 0, Int_t /*x*/ = 0, In
t_t /*y*/ = 0, | | virtual void FillRectangle(const char * /*col*/ = 0, Int_t /*x*/ = 0, In
t_t /*y*/ = 0, | |
| UInt_t /*width*/ = 0, UInt_t /*height*/ = 0)
{} | | UInt_t /*width*/ = 0, UInt_t /*height*/ = 0)
{} | |
| virtual void DrawPolyLine(UInt_t /*nn*/, TPoint * /*xy*/, const char * /
*col*/ = "#000000", | | virtual void DrawPolyLine(UInt_t /*nn*/, TPoint * /*xy*/, const char * /
*col*/ = "#000000", | |
| UInt_t /*thick*/ = 1, TImage::ECoordMode /*mod
e*/ = kCoordModeOrigin) {} | | UInt_t /*thick*/ = 1, TImage::ECoordMode /*mod
e*/ = kCoordModeOrigin) {} | |
| virtual void PutPixel(Int_t /*x*/, Int_t /*y*/, const char * /*col*/ = "
#000000") {} | | virtual void PutPixel(Int_t /*x*/, Int_t /*y*/, const char * /*col*/ = "
#000000") {} | |
| virtual void PolyPoint(UInt_t /*npt*/, TPoint * /*ppt*/, const char * /*
col*/ = "#000000", | | virtual void PolyPoint(UInt_t /*npt*/, TPoint * /*ppt*/, const char * /*
col*/ = "#000000", | |
| TImage::ECoordMode /*mode*/ = kCoordModeOrigin) {
} | | TImage::ECoordMode /*mode*/ = kCoordModeOrigin) {
} | |
| virtual void DrawSegments(UInt_t /*nseg*/, Segment_t * /*seg*/, const ch
ar * /*col*/ = "#000000", UInt_t /*thick*/ = 1) {} | | virtual void DrawSegments(UInt_t /*nseg*/, Segment_t * /*seg*/, const ch
ar * /*col*/ = "#000000", UInt_t /*thick*/ = 1) {} | |
|
| | | virtual void DrawText(Int_t /*x*/ = 0, Int_t /*y*/ = 0, const char * /*t | |
| | | ext*/ = "", Int_t /*size*/ = 12, | |
| | | const char * /*color*/ = 0, const char * /*font*/ | |
| | | = "fixed", | |
| | | EText3DType /*type*/ = TImage::kPlain, const char | |
| | | * /*fore_file*/ = 0, Float_t /*angle*/ = 0) { } | |
| | | virtual void DrawText(TText * /*text*/, Int_t /*x*/ = 0, Int_t /*y*/ = 0 | |
| | | ) { } | |
| virtual void FillPolygon(UInt_t /*npt*/, TPoint * /*ppt*/, const char *
/*col*/ = "#000000", | | virtual void FillPolygon(UInt_t /*npt*/, TPoint * /*ppt*/, const char *
/*col*/ = "#000000", | |
| const char * /*stipple*/ = 0, UInt_t /*w*/ = 16,
UInt_t /*h*/ = 16) {} | | const char * /*stipple*/ = 0, UInt_t /*w*/ = 16,
UInt_t /*h*/ = 16) {} | |
| virtual void FillPolygon(UInt_t /*npt*/, TPoint * /*ppt*/, TImage * /*ti
le*/) {} | | virtual void FillPolygon(UInt_t /*npt*/, TPoint * /*ppt*/, TImage * /*ti
le*/) {} | |
| virtual void CropPolygon(UInt_t /*npt*/, TPoint * /*ppt*/) {} | | virtual void CropPolygon(UInt_t /*npt*/, TPoint * /*ppt*/) {} | |
| virtual void DrawFillArea(UInt_t /*npt*/, TPoint * /*ppt*/, const char *
/*col*/ = "#000000", | | virtual void DrawFillArea(UInt_t /*npt*/, TPoint * /*ppt*/, const char *
/*col*/ = "#000000", | |
| const char * /*stipple*/ = 0, UInt_t /*w*/ = 16,
UInt_t /*h*/ = 16) {} | | const char * /*stipple*/ = 0, UInt_t /*w*/ = 16,
UInt_t /*h*/ = 16) {} | |
| virtual void DrawFillArea(UInt_t /*npt*/, TPoint * /*ppt*/, TImage * /*t
ile*/) {} | | virtual void DrawFillArea(UInt_t /*npt*/, TPoint * /*ppt*/, TImage * /*t
ile*/) {} | |
| virtual void FillSpans(UInt_t /*npt*/, TPoint * /*ppt*/, UInt_t * /*widt
hs*/, const char * /*col*/ = "#000000", | | virtual void FillSpans(UInt_t /*npt*/, TPoint * /*ppt*/, UInt_t * /*widt
hs*/, const char * /*col*/ = "#000000", | |
| const char * /*stipple*/ = 0, UInt_t /*w*/ = 16, U
Int_t /*h*/ = 16) {} | | const char * /*stipple*/ = 0, UInt_t /*w*/ = 16, U
Int_t /*h*/ = 16) {} | |
| virtual void FillSpans(UInt_t /*npt*/, TPoint * /*ppt*/, UInt_t * /*widt
hs*/, TImage * /*tile*/) {} | | virtual void FillSpans(UInt_t /*npt*/, TPoint * /*ppt*/, UInt_t * /*widt
hs*/, TImage * /*tile*/) {} | |
| | | | |
| skipping to change at line 215 | | skipping to change at line 243 | |
| virtual void FloodFill(Int_t /*x*/, Int_t /*y*/, const char * /*col*/, c
onst char * /*min_col*/, const char * /*max_col*/ = 0) {} | | virtual void FloodFill(Int_t /*x*/, Int_t /*y*/, const char * /*col*/, c
onst char * /*min_col*/, const char * /*max_col*/ = 0) {} | |
| virtual void DrawCubeBezier(Int_t /*x1*/, Int_t /*y1*/, Int_t /*x2*/, In
t_t /*y2*/, Int_t /*x3*/, Int_t /*y3*/, const char * /*col*/ = "#000000", U
Int_t /*thick*/ = 1) {} | | virtual void DrawCubeBezier(Int_t /*x1*/, Int_t /*y1*/, Int_t /*x2*/, In
t_t /*y2*/, Int_t /*x3*/, Int_t /*y3*/, const char * /*col*/ = "#000000", U
Int_t /*thick*/ = 1) {} | |
| virtual void DrawStraightEllips(Int_t /*x*/, Int_t /*y*/, Int_t /*rx*/,
Int_t /*ry*/, const char * /*col*/ = "#000000", Int_t /*thick*/ = 1) {} | | virtual void DrawStraightEllips(Int_t /*x*/, Int_t /*y*/, Int_t /*rx*/,
Int_t /*ry*/, const char * /*col*/ = "#000000", Int_t /*thick*/ = 1) {} | |
| virtual void DrawCircle(Int_t /*x*/, Int_t /*y*/, Int_t /*r*/, const cha
r * /*col*/ = "#000000", Int_t /*thick*/ = 1) {} | | virtual void DrawCircle(Int_t /*x*/, Int_t /*y*/, Int_t /*r*/, const cha
r * /*col*/ = "#000000", Int_t /*thick*/ = 1) {} | |
| virtual void DrawEllips(Int_t /*x*/, Int_t /*y*/, Int_t /*rx*/, Int_t /*
ry*/, Int_t /*angle*/, const char * /*col*/ = "#000000", Int_t /*thick*/ =
1) {} | | virtual void DrawEllips(Int_t /*x*/, Int_t /*y*/, Int_t /*rx*/, Int_t /*
ry*/, Int_t /*angle*/, const char * /*col*/ = "#000000", Int_t /*thick*/ =
1) {} | |
| virtual void DrawEllips2(Int_t /*x*/, Int_t /*y*/, Int_t /*rx*/, Int_t /
*ry*/, Int_t /*angle*/, const char * /*col*/ = "#000000", Int_t /*thick*/ =
1) {} | | virtual void DrawEllips2(Int_t /*x*/, Int_t /*y*/, Int_t /*rx*/, Int_t /
*ry*/, Int_t /*angle*/, const char * /*col*/ = "#000000", Int_t /*thick*/ =
1) {} | |
| | | | |
| virtual void SetEditable(Bool_t /*on*/ = kTRUE) {} | | virtual void SetEditable(Bool_t /*on*/ = kTRUE) {} | |
| virtual Bool_t IsEditable() const { return kFALSE; } | | virtual Bool_t IsEditable() const { return kFALSE; } | |
| | | | |
|
| // Utilities | | | |
| virtual UInt_t GetWidth() const { return 0; } | | virtual UInt_t GetWidth() const { return 0; } | |
| virtual UInt_t GetHeight() const { return 0; } | | virtual UInt_t GetHeight() const { return 0; } | |
| virtual Bool_t IsValid() const { return kTRUE; } | | virtual Bool_t IsValid() const { return kTRUE; } | |
| virtual TImage *GetScaledImage() const { return 0; } | | virtual TImage *GetScaledImage() const { return 0; } | |
| | | | |
| virtual TArrayL *GetPixels(Int_t /*x*/= 0, Int_t /*y*/= 0, UInt_t /*w*/
= 0, UInt_t /*h*/ = 0) { return 0; } | | virtual TArrayL *GetPixels(Int_t /*x*/= 0, Int_t /*y*/= 0, UInt_t /*w*/
= 0, UInt_t /*h*/ = 0) { return 0; } | |
| virtual TArrayD *GetArray(UInt_t /*w*/ = 0, UInt_t /*h*/ = 0, TImagePal
ette * = gWebImagePalette) { return 0; } | | virtual TArrayD *GetArray(UInt_t /*w*/ = 0, UInt_t /*h*/ = 0, TImagePal
ette * = gWebImagePalette) { return 0; } | |
| virtual Pixmap_t GetPixmap() { return 0; } | | virtual Pixmap_t GetPixmap() { return 0; } | |
| virtual Pixmap_t GetMask() { return 0; } | | virtual Pixmap_t GetMask() { return 0; } | |
| virtual UInt_t *GetArgbArray() { return 0; } | | virtual UInt_t *GetArgbArray() { return 0; } | |
| | | | |
End of changes. 24 change blocks. |
| 16 lines changed or deleted | | 44 lines changed or added | |
|
| TPerfStats.h | | TPerfStats.h | |
|
| // @(#)root/proofplayer:$Id: TPerfStats.h 20882 2007-11-19 11:31:26Z rdm $ | | // @(#)root/proofplayer:$Id: TPerfStats.h 30965 2009-11-04 11:15:25Z ganis
$ | |
| // Author: Kristjan Gulbrandsen 11/05/04 | | // Author: Kristjan Gulbrandsen 11/05/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 89 | | skipping to change at line 89 | |
| TH1D *fPacketsHist; //!histogram of packets processed per slav
e | | TH1D *fPacketsHist; //!histogram of packets processed per slav
e | |
| TH1D *fEventsHist; //!histogram of events processed per slave | | TH1D *fEventsHist; //!histogram of events processed per slave | |
| TH1D *fNodeHist; //!histogram of slaves per file serving no
de | | TH1D *fNodeHist; //!histogram of slaves per file serving no
de | |
| TH2D *fLatencyHist; //!histogram of latency due to packet requ
ests | | TH2D *fLatencyHist; //!histogram of latency due to packet requ
ests | |
| TH2D *fProcTimeHist; //!histogram of real time spent processing
packets | | TH2D *fProcTimeHist; //!histogram of real time spent processing
packets | |
| TH2D *fCpuTimeHist; //!histogram of cpu time spent processing
packets | | TH2D *fCpuTimeHist; //!histogram of cpu time spent processing
packets | |
| Long64_t fBytesRead; //!track bytes read of main file | | Long64_t fBytesRead; //!track bytes read of main file | |
| Double_t fTotCpuTime; //!total cpu time of all slaves | | Double_t fTotCpuTime; //!total cpu time of all slaves | |
| Long64_t fTotBytesRead; //!total bytes read on all slaves | | Long64_t fTotBytesRead; //!total bytes read on all slaves | |
| Long64_t fTotEvents; //!total number of events processed | | Long64_t fTotEvents; //!total number of events processed | |
|
| | | Long64_t fNumEvents; //!total number of events to be processed | |
| Int_t fSlaves; //!number of active slaves | | Int_t fSlaves; //!number of active slaves | |
| | | | |
| Bool_t fDoHist; //!Fill histos | | Bool_t fDoHist; //!Fill histos | |
| Bool_t fDoTrace; //!Trace details in master | | Bool_t fDoTrace; //!Trace details in master | |
| Bool_t fDoTraceRate; //!Trace processing rate in master | | Bool_t fDoTraceRate; //!Trace processing rate in master | |
| Bool_t fDoSlaveTrace; //!Full tracing in workers | | Bool_t fDoSlaveTrace; //!Full tracing in workers | |
| Bool_t fDoQuota; //!Save stats on SQL server for quota mana
gement | | Bool_t fDoQuota; //!Save stats on SQL server for quota mana
gement | |
| | | | |
| TVirtualMonitoringWriter *fMonitoringWriter; //!Monitoring engine | | TVirtualMonitoringWriter *fMonitoringWriter; //!Monitoring engine | |
| | | | |
| | | | |
| skipping to change at line 112 | | skipping to change at line 113 | |
| public: | | public: | |
| virtual ~TPerfStats() {} | | virtual ~TPerfStats() {} | |
| | | | |
| void SimpleEvent(EEventType type); | | void SimpleEvent(EEventType type); | |
| void PacketEvent(const char *slave, const char *slavename, const char *f
ilename, | | void PacketEvent(const char *slave, const char *slavename, const char *f
ilename, | |
| Long64_t eventsprocessed, Double_t latency, | | Long64_t eventsprocessed, Double_t latency, | |
| Double_t proctime, Double_t cputime, Long64_t bytesRead
); | | Double_t proctime, Double_t cputime, Long64_t bytesRead
); | |
| void FileEvent(const char *slave, const char *slavename, const char *nod
ename, const char *filename, | | void FileEvent(const char *slave, const char *slavename, const char *nod
ename, const char *filename, | |
| Bool_t isStart); | | Bool_t isStart); | |
| | | | |
|
| void FileOpenEvent(TFile *file, const char *filename, Double_t proctime) | | void FileOpenEvent(TFile *file, const char *filename, Double_t start); | |
| ; | | void FileReadEvent(TFile *file, Int_t len, Double_t start); | |
| void FileReadEvent(TFile *file, Int_t len, Double_t proctime); | | | |
| void RateEvent(Double_t proctime, Double_t deltatime, | | void RateEvent(Double_t proctime, Double_t deltatime, | |
| Long64_t eventsprocessed, Long64_t bytesRead); | | Long64_t eventsprocessed, Long64_t bytesRead); | |
| void SetBytesRead(Long64_t num); | | void SetBytesRead(Long64_t num); | |
| Long64_t GetBytesRead() const; | | Long64_t GetBytesRead() const; | |
|
| | | void SetNumEvents(Long64_t num) { fNumEvents = num; } | |
| | | Long64_t GetNumEvents() const { return fNumEvents; } | |
| | | | |
| static void Start(TList *input, TList *output); | | static void Start(TList *input, TList *output); | |
| static void Stop(); | | static void Stop(); | |
| static void Setup(TList *input); | | static void Setup(TList *input); | |
| | | | |
| ClassDef(TPerfStats,0) // Class for collecting PROOF statistics | | ClassDef(TPerfStats,0) // Class for collecting PROOF statistics | |
| }; | | }; | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 4 change blocks. |
| 4 lines changed or deleted | | 6 lines changed or added | |
|
| TProof.h | | TProof.h | |
|
| // @(#)root/proof:$Id: TProof.h 30174 2009-09-15 14:24:56Z ganis $ | | // @(#)root/proof:$Id: TProof.h 30995 2009-11-05 17:41:03Z ganis $ | |
| // 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 120 | | skipping to change at line 120 | |
| // 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) | | // 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) | | // 22 -> 23: New dataset features (default tree name; classification per fi
leserver) | |
| // 23 -> 24: Merging optimization | | // 23 -> 24: Merging optimization | |
| // 24 -> 25: Handling of 'data' dir; group information | | // 24 -> 25: Handling of 'data' dir; group information | |
|
| | | // 25 -> 26: Use new TProofProgressInfo class | |
| | | | |
| // PROOF magic constants | | // PROOF magic constants | |
|
| const Int_t kPROOF_Protocol = 25; // protocol versi
on number | | const Int_t kPROOF_Protocol = 26; // 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_DataDir = "data"; // dir for produc
ed data, under WorkDir | | const char* const kPROOF_DataDir = "data"; // dir for produc
ed data, under WorkDir | |
| const char* const kPROOF_CacheLockFile = "proof-cache-lock-"; // cache
lock file | | const char* const kPROOF_CacheLockFile = "proof-cache-lock-"; // cache
lock file | |
| | | | |
| skipping to change at line 160 | | skipping to change at line 161 | |
| const char* const kUNTAR = "..."; | | const char* const kUNTAR = "..."; | |
| const char* const kUNTAR2 = "..."; | | const char* const kUNTAR2 = "..."; | |
| const char* const kUNTAR3 = "..."; | | const char* const kUNTAR3 = "..."; | |
| 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); | |
| | | | |
|
| | | // Structure for the progress information | |
| | | class TProofProgressInfo : public TObject { | |
| | | public: | |
| | | Long64_t fTotal; // Total number of events to process | |
| | | Long64_t fProcessed; // Number of events processed | |
| | | Long64_t fBytesRead; // Number of bytes read | |
| | | Float_t fInitTime; // Time for initialization | |
| | | Float_t fProcTime; // Time for processing | |
| | | Float_t fEvtRateI; // Instantaneous event rate | |
| | | Float_t fMBRateI; // Instantaneous byte read rate | |
| | | Int_t fActWorkers; // Numebr of workers still active | |
| | | Int_t fTotSessions; // Numebr of PROOF sessions running currently on | |
| | | the clusters | |
| | | Float_t fEffSessions; // Number of effective sessions running on the m | |
| | | achines allocated to this session | |
| | | TProofProgressInfo(Long64_t tot = 0, Long64_t proc = 0, Long64_t bytes = | |
| | | 0, | |
| | | Float_t initt = -1., Float_t proct = -1., | |
| | | Float_t evts = -1., Float_t mbs = -1., | |
| | | Int_t actw = 0, Int_t tsess = 0, Float_t esess = 0.) | |
| | | : | |
| | | fTotal(tot), fProcessed(proc), fBytesRead(bytes), | |
| | | fInitTime(initt), fProcTime(proct), fEvtRateI(evts), | |
| | | fMBRateI(mbs), | |
| | | fActWorkers(actw), fTotSessions(tsess), fEffSessions( | |
| | | esess) { } | |
| | | virtual ~TProofProgressInfo() { } | |
| | | ClassDef(TProofProgressInfo, 1); // Progress information | |
| | | }; | |
| | | | |
| // PROOF Interrupt signal handler | | // PROOF Interrupt signal handler | |
| class TProofInterruptHandler : public TSignalHandler { | | class TProofInterruptHandler : public TSignalHandler { | |
| private: | | private: | |
| TProof *fProof; | | 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 | |
| public: | | public: | |
| TProofInterruptHandler(TProof *p) | | TProofInterruptHandler(TProof *p) | |
| : TSignalHandler(kSigInterrupt, kFALSE), fProof(p) { } | | : TSignalHandler(kSigInterrupt, kFALSE), fProof(p) { } | |
| | | | |
| skipping to change at line 196 | | skipping to change at line 221 | |
| | | | |
| // 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 }; | |
| | | | |
| TString fOrdinal; //slave ordinal | | TString fOrdinal; //slave ordinal | |
| TString fHostName; //hostname this slave is running on | | TString fHostName; //hostname this slave is running on | |
| TString fMsd; //mass storage domain slave is in | | TString fMsd; //mass storage domain slave is in | |
| Int_t fPerfIndex; //relative performance of this slave | | Int_t fPerfIndex; //relative performance of this slave | |
|
| | | SysInfo_t fSysInfo; //Infomation about its hardware | |
| ESlaveStatus fStatus; //slave status | | ESlaveStatus fStatus; //slave status | |
| | | | |
| TSlaveInfo(const char *ordinal = "", const char *host = "", Int_t perfid
x = 0, | | TSlaveInfo(const char *ordinal = "", const char *host = "", Int_t perfid
x = 0, | |
| const char *msd = "") : | | const char *msd = "") : | |
| fOrdinal(ordinal), fHostName(host), fMsd(msd), | | fOrdinal(ordinal), fHostName(host), fMsd(msd), | |
|
| fPerfIndex(perfidx), fStatus(kNotActive) { } | | fPerfIndex(perfidx), fSysInfo(), fStatus(kNotActive) { } | |
| | | | |
| const char *GetMsd() const { return fMsd; } | | const char *GetMsd() const { return fMsd; } | |
| const char *GetName() const { return fHostName; } | | const char *GetName() const { return fHostName; } | |
| const char *GetOrdinal() const { return fOrdinal; } | | const char *GetOrdinal() const { return fOrdinal; } | |
|
| | | SysInfo_t GetSysInfo() const { return fSysInfo; } | |
| void SetStatus(ESlaveStatus stat) { fStatus = stat; } | | void SetStatus(ESlaveStatus stat) { fStatus = stat; } | |
|
| | | void SetSysInfo(SysInfo_t si); | |
| | | | |
| 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,3) //basic info on slave | |
| }; | | }; | |
| | | | |
| // Small auxilliary class for merging progress notification | | // Small auxilliary class for merging progress notification | |
| class TProofMergePrg { | | class TProofMergePrg { | |
| private: | | private: | |
| TString fExp; | | TString fExp; | |
| Int_t fIdx; | | Int_t fIdx; | |
| Int_t fNWrks; | | Int_t fNWrks; | |
| static char fgCr[4]; | | static char fgCr[4]; | |
| public: | | public: | |
|
| TProofMergePrg() : fIdx(-1), fNWrks(-1) { } | | TProofMergePrg() : fExp(), fIdx(-1), fNWrks(-1) { } | |
| | | | |
| const char *Export() { fExp.Form("%c (%d workers still sending) ", fg
Cr[fIdx], fNWrks); | | const char *Export() { fExp.Form("%c (%d workers still sending) ", fg
Cr[fIdx], fNWrks); | |
| return fExp.Data(); } | | return fExp.Data(); } | |
| void DecreaseNWrks() { fNWrks--; } | | void DecreaseNWrks() { fNWrks--; } | |
| void IncreaseIdx() { fIdx++; if (fIdx == 4) fIdx = 0; } | | void IncreaseIdx() { fIdx++; if (fIdx == 4) fIdx = 0; } | |
| void Reset(Int_t n = -1) { fIdx = -1; SetNWrks(n); } | | void Reset(Int_t n = -1) { fIdx = -1; SetNWrks(n); } | |
| void SetNWrks(Int_t n) { fNWrks = n; } | | void SetNWrks(Int_t n) { fNWrks = n; } | |
| }; | | }; | |
| | | | |
| class TProof : public TNamed, public TQObject { | | class TProof : public TNamed, public TQObject { | |
| | | | |
| skipping to change at line 262 | | skipping to change at line 290 | |
| friend class TXSocketHandler; // to access fCurrentMonitor and CollectInput
From | | friend class TXSocketHandler; // to access fCurrentMonitor and CollectInput
From | |
| friend class TXProofMgr; // to access EUrgent | | friend class TXProofMgr; // to access EUrgent | |
| friend class TXProofServ; // to access EUrgent | | friend class TXProofServ; // to access EUrgent | |
| | | | |
| public: | | public: | |
| // PROOF status bits | | // PROOF status bits | |
| enum EStatusBits { | | enum EStatusBits { | |
| kUsingSessionGui = BIT(14), | | kUsingSessionGui = BIT(14), | |
| kNewInputData = BIT(15), | | kNewInputData = BIT(15), | |
| kIsClient = BIT(16), | | kIsClient = BIT(16), | |
|
| kIsMaster = BIT(17) | | kIsMaster = BIT(17), | |
| | | kIsTopMaster = BIT(18) | |
| }; | | }; | |
| enum EQueryMode { | | enum EQueryMode { | |
| kSync = 0, | | kSync = 0, | |
| kAsync = 1 | | kAsync = 1 | |
| }; | | }; | |
| enum EUploadOpt { | | enum EUploadOpt { | |
| kAppend = 0x1, | | kAppend = 0x1, | |
| kOverwriteDataSet = 0x2, | | kOverwriteDataSet = 0x2, | |
| kNoOverwriteDataSet = 0x4, | | kNoOverwriteDataSet = 0x4, | |
| kOverwriteAllFiles = 0x8, | | kOverwriteAllFiles = 0x8, | |
| | | | |
| skipping to change at line 747 | | skipping to change at line 776 | |
| 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; } | |
| Int_t GetClientProtocol() const { return kPROOF_Protocol; } | | Int_t GetClientProtocol() const { return kPROOF_Protocol; } | |
| Int_t GetStatus() const { return fStatus; } | | Int_t GetStatus() const { return fStatus; } | |
| Int_t GetLogLevel() const { return fLogLevel; } | | Int_t GetLogLevel() const { return fLogLevel; } | |
| Int_t GetParallel() const; | | Int_t GetParallel() const; | |
|
| | | Int_t GetSeqNum() const { return fSeqNum; } | |
| Int_t GetSessionID() const { return fSessionID; } | | Int_t GetSessionID() const { return fSessionID; } | |
| TList *GetListOfSlaveInfos(); | | TList *GetListOfSlaveInfos(); | |
| Bool_t UseDynamicStartup() const { return fDynamicStartup; } | | Bool_t UseDynamicStartup() const { return fDynamicStartup; } | |
| | | | |
| EQueryMode GetQueryMode(Option_t *mode = 0) const; | | EQueryMode GetQueryMode(Option_t *mode = 0) const; | |
| void SetQueryMode(EQueryMode mode); | | void SetQueryMode(EQueryMode mode); | |
| | | | |
| void SetRealTimeLog(Bool_t on = kTRUE); | | void SetRealTimeLog(Bool_t on = kTRUE); | |
| | | | |
| Long64_t GetBytesRead() const { return fBytesRead; } | | Long64_t GetBytesRead() const { return fBytesRead; } | |
| | | | |
| skipping to change at line 817 | | skipping to change at line 847 | |
| | | | |
| Bool_t IsDataReady(Long64_t &totalbytes, Long64_t &bytesready); | | Bool_t IsDataReady(Long64_t &totalbytes, Long64_t &bytesready); | |
| | | | |
| void SetActive(Bool_t /*active*/ = kTRUE) { } | | void SetActive(Bool_t /*active*/ = kTRUE) { } | |
| | | | |
| void LogMessage(const char *msg, Bool_t all); //*SIGNAL* | | void LogMessage(const char *msg, Bool_t all); //*SIGNAL* | |
| void Progress(Long64_t total, Long64_t processed); //*SIGNAL* | | void Progress(Long64_t total, Long64_t processed); //*SIGNAL* | |
| void Progress(Long64_t total, Long64_t processed, Long64_t bytesr
ead, | | void Progress(Long64_t total, Long64_t processed, Long64_t bytesr
ead, | |
| Float_t initTime, Float_t procTime, | | Float_t initTime, Float_t procTime, | |
| Float_t evtrti, Float_t mbrti); // *SIGNAL* | | Float_t evtrti, Float_t mbrti); // *SIGNAL* | |
|
| | | void Progress(Long64_t total, Long64_t processed, Long64_t bytesr | |
| | | ead, | |
| | | Float_t initTime, Float_t procTime, | |
| | | Float_t evtrti, Float_t mbrti, | |
| | | Int_t actw, Int_t tses, Float_t eses); // *SIGNAL* | |
| void Feedback(TList *objs); //*SIGNAL* | | void Feedback(TList *objs); //*SIGNAL* | |
| void QueryResultReady(const char *ref); //*SIGNAL* | | void QueryResultReady(const char *ref); //*SIGNAL* | |
| void CloseProgressDialog(); //*SIGNAL* | | void CloseProgressDialog(); //*SIGNAL* | |
| void ResetProgressDialog(const char *sel, Int_t sz, | | void ResetProgressDialog(const char *sel, Int_t sz, | |
| Long64_t fst, Long64_t ent); //*SIGNAL* | | Long64_t fst, Long64_t ent); //*SIGNAL* | |
| void StartupMessage(const char *msg, Bool_t status, Int_t done, | | void StartupMessage(const char *msg, Bool_t status, Int_t done, | |
| Int_t total); //*SIGNAL* | | Int_t total); //*SIGNAL* | |
| void DataSetStatus(const char *msg, Bool_t status, | | void DataSetStatus(const char *msg, Bool_t status, | |
| Int_t done, Int_t total); //*SIGNAL* | | Int_t done, Int_t total); //*SIGNAL* | |
| | | | |
| | | | |
End of changes. 13 change blocks. |
| 6 lines changed or deleted | | 47 lines changed or added | |
|
| TProofOutputFile.h | | TProofOutputFile.h | |
|
| // @(#)root/proof:$Id: TProofOutputFile.h 30174 2009-09-15 14:24:56Z ganis
$ | | // @(#)root/proof:$Id: TProofOutputFile.h 30791 2009-10-19 07:07:32Z ganis
$ | |
| // Author: Long Tran-Thanh 14/09/07 | | // Author: Long Tran-Thanh 14/09/07 | |
| | | | |
| /************************************************************************* | | /************************************************************************* | |
| * Copyright (C) 1995-2002, Rene Brun and Fons Rademakers. * | | * Copyright (C) 1995-2002, 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 57 | | skipping to change at line 57 | |
| kOverwrite = 16, // Force dataset replacement du
ring registration | | kOverwrite = 16, // Force dataset replacement du
ring registration | |
| kVerify = 32}; // Verify the registered datase
t | | kVerify = 32}; // Verify the registered datase
t | |
| | | | |
| private: | | private: | |
| TProofOutputFile(const TProofOutputFile&); // Not implemented | | TProofOutputFile(const TProofOutputFile&); // Not implemented | |
| TProofOutputFile& operator=(const TProofOutputFile&); // Not implemented | | TProofOutputFile& operator=(const TProofOutputFile&); // Not implemented | |
| | | | |
| TString fDir; // name of the directory to be exported | | TString fDir; // name of the directory to be exported | |
| TString fRawDir; // name of the local directory where to create
the file | | TString fRawDir; // name of the local directory where to create
the file | |
| TString fFileName; | | TString fFileName; | |
|
| | | TString fOptionsAnchor; // options and anchor string including delimit
ers, e.g. "?myopts#myanchor" | |
| TString fOutputFileName; | | TString fOutputFileName; | |
| TString fWorkerOrdinal; | | TString fWorkerOrdinal; | |
| TString fLocalHost; // Host where the file was created | | TString fLocalHost; // Host where the file was created | |
| Bool_t fIsLocal; // kTRUE if the file is in the sandbox | | Bool_t fIsLocal; // kTRUE if the file is in the sandbox | |
| Bool_t fMerged; | | Bool_t fMerged; | |
| ERunType fRunType; // Type of run (see enum ERunType) | | ERunType fRunType; // Type of run (see enum ERunType) | |
| UInt_t fTypeOpt; // Option (see enum ETypeOpt) | | UInt_t fTypeOpt; // Option (see enum ETypeOpt) | |
| | | | |
| TFileCollection *fDataSet; // Instance of the file collection in 'datas
et' mode | | TFileCollection *fDataSet; // Instance of the file collection in 'datas
et' mode | |
| TFileMerger *fMerger; // Instance of the file merger in 'merge' mode | | TFileMerger *fMerger; // Instance of the file merger in 'merge' mode | |
| | | | |
| skipping to change at line 80 | | skipping to change at line 81 | |
| void SetDir(const char* dir) { fDir = dir; } | | void SetDir(const char* dir) { fDir = dir; } | |
| void SetWorkerOrdinal(const char* ordinal) { fWorkerOrdinal = ordinal; } | | void SetWorkerOrdinal(const char* ordinal) { fWorkerOrdinal = ordinal; } | |
| | | | |
| void AddFile(TFileMerger *merger, const char *path); | | void AddFile(TFileMerger *merger, const char *path); | |
| void NotifyError(const char *errmsg); | | void NotifyError(const char *errmsg); | |
| void Unlink(const char *path); | | void Unlink(const char *path); | |
| | | | |
| protected: | | protected: | |
| | | | |
| public: | | public: | |
|
| TProofOutputFile() : fIsLocal(kFALSE), fMerged(kFALSE), fRunType(kMerge) | | TProofOutputFile() : fDir(), fRawDir(), fFileName(), fOptionsAnchor(), f | |
| , fTypeOpt(kRemote), fDataSet(0), fMerger(0) { } | | OutputFileName(), | |
| | | fWorkerOrdinal(), fLocalHost(), fIsLocal(kFALSE), f | |
| | | Merged(kFALSE), | |
| | | fRunType(kMerge), fTypeOpt(kRemote), fDataSet(0), f | |
| | | Merger(0) { } | |
| TProofOutputFile(const char *path, const char *option = "M", const char
*dsname = 0); | | TProofOutputFile(const char *path, const char *option = "M", const char
*dsname = 0); | |
| TProofOutputFile(const char *path, ERunType type, UInt_t opt = kRemote,
const char *dsname = 0); | | TProofOutputFile(const char *path, ERunType type, UInt_t opt = kRemote,
const char *dsname = 0); | |
| virtual ~TProofOutputFile(); | | virtual ~TProofOutputFile(); | |
| | | | |
| const char *GetDir(Bool_t raw = kFALSE) const { return (raw) ? fRawDir :
fDir; } | | const char *GetDir(Bool_t raw = kFALSE) const { return (raw) ? fRawDir :
fDir; } | |
| TFileCollection *GetFileCollection(); | | TFileCollection *GetFileCollection(); | |
| TFileMerger *GetFileMerger(Bool_t local = kFALSE); | | TFileMerger *GetFileMerger(Bool_t local = kFALSE); | |
| const char *GetFileName() const { return fFileName; } | | const char *GetFileName() const { return fFileName; } | |
| const char *GetLocalHost() const { return fLocalHost; } | | const char *GetLocalHost() const { return fLocalHost; } | |
|
| | | const char *GetOptionsAnchor() const { return fOptionsAnchor; } | |
| const char *GetOutputFileName() const { return fOutputFileName; } | | const char *GetOutputFileName() const { return fOutputFileName; } | |
| const char *GetWorkerOrdinal() const { return fWorkerOrdinal; } | | const char *GetWorkerOrdinal() const { return fWorkerOrdinal; } | |
| | | | |
| ERunType GetRunType() const { return fRunType; } | | ERunType GetRunType() const { return fRunType; } | |
| UInt_t GetTypeOpt() const { return fTypeOpt; } | | UInt_t GetTypeOpt() const { return fTypeOpt; } | |
| Bool_t IsMerge() const { return (fRunType == kMerge) ? kTRUE : kFAL
SE; } | | Bool_t IsMerge() const { return (fRunType == kMerge) ? kTRUE : kFAL
SE; } | |
| Bool_t IsRegister() const { return ((fTypeOpt & kRegister) || (fTyp
eOpt & kVerify)) ? kTRUE : kFALSE; } | | Bool_t IsRegister() const { return ((fTypeOpt & kRegister) || (fTyp
eOpt & kVerify)) ? kTRUE : kFALSE; } | |
| | | | |
| Int_t AdoptFile(TFile *f); // Adopt a TFile already o
pen | | Int_t AdoptFile(TFile *f); // Adopt a TFile already o
pen | |
| TFile* OpenFile(const char *opt); // Open a file with the sp
ecified name in fFileName1 | | TFile* OpenFile(const char *opt); // Open a file with the sp
ecified name in fFileName1 | |
| Long64_t Merge(TCollection *list); | | Long64_t Merge(TCollection *list); | |
| void Print(Option_t *option = "") const; | | void Print(Option_t *option = "") const; | |
| void SetOutputFileName(const char *name); | | void SetOutputFileName(const char *name); | |
| void ResetFileCollection() { fDataSet = 0; } | | void ResetFileCollection() { fDataSet = 0; } | |
| | | | |
|
| ClassDef(TProofOutputFile,3) // Wrapper class to steer the merging of fi
les produced on workers | | ClassDef(TProofOutputFile,4) // Wrapper class to steer the merging of fi
les produced on workers | |
| }; | | }; | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 5 change blocks. |
| 4 lines changed or deleted | | 10 lines changed or added | |
|
| TProofPlayer.h | | TProofPlayer.h | |
|
| // @(#)root/proofplayer:$Id: TProofPlayer.h 30174 2009-09-15 14:24:56Z gani
s $ | | // @(#)root/proofplayer:$Id: TProofPlayer.h 30900 2009-10-28 14:10:02Z gani
s $ | |
| // Author: Maarten Ballintijn 07/01/02 | | // Author: Maarten Ballintijn 07/01/02 | |
| | | | |
| /************************************************************************* | | /************************************************************************* | |
| * 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 41 | | skipping to change at line 41 | |
| | | | |
| #ifndef ROOT_TVirtualProofPlayer | | #ifndef ROOT_TVirtualProofPlayer | |
| #include "TVirtualProofPlayer.h" | | #include "TVirtualProofPlayer.h" | |
| #endif | | #endif | |
| #ifndef ROOT_TArrayL64 | | #ifndef ROOT_TArrayL64 | |
| #include "TArrayL64.h" | | #include "TArrayL64.h" | |
| #endif | | #endif | |
| #ifndef ROOT_TArrayF | | #ifndef ROOT_TArrayF | |
| #include "TArrayF.h" | | #include "TArrayF.h" | |
| #endif | | #endif | |
|
| | | #ifndef ROOT_TArrayI | |
| | | #include "TArrayI.h" | |
| | | #endif | |
| #ifndef ROOT_TList | | #ifndef ROOT_TList | |
| #include "TList.h" | | #include "TList.h" | |
| #endif | | #endif | |
| #ifndef ROOT_TSystem | | #ifndef ROOT_TSystem | |
| #include "TSystem.h" | | #include "TSystem.h" | |
| #endif | | #endif | |
| #ifndef ROOT_TQueryResult | | #ifndef ROOT_TQueryResult | |
| #include "TQueryResult.h" | | #include "TQueryResult.h" | |
| #endif | | #endif | |
| #ifndef ROOT_TProofProgressStatus | | #ifndef ROOT_TProofProgressStatus | |
| #include "TProofProgressStatus.h" | | #include "TProofProgressStatus.h" | |
| #endif | | #endif | |
| #ifndef ROOT_TError | | #ifndef ROOT_TError | |
| #include "TError.h" | | #include "TError.h" | |
| #endif | | #endif | |
| | | | |
| class TSelector; | | class TSelector; | |
|
| class TProof; | | | |
| class TSocket; | | class TSocket; | |
| class TVirtualPacketizer; | | class TVirtualPacketizer; | |
| class TSlave; | | class TSlave; | |
| class TEventIter; | | class TEventIter; | |
| class TProofStats; | | class TProofStats; | |
| class TMutex; | | class TMutex; | |
| class TStatus; | | class TStatus; | |
| class TTimer; | | class TTimer; | |
| class THashList; | | class THashList; | |
| | | | |
| | | | |
| skipping to change at line 170 | | skipping to change at line 172 | |
| void Progress(TSlave *, Long64_t total, Long64_t processed) | | void Progress(TSlave *, Long64_t total, Long64_t processed) | |
| { Progress(total, processed); } | | { Progress(total, processed); } | |
| void Progress(Long64_t total, Long64_t processed, Long64_t bytesrea
d, | | void Progress(Long64_t total, Long64_t processed, Long64_t bytesrea
d, | |
| Float_t initTime, Float_t procTime, | | Float_t initTime, Float_t procTime, | |
| Float_t evtrti, Float_t mbrti); // *SIGNAL* | | Float_t evtrti, Float_t mbrti); // *SIGNAL* | |
| void Progress(TSlave *, Long64_t total, Long64_t processed, Long64_
t bytesread, | | void Progress(TSlave *, 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) | |
| { Progress(total, processed, bytesread, initTime, procTime, | | { Progress(total, processed, bytesread, initTime, procTime, | |
| evtrti, mbrti); } // *SIGNAL* | | evtrti, mbrti); } // *SIGNAL* | |
|
| | | void Progress(TProofProgressInfo *pi); // *SIGNAL* | |
| | | void Progress(TSlave *, TProofProgressInfo *pi) { Progress(pi); } / | |
| | | / *SIGNAL* | |
| void Feedback(TList *objs); // *SIGNAL* | | void Feedback(TList *objs); // *SIGNAL* | |
| | | | |
| TDrawFeedback *CreateDrawFeedback(TProof *p); | | TDrawFeedback *CreateDrawFeedback(TProof *p); | |
| void SetDrawFeedbackOption(TDrawFeedback *f, Option_t *opt); | | void SetDrawFeedbackOption(TDrawFeedback *f, Option_t *opt); | |
| void DeleteDrawFeedback(TDrawFeedback *f); | | void DeleteDrawFeedback(TDrawFeedback *f); | |
| | | | |
| TDSetElement *GetNextPacket(TSlave *slave, TMessage *r); | | TDSetElement *GetNextPacket(TSlave *slave, TMessage *r); | |
| | | | |
| Int_t ReinitSelector(TQueryResult *qr); | | Int_t ReinitSelector(TQueryResult *qr); | |
| | | | |
| | | | |
| skipping to change at line 196 | | skipping to change at line 200 | |
| | | | |
| EExitStatus GetExitStatus() const { return fExitStatus; } | | EExitStatus GetExitStatus() const { return fExitStatus; } | |
| Long64_t GetEventsProcessed() const { return fProgressStatus->GetEntr
ies(); } | | Long64_t GetEventsProcessed() const { return fProgressStatus->GetEntr
ies(); } | |
| void AddEventsProcessed(Long64_t ev) { fProgressStatus->IncEntrie
s(ev); } | | void AddEventsProcessed(Long64_t ev) { fProgressStatus->IncEntrie
s(ev); } | |
| | | | |
| void SetDispatchTimer(Bool_t on = kTRUE); | | void SetDispatchTimer(Bool_t on = kTRUE); | |
| void SetStopTimer(Bool_t on = kTRUE, | | void SetStopTimer(Bool_t on = kTRUE, | |
| Bool_t abort = kFALSE, Int_t timeout = 0); | | Bool_t abort = kFALSE, Int_t timeout = 0); | |
| | | | |
| virtual void SetInitTime() { } | | virtual void SetInitTime() { } | |
|
| | | Long64_t GetCacheSize(); | |
| | | Int_t GetLearnEntries(); | |
| | | | |
| void SetProcessing(Bool_t on = kTRUE); | | void SetProcessing(Bool_t on = kTRUE); | |
| TProofProgressStatus *GetProgressStatus() const { return fProgressStatu
s; } | | TProofProgressStatus *GetProgressStatus() const { return fProgressStatu
s; } | |
| | | | |
| ClassDef(TProofPlayer,0) // Basic PROOF player | | ClassDef(TProofPlayer,0) // Basic PROOF player | |
| }; | | }; | |
| | | | |
| //------------------------------------------------------------------------ | | //------------------------------------------------------------------------ | |
| | | | |
| class TProofPlayerLocal : public TProofPlayer { | | class TProofPlayerLocal : public TProofPlayer { | |
| | | | |
| | | | |
| skipping to change at line 296 | | skipping to change at line 303 | |
| void Progress(TSlave*, Long64_t total, Long64_t processed) | | void Progress(TSlave*, Long64_t total, Long64_t processed) | |
| { Progress(total, processed); } | | { Progress(total, processed); } | |
| void Progress(Long64_t total, Long64_t processed, Long64_t byt
esread, | | void Progress(Long64_t total, Long64_t processed, Long64_t byt
esread, | |
| Float_t initTime, Float_t procTime, | | Float_t initTime, Float_t procTime, | |
| Float_t evtrti, Float_t mbrti); // *SIGNAL* | | Float_t evtrti, Float_t mbrti); // *SIGNAL* | |
| void Progress(TSlave *, Long64_t total, Long64_t processed, Lo
ng64_t bytesread, | | void Progress(TSlave *, Long64_t total, Long64_t processed, Lo
ng64_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) | |
| { Progress(total, processed, bytesread, initTime, pro
cTime, | | { Progress(total, processed, bytesread, initTime, pro
cTime, | |
| evtrti, mbrti); } // *SIGNAL* | | evtrti, mbrti); } // *SIGNAL* | |
|
| | | void Progress(TProofProgressInfo *pi); // *SIGNAL* | |
| | | void Progress(TSlave *, TProofProgressInfo *pi) { Progress(pi) | |
| | | ; } // *SIGNAL* | |
| void Feedback(TList *objs); // *SIGNAL* | | void Feedback(TList *objs); // *SIGNAL* | |
| TDSetElement *GetNextPacket(TSlave *slave, TMessage *r); | | TDSetElement *GetNextPacket(TSlave *slave, TMessage *r); | |
| TVirtualPacketizer *GetPacketizer() const { return fPacketizer; } | | TVirtualPacketizer *GetPacketizer() const { return fPacketizer; } | |
| | | | |
| Bool_t IsClient() const; | | Bool_t IsClient() const; | |
| | | | |
| void SetInitTime(); | | void SetInitTime(); | |
| | | | |
| ClassDef(TProofPlayerRemote,0) // PROOF player running on master server | | ClassDef(TProofPlayerRemote,0) // PROOF player running on master server | |
| }; | | }; | |
| | | | |
| skipping to change at line 341 | | skipping to change at line 350 | |
| class TProofPlayerSuperMaster : public TProofPlayerRemote { | | class TProofPlayerSuperMaster : public TProofPlayerRemote { | |
| | | | |
| private: | | private: | |
| TArrayL64 fSlaveProgress; | | TArrayL64 fSlaveProgress; | |
| TArrayL64 fSlaveTotals; | | TArrayL64 fSlaveTotals; | |
| TArrayL64 fSlaveBytesRead; | | TArrayL64 fSlaveBytesRead; | |
| TArrayF fSlaveInitTime; | | TArrayF fSlaveInitTime; | |
| TArrayF fSlaveProcTime; | | TArrayF fSlaveProcTime; | |
| TArrayF fSlaveEvtRti; | | TArrayF fSlaveEvtRti; | |
| TArrayF fSlaveMBRti; | | TArrayF fSlaveMBRti; | |
|
| | | TArrayI fSlaveActW; | |
| | | TArrayI fSlaveTotS; | |
| | | TArrayF fSlaveEffS; | |
| TList fSlaves; | | TList fSlaves; | |
| Bool_t fReturnFeedback; | | Bool_t fReturnFeedback; | |
| | | | |
| protected: | | protected: | |
| Bool_t HandleTimer(TTimer *timer); | | Bool_t HandleTimer(TTimer *timer); | |
| void SetupFeedback(); | | void SetupFeedback(); | |
| | | | |
| public: | | public: | |
| TProofPlayerSuperMaster(TProof *proof = 0) : | | TProofPlayerSuperMaster(TProof *proof = 0) : | |
| TProofPlayerRemote(proof), fReturnFeedback(kFALSE) { } | | TProofPlayerRemote(proof), fReturnFeedback(kFALSE) { } | |
| | | | |
| skipping to change at line 363 | | skipping to change at line 375 | |
| Long64_t Process(TDSet *set, const char *selector, | | Long64_t Process(TDSet *set, const char *selector, | |
| Option_t *option = "", Long64_t nentries = -1, | | Option_t *option = "", Long64_t nentries = -1, | |
| Long64_t firstentry = 0); | | Long64_t firstentry = 0); | |
| void Progress(Long64_t total, Long64_t processed) | | void Progress(Long64_t total, Long64_t processed) | |
| { TProofPlayerRemote::Progress(total, processed); } | | { TProofPlayerRemote::Progress(total, 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) | |
| { TProofPlayerRemote::Progress(total, processed, bytesr
ead, | | { TProofPlayerRemote::Progress(total, processed, bytesr
ead, | |
| initTime, procTime, evtr
ti, mbrti); } | | initTime, procTime, evtr
ti, mbrti); } | |
|
| | | void Progress(TProofProgressInfo *pi) { TProofPlayerRemote::Progress(pi
); } | |
| void Progress(TSlave *sl, Long64_t total, Long64_t processed); | | void Progress(TSlave *sl, Long64_t total, Long64_t processed); | |
| void Progress(TSlave *sl, Long64_t total, Long64_t processed, Long64_t
bytesread, | | void Progress(TSlave *sl, 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 Progress(TSlave *sl, TProofProgressInfo *pi); | |
| | | | |
| ClassDef(TProofPlayerSuperMaster,0) // PROOF player running on super ma
ster | | ClassDef(TProofPlayerSuperMaster,0) // PROOF player running on super ma
ster | |
| }; | | }; | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 9 change blocks. |
| 2 lines changed or deleted | | 18 lines changed or added | |
|
| TProofProgressDialog.h | | TProofProgressDialog.h | |
|
| // @(#)root/sessionviewer:$Id: TProofProgressDialog.h 28370 2009-04-28 06:4
3:41Z ganis $ | | // @(#)root/sessionviewer:$Id: TProofProgressDialog.h 30862 2009-10-25 08:2
6:46Z 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 42 | | skipping to change at line 42 | |
| class TGTextButton; | | class TGTextButton; | |
| class TGCheckButton; | | class TGCheckButton; | |
| class TGLabel; | | class TGLabel; | |
| class TGTextBuffer; | | class TGTextBuffer; | |
| class TGTextEntry; | | class TGTextEntry; | |
| class TProof; | | class TProof; | |
| class TProofProgressLog; | | class TProofProgressLog; | |
| class TProofProgressMemoryPlot; | | class TProofProgressMemoryPlot; | |
| class TNtuple; | | class TNtuple; | |
| class TGraph; | | class TGraph; | |
|
| | | class TGSpeedo; | |
| | | | |
| class TProofProgressDialog { | | class TProofProgressDialog { | |
| | | | |
| friend class TProofProgressLog; | | friend class TProofProgressLog; | |
| 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 | |
| | | | |
| skipping to change at line 66 | | skipping to change at line 67 | |
| TGTextButton *fAsyn; | | 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 *fTimeLab; | |
| TGLabel *fProcessed; | | TGLabel *fProcessed; | |
|
| | | TGLabel *fEstim; | |
| TGLabel *fTotal; | | TGLabel *fTotal; | |
| TGLabel *fRate; | | TGLabel *fRate; | |
| TGLabel *fInit; | | TGLabel *fInit; | |
| TGLabel *fSelector; | | TGLabel *fSelector; | |
|
| TProofProgressLog *fLogWindow; // transient frame for logs | | TGSpeedo *fSpeedo; // speedometer | |
| | | TGCheckButton *fSmoothSpeedo; // use smooth speedometer update | |
| | | TProofProgressLog *fLogWindow; // transient frame for logs | |
| TProofProgressMemoryPlot *fMemWindow; // transient frame for memory plo
ts | | TProofProgressMemoryPlot *fMemWindow; // transient frame for memory plo
ts | |
| TProof *fProof; | | TProof *fProof; | |
| TTime fStartTime; | | TTime fStartTime; | |
| TTime fEndTime; | | TTime fEndTime; | |
| Long64_t fPrevProcessed; | | Long64_t fPrevProcessed; | |
| Long64_t fPrevTotal; | | Long64_t fPrevTotal; | |
| Long64_t fFirst; | | Long64_t fFirst; | |
| Long64_t fEntries; | | Long64_t fEntries; | |
| Int_t fFiles; | | Int_t fFiles; | |
| EQueryStatus fStatus; | | EQueryStatus fStatus; | |
| Bool_t fKeep; | | Bool_t fKeep; | |
| Bool_t fLogQuery; | | Bool_t fLogQuery; | |
| TNtuple *fRatePoints; | | TNtuple *fRatePoints; | |
| TGraph *fRateGraph; | | TGraph *fRateGraph; | |
|
| | | TGraph *fMBRtGraph; | |
| | | TGraph *fActWGraph; | |
| | | TGraph *fTotSGraph; | |
| | | TGraph *fEffSGraph; | |
| | | Float_t fInitTime; | |
| Float_t fProcTime; | | Float_t fProcTime; | |
| Double_t fAvgRate; | | Double_t fAvgRate; | |
| Double_t fAvgMBRate; | | Double_t fAvgMBRate; | |
| Int_t fSVNRev; | | Int_t fSVNRev; | |
|
| | | Int_t fRightInfo; | |
| | | | |
| TString fSessionUrl; | | TString fSessionUrl; | |
| | | | |
|
| | | Float_t AdjustBytes(Float_t mbs, TString &sf); | |
| | | | |
| static Bool_t fgKeepDefault; | | static Bool_t fgKeepDefault; | |
| static Bool_t fgLogQueryDefault; | | static Bool_t fgLogQueryDefault; | |
| static TString fgTextQueryDefault; | | static TString fgTextQueryDefault; | |
| | | | |
| 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) { | |
| | | Progress(total, processed, bytesread, initTime, procTime, | |
| | | evtrti, mbrti, -1, -1, -1.); } | |
| | | void Progress(Long64_t total, Long64_t processed, Long64_t bytesread, | |
| | | Float_t initTime, Float_t procTime, | |
| | | Float_t evtrti, Float_t mbrti, Int_t actw, Int_t tses, Flo | |
| | | at_t eses); | |
| void DisableAsyn(); | | 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 DoAsyn(); | |
| void DoPlotRateGraph(); | | void DoPlotRateGraph(); | |
| void DoMemoryPlot(); | | void DoMemoryPlot(); | |
|
| | | void ToggleOdometerInfos(); | |
| | | void ToggleThreshold(); | |
| | | | |
| ClassDef(TProofProgressDialog,0) //PROOF progress dialog | | ClassDef(TProofProgressDialog,0) //PROOF progress dialog | |
| }; | | }; | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 10 change blocks. |
| 3 lines changed or deleted | | 24 lines changed or added | |
|
| TProofProgressStatus.h | | TProofProgressStatus.h | |
|
| // @(#)root/proof:$Id: TProofProgressStatus.h 25827 2008-10-15 14:02:59Z ga
nis $ | | // @(#)root/proof:$Id: TProofProgressStatus.h 30859 2009-10-24 14:53:07Z ga
nis $ | |
| // Author: Jan Iwaszkiewicz 08/08/08 | | // Author: Jan Iwaszkiewicz 08/08/08 | |
| | | | |
| /************************************************************************* | | /************************************************************************* | |
| * 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 29 | | skipping to change at line 29 | |
| ////////////////////////////////////////////////////////////////////////// | | ////////////////////////////////////////////////////////////////////////// | |
| // // | | // // | |
| // TProofProgressStatus // | | // TProofProgressStatus // | |
| // // | | // // | |
| // Small class including processing statistics // | | // Small class including processing statistics // | |
| // // | | // // | |
| ////////////////////////////////////////////////////////////////////////// | | ////////////////////////////////////////////////////////////////////////// | |
| | | | |
| class TProofProgressStatus : public TObject { | | class TProofProgressStatus : public TObject { | |
| private: | | private: | |
|
| | | Long64_t fLastEntries; // Last chunck | |
| Long64_t fEntries; | | Long64_t fEntries; | |
| Long64_t fBytesRead; | | Long64_t fBytesRead; | |
|
| | | Long64_t fReadCalls; | |
| | | Double_t fLearnTime; // the time spent in learning phase | |
| | | Double_t fLastProcTime; // the wallclock time of the last addition | |
| Double_t fProcTime; // the wallclock time | | Double_t fProcTime; // the wallclock time | |
| Double_t fCPUTime; | | Double_t fCPUTime; | |
|
| | | Double_t fLastUpdate; // Timestamp of last change | |
| public: | | public: | |
| TProofProgressStatus(Long64_t fEntries = 0, Long64_t fBytesRead = 0, | | TProofProgressStatus(Long64_t fEntries = 0, Long64_t fBytesRead = 0, | |
|
| | | Long64_t fReadCalls = 0, | |
| Double_t fProcTime = 0, Double_t fCPUTime = 0); | | Double_t fProcTime = 0, Double_t fCPUTime = 0); | |
| void Reset() { fEntries = 0, | | void Reset() { fEntries = 0, | |
|
| fBytesRead = 0, fProcTime = 0, fCPUTime = 0; } | | fBytesRead = 0, fProcTime = 0, fCPUTime = 0; SetLastU
pdate();} | |
| | | | |
| Long64_t GetEntries() const { return fEntries; } | | Long64_t GetEntries() const { return fEntries; } | |
| Long64_t GetBytesRead() const { return fBytesRead; } | | Long64_t GetBytesRead() const { return fBytesRead; } | |
|
| | | Long64_t GetReadCalls() const { return fReadCalls; } | |
| | | Double_t GetLearnTime() const { return fLearnTime; } | |
| Double_t GetProcTime() const { return fProcTime; } | | Double_t GetProcTime() const { return fProcTime; } | |
| Double_t GetCPUTime() const { return fCPUTime; } | | Double_t GetCPUTime() const { return fCPUTime; } | |
|
| Double_t GetRate() const { return fProcTime?fEntries/fProcTime:0; } | | Double_t GetLastUpdate() const { return fLastUpdate; } | |
| void SetEntries(Long64_t entries) { fEntries = entries; } | | Double_t GetRate() const { return ((fProcTime > 0) ? fEntries/fProcTime | |
| void IncEntries(Long64_t entries = 1) { fEntries += entries; } | | : 0); } | |
| void IncBytesRead(Long64_t bytesRead) { fBytesRead += bytesRead; } | | Double_t GetCurrentRate() const; | |
| void SetBytesRead(Long64_t bytesRead) { fBytesRead = bytesRead; } | | void SetLastEntries(Long64_t entries) { fLastEntries = entries;} | |
| | | void SetEntries(Long64_t entries) { fEntries = entries; SetLastUpdat | |
| | | e();} | |
| | | void IncEntries(Long64_t entries = 1) { fLastEntries = entries; fEnt | |
| | | ries += entries; SetLastUpdate();} | |
| | | void IncBytesRead(Long64_t bytesRead) { fBytesRead += bytesRead; Set | |
| | | LastUpdate();} | |
| | | void SetBytesRead(Long64_t bytesRead) { fBytesRead = bytesRead; SetL | |
| | | astUpdate();} | |
| | | void IncReadCalls(Long64_t readCalls) { fReadCalls += readCalls; Set | |
| | | LastUpdate();} | |
| | | void SetReadCalls(Long64_t readCalls) { fReadCalls = readCalls; SetL | |
| | | astUpdate();} | |
| | | void SetLearnTime(Double_t learnTime) { fLearnTime = learnTime; } | |
| | | void SetLastProcTime(Double_t procTime) { fLastProcTime = procTime; | |
| | | } | |
| void SetProcTime(Double_t procTime) { fProcTime = procTime; } | | void SetProcTime(Double_t procTime) { fProcTime = procTime; } | |
|
| void IncProcTime(Double_t procTime) { fProcTime += procTime; } | | void IncProcTime(Double_t procTime) { fLastProcTime = procTime; fPro
cTime += procTime; } | |
| void SetCPUTime(Double_t procTime) { fCPUTime = procTime; } | | void SetCPUTime(Double_t procTime) { fCPUTime = procTime; } | |
| void IncCPUTime(Double_t procTime) { fCPUTime += procTime; } | | void IncCPUTime(Double_t procTime) { fCPUTime += procTime; } | |
|
| | | void SetLastUpdate(Double_t updtTime = 0); | |
| void Print(Option_t* option = "") const; | | void Print(Option_t* option = "") const; | |
| | | | |
| TProofProgressStatus operator-(TProofProgressStatus &st); | | TProofProgressStatus operator-(TProofProgressStatus &st); | |
| TProofProgressStatus &operator+=(const TProofProgressStatus &st); | | TProofProgressStatus &operator+=(const TProofProgressStatus &st); | |
| TProofProgressStatus &operator-=(const TProofProgressStatus &st); | | TProofProgressStatus &operator-=(const TProofProgressStatus &st); | |
| | | | |
|
| ClassDef(TProofProgressStatus,1) // Proof progress status class | | ClassDef(TProofProgressStatus,2) // Proof progress status class | |
| }; | | }; | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 11 change blocks. |
| 9 lines changed or deleted | | 33 lines changed or added | |
|
| TProofServ.h | | TProofServ.h | |
|
| // @(#)root/proof:$Id: TProofServ.h 30174 2009-09-15 14:24:56Z ganis $ | | // @(#)root/proof:$Id: TProofServ.h 31012 2009-11-06 16:08:19Z ganis $ | |
| // 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 120 | | skipping to change at line 120 | |
| Int_t fGroupPriority; //priority of group the user belongs to
(0 - 100) | | Int_t fGroupPriority; //priority of group the user belongs to
(0 - 100) | |
| Bool_t fEndMaster; //true for a master in direct contact o
nly with workers | | Bool_t fEndMaster; //true for a master in direct contact o
nly with workers | |
| Bool_t fMasterServ; //true if we are a master server | | Bool_t fMasterServ; //true if we are a master server | |
| Bool_t fInterrupt; //if true macro execution will be stopp
ed | | Bool_t fInterrupt; //if true macro execution will be stopp
ed | |
| Float_t fRealTime; //real time spent executing commands | | Float_t fRealTime; //real time spent executing commands | |
| Float_t fCpuTime; //CPU time spent executing commands | | Float_t fCpuTime; //CPU time spent executing commands | |
| TStopwatch fLatency; //measures latency of packet requests | | TStopwatch fLatency; //measures latency of packet requests | |
| TStopwatch fCompute; //measures time spend processing a pack
et | | TStopwatch fCompute; //measures time spend processing a pack
et | |
| Int_t fQuerySeqNum; //sequential number of the current or l
ast query | | Int_t fQuerySeqNum; //sequential number of the current or l
ast query | |
| | | | |
|
| | | Int_t fTotSessions; //Total number of PROOF sessions on the | |
| | | cluster | |
| | | Int_t fActSessions; //Total number of active PROOF sessions | |
| | | on the cluster | |
| | | Float_t fEffSessions; //Effective Number of PROOF sessions on | |
| | | the assigned machines | |
| | | | |
| TFileHandler *fInputHandler; //Input socket handler | | TFileHandler *fInputHandler; //Input socket handler | |
| | | | |
| TQueryResultManager *fQMgr; //Query-result manager | | TQueryResultManager *fQMgr; //Query-result manager | |
| | | | |
| 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 | |
|
| | | TMutex *fQMtx; // To protect async msg queue | |
| | | | |
| 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 | |
| | | | |
| TShutdownTimer *fShutdownTimer; // Timer used to shutdown out-of-contro
l sessions | | TShutdownTimer *fShutdownTimer; // Timer used to shutdown out-of-contro
l sessions | |
| TReaperTimer *fReaperTimer; // Timer used to control children state | | TReaperTimer *fReaperTimer; // Timer used to control children state | |
| | | | |
| | | | |
| skipping to change at line 177 | | skipping to change at line 182 | |
| // 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 | | // Results handling | |
| void SendResults(TSocket *sock, TList *outlist = 0, TQueryResul
t *pq = 0); | | void SendResults(TSocket *sock, TList *outlist = 0, TQueryResul
t *pq = 0); | |
| Int_t RegisterDataSets(TList *in, TList *out); | | Int_t RegisterDataSets(TList *in, TList *out); | |
| | | | |
|
| | | // Waiting queries handlers | |
| | | void SetIdle(Bool_t st = kTRUE); | |
| | | Bool_t IsWaiting(); | |
| | | Int_t WaitingQueries(); | |
| | | Int_t QueueQuery(TProofQueryResult *pq); | |
| | | TProofQueryResult *NextQuery(); | |
| | | Int_t CleanupWaitingQueries(Bool_t del = kTRUE, TList *qls = 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); | |
| virtual void HandleRetrieve(TMessage *mess); | | virtual void HandleRetrieve(TMessage *mess); | |
| virtual void HandleWorkerLists(TMessage *mess); | | virtual void HandleWorkerLists(TMessage *mess); | |
| | | | |
| virtual void ProcessNext(); | | virtual void ProcessNext(); | |
| virtual Int_t Setup(); | | virtual Int_t Setup(); | |
| Int_t SetupCommon(); | | Int_t SetupCommon(); | |
| virtual void MakePlayer(); | | virtual void MakePlayer(); | |
| virtual void DeletePlayer(); | | virtual void DeletePlayer(); | |
| | | | |
| virtual Int_t Fork(); | | virtual Int_t Fork(); | |
|
| | | Int_t GetSessionStatus(); | |
| | | Bool_t IsIdle(); | |
| | | | |
| public: | | public: | |
| TProofServ(Int_t *argc, char **argv, FILE *flog = 0); | | TProofServ(Int_t *argc, char **argv, FILE *flog = 0); | |
| virtual ~TProofServ(); | | virtual ~TProofServ(); | |
| | | | |
| virtual Int_t CreateServer(); | | virtual Int_t CreateServer(); | |
| | | | |
| TProof *GetProof() const { return fProof; } | | TProof *GetProof() const { return fProof; } | |
| const char *GetService() const { return fService; } | | const char *GetService() const { return fService; } | |
| const char *GetConfDir() const { return fConfDir; } | | const char *GetConfDir() const { return fConfDir; } | |
| | | | |
| skipping to change at line 226 | | skipping to change at line 241 | |
| Int_t GetProtocol() const { return fProtocol; } | | Int_t GetProtocol() const { return fProtocol; } | |
| const char *GetOrdinal() const { return fOrdinal; } | | const char *GetOrdinal() const { return fOrdinal; } | |
| Int_t GetGroupId() const { return fGroupId; } | | Int_t GetGroupId() const { return fGroupId; } | |
| Int_t GetGroupSize() const { return fGroupSize; } | | Int_t GetGroupSize() const { return fGroupSize; } | |
| Int_t GetLogLevel() const { return fLogLevel; } | | Int_t GetLogLevel() const { return fLogLevel; } | |
| 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; } | |
| Int_t GetQuerySeqNum() const { return fQuerySeqNum; } | | Int_t GetQuerySeqNum() const { return fQuerySeqNum; } | |
| | | | |
|
| | | Int_t GetTotSessions() const { return fTotSessions; } | |
| | | Int_t GetActSessions() const { return fActSessions; } | |
| | | Float_t GetEffSessions() const { return fEffSessions; } | |
| | | | |
| 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; } | | Long64_t GetMsgSizeHWM() const { return fMsgSizeHWM; } | |
| | | | |
| const char *GetPrefix() const { return fPrefix; } | | const char *GetPrefix() const { return fPrefix; } | |
| | | | |
| skipping to change at line 260 | | skipping to change at line 279 | |
| void Interrupt() { fInterrupt = kTRUE; } | | void Interrupt() { fInterrupt = kTRUE; } | |
| Bool_t IsEndMaster() const { return fEndMaster; } | | Bool_t IsEndMaster() const { return fEndMaster; } | |
| Bool_t IsMaster() const { return fMasterServ; } | | Bool_t IsMaster() const { return fMasterServ; } | |
| Bool_t IsParallel() const; | | Bool_t IsParallel() const; | |
| Bool_t IsTopMaster() const { return fOrdinal == "0"; } | | Bool_t IsTopMaster() const { return fOrdinal == "0"; } | |
| | | | |
| void Run(Bool_t retrn = kFALSE); | | void Run(Bool_t retrn = kFALSE); | |
| | | | |
| void Print(Option_t *option="") const; | | void Print(Option_t *option="") const; | |
| | | | |
|
| | | void RestartComputeTime(); | |
| | | | |
| TObject *Get(const char *namecycle); | | TObject *Get(const char *namecycle); | |
| TDSetElement *GetNextPacket(Long64_t totalEntries = -1); | | TDSetElement *GetNextPacket(Long64_t totalEntries = -1); | |
| virtual void ReleaseWorker(const char *) { } | | virtual void ReleaseWorker(const char *) { } | |
| void Reset(const char *dir); | | void Reset(const char *dir); | |
| Int_t ReceiveFile(const char *file, Bool_t bin, Long64_t size); | | Int_t ReceiveFile(const char *file, Bool_t bin, Long64_t size); | |
| virtual Int_t SendAsynMessage(const char *msg, Bool_t lf = kTRUE); | | virtual Int_t SendAsynMessage(const char *msg, Bool_t lf = kTRUE); | |
| virtual void SendLogFile(Int_t status = 0, Int_t start = -1, Int_t end
= -1); | | virtual void SendLogFile(Int_t status = 0, Int_t start = -1, Int_t end
= -1); | |
| void SendStatistics(); | | void SendStatistics(); | |
| void SendParallel(Bool_t async = kFALSE); | | void SendParallel(Bool_t async = kFALSE); | |
| | | | |
| | | | |
End of changes. 7 change blocks. |
| 1 lines changed or deleted | | 25 lines changed or added | |
|
| TROOT.h | | TROOT.h | |
|
| // @(#)root/base:$Id: TROOT.h 27658 2009-02-28 05:34:57Z pcanal $ | | // @(#)root/base:$Id: TROOT.h 31136 2009-11-12 21:25:38Z pcanal $ | |
| // Author: Rene Brun 08/12/94 | | // Author: Rene Brun 08/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 69 | | skipping to change at line 69 | |
| Int_t fLineIsProcessing; //To synchronize multi-threads | | Int_t fLineIsProcessing; //To synchronize multi-threads | |
| | | | |
| static Int_t fgDirLevel; //Indentation level for ls() | | static Int_t fgDirLevel; //Indentation level for ls() | |
| static Bool_t fgRootInit; //Singleton initialization flag | | static Bool_t fgRootInit; //Singleton initialization flag | |
| static Bool_t fgMemCheck; //Turn on memory leak checker | | static Bool_t fgMemCheck; //Turn on memory leak checker | |
| | | | |
| TROOT(const TROOT&); //Not implemented | | TROOT(const TROOT&); //Not implemented | |
| TROOT& operator=(const TROOT&); //Not implemented | | TROOT& operator=(const TROOT&); //Not implemented | |
| | | | |
| protected: | | protected: | |
|
| | | TString fConfigOptions; //ROOT ./configure set build opti | |
| TString fConfigOptions; //ROOT ./configure build options | | ons | |
| | | TString fConfigFeatures; //ROOT ./configure detected build | |
| | | features | |
| TString fVersion; //ROOT version (from CMZ VERSQQ)
ex 0.05/01 | | TString fVersion; //ROOT version (from CMZ VERSQQ)
ex 0.05/01 | |
| Int_t fVersionInt; //ROOT version in integer format
(501) | | Int_t fVersionInt; //ROOT version in integer format
(501) | |
| Int_t fVersionCode; //ROOT version code as used in RV
ersion.h | | Int_t fVersionCode; //ROOT version code as used in RV
ersion.h | |
| Int_t fVersionDate; //Date of ROOT version (ex 951226
) | | Int_t fVersionDate; //Date of ROOT version (ex 951226
) | |
| Int_t fVersionTime; //Time of ROOT version (ex 1152) | | Int_t fVersionTime; //Time of ROOT version (ex 1152) | |
| Int_t fBuiltDate; //Date of ROOT built | | Int_t fBuiltDate; //Date of ROOT built | |
| Int_t fBuiltTime; //Time of ROOT built | | Int_t fBuiltTime; //Time of ROOT built | |
| Int_t fSvnRevision; //Subversion revision number of b
uilt | | Int_t fSvnRevision; //Subversion revision number of b
uilt | |
| TString fSvnBranch; //Subversion branch | | TString fSvnBranch; //Subversion branch | |
| TString fSvnDate; //Date and time when make was run | | TString fSvnDate; //Date and time when make was run | |
| | | | |
| skipping to change at line 145 | | skipping to change at line 145 | |
| void AddClass(TClass *cl); | | void AddClass(TClass *cl); | |
| void AddClassGenerator(TClassGenerator *gen); | | void AddClassGenerator(TClassGenerator *gen); | |
| void Browse(TBrowser *b); | | void Browse(TBrowser *b); | |
| Bool_t ClassSaved(TClass *cl); | | Bool_t ClassSaved(TClass *cl); | |
| virtual TObject *FindObject(const char *name) const; | | virtual TObject *FindObject(const char *name) const; | |
| virtual TObject *FindObject(const TObject *obj) const; | | virtual TObject *FindObject(const TObject *obj) const; | |
| virtual TObject *FindObjectAny(const char *name) const; | | virtual TObject *FindObjectAny(const char *name) const; | |
| TObject *FindSpecialObject(const char *name, void *&where); | | TObject *FindSpecialObject(const char *name, void *&where); | |
| const char *FindObjectClassName(const char *name) const; | | const char *FindObjectClassName(const char *name) const; | |
| const char *FindObjectPathName(const TObject *obj) const; | | const char *FindObjectPathName(const TObject *obj) const; | |
|
| TClass *FindSTLClass(const char *name, Bool_t load) const; | | TClass *FindSTLClass(const char *name, Bool_t load, Bool_t sil
ent = kFALSE) const; | |
| void ForceStyle(Bool_t force = kTRUE) { fForceStyle = force
; } | | void ForceStyle(Bool_t force = kTRUE) { fForceStyle = force
; } | |
| Bool_t FromPopUp() const { return fFromPopUp; } | | Bool_t FromPopUp() const { return fFromPopUp; } | |
| TPluginManager *GetPluginManager() const { return fPluginManager; } | | TPluginManager *GetPluginManager() const { return fPluginManager; } | |
| TApplication *GetApplication() const { return fApplication; } | | TApplication *GetApplication() const { return fApplication; } | |
| TInterpreter *GetInterpreter() const { return fInterpreter; } | | TInterpreter *GetInterpreter() const { return fInterpreter; } | |
|
| TClass *GetClass(const char *name, Bool_t load = kTRUE) const; | | TClass *GetClass(const char *name, Bool_t load = kTRUE, Bool_t | |
| TClass *GetClass(const type_info &typeinfo, Bool_t load = kTRU | | silent = kFALSE) const; | |
| E) const; | | TClass *GetClass(const type_info &typeinfo, Bool_t load = kTRU | |
| | | E, Bool_t silent = kFALSE) const; | |
| TColor *GetColor(Int_t color) const; | | TColor *GetColor(Int_t color) const; | |
| const char *GetConfigOptions() const { return fConfigOptions; } | | const char *GetConfigOptions() const { return fConfigOptions; } | |
|
| | | const char *GetConfigFeatures() const { return fConfigFeatures; } | |
| const char *GetCutClassName() const { return fCutClassName; } | | const char *GetCutClassName() const { return fCutClassName; } | |
| const char *GetDefCanvasName() const { return fDefCanvasName; } | | const char *GetDefCanvasName() const { return fDefCanvasName; } | |
| Bool_t GetEditHistograms() const { return fEditHistograms; } | | Bool_t GetEditHistograms() const { return fEditHistograms; } | |
| Int_t GetEditorMode() const { return fEditorMode; } | | Int_t GetEditorMode() const { return fEditorMode; } | |
| Bool_t GetForceStyle() const { return fForceStyle; } | | Bool_t GetForceStyle() const { return fForceStyle; } | |
| Int_t GetBuiltDate() const { return fBuiltDate; } | | Int_t GetBuiltDate() const { return fBuiltDate; } | |
| Int_t GetBuiltTime() const { return fBuiltTime; } | | Int_t GetBuiltTime() const { return fBuiltTime; } | |
| Int_t GetSvnRevision() const { return fSvnRevision; } | | Int_t GetSvnRevision() const { return fSvnRevision; } | |
| const char *GetSvnBranch() const { return fSvnBranch; } | | const char *GetSvnBranch() const { return fSvnBranch; } | |
| const char *GetSvnDate(); | | const char *GetSvnDate(); | |
| | | | |
| skipping to change at line 221 | | skipping to change at line 222 | |
| Int_t IgnoreInclude(const char *fname, const char *expandedf
name); | | Int_t IgnoreInclude(const char *fname, const char *expandedf
name); | |
| Bool_t IsBatch() const { return fBatch; } | | Bool_t IsBatch() const { return fBatch; } | |
| Bool_t IsExecutingMacro() const { return fExecutingMacro; } | | Bool_t IsExecutingMacro() const { return fExecutingMacro; } | |
| Bool_t IsFolder() const { return kTRUE; } | | Bool_t IsFolder() const { return kTRUE; } | |
| Bool_t IsInterrupted() const { return fInterrupt; } | | Bool_t IsInterrupted() const { return fInterrupt; } | |
| Bool_t IsEscaped() const { return fEscape; } | | Bool_t IsEscaped() const { return fEscape; } | |
| Bool_t IsLineProcessing() const { return fLineIsProcessing ?
kTRUE : kFALSE; } | | Bool_t IsLineProcessing() const { return fLineIsProcessing ?
kTRUE : kFALSE; } | |
| Bool_t IsProofServ() const { return fName == "proofserv" ? kT
RUE : kFALSE; } | | Bool_t IsProofServ() const { return fName == "proofserv" ? kT
RUE : kFALSE; } | |
| void ls(Option_t *option = "") const; | | void ls(Option_t *option = "") const; | |
| Int_t LoadClass(const char *classname, const char *libname,
Bool_t check = kFALSE); | | Int_t LoadClass(const char *classname, const char *libname,
Bool_t check = kFALSE); | |
|
| TClass *LoadClass(const char *name) const; | | TClass *LoadClass(const char *name, Bool_t silent = kFALSE) co
nst; | |
| Int_t LoadMacro(const char *filename, Int_t *error = 0, Bool
_t check = kFALSE); | | Int_t LoadMacro(const char *filename, Int_t *error = 0, Bool
_t check = kFALSE); | |
| Long_t Macro(const char *filename, Int_t *error = 0, Bool_t p
adUpdate = kTRUE); | | Long_t Macro(const char *filename, Int_t *error = 0, Bool_t p
adUpdate = kTRUE); | |
| TCanvas *MakeDefCanvas() const; | | TCanvas *MakeDefCanvas() const; | |
| void Message(Int_t id, const TObject *obj); | | void Message(Int_t id, const TObject *obj); | |
| Bool_t MustClean() const { return fMustClean; } | | Bool_t MustClean() const { return fMustClean; } | |
| Long_t ProcessLine(const char *line, Int_t *error = 0); | | Long_t ProcessLine(const char *line, Int_t *error = 0); | |
| Long_t ProcessLineSync(const char *line, Int_t *error = 0); | | Long_t ProcessLineSync(const char *line, Int_t *error = 0); | |
| Long_t ProcessLineFast(const char *line, Int_t *error = 0); | | Long_t ProcessLineFast(const char *line, Int_t *error = 0); | |
| Bool_t ReadingObject() const { /* Deprecated (will be removed
in next release) */ return fReadingObject; } | | Bool_t ReadingObject() const { /* Deprecated (will be removed
in next release) */ return fReadingObject; } | |
| void RefreshBrowsers(); | | void RefreshBrowsers(); | |
| | | | |
End of changes. 6 change blocks. |
| 8 lines changed or deleted | | 12 lines changed or added | |
|
| TRecorder.h | | TRecorder.h | |
|
| // @(#)root/gui:$Id: TRecorder.h 29956 2009-08-28 07:33:01Z bellenot $ | | // @(#)root/gui:$Id: TRecorder.h 31337 2009-11-20 13:20:38Z 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 332 | | skipping to change at line 332 | |
| Window_t fMasked; // If non-zero, event recorded in Handl
eMaskEvent() | | Window_t fMasked; // If non-zero, event recorded in Handl
eMaskEvent() | |
| | | | |
| public: | | public: | |
| //---- Types of kConfigureNotify GUI event | | //---- Types of kConfigureNotify GUI event | |
| enum EConfigureNotifyType { | | enum EConfigureNotifyType { | |
| kCNMove = 0, // Movement of a window (Linux) | | kCNMove = 0, // Movement of a window (Linux) | |
| kCNResize = 1, // Resize of a window (Linux) | | kCNResize = 1, // Resize of a window (Linux) | |
| kCNMoveResize = 2, // Movement, resize or both (Windows) | | kCNMoveResize = 2, // Movement, resize or both (Windows) | |
| kCNFilter = 3 // Not replaybale (filtered event). | | kCNFilter = 3 // Not replaybale (filtered event). | |
| }; | | }; | |
|
| | | //---- Aliases for non cross-platform atoms. | |
| | | enum ERootAtoms { | |
| | | kWM_DELETE_WINDOW = 10001, | |
| | | kROOT_MESSAGE = 10002 | |
| | | }; | |
| | | | |
| virtual ERecEventType GetType() const { | | virtual ERecEventType GetType() const { | |
| // Returns what kind of event it stores (GUI event) | | // Returns what kind of event it stores (GUI event) | |
| return TRecEvent::kGuiEvent; | | return TRecEvent::kGuiEvent; | |
| } | | } | |
| | | | |
| virtual void ReplayEvent(Bool_t showMouseCursor = kTRUE); | | virtual void ReplayEvent(Bool_t showMouseCursor = kTRUE); | |
| static Event_t *CreateEvent(TRecGuiEvent *ge); | | static Event_t *CreateEvent(TRecGuiEvent *ge); | |
| | | | |
| ClassDef(TRecGuiEvent,1) // Class stores information about 1 GUI event i
n ROOT | | ClassDef(TRecGuiEvent,1) // Class stores information about 1 GUI event i
n ROOT | |
| | | | |
| skipping to change at line 378 | | skipping to change at line 383 | |
| TRecWinPair(Window_t key, Window_t value): fKey(key), fValue(value) {} | | TRecWinPair(Window_t key, Window_t value): fKey(key), fValue(value) {} | |
| | | | |
| ClassDef(TRecWinPair,1) // Class used for storing of window IDs mapping.
Needed for replaying events. | | ClassDef(TRecWinPair,1) // Class used for storing of window IDs mapping.
Needed for replaying events. | |
| }; | | }; | |
| | | | |
| ////////////////////////////////////////////////////////////////////////// | | ////////////////////////////////////////////////////////////////////////// | |
| // // | | // // | |
| // TRecorder // | | // TRecorder // | |
| // // | | // // | |
| // Class provides direct recorder/replayer interface for a user. // | | // Class provides direct recorder/replayer interface for a user. // | |
|
| // See 'ROOT EVENT RECORDING SYSTEM' for more information abou usage. // | | // See 'ROOT EVENT RECORDING SYSTEM' for more information about usage. // | |
| // // | | // // | |
|
| // Implementation uses C++ design pattern State. Funcionality of // | | // Implementation uses C++ design pattern State. Functionality of // | |
| // recorder is divided into 4 classes according to the current // | | // recorder is divided into 4 classes according to the current // | |
| // state of recorder. // | | // state of recorder. // | |
| // // | | // // | |
| // Internally, there is a pointer to TRecorderState object. // | | // Internally, there is a pointer to TRecorderState object. // | |
| // This object changes whenever state of recorder is changed. // | | // This object changes whenever state of recorder is changed. // | |
| // States of recorder are the following: // | | // States of recorder are the following: // | |
| // // | | // // | |
| // - INACTIVE Implemented in TRecorderInactive class. // | | // - INACTIVE Implemented in TRecorderInactive class. // | |
| // Default state after TRecorder object is created. // | | // Default state after TRecorder object is created. // | |
| // // | | // // | |
| | | | |
End of changes. 4 change blocks. |
| 3 lines changed or deleted | | 8 lines changed or added | |
|
| TString.h | | TString.h | |
|
| // @(#)root/base:$Id: TString.h 29145 2009-06-22 15:22:22Z brun $ | | // @(#)root/base:$Id: TString.h 30974 2009-11-04 23:42:44Z rdm $ | |
| // 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 273 | | skipping to change at line 273 | |
| TString &operator+=(Long_t i); | | TString &operator+=(Long_t i); | |
| TString &operator+=(ULong_t i); | | TString &operator+=(ULong_t i); | |
| TString &operator+=(Float_t f); | | TString &operator+=(Float_t f); | |
| TString &operator+=(Double_t f); | | TString &operator+=(Double_t f); | |
| TString &operator+=(Long64_t i); | | TString &operator+=(Long64_t i); | |
| TString &operator+=(ULong64_t i); | | TString &operator+=(ULong64_t i); | |
| | | | |
| // Indexing operators | | // Indexing operators | |
| char &operator[](Ssiz_t i); // Indexing with bounds chec
king | | char &operator[](Ssiz_t i); // Indexing with bounds chec
king | |
| char &operator()(Ssiz_t i); // Indexing with optional bo
unds checking | | char &operator()(Ssiz_t i); // Indexing with optional bo
unds checking | |
|
| TSubString operator()(Ssiz_t start, Ssiz_t len); // Sub-string oper | | | |
| ator | | | |
| TSubString operator()(const TRegexp &re); // Match the RE | | | |
| TSubString operator()(const TRegexp &re, Ssiz_t start); | | | |
| TSubString operator()(TPRegexp &re); // Match the Perl | | | |
| compatible Regular Expression | | | |
| TSubString operator()(TPRegexp &re, Ssiz_t start); | | | |
| TSubString SubString(const char *pat, Ssiz_t start = 0, | | | |
| ECaseCompare cmp = kExact); | | | |
| char operator[](Ssiz_t i) const; | | char operator[](Ssiz_t i) const; | |
| char operator()(Ssiz_t i) const; | | char operator()(Ssiz_t i) const; | |
|
| TSubString operator()(Ssiz_t start, Ssiz_t len) const; | | TSubString operator()(Ssiz_t start, Ssiz_t len) const; // Sub-strin | |
| TSubString operator()(const TRegexp &re) const; // Match the RE | | g operator | |
| | | TSubString operator()(const TRegexp &re) const; // Match the | |
| | | RE | |
| TSubString operator()(const TRegexp &re, Ssiz_t start) const; | | TSubString operator()(const TRegexp &re, Ssiz_t start) const; | |
|
| TSubString operator()(TPRegexp &re) const; // Match the Perl c
ompatible Regular Expression | | TSubString operator()(TPRegexp &re) const; // Match the
Perl compatible Regular Expression | |
| TSubString operator()(TPRegexp &re, Ssiz_t start) const; | | TSubString operator()(TPRegexp &re, Ssiz_t start) const; | |
| TSubString SubString(const char *pat, Ssiz_t start = 0, | | TSubString SubString(const char *pat, Ssiz_t start = 0, | |
| ECaseCompare cmp = kExact) const; | | ECaseCompare cmp = kExact) const; | |
| | | | |
| // Non-static member functions | | // Non-static member functions | |
| TString &Append(const char *cs); | | TString &Append(const char *cs); | |
| TString &Append(const char *cs, Ssiz_t n); | | TString &Append(const char *cs, Ssiz_t n); | |
| TString &Append(const TString &s); | | TString &Append(const TString &s); | |
| TString &Append(const TString &s, Ssiz_t n); | | TString &Append(const TString &s, Ssiz_t n); | |
| TString &Append(char c, Ssiz_t rep = 1); // Append c rep times | | TString &Append(char c, Ssiz_t rep = 1); // Append c rep times | |
| | | | |
| skipping to change at line 371 | | skipping to change at line 364 | |
| TString &Replace(Ssiz_t pos, Ssiz_t n, const char *s); | | TString &Replace(Ssiz_t pos, Ssiz_t n, const char *s); | |
| TString &Replace(Ssiz_t pos, Ssiz_t n, const char *s, Ssiz_t ns); | | TString &Replace(Ssiz_t pos, Ssiz_t n, const char *s, Ssiz_t ns); | |
| TString &Replace(Ssiz_t pos, Ssiz_t n, const TString &s); | | TString &Replace(Ssiz_t pos, Ssiz_t n, const TString &s); | |
| TString &Replace(Ssiz_t pos, Ssiz_t n1, const TString &s, Ssiz_t n2)
; | | TString &Replace(Ssiz_t pos, Ssiz_t n1, const TString &s, Ssiz_t n2)
; | |
| TString &ReplaceAll(const TString &s1, const TString &s2); // Find&R
eplace all s1 with s2 if any | | TString &ReplaceAll(const TString &s1, const TString &s2); // Find&R
eplace all s1 with s2 if any | |
| TString &ReplaceAll(const TString &s1, const char *s2); // Find&R
eplace all s1 with s2 if any | | TString &ReplaceAll(const TString &s1, const char *s2); // Find&R
eplace all s1 with s2 if any | |
| TString &ReplaceAll(const char *s1, const TString &s2); // Find&R
eplace all s1 with s2 if any | | TString &ReplaceAll(const char *s1, const TString &s2); // Find&R
eplace all s1 with s2 if any | |
| TString &ReplaceAll(const char *s1, const char *s2); // Find&R
eplace all s1 with s2 if any | | TString &ReplaceAll(const char *s1, const char *s2); // Find&R
eplace 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 | | 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 = ' ') 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 UInt_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 | |
| | | | |
| skipping to change at line 580 | | skipping to change at line 572 | |
| inline char &TString::operator()(Ssiz_t i) | | inline char &TString::operator()(Ssiz_t i) | |
| { Cow(); return fData[i]; } | | { Cow(); return fData[i]; } | |
| | | | |
| inline char TString::operator[](Ssiz_t i) const | | inline char TString::operator[](Ssiz_t i) const | |
| { AssertElement(i); return fData[i]; } | | { AssertElement(i); return fData[i]; } | |
| | | | |
| inline char TString::operator()(Ssiz_t i) const | | inline char TString::operator()(Ssiz_t i) const | |
| { return fData[i]; } | | { return fData[i]; } | |
| | | | |
| inline const char *TSubString::Data() const | | inline const char *TSubString::Data() const | |
|
| { return fStr.Data() + fBegin; } | | { | |
| | | // Return a pointer to the beginning of the substring. Note that the | |
| | | // terminating null is in the same place as for the original | |
| | | // TString, so this method is not appropriate for converting the | |
| | | // TSubString to a string. To do that, construct a TString from the | |
| | | // TSubString. For example: | |
| | | // | |
| | | // root [0] TString s("hello world") | |
| | | // root [1] TSubString sub=s(0, 5) | |
| | | // root [2] sub.Data() | |
| | | // (const char* 0x857c8b8)"hello world" | |
| | | // root [3] TString substr(sub) | |
| | | // root [4] substr | |
| | | // (class TString)"hello" | |
| | | | |
| | | return fStr.Data() + fBegin; | |
| | | } | |
| | | | |
| // Access to elements of sub-string with bounds checking | | // Access to elements of sub-string with bounds checking | |
| inline char TSubString::operator[](Ssiz_t i) const | | inline char TSubString::operator[](Ssiz_t i) const | |
| { AssertElement(i); return fStr.fData[fBegin+i]; } | | { AssertElement(i); return fStr.fData[fBegin+i]; } | |
| | | | |
| inline char TSubString::operator()(Ssiz_t i) const | | inline char TSubString::operator()(Ssiz_t i) const | |
| { return fStr.fData[fBegin+i]; } | | { return fStr.fData[fBegin+i]; } | |
| | | | |
| inline TSubString &TSubString::operator=(const TSubString &s) | | inline TSubString &TSubString::operator=(const TSubString &s) | |
| { fStr = s.fStr; fBegin = s.fBegin; fExtent = s.fExtent; return *this; } | | { fStr = s.fStr; fBegin = s.fBegin; fExtent = s.fExtent; return *this; } | |
| | | | |
End of changes. 6 change blocks. |
| 15 lines changed or deleted | | 23 lines changed or added | |
|
| TTree.h | | TTree.h | |
|
| // @(#)root/tree:$Id: TTree.h 30219 2009-09-17 12:29:31Z brun $ | | // @(#)root/tree:$Id: TTree.h 31035 2009-11-09 10:01:05Z 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 97 | | skipping to change at line 97 | |
| class TBasket; | | class TBasket; | |
| class TStreamerInfo; | | class TStreamerInfo; | |
| | | | |
| class TTree : public TNamed, public TAttLine, public TAttFill, public TAttM
arker { | | class TTree : public TNamed, public TAttLine, public TAttFill, public TAttM
arker { | |
| | | | |
| protected: | | protected: | |
| Long64_t fEntries; // Number of entries | | Long64_t fEntries; // Number of entries | |
| Long64_t fTotBytes; // Total number of bytes in all bran
ches before compression | | Long64_t fTotBytes; // Total number of bytes in all bran
ches before compression | |
| Long64_t fZipBytes; // Total number of bytes in all bran
ches after compression | | Long64_t fZipBytes; // Total number of bytes in all bran
ches after compression | |
| Long64_t fSavedBytes; // Number of autosaved bytes | | Long64_t fSavedBytes; // Number of autosaved bytes | |
|
| | | Long64_t fFlushedBytes; // Number of autoflushed bytes | |
| Double_t fWeight; // Tree weight (see TTree::SetWeight
) | | Double_t fWeight; // Tree weight (see TTree::SetWeight
) | |
| Int_t fTimerInterval; // Timer interval in milliseconds | | Int_t fTimerInterval; // Timer interval in milliseconds | |
| Int_t fScanField; // Number of runs before prompting i
n Scan | | Int_t fScanField; // Number of runs before prompting i
n Scan | |
| Int_t fUpdate; // Update frequency for EntryLoop | | Int_t fUpdate; // Update frequency for EntryLoop | |
| Int_t fDefaultEntryOffsetLen; // Initial Length of fEntryOffs
et table in the basket buffers | | Int_t fDefaultEntryOffsetLen; // Initial Length of fEntryOffs
et table in the basket buffers | |
| Long64_t fMaxEntries; // Maximum number of entries in case
of circular buffers | | Long64_t fMaxEntries; // Maximum number of entries in case
of circular buffers | |
| Long64_t fMaxEntryLoop; // Maximum number of entries to proc
ess | | Long64_t fMaxEntryLoop; // Maximum number of entries to proc
ess | |
| Long64_t fMaxVirtualSize; // Maximum total size of buffers kep
t in memory | | Long64_t fMaxVirtualSize; // Maximum total size of buffers kep
t in memory | |
| Long64_t fAutoSave; // Autosave tree when fAutoSave byte
s produced | | Long64_t fAutoSave; // Autosave tree when fAutoSave byte
s produced | |
|
| | | Long64_t fAutoFlush; // Autoflush tree when fAutoFlush en
tries written | |
| Long64_t fEstimate; // Number of entries to estimate his
togram limits | | Long64_t fEstimate; // Number of entries to estimate his
togram limits | |
| Long64_t fCacheSize; //! Maximum size of file buffers | | Long64_t fCacheSize; //! Maximum size of file buffers | |
| Long64_t fChainOffset; //! Offset of 1st entry of this Tree
in a TChain | | Long64_t fChainOffset; //! Offset of 1st entry of this Tree
in a TChain | |
| Long64_t fReadEntry; //! Number of the entry being process
ed | | Long64_t fReadEntry; //! Number of the entry being process
ed | |
| Long64_t fTotalBuffers; //! Total number of bytes in branch b
uffers | | Long64_t fTotalBuffers; //! Total number of bytes in branch b
uffers | |
| Int_t fPacketSize; //! Number of entries in one packet f
or parallel root | | Int_t fPacketSize; //! Number of entries in one packet f
or parallel root | |
| Int_t fNfill; //! Local for EntryLoop | | Int_t fNfill; //! Local for EntryLoop | |
| Int_t fDebug; //! Debug level | | Int_t fDebug; //! Debug level | |
| Long64_t fDebugMin; //! First entry number to debug | | Long64_t fDebugMin; //! First entry number to debug | |
| Long64_t fDebugMax; //! Last entry number to debug | | Long64_t fDebugMax; //! Last entry number to debug | |
| | | | |
| skipping to change at line 267 | | skipping to change at line 269 | |
| virtual Long64_t Draw(const char* varexp, const TCut& selection,
Option_t* option = "", Long64_t nentries = 1000000000, Long64_t firstentry
= 0); | | virtual Long64_t Draw(const char* varexp, const TCut& selection,
Option_t* option = "", Long64_t nentries = 1000000000, Long64_t firstentry
= 0); | |
| virtual Long64_t Draw(const char* varexp, const char* selection,
Option_t* option = "", Long64_t nentries = 1000000000, Long64_t firstentry
= 0); // *MENU* | | virtual Long64_t Draw(const char* varexp, const char* selection,
Option_t* option = "", Long64_t nentries = 1000000000, Long64_t firstentry
= 0); // *MENU* | |
| virtual void DropBaskets(); | | virtual void DropBaskets(); | |
| virtual void DropBuffers(Int_t nbytes); | | virtual void DropBuffers(Int_t nbytes); | |
| virtual Int_t Fill(); | | virtual Int_t Fill(); | |
| virtual TBranch *FindBranch(const char* name); | | virtual TBranch *FindBranch(const char* name); | |
| virtual TLeaf *FindLeaf(const char* name); | | virtual TLeaf *FindLeaf(const char* name); | |
| virtual Int_t Fit(const char* funcname, const char* varexp, co
nst char* selection = "", Option_t* option = "", Option_t* goption = "", Lo
ng64_t nentries = 1000000000, Long64_t firstentry = 0); // *MENU* | | virtual Int_t Fit(const char* funcname, const char* varexp, co
nst char* selection = "", Option_t* option = "", Option_t* goption = "", Lo
ng64_t nentries = 1000000000, Long64_t firstentry = 0); // *MENU* | |
| virtual Int_t FlushBaskets() const; | | virtual Int_t FlushBaskets() const; | |
| virtual const char *GetAlias(const char* aliasName) const; | | virtual const char *GetAlias(const char* aliasName) const; | |
|
| | | virtual Long64_t GetAutoFlush() const {return fAutoFlush;} | |
| | | virtual Long64_t GetAutoSave() const {return fAutoSave;} | |
| virtual TBranch *GetBranch(const char* name); | | virtual TBranch *GetBranch(const char* name); | |
| virtual TBranchRef *GetBranchRef() const { return fBranchRef; }; | | virtual TBranchRef *GetBranchRef() const { return fBranchRef; }; | |
| virtual Bool_t GetBranchStatus(const char* branchname) const; | | virtual Bool_t GetBranchStatus(const char* branchname) const; | |
| static Int_t GetBranchStyle(); | | static Int_t GetBranchStyle(); | |
| virtual Long64_t GetCacheSize() const { return fCacheSize; } | | virtual Long64_t GetCacheSize() const { return fCacheSize; } | |
| virtual Long64_t GetChainEntryNumber(Long64_t entry) const { retu
rn entry; } | | virtual Long64_t GetChainEntryNumber(Long64_t entry) const { retu
rn entry; } | |
| virtual Long64_t GetChainOffset() const { return fChainOffset; } | | virtual Long64_t GetChainOffset() const { return fChainOffset; } | |
| TFile *GetCurrentFile() const; | | TFile *GetCurrentFile() const; | |
| Int_t GetDefaultEntryOffsetLen() const {return fDefaul
tEntryOffsetLen;} | | Int_t GetDefaultEntryOffsetLen() const {return fDefaul
tEntryOffsetLen;} | |
| Long64_t GetDebugMax() const { return fDebugMax; } | | Long64_t GetDebugMax() const { return fDebugMax; } | |
| | | | |
| skipping to change at line 380 | | skipping to change at line 384 | |
| 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 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 | | virtual void SetAutoSave(Long64_t autos = 300000000); | |
| ve=autos; } | | virtual void SetAutoFlush(Long64_t autof = 30000000); | |
| 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 Int_t SetBranchAddress(const char *bname,void *add, TB
ranch **ptr = 0); | | virtual Int_t SetBranchAddress(const char *bname,void *add, TB
ranch **ptr = 0); | |
| #endif | | #endif | |
| virtual Int_t SetBranchAddress(const char *bname,void *add, TC
lass *realClass, EDataType datatype, Bool_t isptr); | | virtual Int_t SetBranchAddress(const char *bname,void *add, TC
lass *realClass, EDataType datatype, Bool_t isptr); | |
| virtual Int_t SetBranchAddress(const char *bname,void *add, TB
ranch **ptr, TClass *realClass, EDataType datatype, Bool_t isptr); | | virtual Int_t SetBranchAddress(const char *bname,void *add, TB
ranch **ptr, TClass *realClass, EDataType datatype, Bool_t isptr); | |
| template <class T> Int_t SetBranchAddress(const char *bname, T **add, TB
ranch **ptr = 0) { | | template <class T> Int_t SetBranchAddress(const char *bname, T **add, TB
ranch **ptr = 0) { | |
| return SetBranchAddress(bname,add,ptr,TClass::GetClass(typeid(T)),TDa
taType::GetType(typeid(T)),true); | | return SetBranchAddress(bname,add,ptr,TClass::GetClass(typeid(T)),TDa
taType::GetType(typeid(T)),true); | |
| } | | } | |
| #ifndef R__NO_CLASS_TEMPLATE_SPECIALIZATION | | #ifndef R__NO_CLASS_TEMPLATE_SPECIALIZATION | |
| // This can only be used when the template overload resolution can distr
inguish between | | // This can only be used when the template overload resolution can distr
inguish between | |
| // T* and T** | | // T* and T** | |
| template <class T> Int_t SetBranchAddress(const char *bname, T *add, TBr
anch **ptr = 0) { | | template <class T> Int_t SetBranchAddress(const char *bname, T *add, TBr
anch **ptr = 0) { | |
| return SetBranchAddress(bname,add,ptr,TClass::GetClass(typeid(T)),TDa
taType::GetType(typeid(T)),false); | | return SetBranchAddress(bname,add,ptr,TClass::GetClass(typeid(T)),TDa
taType::GetType(typeid(T)),false); | |
| } | | } | |
| #endif | | #endif | |
| virtual void SetBranchStatus(const char* bname, Bool_t status
= 1, UInt_t* found = 0); | | virtual void SetBranchStatus(const char* bname, Bool_t status
= 1, UInt_t* found = 0); | |
| static void SetBranchStyle(Int_t style = 1); //style=0 for
old branch, =1 for new branch style | | static void SetBranchStyle(Int_t style = 1); //style=0 for
old branch, =1 for new branch style | |
|
| virtual void SetCacheSize(Long64_t cachesize = 10000000); | | virtual void SetCacheSize(Long64_t cachesize = -1); | |
| virtual void SetCacheEntryRange(Long64_t first, Long64_t last
); | | virtual void SetCacheEntryRange(Long64_t first, Long64_t last
); | |
| virtual void SetCacheLearnEntries(Int_t n=10); | | virtual void SetCacheLearnEntries(Int_t n=10); | |
| virtual void SetChainOffset(Long64_t offset = 0) { fChainOffs
et=offset; } | | virtual void SetChainOffset(Long64_t offset = 0) { fChainOffs
et=offset; } | |
| virtual void SetCircular(Long64_t maxEntries); | | virtual void SetCircular(Long64_t maxEntries); | |
| virtual void SetDebug(Int_t level = 1, Long64_t min = 0, Long
64_t max = 9999999); // *MENU* | | virtual void SetDebug(Int_t level = 1, Long64_t min = 0, Long
64_t max = 9999999); // *MENU* | |
| virtual void SetDefaultEntryOffsetLen(Int_t newdefault, Bool_
t updateExisting = kFALSE); | | virtual void SetDefaultEntryOffsetLen(Int_t newdefault, Bool_
t updateExisting = kFALSE); | |
| virtual void SetDirectory(TDirectory* dir); | | virtual void SetDirectory(TDirectory* dir); | |
| virtual Long64_t SetEntries(Long64_t n = -1); | | virtual Long64_t SetEntries(Long64_t n = -1); | |
| virtual void SetEstimate(Long64_t nentries = 10000); | | virtual void SetEstimate(Long64_t nentries = 10000); | |
| virtual void SetFileNumber(Int_t number = 0); | | virtual void SetFileNumber(Int_t number = 0); | |
| | | | |
| skipping to change at line 433 | | skipping to change at line 438 | |
| virtual void SetWeight(Double_t w = 1, Option_t* option = "")
; | | virtual void SetWeight(Double_t w = 1, Option_t* option = "")
; | |
| virtual void SetUpdate(Int_t freq = 0) { fUpdate = freq; } | | virtual void SetUpdate(Int_t freq = 0) { fUpdate = freq; } | |
| virtual void Show(Long64_t entry = -1, Int_t lenmax = 20); | | virtual void Show(Long64_t entry = -1, Int_t lenmax = 20); | |
| virtual void StartViewer(); // *MENU* | | virtual void StartViewer(); // *MENU* | |
| virtual void StopCacheLearningPhase(); | | virtual void StopCacheLearningPhase(); | |
| virtual Int_t UnbinnedFit(const char* funcname, const char* va
rexp, const char* selection = "", Option_t* option = "", Long64_t nentries
= 1000000000, Long64_t firstentry = 0); | | virtual Int_t UnbinnedFit(const char* funcname, const char* va
rexp, const char* selection = "", Option_t* option = "", Long64_t nentries
= 1000000000, Long64_t firstentry = 0); | |
| void UseCurrentStyle(); | | void UseCurrentStyle(); | |
| virtual Int_t Write(const char *name=0, Int_t option=0, Int_t
bufsize=0); | | virtual Int_t Write(const char *name=0, Int_t option=0, Int_t
bufsize=0); | |
| virtual Int_t Write(const char *name=0, Int_t option=0, Int_t
bufsize=0) const; | | virtual Int_t Write(const char *name=0, Int_t option=0, Int_t
bufsize=0) const; | |
| | | | |
|
| ClassDef(TTree,17) //Tree descriptor (the main ROOT I/O class) | | ClassDef(TTree,18) //Tree descriptor (the main ROOT I/O class) | |
| }; | | }; | |
| | | | |
| ////////////////////////////////////////////////////////////////////////// | | ////////////////////////////////////////////////////////////////////////// | |
| // // | | // // | |
| // TTreeFriendLeafIter // | | // TTreeFriendLeafIter // | |
| // // | | // // | |
| // Iterator on all the leaves in a TTree and its friend // | | // Iterator on all the leaves in a TTree and its friend // | |
| // // | | // // | |
| ////////////////////////////////////////////////////////////////////////// | | ////////////////////////////////////////////////////////////////////////// | |
| | | | |
| | | | |
End of changes. 7 change blocks. |
| 5 lines changed or deleted | | 9 lines changed or added | |
|
| TTreeCache.h | | TTreeCache.h | |
|
| // @(#)root/tree:$Id: TTreeCache.h 30208 2009-09-16 17:30:17Z brun $ | | // @(#)root/tree:$Id: TTreeCache.h 31077 2009-11-11 08:51:57Z brun $ | |
| // Author: Rene Brun 04/06/2006 | | // Author: Rene Brun 04/06/2006 | |
| | | | |
| /************************************************************************* | | /************************************************************************* | |
| * 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 | |
| #endif | | #endif | |
| | | | |
| class TTree; | | class TTree; | |
| class TBranch; | | class TBranch; | |
| | | | |
| class TTreeCache : public TFileCacheRead { | | class TTreeCache : public TFileCacheRead { | |
| | | | |
| protected: | | protected: | |
| Long64_t fEntryMin; //! first entry in the cache | | Long64_t fEntryMin; //! first entry in the cache | |
| Long64_t fEntryMax; //! last entry in the cache | | Long64_t fEntryMax; //! last entry in the cache | |
|
| | | Long64_t fEntryCurrent;//! current lowest entry number in the cac
he | |
| Long64_t fEntryNext; //! next entry number where cache must be
filled | | Long64_t fEntryNext; //! next entry number where cache must be
filled | |
| Long64_t fZipBytes; //! Total compressed size of branches in c
ache | | Long64_t fZipBytes; //! Total compressed size of branches in c
ache | |
| Int_t fNbranches; //! Number of branches in the cache | | Int_t fNbranches; //! Number of branches in the cache | |
| Int_t fNReadOk; //Number of blocks read and found in the c
ache | | Int_t fNReadOk; //Number of blocks read and found in the c
ache | |
| Int_t fNReadMiss; //Number of blocks read and not found in t
he chache | | Int_t fNReadMiss; //Number of blocks read and not found in t
he chache | |
| Int_t fNReadPref; //Number of blocks that were prefetched | | Int_t fNReadPref; //Number of blocks that were prefetched | |
| TObjArray *fBranches; //! List of branches to be stored in the c
ache | | TObjArray *fBranches; //! List of branches to be stored in the c
ache | |
| TList *fBrNames; //! list of branch names in the cache | | TList *fBrNames; //! list of branch names in the cache | |
| TTree *fOwner; //! pointer to the owner Tree/chain | | TTree *fOwner; //! pointer to the owner Tree/chain | |
| TTree *fTree; //! pointer to the current Tree | | TTree *fTree; //! pointer to the current Tree | |
| | | | |
| skipping to change at line 69 | | skipping to change at line 70 | |
| virtual ~TTreeCache(); | | virtual ~TTreeCache(); | |
| virtual void AddBranch(TBranch *b, Bool_t subbranches = kFALSE); | | virtual void AddBranch(TBranch *b, Bool_t subbranches = kFALSE); | |
| virtual void AddBranch(const char *branch, Bool_t subbranches = k
FALSE); | | virtual void AddBranch(const char *branch, Bool_t subbranches = k
FALSE); | |
| Double_t GetEfficiency(); | | Double_t GetEfficiency(); | |
| Double_t GetEfficiencyRel(); | | Double_t GetEfficiencyRel(); | |
| static Int_t GetLearnEntries(); | | static Int_t GetLearnEntries(); | |
| virtual Bool_t GetSkipZip() { return kFALSE; } // This function is
only used by TTreeCacheUnzip (ignore it) | | virtual Bool_t GetSkipZip() { return kFALSE; } // This function is
only used by TTreeCacheUnzip (ignore it) | |
| virtual Bool_t FillBuffer(); | | virtual Bool_t FillBuffer(); | |
| TTree *GetOwner() const; | | TTree *GetOwner() const; | |
| TTree *GetTree() const; | | TTree *GetTree() const; | |
|
| Bool_t IsLearning() const {return fIsLearning;} | | virtual Bool_t IsLearning() const {return fIsLearning;} | |
| virtual Int_t ReadBuffer(char *buf, Long64_t pos, Int_t len); | | virtual Int_t ReadBuffer(char *buf, Long64_t pos, Int_t len); | |
| virtual void ResetCache(); | | virtual void ResetCache(); | |
| virtual void SetEntryRange(Long64_t emin, Long64_t emax); | | virtual void SetEntryRange(Long64_t emin, Long64_t emax); | |
| static void SetLearnEntries(Int_t n = 10); | | static void SetLearnEntries(Int_t n = 10); | |
|
| virtual void SetSkipZip(Bool_t skip = kTRUE) { (void)skip; return
; } // This function is only used by TTreeCacheUnzip (ignore it) | | | |
| void StartLearningPhase(); | | void StartLearningPhase(); | |
| virtual void StopLearningPhase(); | | virtual void StopLearningPhase(); | |
| virtual void UpdateBranches(TTree *tree, Bool_t owner = kFALSE); | | virtual void UpdateBranches(TTree *tree, Bool_t owner = kFALSE); | |
| | | | |
| ClassDef(TTreeCache,2) //Specialization of TFileCacheRead for a TTree | | ClassDef(TTreeCache,2) //Specialization of TFileCacheRead for a TTree | |
| }; | | }; | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 4 change blocks. |
| 3 lines changed or deleted | | 3 lines changed or added | |
|
| TVirtualPacketizer.h | | TVirtualPacketizer.h | |
|
| // @(#)root/proofplayer:$Id: TVirtualPacketizer.h 25896 2008-10-20 17:01:31
Z ganis $ | | // @(#)root/proofplayer:$Id: TVirtualPacketizer.h 30899 2009-10-28 12:22:17
Z ganis $ | |
| // Author: Maarten Ballintijn 9/7/2002 | | // Author: Maarten Ballintijn 9/7/2002 | |
| | | | |
| /************************************************************************* | | /************************************************************************* | |
| * Copyright (C) 1995-2002, Rene Brun and Fons Rademakers. * | | * Copyright (C) 1995-2002, 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 51 | | skipping to change at line 51 | |
| #endif | | #endif | |
| #ifndef ROOT_TProofProgressStatus | | #ifndef ROOT_TProofProgressStatus | |
| #include "TProofProgressStatus.h" | | #include "TProofProgressStatus.h" | |
| #endif | | #endif | |
| | | | |
| class TDSet; | | class TDSet; | |
| class TDSetElement; | | class TDSetElement; | |
| class TSlave; | | class TSlave; | |
| class TMessage; | | class TMessage; | |
| class TNtupleD; | | class TNtupleD; | |
|
| | | class TProofProgressInfo; | |
| | | | |
| class TVirtualPacketizer : public TObject { | | class TVirtualPacketizer : public TObject { | |
| | | | |
| friend class TPacketizer; | | friend class TPacketizer; | |
| friend class TPacketizerAdaptive; | | friend class TPacketizerAdaptive; | |
| friend class TPacketizerProgressive; | | friend class TPacketizerProgressive; | |
| friend class TPacketizerUnit; | | friend class TPacketizerUnit; | |
| | | | |
| public: // public because of Sun CC bug | | public: // public because of Sun CC bug | |
| class TVirtualSlaveStat; | | class TVirtualSlaveStat; | |
| | | | |
| skipping to change at line 106 | | skipping to change at line 107 | |
| Bool_t fStop; // Termination of Process() requested? | | Bool_t fStop; // Termination of Process() requested? | |
| | | | |
| TVirtualPacketizer(TList *input, TProofProgressStatus *st = 0); | | TVirtualPacketizer(TList *input, TProofProgressStatus *st = 0); | |
| Long64_t GetEntries(Bool_t tree, TDSetElement *e); // Num of entries or
objects | | Long64_t GetEntries(Bool_t tree, TDSetElement *e); // Num of entries or
objects | |
| | | | |
| public: | | public: | |
| enum EStatusBits { kIsInitializing = BIT(16), kIsDone = BIT(17) }; | | enum EStatusBits { kIsInitializing = BIT(16), kIsDone = BIT(17) }; | |
| virtual ~TVirtualPacketizer(); | | virtual ~TVirtualPacketizer(); | |
| | | | |
| Bool_t IsValid() const { return fValid; } | | Bool_t IsValid() const { return fValid; } | |
|
| Long64_t GetEntriesProcessed() const { return (fProgressS | | Long64_t GetEntriesProcessed() const { return (fProgressS | |
| tatus? fProgressStatus->GetEntries():0); } | | tatus? fProgressStatus->GetEntries() : 0); } | |
| virtual Int_t GetEstEntriesProcessed(Float_t, Long64_t &ent, L | | virtual Int_t GetEstEntriesProcessed(Float_t, Long64_t &ent, L | |
| ong64_t &bytes) | | ong64_t &bytes, Long64_t &calls) | |
| { ent = GetEntriesProcessed(); bytes = GetBytesR | | { ent = GetEntriesProcessed(); bytes = GetBytesR | |
| ead(); return 0; } | | ead(); calls = GetReadCalls(); return 0; } | |
| | | virtual Float_t GetCurrentRate(Bool_t &all) { all = kTRUE; retur | |
| | | n (fProgressStatus? fProgressStatus->GetCurrentRate() : 0.); } | |
| Long64_t GetTotalEntries() const { return fTotalEntries;
} | | Long64_t GetTotalEntries() const { return fTotalEntries;
} | |
| virtual TDSetElement *GetNextPacket(TSlave *sl, TMessage *r); | | virtual TDSetElement *GetNextPacket(TSlave *sl, TMessage *r); | |
| virtual void SetInitTime(); | | virtual void SetInitTime(); | |
| virtual void StopProcess(Bool_t abort); | | virtual void StopProcess(Bool_t abort); | |
| TList *GetFailedPackets() { return fFailedPackets; } | | TList *GetFailedPackets() { return fFailedPackets; } | |
| void SetFailedPackets(TList *list) { fFailedPackets =
list; } | | void SetFailedPackets(TList *list) { fFailedPackets =
list; } | |
| | | | |
| Long64_t GetBytesRead() const { return (fProgressStatus? fProgressS
tatus->GetBytesRead() : 0); } | | Long64_t GetBytesRead() const { return (fProgressStatus? fProgressS
tatus->GetBytesRead() : 0); } | |
|
| | | Long64_t GetReadCalls() const { return (fProgressStatus? fProgressS
tatus->GetReadCalls() : 0); } | |
| Double_t GetCumProcTime() const { return fProgressStatus->GetProcTi
me(); } | | Double_t GetCumProcTime() const { return fProgressStatus->GetProcTi
me(); } | |
| Float_t GetInitTime() const { return fInitTime; } | | Float_t GetInitTime() const { return fInitTime; } | |
| Float_t GetProcTime() const { return fProcTime; } | | Float_t GetProcTime() const { return fProcTime; } | |
| virtual void MarkBad(TSlave * /*s*/, TProofProgressStatus * /*status*/,
TList ** /*missingFiles*/) { return; } | | virtual void MarkBad(TSlave * /*s*/, TProofProgressStatus * /*status*/,
TList ** /*missingFiles*/) { return; } | |
| virtual Int_t AddProcessed(TSlave * /*sl*/, TProofProgressStatus * /*st*
/, | | virtual Int_t AddProcessed(TSlave * /*sl*/, TProofProgressStatus * /*st*
/, | |
| Double_t /*lat*/, TList ** /*missingFiles*/) { return 0
; } | | Double_t /*lat*/, TList ** /*missingFiles*/) { return 0
; } | |
| TProofProgressStatus *GetStatus() { return fProgressStatus; } | | TProofProgressStatus *GetStatus() { return fProgressStatus; } | |
| void SetProgressStatus(TProofProgressStatus *st) { fProgressSta
tus = st; } | | void SetProgressStatus(TProofProgressStatus *st) { fProgressSta
tus = st; } | |
|
| | | | |
| | | virtual Int_t GetActiveWorkers() { return -1; } | |
| | | | |
| ClassDef(TVirtualPacketizer,0) //Generate work packets for parallel pro
cessing | | ClassDef(TVirtualPacketizer,0) //Generate work packets for parallel pro
cessing | |
| }; | | }; | |
| | | | |
| //-------------------------------------------------------------------------
----- | | //-------------------------------------------------------------------------
----- | |
| | | | |
| class TVirtualPacketizer::TVirtualSlaveStat : public TObject { | | class TVirtualPacketizer::TVirtualSlaveStat : public TObject { | |
| | | | |
| friend class TPacketizerAdaptive; | | friend class TPacketizerAdaptive; | |
| friend class TPacketizer; | | friend class TPacketizer; | |
| | | | |
| protected: | | protected: | |
|
| TSlave *fSlave; // corresponding TSlave record | | TString fWrkFQDN; // Worker FQDN | |
| | | TSlave *fSlave; // corresponding TSlave record | |
| TProofProgressStatus *fStatus; // status as of the last finished packet | | TProofProgressStatus *fStatus; // status as of the last finished packet | |
| | | | |
| public: | | public: | |
|
| const char *GetName() const { return fSlave->GetName(); } | | const char *GetName() const { return fWrkFQDN.Data(); } | |
| | | const char *GetOrdinal() const { return fSlave->GetOrdinal(); } | |
| Long64_t GetEntriesProcessed() const { return fStatus?fStatus->GetEnt
ries():-1; } | | Long64_t GetEntriesProcessed() const { return fStatus?fStatus->GetEnt
ries():-1; } | |
| Double_t GetProcTime() const { return fStatus?fStatus->GetProcTime():
-1; } | | Double_t GetProcTime() const { return fStatus?fStatus->GetProcTime():
-1; } | |
| Float_t GetAvgRate() { return fStatus->GetRate(); } | | Float_t GetAvgRate() { return fStatus->GetRate(); } | |
| TProofProgressStatus *GetProgressStatus() { return fStatus; } | | TProofProgressStatus *GetProgressStatus() { return fStatus; } | |
| virtual TProofProgressStatus *AddProcessed(TProofProgressStatus *st) = 0
; | | virtual TProofProgressStatus *AddProcessed(TProofProgressStatus *st) = 0
; | |
| }; | | }; | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 7 change blocks. |
| 9 lines changed or deleted | | 18 lines changed or added | |
|
| TVirtualProofPlayer.h | | TVirtualProofPlayer.h | |
|
| // @(#)root/proof:$Id: TVirtualProofPlayer.h 26382 2008-11-22 17:18:42Z gan
is $ | | // @(#)root/proof:$Id: TVirtualProofPlayer.h 30859 2009-10-24 14:53:07Z gan
is $ | |
| // Author: Fons Rademakers 15/03/07 | | // Author: Fons Rademakers 15/03/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 43 | | skipping to change at line 43 | |
| class TEventList; | | class TEventList; | |
| class TQueryResult; | | class TQueryResult; | |
| class TDrawFeedback; | | class TDrawFeedback; | |
| class TList; | | class TList; | |
| class TSlave; | | class TSlave; | |
| class TMessage; | | class TMessage; | |
| class TProof; | | class TProof; | |
| class TSocket; | | class TSocket; | |
| class TVirtualPacketizer; | | class TVirtualPacketizer; | |
| class TProofProgressStatus; | | class TProofProgressStatus; | |
|
| | | class TProofProgressInfo; | |
| | | | |
| class TVirtualProofPlayer : public TObject, public TQObject { | | class TVirtualProofPlayer : public TObject, public TQObject { | |
| | | | |
| public: | | public: | |
| enum EExitStatus { kFinished, kStopped, kAborted }; | | enum EExitStatus { kFinished, kStopped, kAborted }; | |
| | | | |
| TVirtualProofPlayer() { } | | TVirtualProofPlayer() { } | |
| virtual ~TVirtualProofPlayer() { } | | virtual ~TVirtualProofPlayer() { } | |
| | | | |
| virtual Long64_t Process(TDSet *set, | | virtual Long64_t Process(TDSet *set, | |
| | | | |
| skipping to change at line 91 | | skipping to change at line 92 | |
| virtual void StoreOutput(TList *out) = 0; // Adopts the list | | virtual void StoreOutput(TList *out) = 0; // Adopts the list | |
| virtual void StoreFeedback(TObject *slave, TList *out) = 0; // Adop
ts the list | | virtual void StoreFeedback(TObject *slave, TList *out) = 0; // Adop
ts the list | |
| virtual void Progress(Long64_t total, Long64_t processed) = 0; // *
SIGNAL* | | virtual void Progress(Long64_t total, Long64_t processed) = 0; // *
SIGNAL* | |
| virtual void Progress(TSlave *, Long64_t total, Long64_t processed)
= 0; | | virtual void Progress(TSlave *, Long64_t total, Long64_t processed)
= 0; | |
| virtual void Progress(Long64_t total, Long64_t processed, Long64_t
bytesread, | | virtual 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) = 0; // *SIGNA
L* | | Float_t evtrti, Float_t mbrti) = 0; // *SIGNA
L* | |
| virtual void Progress(TSlave *, Long64_t total, Long64_t processed, | | virtual void Progress(TSlave *, Long64_t total, Long64_t processed, | |
| Long64_t bytesread, Float_t initTime, Float_t
procTime, | | Long64_t bytesread, Float_t initTime, Float_t
procTime, | |
| Float_t evtrti, Float_t mbrti) = 0; // *SIGNA
L* | | Float_t evtrti, Float_t mbrti) = 0; // *SIGNA
L* | |
|
| | | virtual void Progress(TProofProgressInfo *) = 0; // *SIGNAL* | |
| | | virtual void Progress(TSlave *, TProofProgressInfo *) = 0; // *SIGN | |
| | | AL* | |
| virtual void Feedback(TList *objs) = 0; // *SIGNAL* | | virtual void Feedback(TList *objs) = 0; // *SIGNAL* | |
| | | | |
| virtual TDrawFeedback *CreateDrawFeedback(TProof *p) = 0; | | virtual TDrawFeedback *CreateDrawFeedback(TProof *p) = 0; | |
| virtual void SetDrawFeedbackOption(TDrawFeedback *f, Option_t
*opt) = 0; | | virtual void SetDrawFeedbackOption(TDrawFeedback *f, Option_t
*opt) = 0; | |
| virtual void DeleteDrawFeedback(TDrawFeedback *f) = 0; | | virtual void DeleteDrawFeedback(TDrawFeedback *f) = 0; | |
| | | | |
| virtual TDSetElement *GetNextPacket(TSlave *slave, TMessage *r) = 0; | | virtual TDSetElement *GetNextPacket(TSlave *slave, TMessage *r) = 0; | |
| | | | |
| virtual Int_t ReinitSelector(TQueryResult *qr) = 0; | | virtual Int_t ReinitSelector(TQueryResult *qr) = 0; | |
| | | | |
| | | | |
| skipping to change at line 117 | | skipping to change at line 120 | |
| | | | |
| virtual EExitStatus GetExitStatus() const = 0; | | virtual EExitStatus GetExitStatus() const = 0; | |
| virtual Long64_t GetEventsProcessed() const = 0; | | virtual Long64_t GetEventsProcessed() const = 0; | |
| virtual void AddEventsProcessed(Long64_t ev) = 0; | | virtual void AddEventsProcessed(Long64_t ev) = 0; | |
| virtual TProofProgressStatus* GetProgressStatus() const = 0; | | virtual TProofProgressStatus* GetProgressStatus() const = 0; | |
| | | | |
| virtual void SetDispatchTimer(Bool_t on = kTRUE) = 0; | | virtual void SetDispatchTimer(Bool_t on = kTRUE) = 0; | |
| virtual void SetStopTimer(Bool_t on = kTRUE, | | virtual void SetStopTimer(Bool_t on = kTRUE, | |
| Bool_t abort = kFALSE, Int_t timeout = 0)
= 0; | | Bool_t abort = kFALSE, Int_t timeout = 0)
= 0; | |
| virtual void SetInitTime() = 0; | | virtual void SetInitTime() = 0; | |
|
| | | virtual Long64_t GetCacheSize() = 0; | |
| | | virtual Int_t GetLearnEntries() = 0; | |
| | | | |
| virtual TVirtualPacketizer *GetPacketizer() const { return 0; } | | virtual TVirtualPacketizer *GetPacketizer() const { return 0; } | |
| static TVirtualProofPlayer *Create(const char *player, TProof *p, TSocke
t *s = 0); | | static TVirtualProofPlayer *Create(const char *player, TProof *p, TSocke
t *s = 0); | |
| | | | |
| ClassDef(TVirtualProofPlayer,0) // Abstract PROOF player | | ClassDef(TVirtualProofPlayer,0) // Abstract PROOF player | |
| }; | | }; | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 4 change blocks. |
| 1 lines changed or deleted | | 7 lines changed or added | |
|
| WrappedMultiTF1.h | | WrappedMultiTF1.h | |
|
| // @(#)root/mathmore:$Id: WrappedMultiTF1.h 28964 2009-06-12 16:08:04Z mone
ta $ | | // @(#)root/mathmore:$Id: WrappedMultiTF1.h 31207 2009-11-16 16:52:00Z 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 37 | | skipping to change at line 37 | |
| | | | |
| /** | | /** | |
| Class to Wrap a ROOT Function class (like TF1) in a IParamMultiFunction
interface | | Class to Wrap a ROOT Function class (like TF1) in a IParamMultiFunction
interface | |
| of multi-dimensions to be used in the ROOT::Math numerical algorithm | | of multi-dimensions to be used in the ROOT::Math numerical algorithm | |
| The parameter are stored in this wrapper class, so the TF1 parameter val
ues are not used for evaluating the function. | | The parameter are stored in this wrapper class, so the TF1 parameter val
ues are not used for evaluating the function. | |
| This allows for the copy of the wrapper function without the need to cop
y the TF1. | | This allows for the copy of the wrapper function without the need to cop
y the TF1. | |
| This wrapper class does not own the TF1 pointer, so it assumes it exists
during the wrapper lifetime. | | This wrapper class does not own the TF1 pointer, so it assumes it exists
during the wrapper lifetime. | |
| | | | |
| @ingroup CppFunctions | | @ingroup CppFunctions | |
| */ | | */ | |
|
| class WrappedMultiTF1 : public ROOT::Math::IParamMultiFunction { | | class WrappedMultiTF1 : public ROOT::Math::IParamMultiGradFunction { | |
| | | | |
| public: | | public: | |
| | | | |
|
| typedef ROOT::Math::IParamMultiFunction BaseParamFunc; | | typedef ROOT::Math::IParamMultiGradFunction BaseParamFunc; | |
| typedef ROOT::Math::IParamMultiFunction::BaseFunc BaseFunc; | | typedef ROOT::Math::IParamMultiFunction::BaseFunc BaseFunc; | |
| | | | |
| /** | | /** | |
| constructor from a function pointer to a TF1 | | constructor from a function pointer to a TF1 | |
| If dim = 0 dimension is taken from TF1::GetNdim(). | | If dim = 0 dimension is taken from TF1::GetNdim(). | |
| IN case of multi-dimensional function created using directly TF1 obje
ct the dimension | | 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 | | returned by TF1::GetNdim is always 1. The user must then pass the cor
rect value of dim | |
| */ | | */ | |
| WrappedMultiTF1 (TF1 & f, unsigned int dim = 0 ); | | WrappedMultiTF1 (TF1 & f, unsigned int dim = 0 ); | |
| | | | |
| | | | |
| skipping to change at line 103 | | skipping to change at line 103 | |
| /// return number of parameters | | /// return number of parameters | |
| unsigned int NPar() const { | | unsigned int NPar() const { | |
| return fParams.size(); | | return fParams.size(); | |
| } | | } | |
| | | | |
| /// return parameter name (from TF1) | | /// return parameter name (from 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)); | |
| } | | } | |
| | | | |
|
| | | /// evaluate the derivative of the function with respect to the paramete | |
| | | rs | |
| | | void ParameterGradient(const double * x, const double * par, double * g | |
| | | rad ) const; | |
| | | | |
| | | /// precision value used for calculating the derivative step-size | |
| | | /// h = eps * |x|. The default is 0.001, give a smaller in case function | |
| | | changes rapidly | |
| | | static void SetDerivPrecision(double eps); | |
| | | | |
| | | /// get precision value used for calculating the derivative step-size | |
| | | static double GetDerivPrecision(); | |
| | | | |
| 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); | |
| } | | } | |
| | | | |
|
| | | /// evaluate the partial derivative with respect to the parameter | |
| | | double DoParameterDerivative(const double * x, const double * p, unsigne | |
| | | d int ipar) const; | |
| | | | |
| | | bool fLinear; // flag for linear functions | |
| | | bool fPolynomial; // flag for polynomial functions | |
| TF1 * fFunc; // pointer to ROOT function | | TF1 * fFunc; // pointer to ROOT function | |
| unsigned int fDim; // cached value of dimension | | 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 | |
| | | | |
|
| | | static double fgEps; // epsilon used in derivative calculation
h ~ eps |p| | |
| }; | | }; | |
| | | | |
| } // end namespace Fit | | } // end namespace Fit | |
| | | | |
| } // end namespace ROOT | | } // end namespace ROOT | |
| | | | |
| #endif /* ROOT_Fit_WrappedMultiTF1 */ | | #endif /* ROOT_Fit_WrappedMultiTF1 */ | |
| | | | |
End of changes. 6 change blocks. |
| 3 lines changed or deleted | | 23 lines changed or added | |
|