| Factory.h | | Factory.h | |
|
| // @(#)root/tmva $Id: Factory.h 40005 2011-06-27 15:29:10Z stelzer $ | | // @(#)root/mathcore:$Id: Factory.h 37448 2010-12-09 20:20:56Z moneta $ | |
| // Author: Andreas Hoecker, Peter Speckmayer, Joerg Stelzer, Helge Voss, Ka | | // Author: L. Moneta Fri Dec 22 14:43:33 2006 | |
| i Voss, Eckhard von Toerne, Jan Therhaag | | | |
| | | | |
|
| /************************************************************************** | | /********************************************************************** | |
| ******** | | * * | |
| * 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 | | | |
| * | | | |
| * Jan Therhaag <Jan.Therhaag@cern.ch> - U of Bonn, Germany | | | |
| * | | | |
| * Eckhard v. Toerne <evt@uni-bonn.de> - U of Bonn, Germany | | | |
| * | | | |
| * Helge Voss <Helge.Voss@cern.ch> - MPI-K Heidelberg, German | | | |
| y * | | | |
| * Kai Voss <Kai.Voss@cern.ch> - U. of Victoria, Canada | | | |
| * | | | |
| * | | | |
| * | | | |
| * Copyright (c) 2005-2011: | | | |
| * | | | |
| * CERN, Switzerland | | | |
| * | | | |
| * U. of Victoria, Canada | | | |
| * | | | |
| * MPI-K Heidelberg, Germany | | | |
| * | | | |
| * U. of Bonn, 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 DataSetManager; | | | |
| 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 | | | |
| ; } | | | |
| | | | |
| // optimize all booked methods (well, if desired by the method) | | | |
| void OptimizeAllMethods (TString fomType="ROCIntegral | | | |
| ", TString fitType="FitGA"); | | | |
| void OptimizeAllMethodsForClassification(TString fomType="ROCIntegral | | | |
| ", TString fitType="FitGA") { OptimizeAllMethods(fomType,fitType); } | | | |
| void OptimizeAllMethodsForRegression (TString fomType="ROCIntegral | | | |
| ", TString fitType="FitGA") { OptimizeAllMethods(fomType,fitType); } | | | |
| | | | |
| // training for all booked methods | | | |
| void TrainAllMethods (); | | | |
| void TrainAllMethodsForClassification( void ) { TrainAllMethods(); } | | | |
| void TrainAllMethodsForRegression ( void ) { TrainAllMethods(); } | | | |
| | | | |
| // 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 | | | |
| | | | |
| DataSetManager* fDataSetManager; // DSMTEST | | | |
| | | | |
| 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 | | | |
| | | | |
| Types::EAnalysisType fAnalysisType; //! the t | | | |
| raining type | | | |
| | | | |
|
| protected: | | namespace ROOT { | |
| | | | |
| | | namespace Math { | |
| | | | |
| | | class Minimizer; | |
| | | class DistSampler; | |
| | | | |
| | | //_________________________________________________________________________ | |
| | | __ | |
| | | /** | |
| | | 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 | |
| | | Supported Minimizers types are: | |
| | | Minuit (TMinuit), Minuit2, GSLMultiMin, GSLMultiFit, GSLSimAn, Linear | |
| | | , Fumili, Genetic | |
| | | If no name is given use default values defined in MinimizerOptions | |
| | | */ | |
| | | static ROOT::Math::Minimizer * CreateMinimizer(const std::string & minim | |
| | | izerType = "", const std::string & algoType = ""); | |
| | | | |
| | | /** | |
| | | static method to create the distribution sampler class given a string | |
| | | specifying the type | |
| | | Supported sampler types are: | |
| | | Unuran, Foam | |
| | | If no name is given use default values defined in DistSamplerOptions | |
| | | */ | |
| | | static ROOT::Math::DistSampler * CreateDistSampler(const std::string & s | |
| | | amplerType =""); | |
| | | | |
| | | }; | |
| | | | |
|
| 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. |
| 360 lines changed or deleted | | 53 lines changed or added | |
|
| HybridCalculator.h | | HybridCalculator.h | |
|
| // @(#)root/roostats:$Id: HybridCalculator.h 43199 2012-03-01 20:17:42Z mon
eta $ | | // @(#)root/roostats:$Id: HybridCalculator.h 44974 2012-07-09 15:48:52Z mon
eta $ | |
| /************************************************************************* | | /************************************************************************* | |
| * 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_HybridCalculator | | #ifndef ROOSTATS_HybridCalculator | |
| #define ROOSTATS_HybridCalculator | | #define ROOSTATS_HybridCalculator | |
| | | | |
| skipping to change at line 44 | | skipping to change at line 44 | |
| class HybridCalculator : public HypoTestCalculatorGeneric { | | class HybridCalculator : public HypoTestCalculatorGeneric { | |
| | | | |
| public: | | public: | |
| HybridCalculator( | | HybridCalculator( | |
| const RooAbsData &data, | | const RooAbsData &data, | |
| const ModelConfig &altModel, | | const ModelConfig &altModel, | |
| const ModelConfig &nullModel, | | const ModelConfig &nullModel, | |
| TestStatSampler* sampler=0 | | TestStatSampler* sampler=0 | |
| ) : | | ) : | |
| HypoTestCalculatorGeneric(data, altModel, nullModel, sampler), | | HypoTestCalculatorGeneric(data, altModel, nullModel, sampler), | |
|
| fPriorNuisanceNull(0), | | fPriorNuisanceNull(MakeNuisancePdf(nullModel, "PriorNuisanceNull") | |
| fPriorNuisanceAlt(0), | | ), | |
| | | fPriorNuisanceAlt(MakeNuisancePdf(altModel, "PriorNuisanceAlt")), | |
| | | fPriorNuisanceNullExternal(false), | |
| | | fPriorNuisanceAltExternal(false), | |
| fNToysNull(-1), | | fNToysNull(-1), | |
| fNToysAlt(-1), | | fNToysAlt(-1), | |
| fNToysNullTail(0), | | fNToysNullTail(0), | |
| fNToysAltTail(0) | | fNToysAltTail(0) | |
| { | | { | |
| } | | } | |
| | | | |
| ~HybridCalculator() { | | ~HybridCalculator() { | |
|
| | | if(fPriorNuisanceNullExternal == false) delete fPriorNuisanceNull; | |
| | | if(fPriorNuisanceAltExternal == false) delete fPriorNuisanceAlt; | |
| } | | } | |
| | | | |
|
| // Override the distribution used for marginalizing nuisance paramete | | // Override the distribution used for marginalizing nuisance paramete | |
| rs that is infered from ModelConfig | | rs that is inferred from ModelConfig | |
| virtual void ForcePriorNuisanceNull(RooAbsPdf& priorNuisance) { fPrio | | virtual void ForcePriorNuisanceNull(RooAbsPdf& priorNuisance) { | |
| rNuisanceNull = &priorNuisance; } | | if(fPriorNuisanceNullExternal == false) delete fPriorNuisanceNull; | |
| virtual void ForcePriorNuisanceAlt(RooAbsPdf& priorNuisance) { fPrior | | fPriorNuisanceNull = &priorNuisance; fPriorNuisanceNullExternal = | |
| NuisanceAlt = &priorNuisance; } | | true; | |
| | | } | |
| | | virtual void ForcePriorNuisanceAlt(RooAbsPdf& priorNuisance) { | |
| | | if(fPriorNuisanceAltExternal == false) delete fPriorNuisanceAlt; | |
| | | fPriorNuisanceAlt = &priorNuisance; fPriorNuisanceAltExternal = tr | |
| | | ue; | |
| | | } | |
| | | | |
| | | virtual void SetNullModel(const ModelConfig &nullModel) { | |
| | | fNullModel = &nullModel; | |
| | | if(fPriorNuisanceNullExternal == false) { | |
| | | delete fPriorNuisanceNull; | |
| | | fPriorNuisanceNull = MakeNuisancePdf(nullModel, "PriorNuisanceN | |
| | | ull"); | |
| | | } | |
| | | } | |
| | | | |
| | | virtual void SetAlternateModel(const ModelConfig &altModel) { | |
| | | fAltModel = &altModel; | |
| | | if(fPriorNuisanceAltExternal == false) { | |
| | | delete fPriorNuisanceAlt; | |
| | | fPriorNuisanceAlt = MakeNuisancePdf(altModel, "PriorNuisanceAlt | |
| | | "); | |
| | | } | |
| | | } | |
| | | | |
| // set number of toys | | // set number of toys | |
| void SetToys(int toysNull, int toysAlt) { fNToysNull = toysNull; fNTo
ysAlt = toysAlt; } | | void SetToys(int toysNull, int toysAlt) { fNToysNull = toysNull; fNTo
ysAlt = toysAlt; } | |
| | | | |
| // set least number of toys in tails | | // set least number of toys in tails | |
| void SetNToysInTails(int toysNull, int toysAlt) { fNToysNullTail = to
ysNull; fNToysAltTail = toysAlt; } | | void SetNToysInTails(int toysNull, int toysAlt) { fNToysNullTail = to
ysNull; fNToysAltTail = toysAlt; } | |
| | | | |
| protected: | | protected: | |
| // check whether all input is consistent | | // check whether all input is consistent | |
| int CheckHook(void) const; | | int CheckHook(void) const; | |
| | | | |
| skipping to change at line 80 | | skipping to change at line 106 | |
| // configure TestStatSampler for the Null run | | // configure TestStatSampler for the Null run | |
| int PreNullHook(RooArgSet* /*parameterPoint*/, double obsTestStat) co
nst; | | int PreNullHook(RooArgSet* /*parameterPoint*/, double obsTestStat) co
nst; | |
| | | | |
| // configure TestStatSampler for the Alt run | | // configure TestStatSampler for the Alt run | |
| int PreAltHook(RooArgSet* /*parameterPoint*/, double obsTestStat) con
st; | | int PreAltHook(RooArgSet* /*parameterPoint*/, double obsTestStat) con
st; | |
| | | | |
| protected: | | protected: | |
| RooAbsPdf *fPriorNuisanceNull; | | RooAbsPdf *fPriorNuisanceNull; | |
| RooAbsPdf *fPriorNuisanceAlt; | | RooAbsPdf *fPriorNuisanceAlt; | |
| | | | |
|
| | | // these flags tell us if the nuisance pdfs came from an external res | |
| | | ource (via ForcePriorNuisance) | |
| | | // or were created internally and should be deleted | |
| | | Bool_t fPriorNuisanceNullExternal; | |
| | | Bool_t fPriorNuisanceAltExternal; | |
| | | | |
| // different number of toys for null and alt | | // different number of toys for null and alt | |
| int fNToysNull; | | int fNToysNull; | |
| int fNToysAlt; | | int fNToysAlt; | |
| | | | |
| // adaptive sampling | | // adaptive sampling | |
| int fNToysNullTail; | | int fNToysNullTail; | |
| int fNToysAltTail; | | int fNToysAltTail; | |
| | | | |
| protected: | | protected: | |
|
| ClassDef(HybridCalculator,1) | | ClassDef(HybridCalculator,2) | |
| }; | | }; | |
| } | | } | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 6 change blocks. |
| 10 lines changed or deleted | | 45 lines changed or added | |
|
| ParamHistFunc.h | | ParamHistFunc.h | |
| | | | |
| skipping to change at line 46 | | skipping to change at line 46 | |
| ParamHistFunc() ; | | ParamHistFunc() ; | |
| ParamHistFunc(const char *name, const char *title, const RooArgList& vars
, const RooArgList& paramSet ); | | ParamHistFunc(const char *name, const char *title, const RooArgList& vars
, const RooArgList& paramSet ); | |
| ParamHistFunc(const char *name, const char *title, const RooArgList& vars
, const RooArgList& paramSet, const TH1* hist ); | | ParamHistFunc(const char *name, const char *title, const RooArgList& vars
, const RooArgList& paramSet, const TH1* hist ); | |
| // Not yet fully implemented: | | // Not yet fully implemented: | |
| //ParamHistFunc(const char *name, const char *title, const RooRealVar& va
r, const RooArgList& paramSet, const RooAbsReal& nominal ); | | //ParamHistFunc(const char *name, const char *title, const RooRealVar& va
r, const RooArgList& paramSet, const RooAbsReal& nominal ); | |
| virtual ~ParamHistFunc() ; | | virtual ~ParamHistFunc() ; | |
| | | | |
| ParamHistFunc(const ParamHistFunc& other, const char* name = 0); | | ParamHistFunc(const ParamHistFunc& other, const char* name = 0); | |
| virtual TObject* clone(const char* newname) const { return new ParamHistF
unc(*this, newname); } | | virtual TObject* clone(const char* newname) const { return new ParamHistF
unc(*this, newname); } | |
| | | | |
|
| // void printMetaArgs(ostream& os) const ; | | // void printMetaArgs(std::ostream& os) const ; | |
| | | | |
| const RooArgList& paramList() const { return _paramSet ; } | | const RooArgList& paramList() const { return _paramSet ; } | |
| | | | |
| Int_t numBins() const { return _dataSet.numEntries(); } // Number of bins
(called numEntries in RooDataHist) | | Int_t numBins() const { return _dataSet.numEntries(); } // Number of bins
(called numEntries in RooDataHist) | |
| | | | |
| void setParamConst( Int_t, Bool_t=kTRUE ); | | void setParamConst( Int_t, Bool_t=kTRUE ); | |
| | | | |
| RooRealVar& getParameter() const ; | | RooRealVar& getParameter() const ; | |
| RooRealVar& getParameter( Int_t masterIdx ) const ; | | RooRealVar& getParameter( Int_t masterIdx ) const ; | |
| | | | |
| | | | |
| skipping to change at line 90 | | skipping to change at line 90 | |
| virtual ~CacheElem() {} ; | | virtual ~CacheElem() {} ; | |
| virtual RooArgList containedArgs(Action) { | | virtual RooArgList containedArgs(Action) { | |
| RooArgList ret(_funcIntList) ; | | RooArgList ret(_funcIntList) ; | |
| ret.add(_lowIntList); | | ret.add(_lowIntList); | |
| ret.add(_highIntList); | | ret.add(_highIntList); | |
| return ret ; | | return ret ; | |
| } | | } | |
| RooArgList _funcIntList ; | | RooArgList _funcIntList ; | |
| RooArgList _lowIntList ; | | RooArgList _lowIntList ; | |
| RooArgList _highIntList ; | | RooArgList _highIntList ; | |
|
| // will want vector<RooRealVar*> for low and high also | | // will want std::vector<RooRealVar*> for low and high also | |
| } ; | | } ; | |
| mutable RooObjCacheManager _normIntMgr ; // The integration cache manager | | mutable RooObjCacheManager _normIntMgr ; // The integration cache manager | |
| | | | |
| // Turn into a RooListProxy | | // Turn into a RooListProxy | |
| //RooRealProxy _dataVar; // The RooRealVar | | //RooRealProxy _dataVar; // The RooRealVar | |
| RooListProxy _dataVars; // The RooRealVars | | RooListProxy _dataVars; // The RooRealVars | |
| RooListProxy _paramSet ; // interpolation parameters | | RooListProxy _paramSet ; // interpolation parameters | |
| //RooAbsBinning* _binning; // Holds the binning of the dataVar (at const
ruction time) | | //RooAbsBinning* _binning; // Holds the binning of the dataVar (at const
ruction time) | |
| | | | |
| Int_t _numBins; | | Int_t _numBins; | |
| | | | |
End of changes. 2 change blocks. |
| 2 lines changed or deleted | | 2 lines changed or added | |
|
| PiecewiseInterpolation.h | | PiecewiseInterpolation.h | |
| | | | |
| skipping to change at line 40 | | skipping to change at line 40 | |
| | | | |
| PiecewiseInterpolation() ; | | PiecewiseInterpolation() ; | |
| PiecewiseInterpolation(const char *name, const char *title, const RooAbsR
eal& nominal, const RooArgList& lowSet, const RooArgList& highSet, const Ro
oArgList& paramSet, Bool_t takeOwnerShip=kFALSE) ; | | PiecewiseInterpolation(const char *name, const char *title, const RooAbsR
eal& nominal, const RooArgList& lowSet, const RooArgList& highSet, const Ro
oArgList& paramSet, Bool_t takeOwnerShip=kFALSE) ; | |
| virtual ~PiecewiseInterpolation() ; | | virtual ~PiecewiseInterpolation() ; | |
| | | | |
| PiecewiseInterpolation(const PiecewiseInterpolation& other, const char* n
ame = 0); | | PiecewiseInterpolation(const PiecewiseInterpolation& other, const char* n
ame = 0); | |
| virtual TObject* clone(const char* newname) const { return new PiecewiseI
nterpolation(*this, newname); } | | virtual TObject* clone(const char* newname) const { return new PiecewiseI
nterpolation(*this, newname); } | |
| | | | |
| // virtual Double_t defaultErrorLevel() const ; | | // virtual Double_t defaultErrorLevel() const ; | |
| | | | |
|
| // void printMetaArgs(ostream& os) const ; | | // void printMetaArgs(std::ostream& os) const ; | |
| | | | |
| const RooArgList& lowList() const { return _lowSet ; } | | const RooArgList& lowList() const { return _lowSet ; } | |
| const RooArgList& highList() const { return _highSet ; } | | const RooArgList& highList() const { return _highSet ; } | |
| const RooArgList& paramList() const { return _paramSet ; } | | const RooArgList& paramList() const { return _paramSet ; } | |
| | | | |
| virtual Bool_t forceAnalyticalInt(const RooAbsArg&) const { return kTRUE
; } | | virtual Bool_t forceAnalyticalInt(const RooAbsArg&) const { return kTRUE
; } | |
| Bool_t setBinIntegrator(RooArgSet& allVars) ; | | Bool_t setBinIntegrator(RooArgSet& allVars) ; | |
| | | | |
| Int_t getAnalyticalIntegralWN(RooArgSet& allVars, RooArgSet& analVars, co
nst RooArgSet* normSet,const char* rangeName=0) const ; | | Int_t getAnalyticalIntegralWN(RooArgSet& allVars, RooArgSet& analVars, co
nst RooArgSet* normSet,const char* rangeName=0) const ; | |
| Double_t analyticalIntegralWN(Int_t code, const RooArgSet* normSet, const
char* rangeName=0) const ; | | Double_t analyticalIntegralWN(Int_t code, const RooArgSet* normSet, const
char* rangeName=0) const ; | |
| | | | |
| skipping to change at line 77 | | skipping to change at line 77 | |
| virtual ~CacheElem() {} ; | | virtual ~CacheElem() {} ; | |
| virtual RooArgList containedArgs(Action) { | | virtual RooArgList containedArgs(Action) { | |
| RooArgList ret(_funcIntList) ; | | RooArgList ret(_funcIntList) ; | |
| ret.add(_lowIntList); | | ret.add(_lowIntList); | |
| ret.add(_highIntList); | | ret.add(_highIntList); | |
| return ret ; | | return ret ; | |
| } | | } | |
| RooArgList _funcIntList ; | | RooArgList _funcIntList ; | |
| RooArgList _lowIntList ; | | RooArgList _lowIntList ; | |
| RooArgList _highIntList ; | | RooArgList _highIntList ; | |
|
| // will want vector<RooRealVar*> for low and high also | | // will want std::vector<RooRealVar*> for low and high also | |
| } ; | | } ; | |
| mutable RooObjCacheManager _normIntMgr ; // The integration cache manager | | mutable RooObjCacheManager _normIntMgr ; // The integration cache manager | |
| | | | |
| RooRealProxy _nominal; // The nominal value | | RooRealProxy _nominal; // The nominal value | |
| RooArgList _ownedList ; // List of owned components | | RooArgList _ownedList ; // List of owned components | |
| RooListProxy _lowSet ; // Low-side variation | | RooListProxy _lowSet ; // Low-side variation | |
| RooListProxy _highSet ; // High-side varaition | | RooListProxy _highSet ; // High-side varaition | |
| RooListProxy _paramSet ; // interpolation parameters | | RooListProxy _paramSet ; // interpolation parameters | |
| RooListProxy _normSet ; // interpolation parameters | | RooListProxy _normSet ; // interpolation parameters | |
| Bool_t _positiveDefinite; // protect against negative and 0 bins. | | Bool_t _positiveDefinite; // protect against negative and 0 bins. | |
| | | | |
End of changes. 2 change blocks. |
| 2 lines changed or deleted | | 2 lines changed or added | |
|
| RooAbsArg.h | | RooAbsArg.h | |
| | | | |
| skipping to change at line 71 | | skipping to change at line 71 | |
| virtual TObject* clone(const char* newname) const = 0 ; | | virtual TObject* clone(const char* newname) const = 0 ; | |
| virtual TObject* Clone(const char* newname=0) const { | | virtual TObject* Clone(const char* newname=0) const { | |
| return clone(newname?newname:GetName()) ; | | return clone(newname?newname:GetName()) ; | |
| } | | } | |
| virtual RooAbsArg* cloneTree(const char* newname=0) const ; | | virtual RooAbsArg* cloneTree(const char* newname=0) const ; | |
| | | | |
| // Accessors to client-server relation information | | // Accessors to client-server relation information | |
| virtual Bool_t isDerived() const { | | virtual Bool_t isDerived() const { | |
| // Does value or shape of this arg depend on any other arg? | | // Does value or shape of this arg depend on any other arg? | |
| return kTRUE ; | | return kTRUE ; | |
|
| //cout << IsA()->GetName() << "::isDerived(" << GetName() << ") = " <<
(_serverList.GetSize()>0 || _proxyList.GetSize()>0) << endl ; | | //std::cout << IsA()->GetName() << "::isDerived(" << GetName() << ") =
" << (_serverList.GetSize()>0 || _proxyList.GetSize()>0) << std::endl ; | |
| //return (_serverList.GetSize()>0 || _proxyList.GetSize()>0)?kTRUE:kFAL
SE; | | //return (_serverList.GetSize()>0 || _proxyList.GetSize()>0)?kTRUE:kFAL
SE; | |
| } | | } | |
| Bool_t isCloneOf(const RooAbsArg& other) const ; | | Bool_t isCloneOf(const RooAbsArg& other) const ; | |
| Bool_t dependsOnValue(const RooAbsCollection& serverList, const RooAbsArg
* ignoreArg=0) const { | | Bool_t dependsOnValue(const RooAbsCollection& serverList, const RooAbsArg
* ignoreArg=0) const { | |
| // Does this arg depend on the value of any of of the values in serverL
ist? | | // Does this arg depend on the value of any of of the values in serverL
ist? | |
| return dependsOn(serverList,ignoreArg,kTRUE) ; | | return dependsOn(serverList,ignoreArg,kTRUE) ; | |
| } | | } | |
| Bool_t dependsOnValue(const RooAbsArg& server, const RooAbsArg* ignoreArg
=0) const { | | Bool_t dependsOnValue(const RooAbsArg& server, const RooAbsArg* ignoreArg
=0) const { | |
| // Does this arg depend on the value of server? | | // Does this arg depend on the value of server? | |
| return dependsOn(server,ignoreArg,kTRUE) ; | | return dependsOn(server,ignoreArg,kTRUE) ; | |
| | | | |
| skipping to change at line 209 | | skipping to change at line 209 | |
| inline Bool_t dependentOverlaps(const RooAbsData* dset, const RooAbsArg&
testArg) const { return observableOverlaps(dset,testArg) ; } | | inline Bool_t dependentOverlaps(const RooAbsData* dset, const RooAbsArg&
testArg) const { return observableOverlaps(dset,testArg) ; } | |
| inline Bool_t dependentOverlaps(const RooArgSet* depList, const RooAbsArg
& testArg) const { return observableOverlaps(depList, testArg) ; } | | inline Bool_t dependentOverlaps(const RooArgSet* depList, const RooAbsArg
& testArg) const { return observableOverlaps(depList, testArg) ; } | |
| inline Bool_t checkDependents(const RooArgSet* nset) const { return check
Observables(nset) ; } | | inline Bool_t checkDependents(const RooArgSet* nset) const { return check
Observables(nset) ; } | |
| inline Bool_t recursiveCheckDependents(const RooArgSet* nset) const { ret
urn recursiveCheckObservables(nset) ; } | | inline Bool_t recursiveCheckDependents(const RooArgSet* nset) const { ret
urn recursiveCheckObservables(nset) ; } | |
| // --- End obsolete functions for backward compatibility | | // --- End obsolete functions for backward compatibility | |
| | | | |
| void attachDataSet(const RooAbsData &set); | | void attachDataSet(const RooAbsData &set); | |
| void attachDataStore(const RooAbsDataStore &set); | | void attachDataStore(const RooAbsDataStore &set); | |
| | | | |
| // I/O streaming interface (machine readable) | | // I/O streaming interface (machine readable) | |
|
| virtual Bool_t readFromStream(istream& is, Bool_t compact, Bool_t verbose | | virtual Bool_t readFromStream(std::istream& is, Bool_t compact, Bool_t ve | |
| =kFALSE) = 0 ; | | rbose=kFALSE) = 0 ; | |
| virtual void writeToStream(ostream& os, Bool_t compact) const = 0 ; | | virtual void writeToStream(std::ostream& os, Bool_t compact) const = 0 ; | |
| | | | |
| inline virtual void Print(Option_t *options= 0) const { | | inline virtual void Print(Option_t *options= 0) const { | |
| // Printing interface (human readable) | | // Printing interface (human readable) | |
| printStream(defaultPrintStream(),defaultPrintContents(options),defaultP
rintStyle(options)); | | printStream(defaultPrintStream(),defaultPrintContents(options),defaultP
rintStyle(options)); | |
| } | | } | |
| | | | |
|
| virtual void printName(ostream& os) const ; | | virtual void printName(std::ostream& os) const ; | |
| virtual void printTitle(ostream& os) const ; | | virtual void printTitle(std::ostream& os) const ; | |
| virtual void printClassName(ostream& os) const ; | | virtual void printClassName(std::ostream& os) const ; | |
| virtual void printAddress(ostream& os) const ; | | virtual void printAddress(std::ostream& os) const ; | |
| virtual void printArgs(ostream& os) const ; | | virtual void printArgs(std::ostream& os) const ; | |
| virtual void printMetaArgs(ostream& /*os*/) const {} ; | | virtual void printMetaArgs(std::ostream& /*os*/) const {} ; | |
| virtual void printMultiline(ostream& os, Int_t contents, Bool_t verbose=k | | virtual void printMultiline(std::ostream& os, Int_t contents, Bool_t verb | |
| FALSE, TString indent="") const; | | ose=kFALSE, TString indent="") const; | |
| virtual void printTree(ostream& os, TString indent="") const ; | | virtual void printTree(std::ostream& os, TString indent="") const ; | |
| | | | |
| virtual Int_t defaultPrintContents(Option_t* opt) const ; | | virtual Int_t defaultPrintContents(Option_t* opt) const ; | |
| | | | |
| // Accessors to attributes | | // Accessors to attributes | |
| void setAttribute(const Text_t* name, Bool_t value=kTRUE) ; | | void setAttribute(const Text_t* name, Bool_t value=kTRUE) ; | |
| Bool_t getAttribute(const Text_t* name) const ; | | Bool_t getAttribute(const Text_t* name) const ; | |
| inline const std::set<std::string>& attributes() const { | | inline const std::set<std::string>& attributes() const { | |
| // Returns set of names of boolean attributes defined | | // Returns set of names of boolean attributes defined | |
| return _boolAttrib ; | | return _boolAttrib ; | |
| } | | } | |
| | | | |
| void setStringAttribute(const Text_t* key, const Text_t* value) ; | | void setStringAttribute(const Text_t* key, const Text_t* value) ; | |
| const Text_t* getStringAttribute(const Text_t* key) const ; | | const Text_t* getStringAttribute(const Text_t* key) const ; | |
| inline const std::map<std::string,std::string>& stringAttributes() const
{ | | inline const std::map<std::string,std::string>& stringAttributes() const
{ | |
|
| // Returns map<string,string> with all string attributes defined | | // Returns std::map<string,string> with all string attributes defined | |
| return _stringAttrib ; | | return _stringAttrib ; | |
| } | | } | |
| | | | |
| // Accessors to transient attributes | | // Accessors to transient attributes | |
| void setTransientAttribute(const Text_t* name, Bool_t value=kTRUE) ; | | void setTransientAttribute(const Text_t* name, Bool_t value=kTRUE) ; | |
| Bool_t getTransientAttribute(const Text_t* name) const ; | | Bool_t getTransientAttribute(const Text_t* name) const ; | |
| inline const std::set<std::string>& transientAttributes() const { | | inline const std::set<std::string>& transientAttributes() const { | |
| // Return set of transient boolean attributes | | // Return set of transient boolean attributes | |
| return _boolAttribTransient ; | | return _boolAttribTransient ; | |
| } | | } | |
| | | | |
| skipping to change at line 298 | | skipping to change at line 298 | |
| virtual void optimizeCacheMode(const RooArgSet& observables, RooArgSet& o
ptNodes, RooLinkedList& processedNodes) ; | | virtual void optimizeCacheMode(const RooArgSet& observables, RooArgSet& o
ptNodes, RooLinkedList& processedNodes) ; | |
| | | | |
| // Find constant terms in expression | | // Find constant terms in expression | |
| Bool_t findConstantNodes(const RooArgSet& observables, RooArgSet& cacheLi
st) ; | | Bool_t findConstantNodes(const RooArgSet& observables, RooArgSet& cacheLi
st) ; | |
| Bool_t findConstantNodes(const RooArgSet& observables, RooArgSet& cacheLi
st, RooLinkedList& processedNodes) ; | | Bool_t findConstantNodes(const RooArgSet& observables, RooArgSet& cacheLi
st, RooLinkedList& processedNodes) ; | |
| | | | |
| // constant term optimization | | // constant term optimization | |
| virtual void constOptimizeTestStatistic(ConstOpCode opcode, Bool_t doAlso
TrackingOpt=kTRUE) ; | | virtual void constOptimizeTestStatistic(ConstOpCode opcode, Bool_t doAlso
TrackingOpt=kTRUE) ; | |
| | | | |
| void graphVizTree(const char* fileName, const char* delimiter="\n", bool
useTitle=false, bool useLatex=false) ; | | void graphVizTree(const char* fileName, const char* delimiter="\n", bool
useTitle=false, bool useLatex=false) ; | |
|
| void graphVizTree(ostream& os, const char* delimiter="\n", bool useTitle=
false, bool useLatex=false) ; | | void graphVizTree(std::ostream& os, const char* delimiter="\n", bool useT
itle=false, bool useLatex=false) ; | |
| | | | |
| /* TGraphStruct* graph(Bool_t useFactoryTag=kFALSE, Double_t textSize=0.0
3) ; */ | | /* TGraphStruct* graph(Bool_t useFactoryTag=kFALSE, Double_t textSize=0.0
3) ; */ | |
| | | | |
| void printComponentTree(const char* indent="",const char* namePat=0, Int_
t nLevel=999) ; | | void printComponentTree(const char* indent="",const char* namePat=0, Int_
t nLevel=999) ; | |
| void printCompactTree(const char* indent="",const char* fileName=0, const
char* namePat=0, RooAbsArg* client=0) ; | | void printCompactTree(const char* indent="",const char* fileName=0, const
char* namePat=0, RooAbsArg* client=0) ; | |
|
| void printCompactTree(ostream& os, const char* indent="", const char* nam | | void printCompactTree(std::ostream& os, const char* indent="", const char | |
| ePat=0, RooAbsArg* client=0) ; | | * namePat=0, RooAbsArg* client=0) ; | |
| virtual void printCompactTreeHook(ostream& os, const char *ind="") ; | | virtual void printCompactTreeHook(std::ostream& os, const char *ind="") ; | |
| | | | |
| // Dirty state accessor | | // Dirty state accessor | |
| inline Bool_t isShapeDirty() const { | | inline Bool_t isShapeDirty() const { | |
| // Return true is shape has been invalidated by server value change | | // Return true is shape has been invalidated by server value change | |
| return isDerived()?_shapeDirty:kFALSE ; | | return isDerived()?_shapeDirty:kFALSE ; | |
| } | | } | |
| | | | |
| inline Bool_t isValueDirty() const { | | inline Bool_t isValueDirty() const { | |
| // Returns true of value has been invalidated by server value change | | // Returns true of value has been invalidated by server value change | |
| if (inhibitDirty()) return kTRUE ; | | if (inhibitDirty()) return kTRUE ; | |
| | | | |
| skipping to change at line 493 | | skipping to change at line 493 | |
| void unRegisterProxy(RooListProxy& proxy) ; | | void unRegisterProxy(RooListProxy& proxy) ; | |
| RooAbsProxy* getProxy(Int_t index) const ; | | RooAbsProxy* getProxy(Int_t index) const ; | |
| void setProxyNormSet(const RooArgSet* nset) ; | | void setProxyNormSet(const RooArgSet* nset) ; | |
| Int_t numProxies() const ; | | Int_t numProxies() const ; | |
| | | | |
| // Attribute list | | // Attribute list | |
| std::set<std::string> _boolAttrib ; // Boolean attributes | | std::set<std::string> _boolAttrib ; // Boolean attributes | |
| std::map<std::string,std::string> _stringAttrib ; // String attributes | | std::map<std::string,std::string> _stringAttrib ; // String attributes | |
| std::set<std::string> _boolAttribTransient ; //! Transient boolean attrib
utes (not copied in ctor) | | std::set<std::string> _boolAttribTransient ; //! Transient boolean attrib
utes (not copied in ctor) | |
| | | | |
|
| void printAttribList(ostream& os) const; | | void printAttribList(std::ostream& os) const; | |
| | | | |
| // Hooks for RooTreeData interface | | // Hooks for RooTreeData interface | |
| friend class RooCompositeDataStore ; | | friend class RooCompositeDataStore ; | |
| friend class RooTreeDataStore ; | | friend class RooTreeDataStore ; | |
| friend class RooVectorDataStore ; | | friend class RooVectorDataStore ; | |
| friend class RooTreeData ; | | friend class RooTreeData ; | |
| friend class RooDataSet ; | | friend class RooDataSet ; | |
| friend class RooRealMPFE ; | | friend class RooRealMPFE ; | |
| virtual void syncCache(const RooArgSet* nset=0) = 0 ; | | virtual void syncCache(const RooArgSet* nset=0) = 0 ; | |
| virtual void copyCache(const RooAbsArg* source, Bool_t valueOnly=kFALSE,
Bool_t setValDirty=kTRUE) = 0 ; | | virtual void copyCache(const RooAbsArg* source, Bool_t valueOnly=kFALSE,
Bool_t setValDirty=kTRUE) = 0 ; | |
| | | | |
| virtual void attachToTree(TTree& t, Int_t bufSize=32000) = 0 ; | | virtual void attachToTree(TTree& t, Int_t bufSize=32000) = 0 ; | |
| virtual void attachToVStore(RooVectorDataStore& vstore) = 0 ; | | virtual void attachToVStore(RooVectorDataStore& vstore) = 0 ; | |
| void attachToStore(RooAbsDataStore& store) ; | | void attachToStore(RooAbsDataStore& store) ; | |
| | | | |
| virtual void setTreeBranchStatus(TTree& t, Bool_t active) = 0 ; | | virtual void setTreeBranchStatus(TTree& t, Bool_t active) = 0 ; | |
| virtual void fillTreeBranch(TTree& t) = 0 ; | | virtual void fillTreeBranch(TTree& t) = 0 ; | |
| TString cleanBranchName() const ; | | TString cleanBranchName() const ; | |
| | | | |
| // Global | | // Global | |
|
| friend ostream& operator<<(ostream& os, const RooAbsArg &arg); | | friend std::ostream& operator<<(std::ostream& os, const RooAbsArg &arg); | |
| friend istream& operator>>(istream& is, RooAbsArg &arg) ; | | friend std::istream& operator>>(std::istream& is, RooAbsArg &arg) ; | |
| | | | |
| // Debug stuff | | // Debug stuff | |
| static Bool_t _verboseDirty ; // Static flag controlling verbose messagin
g for dirty state changes | | static Bool_t _verboseDirty ; // Static flag controlling verbose messagin
g for dirty state changes | |
| static Bool_t _inhibitDirty ; // Static flag controlling global inhibit o
f dirty state propagation | | static Bool_t _inhibitDirty ; // Static flag controlling global inhibit o
f dirty state propagation | |
| Bool_t _deleteWatch ; //! Delete watch flag | | Bool_t _deleteWatch ; //! Delete watch flag | |
| | | | |
| static Bool_t inhibitDirty() ; | | static Bool_t inhibitDirty() ; | |
| | | | |
| // Value and Shape dirty state bits | | // Value and Shape dirty state bits | |
| void setValueDirty(const RooAbsArg* source) const ; | | void setValueDirty(const RooAbsArg* source) const ; | |
| | | | |
| skipping to change at line 546 | | skipping to change at line 546 | |
| | | | |
| mutable Bool_t _prohibitServerRedirect ; //! Prohibit server redirects --
Debugging tool | | mutable Bool_t _prohibitServerRedirect ; //! Prohibit server redirects --
Debugging tool | |
| | | | |
| mutable RooExpensiveObjectCache* _eocache ; // Pointer to global cache ma
nager for any expensive components created by this object | | mutable RooExpensiveObjectCache* _eocache ; // Pointer to global cache ma
nager for any expensive components created by this object | |
| | | | |
| mutable TNamed* _namePtr ; //! Do not persist. Pointer to global instance
of string that matches object named | | mutable TNamed* _namePtr ; //! Do not persist. Pointer to global instance
of string that matches object named | |
| | | | |
| ClassDef(RooAbsArg,5) // Abstract variable | | ClassDef(RooAbsArg,5) // Abstract variable | |
| }; | | }; | |
| | | | |
|
| ostream& operator<<(ostream& os, const RooAbsArg &arg); | | std::ostream& operator<<(std::ostream& os, const RooAbsArg &arg); | |
| istream& operator>>(istream& is, RooAbsArg &arg) ; | | std::istream& operator>>(std::istream& is, RooAbsArg &arg) ; | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 9 change blocks. |
| 23 lines changed or deleted | | 23 lines changed or added | |
|
| RooAbsCollection.h | | RooAbsCollection.h | |
| | | | |
| skipping to change at line 121 | | skipping to change at line 121 | |
| // Return the first element in this collection | | // Return the first element in this collection | |
| return (RooAbsArg*)_list.First(); | | return (RooAbsArg*)_list.First(); | |
| } | | } | |
| | | | |
| inline virtual void Print(Option_t *options= 0) const { | | inline virtual void Print(Option_t *options= 0) const { | |
| // Printing interface (human readable) | | // Printing interface (human readable) | |
| printStream(defaultPrintStream(),defaultPrintContents(options),defaultP
rintStyle(options)); | | printStream(defaultPrintStream(),defaultPrintContents(options),defaultP
rintStyle(options)); | |
| } | | } | |
| std::string contentsString() const ; | | std::string contentsString() const ; | |
| | | | |
|
| virtual void printName(ostream& os) const ; | | virtual void printName(std::ostream& os) const ; | |
| virtual void printTitle(ostream& os) const ; | | virtual void printTitle(std::ostream& os) const ; | |
| virtual void printClassName(ostream& os) const ; | | virtual void printClassName(std::ostream& os) const ; | |
| virtual void printValue(ostream& os) const ; | | virtual void printValue(std::ostream& os) const ; | |
| virtual void printMultiline(ostream& os, Int_t contents, Bool_t verbose=k | | virtual void printMultiline(std::ostream& os, Int_t contents, Bool_t verb | |
| FALSE, TString indent="") const ; | | ose=kFALSE, TString indent="") const ; | |
| | | | |
| virtual Int_t defaultPrintContents(Option_t* opt) const ; | | virtual Int_t defaultPrintContents(Option_t* opt) const ; | |
| | | | |
| // Latex printing methods | | // Latex printing methods | |
| void printLatex(const RooCmdArg& arg1=RooCmdArg(), const RooCmdArg& arg2=
RooCmdArg(), | | void printLatex(const RooCmdArg& arg1=RooCmdArg(), const RooCmdArg& arg2=
RooCmdArg(), | |
| const RooCmdArg& arg3=RooCmdArg(), const RooCmdArg& arg4=R
ooCmdArg(), | | const RooCmdArg& arg3=RooCmdArg(), const RooCmdArg& arg4=R
ooCmdArg(), | |
| const RooCmdArg& arg5=RooCmdArg(), const RooCmdArg& arg6=R
ooCmdArg(), | | const RooCmdArg& arg5=RooCmdArg(), const RooCmdArg& arg6=R
ooCmdArg(), | |
| const RooCmdArg& arg7=RooCmdArg(), const RooCmdArg& arg8=R
ooCmdArg()) const ; | | const RooCmdArg& arg7=RooCmdArg(), const RooCmdArg& arg8=R
ooCmdArg()) const ; | |
|
| void printLatex(ostream& ofs, Int_t ncol, const char* option="NEYU", Int_
t sigDigit=1, | | void printLatex(std::ostream& ofs, Int_t ncol, const char* option="NEYU",
Int_t sigDigit=1, | |
| const RooLinkedList& siblingLists=RooLinkedList(), const
RooCmdArg* formatCmd=0) const ; | | const RooLinkedList& siblingLists=RooLinkedList(), const
RooCmdArg* formatCmd=0) const ; | |
| | | | |
| void setName(const char *name) { | | void setName(const char *name) { | |
| // Set name of collection | | // Set name of collection | |
| _name= name; | | _name= name; | |
| } | | } | |
| const char* GetName() const { | | const char* GetName() const { | |
| // Return namer of collection | | // Return namer of collection | |
| return _name.Data() ; | | return _name.Data() ; | |
| } | | } | |
| | | | |
End of changes. 2 change blocks. |
| 7 lines changed or deleted | | 7 lines changed or added | |
|
| RooAbsDataStore.h | | RooAbsDataStore.h | |
| /**************************************************************************
*** | | /**************************************************************************
*** | |
| * Project: RooFit
* | | * Project: RooFit
* | |
| * Package: RooFitCore
* | | * Package: RooFitCore
* | |
|
| * File: $Id: RooAbsDataStore.h 42950 2012-02-09 21:21:53Z wouter $ | | * File: $Id: RooAbsDataStore.h 44982 2012-07-10 08:36:13Z moneta $ | |
| * 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 87 | | skipping to change at line 87 | |
| virtual void resetBuffers() = 0 ; | | virtual void resetBuffers() = 0 ; | |
| | | | |
| virtual void setExternalWeightArray(Double_t* /*arrayWgt*/, Double_t* /*a
rrayWgtErrLo*/, Double_t* /*arrayWgtErrHi*/, Double_t* /*arraySumW2*/) {} ; | | virtual void setExternalWeightArray(Double_t* /*arrayWgt*/, Double_t* /*a
rrayWgtErrLo*/, Double_t* /*arrayWgtErrHi*/, Double_t* /*arraySumW2*/) {} ; | |
| | | | |
| // Printing interface (human readable) | | // Printing interface (human readable) | |
| inline virtual void Print(Option_t *options= 0) const { | | inline virtual void Print(Option_t *options= 0) const { | |
| // Print contents on stdout | | // Print contents on stdout | |
| printStream(defaultPrintStream(),defaultPrintContents(options),defaultP
rintStyle(options)); | | printStream(defaultPrintStream(),defaultPrintContents(options),defaultP
rintStyle(options)); | |
| } | | } | |
| | | | |
|
| virtual void printName(ostream& os) const ; | | virtual void printName(std::ostream& os) const ; | |
| virtual void printTitle(ostream& os) const ; | | virtual void printTitle(std::ostream& os) const ; | |
| virtual void printClassName(ostream& os) const ; | | virtual void printClassName(std::ostream& os) const ; | |
| virtual void printArgs(ostream& os) const ; | | virtual void printArgs(std::ostream& os) const ; | |
| virtual void printValue(ostream& os) const ; | | virtual void printValue(std::ostream& os) const ; | |
| void printMultiline(ostream& os, Int_t content, Bool_t verbose, TString i | | void printMultiline(std::ostream& os, Int_t content, Bool_t verbose, TStr | |
| ndent) const ; | | ing indent) const ; | |
| | | | |
| virtual Int_t defaultPrintContents(Option_t* opt) const ; | | virtual Int_t defaultPrintContents(Option_t* opt) const ; | |
| | | | |
| // Constant term optimizer interface | | // Constant term optimizer interface | |
| virtual void cacheArgs(const RooAbsArg* cacheOwner, RooArgSet& varSet, co
nst RooArgSet* nset=0) = 0 ; | | virtual void cacheArgs(const RooAbsArg* cacheOwner, RooArgSet& varSet, co
nst RooArgSet* nset=0) = 0 ; | |
| virtual const RooAbsArg* cacheOwner() = 0 ; | | virtual const RooAbsArg* cacheOwner() = 0 ; | |
| virtual void attachCache(const RooAbsArg* newOwner, const RooArgSet& cach
edVars) = 0 ; | | virtual void attachCache(const RooAbsArg* newOwner, const RooArgSet& cach
edVars) = 0 ; | |
| virtual void setArgStatus(const RooArgSet& set, Bool_t active) = 0 ; | | virtual void setArgStatus(const RooArgSet& set, Bool_t active) = 0 ; | |
| const RooArgSet& cachedVars() const { return _cachedVars ; } | | const RooArgSet& cachedVars() const { return _cachedVars ; } | |
| virtual void resetCache() = 0 ; | | virtual void resetCache() = 0 ; | |
| | | | |
End of changes. 2 change blocks. |
| 8 lines changed or deleted | | 8 lines changed or added | |
|
| RooAbsGenContext.h | | RooAbsGenContext.h | |
| | | | |
| skipping to change at line 32 | | skipping to change at line 32 | |
| #include "RooAbsPdf.h" | | #include "RooAbsPdf.h" | |
| | | | |
| class RooDataSet; | | class RooDataSet; | |
| | | | |
| class RooAbsGenContext : public TNamed, public RooPrintable { | | class RooAbsGenContext : public TNamed, public RooPrintable { | |
| public: | | public: | |
| RooAbsGenContext(const RooAbsPdf &model, const RooArgSet &vars, const Roo
DataSet *prototype= 0, const RooArgSet* auxProto=0, | | RooAbsGenContext(const RooAbsPdf &model, const RooArgSet &vars, const Roo
DataSet *prototype= 0, const RooArgSet* auxProto=0, | |
| Bool_t _verbose= kFALSE) ; | | Bool_t _verbose= kFALSE) ; | |
| virtual ~RooAbsGenContext(); | | virtual ~RooAbsGenContext(); | |
| | | | |
|
| virtual RooDataSet *generate(Int_t nEvents= 0, Bool_t skipInit=kFALSE, Bo
ol_t extendedMode=kFALSE); | | virtual RooDataSet *generate(Double_t nEvents= 0, Bool_t skipInit=kFALSE,
Bool_t extendedMode=kFALSE); | |
| | | | |
| Bool_t isValid() const { | | Bool_t isValid() const { | |
| // If true generator context is in a valid state | | // If true generator context is in a valid state | |
| return _isValid; | | return _isValid; | |
| } | | } | |
| | | | |
| inline void setVerbose(Bool_t verbose= kTRUE) { | | inline void setVerbose(Bool_t verbose= kTRUE) { | |
| // Set/clear verbose messaging | | // Set/clear verbose messaging | |
| _verbose= verbose; | | _verbose= verbose; | |
| } | | } | |
| | | | |
| skipping to change at line 57 | | skipping to change at line 57 | |
| | | | |
| virtual void setProtoDataOrder(Int_t* lut) ; | | virtual void setProtoDataOrder(Int_t* lut) ; | |
| | | | |
| inline virtual void Print(Option_t *options= 0) const { | | inline virtual void Print(Option_t *options= 0) const { | |
| // Print context information on stdout | | // Print context information on stdout | |
| printStream(defaultPrintStream(),defaultPrintContents(options),default
PrintStyle(options)); | | printStream(defaultPrintStream(),defaultPrintContents(options),default
PrintStyle(options)); | |
| } | | } | |
| | | | |
| virtual void attach(const RooArgSet& params) ; | | virtual void attach(const RooArgSet& params) ; | |
| | | | |
|
| virtual void printName(ostream& os) const ; | | virtual void printName(std::ostream& os) const ; | |
| virtual void printTitle(ostream& os) const ; | | virtual void printTitle(std::ostream& os) const ; | |
| virtual void printClassName(ostream& os) const ; | | virtual void printClassName(std::ostream& os) const ; | |
| virtual void printArgs(ostream& os) const ; | | virtual void printArgs(std::ostream& os) const ; | |
| virtual void printMultiline(ostream& os, Int_t contents, Bool_t verbose=k | | virtual void printMultiline(std::ostream& os, Int_t contents, Bool_t verb | |
| FALSE, TString indent="") const; | | ose=kFALSE, TString indent="") const; | |
| | | | |
| virtual Int_t defaultPrintContents(Option_t* opt) const ; | | virtual Int_t defaultPrintContents(Option_t* opt) const ; | |
| virtual StyleOption defaultPrintStyle(Option_t* opt) const ; | | virtual StyleOption defaultPrintStyle(Option_t* opt) const ; | |
| | | | |
| virtual void setExpectedData(Bool_t) {} ; | | virtual void setExpectedData(Bool_t) {} ; | |
| | | | |
| protected: | | protected: | |
| | | | |
| virtual RooDataSet* createDataSet(const char* name, const char* title, co
nst RooArgSet& obs) ; | | virtual RooDataSet* createDataSet(const char* name, const char* title, co
nst RooArgSet& obs) ; | |
| | | | |
| | | | |
End of changes. 2 change blocks. |
| 7 lines changed or deleted | | 7 lines changed or added | |
|
| RooAbsNumGenerator.h | | RooAbsNumGenerator.h | |
| /**************************************************************************
*** | | /**************************************************************************
*** | |
| * Project: RooFit
* | | * Project: RooFit
* | |
| * Package: RooFitCore
* | | * Package: RooFitCore
* | |
|
| * File: $Id: RooAbsNumGenerator.h 36209 2010-10-08 21:37:36Z wouter $ | | * File: $Id: RooAbsNumGenerator.h 44982 2012-07-10 08:36:13Z moneta $ | |
| * 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 60 | | skipping to change at line 60 | |
| } | | } | |
| | | | |
| virtual const RooArgSet *generateEvent(UInt_t remaining, Double_t& resamp
leRatio) = 0; | | virtual const RooArgSet *generateEvent(UInt_t remaining, Double_t& resamp
leRatio) = 0; | |
| virtual Double_t getFuncMax() { return 0 ; } | | virtual Double_t getFuncMax() { return 0 ; } | |
| | | | |
| inline virtual void Print(Option_t *options= 0) const { | | inline virtual void Print(Option_t *options= 0) const { | |
| // ascii printing interface | | // ascii printing interface | |
| printStream(defaultPrintStream(),defaultPrintContents(options),defaultP
rintStyle(options)); | | printStream(defaultPrintStream(),defaultPrintContents(options),defaultP
rintStyle(options)); | |
| } | | } | |
| | | | |
|
| virtual void printName(ostream& os) const ; | | virtual void printName(std::ostream& os) const ; | |
| virtual void printTitle(ostream& os) const ; | | virtual void printTitle(std::ostream& os) const ; | |
| virtual void printClassName(ostream& os) const ; | | virtual void printClassName(std::ostream& os) const ; | |
| virtual void printArgs(ostream& os) const ; | | virtual void printArgs(std::ostream& os) const ; | |
| | | | |
| void attachParameters(const RooArgSet& vars) ; | | void attachParameters(const RooArgSet& vars) ; | |
| | | | |
| // Advertisement of capabilities | | // Advertisement of capabilities | |
| virtual Bool_t canSampleCategories() const { return kFALSE ; } | | virtual Bool_t canSampleCategories() const { return kFALSE ; } | |
| virtual Bool_t canSampleConditional() const { return kFALSE ; } // Must i
mplement getFuncMax() | | virtual Bool_t canSampleConditional() const { return kFALSE ; } // Must i
mplement getFuncMax() | |
| | | | |
| protected: | | protected: | |
| | | | |
| RooArgSet *_cloneSet; // Set owning clone of input functio
n | | RooArgSet *_cloneSet; // Set owning clone of input functio
n | |
| | | | |
End of changes. 2 change blocks. |
| 5 lines changed or deleted | | 5 lines changed or added | |
|
| RooAbsPdf.h | | RooAbsPdf.h | |
| | | | |
| skipping to change at line 60 | | skipping to change at line 60 | |
| | | | |
| // Toy MC generation | | // Toy MC generation | |
| RooDataSet *generate(const RooArgSet &whatVars, Int_t nEvents, const RooC
mdArg& arg1, | | RooDataSet *generate(const RooArgSet &whatVars, Int_t nEvents, const RooC
mdArg& arg1, | |
| const RooCmdArg& arg2=RooCmdArg::none(), const RooCm
dArg& arg3=RooCmdArg::none(), | | const RooCmdArg& arg2=RooCmdArg::none(), const RooCm
dArg& arg3=RooCmdArg::none(), | |
| const RooCmdArg& arg4=RooCmdArg::none(), const RooCm
dArg& arg5=RooCmdArg::none()) ; | | const RooCmdArg& arg4=RooCmdArg::none(), const RooCm
dArg& arg5=RooCmdArg::none()) ; | |
| RooDataSet *generate(const RooArgSet &whatVars, | | RooDataSet *generate(const RooArgSet &whatVars, | |
| const RooCmdArg& arg1=RooCmdArg::none(),const RooCmd
Arg& arg2=RooCmdArg::none(), | | const RooCmdArg& arg1=RooCmdArg::none(),const RooCmd
Arg& arg2=RooCmdArg::none(), | |
| const RooCmdArg& arg3=RooCmdArg::none(),const RooCmd
Arg& arg4=RooCmdArg::none(), | | const RooCmdArg& arg3=RooCmdArg::none(),const RooCmd
Arg& arg4=RooCmdArg::none(), | |
| const RooCmdArg& arg5=RooCmdArg::none(),const RooCmd
Arg& arg6=RooCmdArg::none()) ; | | const RooCmdArg& arg5=RooCmdArg::none(),const RooCmd
Arg& arg6=RooCmdArg::none()) ; | |
| RooDataSet *generate(const RooArgSet &whatVars, Int_t nEvents = 0, Bool_t
verbose=kFALSE, Bool_t autoBinned=kTRUE, | | RooDataSet *generate(const RooArgSet &whatVars, Int_t nEvents = 0, Bool_t
verbose=kFALSE, Bool_t autoBinned=kTRUE, | |
|
| const char* binnedTag="", Bool_t expectedData=kFALSE)
const; | | const char* binnedTag="", Bool_t expectedData=kFALSE,
Bool_t extended = kFALSE) const; | |
| RooDataSet *generate(const RooArgSet &whatVars, const RooDataSet &prototy
pe, Int_t nEvents= 0, | | RooDataSet *generate(const RooArgSet &whatVars, const RooDataSet &prototy
pe, Int_t nEvents= 0, | |
| Bool_t verbose=kFALSE, Bool_t randProtoOrder=kFALSE,
Bool_t resampleProto=kFALSE) const; | | Bool_t verbose=kFALSE, Bool_t randProtoOrder=kFALSE,
Bool_t resampleProto=kFALSE) const; | |
| | | | |
| class GenSpec { | | class GenSpec { | |
| public: | | public: | |
| virtual ~GenSpec() ; | | virtual ~GenSpec() ; | |
| GenSpec() { _genContext = 0 ; _protoData = 0 ; _init = kFALSE ; _extend
ed=kFALSE, _nGen=0 ; _randProto = kFALSE ; _resampleProto=kFALSE ; } | | GenSpec() { _genContext = 0 ; _protoData = 0 ; _init = kFALSE ; _extend
ed=kFALSE, _nGen=0 ; _randProto = kFALSE ; _resampleProto=kFALSE ; } | |
| private: | | private: | |
| GenSpec(RooAbsGenContext* context, const RooArgSet& whatVars, RooDataSe
t* protoData, Int_t nGen, Bool_t extended, | | GenSpec(RooAbsGenContext* context, const RooArgSet& whatVars, RooDataSe
t* protoData, Int_t nGen, Bool_t extended, | |
| Bool_t randProto, Bool_t resampleProto, TString dsetName, Bool_t
init=kFALSE) ; | | Bool_t randProto, Bool_t resampleProto, TString dsetName, Bool_t
init=kFALSE) ; | |
| | | | |
| skipping to change at line 227 | | skipping to change at line 227 | |
| // If true p.d.f must extended likelihood term | | // If true p.d.f must extended likelihood term | |
| return (extendMode() == MustBeExtended) ; | | return (extendMode() == MustBeExtended) ; | |
| } | | } | |
| virtual Double_t expectedEvents(const RooArgSet* nset) const ; | | virtual Double_t expectedEvents(const RooArgSet* nset) const ; | |
| virtual Double_t expectedEvents(const RooArgSet& nset) const { | | virtual Double_t expectedEvents(const RooArgSet& nset) const { | |
| // Return expecteded number of p.d.fs to be used in calculated of exten
ded likelihood | | // Return expecteded number of p.d.fs to be used in calculated of exten
ded likelihood | |
| return expectedEvents(&nset) ; | | return expectedEvents(&nset) ; | |
| } | | } | |
| | | | |
| // Printing interface (human readable) | | // Printing interface (human readable) | |
|
| virtual void printValue(ostream& os) const ; | | virtual void printValue(std::ostream& os) const ; | |
| virtual void printMultiline(ostream& os, Int_t contents, Bool_t verbose=k | | virtual void printMultiline(std::ostream& os, Int_t contents, Bool_t verb | |
| FALSE, TString indent="") const ; | | ose=kFALSE, TString indent="") const ; | |
| | | | |
| static void verboseEval(Int_t stat) ; | | static void verboseEval(Int_t stat) ; | |
| static int verboseEval() ; | | static int verboseEval() ; | |
| | | | |
| virtual Double_t extendedTerm(Double_t observedEvents, const RooArgSet* n
set=0) const ; | | virtual Double_t extendedTerm(Double_t observedEvents, const RooArgSet* n
set=0) const ; | |
| | | | |
| static void clearEvalError() ; | | static void clearEvalError() ; | |
| static Bool_t evalError() ; | | static Bool_t evalError() ; | |
| | | | |
| void setNormRange(const char* rangeName) ; | | void setNormRange(const char* rangeName) ; | |
| | | | |
End of changes. 2 change blocks. |
| 4 lines changed or deleted | | 4 lines changed or added | |
|
| RooAbsReal.h | | RooAbsReal.h | |
| | | | |
| skipping to change at line 65 | | skipping to change at line 65 | |
| // Constructors, assignment etc | | // Constructors, assignment etc | |
| RooAbsReal() ; | | RooAbsReal() ; | |
| RooAbsReal(const char *name, const char *title, const char *unit= "") ; | | RooAbsReal(const char *name, const char *title, const char *unit= "") ; | |
| RooAbsReal(const char *name, const char *title, Double_t minVal, Double_t
maxVal, | | RooAbsReal(const char *name, const char *title, Double_t minVal, Double_t
maxVal, | |
| const char *unit= "") ; | | const char *unit= "") ; | |
| RooAbsReal(const RooAbsReal& other, const char* name=0); | | RooAbsReal(const RooAbsReal& other, const char* name=0); | |
| virtual ~RooAbsReal(); | | virtual ~RooAbsReal(); | |
| | | | |
| // Return value and unit accessors | | // Return value and unit accessors | |
| inline Double_t getVal(const RooArgSet* set=0) const { | | inline Double_t getVal(const RooArgSet* set=0) const { | |
|
| /* if (_fast && !_inhibitDirty) cout << "RooAbsReal::getVal(" << GetName
() << ") CLEAN value = " << _value << endl ; */ | | /* if (_fast && !_inhibitDirty) std::cout << "RooAbsReal::getVal(" << Ge
tName() << ") CLEAN value = " << _value << std::endl ; */ | |
| #ifndef _WIN32 | | #ifndef _WIN32 | |
| return (_fast && !_inhibitDirty) ? _value : getValV(set) ; | | return (_fast && !_inhibitDirty) ? _value : getValV(set) ; | |
| #else | | #else | |
| return (_fast && !inhibitDirty()) ? _value : getValV(set) ; | | return (_fast && !inhibitDirty()) ? _value : getValV(set) ; | |
| #endif | | #endif | |
| } | | } | |
| inline Double_t getVal(const RooArgSet& set) const { return _fast ? _val
ue : getValV(&set) ; } | | inline Double_t getVal(const RooArgSet& set) const { return _fast ? _val
ue : getValV(&set) ; } | |
| | | | |
| virtual Double_t getValV(const RooArgSet* set=0) const ; | | virtual Double_t getValV(const RooArgSet* set=0) const ; | |
| | | | |
| | | | |
| skipping to change at line 232 | | skipping to change at line 232 | |
| const RooCmdArg& arg1=RooCmdArg::none(), const RooCm
dArg& arg2=RooCmdArg::none(), | | const RooCmdArg& arg1=RooCmdArg::none(), const RooCm
dArg& arg2=RooCmdArg::none(), | |
| const RooCmdArg& arg3=RooCmdArg::none(), const RooCm
dArg& arg4=RooCmdArg::none(), | | const RooCmdArg& arg3=RooCmdArg::none(), const RooCm
dArg& arg4=RooCmdArg::none(), | |
| const RooCmdArg& arg5=RooCmdArg::none(), const RooCm
dArg& arg6=RooCmdArg::none(), | | const RooCmdArg& arg5=RooCmdArg::none(), const RooCm
dArg& arg6=RooCmdArg::none(), | |
| const RooCmdArg& arg7=RooCmdArg::none(), const RooCm
dArg& arg8=RooCmdArg::none()) const ; | | const RooCmdArg& arg7=RooCmdArg::none(), const RooCm
dArg& arg8=RooCmdArg::none()) const ; | |
| | | | |
| // Fill a RooDataHist | | // Fill a RooDataHist | |
| RooDataHist* fillDataHist(RooDataHist *hist, const RooArgSet* nset, Doubl
e_t scaleFactor, | | RooDataHist* fillDataHist(RooDataHist *hist, const RooArgSet* nset, Doubl
e_t scaleFactor, | |
| Bool_t correctForBinVolume=kFALSE, Bool_t showPr
ogress=kFALSE) const ; | | Bool_t correctForBinVolume=kFALSE, Bool_t showPr
ogress=kFALSE) const ; | |
| | | | |
| // I/O streaming interface (machine readable) | | // I/O streaming interface (machine readable) | |
|
| virtual Bool_t readFromStream(istream& is, Bool_t compact, Bool_t verbose | | virtual Bool_t readFromStream(std::istream& is, Bool_t compact, Bool_t ve | |
| =kFALSE) ; | | rbose=kFALSE) ; | |
| virtual void writeToStream(ostream& os, Bool_t compact) const ; | | virtual void writeToStream(std::ostream& os, Bool_t compact) const ; | |
| | | | |
| // Printing interface (human readable) | | // Printing interface (human readable) | |
|
| virtual void printValue(ostream& os) const ; | | virtual void printValue(std::ostream& os) const ; | |
| virtual void printMultiline(ostream& os, Int_t contents, Bool_t verbose=k | | virtual void printMultiline(std::ostream& os, Int_t contents, Bool_t verb | |
| FALSE, TString indent="") const ; | | ose=kFALSE, TString indent="") const ; | |
| | | | |
| static void setCacheCheck(Bool_t flag) ; | | static void setCacheCheck(Bool_t flag) ; | |
| | | | |
| // Evaluation error logging | | // Evaluation error logging | |
| class EvalError { | | class EvalError { | |
| public: | | public: | |
| EvalError() { _msg[0] = 0 ; _srvval[0] = 0 ; } | | EvalError() { _msg[0] = 0 ; _srvval[0] = 0 ; } | |
| EvalError(const EvalError& other) { strlcpy(_msg,other._msg,1024) ; str
lcpy(_srvval,other._srvval,1024) ; } ; | | EvalError(const EvalError& other) { strlcpy(_msg,other._msg,1024) ; str
lcpy(_srvval,other._srvval,1024) ; } ; | |
| void setMessage(const char* tmp) ; | | void setMessage(const char* tmp) ; | |
| void setServerValues(const char* tmp) ; | | void setServerValues(const char* tmp) ; | |
| char _msg[1024] ; | | char _msg[1024] ; | |
| char _srvval[1024] ; | | char _srvval[1024] ; | |
| } ; | | } ; | |
| | | | |
| enum ErrorLoggingMode { PrintErrors, CollectErrors, CountErrors, Ignore }
; | | enum ErrorLoggingMode { PrintErrors, CollectErrors, CountErrors, Ignore }
; | |
| static ErrorLoggingMode evalErrorLoggingMode() ; | | static ErrorLoggingMode evalErrorLoggingMode() ; | |
| static void setEvalErrorLoggingMode(ErrorLoggingMode m) ; | | static void setEvalErrorLoggingMode(ErrorLoggingMode m) ; | |
| void logEvalError(const char* message, const char* serverValueString=0) c
onst ; | | void logEvalError(const char* message, const char* serverValueString=0) c
onst ; | |
| static void logEvalError(const RooAbsReal* originator, const char* origNa
me, const char* message, const char* serverValueString=0) ; | | static void logEvalError(const RooAbsReal* originator, const char* origNa
me, const char* message, const char* serverValueString=0) ; | |
|
| static void printEvalErrors(ostream&os=std::cout, Int_t maxPerNode=100000
00) ; | | static void printEvalErrors(std::ostream&os=std::cout, Int_t maxPerNode=1
0000000) ; | |
| static Int_t numEvalErrors() ; | | static Int_t numEvalErrors() ; | |
| static Int_t numEvalErrorItems() ; | | static Int_t numEvalErrorItems() ; | |
| | | | |
| typedef std::map<const RooAbsArg*,std::pair<std::string,std::list<EvalErr
or> > >::const_iterator EvalErrorIter ; | | typedef std::map<const RooAbsArg*,std::pair<std::string,std::list<EvalErr
or> > >::const_iterator EvalErrorIter ; | |
| static EvalErrorIter evalErrorIter() ; | | static EvalErrorIter evalErrorIter() ; | |
| | | | |
| static void clearEvalErrorLog() ; | | static void clearEvalErrorLog() ; | |
| | | | |
| virtual Bool_t isBinnedDistribution(const RooArgSet& /*obs*/) const { ret
urn kFALSE ; } | | virtual Bool_t isBinnedDistribution(const RooArgSet& /*obs*/) const { ret
urn kFALSE ; } | |
| virtual std::list<Double_t>* binBoundaries(RooAbsRealLValue& /*obs*/, Dou
ble_t /*xlo*/, Double_t /*xhi*/) const { return 0 ; } | | virtual std::list<Double_t>* binBoundaries(RooAbsRealLValue& /*obs*/, Dou
ble_t /*xlo*/, Double_t /*xhi*/) const { return 0 ; } | |
| | | | |
End of changes. 4 change blocks. |
| 8 lines changed or deleted | | 8 lines changed or added | |
|
| RooAbsRealLValue.h | | RooAbsRealLValue.h | |
| | | | |
| skipping to change at line 92 | | skipping to change at line 92 | |
| inline virtual Bool_t isLValue() const { return kTRUE; } | | inline virtual Bool_t isLValue() const { return kTRUE; } | |
| | | | |
| // Test a value against our fit range | | // Test a value against our fit range | |
| Bool_t inRange(Double_t value, const char* rangeName, Double_t* clippedVa
lue=0) const; | | Bool_t inRange(Double_t value, const char* rangeName, Double_t* clippedVa
lue=0) const; | |
| virtual Bool_t isValidReal(Double_t value, Bool_t printError=kFALSE) cons
t ; | | virtual Bool_t isValidReal(Double_t value, Bool_t printError=kFALSE) cons
t ; | |
| | | | |
| // Constant and Projected flags | | // Constant and Projected flags | |
| inline void setConstant(Bool_t value= kTRUE) { setAttribute("Constant",va
lue); setValueDirty() ; setShapeDirty() ; } | | inline void setConstant(Bool_t value= kTRUE) { setAttribute("Constant",va
lue); setValueDirty() ; setShapeDirty() ; } | |
| | | | |
| // I/O streaming interface (machine readable) | | // I/O streaming interface (machine readable) | |
|
| virtual Bool_t readFromStream(istream& is, Bool_t compact, Bool_t verbose | | virtual Bool_t readFromStream(std::istream& is, Bool_t compact, Bool_t ve | |
| =kFALSE) ; | | rbose=kFALSE) ; | |
| virtual void writeToStream(ostream& os, Bool_t compact) const ; | | virtual void writeToStream(std::ostream& os, Bool_t compact) const ; | |
| | | | |
| // Printing interface (human readable) | | // Printing interface (human readable) | |
|
| virtual void printMultiline(ostream& os, Int_t contents, Bool_t verbose=k
FALSE, TString indent="") const ; | | virtual void printMultiline(std::ostream& os, Int_t contents, Bool_t verb
ose=kFALSE, TString indent="") const ; | |
| | | | |
| // Build 1-dimensional plots | | // Build 1-dimensional plots | |
| RooPlot* frame(const RooCmdArg& arg1, const RooCmdArg& arg2=RooCmdArg::no
ne(), | | RooPlot* frame(const RooCmdArg& arg1, const RooCmdArg& arg2=RooCmdArg::no
ne(), | |
| const RooCmdArg& arg3=RooCmdArg::none(), const RooCmdArg&
arg4=RooCmdArg::none(), const RooCmdArg& arg5=RooCmdArg::none(), | | const RooCmdArg& arg3=RooCmdArg::none(), const RooCmdArg&
arg4=RooCmdArg::none(), const RooCmdArg& arg5=RooCmdArg::none(), | |
| const RooCmdArg& arg6=RooCmdArg::none(), const RooCmdArg&
arg7=RooCmdArg::none(), const RooCmdArg& arg8=RooCmdArg::none()) const ; | | const RooCmdArg& arg6=RooCmdArg::none(), const RooCmdArg&
arg7=RooCmdArg::none(), const RooCmdArg& arg8=RooCmdArg::none()) const ; | |
| RooPlot *frame(const RooLinkedList& cmdList) const ; | | RooPlot *frame(const RooLinkedList& cmdList) const ; | |
| RooPlot *frame(Double_t lo, Double_t hi, Int_t nbins) const; | | RooPlot *frame(Double_t lo, Double_t hi, Int_t nbins) const; | |
| RooPlot *frame(Double_t lo, Double_t hi) const; | | RooPlot *frame(Double_t lo, Double_t hi) const; | |
| RooPlot *frame(Int_t nbins) const; | | RooPlot *frame(Int_t nbins) const; | |
| RooPlot *frame() const; | | RooPlot *frame() const; | |
| | | | |
End of changes. 2 change blocks. |
| 4 lines changed or deleted | | 4 lines changed or added | |
|
| RooArgSet.h | | RooArgSet.h | |
| | | | |
| skipping to change at line 105 | | skipping to change at line 105 | |
| return RooAbsCollection::addOwned(list,silent) ; | | return RooAbsCollection::addOwned(list,silent) ; | |
| } | | } | |
| virtual RooAbsArg *addClone(const RooAbsArg& var, Bool_t silent=kFALSE) ; | | virtual RooAbsArg *addClone(const RooAbsArg& var, Bool_t silent=kFALSE) ; | |
| virtual void addClone(const RooAbsCollection& list, Bool_t silent=kFALSE)
{ | | virtual void addClone(const RooAbsCollection& list, Bool_t silent=kFALSE)
{ | |
| // Add owned clone of all elements of list to collection | | // Add owned clone of all elements of list to collection | |
| RooAbsCollection::addClone(list,silent) ; | | RooAbsCollection::addClone(list,silent) ; | |
| } | | } | |
| | | | |
| RooAbsArg& operator[](const char* name) const ; | | RooAbsArg& operator[](const char* name) const ; | |
| | | | |
|
| virtual Bool_t readFromStream(istream& is, Bool_t compact, Bool_t verbose
=kFALSE) { | | virtual Bool_t readFromStream(std::istream& is, Bool_t compact, Bool_t ve
rbose=kFALSE) { | |
| // I/O streaming interface (machine readable) | | // I/O streaming interface (machine readable) | |
| return readFromStream(is, compact, 0, 0, verbose) ; | | return readFromStream(is, compact, 0, 0, verbose) ; | |
| } | | } | |
|
| Bool_t readFromStream(istream& is, Bool_t compact, const char* flagReadAt | | Bool_t readFromStream(std::istream& is, Bool_t compact, const char* flagR | |
| t, const char* section, Bool_t verbose=kFALSE) ; | | eadAtt, const char* section, Bool_t verbose=kFALSE) ; | |
| virtual void writeToStream(ostream& os, Bool_t compact, const char* secti | | virtual void writeToStream(std::ostream& os, Bool_t compact, const char* | |
| on=0) const; | | section=0) const; | |
| void writeToFile(const char* fileName) const ; | | void writeToFile(const char* fileName) const ; | |
| Bool_t readFromFile(const char* fileName, const char* flagReadAtt=0, cons
t char* section=0, Bool_t verbose=kFALSE) ; | | Bool_t readFromFile(const char* fileName, const char* flagReadAtt=0, cons
t char* section=0, Bool_t verbose=kFALSE) ; | |
| | | | |
| // Utilities functions when used as configuration object | | // Utilities functions when used as configuration object | |
| Double_t getRealValue(const char* name, Double_t defVal=0, Bool_t verbose
=kFALSE) const ; | | Double_t getRealValue(const char* name, Double_t defVal=0, Bool_t verbose
=kFALSE) const ; | |
| const char* getCatLabel(const char* name, const char* defVal="", Bool_t v
erbose=kFALSE) const ; | | const char* getCatLabel(const char* name, const char* defVal="", Bool_t v
erbose=kFALSE) const ; | |
| Int_t getCatIndex(const char* name, Int_t defVal=0, Bool_t verbose=kFALSE
) const ; | | Int_t getCatIndex(const char* name, Int_t defVal=0, Bool_t verbose=kFALSE
) const ; | |
| const char* getStringValue(const char* name, const char* defVal="", Bool_
t verbose=kFALSE) const ; | | const char* getStringValue(const char* name, const char* defVal="", Bool_
t verbose=kFALSE) const ; | |
| Bool_t setRealValue(const char* name, Double_t newVal=0, Bool_t verbose=k
FALSE) ; | | Bool_t setRealValue(const char* name, Double_t newVal=0, Bool_t verbose=k
FALSE) ; | |
| Bool_t setCatLabel(const char* name, const char* newVal="", Bool_t verbos
e=kFALSE) ; | | Bool_t setCatLabel(const char* name, const char* newVal="", Bool_t verbos
e=kFALSE) ; | |
| | | | |
End of changes. 2 change blocks. |
| 5 lines changed or deleted | | 5 lines changed or added | |
|
| RooBinnedGenContext.h | | RooBinnedGenContext.h | |
| /**************************************************************************
*** | | /**************************************************************************
*** | |
| * Project: RooFit
* | | * Project: RooFit
* | |
| * Package: RooFitCore
* | | * Package: RooFitCore
* | |
|
| * File: $Id: RooBinnedGenContext.h 42233 2011-11-24 23:35:45Z wouter $ | | * File: $Id: RooBinnedGenContext.h 44982 2012-07-10 08:36:13Z moneta $ | |
| * 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 36 | | skipping to change at line 36 | |
| class RooDataHist ; | | class RooDataHist ; | |
| class TRandom; | | class TRandom; | |
| class TIterator; | | class TIterator; | |
| | | | |
| class RooBinnedGenContext : public RooAbsGenContext { | | class RooBinnedGenContext : public RooAbsGenContext { | |
| public: | | public: | |
| RooBinnedGenContext(const RooAbsPdf &model, const RooArgSet &vars, const
RooDataSet *prototype= 0, | | RooBinnedGenContext(const RooAbsPdf &model, const RooArgSet &vars, const
RooDataSet *prototype= 0, | |
| const RooArgSet* auxProto=0, Bool_t _verbose= kFALSE); | | const RooArgSet* auxProto=0, Bool_t _verbose= kFALSE); | |
| virtual ~RooBinnedGenContext(); | | virtual ~RooBinnedGenContext(); | |
| | | | |
|
| RooDataSet* generate(Int_t nEvents=0, Bool_t skipInit=kFALSE, Bool_t exte
ndedMode=kFALSE) ; | | RooDataSet* generate(Double_t nEvents=0, Bool_t skipInit=kFALSE, Bool_t e
xtendedMode=kFALSE) ; | |
| | | | |
| virtual void setProtoDataOrder(Int_t*) {} | | virtual void setProtoDataOrder(Int_t*) {} | |
| | | | |
| virtual void attach(const RooArgSet& params) ; | | virtual void attach(const RooArgSet& params) ; | |
| | | | |
|
| virtual void printMultiline(ostream &os, Int_t content, Bool_t verbose=kF
ALSE, TString indent="") const ; | | virtual void printMultiline(std::ostream &os, Int_t content, Bool_t verbo
se=kFALSE, TString indent="") const ; | |
| | | | |
| virtual void setExpectedData(Bool_t) ; | | virtual void setExpectedData(Bool_t) ; | |
| | | | |
| protected: | | protected: | |
| | | | |
| virtual void initGenerator(const RooArgSet &theEvent); | | virtual void initGenerator(const RooArgSet &theEvent); | |
| virtual void generateEvent(RooArgSet &theEvent, Int_t remaining); | | virtual void generateEvent(RooArgSet &theEvent, Int_t remaining); | |
| | | | |
| RooBinnedGenContext(const RooBinnedGenContext& other) ; | | RooBinnedGenContext(const RooBinnedGenContext& other) ; | |
| | | | |
| | | | |
End of changes. 3 change blocks. |
| 3 lines changed or deleted | | 3 lines changed or added | |
|
| RooCFunction1Binding.h | | RooCFunction1Binding.h | |
| /**************************************************************************
*** | | /**************************************************************************
*** | |
| * Project: RooFit
* | | * Project: RooFit
* | |
| * Package: RooFitCore
* | | * Package: RooFitCore
* | |
|
| * File: $Id: RooCFunction1Binding.h 36207 2010-10-08 19:00:29Z wouter $ | | * File: $Id: RooCFunction1Binding.h 44982 2012-07-10 08:36:13Z moneta $ | |
| * Authors:
* | | * Authors:
* | |
| * WV, Wouter Verkerke, NIKHEF, verkerke@nikhef.nl
* | | * WV, Wouter Verkerke, NIKHEF, verkerke@nikhef.nl
* | |
| *
* | | *
* | |
| * Copyright (c) 2000-2008, NIKHEF, Regents of the University of California
* | | * Copyright (c) 2000-2008, NIKHEF, Regents of the University of California
* | |
| * and Stanford University. All rights reserved.
* | | * and Stanford University. All rights reserved.
* | |
| *
* | | *
* | |
| **************************************************************************
***/ | | **************************************************************************
***/ | |
| | | | |
| #ifndef ROOCFUNCTION1BINDING | | #ifndef ROOCFUNCTION1BINDING | |
| #define ROOCFUNCTION1BINDING | | #define ROOCFUNCTION1BINDING | |
| | | | |
| skipping to change at line 171 | | skipping to change at line 171 | |
| | | | |
| UInt_t R__s, R__c; | | UInt_t R__s, R__c; | |
| Version_t R__v = R__b.ReadVersion(&R__s, &R__c); | | Version_t R__v = R__b.ReadVersion(&R__s, &R__c); | |
| | | | |
| // Read name from file | | // Read name from file | |
| TString tmpName ; | | TString tmpName ; | |
| tmpName.Streamer(R__b) ; | | tmpName.Streamer(R__b) ; | |
| | | | |
| if (tmpName=="UNKNOWN" && R__v>0) { | | if (tmpName=="UNKNOWN" && R__v>0) { | |
| | | | |
|
| coutW(ObjectHandling) << "WARNING: Objected embeds function pointer
to unknown function, object will not be functional" << endl ; | | coutW(ObjectHandling) << "WARNING: Objected embeds function pointer
to unknown function, object will not be functional" << std::endl ; | |
| _ptr = dummyFunction ; | | _ptr = dummyFunction ; | |
| | | | |
| } else { | | } else { | |
| | | | |
| // Lookup pointer to C function wih given name | | // Lookup pointer to C function wih given name | |
| _ptr = fmap().lookupPtr(tmpName.Data()) ; | | _ptr = fmap().lookupPtr(tmpName.Data()) ; | |
| | | | |
| if (_ptr==0) { | | if (_ptr==0) { | |
| coutW(ObjectHandling) << "ERROR: Objected embeds pointer to functio
n named " << tmpName | | coutW(ObjectHandling) << "ERROR: Objected embeds pointer to functio
n named " << tmpName | |
|
| << " but no such function is registered, obje
ct will not be functional" << endl ; | | << " but no such function is registered, obje
ct will not be functional" << std::endl ; | |
| } | | } | |
| } | | } | |
| | | | |
| R__b.CheckByteCount(R__s, R__c, thisClass::IsA()); | | R__b.CheckByteCount(R__s, R__c, thisClass::IsA()); | |
| | | | |
| } else { | | } else { | |
| | | | |
| UInt_t R__c; | | UInt_t R__c; | |
| R__c = R__b.WriteVersion(thisClass::IsA(), kTRUE); | | R__c = R__b.WriteVersion(thisClass::IsA(), kTRUE); | |
| | | | |
| // Lookup name of reference C function | | // Lookup name of reference C function | |
| TString tmpName = fmap().lookupName(_ptr) ; | | TString tmpName = fmap().lookupName(_ptr) ; | |
| if (tmpName.Length()==0) { | | if (tmpName.Length()==0) { | |
| // This union is to avoid a warning message: | | // This union is to avoid a warning message: | |
| union { | | union { | |
| void *_ptr; | | void *_ptr; | |
| func_t _funcptr; | | func_t _funcptr; | |
| } temp; | | } temp; | |
| temp._funcptr = _ptr; | | temp._funcptr = _ptr; | |
| coutW(ObjectHandling) << "WARNING: Cannot persist unknown function
pointer " << Form("%p",temp._ptr) | | coutW(ObjectHandling) << "WARNING: Cannot persist unknown function
pointer " << Form("%p",temp._ptr) | |
|
| << " written object will not be functional wh
en read back" << endl ; | | << " written object will not be functional wh
en read back" << std::endl ; | |
| tmpName="UNKNOWN" ; | | tmpName="UNKNOWN" ; | |
| } | | } | |
| | | | |
| // Persist the name | | // Persist the name | |
| tmpName.Streamer(R__b) ; | | tmpName.Streamer(R__b) ; | |
| | | | |
| R__b.SetByteCount(R__c, kTRUE); | | R__b.SetByteCount(R__c, kTRUE); | |
| | | | |
| } | | } | |
| } | | } | |
| | | | |
| skipping to change at line 225 | | skipping to change at line 225 | |
| class RooCFunction1Binding : public RooAbsReal { | | class RooCFunction1Binding : public RooAbsReal { | |
| public: | | public: | |
| RooCFunction1Binding() { | | RooCFunction1Binding() { | |
| // Default constructor | | // Default constructor | |
| } ; | | } ; | |
| RooCFunction1Binding(const char *name, const char *title, VO (*_func)(VI)
, RooAbsReal& _x); | | RooCFunction1Binding(const char *name, const char *title, VO (*_func)(VI)
, RooAbsReal& _x); | |
| RooCFunction1Binding(const RooCFunction1Binding& other, const char* name=
0) ; | | RooCFunction1Binding(const RooCFunction1Binding& other, const char* name=
0) ; | |
| virtual TObject* clone(const char* newname) const { return new RooCFuncti
on1Binding(*this,newname); } | | virtual TObject* clone(const char* newname) const { return new RooCFuncti
on1Binding(*this,newname); } | |
| inline virtual ~RooCFunction1Binding() { } | | inline virtual ~RooCFunction1Binding() { } | |
| | | | |
|
| void printArgs(ostream& os) const { | | void printArgs(std::ostream& os) const { | |
| // Print object arguments and name/address of function pointer | | // Print object arguments and name/address of function pointer | |
| os << "[ function=" << func.name() << " " ; | | os << "[ function=" << func.name() << " " ; | |
| for (Int_t i=0 ; i<numProxies() ; i++) { | | for (Int_t i=0 ; i<numProxies() ; i++) { | |
| RooAbsProxy* p = getProxy(i) ; | | RooAbsProxy* p = getProxy(i) ; | |
| if (!TString(p->name()).BeginsWith("!")) { | | if (!TString(p->name()).BeginsWith("!")) { | |
| p->print(os) ; | | p->print(os) ; | |
| os << " " ; | | os << " " ; | |
| } | | } | |
| } | | } | |
| os << "]" ; | | os << "]" ; | |
| | | | |
| skipping to change at line 285 | | skipping to change at line 285 | |
| class RooCFunction1PdfBinding : public RooAbsPdf { | | class RooCFunction1PdfBinding : public RooAbsPdf { | |
| public: | | public: | |
| RooCFunction1PdfBinding() { | | RooCFunction1PdfBinding() { | |
| // Default constructor | | // Default constructor | |
| } ; | | } ; | |
| RooCFunction1PdfBinding(const char *name, const char *title, VO (*_func)(
VI), RooAbsReal& _x); | | RooCFunction1PdfBinding(const char *name, const char *title, VO (*_func)(
VI), RooAbsReal& _x); | |
| RooCFunction1PdfBinding(const RooCFunction1PdfBinding& other, const char*
name=0) ; | | RooCFunction1PdfBinding(const RooCFunction1PdfBinding& other, const char*
name=0) ; | |
| virtual TObject* clone(const char* newname) const { return new RooCFuncti
on1PdfBinding(*this,newname); } | | virtual TObject* clone(const char* newname) const { return new RooCFuncti
on1PdfBinding(*this,newname); } | |
| inline virtual ~RooCFunction1PdfBinding() { } | | inline virtual ~RooCFunction1PdfBinding() { } | |
| | | | |
|
| void printArgs(ostream& os) const { | | void printArgs(std::ostream& os) const { | |
| // Print object arguments and name/address of function pointer | | // Print object arguments and name/address of function pointer | |
| os << "[ function=" << func.name() << " " ; | | os << "[ function=" << func.name() << " " ; | |
| for (Int_t i=0 ; i<numProxies() ; i++) { | | for (Int_t i=0 ; i<numProxies() ; i++) { | |
| RooAbsProxy* p = getProxy(i) ; | | RooAbsProxy* p = getProxy(i) ; | |
| if (!TString(p->name()).BeginsWith("!")) { | | if (!TString(p->name()).BeginsWith("!")) { | |
| p->print(os) ; | | p->print(os) ; | |
| os << " " ; | | os << " " ; | |
| } | | } | |
| } | | } | |
| os << "]" ; | | os << "]" ; | |
| | | | |
End of changes. 6 change blocks. |
| 6 lines changed or deleted | | 6 lines changed or added | |
|
| RooCFunction2Binding.h | | RooCFunction2Binding.h | |
| /**************************************************************************
*** | | /**************************************************************************
*** | |
| * Project: RooFit
* | | * Project: RooFit
* | |
| * Package: RooFitCore
* | | * Package: RooFitCore
* | |
|
| * File: $Id: RooCFunction2Binding.h 36207 2010-10-08 19:00:29Z wouter $ | | * File: $Id: RooCFunction2Binding.h 44982 2012-07-10 08:36:13Z moneta $ | |
| * Authors:
* | | * Authors:
* | |
| * WV, Wouter Verkerke, NIKHEF, verkerke@nikhef.nl
* | | * WV, Wouter Verkerke, NIKHEF, verkerke@nikhef.nl
* | |
| *
* | | *
* | |
| * Copyright (c) 2000-2008, NIKHEF, Regents of the University of California
* | | * Copyright (c) 2000-2008, NIKHEF, Regents of the University of California
* | |
| * and Stanford University. All rights reserved.
* | | * and Stanford University. All rights reserved.
* | |
| *
* | | *
* | |
| **************************************************************************
***/ | | **************************************************************************
***/ | |
| | | | |
| #ifndef ROOCFUNCTION2BINDING | | #ifndef ROOCFUNCTION2BINDING | |
| #define ROOCFUNCTION2BINDING | | #define ROOCFUNCTION2BINDING | |
| | | | |
| skipping to change at line 181 | | skipping to change at line 181 | |
| | | | |
| UInt_t R__s, R__c; | | UInt_t R__s, R__c; | |
| Version_t R__v = R__b.ReadVersion(&R__s, &R__c); | | Version_t R__v = R__b.ReadVersion(&R__s, &R__c); | |
| | | | |
| // Read name from file | | // Read name from file | |
| TString tmpName ; | | TString tmpName ; | |
| tmpName.Streamer(R__b) ; | | tmpName.Streamer(R__b) ; | |
| | | | |
| if (tmpName=="UNKNOWN" && R__v>0) { | | if (tmpName=="UNKNOWN" && R__v>0) { | |
| | | | |
|
| coutW(ObjectHandling) << "WARNING: Objected embeds function pointer
to unknown function, object will not be functional" << endl ; | | coutW(ObjectHandling) << "WARNING: Objected embeds function pointer
to unknown function, object will not be functional" << std::endl ; | |
| _ptr = dummyFunction ; | | _ptr = dummyFunction ; | |
| | | | |
| } else { | | } else { | |
| | | | |
| // Lookup pointer to C function wih given name | | // Lookup pointer to C function wih given name | |
| _ptr = fmap().lookupPtr(tmpName.Data()) ; | | _ptr = fmap().lookupPtr(tmpName.Data()) ; | |
| | | | |
| if (_ptr==0) { | | if (_ptr==0) { | |
| coutW(ObjectHandling) << "ERROR: Objected embeds pointer to functio
n named " << tmpName | | coutW(ObjectHandling) << "ERROR: Objected embeds pointer to functio
n named " << tmpName | |
|
| << " but no such function is registered, obje
ct will not be functional" << endl ; | | << " but no such function is registered, obje
ct will not be functional" << std::endl ; | |
| } | | } | |
| } | | } | |
| | | | |
| R__b.CheckByteCount(R__s, R__c, thisClass::IsA()); | | R__b.CheckByteCount(R__s, R__c, thisClass::IsA()); | |
| | | | |
| } else { | | } else { | |
| | | | |
| UInt_t R__c; | | UInt_t R__c; | |
| R__c = R__b.WriteVersion(thisClass::IsA(), kTRUE); | | R__c = R__b.WriteVersion(thisClass::IsA(), kTRUE); | |
| | | | |
| // Lookup name of reference C function | | // Lookup name of reference C function | |
| TString tmpName = fmap().lookupName(_ptr) ; | | TString tmpName = fmap().lookupName(_ptr) ; | |
| if (tmpName.Length()==0) { | | if (tmpName.Length()==0) { | |
| coutW(ObjectHandling) << "WARNING: Cannot persist unknown function p
ointer " << Form("0x%lx", (ULong_t)_ptr) | | coutW(ObjectHandling) << "WARNING: Cannot persist unknown function p
ointer " << Form("0x%lx", (ULong_t)_ptr) | |
|
| << " written object will not be functional when
read back" << endl ; | | << " written object will not be functional when
read back" << std::endl ; | |
| tmpName="UNKNOWN" ; | | tmpName="UNKNOWN" ; | |
| } | | } | |
| | | | |
| // Persist the name | | // Persist the name | |
| tmpName.Streamer(R__b) ; | | tmpName.Streamer(R__b) ; | |
| | | | |
| R__b.SetByteCount(R__c, kTRUE); | | R__b.SetByteCount(R__c, kTRUE); | |
| | | | |
| } | | } | |
| } | | } | |
| | | | |
| skipping to change at line 229 | | skipping to change at line 229 | |
| class RooCFunction2Binding : public RooAbsReal { | | class RooCFunction2Binding : public RooAbsReal { | |
| public: | | public: | |
| RooCFunction2Binding() { | | RooCFunction2Binding() { | |
| // Default constructor | | // Default constructor | |
| } ; | | } ; | |
| RooCFunction2Binding(const char *name, const char *title, VO (*_func)(VI1
,VI2), RooAbsReal& _x, RooAbsReal& _y); | | RooCFunction2Binding(const char *name, const char *title, VO (*_func)(VI1
,VI2), RooAbsReal& _x, RooAbsReal& _y); | |
| RooCFunction2Binding(const RooCFunction2Binding& other, const char* name=
0) ; | | RooCFunction2Binding(const RooCFunction2Binding& other, const char* name=
0) ; | |
| virtual TObject* clone(const char* newname) const { return new RooCFuncti
on2Binding(*this,newname); } | | virtual TObject* clone(const char* newname) const { return new RooCFuncti
on2Binding(*this,newname); } | |
| inline virtual ~RooCFunction2Binding() { } | | inline virtual ~RooCFunction2Binding() { } | |
| | | | |
|
| void printArgs(ostream& os) const { | | void printArgs(std::ostream& os) const { | |
| // Print object arguments and name/address of function pointer | | // Print object arguments and name/address of function pointer | |
| os << "[ function=" << func.name() << " " ; | | os << "[ function=" << func.name() << " " ; | |
| for (Int_t i=0 ; i<numProxies() ; i++) { | | for (Int_t i=0 ; i<numProxies() ; i++) { | |
| RooAbsProxy* p = getProxy(i) ; | | RooAbsProxy* p = getProxy(i) ; | |
| if (!TString(p->name()).BeginsWith("!")) { | | if (!TString(p->name()).BeginsWith("!")) { | |
| p->print(os) ; | | p->print(os) ; | |
| os << " " ; | | os << " " ; | |
| } | | } | |
| } | | } | |
| os << "]" ; | | os << "]" ; | |
| | | | |
| skipping to change at line 293 | | skipping to change at line 293 | |
| class RooCFunction2PdfBinding : public RooAbsPdf { | | class RooCFunction2PdfBinding : public RooAbsPdf { | |
| public: | | public: | |
| RooCFunction2PdfBinding() { | | RooCFunction2PdfBinding() { | |
| // Default constructor | | // Default constructor | |
| } ; | | } ; | |
| RooCFunction2PdfBinding(const char *name, const char *title, VO (*_func)(
VI1,VI2), RooAbsReal& _x, RooAbsReal& _y); | | RooCFunction2PdfBinding(const char *name, const char *title, VO (*_func)(
VI1,VI2), RooAbsReal& _x, RooAbsReal& _y); | |
| RooCFunction2PdfBinding(const RooCFunction2PdfBinding& other, const char*
name=0) ; | | RooCFunction2PdfBinding(const RooCFunction2PdfBinding& other, const char*
name=0) ; | |
| virtual TObject* clone(const char* newname) const { return new RooCFuncti
on2PdfBinding(*this,newname); } | | virtual TObject* clone(const char* newname) const { return new RooCFuncti
on2PdfBinding(*this,newname); } | |
| inline virtual ~RooCFunction2PdfBinding() { } | | inline virtual ~RooCFunction2PdfBinding() { } | |
| | | | |
|
| void printArgs(ostream& os) const { | | void printArgs(std::ostream& os) const { | |
| // Print object arguments and name/address of function pointer | | // Print object arguments and name/address of function pointer | |
| os << "[ function=" << func.name() << " " ; | | os << "[ function=" << func.name() << " " ; | |
| for (Int_t i=0 ; i<numProxies() ; i++) { | | for (Int_t i=0 ; i<numProxies() ; i++) { | |
| RooAbsProxy* p = getProxy(i) ; | | RooAbsProxy* p = getProxy(i) ; | |
| if (!TString(p->name()).BeginsWith("!")) { | | if (!TString(p->name()).BeginsWith("!")) { | |
| p->print(os) ; | | p->print(os) ; | |
| os << " " ; | | os << " " ; | |
| } | | } | |
| } | | } | |
| os << "]" ; | | os << "]" ; | |
| | | | |
End of changes. 6 change blocks. |
| 6 lines changed or deleted | | 6 lines changed or added | |
|
| RooCFunction3Binding.h | | RooCFunction3Binding.h | |
| /**************************************************************************
*** | | /**************************************************************************
*** | |
| * Project: RooFit
* | | * Project: RooFit
* | |
| * Package: RooFitCore
* | | * Package: RooFitCore
* | |
|
| * File: $Id: RooCFunction3Binding.h 36207 2010-10-08 19:00:29Z wouter $ | | * File: $Id: RooCFunction3Binding.h 44982 2012-07-10 08:36:13Z moneta $ | |
| * Authors:
* WV, Wouter Verkerke, NIKHEF, verkerke@nikhef.nl
* | | * Authors:
* WV, Wouter Verkerke, NIKHEF, verkerke@nikhef.nl
* | |
| *
* | | *
* | |
| * Copyright (c) 2000-2008, NIKHEF, Regents of the University of California
* | | * Copyright (c) 2000-2008, NIKHEF, Regents of the University of California
* | |
| * and Stanford University. All rights reserved.
* | | * and Stanford University. All rights reserved.
* | |
| *
* | | *
* | |
| **************************************************************************
***/ | | **************************************************************************
***/ | |
| | | | |
| #ifndef ROOCFUNCTION3BINDING | | #ifndef ROOCFUNCTION3BINDING | |
| #define ROOCFUNCTION3BINDING | | #define ROOCFUNCTION3BINDING | |
| | | | |
| | | | |
| skipping to change at line 184 | | skipping to change at line 184 | |
| | | | |
| UInt_t R__s, R__c; | | UInt_t R__s, R__c; | |
| Version_t R__v = R__b.ReadVersion(&R__s, &R__c); | | Version_t R__v = R__b.ReadVersion(&R__s, &R__c); | |
| | | | |
| // Read name from file | | // Read name from file | |
| TString tmpName ; | | TString tmpName ; | |
| tmpName.Streamer(R__b) ; | | tmpName.Streamer(R__b) ; | |
| | | | |
| if (tmpName=="UNKNOWN" && R__v>0) { | | if (tmpName=="UNKNOWN" && R__v>0) { | |
| | | | |
|
| coutW(ObjectHandling) << "WARNING: Objected embeds function pointer
to unknown function, object will not be functional" << endl ; | | coutW(ObjectHandling) << "WARNING: Objected embeds function pointer
to unknown function, object will not be functional" << std::endl ; | |
| _ptr = dummyFunction ; | | _ptr = dummyFunction ; | |
| | | | |
| } else { | | } else { | |
| | | | |
| // Lookup pointer to C function wih given name | | // Lookup pointer to C function wih given name | |
| _ptr = fmap().lookupPtr(tmpName.Data()) ; | | _ptr = fmap().lookupPtr(tmpName.Data()) ; | |
| | | | |
| if (_ptr==0) { | | if (_ptr==0) { | |
| coutW(ObjectHandling) << "ERROR: Objected embeds pointer to functio
n named " << tmpName | | coutW(ObjectHandling) << "ERROR: Objected embeds pointer to functio
n named " << tmpName | |
|
| << " but no such function is registered, obje
ct will not be functional" << endl ; | | << " but no such function is registered, obje
ct will not be functional" << std::endl ; | |
| } | | } | |
| } | | } | |
| | | | |
| R__b.CheckByteCount(R__s, R__c, thisClass::IsA()); | | R__b.CheckByteCount(R__s, R__c, thisClass::IsA()); | |
| | | | |
| } else { | | } else { | |
| | | | |
| UInt_t R__c; | | UInt_t R__c; | |
| R__c = R__b.WriteVersion(thisClass::IsA(), kTRUE); | | R__c = R__b.WriteVersion(thisClass::IsA(), kTRUE); | |
| | | | |
| // Lookup name of reference C function | | // Lookup name of reference C function | |
| TString tmpName = fmap().lookupName(_ptr) ; | | TString tmpName = fmap().lookupName(_ptr) ; | |
| if (tmpName.Length()==0) { | | if (tmpName.Length()==0) { | |
| // This union is to avoid a warning message: | | // This union is to avoid a warning message: | |
| union { | | union { | |
| void *_ptr; | | void *_ptr; | |
| func_t _funcptr; | | func_t _funcptr; | |
| } temp; | | } temp; | |
| temp._funcptr = _ptr; | | temp._funcptr = _ptr; | |
| coutW(ObjectHandling) << "WARNING: Cannot persist unknown function p
ointer " << Form("%p",temp._ptr) | | coutW(ObjectHandling) << "WARNING: Cannot persist unknown function p
ointer " << Form("%p",temp._ptr) | |
|
| << " written object will not be functional when
read back" << endl ; | | << " written object will not be functional when
read back" << std::endl ; | |
| tmpName="UNKNOWN" ; | | tmpName="UNKNOWN" ; | |
| } | | } | |
| | | | |
| // Persist the name | | // Persist the name | |
| tmpName.Streamer(R__b) ; | | tmpName.Streamer(R__b) ; | |
| | | | |
| R__b.SetByteCount(R__c, kTRUE); | | R__b.SetByteCount(R__c, kTRUE); | |
| | | | |
| } | | } | |
| } | | } | |
| | | | |
| skipping to change at line 238 | | skipping to change at line 238 | |
| class RooCFunction3Binding : public RooAbsReal { | | class RooCFunction3Binding : public RooAbsReal { | |
| public: | | public: | |
| RooCFunction3Binding() { | | RooCFunction3Binding() { | |
| // Default constructor | | // Default constructor | |
| } ; | | } ; | |
| RooCFunction3Binding(const char *name, const char *title, VO (*_func)(VI1
,VI2,VI3), RooAbsReal& _x, RooAbsReal& _y, RooAbsReal& _z); | | RooCFunction3Binding(const char *name, const char *title, VO (*_func)(VI1
,VI2,VI3), RooAbsReal& _x, RooAbsReal& _y, RooAbsReal& _z); | |
| RooCFunction3Binding(const RooCFunction3Binding& other, const char* name=
0) ; | | RooCFunction3Binding(const RooCFunction3Binding& other, const char* name=
0) ; | |
| virtual TObject* clone(const char* newname) const { return new RooCFuncti
on3Binding(*this,newname); } | | virtual TObject* clone(const char* newname) const { return new RooCFuncti
on3Binding(*this,newname); } | |
| inline virtual ~RooCFunction3Binding() { } | | inline virtual ~RooCFunction3Binding() { } | |
| | | | |
|
| void printArgs(ostream& os) const { | | void printArgs(std::ostream& os) const { | |
| // Print object arguments and name/address of function pointer | | // Print object arguments and name/address of function pointer | |
| os << "[ function=" << func.name() << " " ; | | os << "[ function=" << func.name() << " " ; | |
| for (Int_t i=0 ; i<numProxies() ; i++) { | | for (Int_t i=0 ; i<numProxies() ; i++) { | |
| RooAbsProxy* p = getProxy(i) ; | | RooAbsProxy* p = getProxy(i) ; | |
| if (!TString(p->name()).BeginsWith("!")) { | | if (!TString(p->name()).BeginsWith("!")) { | |
| p->print(os) ; | | p->print(os) ; | |
| os << " " ; | | os << " " ; | |
| } | | } | |
| } | | } | |
| os << "]" ; | | os << "]" ; | |
| | | | |
| skipping to change at line 305 | | skipping to change at line 305 | |
| class RooCFunction3PdfBinding : public RooAbsPdf { | | class RooCFunction3PdfBinding : public RooAbsPdf { | |
| public: | | public: | |
| RooCFunction3PdfBinding() { | | RooCFunction3PdfBinding() { | |
| // Default constructor | | // Default constructor | |
| } ; | | } ; | |
| RooCFunction3PdfBinding(const char *name, const char *title, VO (*_func)(
VI1,VI2,VI3), RooAbsReal& _x, RooAbsReal& _y, RooAbsReal& _z); | | RooCFunction3PdfBinding(const char *name, const char *title, VO (*_func)(
VI1,VI2,VI3), RooAbsReal& _x, RooAbsReal& _y, RooAbsReal& _z); | |
| RooCFunction3PdfBinding(const RooCFunction3PdfBinding& other, const char*
name=0) ; | | RooCFunction3PdfBinding(const RooCFunction3PdfBinding& other, const char*
name=0) ; | |
| virtual TObject* clone(const char* newname) const { return new RooCFuncti
on3PdfBinding(*this,newname); } | | virtual TObject* clone(const char* newname) const { return new RooCFuncti
on3PdfBinding(*this,newname); } | |
| inline virtual ~RooCFunction3PdfBinding() { } | | inline virtual ~RooCFunction3PdfBinding() { } | |
| | | | |
|
| void printArgs(ostream& os) const { | | void printArgs(std::ostream& os) const { | |
| // Print object arguments and name/address of function pointer | | // Print object arguments and name/address of function pointer | |
| os << "[ function=" << func.name() << " " ; | | os << "[ function=" << func.name() << " " ; | |
| for (Int_t i=0 ; i<numProxies() ; i++) { | | for (Int_t i=0 ; i<numProxies() ; i++) { | |
| RooAbsProxy* p = getProxy(i) ; | | RooAbsProxy* p = getProxy(i) ; | |
| if (!TString(p->name()).BeginsWith("!")) { | | if (!TString(p->name()).BeginsWith("!")) { | |
| p->print(os) ; | | p->print(os) ; | |
| os << " " ; | | os << " " ; | |
| } | | } | |
| } | | } | |
| os << "]" ; | | os << "]" ; | |
| | | | |
End of changes. 6 change blocks. |
| 6 lines changed or deleted | | 6 lines changed or added | |
|
| RooCFunction4Binding.h | | RooCFunction4Binding.h | |
| /**************************************************************************
*** | | /**************************************************************************
*** | |
| * Project: RooFit
* | | * Project: RooFit
* | |
| * Package: RooFitCore
* | | * Package: RooFitCore
* | |
|
| * File: $Id: RooCFunction4Binding.h 36207 2010-10-08 19:00:29Z wouter $ | | * File: $Id: RooCFunction4Binding.h 44982 2012-07-10 08:36:13Z moneta $ | |
| * Authors:
* | | * Authors:
* | |
| * WV, Wouter Verkerke, NIKHEF, verkerke@nikhef.nl
* | | * WV, Wouter Verkerke, NIKHEF, verkerke@nikhef.nl
* | |
| *
* | | *
* | |
| * Copyright (c) 2000-2008, NIKHEF, Regents of the University of California
* | | * Copyright (c) 2000-2008, NIKHEF, Regents of the University of California
* | |
| * and Stanford University. All rights reserved.
* | | * and Stanford University. All rights reserved.
* | |
| *
* | | *
* | |
| **************************************************************************
***/ | | **************************************************************************
***/ | |
| | | | |
| #ifndef ROOCFUNCTION4BINDING | | #ifndef ROOCFUNCTION4BINDING | |
| #define ROOCFUNCTION4BINDING | | #define ROOCFUNCTION4BINDING | |
| | | | |
| skipping to change at line 178 | | skipping to change at line 178 | |
| | | | |
| UInt_t R__s, R__c; | | UInt_t R__s, R__c; | |
| Version_t R__v = R__b.ReadVersion(&R__s, &R__c); | | Version_t R__v = R__b.ReadVersion(&R__s, &R__c); | |
| | | | |
| // Read name from file | | // Read name from file | |
| TString tmpName ; | | TString tmpName ; | |
| tmpName.Streamer(R__b) ; | | tmpName.Streamer(R__b) ; | |
| | | | |
| if (tmpName=="UNKNOWN" && R__v>0) { | | if (tmpName=="UNKNOWN" && R__v>0) { | |
| | | | |
|
| coutW(ObjectHandling) << "WARNING: Objected embeds function pointer
to unknown function, object will not be functional" << endl ; | | coutW(ObjectHandling) << "WARNING: Objected embeds function pointer
to unknown function, object will not be functional" << std::endl ; | |
| _ptr = dummyFunction ; | | _ptr = dummyFunction ; | |
| | | | |
| } else { | | } else { | |
| | | | |
| // Lookup pointer to C function wih given name | | // Lookup pointer to C function wih given name | |
| _ptr = fmap().lookupPtr(tmpName.Data()) ; | | _ptr = fmap().lookupPtr(tmpName.Data()) ; | |
| | | | |
| if (_ptr==0) { | | if (_ptr==0) { | |
| coutW(ObjectHandling) << "ERROR: Objected embeds pointer to functio
n named " << tmpName | | coutW(ObjectHandling) << "ERROR: Objected embeds pointer to functio
n named " << tmpName | |
|
| << " but no such function is registered, obje
ct will not be functional" << endl ; | | << " but no such function is registered, obje
ct will not be functional" << std::endl ; | |
| } | | } | |
| } | | } | |
| | | | |
| R__b.CheckByteCount(R__s, R__c, thisClass::IsA()); | | R__b.CheckByteCount(R__s, R__c, thisClass::IsA()); | |
| | | | |
| } else { | | } else { | |
| | | | |
| UInt_t R__c; | | UInt_t R__c; | |
| R__c = R__b.WriteVersion(thisClass::IsA(), kTRUE); | | R__c = R__b.WriteVersion(thisClass::IsA(), kTRUE); | |
| | | | |
| // Lookup name of reference C function | | // Lookup name of reference C function | |
| TString tmpName = fmap().lookupName(_ptr) ; | | TString tmpName = fmap().lookupName(_ptr) ; | |
| if (tmpName.Length()==0) { | | if (tmpName.Length()==0) { | |
| coutW(ObjectHandling) << "WARNING: Cannot persist unknown function p
ointer " << Form("0x%lx",(ULong_t)_ptr) | | coutW(ObjectHandling) << "WARNING: Cannot persist unknown function p
ointer " << Form("0x%lx",(ULong_t)_ptr) | |
|
| << " written object will not be functional when
read back" << endl ; | | << " written object will not be functional when
read back" << std::endl ; | |
| tmpName="UNKNOWN" ; | | tmpName="UNKNOWN" ; | |
| } | | } | |
| | | | |
| // Persist the name | | // Persist the name | |
| tmpName.Streamer(R__b) ; | | tmpName.Streamer(R__b) ; | |
| | | | |
| R__b.SetByteCount(R__c, kTRUE); | | R__b.SetByteCount(R__c, kTRUE); | |
| | | | |
| } | | } | |
| } | | } | |
| | | | |
| skipping to change at line 226 | | skipping to change at line 226 | |
| class RooCFunction4Binding : public RooAbsReal { | | class RooCFunction4Binding : public RooAbsReal { | |
| public: | | public: | |
| RooCFunction4Binding() { | | RooCFunction4Binding() { | |
| // Default constructor | | // Default constructor | |
| } ; | | } ; | |
| RooCFunction4Binding(const char *name, const char *title, VO (*_func)(VI1
,VI2,VI3,VI4), RooAbsReal& _x, RooAbsReal& _y, RooAbsReal& _z, RooAbsReal&
_w); | | RooCFunction4Binding(const char *name, const char *title, VO (*_func)(VI1
,VI2,VI3,VI4), RooAbsReal& _x, RooAbsReal& _y, RooAbsReal& _z, RooAbsReal&
_w); | |
| RooCFunction4Binding(const RooCFunction4Binding& other, const char* name=
0) ; | | RooCFunction4Binding(const RooCFunction4Binding& other, const char* name=
0) ; | |
| virtual TObject* clone(const char* newname) const { return new RooCFuncti
on4Binding(*this,newname); } | | virtual TObject* clone(const char* newname) const { return new RooCFuncti
on4Binding(*this,newname); } | |
| inline virtual ~RooCFunction4Binding() { } | | inline virtual ~RooCFunction4Binding() { } | |
| | | | |
|
| void printArgs(ostream& os) const { | | void printArgs(std::ostream& os) const { | |
| // Print object arguments and name/address of function pointer | | // Print object arguments and name/address of function pointer | |
| os << "[ function=" << func.name() << " " ; | | os << "[ function=" << func.name() << " " ; | |
| for (Int_t i=0 ; i<numProxies() ; i++) { | | for (Int_t i=0 ; i<numProxies() ; i++) { | |
| RooAbsProxy* p = getProxy(i) ; | | RooAbsProxy* p = getProxy(i) ; | |
| if (!TString(p->name()).BeginsWith("!")) { | | if (!TString(p->name()).BeginsWith("!")) { | |
| p->print(os) ; | | p->print(os) ; | |
| os << " " ; | | os << " " ; | |
| } | | } | |
| } | | } | |
| os << "]" ; | | os << "]" ; | |
| | | | |
| skipping to change at line 296 | | skipping to change at line 296 | |
| class RooCFunction4PdfBinding : public RooAbsPdf { | | class RooCFunction4PdfBinding : public RooAbsPdf { | |
| public: | | public: | |
| RooCFunction4PdfBinding() { | | RooCFunction4PdfBinding() { | |
| // Default constructor | | // Default constructor | |
| } ; | | } ; | |
| RooCFunction4PdfBinding(const char *name, const char *title, VO (*_func)(
VI1,VI2,VI3,VI4), RooAbsReal& _x, RooAbsReal& _y, RooAbsReal& _z, RooAbsRea
l& _w); | | RooCFunction4PdfBinding(const char *name, const char *title, VO (*_func)(
VI1,VI2,VI3,VI4), RooAbsReal& _x, RooAbsReal& _y, RooAbsReal& _z, RooAbsRea
l& _w); | |
| RooCFunction4PdfBinding(const RooCFunction4PdfBinding& other, const char*
name=0) ; | | RooCFunction4PdfBinding(const RooCFunction4PdfBinding& other, const char*
name=0) ; | |
| virtual TObject* clone(const char* newname) const { return new RooCFuncti
on4PdfBinding(*this,newname); } | | virtual TObject* clone(const char* newname) const { return new RooCFuncti
on4PdfBinding(*this,newname); } | |
| inline virtual ~RooCFunction4PdfBinding() { } | | inline virtual ~RooCFunction4PdfBinding() { } | |
| | | | |
|
| void printArgs(ostream& os) const { | | void printArgs(std::ostream& os) const { | |
| // Print object arguments and name/address of function pointer | | // Print object arguments and name/address of function pointer | |
| os << "[ function=" << func.name() << " " ; | | os << "[ function=" << func.name() << " " ; | |
| for (Int_t i=0 ; i<numProxies() ; i++) { | | for (Int_t i=0 ; i<numProxies() ; i++) { | |
| RooAbsProxy* p = getProxy(i) ; | | RooAbsProxy* p = getProxy(i) ; | |
| if (!TString(p->name()).BeginsWith("!")) { | | if (!TString(p->name()).BeginsWith("!")) { | |
| p->print(os) ; | | p->print(os) ; | |
| os << " " ; | | os << " " ; | |
| } | | } | |
| } | | } | |
| os << "]" ; | | os << "]" ; | |
| | | | |
End of changes. 6 change blocks. |
| 6 lines changed or deleted | | 6 lines changed or added | |
|
| RooFunctor1DBinding.h | | RooFunctor1DBinding.h | |
| /**************************************************************************
*** | | /**************************************************************************
*** | |
| * Project: RooFit
* | | * Project: RooFit
* | |
| * Package: RooFitCore
* | | * Package: RooFitCore
* | |
|
| * File: $Id: RooFunctor1DBinding.h 42984 2012-02-13 15:30:31Z wouter $ | | * File: $Id: RooFunctor1DBinding.h 44982 2012-07-10 08:36:13Z moneta $ | |
| * Authors:
* | | * Authors:
* | |
| * WV, Wouter Verkerke, NIKHEF, verkerke@nikhef.nl
* | | * WV, Wouter Verkerke, NIKHEF, verkerke@nikhef.nl
* | |
| *
* | | *
* | |
| * Copyright (c) 2000-2008, NIKHEF, Regents of the University of California
* | | * Copyright (c) 2000-2008, NIKHEF, Regents of the University of California
* | |
| * and Stanford University. All rights reserved.
* | | * and Stanford University. All rights reserved.
* | |
| *
* | | *
* | |
| **************************************************************************
***/ | | **************************************************************************
***/ | |
| | | | |
| #ifndef ROOFUNCTOR1DBINDING | | #ifndef ROOFUNCTOR1DBINDING | |
| #define ROOFUNCTOR1DBINDING | | #define ROOFUNCTOR1DBINDING | |
| | | | |
| skipping to change at line 44 | | skipping to change at line 44 | |
| | | | |
| class RooFunctor1DBinding : public RooAbsReal { | | class RooFunctor1DBinding : public RooAbsReal { | |
| public: | | public: | |
| RooFunctor1DBinding() : func(0) { | | RooFunctor1DBinding() : func(0) { | |
| // Default constructor | | // Default constructor | |
| } ; | | } ; | |
| RooFunctor1DBinding(const char *name, const char *title, const ROOT::Math
::IBaseFunctionOneDim& ftor, RooAbsReal& var); | | RooFunctor1DBinding(const char *name, const char *title, const ROOT::Math
::IBaseFunctionOneDim& ftor, RooAbsReal& var); | |
| RooFunctor1DBinding(const RooFunctor1DBinding& other, const char* name=0)
; | | RooFunctor1DBinding(const RooFunctor1DBinding& other, const char* name=0)
; | |
| virtual TObject* clone(const char* newname) const { return new RooFunctor
1DBinding(*this,newname); } | | virtual TObject* clone(const char* newname) const { return new RooFunctor
1DBinding(*this,newname); } | |
| inline virtual ~RooFunctor1DBinding() {} | | inline virtual ~RooFunctor1DBinding() {} | |
|
| void printArgs(ostream& os) const ; | | void printArgs(std::ostream& os) const ; | |
| | | | |
| protected: | | protected: | |
| | | | |
| Double_t evaluate() const ; | | Double_t evaluate() const ; | |
| | | | |
| const ROOT::Math::IBaseFunctionOneDim* func ; // Functor | | const ROOT::Math::IBaseFunctionOneDim* func ; // Functor | |
| RooRealProxy var ; // Argument reference | | RooRealProxy var ; // Argument reference | |
| | | | |
| private: | | private: | |
| | | | |
| | | | |
| skipping to change at line 67 | | skipping to change at line 67 | |
| | | | |
| class RooFunctor1DPdfBinding : public RooAbsPdf { | | class RooFunctor1DPdfBinding : public RooAbsPdf { | |
| public: | | public: | |
| RooFunctor1DPdfBinding() : func(0) { | | RooFunctor1DPdfBinding() : func(0) { | |
| // Default constructor | | // Default constructor | |
| } ; | | } ; | |
| RooFunctor1DPdfBinding(const char *name, const char *title, const ROOT::M
ath::IBaseFunctionOneDim& ftor, RooAbsReal& vars); | | RooFunctor1DPdfBinding(const char *name, const char *title, const ROOT::M
ath::IBaseFunctionOneDim& ftor, RooAbsReal& vars); | |
| RooFunctor1DPdfBinding(const RooFunctor1DPdfBinding& other, const char* n
ame=0) ; | | RooFunctor1DPdfBinding(const RooFunctor1DPdfBinding& other, const char* n
ame=0) ; | |
| virtual TObject* clone(const char* newname) const { return new RooFunctor
1DPdfBinding(*this,newname); } | | virtual TObject* clone(const char* newname) const { return new RooFunctor
1DPdfBinding(*this,newname); } | |
| inline virtual ~RooFunctor1DPdfBinding() {} | | inline virtual ~RooFunctor1DPdfBinding() {} | |
|
| void printArgs(ostream& os) const ; | | void printArgs(std::ostream& os) const ; | |
| | | | |
| protected: | | protected: | |
| | | | |
| Double_t evaluate() const ; | | Double_t evaluate() const ; | |
| | | | |
| const ROOT::Math::IBaseFunctionOneDim* func ; // Functor | | const ROOT::Math::IBaseFunctionOneDim* func ; // Functor | |
| RooRealProxy var ; // Argument reference | | RooRealProxy var ; // Argument reference | |
| | | | |
| private: | | private: | |
| | | | |
| | | | |
End of changes. 3 change blocks. |
| 3 lines changed or deleted | | 3 lines changed or added | |
|
| RooFunctorBinding.h | | RooFunctorBinding.h | |
| /**************************************************************************
*** | | /**************************************************************************
*** | |
| * Project: RooFit
* | | * Project: RooFit
* | |
| * Package: RooFitCore
* | | * Package: RooFitCore
* | |
|
| * File: $Id: RooFunctorBinding.h 42984 2012-02-13 15:30:31Z wouter $ | | * File: $Id: RooFunctorBinding.h 44982 2012-07-10 08:36:13Z moneta $ | |
| * Authors:
* | | * Authors:
* | |
| * WV, Wouter Verkerke, NIKHEF, verkerke@nikhef.nl
* | | * WV, Wouter Verkerke, NIKHEF, verkerke@nikhef.nl
* | |
| *
* | | *
* | |
| * Copyright (c) 2000-2008, NIKHEF, Regents of the University of California
* | | * Copyright (c) 2000-2008, NIKHEF, Regents of the University of California
* | |
| * and Stanford University. All rights reserved.
* | | * and Stanford University. All rights reserved.
* | |
| *
* | | *
* | |
| **************************************************************************
***/ | | **************************************************************************
***/ | |
| | | | |
| #ifndef ROOFUNCTORBINDING | | #ifndef ROOFUNCTORBINDING | |
| #define ROOFUNCTORBINDING | | #define ROOFUNCTORBINDING | |
| | | | |
| skipping to change at line 44 | | skipping to change at line 44 | |
| | | | |
| class RooFunctorBinding : public RooAbsReal { | | class RooFunctorBinding : public RooAbsReal { | |
| public: | | public: | |
| RooFunctorBinding() : func(0), x(0) { | | RooFunctorBinding() : func(0), x(0) { | |
| // Default constructor | | // Default constructor | |
| } ; | | } ; | |
| RooFunctorBinding(const char *name, const char *title, const ROOT::Math::
IBaseFunctionMultiDim& ftor, const RooArgList& vars); | | RooFunctorBinding(const char *name, const char *title, const ROOT::Math::
IBaseFunctionMultiDim& ftor, const RooArgList& vars); | |
| RooFunctorBinding(const RooFunctorBinding& other, const char* name=0) ; | | RooFunctorBinding(const RooFunctorBinding& other, const char* name=0) ; | |
| virtual TObject* clone(const char* newname) const { return new RooFunctor
Binding(*this,newname); } | | virtual TObject* clone(const char* newname) const { return new RooFunctor
Binding(*this,newname); } | |
| inline virtual ~RooFunctorBinding() { delete[] x ; } | | inline virtual ~RooFunctorBinding() { delete[] x ; } | |
|
| void printArgs(ostream& os) const ; | | void printArgs(std::ostream& os) const ; | |
| | | | |
| protected: | | protected: | |
| | | | |
| Double_t evaluate() const ; | | Double_t evaluate() const ; | |
| | | | |
| const ROOT::Math::IBaseFunctionMultiDim* func ; // Functor | | const ROOT::Math::IBaseFunctionMultiDim* func ; // Functor | |
| RooListProxy vars ; // Argument reference | | RooListProxy vars ; // Argument reference | |
| Double_t* x ; // Argument value array | | Double_t* x ; // Argument value array | |
| | | | |
| private: | | private: | |
| | | | |
| skipping to change at line 68 | | skipping to change at line 68 | |
| | | | |
| class RooFunctorPdfBinding : public RooAbsPdf { | | class RooFunctorPdfBinding : public RooAbsPdf { | |
| public: | | public: | |
| RooFunctorPdfBinding() : func(0), x(0) { | | RooFunctorPdfBinding() : func(0), x(0) { | |
| // Default constructor | | // Default constructor | |
| } ; | | } ; | |
| RooFunctorPdfBinding(const char *name, const char *title, const ROOT::Mat
h::IBaseFunctionMultiDim& ftor, const RooArgList& vars); | | RooFunctorPdfBinding(const char *name, const char *title, const ROOT::Mat
h::IBaseFunctionMultiDim& ftor, const RooArgList& vars); | |
| RooFunctorPdfBinding(const RooFunctorPdfBinding& other, const char* name=
0) ; | | RooFunctorPdfBinding(const RooFunctorPdfBinding& other, const char* name=
0) ; | |
| virtual TObject* clone(const char* newname) const { return new RooFunctor
PdfBinding(*this,newname); } | | virtual TObject* clone(const char* newname) const { return new RooFunctor
PdfBinding(*this,newname); } | |
| inline virtual ~RooFunctorPdfBinding() { delete[] x ; } | | inline virtual ~RooFunctorPdfBinding() { delete[] x ; } | |
|
| void printArgs(ostream& os) const ; | | void printArgs(std::ostream& os) const ; | |
| | | | |
| protected: | | protected: | |
| | | | |
| Double_t evaluate() const ; | | Double_t evaluate() const ; | |
| | | | |
| const ROOT::Math::IBaseFunctionMultiDim* func ; // Functor | | const ROOT::Math::IBaseFunctionMultiDim* func ; // Functor | |
| RooListProxy vars ; // Argument reference | | RooListProxy vars ; // Argument reference | |
| Double_t* x ; // Argument value array | | Double_t* x ; // Argument value array | |
| | | | |
| private: | | private: | |
| | | | |
End of changes. 3 change blocks. |
| 3 lines changed or deleted | | 3 lines changed or added | |
|
| RooHist.h | | RooHist.h | |
| | | | |
| skipping to change at line 56 | | skipping to change at line 56 | |
| // add a datapoint for the asymmetry (n1-n2)/(n1+n2), using a binomial er
ror | | // add a datapoint for the asymmetry (n1-n2)/(n1+n2), using a binomial er
ror | |
| void addAsymmetryBin(Axis_t binCenter, Int_t n1, Int_t n2, Double_t binWi
dth= 0, Double_t xErrorFrac=1.0, Double_t scaleFactor=1.0); | | void addAsymmetryBin(Axis_t binCenter, Int_t n1, Int_t n2, Double_t binWi
dth= 0, Double_t xErrorFrac=1.0, Double_t scaleFactor=1.0); | |
| // add a datapoint for the asymmetry (n1-n2)/(n1+n2), using sum-of-weight
s error | | // add a datapoint for the asymmetry (n1-n2)/(n1+n2), using sum-of-weight
s error | |
| void addAsymmetryBinWithError(Axis_t binCenter, Double_t n1, Double_t n2,
Double_t en1, Double_t en2, Double_t binWidth= 0, Double_t xErrorFrac=1.0,
Double_t scaleFactor=1.0); | | void addAsymmetryBinWithError(Axis_t binCenter, Double_t n1, Double_t n2,
Double_t en1, Double_t en2, Double_t binWidth= 0, Double_t xErrorFrac=1.0,
Double_t scaleFactor=1.0); | |
| | | | |
| // add a datapoint for the efficiency (n1)/(n1+n2), using a binomial erro
r | | // add a datapoint for the efficiency (n1)/(n1+n2), using a binomial erro
r | |
| void addEfficiencyBin(Axis_t binCenter, Int_t n1, Int_t n2, Double_t binW
idth= 0, Double_t xErrorFrac=1.0, Double_t scaleFactor=1.0); | | void addEfficiencyBin(Axis_t binCenter, Int_t n1, Int_t n2, Double_t binW
idth= 0, Double_t xErrorFrac=1.0, Double_t scaleFactor=1.0); | |
| // add a datapoint for the efficiency (n1)/(n1+n2), using a sum-of-weight
s error | | // add a datapoint for the efficiency (n1)/(n1+n2), using a sum-of-weight
s error | |
| void addEfficiencyBinWithError(Axis_t binCenter, Double_t n1, Double_t n2
, Double_t en1, Double_t en2, Double_t binWidth= 0, Double_t xErrorFrac=1.0
, Double_t scaleFactor=1.0); | | void addEfficiencyBinWithError(Axis_t binCenter, Double_t n1, Double_t n2
, Double_t en1, Double_t en2, Double_t binWidth= 0, Double_t xErrorFrac=1.0
, Double_t scaleFactor=1.0); | |
| | | | |
|
| virtual void printName(ostream& os) const ; | | virtual void printName(std::ostream& os) const ; | |
| virtual void printTitle(ostream& os) const ; | | virtual void printTitle(std::ostream& os) const ; | |
| virtual void printClassName(ostream& os) const ; | | virtual void printClassName(std::ostream& os) const ; | |
| virtual void printMultiline(ostream& os, Int_t content, Bool_t verbose=kF | | virtual void printMultiline(std::ostream& os, Int_t content, Bool_t verbo | |
| ALSE, TString indent= "") const; | | se=kFALSE, TString indent= "") const; | |
| | | | |
| inline virtual void Print(Option_t *options= 0) const { | | inline virtual void Print(Option_t *options= 0) const { | |
| // Printing interface | | // Printing interface | |
| printStream(defaultPrintStream(),defaultPrintContents(options),defaultP
rintStyle(options)); | | printStream(defaultPrintStream(),defaultPrintContents(options),defaultP
rintStyle(options)); | |
| } | | } | |
| | | | |
| Double_t getFitRangeNEvt() const; | | Double_t getFitRangeNEvt() const; | |
| Double_t getFitRangeNEvt(Double_t xlo, Double_t xhi) const ; | | Double_t getFitRangeNEvt(Double_t xlo, Double_t xhi) const ; | |
| Double_t getFitRangeBinW() const; | | Double_t getFitRangeBinW() const; | |
| inline Double_t getNominalBinWidth() const { return _nominalBinWidth; } | | inline Double_t getNominalBinWidth() const { return _nominalBinWidth; } | |
| | | | |
End of changes. 1 change blocks. |
| 5 lines changed or deleted | | 5 lines changed or added | |
|
| RooMappedCategory.h | | RooMappedCategory.h | |
| | | | |
| skipping to change at line 41 | | skipping to change at line 41 | |
| inline RooMappedCategory() : _defCat(0) { } | | inline RooMappedCategory() : _defCat(0) { } | |
| RooMappedCategory(const char *name, const char *title, RooAbsCategory& in
putCat, const char* defCatName="NotMapped", Int_t defCatIdx=NoCatIdx); | | RooMappedCategory(const char *name, const char *title, RooAbsCategory& in
putCat, const char* defCatName="NotMapped", Int_t defCatIdx=NoCatIdx); | |
| RooMappedCategory(const RooMappedCategory& other, const char *name=0) ; | | RooMappedCategory(const RooMappedCategory& other, const char *name=0) ; | |
| virtual TObject* clone(const char* newname) const { return new RooMappedC
ategory(*this,newname); } | | virtual TObject* clone(const char* newname) const { return new RooMappedC
ategory(*this,newname); } | |
| virtual ~RooMappedCategory(); | | virtual ~RooMappedCategory(); | |
| | | | |
| // Mapping function | | // Mapping function | |
| Bool_t map(const char* inKeyRegExp, const char* outKeyName, Int_t outKeyN
um=NoCatIdx) ; | | Bool_t map(const char* inKeyRegExp, const char* outKeyName, Int_t outKeyN
um=NoCatIdx) ; | |
| | | | |
| // Printing interface (human readable) | | // Printing interface (human readable) | |
|
| void printMultiline(ostream& os, Int_t content, Bool_t verbose=kFALSE, TS | | void printMultiline(std::ostream& os, Int_t content, Bool_t verbose=kFALS | |
| tring indent="") const ; | | E, TString indent="") const ; | |
| void printMetaArgs(ostream& os) const ; | | void printMetaArgs(std::ostream& os) const ; | |
| | | | |
| // I/O streaming interface (machine readable) | | // I/O streaming interface (machine readable) | |
|
| virtual Bool_t readFromStream(istream& is, Bool_t compact, Bool_t verbose | | virtual Bool_t readFromStream(std::istream& is, Bool_t compact, Bool_t ve | |
| =kFALSE) ; | | rbose=kFALSE) ; | |
| virtual void writeToStream(ostream& os, Bool_t compact) const ; | | virtual void writeToStream(std::ostream& os, Bool_t compact) const ; | |
| | | | |
| class Entry { | | class Entry { | |
| public: | | public: | |
| inline Entry() : _regexp(0), _cat() {} | | inline Entry() : _regexp(0), _cat() {} | |
| virtual ~Entry() { delete _regexp ; } ; | | virtual ~Entry() { delete _regexp ; } ; | |
| Entry(const char* exp, const RooCatType* cat) : _expr(exp), _regexp(new
TRegexp(mangle(exp),kTRUE)), _cat(*cat) {} | | Entry(const char* exp, const RooCatType* cat) : _expr(exp), _regexp(new
TRegexp(mangle(exp),kTRUE)), _cat(*cat) {} | |
| Entry(const Entry& other) : _expr(other._expr), _regexp(new TRegexp(man
gle(other._expr.Data()),kTRUE)), _cat(other._cat) {} | | Entry(const Entry& other) : _expr(other._expr), _regexp(new TRegexp(man
gle(other._expr.Data()),kTRUE)), _cat(other._cat) {} | |
| inline Bool_t ok() { return (_regexp->Status()==TRegexp::kOK) ; } | | inline Bool_t ok() { return (_regexp->Status()==TRegexp::kOK) ; } | |
| Bool_t match(const char* testPattern) const { return (TString(testPatte
rn).Index(*_regexp)>=0) ; } | | Bool_t match(const char* testPattern) const { return (TString(testPatte
rn).Index(*_regexp)>=0) ; } | |
| inline const RooCatType& outCat() const { return _cat ; } | | inline const RooCatType& outCat() const { return _cat ; } | |
| | | | |
End of changes. 2 change blocks. |
| 6 lines changed or deleted | | 6 lines changed or added | |
|
| RooMinimizerFcn.h | | RooMinimizerFcn.h | |
| /**************************************************************************
*** | | /**************************************************************************
*** | |
| * Project: RooFit
* | | * Project: RooFit
* | |
| * Package: RooFitCore
* | | * Package: RooFitCore
* | |
|
| * @(#)root/roofitcore:$Id: RooMinimizerFcn.h 44381 2012-05-31 06:45:52Z mo
neta $ | | * @(#)root/roofitcore:$Id: RooMinimizerFcn.h 44982 2012-07-10 08:36:13Z mo
neta $ | |
| * Authors:
* | | * Authors:
* | |
| * AL, Alfio Lazzaro, INFN Milan, alfio.lazzaro@mi.infn.it
* | | * AL, Alfio Lazzaro, INFN Milan, alfio.lazzaro@mi.infn.it
* | |
| *
* | | *
* | |
| *
* | | *
* | |
| * Redistribution and use in source and binary forms,
* | | * Redistribution and use in source and binary forms,
* | |
| * with or without modification, are permitted according to the terms
* | | * with or without modification, are permitted according to the terms
* | |
| * listed in LICENSE (http://roofit.sourceforge.net/license.txt)
* | | * listed in LICENSE (http://roofit.sourceforge.net/license.txt)
* | |
| **************************************************************************
***/ | | **************************************************************************
***/ | |
| | | | |
| #ifndef __ROOFIT_NOROOMINIMIZER | | #ifndef __ROOFIT_NOROOMINIMIZER | |
| | | | |
| skipping to change at line 52 | | skipping to change at line 52 | |
| virtual unsigned int NDim() const { return _nDim; } | | virtual unsigned int NDim() const { return _nDim; } | |
| | | | |
| RooArgList* GetFloatParamList() { return _floatParamList; } | | RooArgList* GetFloatParamList() { return _floatParamList; } | |
| RooArgList* GetConstParamList() { return _constParamList; } | | RooArgList* GetConstParamList() { return _constParamList; } | |
| RooArgList* GetInitFloatParamList() { return _initFloatParamList; } | | RooArgList* GetInitFloatParamList() { return _initFloatParamList; } | |
| RooArgList* GetInitConstParamList() { return _initConstParamList; } | | RooArgList* GetInitConstParamList() { return _initConstParamList; } | |
| | | | |
| void SetEvalErrorWall(Bool_t flag) { _doEvalErrorWall = flag ; } | | void SetEvalErrorWall(Bool_t flag) { _doEvalErrorWall = flag ; } | |
| void SetPrintEvalErrors(Int_t numEvalErrors) { _printEvalErrors = numEval
Errors ; } | | void SetPrintEvalErrors(Int_t numEvalErrors) { _printEvalErrors = numEval
Errors ; } | |
| Bool_t SetLogFile(const char* inLogfile); | | Bool_t SetLogFile(const char* inLogfile); | |
|
| ofstream* GetLogFile() { return _logfile; } | | std::ofstream* GetLogFile() { return _logfile; } | |
| void SetVerbose(Bool_t flag=kTRUE) { _verbose = flag ; } | | void SetVerbose(Bool_t flag=kTRUE) { _verbose = flag ; } | |
| | | | |
| Double_t& GetMaxFCN() { return _maxFCN; } | | Double_t& GetMaxFCN() { return _maxFCN; } | |
| Int_t GetNumInvalidNLL() { return _numBadNLL; } | | Int_t GetNumInvalidNLL() { return _numBadNLL; } | |
| | | | |
| Bool_t Synchronize(std::vector<ROOT::Fit::ParameterSettings>& parameters, | | Bool_t Synchronize(std::vector<ROOT::Fit::ParameterSettings>& parameters, | |
| Bool_t optConst, Bool_t verbose); | | Bool_t optConst, Bool_t verbose); | |
| void BackProp(const ROOT::Fit::FitResult &results); | | void BackProp(const ROOT::Fit::FitResult &results); | |
| void ApplyCovarianceMatrix(TMatrixDSym& V); | | void ApplyCovarianceMatrix(TMatrixDSym& V); | |
| | | | |
| | | | |
| skipping to change at line 87 | | skipping to change at line 87 | |
| | | | |
| RooAbsReal *_funct; | | RooAbsReal *_funct; | |
| RooMinimizer *_context; | | RooMinimizer *_context; | |
| | | | |
| mutable double _maxFCN; | | mutable double _maxFCN; | |
| mutable int _numBadNLL; | | mutable int _numBadNLL; | |
| mutable int _printEvalErrors; | | mutable int _printEvalErrors; | |
| Bool_t _doEvalErrorWall; | | Bool_t _doEvalErrorWall; | |
| | | | |
| int _nDim; | | int _nDim; | |
|
| ofstream *_logfile; | | std::ofstream *_logfile; | |
| bool _verbose; | | bool _verbose; | |
| | | | |
| RooArgList* _floatParamList; | | RooArgList* _floatParamList; | |
| std::vector<RooAbsArg*> _floatParamVec ; | | std::vector<RooAbsArg*> _floatParamVec ; | |
| RooArgList* _constParamList; | | RooArgList* _constParamList; | |
| RooArgList* _initFloatParamList; | | RooArgList* _initFloatParamList; | |
| RooArgList* _initConstParamList; | | RooArgList* _initConstParamList; | |
| | | | |
| }; | | }; | |
| | | | |
| | | | |
End of changes. 3 change blocks. |
| 3 lines changed or deleted | | 3 lines changed or added | |
|
| RooMsgService.h | | RooMsgService.h | |
| | | | |
| skipping to change at line 138 | | skipping to change at line 138 | |
| | | | |
| RooFit::MsgLevel minLevel ; | | RooFit::MsgLevel minLevel ; | |
| Int_t topic ; | | Int_t topic ; | |
| std::string objectName ; | | std::string objectName ; | |
| std::string className ; | | std::string className ; | |
| std::string baseClassName ; | | std::string baseClassName ; | |
| std::string tagName ; | | std::string tagName ; | |
| Color_t color ; | | Color_t color ; | |
| Bool_t prefix ; | | Bool_t prefix ; | |
| | | | |
|
| ostream* os ; | | std::ostream* os ; | |
| | | | |
| } ; | | } ; | |
| | | | |
| // Access to instance | | // Access to instance | |
| static RooMsgService& instance() ; | | static RooMsgService& instance() ; | |
| static Bool_t anyDebug() ; | | static Bool_t anyDebug() ; | |
| | | | |
| // User interface -- Add or delete reporting streams ; | | // User interface -- Add or delete reporting streams ; | |
| Int_t addStream(RooFit::MsgLevel level, const RooCmdArg& arg1=RooCmdArg()
, const RooCmdArg& arg2=RooCmdArg(), const RooCmdArg& arg3=RooCmdArg(), | | Int_t addStream(RooFit::MsgLevel level, const RooCmdArg& arg1=RooCmdArg()
, const RooCmdArg& arg2=RooCmdArg(), const RooCmdArg& arg3=RooCmdArg(), | |
| const RooCmdArg& arg4=RooCmdArg(), const R
ooCmdArg& arg5=RooCmdArg(), const RooCmdArg& arg6=RooCmdArg()); | | const RooCmdArg& arg4=RooCmdArg(), const R
ooCmdArg& arg5=RooCmdArg(), const RooCmdArg& arg6=RooCmdArg()); | |
| | | | |
| skipping to change at line 165 | | skipping to change at line 165 | |
| | | | |
| void reset() { cleanup() ; } | | void reset() { cleanup() ; } | |
| | | | |
| void setGlobalKillBelow(RooFit::MsgLevel level) { _globMinLevel = level ;
} | | void setGlobalKillBelow(RooFit::MsgLevel level) { _globMinLevel = level ;
} | |
| RooFit::MsgLevel globalKillBelow() const { return _globMinLevel ; } | | RooFit::MsgLevel globalKillBelow() const { return _globMinLevel ; } | |
| | | | |
| void Print(Option_t *options= 0) const ; | | void Print(Option_t *options= 0) const ; | |
| void showPid(Bool_t flag) { _showPid = flag ; } | | void showPid(Bool_t flag) { _showPid = flag ; } | |
| | | | |
| // Back end -- Send message or check if particular logging configuration
is active | | // Back end -- Send message or check if particular logging configuration
is active | |
|
| ostream& log(const RooAbsArg* self, RooFit::MsgLevel level, RooFit::MsgTo | | std::ostream& log(const RooAbsArg* self, RooFit::MsgLevel level, RooFit:: | |
| pic facility, Bool_t forceSkipPrefix=kFALSE) ; | | MsgTopic facility, Bool_t forceSkipPrefix=kFALSE) ; | |
| ostream& log(const TObject* self, RooFit::MsgLevel level, RooFit::MsgTopi | | std::ostream& log(const TObject* self, RooFit::MsgLevel level, RooFit::Ms | |
| c facility, Bool_t forceSkipPrefix=kFALSE) ; | | gTopic facility, Bool_t forceSkipPrefix=kFALSE) ; | |
| Bool_t isActive(const RooAbsArg* self, RooFit::MsgTopic facility, RooFit:
:MsgLevel level) ; | | Bool_t isActive(const RooAbsArg* self, RooFit::MsgTopic facility, RooFit:
:MsgLevel level) ; | |
| Bool_t isActive(const TObject* self, RooFit::MsgTopic facility, RooFit::M
sgLevel level) ; | | Bool_t isActive(const TObject* self, RooFit::MsgTopic facility, RooFit::M
sgLevel level) ; | |
| | | | |
| static Int_t _debugCount ; | | static Int_t _debugCount ; | |
| std::map<int,std::string> _levelNames ; | | std::map<int,std::string> _levelNames ; | |
| std::map<int,std::string> _topicNames ; | | std::map<int,std::string> _topicNames ; | |
| | | | |
| static void cleanup() ; | | static void cleanup() ; | |
| | | | |
| // Print level support for RooFit-related messages that are not routed th
rough RooMsgService (such as Minuit printouts) | | // Print level support for RooFit-related messages that are not routed th
rough RooMsgService (such as Minuit printouts) | |
| | | | |
End of changes. 2 change blocks. |
| 5 lines changed or deleted | | 5 lines changed or added | |
|
| RooNumGenConfig.h | | RooNumGenConfig.h | |
| /**************************************************************************
*** | | /**************************************************************************
*** | |
| * Project: RooFit
* | | * Project: RooFit
* | |
| * Package: RooFitCore
* | | * Package: RooFitCore
* | |
|
| * File: $Id: RooNumGenConfig.h 28259 2009-04-16 16:21:16Z wouter $ | | * File: $Id: RooNumGenConfig.h 44982 2012-07-10 08:36:13Z moneta $ | |
| * 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 47 | | skipping to change at line 47 | |
| const RooCategory& method1D(Bool_t cond, Bool_t cat) const ; | | const RooCategory& method1D(Bool_t cond, Bool_t cat) const ; | |
| const RooCategory& method2D(Bool_t cond, Bool_t cat) const ; | | const RooCategory& method2D(Bool_t cond, Bool_t cat) const ; | |
| const RooCategory& methodND(Bool_t cond, Bool_t cat) const ; | | const RooCategory& methodND(Bool_t cond, Bool_t cat) const ; | |
| | | | |
| static RooNumGenConfig& defaultConfig() ; | | static RooNumGenConfig& defaultConfig() ; | |
| | | | |
| Bool_t addConfigSection(const RooAbsNumGenerator* proto, const RooArgSet&
defaultConfig) ; | | Bool_t addConfigSection(const RooAbsNumGenerator* proto, const RooArgSet&
defaultConfig) ; | |
| const RooArgSet& getConfigSection(const char* name) const ; | | const RooArgSet& getConfigSection(const char* name) const ; | |
| RooArgSet& getConfigSection(const char* name) ; | | RooArgSet& getConfigSection(const char* name) ; | |
| | | | |
|
| void printMultiline(ostream &os, Int_t content, Bool_t verbose, TString i
ndent= "") const; | | void printMultiline(std::ostream &os, Int_t content, Bool_t verbose, TStr
ing indent= "") const; | |
| | | | |
| inline virtual void Print(Option_t *options= 0) const { | | inline virtual void Print(Option_t *options= 0) const { | |
| printStream(defaultPrintStream(),defaultPrintContents(options),defaultP
rintStyle(options)); | | printStream(defaultPrintStream(),defaultPrintContents(options),defaultP
rintStyle(options)); | |
| } | | } | |
| virtual StyleOption defaultPrintStyle(Option_t* opt) const ; | | virtual StyleOption defaultPrintStyle(Option_t* opt) const ; | |
| | | | |
| static void cleanup() ; | | static void cleanup() ; | |
| | | | |
| protected: | | protected: | |
| | | | |
| | | | |
End of changes. 2 change blocks. |
| 2 lines changed or deleted | | 2 lines changed or added | |
|
| RooParamBinning.h | | RooParamBinning.h | |
| /**************************************************************************
*** | | /**************************************************************************
*** | |
| * Project: RooFit
* | | * Project: RooFit
* | |
| * Package: RooFitCore
* | | * Package: RooFitCore
* | |
|
| * File: $Id: RooParamBinning.h 28285 2009-04-20 14:33:36Z wouter $ | | * File: $Id: RooParamBinning.h 44982 2012-07-10 08:36:13Z moneta $ | |
| * 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 50 | | skipping to change at line 50 | |
| virtual Double_t highBound() const { return xhi()->getVal() ; } | | virtual Double_t highBound() const { return xhi()->getVal() ; } | |
| | | | |
| virtual Double_t binCenter(Int_t bin) const ; | | virtual Double_t binCenter(Int_t bin) const ; | |
| virtual Double_t binWidth(Int_t bin) const ; | | virtual Double_t binWidth(Int_t bin) const ; | |
| virtual Double_t binLow(Int_t bin) const ; | | virtual Double_t binLow(Int_t bin) const ; | |
| virtual Double_t binHigh(Int_t bin) const ; | | virtual Double_t binHigh(Int_t bin) const ; | |
| | | | |
| virtual Double_t averageBinWidth() const { return _binw ; } | | virtual Double_t averageBinWidth() const { return _binw ; } | |
| virtual Double_t* array() const ; | | virtual Double_t* array() const ; | |
| | | | |
|
| void printMultiline(ostream &os, Int_t content, Bool_t verbose=kFALSE, TS
tring indent="") const ; | | void printMultiline(std::ostream &os, Int_t content, Bool_t verbose=kFALS
E, TString indent="") const ; | |
| | | | |
| virtual void insertHook(RooAbsRealLValue&) const ; | | virtual void insertHook(RooAbsRealLValue&) const ; | |
| virtual void removeHook(RooAbsRealLValue&) const ; | | virtual void removeHook(RooAbsRealLValue&) const ; | |
| | | | |
| virtual Bool_t isShareable() const { return kFALSE ; } // parameterized b
inning cannot be shared across instances | | virtual Bool_t isShareable() const { return kFALSE ; } // parameterized b
inning cannot be shared across instances | |
| virtual Bool_t isParameterized() const { return kTRUE ; } // binning is p
arameterized, range will need special handling in integration | | virtual Bool_t isParameterized() const { return kTRUE ; } // binning is p
arameterized, range will need special handling in integration | |
| virtual RooAbsReal* lowBoundFunc() const { return xlo() ; } | | virtual RooAbsReal* lowBoundFunc() const { return xlo() ; } | |
| virtual RooAbsReal* highBoundFunc() const { return xhi() ; } | | virtual RooAbsReal* highBoundFunc() const { return xhi() ; } | |
| | | | |
| protected: | | protected: | |
| | | | |
End of changes. 2 change blocks. |
| 2 lines changed or deleted | | 2 lines changed or added | |
|
| RooPrintable.h | | RooPrintable.h | |
| | | | |
| skipping to change at line 35 | | skipping to change at line 35 | |
| class RooPrintable { | | class RooPrintable { | |
| public: | | public: | |
| inline RooPrintable() { } | | inline RooPrintable() { } | |
| inline virtual ~RooPrintable() { } | | inline virtual ~RooPrintable() { } | |
| | | | |
| // New-style printing | | // New-style printing | |
| | | | |
| // Master print function | | // Master print function | |
| enum ContentsOption { kName=1, kClassName=2, kValue=4, kArgs=8, kExtras=1
6, kAddress=32, kTitle=64, kCollectionHeader=128} ; // Can be ORed | | enum ContentsOption { kName=1, kClassName=2, kValue=4, kArgs=8, kExtras=1
6, kAddress=32, kTitle=64, kCollectionHeader=128} ; // Can be ORed | |
| enum StyleOption { kInline=1, kSingleLine=2, kStandard=3, kVerbose=4, kTr
eeStructure=5 } ; // Exclusive | | enum StyleOption { kInline=1, kSingleLine=2, kStandard=3, kVerbose=4, kTr
eeStructure=5 } ; // Exclusive | |
|
| virtual void printStream(ostream& os, Int_t contents, StyleOption style,
TString indent="") const ; | | virtual void printStream(std::ostream& os, Int_t contents, StyleOption st
yle, TString indent="") const ; | |
| | | | |
| // Virtual hook function for class-specific content implementation | | // Virtual hook function for class-specific content implementation | |
|
| virtual void printAddress(ostream& os) const ; | | virtual void printAddress(std::ostream& os) const ; | |
| virtual void printName(ostream& os) const ; | | virtual void printName(std::ostream& os) const ; | |
| virtual void printTitle(ostream& os) const ; | | virtual void printTitle(std::ostream& os) const ; | |
| virtual void printClassName(ostream& os) const ; | | virtual void printClassName(std::ostream& os) const ; | |
| virtual void printValue(ostream& os) const ; | | virtual void printValue(std::ostream& os) const ; | |
| virtual void printArgs(ostream& os) const ; | | virtual void printArgs(std::ostream& os) const ; | |
| virtual void printExtras(ostream& os) const ; | | virtual void printExtras(std::ostream& os) const ; | |
| virtual void printMultiline(ostream& os, Int_t contents, Bool_t verbose=k | | virtual void printMultiline(std::ostream& os, Int_t contents, Bool_t verb | |
| FALSE, TString indent="") const ; | | ose=kFALSE, TString indent="") const ; | |
| virtual void printTree(ostream& os, TString indent="") const ; | | virtual void printTree(std::ostream& os, TString indent="") const ; | |
| | | | |
|
| static ostream& defaultPrintStream(ostream *os= 0); | | static std::ostream& defaultPrintStream(std::ostream *os= 0); | |
| virtual Int_t defaultPrintContents(Option_t* opt) const ; | | virtual Int_t defaultPrintContents(Option_t* opt) const ; | |
| virtual StyleOption defaultPrintStyle(Option_t* opt) const ; | | virtual StyleOption defaultPrintStyle(Option_t* opt) const ; | |
| | | | |
| // Formatting control | | // Formatting control | |
| static void nameFieldLength(Int_t newLen) ; | | static void nameFieldLength(Int_t newLen) ; | |
| | | | |
| protected: | | protected: | |
| | | | |
| static Int_t _nameLength ; | | static Int_t _nameLength ; | |
| | | | |
| ClassDef(RooPrintable,1) // Interface for printable objects | | ClassDef(RooPrintable,1) // Interface for printable objects | |
| | | | |
| }; | | }; | |
| | | | |
| namespace RooFit { | | namespace RooFit { | |
|
| ostream& operator<<(ostream& os, const RooPrintable& rp) ; | | std::ostream& operator<<(std::ostream& os, const RooPrintable& rp) ; | |
| } | | } | |
| | | | |
| #ifndef __CINT__ | | #ifndef __CINT__ | |
| using RooFit::operator<< ; | | using RooFit::operator<< ; | |
| #endif | | #endif | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 4 change blocks. |
| 13 lines changed or deleted | | 13 lines changed or added | |
|
| RooRealVar.h | | RooRealVar.h | |
| | | | |
| skipping to change at line 89 | | skipping to change at line 89 | |
| Bool_t hasBinning(const char* name) const ; | | Bool_t hasBinning(const char* name) const ; | |
| const RooAbsBinning& getBinning(const char* name=0, Bool_t verbose=kTRUE,
Bool_t createOnTheFly=kFALSE) const ; | | const RooAbsBinning& getBinning(const char* name=0, Bool_t verbose=kTRUE,
Bool_t createOnTheFly=kFALSE) const ; | |
| RooAbsBinning& getBinning(const char* name=0, Bool_t verbose=kTRUE, Bool_
t createOnTheFly=kFALSE) ; | | RooAbsBinning& getBinning(const char* name=0, Bool_t verbose=kTRUE, Bool_
t createOnTheFly=kFALSE) ; | |
| | | | |
| // Set infinite fit range limits | | // Set infinite fit range limits | |
| inline void removeMin(const char* name=0) { getBinning(name).setMin(-RooN
umber::infinity()) ; } | | inline void removeMin(const char* name=0) { getBinning(name).setMin(-RooN
umber::infinity()) ; } | |
| inline void removeMax(const char* name=0) { getBinning(name).setMax(RooNu
mber::infinity()) ; } | | inline void removeMax(const char* name=0) { getBinning(name).setMax(RooNu
mber::infinity()) ; } | |
| inline void removeRange(const char* name=0) { getBinning(name).setRange(-
RooNumber::infinity(),RooNumber::infinity()) ; } | | inline void removeRange(const char* name=0) { getBinning(name).setRange(-
RooNumber::infinity(),RooNumber::infinity()) ; } | |
| | | | |
| // I/O streaming interface (machine readable) | | // I/O streaming interface (machine readable) | |
|
| virtual Bool_t readFromStream(istream& is, Bool_t compact, Bool_t verbose | | virtual Bool_t readFromStream(std::istream& is, Bool_t compact, Bool_t ve | |
| =kFALSE) ; | | rbose=kFALSE) ; | |
| virtual void writeToStream(ostream& os, Bool_t compact) const ; | | virtual void writeToStream(std::ostream& os, Bool_t compact) const ; | |
| | | | |
| // We implement a fundamental type of AbsArg that can be stored in a data
set | | // We implement a fundamental type of AbsArg that can be stored in a data
set | |
| inline virtual Bool_t isFundamental() const { return kTRUE; } | | inline virtual Bool_t isFundamental() const { return kTRUE; } | |
| | | | |
| // Force to be a leaf-node of any expression tree, even if we have (shape
) servers | | // Force to be a leaf-node of any expression tree, even if we have (shape
) servers | |
| virtual Bool_t isDerived() const { | | virtual Bool_t isDerived() const { | |
| // Does value or shape of this arg depend on any other arg? | | // Does value or shape of this arg depend on any other arg? | |
| return (_serverList.GetSize()>0 || _proxyList.GetSize()>0)?kTRUE:kFALSE
; | | return (_serverList.GetSize()>0 || _proxyList.GetSize()>0)?kTRUE:kFALSE
; | |
| } | | } | |
| | | | |
| // Printing interface (human readable) | | // Printing interface (human readable) | |
|
| virtual void printValue(ostream& os) const ; | | virtual void printValue(std::ostream& os) const ; | |
| virtual void printExtras(ostream& os) const ; | | virtual void printExtras(std::ostream& os) const ; | |
| virtual void printMultiline(ostream& os, Int_t contents, Bool_t verbose=k | | virtual void printMultiline(std::ostream& os, Int_t contents, Bool_t verb | |
| FALSE, TString indent="") const ; | | ose=kFALSE, TString indent="") const ; | |
| virtual Int_t defaultPrintContents(Option_t* opt) const ; | | virtual Int_t defaultPrintContents(Option_t* opt) const ; | |
| | | | |
| TString* format(const RooCmdArg& formatArg) const ; | | TString* format(const RooCmdArg& formatArg) const ; | |
| TString* format(Int_t sigDigits, const char *options) const ; | | TString* format(Int_t sigDigits, const char *options) const ; | |
| | | | |
| static void printScientific(Bool_t flag=kFALSE) ; | | static void printScientific(Bool_t flag=kFALSE) ; | |
| static void printSigDigits(Int_t ndig=5) ; | | static void printSigDigits(Int_t ndig=5) ; | |
| | | | |
| using RooAbsRealLValue::operator= ; | | using RooAbsRealLValue::operator= ; | |
| | | | |
| | | | |
End of changes. 2 change blocks. |
| 7 lines changed or deleted | | 7 lines changed or added | |
|
| RooSimSplitGenContext.h | | RooSimSplitGenContext.h | |
| /**************************************************************************
*** | | /**************************************************************************
*** | |
| * Project: RooFit
* | | * Project: RooFit
* | |
| * Package: RooFitCore
* | | * Package: RooFitCore
* | |
|
| * File: $Id: RooSimSplitGenContext.h 42233 2011-11-24 23:35:45Z wouter
$ | | * File: $Id: RooSimSplitGenContext.h 44982 2012-07-10 08:36:13Z moneta
$ | |
| * 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 36 | | skipping to change at line 36 | |
| class RooAbsCategoryLValue ; | | class RooAbsCategoryLValue ; | |
| | | | |
| class RooSimSplitGenContext : public RooAbsGenContext { | | class RooSimSplitGenContext : public RooAbsGenContext { | |
| public: | | public: | |
| RooSimSplitGenContext(const RooSimultaneous &model, const RooArgSet &vars
, Bool_t _verbose= kFALSE, Bool_t autoBinned=kTRUE, const char* binnedTag="
"); | | RooSimSplitGenContext(const RooSimultaneous &model, const RooArgSet &vars
, Bool_t _verbose= kFALSE, Bool_t autoBinned=kTRUE, const char* binnedTag="
"); | |
| virtual ~RooSimSplitGenContext(); | | virtual ~RooSimSplitGenContext(); | |
| virtual void setProtoDataOrder(Int_t* lut) ; | | virtual void setProtoDataOrder(Int_t* lut) ; | |
| | | | |
| virtual void attach(const RooArgSet& params) ; | | virtual void attach(const RooArgSet& params) ; | |
| | | | |
|
| virtual void printMultiline(ostream &os, Int_t content, Bool_t verbose=kF
ALSE, TString indent="") const ; | | virtual void printMultiline(std::ostream &os, Int_t content, Bool_t verbo
se=kFALSE, TString indent="") const ; | |
| | | | |
|
| virtual RooDataSet *generate(Int_t nEvents= 0, Bool_t skipInit=kFALSE, Bo
ol_t extendedMode=kFALSE); | | virtual RooDataSet *generate(Double_t nEvents= 0, Bool_t skipInit=kFALSE,
Bool_t extendedMode=kFALSE); | |
| | | | |
| virtual void setExpectedData(Bool_t) ; | | virtual void setExpectedData(Bool_t) ; | |
| | | | |
| protected: | | protected: | |
| | | | |
| virtual void initGenerator(const RooArgSet &theEvent); | | virtual void initGenerator(const RooArgSet &theEvent); | |
| virtual void generateEvent(RooArgSet &theEvent, Int_t remaining); | | virtual void generateEvent(RooArgSet &theEvent, Int_t remaining); | |
| | | | |
| RooDataSet* createDataSet(const char* name, const char* title, const RooA
rgSet& obs) ; | | RooDataSet* createDataSet(const char* name, const char* title, const RooA
rgSet& obs) ; | |
| | | | |
| | | | |
End of changes. 3 change blocks. |
| 3 lines changed or deleted | | 3 lines changed or added | |
|
| RooSimWSTool.h | | RooSimWSTool.h | |
| /**************************************************************************
*** | | /**************************************************************************
*** | |
| * Project: RooFit
* | | * Project: RooFit
* | |
| * Package: RooFitCore
* | | * Package: RooFitCore
* | |
|
| * File: $Id: RooSimWSTool.h 36209 2010-10-08 21:37:36Z wouter $ | | * File: $Id: RooSimWSTool.h 44982 2012-07-10 08:36:13Z moneta $ | |
| * 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 136 | | skipping to change at line 136 | |
| protected: | | protected: | |
| | | | |
| friend class RooSimWSTool ; | | friend class RooSimWSTool ; | |
| friend class BuildConfig ; | | friend class BuildConfig ; | |
| friend class MultiBuildConfig ; | | friend class MultiBuildConfig ; | |
| void configure(const RooCmdArg& arg1=RooCmdArg::none(),const RooCmdArg& a
rg2=RooCmdArg::none(), | | void configure(const RooCmdArg& arg1=RooCmdArg::none(),const RooCmdArg& a
rg2=RooCmdArg::none(), | |
| const RooCmdArg& arg3=RooCmdArg::none(),const RooCmdArg& ar
g4=RooCmdArg::none(), | | const RooCmdArg& arg3=RooCmdArg::none(),const RooCmdArg& ar
g4=RooCmdArg::none(), | |
| const RooCmdArg& arg5=RooCmdArg::none(),const RooCmdArg& ar
g6=RooCmdArg::none()) ; | | const RooCmdArg& arg5=RooCmdArg::none(),const RooCmdArg& ar
g6=RooCmdArg::none()) ; | |
| | | | |
| std::list<std::string> _miSta
teNameList ; | | std::list<std::string> _miSta
teNameList ; | |
|
| std::map<std::string, std::pair<std::list<std::string>,std::string> > _pa
ramSplitMap ; //<paramName,<list<splitCatSet>,remainderStateName>> | | std::map<std::string, std::pair<std::list<std::string>,std::string> > _pa
ramSplitMap ; //<paramName,<std::list<splitCatSet>,remainderStateName>> | |
| ClassDef(SplitRule,0) // Split rule specification for prototype p.d.f | | ClassDef(SplitRule,0) // Split rule specification for prototype p.d.f | |
| } ; | | } ; | |
| | | | |
| class RooSimWSTool::ObjSplitRule { | | class RooSimWSTool::ObjSplitRule { | |
| public: | | public: | |
| ObjSplitRule() {} ; | | ObjSplitRule() {} ; | |
| virtual ~ObjSplitRule() ; | | virtual ~ObjSplitRule() ; | |
| | | | |
| protected: | | protected: | |
| friend class RooSimWSTool ; | | friend class RooSimWSTool ; | |
| friend class RooSimWSTool::ObjBuildConfig ; | | friend class RooSimWSTool::ObjBuildConfig ; | |
| std::list<const RooCatType*> _miStateList ; | | std::list<const RooCatType*> _miStateList ; | |
|
| std::map<RooAbsArg*, std::pair<RooArgSet,std::string> > _paramSplitMap ;
//<paramName,<list<splitCatSet>,remainderStateName>> | | std::map<RooAbsArg*, std::pair<RooArgSet,std::string> > _paramSplitMap ;
//<paramName,<std::list<splitCatSet>,remainderStateName>> | |
| ClassDef(ObjSplitRule,0) // Validated RooSimWSTool split rule | | ClassDef(ObjSplitRule,0) // Validated RooSimWSTool split rule | |
| } ; | | } ; | |
| | | | |
| class RooSimWSTool::ObjBuildConfig | | class RooSimWSTool::ObjBuildConfig | |
| { | | { | |
| public: | | public: | |
| ObjBuildConfig() : _masterCat(0) {} ; | | ObjBuildConfig() : _masterCat(0) {} ; | |
| virtual ~ObjBuildConfig() {} ; | | virtual ~ObjBuildConfig() {} ; | |
| void print() ; | | void print() ; | |
| | | | |
| | | | |
End of changes. 3 change blocks. |
| 3 lines changed or deleted | | 3 lines changed or added | |
|
| RooVectorDataStore.h | | RooVectorDataStore.h | |
| /**************************************************************************
*** | | /**************************************************************************
*** | |
| * Project: RooFit
* | | * Project: RooFit
* | |
| * Package: RooFitCore
* | | * Package: RooFitCore
* | |
|
| * File: $Id: RooVectorDataStore.h 44077 2012-05-02 17:10:21Z moneta $ | | * File: $Id: RooVectorDataStore.h 44982 2012-07-10 08:36:13Z moneta $ | |
| * 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 197 | | skipping to change at line 197 | |
| if (!_tracker) return kFALSE ; | | if (!_tracker) return kFALSE ; | |
| return _tracker->hasChanged(kTRUE) ; | | return _tracker->hasChanged(kTRUE) ; | |
| } | | } | |
| | | | |
| void fill() { | | void fill() { | |
| _vec.push_back(*_buf) ; | | _vec.push_back(*_buf) ; | |
| _vec0 = &_vec.front() ; | | _vec0 = &_vec.front() ; | |
| } ; | | } ; | |
| | | | |
| void write(Int_t i) { | | void write(Int_t i) { | |
|
| /* cout << "write(" << this << ") [" << i << "] nativeReal = " << _na
tiveReal << " = " << _nativeReal->GetName() << " real = " << _real << " buf
= " << _buf << " value = " << *_buf << " native getVal() = " << _nativeRea
l->getVal() << " getVal() = " << _real->getVal() << endl ; */ | | /* std::cout << "write(" << this << ") [" << i << "] nativeReal = " <
< _nativeReal << " = " << _nativeReal->GetName() << " real = " << _real <<
" buf = " << _buf << " value = " << *_buf << " native getVal() = " << _nati
veReal->getVal() << " getVal() = " << _real->getVal() << std::endl ; */ | |
| _vec[i] = *_buf ; | | _vec[i] = *_buf ; | |
| } | | } | |
| | | | |
| void reset() { | | void reset() { | |
| _vec.clear() ; | | _vec.clear() ; | |
| _vec0 = &_vec.front() ; | | _vec0 = &_vec.front() ; | |
| } | | } | |
| | | | |
| inline void get(Int_t idx) const { | | inline void get(Int_t idx) const { | |
| *_buf = *(_vec0+idx) ; | | *_buf = *(_vec0+idx) ; | |
| | | | |
| skipping to change at line 288 | | skipping to change at line 288 | |
| _nativeBufE = other._nativeBufE ; | | _nativeBufE = other._nativeBufE ; | |
| _nativeBufEL = other._nativeBufEL ; | | _nativeBufEL = other._nativeBufEL ; | |
| _nativeBufEH = other._nativeBufEH ; | | _nativeBufEH = other._nativeBufEH ; | |
| _vecE = other._vecE ? new std::vector<Double_t>(*other._vecE) : 0 ; | | _vecE = other._vecE ? new std::vector<Double_t>(*other._vecE) : 0 ; | |
| _vecEL = other._vecEL ? new std::vector<Double_t>(*other._vecEL) : 0
; | | _vecEL = other._vecEL ? new std::vector<Double_t>(*other._vecEL) : 0
; | |
| _vecEH = other._vecEH ? new std::vector<Double_t>(*other._vecEH) : 0
; | | _vecEH = other._vecEH ? new std::vector<Double_t>(*other._vecEH) : 0
; | |
| return *this ; | | return *this ; | |
| } | | } | |
| | | | |
| void setErrorBuffer(Double_t* newBuf) { | | void setErrorBuffer(Double_t* newBuf) { | |
|
| /* cout << "setErrorBuffer(" << _nativeReal->GetName() << ") newBuf =
" << newBuf << endl ; */ | | /* std::cout << "setErrorBuffer(" << _nativeReal->GetName() << ") new
Buf = " << newBuf << std::endl ; */ | |
| _bufE = newBuf ; | | _bufE = newBuf ; | |
| if (!_vecE) _vecE = new std::vector<Double_t> ; | | if (!_vecE) _vecE = new std::vector<Double_t> ; | |
| _vecE->reserve(_vec.capacity()) ; | | _vecE->reserve(_vec.capacity()) ; | |
| if (!_nativeBufE) _nativeBufE = _bufE ; | | if (!_nativeBufE) _nativeBufE = _bufE ; | |
| } | | } | |
| void setAsymErrorBuffer(Double_t* newBufL, Double_t* newBufH) { | | void setAsymErrorBuffer(Double_t* newBufL, Double_t* newBufH) { | |
| _bufEL = newBufL ; _bufEH = newBufH ; | | _bufEL = newBufL ; _bufEH = newBufH ; | |
| if (!_vecEL) { | | if (!_vecEL) { | |
| _vecEL = new std::vector<Double_t> ; | | _vecEL = new std::vector<Double_t> ; | |
| _vecEH = new std::vector<Double_t> ; | | _vecEH = new std::vector<Double_t> ; | |
| | | | |
End of changes. 3 change blocks. |
| 3 lines changed or deleted | | 3 lines changed or added | |
|
| RootFinder.h | | RootFinder.h | |
|
| // @(#)root/mathmore:$Id: RootFinder.h 33942 2010-06-16 13:12:17Z moneta $ | | // @(#)root/tmva $Id: RootFinder.h 40005 2011-06-27 15:29:10Z stelzer $ | |
| // Authors: L. Moneta, A. Zsenei 08/2005 | | // Author: Andreas Hoecker, Joerg Stelzer, Helge Voss, Kai Voss | |
| | | | |
|
| /********************************************************************** | | /************************************************************************** | |
| * * | | ******** | |
| * Copyright (c) 2004 ROOT Foundation, CERN/PH-SFT * | | * Project: TMVA - a Root-integrated toolkit for multivariate data analysis | |
| * * | | * | |
| * This library is free software; you can redistribute it and/or * | | * Package: TMVA | |
| * modify it under the terms of the GNU General Public License * | | * | |
| * as published by the Free Software Foundation; either version 2 * | | * Class : RootFinder | |
| * 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 * | | * | |
| * General Public License for more details. * | | * Description: | |
| * * | | * | |
| * You should have received a copy of the GNU General Public License * | | * Root finding using Brents algorithm | |
| * along with this library (see file COPYING); if not, write * | | * | |
| * to the Free Software Foundation, Inc., 59 Temple Place, Suite * | | * (translated from CERNLIB function RZERO) | |
| * 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 | |
| // Last update: Sun Nov 14 16:59:55 2004 | | y * | |
| // | | * 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_Math_IFunctionfwd | | #ifndef ROOT_TObject | |
| #include "Math/IFunctionfwd.h" | | #include "TObject.h" | |
| #endif | | #endif | |
| | | | |
|
| #ifndef ROOT_Math_IRootFinderMethod | | namespace TMVA { | |
| #include "Math/IRootFinderMethod.h" | | | |
| #endif | | | |
| | | | |
|
| /** | | class MsgLogger; | |
| @defgroup RootFinders One-dimensional Root-Finding algorithms | | | |
| Various implementation esists in MathCore and MathMore | | | |
| The user interacts with a proxy class ROOT::Math::RootFinder which creat | | | |
| es behing | | | |
| the choosen algorithms which are implemented using the ROOT::Math::IRoot | | | |
| FinderMethod interface | | | |
| | | | |
| @ingroup NumAlgo | | | |
| */ | | | |
| | | | |
| namespace ROOT { | | | |
| namespace Math { | | | |
| | | | |
| //_________________________________________________________________________ | | | |
| ____________ | | | |
| /** | | | |
| User Class to find the Root of one dimensional functions. | | | |
| The GSL Methods are implemented in MathMore and they are loaded au | | | |
| tomatically | | | |
| via the plug-in manager | | | |
| | | | |
| The possible types of Root-finding algorithms are: | | | |
| <ul> | | | |
| <li>Root Bracketing Algorithms which do not require function deriv | | | |
| atives | | | |
| <ol> | | | |
| <li>RootFinder::kBRENT (default method implemented in MathCore) | | | |
| <li>RootFinder::kGSL_BISECTION | | | |
| <li>RootFinder::kGSL_FALSE_POS | | | |
| <li>RootFinder::kGSL_BRENT | | | |
| </ol> | | | |
| <li>Root Finding Algorithms using Derivatives | | | |
| <ol> | | | |
| <li>RootFinder::kGSL_NEWTON | | | |
| <li>RootFinder::kGSL_SECANT | | | |
| <li>RootFinder::kGSL_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: | | | |
| | | | |
| bool 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) | | | |
| */ | | | |
| | | | |
| bool 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 | | | |
| */ | | | |
| | | | |
| bool SetFunction( const IGradFunction & f, double xstart) { | | | |
| return fSolver->SetFunction( f, xstart); | | | |
| } | | | |
| | | | |
| template<class Function, class Derivative> | | | |
| bool Solve(Function &f, Derivative &d, double start, | | | |
| int maxIter = 100, double absTol = 1E-8, double relTol = | | | |
| 1E-10); | | | |
| | | | |
| template<class Function> | | | |
| bool Solve(Function &f, double min, double max, | | | |
| int maxIter = 100, double absTol = 1E-8, double relTol = | | | |
| 1E-10); | | | |
| | | | |
| /** | | | |
| Compute the roots iterating until the estimate of the Root is | | | |
| within the required tolerance returning | | | |
| the iteration Status | | | |
| */ | | | |
| bool Solve( int maxIter = 100, double absTol = 1E-8, double relTol | | | |
| = 1E-10) { | | | |
| 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 status of the last estimate of the Root | | | |
| = 0 OK, not zero failure | | | |
| */ | | | |
| int Status() const { | | | |
| return fSolver->Status(); | | | |
| } | | | |
| | | | |
| /** | | | |
| 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(); | | | |
| } | | | |
| | | | |
| protected: | | | |
| | | | |
| private: | | | |
| | | | |
| IRootFinderMethod* fSolver; // type of algorithm to be used | | | |
| | | | |
|
| }; | | class RootFinder : public TObject { | |
| | | | |
|
| } // namespace Math | | public: | |
| } // namespace ROOT | | | |
| | | | |
|
| #ifndef ROOT_Math_WrappedFunction | | RootFinder( Double_t (*rootVal)( Double_t ), | |
| #include "Math/WrappedFunction.h" | | Double_t rootMin, Double_t rootMax, | |
| #endif | | Int_t maxIterations = 100, | |
| | | Double_t absTolerance = 0.0 ); | |
| | | virtual ~RootFinder( void ); | |
| | | | |
|
| #ifndef ROOT_Math_Functor | | // returns the root of the function | |
| #include "Math/Functor.h" | | Double_t Root( Double_t refValue ); | |
| #endif | | | |
| | | private: | |
| | | | |
| | | Double_t fRootMin; // minimum root value | |
| | | Double_t fRootMax; // maximum root value | |
| | | Int_t fMaxIter; // maximum number of iterations | |
| | | Double_t fAbsTol; // absolute tolerance deviation | |
| | | | |
|
| template<class Function, class Derivative> | | // function pointer | |
| bool ROOT::Math::RootFinder::Solve(Function &f, Derivative &d, double start | | Double_t (*fGetRootVal)( Double_t ); | |
| , | | | |
| int maxIter, double absTol, double relTol | | | |
| ) | | | |
| { | | | |
| if (!fSolver) return false; | | | |
| ROOT::Math::GradFunctor1D wf(f, d); | | | |
| bool ret = fSolver->SetFunction(wf, start); | | | |
| if (!ret) return false; | | | |
| return Solve(maxIter, absTol, relTol); | | | |
| } | | | |
| | | | |
| template<class Function> | | | |
| bool ROOT::Math::RootFinder::Solve(Function &f, double min, double max, | | | |
| int maxIter, double absTol, double relTol | | | |
| ) | | | |
| { | | | |
| if (!fSolver) return false; | | | |
| ROOT::Math::WrappedFunction<Function &> wf(f); | | | |
| bool ret = fSolver->SetFunction(wf, min, max); | | | |
| if (!ret) return false; | | | |
| return Solve(maxIter, absTol, relTol); | | | |
| } | | | |
| | | | |
|
| #endif /* ROOT_Math_RootFinder */ | | mutable MsgLogger* fLogger; //! message logger | |
| | | MsgLogger& Log() const { return *fLogger; } | |
| | | | |
| | | ClassDef(RootFinder,0) // Root finding using Brents algorithm | |
| | | }; | |
| | | | |
| | | } // namespace TMVA | |
| | | | |
| | | #endif | |
| | | | |
End of changes. 11 change blocks. |
| 254 lines changed or deleted | | 84 lines changed or added | |
|
| SimpleLikelihoodRatioTestStat.h | | SimpleLikelihoodRatioTestStat.h | |
|
| // @(#)root/roostats:$Id: SimpleLikelihoodRatioTestStat.h 44368 2012-05-30
15:38:44Z axel $ | | // @(#)root/roostats:$Id: SimpleLikelihoodRatioTestStat.h 44982 2012-07-10
08:36:13Z moneta $ | |
| /************************************************************************* | | /************************************************************************* | |
| * 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_SimpleLikelihoodRatioTestStat | | #ifndef ROOSTATS_SimpleLikelihoodRatioTestStat | |
| #define ROOSTATS_SimpleLikelihoodRatioTestStat | | #define ROOSTATS_SimpleLikelihoodRatioTestStat | |
| | | | |
| skipping to change at line 192 | | skipping to change at line 192 | |
| if (reuse && !created) { | | if (reuse && !created) { | |
| fNllNull->setData(data, kFALSE) ; | | fNllNull->setData(data, kFALSE) ; | |
| } | | } | |
| | | | |
| // make sure we set the variables attached to this nll | | // make sure we set the variables attached to this nll | |
| RooArgSet* attachedSet = fNllNull->getVariables(); | | RooArgSet* attachedSet = fNllNull->getVariables(); | |
| *attachedSet = *fNullParameters; | | *attachedSet = *fNullParameters; | |
| *attachedSet = nullPOI; | | *attachedSet = nullPOI; | |
| double nullNLL = fNllNull->getVal(); | | double nullNLL = fNllNull->getVal(); | |
| | | | |
|
| //cout << std::endl << "SLRTS: null params:" << std::endl; | | //std::cout << std::endl << "SLRTS: null params:" << std::endl; | |
| //attachedSet->Print("v"); | | //attachedSet->Print("v"); | |
| | | | |
| if (!reuse) { | | if (!reuse) { | |
| delete fNllNull ; fNllNull = NULL ; | | delete fNllNull ; fNllNull = NULL ; | |
| } | | } | |
| delete attachedSet; | | delete attachedSet; | |
| | | | |
| created = kFALSE ; | | created = kFALSE ; | |
| if (!fNllAlt) { | | if (!fNllAlt) { | |
| RooArgSet* allParams = fAltPdf->getParameters(data); | | RooArgSet* allParams = fAltPdf->getParameters(data); | |
| | | | |
| skipping to change at line 215 | | skipping to change at line 215 | |
| created = kTRUE ; | | created = kTRUE ; | |
| } | | } | |
| if (reuse && !created) { | | if (reuse && !created) { | |
| fNllAlt->setData(data, kFALSE) ; | | fNllAlt->setData(data, kFALSE) ; | |
| } | | } | |
| // make sure we set the variables attached to this nll | | // make sure we set the variables attached to this nll | |
| attachedSet = fNllAlt->getVariables(); | | attachedSet = fNllAlt->getVariables(); | |
| *attachedSet = *fAltParameters; | | *attachedSet = *fAltParameters; | |
| double altNLL = fNllAlt->getVal(); | | double altNLL = fNllAlt->getVal(); | |
| | | | |
|
| //cout << std::endl << "SLRTS: alt params:" << std::endl; | | //std::cout << std::endl << "SLRTS: alt params:" << std::endl; | |
| //attachedSet->Print("v"); | | //attachedSet->Print("v"); | |
| | | | |
|
| //cout << std::endl << "SLRTS null NLL: " << nullNLL << " alt N
LL: " << altNLL << std::endl << std::endl; | | //std::cout << std::endl << "SLRTS null NLL: " << nullNLL << "
alt NLL: " << altNLL << std::endl << std::endl; | |
| | | | |
| if (!reuse) { | | if (!reuse) { | |
| delete fNllAlt ; fNllAlt = NULL ; | | delete fNllAlt ; fNllAlt = NULL ; | |
| } | | } | |
| delete attachedSet; | | delete attachedSet; | |
| | | | |
| // save this snapshot | | // save this snapshot | |
| if( fDetailedOutputEnabled ) { | | if( fDetailedOutputEnabled ) { | |
| if( !fDetailedOutput ) { | | if( !fDetailedOutput ) { | |
| fDetailedOutput = new RooArgSet( *(new RooRealVar("nullNLL",
"null NLL",0)), "detailedOut_SLRTS" ); | | fDetailedOutput = new RooArgSet( *(new RooRealVar("nullNLL",
"null NLL",0)), "detailedOut_SLRTS" ); | |
| fDetailedOutput->add( *(new RooRealVar("altNLL","alternate N
LL",0)) ); | | fDetailedOutput->add( *(new RooRealVar("altNLL","alternate N
LL",0)) ); | |
| } | | } | |
| fDetailedOutput->setRealValue( "nullNLL", nullNLL ); | | fDetailedOutput->setRealValue( "nullNLL", nullNLL ); | |
| fDetailedOutput->setRealValue( "altNLL", altNLL ); | | fDetailedOutput->setRealValue( "altNLL", altNLL ); | |
| | | | |
|
| // cout << std::endl << "STORING THIS AS DETAILED OUTPUT:" << s
td::endl; | | // std::cout << std::endl << "STORING THIS AS DETAILED OUTPUT:"
<< std::endl; | |
| // fDetailedOutput->Print("v"); | | // fDetailedOutput->Print("v"); | |
|
| // cout << std::endl; | | // std::cout << std::endl; | |
| } | | } | |
| | | | |
| RooMsgService::instance().setGlobalKillBelow(msglevel); | | RooMsgService::instance().setGlobalKillBelow(msglevel); | |
| return nullNLL - altNLL; | | return nullNLL - altNLL; | |
| } | | } | |
| | | | |
| virtual void EnableDetailedOutput( bool e=true ) { fDetailedOutputEna
bled = e; fDetailedOutput = NULL; } | | virtual void EnableDetailedOutput( bool e=true ) { fDetailedOutputEna
bled = e; fDetailedOutput = NULL; } | |
| virtual const RooArgSet* GetDetailedOutput(void) const { return fDeta
iledOutput; } | | virtual const RooArgSet* GetDetailedOutput(void) const { return fDeta
iledOutput; } | |
| | | | |
| virtual const TString GetVarName() const { | | virtual const TString GetVarName() const { | |
| | | | |
End of changes. 6 change blocks. |
| 6 lines changed or deleted | | 6 lines changed or added | |
|
| TEveTrack.h | | TEveTrack.h | |
|
| // @(#)root/eve:$Id: TEveTrack.h 38721 2011-04-04 13:37:12Z matevz $ | | // @(#)root/eve:$Id: TEveTrack.h 44981 2012-07-09 23:28:12Z matevz $ | |
| // Authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007 | | // Authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007 | |
| | | | |
| /************************************************************************* | | /************************************************************************* | |
| * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. * | | * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. * | |
| * All rights reserved. * | | * All rights reserved. * | |
| * * | | * * | |
| * For the licensing terms see $ROOTSYS/LICENSE. * | | * For the licensing terms see $ROOTSYS/LICENSE. * | |
| * For the list of contributors see $ROOTSYS/README/CREDITS. * | | * For the list of contributors see $ROOTSYS/README/CREDITS. * | |
| *************************************************************************/ | | *************************************************************************/ | |
| | | | |
| | | | |
| skipping to change at line 54 | | skipping to change at line 54 | |
| typedef vPathMark_t::const_iterator vPathMark_ci; | | typedef vPathMark_t::const_iterator vPathMark_ci; | |
| | | | |
| // Deprecated -- to be removed. | | // Deprecated -- to be removed. | |
| enum EBreakProjectedTracks_e { kBPTDefault, kBPTAlways, kBPTNever }; | | enum EBreakProjectedTracks_e { kBPTDefault, kBPTAlways, kBPTNever }; | |
| | | | |
| protected: | | protected: | |
| TEveVectorD fV; // Starting vertex | | TEveVectorD fV; // Starting vertex | |
| TEveVectorD fP; // Starting momentum | | TEveVectorD fP; // Starting momentum | |
| TEveVectorD fPEnd; // Momentum at the last point of extrapo
lation | | TEveVectorD fPEnd; // Momentum at the last point of extrapo
lation | |
| Double_t fBeta; // Relativistic beta factor | | Double_t fBeta; // Relativistic beta factor | |
|
| | | Double_t fDpDs; // Momentum loss over distance | |
| Int_t fPdg; // PDG code | | Int_t fPdg; // PDG code | |
| Int_t fCharge; // Charge in units of e0 | | Int_t fCharge; // Charge in units of e0 | |
| Int_t fLabel; // Simulation label | | Int_t fLabel; // Simulation label | |
| Int_t fIndex; // Reconstruction index | | Int_t fIndex; // Reconstruction index | |
| Int_t fStatus; // Status-word, user-defined. | | Int_t fStatus; // Status-word, user-defined. | |
| Bool_t fLockPoints; // Lock points that are currently in - d
o nothing in MakeTrack(). | | Bool_t fLockPoints; // Lock points that are currently in - d
o nothing in MakeTrack(). | |
| vPathMark_t fPathMarks; // TEveVector of known points along the
track | | vPathMark_t fPathMarks; // TEveVector of known points along the
track | |
| Int_t fLastPMIdx; //!Last path-mark index tried in track-p
ropagation. | | Int_t fLastPMIdx; //!Last path-mark index tried in track-p
ropagation. | |
| | | | |
| TEveTrackPropagator *fPropagator; // Pointer to shared render-style | | TEveTrackPropagator *fPropagator; // Pointer to shared render-style | |
| | | | |
| skipping to change at line 92 | | skipping to change at line 93 | |
| | | | |
| TEveTrackPropagator* GetPropagator() const { return fPropagator; } | | TEveTrackPropagator* GetPropagator() const { return fPropagator; } | |
| Int_t GetLastPMIdx() const { return fLastPMIdx; } | | Int_t GetLastPMIdx() const { return fLastPMIdx; } | |
| void SetPropagator(TEveTrackPropagator* prop); | | void SetPropagator(TEveTrackPropagator* prop); | |
| void SetAttLineAttMarker(TEveTrackList* tl); | | void SetAttLineAttMarker(TEveTrackList* tl); | |
| | | | |
| const TEveVectorD& GetVertex() const { return fV; } | | const TEveVectorD& GetVertex() const { return fV; } | |
| const TEveVectorD& GetMomentum() const { return fP; } | | const TEveVectorD& GetMomentum() const { return fP; } | |
| const TEveVectorD& GetEndMomentum() const { return fPEnd; } | | const TEveVectorD& GetEndMomentum() const { return fPEnd; } | |
| | | | |
|
| | | Double_t GetDpDs() const { return fDpDs; } | |
| | | void SetDpDs(Double_t dpds) { fDpDs = dpds; } | |
| | | | |
| Int_t GetPdg() const { return fPdg; } | | Int_t GetPdg() const { return fPdg; } | |
| void SetPdg(Int_t pdg) { fPdg = pdg; } | | void SetPdg(Int_t pdg) { fPdg = pdg; } | |
| Int_t GetCharge() const { return fCharge; } | | Int_t GetCharge() const { return fCharge; } | |
| void SetCharge(Int_t chg) { fCharge = chg; } | | void SetCharge(Int_t chg) { fCharge = chg; } | |
| Int_t GetLabel() const { return fLabel; } | | Int_t GetLabel() const { return fLabel; } | |
| void SetLabel(Int_t lbl) { fLabel = lbl; } | | void SetLabel(Int_t lbl) { fLabel = lbl; } | |
| Int_t GetIndex() const { return fIndex; } | | Int_t GetIndex() const { return fIndex; } | |
| void SetIndex(Int_t idx) { fIndex = idx; } | | void SetIndex(Int_t idx) { fIndex = idx; } | |
| Int_t GetStatus() const { return fStatus; } | | Int_t GetStatus() const { return fStatus; } | |
| void SetStatus(Int_t idx) { fStatus = idx; } | | void SetStatus(Int_t idx) { fStatus = idx; } | |
| | | | |
End of changes. 3 change blocks. |
| 1 lines changed or deleted | | 5 lines changed or added | |
|
| TEveTrackPropagator.h | | TEveTrackPropagator.h | |
|
| // @(#)root/eve:$Id: TEveTrackPropagator.h 43121 2012-02-24 21:33:35Z matev
z $ | | // @(#)root/eve:$Id: TEveTrackPropagator.h 44981 2012-07-09 23:28:12Z 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. * | |
| *************************************************************************/ | | *************************************************************************/ | |
| | | | |
| | | | |
| skipping to change at line 174 | | skipping to change at line 174 | |
| void Step(const TEveVector4D& v, const TEveVectorD& p, TEveVector4D&
vOut, TEveVectorD& pOut); | | void Step(const TEveVector4D& v, const TEveVectorD& p, TEveVector4D&
vOut, TEveVectorD& pOut); | |
| | | | |
| Double_t GetStep() { return fLStep * TMath::Sqrt(1 + fLam*fLam); } | | Double_t GetStep() { return fLStep * TMath::Sqrt(1 + fLam*fLam); } | |
| Double_t GetStep2() { return fLStep * fLStep * (1 + fLam*fLam); } | | Double_t GetStep2() { return fLStep * fLStep * (1 + fLam*fLam); } | |
| }; | | }; | |
| | | | |
| private: | | private: | |
| TEveTrackPropagator(const TEveTrackPropagator&); // Not imple
mented | | TEveTrackPropagator(const TEveTrackPropagator&); // Not imple
mented | |
| TEveTrackPropagator& operator=(const TEveTrackPropagator&); // Not imple
mented | | TEveTrackPropagator& operator=(const TEveTrackPropagator&); // Not imple
mented | |
| | | | |
|
| | | void DistributeOffset(const TEveVectorD& off, Int_t first_point, Int_t n | |
| | | p, TEveVectorD& p); | |
| | | | |
| protected: | | protected: | |
| EStepper_e fStepper; | | EStepper_e fStepper; | |
| | | | |
| TEveMagField* fMagFieldObj; | | TEveMagField* fMagFieldObj; | |
| Bool_t fOwnMagFiledObj; | | Bool_t fOwnMagFiledObj; | |
| | | | |
| // Track extrapolation limits | | // Track extrapolation limits | |
| Double_t fMaxR; // Max radius for track extrap
olation | | Double_t fMaxR; // Max radius for track extrap
olation | |
| Double_t fMaxZ; // Max z-coordinate for track
extrapolation. | | Double_t fMaxZ; // Max z-coordinate for track
extrapolation. | |
| Int_t fNMax; // Max steps | | Int_t fNMax; // Max steps | |
| // Helix limits | | // Helix limits | |
| Double_t fMaxOrbs; // Maximal angular path of tra
cks' orbits (1 ~ 2Pi). | | Double_t fMaxOrbs; // Maximal angular path of tra
cks' orbits (1 ~ 2Pi). | |
| | | | |
| // Path-mark / first-vertex control | | // Path-mark / first-vertex control | |
| Bool_t fEditPathMarks; // Show widgets for path-mark c
ontrol in GUI editor. | | Bool_t fEditPathMarks; // Show widgets for path-mark c
ontrol in GUI editor. | |
| Bool_t fFitDaughters; // Pass through daughter creati
on points when extrapolating a track. | | Bool_t fFitDaughters; // Pass through daughter creati
on points when extrapolating a track. | |
| Bool_t fFitReferences; // Pass through given track-ref
erences when extrapolating a track. | | Bool_t fFitReferences; // Pass through given track-ref
erences when extrapolating a track. | |
| Bool_t fFitDecay; // Pass through decay point whe
n extrapolating a track. | | Bool_t fFitDecay; // Pass through decay point whe
n extrapolating a track. | |
| Bool_t fFitCluster2Ds; // Pass through 2D-clusters whe
n extrapolating a track. | | Bool_t fFitCluster2Ds; // Pass through 2D-clusters whe
n extrapolating a track. | |
|
| | | Bool_t fFitLineSegments; // Pass through line when ext
rapolating a track. | |
| Bool_t fRnrDaughters; // Render daughter path-marks. | | Bool_t fRnrDaughters; // Render daughter path-marks. | |
| Bool_t fRnrReferences; // Render track-reference path-
marks. | | Bool_t fRnrReferences; // Render track-reference path-
marks. | |
| Bool_t fRnrDecay; // Render decay path-marks. | | Bool_t fRnrDecay; // Render decay path-marks. | |
| Bool_t fRnrCluster2Ds; // Render 2D-clusters. | | Bool_t fRnrCluster2Ds; // Render 2D-clusters. | |
| Bool_t fRnrFV; // Render first vertex. | | Bool_t fRnrFV; // Render first vertex. | |
| TMarker fPMAtt; // Marker attributes for render
ing of path-marks. | | TMarker fPMAtt; // Marker attributes for render
ing of path-marks. | |
| TMarker fFVAtt; // Marker attributes for fits v
ertex. | | TMarker fFVAtt; // Marker attributes for fits v
ertex. | |
| | | | |
| // Handling of discontinuities in projections | | // Handling of discontinuities in projections | |
| UChar_t fProjTrackBreaking; // Handling of projected-tr
ack breaking. | | UChar_t fProjTrackBreaking; // Handling of projected-tr
ack breaking. | |
| | | | |
| skipping to change at line 218 | | skipping to change at line 221 | |
| // Propagation, state of current track | | // Propagation, state of current track | |
| std::vector<TEveVector4D> fPoints; // Calculated point. | | std::vector<TEveVector4D> fPoints; // Calculated point. | |
| TEveVectorD fV; // Start vertex. | | TEveVectorD fV; // Start vertex. | |
| Helix_t fH; // Helix. | | Helix_t fH; // Helix. | |
| | | | |
| void RebuildTracks(); | | void RebuildTracks(); | |
| void Update(const TEveVector4D& v, const TEveVectorD& p, Bool_t full_
update=kFALSE, Bool_t enforce_max_step=kFALSE); | | void Update(const TEveVector4D& v, const TEveVectorD& p, Bool_t full_
update=kFALSE, Bool_t enforce_max_step=kFALSE); | |
| void Step(const TEveVector4D &v, const TEveVectorD &p, TEveVector4D &
vOut, TEveVectorD &pOut); | | void Step(const TEveVector4D &v, const TEveVectorD &p, TEveVector4D &
vOut, TEveVectorD &pOut); | |
| | | | |
| Bool_t LoopToVertex(TEveVectorD& v, TEveVectorD& p); | | Bool_t LoopToVertex(TEveVectorD& v, TEveVectorD& p); | |
|
| | | Bool_t LoopToLineSegment(const TEveVectorD& s, const TEveVectorD& r, TE
veVectorD& p); | |
| void LoopToBounds(TEveVectorD& p); | | void LoopToBounds(TEveVectorD& p); | |
| | | | |
| Bool_t LineToVertex (TEveVectorD& v); | | Bool_t LineToVertex (TEveVectorD& v); | |
| void LineToBounds (TEveVectorD& p); | | void LineToBounds (TEveVectorD& p); | |
| | | | |
| void StepRungeKutta(Double_t step, Double_t* vect, Double_t* vout); | | void StepRungeKutta(Double_t step, Double_t* vect, Double_t* vout); | |
| | | | |
| Bool_t HelixIntersectPlane(const TEveVectorD& p, const TEveVectorD& poi
nt, const TEveVectorD& normal, | | Bool_t HelixIntersectPlane(const TEveVectorD& p, const TEveVectorD& poi
nt, const TEveVectorD& normal, | |
| TEveVectorD&itsect); | | TEveVectorD&itsect); | |
| Bool_t LineIntersectPlane(const TEveVectorD& p, const TEveVectorD& poin
t, const TEveVectorD& normal, | | Bool_t LineIntersectPlane(const TEveVectorD& p, const TEveVectorD& poin
t, const TEveVectorD& normal, | |
| TEveVectorD& itsect); | | TEveVectorD& itsect); | |
|
| | | Bool_t PointOverVertex(const TEveVector4D& v0, const TEveVector4D& v, D
ouble_t* p=0); | |
| | | | |
|
| Bool_t PointOverVertex(const TEveVector4D& v0, const TEveVector4D& v, Do | | void ClosestPointFromVertexToLineSegment(const TEveVectorD& v, const | |
| uble_t* p=0); | | TEveVectorD& s, const TEveVectorD& r, Double_t rMagInv, TEveVectorD& c); | |
| | | Bool_t ClosestPointBetweenLines(const TEveVectorD&, const TEveVectorD&, | |
| | | const TEveVectorD&, const TEveVectorD&, TEveVectorD& out); | |
| | | | |
| public: | | public: | |
| TEveTrackPropagator(const char* n="TEveTrackPropagator", const char* t="
", | | TEveTrackPropagator(const char* n="TEveTrackPropagator", const char* t="
", | |
| TEveMagField* field=0, Bool_t own_field=kTRUE); | | TEveMagField* field=0, Bool_t own_field=kTRUE); | |
| virtual ~TEveTrackPropagator(); | | virtual ~TEveTrackPropagator(); | |
| | | | |
| virtual void OnZeroRefCount(); | | virtual void OnZeroRefCount(); | |
| | | | |
| virtual void CheckReferenceCount(const TEveException& eh="TEveElement::C
heckReferenceCount "); | | virtual void CheckReferenceCount(const TEveException& eh="TEveElement::C
heckReferenceCount "); | |
| | | | |
| virtual void ElementChanged(Bool_t update_scenes=kTRUE, Bool_t redraw=kF
ALSE); | | virtual void ElementChanged(Bool_t update_scenes=kTRUE, Bool_t redraw=kF
ALSE); | |
| | | | |
| // propagation | | // propagation | |
| void InitTrack(const TEveVectorD& v, Int_t charge); | | void InitTrack(const TEveVectorD& v, Int_t charge); | |
| void ResetTrack(); | | void ResetTrack(); | |
|
| void GoToBounds(TEveVectorD& p); | | | |
| Bool_t GoToVertex(TEveVectorD& v, TEveVectorD& p); | | Int_t GetCurrentPoint() const; | |
| | | Double_t GetTrackLength(Int_t start_point=0, Int_t end_point=-1) const; | |
| | | | |
| | | virtual void GoToBounds(TEveVectorD& p); | |
| | | virtual Bool_t GoToVertex(TEveVectorD& v, TEveVectorD& p); | |
| | | virtual Bool_t GoToLineSegment(const TEveVectorD& s, const TEveVectorD& | |
| | | r, TEveVectorD& p); | |
| | | | |
| // TEveVectorF wrappers | | // TEveVectorF wrappers | |
| void InitTrack(const TEveVectorF& v, Int_t charge); | | void InitTrack(const TEveVectorF& v, Int_t charge); | |
| void GoToBounds(TEveVectorF& p); | | void GoToBounds(TEveVectorF& p); | |
| Bool_t GoToVertex(TEveVectorF& v, TEveVectorF&p); | | Bool_t GoToVertex(TEveVectorF& v, TEveVectorF&p); | |
|
| | | Bool_t GoToLineSegment(const TEveVectorF& s, const TEveVectorF& r, TEveV
ectorF& p); | |
| | | | |
| Bool_t IntersectPlane(const TEveVectorD& p, const TEveVectorD& point, co
nst TEveVectorD& normal, | | Bool_t IntersectPlane(const TEveVectorD& p, const TEveVectorD& point, co
nst TEveVectorD& normal, | |
| TEveVectorD& itsect); | | TEveVectorD& itsect); | |
| | | | |
| void FillPointSet(TEvePointSet* ps) const; | | void FillPointSet(TEvePointSet* ps) const; | |
| | | | |
| void SetStepper(EStepper_e s) { fStepper = s; } | | void SetStepper(EStepper_e s) { fStepper = s; } | |
| | | | |
| void SetMagField(Double_t bX, Double_t bY, Double_t bZ); | | void SetMagField(Double_t bX, Double_t bY, Double_t bZ); | |
| void SetMagField(Double_t b) { SetMagField(0, 0, b); } | | void SetMagField(Double_t b) { SetMagField(0, 0, b); } | |
| | | | |
| skipping to change at line 282 | | skipping to change at line 294 | |
| | | | |
| void SetEditPathMarks(Bool_t x) { fEditPathMarks = x; } | | void SetEditPathMarks(Bool_t x) { fEditPathMarks = x; } | |
| void SetRnrDaughters(Bool_t x); | | void SetRnrDaughters(Bool_t x); | |
| void SetRnrReferences(Bool_t x); | | void SetRnrReferences(Bool_t x); | |
| void SetRnrDecay(Bool_t x); | | void SetRnrDecay(Bool_t x); | |
| void SetRnrCluster2Ds(Bool_t x); | | void SetRnrCluster2Ds(Bool_t x); | |
| void SetFitDaughters(Bool_t x); | | void SetFitDaughters(Bool_t x); | |
| void SetFitReferences(Bool_t x); | | void SetFitReferences(Bool_t x); | |
| void SetFitDecay(Bool_t x); | | void SetFitDecay(Bool_t x); | |
| void SetFitCluster2Ds(Bool_t x); | | void SetFitCluster2Ds(Bool_t x); | |
|
| | | void SetFitLineSegments(Bool_t x); | |
| void SetRnrFV(Bool_t x); | | void SetRnrFV(Bool_t x); | |
| void SetProjTrackBreaking(UChar_t x); | | void SetProjTrackBreaking(UChar_t x); | |
| void SetRnrPTBMarkers(Bool_t x); | | void SetRnrPTBMarkers(Bool_t x); | |
| | | | |
| TEveVectorD GetMagField(Double_t x, Double_t y, Double_t z) { return fMa
gFieldObj->GetField(x, y, z); } | | TEveVectorD GetMagField(Double_t x, Double_t y, Double_t z) { return fMa
gFieldObj->GetField(x, y, z); } | |
| void PrintMagField(Double_t x, Double_t y, Double_t z) const; | | void PrintMagField(Double_t x, Double_t y, Double_t z) const; | |
| | | | |
| EStepper_e GetStepper() const { return fStepper;} | | EStepper_e GetStepper() const { return fStepper;} | |
| | | | |
| Double_t GetMaxR() const { return fMaxR; } | | Double_t GetMaxR() const { return fMaxR; } | |
| | | | |
| skipping to change at line 308 | | skipping to change at line 321 | |
| | | | |
| Bool_t GetEditPathMarks() const { return fEditPathMarks; } | | Bool_t GetEditPathMarks() const { return fEditPathMarks; } | |
| Bool_t GetRnrDaughters() const { return fRnrDaughters; } | | Bool_t GetRnrDaughters() const { return fRnrDaughters; } | |
| Bool_t GetRnrReferences() const { return fRnrReferences; } | | Bool_t GetRnrReferences() const { return fRnrReferences; } | |
| Bool_t GetRnrDecay() const { return fRnrDecay; } | | Bool_t GetRnrDecay() const { return fRnrDecay; } | |
| Bool_t GetRnrCluster2Ds() const { return fRnrCluster2Ds; } | | Bool_t GetRnrCluster2Ds() const { return fRnrCluster2Ds; } | |
| Bool_t GetFitDaughters() const { return fFitDaughters; } | | Bool_t GetFitDaughters() const { return fFitDaughters; } | |
| Bool_t GetFitReferences() const { return fFitReferences; } | | Bool_t GetFitReferences() const { return fFitReferences; } | |
| Bool_t GetFitDecay() const { return fFitDecay; } | | Bool_t GetFitDecay() const { return fFitDecay; } | |
| Bool_t GetFitCluster2Ds() const { return fFitCluster2Ds; } | | Bool_t GetFitCluster2Ds() const { return fFitCluster2Ds; } | |
|
| | | Bool_t GetFitLineSegments() const { return fFitLineSegments; } | |
| Bool_t GetRnrFV() const { return fRnrFV; } | | Bool_t GetRnrFV() const { return fRnrFV; } | |
| UChar_t GetProjTrackBreaking() const { return fProjTrackBreaking; } | | UChar_t GetProjTrackBreaking() const { return fProjTrackBreaking; } | |
| Bool_t GetRnrPTBMarkers() const { return fRnrPTBMarkers; } | | Bool_t GetRnrPTBMarkers() const { return fRnrPTBMarkers; } | |
| | | | |
| TMarker& RefPMAtt() { return fPMAtt; } | | TMarker& RefPMAtt() { return fPMAtt; } | |
| TMarker& RefFVAtt() { return fFVAtt; } | | TMarker& RefFVAtt() { return fFVAtt; } | |
| TMarker& RefPTBAtt() { return fPTBAtt; } | | TMarker& RefPTBAtt() { return fPTBAtt; } | |
| | | | |
| static Bool_t IsOutsideBounds(const TEveVectorD& point, Double_t maxRsqr
, Double_t maxZ); | | static Bool_t IsOutsideBounds(const TEveVectorD& point, Double_t maxRsqr
, Double_t maxZ); | |
| | | | |
| | | | |
End of changes. 10 change blocks. |
| 5 lines changed or deleted | | 22 lines changed or added | |
|
| TFPBlock.h | | TFPBlock.h | |
|
| // @(#)root/io:$Id: TFPBlock.h 43276 2012-03-07 17:13:42Z pcanal $ | | // @(#)root/io:$Id: TFPBlock.h 44763 2012-06-27 14:05:39Z pcanal $ | |
| // Author: Elvin Sindrilaru 19/05/2011 | | // Author: Elvin Sindrilaru 19/05/2011 | |
| | | | |
| /************************************************************************* | | /************************************************************************* | |
| * Copyright (C) 1995-2011, Rene Brun and Fons Rademakers. * | | * Copyright (C) 1995-2011, 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 | |
| #endif | | #endif | |
| | | | |
| class TFPBlock : public TObject{ | | class TFPBlock : public TObject{ | |
| | | | |
| private: | | private: | |
| char *fBuffer; // content of the block | | char *fBuffer; // content of the block | |
| Int_t fNblock; // number of segment in the block | | Int_t fNblock; // number of segment in the block | |
| Int_t fFullSize; // total size of segments that make up the bloc
k | | Int_t fFullSize; // total size of segments that make up the bloc
k | |
| Int_t *fLen; // array of lengths of each segment | | Int_t *fLen; // array of lengths of each segment | |
| Long64_t *fPos; // array of positions of each segment | | Long64_t *fPos; // array of positions of each segment | |
|
| | | Long64_t *fRelOffset; // relative offset of piece in the buffer | |
| | | | |
| TFPBlock(const TFPBlock&); // Not implemented. | | TFPBlock(const TFPBlock&); // Not implemented. | |
| TFPBlock &operator=(const TFPBlock&); // Not implemented. | | TFPBlock &operator=(const TFPBlock&); // Not implemented. | |
| | | | |
| public: | | public: | |
| TFPBlock(Long64_t*, Int_t*, Int_t); | | TFPBlock(Long64_t*, Int_t*, Int_t); | |
| virtual ~TFPBlock(); | | virtual ~TFPBlock(); | |
| | | | |
| Long64_t GetPos(Int_t) const; | | Long64_t GetPos(Int_t) const; | |
| Int_t GetLen(Int_t) const; | | Int_t GetLen(Int_t) const; | |
| | | | |
| Long64_t *GetPos() const; | | Long64_t *GetPos() const; | |
| Int_t *GetLen() const; | | Int_t *GetLen() const; | |
| Int_t GetFullSize() const; | | Int_t GetFullSize() const; | |
| Int_t GetNoElem() const; | | Int_t GetNoElem() const; | |
| char *GetBuffer() const; | | char *GetBuffer() const; | |
|
| | | char *GetPtrToPiece(Int_t index) const; | |
| | | | |
| void SetBuffer(char*); | | void SetBuffer(char*); | |
| void SetPos(Int_t, Long64_t); | | void SetPos(Int_t, Long64_t); | |
| void ReallocBlock(Long64_t*, Int_t*, Int_t); | | void ReallocBlock(Long64_t*, Int_t*, Int_t); | |
| | | | |
| ClassDef(TFPBlock, 0); // File prefetch block | | ClassDef(TFPBlock, 0); // File prefetch block | |
| }; | | }; | |
| | | | |
|
| | | //__________________________________________________________________ | |
| | | inline Long64_t* TFPBlock::GetPos() const | |
| | | { | |
| | | // Get pointer to the array of postions. | |
| | | | |
| | | return fPos; | |
| | | } | |
| | | | |
| | | //__________________________________________________________________ | |
| | | inline Int_t* TFPBlock::GetLen() const | |
| | | { | |
| | | // Get pointer to the array of lengths. | |
| | | | |
| | | return fLen; | |
| | | } | |
| | | | |
| | | //__________________________________________________________________ | |
| | | inline Int_t TFPBlock::GetFullSize() const | |
| | | { | |
| | | // Return size of the block. | |
| | | | |
| | | return fFullSize; | |
| | | } | |
| | | | |
| | | //__________________________________________________________________ | |
| | | inline Int_t TFPBlock::GetNoElem() const | |
| | | { | |
| | | // Return number of elements in the block. | |
| | | | |
| | | return fNblock; | |
| | | } | |
| | | | |
| | | //__________________________________________________________________ | |
| | | inline Long64_t TFPBlock::GetPos(Int_t i) const | |
| | | { | |
| | | // Get position of the element at index i. | |
| | | | |
| | | return fPos[i]; | |
| | | } | |
| | | | |
| | | //__________________________________________________________________ | |
| | | inline Int_t TFPBlock::GetLen(Int_t i) const | |
| | | { | |
| | | // Get length of the element at index i. | |
| | | | |
| | | return fLen[i]; | |
| | | } | |
| | | | |
| | | //__________________________________________________________________ | |
| | | inline char* TFPBlock::GetBuffer() const | |
| | | { | |
| | | // Get block buffer. | |
| | | | |
| | | return fBuffer; | |
| | | } | |
| | | | |
| | | //__________________________________________________________________ | |
| | | inline char* TFPBlock::GetPtrToPiece(Int_t index) const | |
| | | { | |
| | | // Get block buffer. | |
| | | | |
| | | return (fBuffer + fRelOffset[index]); | |
| | | } | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 4 change blocks. |
| 1 lines changed or deleted | | 67 lines changed or added | |
|
| TFileCacheRead.h | | TFileCacheRead.h | |
|
| // @(#)root/io:$Id: TFileCacheRead.h 43149 2012-02-27 21:09:07Z pcanal $ | | // @(#)root/io:$Id: TFileCacheRead.h 44849 2012-07-03 13:06:09Z pcanal $ | |
| // Author: Rene Brun 19/05/2006 | | // Author: Rene Brun 19/05/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 82 | | skipping to change at line 82 | |
| Long64_t *fBSeekSort; | | Long64_t *fBSeekSort; | |
| Int_t *fBSeekIndex; | | Int_t *fBSeekIndex; | |
| Long64_t *fBPos; | | Long64_t *fBPos; | |
| Int_t *fBSeekLen; | | Int_t *fBSeekLen; | |
| Int_t *fBSeekSortLen; | | Int_t *fBSeekSortLen; | |
| Int_t *fBSeekPos; | | Int_t *fBSeekPos; | |
| Int_t *fBLen; | | Int_t *fBLen; | |
| Bool_t fBIsSorted; | | Bool_t fBIsSorted; | |
| Bool_t fBIsTransferred; | | Bool_t fBIsTransferred; | |
| | | | |
|
| | | void SetEnablePrefetchingImpl(Bool_t setPrefetching = kFALSE); // Can no | |
| | | t be virtual as it is called from the constructor. | |
| | | | |
| private: | | private: | |
| TFileCacheRead(const TFileCacheRead &); //cannot be copied | | TFileCacheRead(const TFileCacheRead &); //cannot be copied | |
| TFileCacheRead& operator=(const TFileCacheRead &); | | TFileCacheRead& operator=(const TFileCacheRead &); | |
| | | | |
| public: | | public: | |
| TFileCacheRead(); | | TFileCacheRead(); | |
| TFileCacheRead(TFile *file, Int_t buffersize, TObject *tree = 0); | | TFileCacheRead(TFile *file, Int_t buffersize, TObject *tree = 0); | |
| virtual ~TFileCacheRead(); | | virtual ~TFileCacheRead(); | |
| 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 /*subbranc
hes*/ = kFALSE) {} | | virtual void AddBranch(const char * /*branch*/, Bool_t /*subbranc
hes*/ = kFALSE) {} | |
| virtual void AddNoCacheBytesRead(Long64_t len) { fNoCacheBytesRea
d += len; } | | virtual void AddNoCacheBytesRead(Long64_t len) { fNoCacheBytesRea
d += len; } | |
| virtual void AddNoCacheReadCalls(Int_t reads) { fNoCacheReadCalls
+= reads; } | | virtual void AddNoCacheReadCalls(Int_t reads) { fNoCacheReadCalls
+= reads; } | |
|
| | | virtual void Close(Option_t *option=""); | |
| virtual Int_t GetBufferSize() const { return fBufferSize; }; | | virtual Int_t GetBufferSize() const { return fBufferSize; }; | |
| virtual Long64_t GetBytesRead() const { return fBytesRead; } | | virtual Long64_t GetBytesRead() const { return fBytesRead; } | |
| virtual Long64_t GetNoCacheBytesRead() const { return fNoCacheBytesRe
ad; } | | virtual Long64_t GetNoCacheBytesRead() const { return fNoCacheBytesRe
ad; } | |
| virtual Long64_t GetBytesReadExtra() const { return fBytesReadExtra;
} | | virtual Long64_t GetBytesReadExtra() const { return fBytesReadExtra;
} | |
| TFile *GetFile() const { return fFile; } // Return the TF
ile being cached. | | TFile *GetFile() const { return fFile; } // Return the TF
ile being cached. | |
| Int_t GetNseek() const { return fNseek; } // Return the nu
mber of blocks in the current cache. | | Int_t GetNseek() const { return fNseek; } // Return the nu
mber of blocks in the current cache. | |
| Int_t GetNtot() const { return fNtot; } // Return the to
tal size of the prefetched blocks. | | Int_t GetNtot() const { return fNtot; } // Return the to
tal size of the prefetched blocks. | |
| virtual Int_t GetReadCalls() const { return fReadCalls; } | | virtual Int_t GetReadCalls() const { return fReadCalls; } | |
| virtual Int_t GetNoCacheReadCalls() const { return fNoCacheReadCal
ls; } | | virtual Int_t GetNoCacheReadCalls() const { return fNoCacheReadCal
ls; } | |
| virtual Int_t GetUnzipBuffer(char ** /*buf*/, Long64_t /*pos*/, In
t_t /*len*/, Bool_t * /*free*/) { return -1; } | | virtual Int_t GetUnzipBuffer(char ** /*buf*/, Long64_t /*pos*/, In
t_t /*len*/, Bool_t * /*free*/) { return -1; } | |
| Long64_t GetPrefetchedBlocks() const { return fPrefetchedBloc
ks; } | | Long64_t GetPrefetchedBlocks() const { return fPrefetchedBloc
ks; } | |
| virtual Bool_t IsAsyncReading() const { return fAsyncReading; }; | | virtual Bool_t IsAsyncReading() const { return fAsyncReading; }; | |
|
| virtual void SetEnablePrefetching(Bool_t setPrefetching = kFALSE)
{ fEnablePrefetching = setPrefetching; } | | virtual void SetEnablePrefetching(Bool_t setPrefetching = kFALSE)
; | |
| virtual Bool_t IsEnablePrefetching() const { return fEnablePrefetch
ing; }; | | virtual Bool_t IsEnablePrefetching() const { return fEnablePrefetch
ing; }; | |
| virtual Bool_t IsLearning() const {return kFALSE;} | | virtual Bool_t IsLearning() const {return kFALSE;} | |
| virtual void Prefetch(Long64_t pos, Int_t len); | | virtual void Prefetch(Long64_t pos, Int_t len); | |
| virtual void Print(Option_t *option="") const; | | virtual void Print(Option_t *option="") const; | |
| virtual Int_t ReadBufferExt(char *buf, Long64_t pos, Int_t len, In
t_t &loc); | | virtual Int_t ReadBufferExt(char *buf, Long64_t pos, Int_t len, In
t_t &loc); | |
| virtual Int_t ReadBufferExtNormal(char *buf, Long64_t pos, Int_t l
en, Int_t &loc); | | virtual Int_t ReadBufferExtNormal(char *buf, Long64_t pos, Int_t l
en, Int_t &loc); | |
| virtual Int_t ReadBufferExtPrefetch(char *buf, Long64_t pos, Int_t
len, Int_t &loc); | | virtual Int_t ReadBufferExtPrefetch(char *buf, Long64_t pos, Int_t
len, Int_t &loc); | |
| 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 SetFile(TFile *file); | | virtual void SetFile(TFile *file); | |
| virtual void SetSkipZip(Bool_t /*skip*/ = kTRUE) {} // This funct
ion is only used by TTreeCacheUnzip (ignore it) | | virtual void SetSkipZip(Bool_t /*skip*/ = kTRUE) {} // This funct
ion is only used by TTreeCacheUnzip (ignore it) | |
| | | | |
End of changes. 4 change blocks. |
| 2 lines changed or deleted | | 6 lines changed or added | |
|
| TFilePrefetch.h | | TFilePrefetch.h | |
|
| // @(#)root/io:$Id: TFilePrefetch.h 41698 2011-11-01 21:22:54Z pcanal $ | | // @(#)root/io:$Id: TFilePrefetch.h 44763 2012-06-27 14:05:39Z pcanal $ | |
| // Author: Elvin Sindrilaru 19/05/2011 | | // Author: Elvin Sindrilaru 19/05/2011 | |
| | | | |
| /************************************************************************* | | /************************************************************************* | |
| * Copyright (C) 1995-2011, Rene Brun and Fons Rademakers. * | | * Copyright (C) 1995-2011, 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 72 | | skipping to change at line 72 | |
| #include "TObjArray.h" | | #include "TObjArray.h" | |
| #endif | | #endif | |
| #ifndef ROOT_TStopwatch | | #ifndef ROOT_TStopwatch | |
| #include "TStopwatch.h" | | #include "TStopwatch.h" | |
| #endif | | #endif | |
| | | | |
| class TFilePrefetch : public TObject { | | class TFilePrefetch : public TObject { | |
| | | | |
| private: | | private: | |
| TFile *fFile; // reference to the file | | TFile *fFile; // reference to the file | |
|
| TList *fPendingBlocks; // list of pending block to be read | | TList *fPendingBlocks; // list of pending blocks to be read | |
| TList *fReadBlocks; // list of block read | | TList *fReadBlocks; // list of blocks read | |
| TThread *fConsumer; // consumer thread | | TThread *fConsumer; // consumer thread | |
| TMutex *fMutexPendingList; // mutex for the pending list | | TMutex *fMutexPendingList; // mutex for the pending list | |
| TMutex *fMutexReadList; // mutex for the list of read blocks | | TMutex *fMutexReadList; // mutex for the list of read blocks | |
|
| TMutex *fMutexSynch; // mutex for synchronisation between wor | | TCondition *fNewBlockAdded; // signal the addition of a new pending | |
| king and main thread | | block | |
| TCondition *fNewBlockAdded; // condition used to signal the addition | | TCondition *fReadBlockAdded; // signal the addition of a new red bloc | |
| of a new pending block | | k | |
| TCondition *fReadBlockAdded; // condition usd to signal the addition | | TCondition *fCondNextFile; // signal TChain that we can move to the | |
| of a new red block | | next file | |
| TSemaphore *fSem; // semaphore used to kill the consumer t | | TSemaphore *fSemMasterWorker; // semaphore used to kill the consumer t | |
| hread | | hread | |
| | | TSemaphore *fSemWorkerMaster; // semaphore used to notify the master t | |
| | | hat worker is killed | |
| TString fPathCache; // path to the cache directory | | TString fPathCache; // path to the cache directory | |
| TStopwatch fWaitTime; // time wating to prefetch a buffer (in
usec) | | TStopwatch fWaitTime; // time wating to prefetch a buffer (in
usec) | |
| | | | |
| static TThread::VoidRtnFunc_t ThreadProc(void*); //create a joinable wo
rker thread | | static TThread::VoidRtnFunc_t ThreadProc(void*); //create a joinable wo
rker thread | |
| | | | |
| public: | | public: | |
| TFilePrefetch(TFile*); | | TFilePrefetch(TFile*); | |
| virtual ~TFilePrefetch(); | | virtual ~TFilePrefetch(); | |
| | | | |
| void ReadAsync(TFPBlock*, Bool_t&); | | void ReadAsync(TFPBlock*, Bool_t&); | |
| | | | |
| skipping to change at line 115 | | skipping to change at line 116 | |
| Bool_t CheckCachePath(const char*); | | Bool_t CheckCachePath(const char*); | |
| Bool_t CheckBlockInCache(char*&, TFPBlock*); | | Bool_t CheckBlockInCache(char*&, TFPBlock*); | |
| char *GetBlockFromCache(const char*, Int_t); | | char *GetBlockFromCache(const char*, Int_t); | |
| void SaveBlockInCache(TFPBlock*); | | void SaveBlockInCache(TFPBlock*); | |
| | | | |
| Int_t SumHex(const char*); | | Int_t SumHex(const char*); | |
| Bool_t BinarySearchReadList(TFPBlock*, Long64_t, Int_t, Int_t*); | | Bool_t BinarySearchReadList(TFPBlock*, Long64_t, Int_t, Int_t*); | |
| Long64_t GetWaitTime(); | | Long64_t GetWaitTime(); | |
| | | | |
| void SetFile(TFile*); | | void SetFile(TFile*); | |
|
| TMutex* GetMutexSynch() const { return fMutexSynch; }; | | TCondition* GetCondNextFile() const { return fCondNextFile; }; | |
| | | | |
| ClassDef(TFilePrefetch, 0); // File block prefetcher | | ClassDef(TFilePrefetch, 0); // File block prefetcher | |
| }; | | }; | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 4 change blocks. |
| 12 lines changed or deleted | | 14 lines changed or added | |
|
| TGLCamera.h | | TGLCamera.h | |
|
| // @(#)root/gl:$Id: TGLCamera.h 34006 2010-06-21 10:36:05Z matevz $ | | // @(#)root/gl:$Id: TGLCamera.h 44784 2012-06-27 19:57:47Z 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 79 | | skipping to change at line 79 | |
| // Non-copyable class | | // Non-copyable class | |
| TGLCamera(const TGLCamera &); | | TGLCamera(const TGLCamera &); | |
| TGLCamera & operator=(const TGLCamera &); | | TGLCamera & operator=(const TGLCamera &); | |
| | | | |
| protected: | | protected: | |
| // Fields | | // Fields | |
| TGLMatrix fCamBase; //! tranformation to center and rotation f
rom up to x vector | | TGLMatrix fCamBase; //! tranformation to center and rotation f
rom up to x vector | |
| TGLMatrix fCamTrans; //! transformation relative to fCamTrans | | TGLMatrix fCamTrans; //! transformation relative to fCamTrans | |
| Bool_t fExternalCenter; //! use external center insead of scene ce
nter | | Bool_t fExternalCenter; //! use external center insead of scene ce
nter | |
| Bool_t fFixDefCenter; //! use fixed default center | | Bool_t fFixDefCenter; //! use fixed default center | |
|
| | | Bool_t fWasArcBalled; //! set when arc-ball rotation is used | |
| TGLVector3 fExtCenter; //! external camera center | | TGLVector3 fExtCenter; //! external camera center | |
| TGLVector3 fDefCenter; //! deafult camera center | | TGLVector3 fDefCenter; //! deafult camera center | |
| TGLVector3 fFDCenter; //! fixed deafult camera center | | TGLVector3 fFDCenter; //! fixed deafult camera center | |
| TGLVector3 *fCenter; //! current camera center | | TGLVector3 *fCenter; //! current camera center | |
| | | | |
| mutable Double_t fNearClip; //! last applied near-clip | | mutable Double_t fNearClip; //! last applied near-clip | |
| mutable Double_t fFarClip; //! last applied far-clip | | mutable Double_t fFarClip; //! last applied far-clip | |
| | | | |
| // Set in Setup() | | // Set in Setup() | |
| Double_t fDollyDefault; //! default distnce from viewing centre | | Double_t fDollyDefault; //! default distnce from viewing centre | |
| | | | |
| skipping to change at line 139 | | skipping to change at line 140 | |
| // Camera manipulation interface (GL coord - origin bottom left) | | // Camera manipulation interface (GL coord - origin bottom left) | |
| virtual void Setup(const TGLBoundingBox & box, Bool_t reset=kTRUE) = 0
; | | virtual void Setup(const TGLBoundingBox & box, Bool_t reset=kTRUE) = 0
; | |
| virtual void Reset() = 0; | | virtual void Reset() = 0; | |
| | | | |
| virtual Bool_t Dolly(Int_t delta, Bool_t mod1, Bool_t mod2); | | virtual Bool_t Dolly(Int_t delta, Bool_t mod1, Bool_t mod2); | |
| virtual Bool_t Zoom (Int_t delta, Bool_t mod1, Bool_t mod2) = 0; | | virtual Bool_t Zoom (Int_t delta, Bool_t mod1, Bool_t mod2) = 0; | |
| virtual Bool_t Truck(Double_t xDelta, Double_t yDelta); | | virtual Bool_t Truck(Double_t xDelta, Double_t yDelta); | |
| virtual Bool_t Truck(Int_t xDelta, Int_t yDelta, Bool_t mod1, Bool_t mod
2) = 0; | | virtual Bool_t Truck(Int_t xDelta, Int_t yDelta, Bool_t mod1, Bool_t mod
2) = 0; | |
| virtual Bool_t Rotate(Int_t xDelta, Int_t yDelta, Bool_t mod1, Bool_t mo
d2); | | virtual Bool_t Rotate(Int_t xDelta, Int_t yDelta, Bool_t mod1, Bool_t mo
d2); | |
| virtual Bool_t RotateRad(Double_t hRotate, Double_t vRotate); | | virtual Bool_t RotateRad(Double_t hRotate, Double_t vRotate); | |
|
| | | virtual Bool_t RotateArcBall(Int_t xDelta, Int_t yDelta, Bool_t mod1, Bo | |
| | | ol_t mod2); | |
| | | virtual Bool_t RotateArcBallRad(Double_t hRotate, Double_t vRotate); | |
| | | | |
| virtual void Apply(const TGLBoundingBox & sceneBox, const TGLRect * pi
ckRect = 0) const = 0; | | virtual void Apply(const TGLBoundingBox & sceneBox, const TGLRect * pi
ckRect = 0) const = 0; | |
| | | | |
| Bool_t AdjustAndClampVal(Double_t & val, Double_t min, Double_t max, | | Bool_t AdjustAndClampVal(Double_t & val, Double_t min, Double_t max, | |
| Int_t screenShift, Int_t screenShiftRange, | | Int_t screenShift, Int_t screenShiftRange, | |
| Bool_t mod1, Bool_t mod2) const; | | Bool_t mod1, Bool_t mod2) const; | |
| Double_t AdjustDelta(Double_t screenShift, Double_t deltaFactor, | | Double_t AdjustDelta(Double_t screenShift, Double_t deltaFactor, | |
| Bool_t mod1, Bool_t mod2) const; | | Bool_t mod1, Bool_t mod2) const; | |
| | | | |
| void SetExternalCenter(Bool_t x); | | void SetExternalCenter(Bool_t x); | |
| | | | |
End of changes. 3 change blocks. |
| 1 lines changed or deleted | | 5 lines changed or added | |
|
| TGLViewer.h | | TGLViewer.h | |
|
| // @(#)root/gl:$Id: TGLViewer.h 42974 2012-02-12 07:22:45Z matevz $ | | // @(#)root/gl:$Id: TGLViewer.h 44784 2012-06-27 19:57:47Z 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 270 | | skipping to change at line 270 | |
| void SetClipAutoUpdate(Bool_t x) { fClipSet->SetAutoUpdate(x); } | | void SetClipAutoUpdate(Bool_t x) { fClipSet->SetAutoUpdate(x); } | |
| | | | |
| // External GUI component interface | | // External GUI component interface | |
| TGLCamera & CurrentCamera() const { return *fCurrentCamera; } | | TGLCamera & CurrentCamera() const { return *fCurrentCamera; } | |
| TGLCamera & RefCamera(ECameraType camera); | | TGLCamera & RefCamera(ECameraType camera); | |
| void SetCurrentCamera(ECameraType camera); | | void SetCurrentCamera(ECameraType camera); | |
| void SetOrthoCamera(ECameraType camera, Double_t zoom, Double_t dolly, | | void SetOrthoCamera(ECameraType camera, Double_t zoom, Double_t dolly, | |
| Double_t center[3], Double_t hRotate, Double_t
vRotate); | | Double_t center[3], Double_t hRotate, Double_t
vRotate); | |
| void SetPerspectiveCamera(ECameraType camera, Double_t fov, Double_t dol
ly, | | void SetPerspectiveCamera(ECameraType camera, Double_t fov, Double_t dol
ly, | |
| Double_t center[3], Double_t hRotate, Double_t
vRotate); | | Double_t center[3], Double_t hRotate, Double_t
vRotate); | |
|
| | | void ReinitializeCurrentCamera(const TGLVector3& hAxis, const TGLVector3
& vAxis, Bool_t redraw=kTRUE); | |
| void GetGuideState(Int_t & axesType, Bool_t & axesDepthTest, Bool_t & re
ferenceOn, Double_t* referencePos) const; | | void GetGuideState(Int_t & axesType, Bool_t & axesDepthTest, Bool_t & re
ferenceOn, Double_t* referencePos) const; | |
| void SetGuideState(Int_t axesType, Bool_t axesDepthTest, Bool_t referenc
eOn, const Double_t* referencePos); | | void SetGuideState(Int_t axesType, Bool_t axesDepthTest, Bool_t referenc
eOn, const Double_t* referencePos); | |
| void SetDrawCameraCenter(Bool_t x); | | void SetDrawCameraCenter(Bool_t x); | |
| Bool_t GetDrawCameraCenter() { return fDrawCameraCenter; } | | Bool_t GetDrawCameraCenter() { return fDrawCameraCenter; } | |
| void PickCameraCenter() { fPushAction = kPushCamCenter; RefreshPadE
ditor(this); } | | void PickCameraCenter() { fPushAction = kPushCamCenter; RefreshPadE
ditor(this); } | |
| void PickAnnotate() { fPushAction = kPushAnnotate; RefreshPadE
ditor(this); } | | void PickAnnotate() { fPushAction = kPushAnnotate; RefreshPadE
ditor(this); } | |
| TGLCameraOverlay* GetCameraOverlay() const { return fCameraOverlay; } | | TGLCameraOverlay* GetCameraOverlay() const { return fCameraOverlay; } | |
| void SetCameraOverlay(TGLCameraOverlay* m) { fCameraOverlay = m; } | | void SetCameraOverlay(TGLCameraOverlay* m) { fCameraOverlay = m; } | |
| TGLAutoRotator* GetAutoRotator(); | | TGLAutoRotator* GetAutoRotator(); | |
| void SetAutoRotator(TGLAutoRotator* ar); | | void SetAutoRotator(TGLAutoRotator* ar); | |
| | | | |
End of changes. 2 change blocks. |
| 1 lines changed or deleted | | 2 lines changed or added | |
|