| Factory.h | | Factory.h | |
|
| // @(#)root/mathcore:$Id: Factory.h 37448 2010-12-09 20:20:56Z moneta $ | | // @(#)root/tmva $Id: Factory.h 40005 2011-06-27 15:29:10Z stelzer $ | |
| // Author: L. Moneta Fri Dec 22 14:43:33 2006 | | // Author: Andreas Hoecker, Peter Speckmayer, Joerg Stelzer, Helge Voss, Ka | |
| | | i Voss, Eckhard von Toerne, Jan Therhaag | |
| | | | |
|
| /********************************************************************** | | /************************************************************************** | |
| * * | | ******** | |
| * Copyright (c) 2006 LCG ROOT Math Team, CERN/PH-SFT * | | * Project: TMVA - a Root-integrated toolkit for multivariate data analysis | |
| * * | | * | |
| * * | | * 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 | |
| | | | |
|
| namespace ROOT { | | protected: | |
| | | | |
| 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 =""); | | | |
| | | | |
| }; | | | |
| | | | |
|
| } // end namespace Fit | | ClassDef(Factory,0) // The factory creates all MVA methods, and perf | |
| | | orms their training and testing | |
| | | }; | |
| | | | |
|
| } // end namespace ROOT | | } // namespace TMVA | |
| | | | |
|
| #endif /* ROOT_Fit_MinimizerFactory */ | | #endif | |
| | | | |
End of changes. 7 change blocks. |
| 53 lines changed or deleted | | 360 lines changed or added | |
|
| FrequentistCalculator.h | | FrequentistCalculator.h | |
| | | | |
| skipping to change at line 43 | | skipping to change at line 43 | |
| class FrequentistCalculator : public HypoTestCalculatorGeneric { | | class FrequentistCalculator : public HypoTestCalculatorGeneric { | |
| | | | |
| public: | | public: | |
| FrequentistCalculator( | | FrequentistCalculator( | |
| 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), | |
|
| fNullImportanceDensity(NULL), | | fConditionalMLEsNull(NULL), | |
| fNullImportanceSnapshot(NULL), | | fConditionalMLEsAlt(NULL), | |
| fAltImportanceDensity(NULL), | | | |
| fAltImportanceSnapshot(NULL), | | | |
| fNToysNull(-1), | | fNToysNull(-1), | |
| fNToysAlt(-1), | | fNToysAlt(-1), | |
| fNToysNullTail(0), | | fNToysNullTail(0), | |
| fNToysAltTail(0) | | fNToysAltTail(0) | |
| { | | { | |
| } | | } | |
| | | | |
| ~FrequentistCalculator() { | | ~FrequentistCalculator() { | |
|
| if(fNullImportanceSnapshot) delete fNullImportanceSnapshot; | | if( fConditionalMLEsNull ) delete fConditionalMLEsNull; | |
| if(fAltImportanceSnapshot) delete fAltImportanceSnapshot; | | if( fConditionalMLEsAlt ) delete fConditionalMLEsAlt; | |
| } | | | |
| | | | |
| // sets importance density and snapshot (optional) | | | |
| void SetNullImportanceDensity(RooAbsPdf *p, const RooArgSet *s = NULL | | | |
| ) { | | | |
| fNullImportanceDensity = p; | | | |
| if(s) fNullImportanceSnapshot = (RooArgSet*)s->snapshot(); | | | |
| else fNullImportanceSnapshot = NULL; | | | |
| } | | | |
| | | | |
| // sets importance density and snapshot (optional) | | | |
| void SetAltImportanceDensity(RooAbsPdf *p, const RooArgSet *s = NULL) | | | |
| { | | | |
| fAltImportanceDensity = p; | | | |
| if(s) fAltImportanceSnapshot = (RooArgSet*)s->snapshot(); | | | |
| else fAltImportanceSnapshot = NULL; | | | |
| } | | } | |
| | | | |
| // 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; } | |
| | | | |
|
| | | // set given nuisance parameters to a specific value that will be use | |
| | | d instead of their | |
| | | // profiled value for Null toys | |
| | | void SetConditionalMLEsNull( const RooArgSet* c ) { | |
| | | if( fConditionalMLEsNull ) delete fConditionalMLEsNull; | |
| | | | |
| | | if( c ) fConditionalMLEsNull = (const RooArgSet*)c->snapshot(); | |
| | | else fConditionalMLEsNull = NULL; | |
| | | } | |
| | | | |
| | | // set given nuisance parameters to a specific value that will be use | |
| | | d instead of their | |
| | | // profiled value for Alternate toys | |
| | | void SetConditionalMLEsAlt( const RooArgSet* c ) { | |
| | | if( fConditionalMLEsAlt ) delete fConditionalMLEsAlt; | |
| | | | |
| | | if( c ) fConditionalMLEsAlt = (const RooArgSet*)c->snapshot(); | |
| | | else fConditionalMLEsAlt = NULL; | |
| | | } | |
| | | | |
| protected: | | protected: | |
| // configure TestStatSampler for the Null run | | // configure TestStatSampler for the Null run | |
| int PreNullHook(RooArgSet *parameterPoint, double obsTestStat) const; | | int PreNullHook(RooArgSet *parameterPoint, double obsTestStat) const; | |
| | | | |
| // configure TestStatSampler for the Alt run | | // configure TestStatSampler for the Alt run | |
| int PreAltHook(RooArgSet *parameterPoint, double obsTestStat) const; | | int PreAltHook(RooArgSet *parameterPoint, double obsTestStat) const; | |
| | | | |
| protected: | | protected: | |
|
| // importance sampling | | // MLE inputs | |
| RooAbsPdf *fNullImportanceDensity; | | const RooArgSet* fConditionalMLEsNull; | |
| const RooArgSet *fNullImportanceSnapshot; | | const RooArgSet* fConditionalMLEsAlt; | |
| RooAbsPdf *fAltImportanceDensity; | | | |
| const RooArgSet *fAltImportanceSnapshot; | | | |
| | | | |
| // 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: | |
| | | | |
End of changes. 4 change blocks. |
| 27 lines changed or deleted | | 27 lines changed or added | |
|
| HFitInterface.h | | HFitInterface.h | |
|
| // @(#)root/hist:$Id: HFitInterface.h 31491 2009-12-01 18:11:55Z moneta $ | | // @(#)root/hist:$Id: HFitInterface.h 42694 2012-01-18 13:09:09Z axel $ | |
| // Author: L. Moneta Thu Aug 31 10:40:20 2006 | | // Author: L. Moneta Thu Aug 31 10:40:20 2006 | |
| | | | |
| /********************************************************************** | | /********************************************************************** | |
| * * | | * * | |
| * Copyright (c) 2006 LCG ROOT Math Team, CERN/PH-SFT * | | * Copyright (c) 2006 LCG ROOT Math Team, CERN/PH-SFT * | |
| * * | | * * | |
| * * | | * * | |
| **********************************************************************/ | | **********************************************************************/ | |
| | | | |
| // Header file for class HFitInterface | | // Header file for class HFitInterface | |
| // set of free functions used to couple the ROOT data object with the fitti
ng classes | | // set of free functions used to couple the ROOT data object with the fitti
ng classes | |
| | | | |
| // avoid including this file when running CINT since free functions cannot
be re-defined | | // avoid including this file when running CINT since free functions cannot
be re-defined | |
| #if !defined(__CINT__) || defined(__MAKECINT__) | | #if !defined(__CINT__) || defined(__MAKECINT__) | |
| | | | |
| #ifndef ROOT_HFitInterface | | #ifndef ROOT_HFitInterface | |
| #define ROOT_HFitInterface | | #define ROOT_HFitInterface | |
| | | | |
| class TH1; | | class TH1; | |
|
| class THnSparse; | | class THnBase; | |
| class TF1; | | class TF1; | |
| class TF2; | | class TF2; | |
| class TGraph; | | class TGraph; | |
| class TGraphErrors; | | class TGraphErrors; | |
| class TGraph2D; | | class TGraph2D; | |
| class TMultiGraph; | | class TMultiGraph; | |
| struct Foption_t; | | struct Foption_t; | |
| | | | |
| #include "TFitResultPtr.h" | | #include "TFitResultPtr.h" | |
| | | | |
| | | | |
| skipping to change at line 75 | | skipping to change at line 75 | |
| fitting function for a MultiGraph (called from TMultiGraph::Fit) | | fitting function for a MultiGraph (called from TMultiGraph::Fit) | |
| */ | | */ | |
| TFitResultPtr FitObject(TMultiGraph * mg, TF1 *f1 , Foption_t & optio
n , const ROOT::Math::MinimizerOptions & moption, const char *goption, ROOT
::Fit::DataRange & range); | | TFitResultPtr FitObject(TMultiGraph * mg, TF1 *f1 , Foption_t & optio
n , const ROOT::Math::MinimizerOptions & moption, const char *goption, ROOT
::Fit::DataRange & range); | |
| | | | |
| /** | | /** | |
| fitting function for a TGraph2D (called from TGraph2D::Fit) | | fitting function for a TGraph2D (called from TGraph2D::Fit) | |
| */ | | */ | |
| TFitResultPtr FitObject(TGraph2D * gr, TF1 *f1 , Foption_t & option ,
const ROOT::Math::MinimizerOptions & moption, const char *goption, ROOT::F
it::DataRange & range); | | TFitResultPtr FitObject(TGraph2D * gr, TF1 *f1 , Foption_t & option ,
const ROOT::Math::MinimizerOptions & moption, const char *goption, ROOT::F
it::DataRange & range); | |
| | | | |
| /** | | /** | |
|
| fitting function for a THnSparse (called from THnSparse::Fit) | | fitting function for a THn / THnSparse (called from THnBase::Fit) | |
| */ | | */ | |
|
| TFitResultPtr FitObject(THnSparse * s1, TF1 *f1, Foption_t & option,
const ROOT::Math::MinimizerOptions & moption, const char *goption, ROOT::Fi
t::DataRange & range); | | TFitResultPtr FitObject(THnBase * s1, TF1 *f1, Foption_t & option, co
nst ROOT::Math::MinimizerOptions & moption, const char *goption, ROOT::Fit:
:DataRange & range); | |
| #endif | | #endif | |
| | | | |
| /** | | /** | |
| fit an unbin data set (from tree or from histogram buffer) | | fit an unbin data set (from tree or from histogram buffer) | |
| using a TF1 pointer and fit options. | | using a TF1 pointer and fit options. | |
| N.B. ownership of fit data is passed to the UnBinFit function whi
ch will be responsible of | | N.B. ownership of fit data is passed to the UnBinFit function whi
ch will be responsible of | |
| deleting the data after the fit. User calling this function MUST
NOT delete UnBinData after | | deleting the data after the fit. User calling this function MUST
NOT delete UnBinData after | |
| calling it. | | calling it. | |
| */ | | */ | |
| TFitResultPtr UnBinFit(ROOT::Fit::UnBinData * data, TF1 * f1 , Foptio
n_t & option , const ROOT::Math::MinimizerOptions & moption); | | TFitResultPtr UnBinFit(ROOT::Fit::UnBinData * data, TF1 * f1 , Foptio
n_t & option , const ROOT::Math::MinimizerOptions & moption); | |
| | | | |
| skipping to change at line 102 | | skipping to change at line 102 | |
| */ | | */ | |
| void FillData ( BinData & dv, const TH1 * hist, TF1 * func = 0); | | void FillData ( BinData & dv, const TH1 * hist, TF1 * func = 0); | |
| | | | |
| /** | | /** | |
| fill the data vector from a TH1 with sparse data. Pass also the T
F1 function which is | | fill the data vector from a TH1 with sparse data. Pass also the T
F1 function which is | |
| needed in case of integral option and to reject points rejected b
y the function | | needed in case of integral option and to reject points rejected b
y the function | |
| */ | | */ | |
| void FillData ( SparseData & dv, const TH1 * hist, TF1 * func = 0); | | void FillData ( SparseData & dv, const TH1 * hist, TF1 * func = 0); | |
| | | | |
| /** | | /** | |
|
| fill the data vector from a THnSparse. Pass also the TF1 function
which is | | fill the data vector from a THnBase. Pass also the TF1 function w
hich is | |
| needed in case of integral option and to reject points rejected b
y the function | | needed in case of integral option and to reject points rejected b
y the function | |
| */ | | */ | |
|
| void FillData ( SparseData & dv, const THnSparse * hist, TF1 * func
= 0); | | void FillData ( SparseData & dv, const THnBase * hist, TF1 * func =
0); | |
| | | | |
| /** | | /** | |
|
| fill the data vector from a THnSparse. Pass also the TF1 function
which is | | fill the data vector from a THnBase. Pass also the TF1 function w
hich is | |
| needed in case of integral option and to reject points rejected b
y the function | | needed in case of integral option and to reject points rejected b
y the function | |
| */ | | */ | |
|
| void FillData ( BinData & dv, const THnSparse * hist, TF1 * func = 0
); | | void FillData ( BinData & dv, const THnBase * hist, TF1 * func = 0); | |
| | | | |
| /** | | /** | |
| fill the data vector from a TGraph2D. Pass also the TF1 function
which is | | fill the data vector from a TGraph2D. Pass also the TF1 function
which is | |
| needed in case of integral option and to reject points rejected b
y the function | | needed in case of integral option and to reject points rejected b
y the function | |
| */ | | */ | |
| void FillData ( BinData & dv, const TGraph2D * gr, TF1 * func = 0); | | void FillData ( BinData & dv, const TGraph2D * gr, TF1 * func = 0); | |
| | | | |
| /** | | /** | |
| fill the data vector from a TGraph. Pass also the TF1 function wh
ich is | | fill the data vector from a TGraph. Pass also the TF1 function wh
ich is | |
| needed in case to exclude points rejected by the function | | needed in case to exclude points rejected by the function | |
| | | | |
End of changes. 8 change blocks. |
| 8 lines changed or deleted | | 8 lines changed or added | |
|
| HybridCalculator.h | | HybridCalculator.h | |
|
| // @(#)root/roostats:$Id: HybridCalculator.h 41998 2011-11-15 10:34:40Z mon
eta $ | | // @(#)root/roostats:$Id: HybridCalculator.h 43199 2012-03-01 20:17:42Z 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 46 | | skipping to change at line 46 | |
| 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(0), | |
| fPriorNuisanceAlt(0), | | fPriorNuisanceAlt(0), | |
|
| fNullImportanceDensity(NULL), | | | |
| fNullImportanceSnapshot(NULL), | | | |
| fAltImportanceDensity(NULL), | | | |
| fAltImportanceSnapshot(NULL), | | | |
| fNToysNull(-1), | | fNToysNull(-1), | |
| fNToysAlt(-1), | | fNToysAlt(-1), | |
| fNToysNullTail(0), | | fNToysNullTail(0), | |
| fNToysAltTail(0) | | fNToysAltTail(0) | |
| { | | { | |
| } | | } | |
| | | | |
| ~HybridCalculator() { | | ~HybridCalculator() { | |
|
| if(fNullImportanceSnapshot) delete fNullImportanceSnapshot; | | | |
| if(fAltImportanceSnapshot) delete fAltImportanceSnapshot; | | | |
| } | | } | |
| | | | |
| // Override the distribution used for marginalizing nuisance paramete
rs that is infered from ModelConfig | | // Override the distribution used for marginalizing nuisance paramete
rs that is infered from ModelConfig | |
| virtual void ForcePriorNuisanceNull(RooAbsPdf& priorNuisance) { fPrio
rNuisanceNull = &priorNuisance; } | | virtual void ForcePriorNuisanceNull(RooAbsPdf& priorNuisance) { fPrio
rNuisanceNull = &priorNuisance; } | |
| virtual void ForcePriorNuisanceAlt(RooAbsPdf& priorNuisance) { fPrior
NuisanceAlt = &priorNuisance; } | | virtual void ForcePriorNuisanceAlt(RooAbsPdf& priorNuisance) { fPrior
NuisanceAlt = &priorNuisance; } | |
| | | | |
|
| // sets importance density and snapshot (optional) | | | |
| void SetNullImportanceDensity(RooAbsPdf *p, const RooArgSet *s = NULL | | | |
| ) { | | | |
| fNullImportanceDensity = p; | | | |
| if(s) fNullImportanceSnapshot = (RooArgSet*)s->snapshot(); | | | |
| else fNullImportanceSnapshot = NULL; | | | |
| } | | | |
| | | | |
| // sets importance density and snapshot (optional) | | | |
| void SetAltImportanceDensity(RooAbsPdf *p, const RooArgSet *s = NULL) | | | |
| { | | | |
| fAltImportanceDensity = p; | | | |
| if(s) fAltImportanceSnapshot = (RooArgSet*)s->snapshot(); | | | |
| else fAltImportanceSnapshot = NULL; | | | |
| } | | | |
| | | | |
| // 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; | |
| | | | |
| // 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; | |
| | | | |
|
| RooAbsPdf *fNullImportanceDensity; | | | |
| const RooArgSet *fNullImportanceSnapshot; | | | |
| RooAbsPdf *fAltImportanceDensity; | | | |
| const RooArgSet *fAltImportanceSnapshot; | | | |
| | | | |
| // 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,1) | |
| | | | |
End of changes. 5 change blocks. |
| 28 lines changed or deleted | | 1 lines changed or added | |
|
| HypoTestResult.h | | HypoTestResult.h | |
|
| // @(#)root/roostats:$Id: HypoTestResult.h 43171 2012-02-29 11:01:18Z monet
a $ | | // @(#)root/roostats:$Id: HypoTestResult.h 43199 2012-03-01 20:17:42Z monet
a $ | |
| // Author: Kyle Cranmer, Lorenzo Moneta, Gregory Schott, Wouter Verkerke, S
ven Kreiss | | // Author: Kyle Cranmer, Lorenzo Moneta, Gregory Schott, Wouter Verkerke, S
ven Kreiss | |
| /************************************************************************* | | /************************************************************************* | |
| * Copyright (C) 1995-2008, Rene Brun and Fons Rademakers. * | | * Copyright (C) 1995-2008, Rene Brun and Fons Rademakers. * | |
| * All rights reserved. * | | * All rights reserved. * | |
| * * | | * * | |
| * For the licensing terms see $ROOTSYS/LICENSE. * | | * For the licensing terms see $ROOTSYS/LICENSE. * | |
| * For the list of contributors see $ROOTSYS/README/CREDITS. * | | * For the list of contributors see $ROOTSYS/README/CREDITS. * | |
| *************************************************************************/ | | *************************************************************************/ | |
| | | | |
| //_________________________________________________ | | //_________________________________________________ | |
| | | | |
| skipping to change at line 69 | | skipping to change at line 69 | |
| | | | |
| namespace RooStats { | | namespace RooStats { | |
| | | | |
| class HypoTestResult : public TNamed { | | class HypoTestResult : public TNamed { | |
| | | | |
| public: | | public: | |
| | | | |
| // default constructor | | // default constructor | |
| explicit HypoTestResult(const char* name = 0); | | explicit HypoTestResult(const char* name = 0); | |
| | | | |
|
| | | // copy constructor | |
| | | HypoTestResult(const HypoTestResult& other); | |
| | | | |
| // constructor from name, null and alternate p values | | // constructor from name, null and alternate p values | |
| HypoTestResult(const char* name, Double_t nullp, Double_t altp); | | HypoTestResult(const char* name, Double_t nullp, Double_t altp); | |
| | | | |
| // destructor | | // destructor | |
| virtual ~HypoTestResult(); | | virtual ~HypoTestResult(); | |
| | | | |
| // add values from another HypoTestResult | | // add values from another HypoTestResult | |
| virtual void Append(const HypoTestResult *other); | | virtual void Append(const HypoTestResult *other); | |
| | | | |
| // Return p-value for null hypothesis | | // Return p-value for null hypothesis | |
| | | | |
| skipping to change at line 106 | | skipping to change at line 109 | |
| } | | } | |
| double thisCLsb = CLsplusb(); | | double thisCLsb = CLsplusb(); | |
| return thisCLsb / thisCLb; | | return thisCLsb / thisCLb; | |
| } | | } | |
| | | | |
| // familiar name for the Null p-value in terms of 1-sided Gaussian si
gnificance | | // familiar name for the Null p-value in terms of 1-sided Gaussian si
gnificance | |
| virtual Double_t Significance() const {return RooStats::PValueToSigni
ficance( NullPValue() ); } | | virtual Double_t Significance() const {return RooStats::PValueToSigni
ficance( NullPValue() ); } | |
| | | | |
| SamplingDistribution* GetNullDistribution(void) const { return fNullD
istr; } | | SamplingDistribution* GetNullDistribution(void) const { return fNullD
istr; } | |
| SamplingDistribution* GetAltDistribution(void) const { return fAltDis
tr; } | | SamplingDistribution* GetAltDistribution(void) const { return fAltDis
tr; } | |
|
| | | RooDataSet* GetNullDetailedOutput(void) const { return fNullDetailedO | |
| | | utput; } | |
| | | RooDataSet* GetAltDetailedOutput(void) const { return fAltDetailedOut | |
| | | put; } | |
| Double_t GetTestStatisticData(void) const { return fTestStatisticData
; } | | Double_t GetTestStatisticData(void) const { return fTestStatisticData
; } | |
|
| | | const RooArgList* GetAllTestStatisticsData(void) const { return fAllT
estStatisticsData; } | |
| Bool_t HasTestStatisticData(void) const; | | Bool_t HasTestStatisticData(void) const; | |
| | | | |
| void SetAltDistribution(SamplingDistribution *alt); | | void SetAltDistribution(SamplingDistribution *alt); | |
| void SetNullDistribution(SamplingDistribution *null); | | void SetNullDistribution(SamplingDistribution *null); | |
|
| | | void SetAltDetailedOutput(RooDataSet* d) { fAltDetailedOutput = d; } | |
| | | void SetNullDetailedOutput(RooDataSet* d) { fNullDetailedOutput = d; | |
| | | } | |
| void SetTestStatisticData(const Double_t tsd); | | void SetTestStatisticData(const Double_t tsd); | |
|
| | | void SetAllTestStatisticsData(const RooArgList* tsd); | |
| | | | |
| void SetPValueIsRightTail(Bool_t pr); | | void SetPValueIsRightTail(Bool_t pr); | |
| Bool_t GetPValueIsRightTail(void) const { return fPValueIsRightTail;
} | | Bool_t GetPValueIsRightTail(void) const { return fPValueIsRightTail;
} | |
| | | | |
| void SetBackgroundAsAlt(Bool_t l = kTRUE) { fBackgroundIsAlt = l; } | | void SetBackgroundAsAlt(Bool_t l = kTRUE) { fBackgroundIsAlt = l; } | |
| Bool_t GetBackGroundIsAlt(void) const { return fBackgroundIsAlt; } | | Bool_t GetBackGroundIsAlt(void) const { return fBackgroundIsAlt; } | |
| | | | |
| /// The error on the "confidence level" of the null hypothesis | | /// The error on the "confidence level" of the null hypothesis | |
| Double_t CLbError() const; | | Double_t CLbError() const; | |
| | | | |
| | | | |
| skipping to change at line 142 | | skipping to change at line 151 | |
| private: | | private: | |
| void UpdatePValue(const SamplingDistribution* distr, Double_t &pvalue
, Double_t &perror, Bool_t pIsRightTail); | | void UpdatePValue(const SamplingDistribution* distr, Double_t &pvalue
, Double_t &perror, Bool_t pIsRightTail); | |
| | | | |
| protected: | | protected: | |
| | | | |
| mutable Double_t fNullPValue; // p-value for the null hypothesis (sma
ll number means disfavored) | | mutable Double_t fNullPValue; // p-value for the null hypothesis (sma
ll number means disfavored) | |
| mutable Double_t fAlternatePValue; // p-value for the alternate hypot
hesis (small number means disfavored) | | mutable Double_t fAlternatePValue; // p-value for the alternate hypot
hesis (small number means disfavored) | |
| mutable Double_t fNullPValueError; // error of p-value for the null h
ypothesis (small number means disfavored) | | mutable Double_t fNullPValueError; // error of p-value for the null h
ypothesis (small number means disfavored) | |
| mutable Double_t fAlternatePValueError; // error of p-value for the a
lternate hypothesis (small number means disfavored) | | mutable Double_t fAlternatePValueError; // error of p-value for the a
lternate hypothesis (small number means disfavored) | |
| Double_t fTestStatisticData; // result of the test statistic evaluate
d on data | | Double_t fTestStatisticData; // result of the test statistic evaluate
d on data | |
|
| | | const RooArgList* fAllTestStatisticsData; // for the case of multiple
test statistics, holds all the results | |
| SamplingDistribution *fNullDistr; | | SamplingDistribution *fNullDistr; | |
| SamplingDistribution *fAltDistr; | | SamplingDistribution *fAltDistr; | |
|
| | | RooDataSet* fNullDetailedOutput; | |
| | | RooDataSet* fAltDetailedOutput; | |
| Bool_t fPValueIsRightTail; | | Bool_t fPValueIsRightTail; | |
| Bool_t fBackgroundIsAlt; | | Bool_t fBackgroundIsAlt; | |
| | | | |
|
| ClassDef(HypoTestResult,2) // Base class to represent results of a h
ypothesis test | | ClassDef(HypoTestResult,3) // Base class to represent results of a h
ypothesis test | |
| | | | |
| }; | | }; | |
| } | | } | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 9 change blocks. |
| 2 lines changed or deleted | | 17 lines changed or added | |
|
| ParamHistFunc.h | | ParamHistFunc.h | |
| | | | |
| skipping to change at line 50 | | skipping to change at line 50 | |
| //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(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) | | | |
| | | | |
| void setParamConst( Int_t, Bool_t=kTRUE ); | | | |
| | | | |
| RooRealVar& getParameter() const ; | | | |
| RooRealVar& getParameter( Int_t masterIdx ) const ; | | | |
| | | | |
| const RooArgSet* get(Int_t masterIdx) const { return _dataSet.get( master | | | |
| Idx ) ; } | | | |
| const RooArgSet* get(const RooArgSet& coord) const { return _dataSet.get( | | | |
| coord ) ; } | | | |
| | | | |
| virtual Bool_t forceAnalyticalInt(const RooAbsArg&) const { return kTRUE
; } | | virtual Bool_t forceAnalyticalInt(const RooAbsArg&) const { return kTRUE
; } | |
| | | | |
| 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 ; | |
| | | | |
|
| | | Int_t getCurrentBin() const ; | |
| | | RooRealVar& getParameter( Int_t ) const ; | |
| | | RooRealVar& getParameter() const ; | |
| | | | |
| | | void setParamConst( Int_t, Bool_t=kTRUE ); | |
| | | | |
| static RooArgList createParamSet(RooWorkspace& w, const std::string&, con
st RooArgList& Vars); | | static RooArgList createParamSet(RooWorkspace& w, const std::string&, con
st RooArgList& Vars); | |
| static RooArgList createParamSet(RooWorkspace& w, const std::string&, con
st RooArgList& Vars, Double_t, Double_t); | | static RooArgList createParamSet(RooWorkspace& w, const std::string&, con
st RooArgList& Vars, Double_t, Double_t); | |
| static RooArgList createParamSet(const std::string&, Int_t, Double_t, Dou
ble_t); | | static RooArgList createParamSet(const std::string&, Int_t, Double_t, Dou
ble_t); | |
| | | | |
| virtual std::list<Double_t>* binBoundaries(RooAbsRealLValue& /*obs*/, Dou
ble_t /*xlo*/, Double_t /*xhi*/) const ; | | virtual std::list<Double_t>* binBoundaries(RooAbsRealLValue& /*obs*/, Dou
ble_t /*xlo*/, Double_t /*xhi*/) const ; | |
| virtual std::list<Double_t>* plotSamplingHint(RooAbsRealLValue& obs, Doub
le_t xlo, Double_t xhi) const ; | | virtual std::list<Double_t>* plotSamplingHint(RooAbsRealLValue& obs, Doub
le_t xlo, Double_t xhi) const ; | |
| virtual Bool_t isBinnedDistribution(const RooArgSet& /*obs*/) const {retu
rn kTRUE;} | | virtual Bool_t isBinnedDistribution(const RooArgSet& /*obs*/) const {retu
rn kTRUE;} | |
| | | | |
| protected: | | protected: | |
| | | | |
| | | | |
| skipping to change at line 105 | | skipping to change at line 101 | |
| 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; | |
| mutable std::map<Int_t, Int_t> _binMap; | | mutable std::map<Int_t, Int_t> _binMap; | |
| mutable RooDataHist _dataSet; | | mutable RooDataHist _dataSet; | |
| | | | |
| // std::vector< Double_t > _nominalVals; // The nominal vals when gamma =
1.0 ( = 1.0 by default) | | // std::vector< Double_t > _nominalVals; // The nominal vals when gamma =
1.0 ( = 1.0 by default) | |
| RooArgList _ownedList ; // List of owned components | | RooArgList _ownedList ; // List of owned components | |
| | | | |
|
| Int_t getCurrentBin() const ; | | | |
| Int_t addVarSet( const RooArgList& vars ); | | Int_t addVarSet( const RooArgList& vars ); | |
| Int_t addParamSet( const RooArgList& params ); | | Int_t addParamSet( const RooArgList& params ); | |
| static Int_t GetNumBins( const RooArgSet& vars ); | | static Int_t GetNumBins( const RooArgSet& vars ); | |
| Double_t evaluate() const; | | Double_t evaluate() const; | |
| | | | |
| ClassDef(ParamHistFunc,4) // Sum of RooAbsReal objects | | ClassDef(ParamHistFunc,4) // Sum of RooAbsReal objects | |
| }; | | }; | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 3 change blocks. |
| 14 lines changed or deleted | | 6 lines changed or added | |
|
| ProfileLikelihoodTestStat.h | | ProfileLikelihoodTestStat.h | |
|
| // @(#)root/roostats:$Id: ProfileLikelihoodTestStat.h 43017 2012-02-16 02:5
8:44Z cranmer $ | | // @(#)root/roostats:$Id: ProfileLikelihoodTestStat.h 43199 2012-03-01 20:1
7:42Z moneta $ | |
| // Author: Kyle Cranmer, Lorenzo Moneta, Gregory Schott, Wouter Verkerke | | // Author: Kyle Cranmer, Lorenzo Moneta, Gregory Schott, Wouter Verkerke | |
| // Additional Contributions: Giovanni Petrucciani | | // Additional Contributions: Giovanni Petrucciani | |
| /************************************************************************* | | /************************************************************************* | |
| * Copyright (C) 1995-2008, Rene Brun and Fons Rademakers. * | | * Copyright (C) 1995-2008, Rene Brun and Fons Rademakers. * | |
| * All rights reserved. * | | * All rights reserved. * | |
| * * | | * * | |
| * For the licensing terms see $ROOTSYS/LICENSE. * | | * For the licensing terms see $ROOTSYS/LICENSE. * | |
| * For the list of contributors see $ROOTSYS/README/CREDITS. * | | * For the list of contributors see $ROOTSYS/README/CREDITS. * | |
| *************************************************************************/ | | *************************************************************************/ | |
| | | | |
| | | | |
| skipping to change at line 72 | | skipping to change at line 72 | |
| public: | | public: | |
| ProfileLikelihoodTestStat() { | | ProfileLikelihoodTestStat() { | |
| // Proof constructor. Do not use. | | // Proof constructor. Do not use. | |
| fPdf = 0; | | fPdf = 0; | |
| fProfile = 0; | | fProfile = 0; | |
| fNll = 0; | | fNll = 0; | |
| fCachedBestFitParams = 0; | | fCachedBestFitParams = 0; | |
| fLastData = 0; | | fLastData = 0; | |
| fLimitType = twoSided; | | fLimitType = twoSided; | |
| fSigned = false; | | fSigned = false; | |
|
| | | fDetailedOutputEnabled = false; | |
| | | fDetailedOutput = NULL; | |
| | | | |
| | | fUncML = new RooRealVar("uncondML","unconditional ML", 0.0); | |
| | | fFitStatus = new RooRealVar("fitStatus","fit status", 0.0); | |
| | | fCovQual = new RooRealVar("covQual","quality of covariance matrix", | |
| | | 0.0); | |
| | | fNumInvalidNLLEval = new RooRealVar("numInvalidNLLEval","number of | |
| | | invalid NLL evaluations", 0.0); | |
| | | | |
| | | fVarName = "Profile Likelihood Ratio"; | |
| fReuseNll = false; | | fReuseNll = false; | |
| fMinimizer=::ROOT::Math::MinimizerOptions::DefaultMinimizerType().c_
str(); | | fMinimizer=::ROOT::Math::MinimizerOptions::DefaultMinimizerType().c_
str(); | |
| fStrategy=::ROOT::Math::MinimizerOptions::DefaultStrategy(); | | fStrategy=::ROOT::Math::MinimizerOptions::DefaultStrategy(); | |
| fTolerance=TMath::Max(1.,::ROOT::Math::MinimizerOptions::DefaultTol
erance()); | | fTolerance=TMath::Max(1.,::ROOT::Math::MinimizerOptions::DefaultTol
erance()); | |
| fPrintLevel=::ROOT::Math::MinimizerOptions::DefaultPrintLevel(); | | fPrintLevel=::ROOT::Math::MinimizerOptions::DefaultPrintLevel(); | |
| | | | |
| } | | } | |
| ProfileLikelihoodTestStat(RooAbsPdf& pdf) { | | ProfileLikelihoodTestStat(RooAbsPdf& pdf) { | |
| fPdf = &pdf; | | fPdf = &pdf; | |
| fProfile = 0; | | fProfile = 0; | |
| fNll = 0; | | fNll = 0; | |
| fCachedBestFitParams = 0; | | fCachedBestFitParams = 0; | |
| fLastData = 0; | | fLastData = 0; | |
| fLimitType = twoSided; | | fLimitType = twoSided; | |
| fSigned = false; | | fSigned = false; | |
|
| | | fDetailedOutputEnabled = false; | |
| | | fDetailedOutput = NULL; | |
| | | | |
| | | fUncML = new RooRealVar("uncondML","unconditional ML", 0.0); | |
| | | fFitStatus = new RooRealVar("fitStatus","fit status", 0.0); | |
| | | fCovQual = new RooRealVar("covQual","quality of covariance matrix", | |
| | | 0.0); | |
| | | fNumInvalidNLLEval = new RooRealVar("numInvalidNLLEval","number of i | |
| | | nvalid NLL evaluations", 0.0); | |
| | | | |
| | | fVarName = "Profile Likelihood Ratio"; | |
| fReuseNll = false; | | fReuseNll = false; | |
| fMinimizer=::ROOT::Math::MinimizerOptions::DefaultMinimizerType().c_
str(); | | fMinimizer=::ROOT::Math::MinimizerOptions::DefaultMinimizerType().c_
str(); | |
| fStrategy=::ROOT::Math::MinimizerOptions::DefaultStrategy(); | | fStrategy=::ROOT::Math::MinimizerOptions::DefaultStrategy(); | |
| // avoid default tolerance to be too small (1. is default in RooMini
mizer) | | // avoid default tolerance to be too small (1. is default in RooMini
mizer) | |
| fTolerance=TMath::Max(1.,::ROOT::Math::MinimizerOptions::DefaultTole
rance()); | | fTolerance=TMath::Max(1.,::ROOT::Math::MinimizerOptions::DefaultTole
rance()); | |
| fPrintLevel=::ROOT::Math::MinimizerOptions::DefaultPrintLevel(); | | fPrintLevel=::ROOT::Math::MinimizerOptions::DefaultPrintLevel(); | |
| } | | } | |
| virtual ~ProfileLikelihoodTestStat() { | | virtual ~ProfileLikelihoodTestStat() { | |
| // delete fRand; | | // delete fRand; | |
| // delete fTestStatistic; | | // delete fTestStatistic; | |
| if(fProfile) delete fProfile; | | if(fProfile) delete fProfile; | |
| if(fNll) delete fNll; | | if(fNll) delete fNll; | |
| if(fCachedBestFitParams) delete fCachedBestFitParams; | | if(fCachedBestFitParams) delete fCachedBestFitParams; | |
|
| | | if(fDetailedOutput) delete fDetailedOutput; | |
| } | | } | |
| void SetOneSided(Bool_t flag=true) {fLimitType = (flag ? oneSided : tw
oSided);} | | void SetOneSided(Bool_t flag=true) {fLimitType = (flag ? oneSided : tw
oSided);} | |
| void SetOneSidedDiscovery(Bool_t flag=true) {fLimitType = (flag ? oneS
idedDiscovery : twoSided);} | | void SetOneSidedDiscovery(Bool_t flag=true) {fLimitType = (flag ? oneS
idedDiscovery : twoSided);} | |
| void SetSigned(Bool_t flag=true) {fSigned = flag;} // +/- t_mu instea
d of t_mu>0 with one-sided settings | | void SetSigned(Bool_t flag=true) {fSigned = flag;} // +/- t_mu instea
d of t_mu>0 with one-sided settings | |
|
| | | //void SetOneSidedDiscovery(Bool_t flag=true) {fOneSidedDiscovery = fl
ag;} | |
| | | | |
| static void SetAlwaysReuseNLL(Bool_t flag) { fgAlwaysReuseNll = flag ;
} | | static void SetAlwaysReuseNLL(Bool_t flag) { fgAlwaysReuseNll = flag ;
} | |
| void SetReuseNLL(Bool_t flag) { fReuseNll = flag ; } | | void SetReuseNLL(Bool_t flag) { fReuseNll = flag ; } | |
| | | | |
| void SetMinimizer(const char* minimizer){ fMinimizer=minimizer;} | | void SetMinimizer(const char* minimizer){ fMinimizer=minimizer;} | |
| void SetStrategy(Int_t strategy){fStrategy=strategy;} | | void SetStrategy(Int_t strategy){fStrategy=strategy;} | |
| void SetTolerance(double tol){fTolerance=tol;} | | void SetTolerance(double tol){fTolerance=tol;} | |
| void SetPrintLevel(Int_t printlevel){fPrintLevel=printlevel;} | | void SetPrintLevel(Int_t printlevel){fPrintLevel=printlevel;} | |
| | | | |
| // Main interface to evaluate the test statistic on a dataset | | // Main interface to evaluate the test statistic on a dataset | |
| virtual Double_t Evaluate(RooAbsData& data, RooArgSet& paramsOfInteres
t) { | | virtual Double_t Evaluate(RooAbsData& data, RooArgSet& paramsOfInteres
t) { | |
| return EvaluateProfileLikelihood(0, data, paramsOfInterest); | | return EvaluateProfileLikelihood(0, data, paramsOfInterest); | |
| } | | } | |
| | | | |
| // evaluate the profile likelihood ratio (type = 0) or the minimum of
likelihood (type=1) or the conditional LL (type = 2) | | // evaluate the profile likelihood ratio (type = 0) or the minimum of
likelihood (type=1) or the conditional LL (type = 2) | |
| virtual Double_t EvaluateProfileLikelihood(int type, RooAbsData &data,
RooArgSet & paramsOfInterest); | | virtual Double_t EvaluateProfileLikelihood(int type, RooAbsData &data,
RooArgSet & paramsOfInterest); | |
| | | | |
|
| virtual const TString GetVarName() const {return "Profile Likelihood | | virtual void EnableDetailedOutput( bool e=true ) { fDetailedOutputEnab | |
| Ratio";} | | led = e; fDetailedOutput = NULL; } | |
| | | virtual const RooArgSet* GetDetailedOutput(void) const { return fDetai | |
| | | ledOutput; } | |
| | | | |
| | | virtual void SetVarName(const char* name) { fVarName = name; } | |
| | | virtual const TString GetVarName() const {return fVarName;} | |
| | | | |
| // const bool PValueIsRightTail(void) { return false; } // overw
rites default | | // const bool PValueIsRightTail(void) { return false; } // overw
rites default | |
| | | | |
| private: | | private: | |
| | | | |
| double GetMinNLL(int& status); | | double GetMinNLL(int& status); | |
| | | | |
| private: | | private: | |
| RooProfileLL* fProfile; //! | | RooProfileLL* fProfile; //! | |
| RooAbsPdf* fPdf; | | RooAbsPdf* fPdf; | |
| RooNLLVar* fNll; //! | | RooNLLVar* fNll; //! | |
| const RooArgSet* fCachedBestFitParams; | | const RooArgSet* fCachedBestFitParams; | |
| RooAbsData* fLastData; | | RooAbsData* fLastData; | |
| // Double_t fLastMLE; | | // Double_t fLastMLE; | |
| LimitType fLimitType; | | LimitType fLimitType; | |
| Bool_t fSigned; | | Bool_t fSigned; | |
| | | | |
|
| | | // this will store a snapshot of the unconditional nuisance | |
| | | // parameter fit. | |
| | | bool fDetailedOutputEnabled; | |
| | | const RooArgSet* fDetailedOutput; //! | |
| | | | |
| | | RooRealVar* fUncML; //! | |
| | | RooRealVar* fFitStatus; //! | |
| | | RooRealVar* fCovQual; //! | |
| | | RooRealVar* fNumInvalidNLLEval; //! | |
| | | | |
| | | TString fVarName; | |
| | | | |
| static Bool_t fgAlwaysReuseNll ; | | static Bool_t fgAlwaysReuseNll ; | |
| Bool_t fReuseNll ; | | Bool_t fReuseNll ; | |
| TString fMinimizer; | | TString fMinimizer; | |
| Int_t fStrategy; | | Int_t fStrategy; | |
| Double_t fTolerance; | | Double_t fTolerance; | |
| Int_t fPrintLevel; | | Int_t fPrintLevel; | |
| | | | |
| protected: | | protected: | |
|
| ClassDef(ProfileLikelihoodTestStat,7) // implements the profile lik | | | |
| elihood ratio as a test statistic to be used with several tools | | ClassDef(ProfileLikelihoodTestStat,8) // implements the profile lik | |
| | | elihood ratio as a test statistic to be used with several tools | |
| }; | | }; | |
| } | | } | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 8 change blocks. |
| 5 lines changed or deleted | | 47 lines changed or added | |
|
| SharedLibrary.h | | SharedLibrary.h | |
|
| // @(#)root/reflex:$Id: SharedLibrary.h 29288 2009-07-01 13:03:35Z axel $ | | // @(#)root/reflex:$Id: SharedLibrary.h 42838 2012-01-31 17:06:48Z axel $ | |
| // Author: Stefan Roiser 2006 | | // Author: Stefan Roiser 2006 | |
| | | | |
| // Copyright CERN, CH-1211 Geneva 23, 2004-2006, All rights reserved. | | // Copyright CERN, CH-1211 Geneva 23, 2004-2006, All rights reserved. | |
| // | | // | |
| // Permission to use, copy, modify, and distribute this software for any | | // Permission to use, copy, modify, and distribute this software for any | |
| // purpose is hereby granted without fee, provided that this copyright and | | // purpose is hereby granted without fee, provided that this copyright and | |
| // permissions notice appear in all copies and derivatives. | | // permissions notice appear in all copies and derivatives. | |
| // | | // | |
| // This software is provided "as is" without express or implied warranty. | | // This software is provided "as is" without express or implied warranty. | |
| | | | |
| | | | |
| skipping to change at line 42 | | skipping to change at line 42 | |
| public: | | public: | |
| SharedLibrary(const std::string& libname); | | SharedLibrary(const std::string& libname); | |
| | | | |
| bool Load(); | | bool Load(); | |
| | | | |
| bool Unload(); | | bool Unload(); | |
| | | | |
| bool Symbol(const std::string& symname, | | bool Symbol(const std::string& symname, | |
| void*& sym); | | void*& sym); | |
| | | | |
|
| const std::string Error(); | | std::string Error(); | |
| | | | |
| private: | | private: | |
| /** a handle to the loaded library */ | | /** a handle to the loaded library */ | |
| #ifdef _WIN32 | | #ifdef _WIN32 | |
| HMODULE fHandle; | | HMODULE fHandle; | |
| #else | | #else | |
| void* fHandle; | | void* fHandle; | |
| #endif | | #endif | |
| /** the name of the shared library to handle */ | | /** the name of the shared library to handle */ | |
| std::string fLibName; | | std::string fLibName; | |
| | | | |
| skipping to change at line 65 | | skipping to change at line 65 | |
| } // namespace Reflex | | } // namespace Reflex | |
| | | | |
| //-------------------------------------------------------------------------
------ | | //-------------------------------------------------------------------------
------ | |
| inline Reflex::SharedLibrary::SharedLibrary(const std::string& libname): | | inline Reflex::SharedLibrary::SharedLibrary(const std::string& libname): | |
| //-------------------------------------------------------------------------
------ | | //-------------------------------------------------------------------------
------ | |
| fHandle(0), | | fHandle(0), | |
| fLibName(libname) { | | fLibName(libname) { | |
| } | | } | |
| | | | |
| //-------------------------------------------------------------------------
------ | | //-------------------------------------------------------------------------
------ | |
|
| inline const std::string | | inline std::string | |
| Reflex::SharedLibrary::Error() { | | Reflex::SharedLibrary::Error() { | |
| //-------------------------------------------------------------------------
------ | | //-------------------------------------------------------------------------
------ | |
|
| std::string errString = ""; | | std::string errString; | |
| #ifdef _WIN32 | | #ifdef _WIN32 | |
| int error = ::GetLastError(); | | int error = ::GetLastError(); | |
| LPVOID lpMessageBuffer; | | LPVOID lpMessageBuffer; | |
| ::FormatMessage( | | ::FormatMessage( | |
| FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, | | FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, | |
| NULL, | | NULL, | |
| error, | | error, | |
| MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), //The user default languag
e | | MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), //The user default languag
e | |
| (LPTSTR) &lpMessageBuffer, | | (LPTSTR) &lpMessageBuffer, | |
| 0, | | 0, | |
| NULL); | | NULL); | |
| errString = (const char*) lpMessageBuffer; | | errString = (const char*) lpMessageBuffer; | |
| // Free the buffer allocated by the system | | // Free the buffer allocated by the system | |
| ::LocalFree(lpMessageBuffer); | | ::LocalFree(lpMessageBuffer); | |
| #else | | #else | |
|
| errString = std::string(dlerror()); | | const char* err = dlerror(); | |
| | | if (err) { | |
| | | errString = err; | |
| | | } | |
| #endif | | #endif | |
| return errString; | | return errString; | |
| } // Error | | } // Error | |
| | | | |
| //-------------------------------------------------------------------------
------ | | //-------------------------------------------------------------------------
------ | |
| inline bool | | inline bool | |
| Reflex::SharedLibrary::Load() { | | Reflex::SharedLibrary::Load() { | |
| //-------------------------------------------------------------------------
------ | | //-------------------------------------------------------------------------
------ | |
| | | | |
| #ifdef _WIN32 | | #ifdef _WIN32 | |
| | | | |
End of changes. 5 change blocks. |
| 5 lines changed or deleted | | 8 lines changed or added | |
|
| SimpleLikelihoodRatioTestStat.h | | SimpleLikelihoodRatioTestStat.h | |
|
| // @(#)root/roostats:$Id: SimpleLikelihoodRatioTestStat.h 42339 2011-11-30
23:54:18Z moneta $ | | // @(#)root/roostats:$Id: SimpleLikelihoodRatioTestStat.h 43199 2012-03-01
20:17:42Z 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 32 | | skipping to change at line 32 | |
| // | | // | |
| | | | |
| #ifndef ROOT_Rtypes | | #ifndef ROOT_Rtypes | |
| #include "Rtypes.h" | | #include "Rtypes.h" | |
| #endif | | #endif | |
| | | | |
| #ifndef ROO_NLL_VAR | | #ifndef ROO_NLL_VAR | |
| #include "RooNLLVar.h" | | #include "RooNLLVar.h" | |
| #endif | | #endif | |
| | | | |
|
| | | #include "RooRealVar.h" | |
| | | | |
| #include "RooStats/TestStatistic.h" | | #include "RooStats/TestStatistic.h" | |
| #include "RooWorkspace.h" | | #include "RooWorkspace.h" | |
| | | | |
| namespace RooStats { | | namespace RooStats { | |
| | | | |
| class SimpleLikelihoodRatioTestStat : public TestStatistic { | | class SimpleLikelihoodRatioTestStat : public TestStatistic { | |
| | | | |
| public: | | public: | |
| | | | |
| //__________________________________ | | //__________________________________ | |
| SimpleLikelihoodRatioTestStat() : | | SimpleLikelihoodRatioTestStat() : | |
| fNullPdf(NULL), fAltPdf(NULL) | | fNullPdf(NULL), fAltPdf(NULL) | |
| { | | { | |
| // Constructor for proof. Do not use. | | // Constructor for proof. Do not use. | |
| fFirstEval = true; | | fFirstEval = true; | |
|
| | | fDetailedOutputEnabled = false; | |
| | | fDetailedOutput = NULL; | |
| fNullParameters = NULL; | | fNullParameters = NULL; | |
| fAltParameters = NULL; | | fAltParameters = NULL; | |
| fReuseNll=kFALSE ; | | fReuseNll=kFALSE ; | |
| fNllNull=NULL ; | | fNllNull=NULL ; | |
| fNllAlt=NULL ; | | fNllAlt=NULL ; | |
| } | | } | |
| | | | |
| //__________________________________ | | //__________________________________ | |
| SimpleLikelihoodRatioTestStat( | | SimpleLikelihoodRatioTestStat( | |
| RooAbsPdf& nullPdf, | | RooAbsPdf& nullPdf, | |
| | | | |
| skipping to change at line 74 | | skipping to change at line 78 | |
| fAltPdf = &altPdf; | | fAltPdf = &altPdf; | |
| | | | |
| RooArgSet * allNullVars = fNullPdf->getVariables(); | | RooArgSet * allNullVars = fNullPdf->getVariables(); | |
| fNullParameters = (RooArgSet*) allNullVars->snapshot(); | | fNullParameters = (RooArgSet*) allNullVars->snapshot(); | |
| delete allNullVars; | | delete allNullVars; | |
| | | | |
| RooArgSet * allAltVars = fAltPdf->getVariables(); | | RooArgSet * allAltVars = fAltPdf->getVariables(); | |
| fAltParameters = (RooArgSet*) allAltVars->snapshot(); | | fAltParameters = (RooArgSet*) allAltVars->snapshot(); | |
| delete allAltVars; | | delete allAltVars; | |
| | | | |
|
| | | fDetailedOutputEnabled = false; | |
| | | fDetailedOutput = NULL; | |
| | | | |
| fReuseNll=kFALSE ; | | fReuseNll=kFALSE ; | |
| fNllNull=NULL ; | | fNllNull=NULL ; | |
| fNllAlt=NULL ; | | fNllAlt=NULL ; | |
| } | | } | |
| //__________________________________ | | //__________________________________ | |
| SimpleLikelihoodRatioTestStat( | | SimpleLikelihoodRatioTestStat( | |
| RooAbsPdf& nullPdf, | | RooAbsPdf& nullPdf, | |
| RooAbsPdf& altPdf, | | RooAbsPdf& altPdf, | |
| const RooArgSet& nullParameters, | | const RooArgSet& nullParameters, | |
| const RooArgSet& altParameters | | const RooArgSet& altParameters | |
| ) : | | ) : | |
| fFirstEval(true) | | fFirstEval(true) | |
| { | | { | |
| // Takes null and alternate parameters from values in nullParamete
rs | | // Takes null and alternate parameters from values in nullParamete
rs | |
| // and altParameters. Can be overridden. | | // and altParameters. Can be overridden. | |
| fNullPdf = &nullPdf; | | fNullPdf = &nullPdf; | |
| fAltPdf = &altPdf; | | fAltPdf = &altPdf; | |
| | | | |
| fNullParameters = (RooArgSet*) nullParameters.snapshot(); | | fNullParameters = (RooArgSet*) nullParameters.snapshot(); | |
| fAltParameters = (RooArgSet*) altParameters.snapshot(); | | fAltParameters = (RooArgSet*) altParameters.snapshot(); | |
|
| | | | |
| | | fDetailedOutputEnabled = false; | |
| | | fDetailedOutput = NULL; | |
| | | | |
| fReuseNll=kFALSE ; | | fReuseNll=kFALSE ; | |
| fNllNull=NULL ; | | fNllNull=NULL ; | |
| fNllAlt=NULL ; | | fNllAlt=NULL ; | |
| } | | } | |
| | | | |
| //______________________________ | | //______________________________ | |
| virtual ~SimpleLikelihoodRatioTestStat() { | | virtual ~SimpleLikelihoodRatioTestStat() { | |
| if (fNullParameters) delete fNullParameters; | | if (fNullParameters) delete fNullParameters; | |
| if (fAltParameters) delete fAltParameters; | | if (fAltParameters) delete fAltParameters; | |
| if (fNllNull) delete fNllNull ; | | if (fNllNull) delete fNllNull ; | |
| if (fNllAlt) delete fNllAlt ; | | if (fNllAlt) delete fNllAlt ; | |
|
| | | if (fDetailedOutput) delete fDetailedOutput; | |
| } | | } | |
| | | | |
| static void SetAlwaysReuseNLL(Bool_t flag) { fAlwaysReuseNll = flag ;
} | | static void SetAlwaysReuseNLL(Bool_t flag) { fAlwaysReuseNll = flag ;
} | |
| void SetReuseNLL(Bool_t flag) { fReuseNll = flag ; } | | void SetReuseNLL(Bool_t flag) { fReuseNll = flag ; } | |
| | | | |
| //_________________________________________ | | //_________________________________________ | |
| void SetNullParameters(const RooArgSet& nullParameters) { | | void SetNullParameters(const RooArgSet& nullParameters) { | |
| if (fNullParameters) delete fNullParameters; | | if (fNullParameters) delete fNullParameters; | |
| fFirstEval = true; | | fFirstEval = true; | |
| // if(fNullParameters) delete fNullParameters; | | // if(fNullParameters) delete fNullParameters; | |
| | | | |
| skipping to change at line 162 | | skipping to change at line 174 | |
| } | | } | |
| fFirstEval = false; | | fFirstEval = false; | |
| | | | |
| RooFit::MsgLevel msglevel = RooMsgService::instance().globalKillBe
low(); | | RooFit::MsgLevel msglevel = RooMsgService::instance().globalKillBe
low(); | |
| RooMsgService::instance().setGlobalKillBelow(RooFit::FATAL); | | RooMsgService::instance().setGlobalKillBelow(RooFit::FATAL); | |
| | | | |
| Bool_t reuse = (fReuseNll || fAlwaysReuseNll) ; | | Bool_t reuse = (fReuseNll || fAlwaysReuseNll) ; | |
| | | | |
| Bool_t created = kFALSE ; | | Bool_t created = kFALSE ; | |
| if (!fNllNull) { | | if (!fNllNull) { | |
|
| fNllNull = (RooNLLVar*) fNullPdf->createNLL(data, RooFit::CloneDa | | RooArgSet* allParams = fNullPdf->getParameters(data); | |
| ta(kFALSE)); | | fNllNull = (RooNLLVar*) fNullPdf->createNLL(data, RooFit::CloneDa | |
| | | ta(kFALSE),RooFit::Constrain(*allParams)); | |
| | | delete allParams; | |
| created = kTRUE ; | | created = kTRUE ; | |
| } | | } | |
| 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 << endl << "SLRTS: null params:" << endl; | |
| | | //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) { | |
|
| fNllAlt = (RooNLLVar*) fAltPdf->createNLL(data, RooFit::CloneData | | RooArgSet* allParams = fAltPdf->getParameters(data); | |
| (kFALSE)); | | fNllAlt = (RooNLLVar*) fAltPdf->createNLL(data, RooFit::CloneData | |
| | | (kFALSE),RooFit::Constrain(*allParams)); | |
| | | delete allParams; | |
| 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 << endl << "SLRTS: alt params:" << endl; | |
| | | //attachedSet->Print("v"); | |
| | | | |
| | | //cout << endl << "SLRTS null NLL: " << nullNLL << " alt NLL: " | |
| | | << altNLL << endl << endl; | |
| | | | |
| if (!reuse) { | | if (!reuse) { | |
| delete fNllAlt ; fNllAlt = NULL ; | | delete fNllAlt ; fNllAlt = NULL ; | |
| } | | } | |
| delete attachedSet; | | delete attachedSet; | |
| | | | |
|
| | | // save this snapshot | |
| | | if( fDetailedOutputEnabled ) { | |
| | | if( !fDetailedOutput ) { | |
| | | fDetailedOutput = new RooArgSet( *(new RooRealVar("nullNLL", | |
| | | "null NLL",0)), "detailedOut_SLRTS" ); | |
| | | fDetailedOutput->add( *(new RooRealVar("altNLL","alternate N | |
| | | LL",0)) ); | |
| | | } | |
| | | fDetailedOutput->setRealValue( "nullNLL", nullNLL ); | |
| | | fDetailedOutput->setRealValue( "altNLL", altNLL ); | |
| | | | |
| | | // cout << endl << "STORING THIS AS DETAILED OUTPUT:" << endl; | |
| | | // fDetailedOutput->Print("v"); | |
| | | // cout << 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 const RooArgSet* GetDetailedOutput(void) const { return fDeta | |
| | | iledOutput; } | |
| | | | |
| virtual const TString GetVarName() const { | | virtual const TString GetVarName() const { | |
| return "log(L(#mu_{1}) / L(#mu_{0}))"; | | return "log(L(#mu_{1}) / L(#mu_{0}))"; | |
| } | | } | |
| | | | |
| private: | | private: | |
| | | | |
| RooAbsPdf* fNullPdf; | | RooAbsPdf* fNullPdf; | |
| RooAbsPdf* fAltPdf; | | RooAbsPdf* fAltPdf; | |
| RooArgSet* fNullParameters; | | RooArgSet* fNullParameters; | |
| RooArgSet* fAltParameters; | | RooArgSet* fAltParameters; | |
| bool fFirstEval; | | bool fFirstEval; | |
| | | | |
|
| | | bool fDetailedOutputEnabled; | |
| | | RooArgSet* fDetailedOutput; //! | |
| | | | |
| RooNLLVar* fNllNull ; //! transient copy of the null NLL | | RooNLLVar* fNllNull ; //! transient copy of the null NLL | |
| RooNLLVar* fNllAlt ; //! transient copy of the alt NLL | | RooNLLVar* fNllAlt ; //! transient copy of the alt NLL | |
| static Bool_t fAlwaysReuseNll ; | | static Bool_t fAlwaysReuseNll ; | |
| Bool_t fReuseNll ; | | Bool_t fReuseNll ; | |
| | | | |
| protected: | | protected: | |
|
| ClassDef(SimpleLikelihoodRatioTestStat,1) | | ClassDef(SimpleLikelihoodRatioTestStat,2) | |
| }; | | }; | |
| | | | |
| } | | } | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 14 change blocks. |
| 6 lines changed or deleted | | 55 lines changed or added | |
|
| TChain.h | | TChain.h | |
|
| // @(#)root/tree:$Id: TChain.h 40993 2011-09-23 18:54:14Z pcanal $ | | // @(#)root/tree:$Id: TChain.h 42754 2012-01-20 20:13:07Z pcanal $ | |
| // Author: Rene Brun 03/02/97 | | // Author: Rene Brun 03/02/97 | |
| | | | |
| /************************************************************************* | | /************************************************************************* | |
| * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * | | * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * | |
| * All rights reserved. * | | * All rights reserved. * | |
| * * | | * * | |
| * For the licensing terms see $ROOTSYS/LICENSE. * | | * For the licensing terms see $ROOTSYS/LICENSE. * | |
| * For the list of contributors see $ROOTSYS/README/CREDITS. * | | * For the list of contributors see $ROOTSYS/README/CREDITS. * | |
| *************************************************************************/ | | *************************************************************************/ | |
| | | | |
| | | | |
| skipping to change at line 53 | | skipping to change at line 53 | |
| TFile *fFile; //! Pointer to current file (We own the
file). | | TFile *fFile; //! Pointer to current file (We own the
file). | |
| TObjArray *fFiles; //-> List of file names containing the t
rees (TChainElement, owned) | | TObjArray *fFiles; //-> List of file names containing the t
rees (TChainElement, owned) | |
| TList *fStatus; //-> List of active/inactive branches (T
ChainElement, owned) | | TList *fStatus; //-> List of active/inactive branches (T
ChainElement, owned) | |
| TChain *fProofChain; //! chain proxy when going to be process
ed by PROOF | | TChain *fProofChain; //! chain proxy when going to be process
ed by PROOF | |
| | | | |
| private: | | private: | |
| TChain(const TChain&); // not implemented | | TChain(const TChain&); // not implemented | |
| TChain& operator=(const TChain&); // not implemented | | TChain& operator=(const TChain&); // not implemented | |
| | | | |
| protected: | | protected: | |
|
| | | void InvalidateCurrentTree(); | |
| void ReleaseChainProof(); | | void ReleaseChainProof(); | |
| | | | |
| public: | | public: | |
| // TChain constants | | // TChain constants | |
| enum { | | enum { | |
| kGlobalWeight = BIT(15), | | kGlobalWeight = BIT(15), | |
| kAutoDelete = BIT(16), | | kAutoDelete = BIT(16), | |
| kProofUptodate = BIT(17), | | kProofUptodate = BIT(17), | |
| kProofLite = BIT(18), | | kProofLite = BIT(18), | |
| kBigNumber = 1234567890 | | kBigNumber = 1234567890 | |
| | | | |
| skipping to change at line 146 | | skipping to change at line 147 | |
| virtual void ResetAfterMerge(TFileMergeInfo *); | | virtual void ResetAfterMerge(TFileMergeInfo *); | |
| virtual void ResetBranchAddress(TBranch *); | | virtual void ResetBranchAddress(TBranch *); | |
| virtual void ResetBranchAddresses(); | | virtual void ResetBranchAddresses(); | |
| virtual Long64_t Scan(const char *varexp="", const char *selection="",
Option_t *option="", Long64_t nentries=1000000000, Long64_t firstentry=0);
// *MENU* | | virtual Long64_t Scan(const char *varexp="", const char *selection="",
Option_t *option="", Long64_t nentries=1000000000, Long64_t firstentry=0);
// *MENU* | |
| virtual void SetAutoDelete(Bool_t autodel=kTRUE); | | virtual void SetAutoDelete(Bool_t autodel=kTRUE); | |
| virtual Int_t SetBranchAddress(const char *bname,void *add, TBranch
**ptr = 0); | | virtual Int_t SetBranchAddress(const char *bname,void *add, TBranch
**ptr = 0); | |
| virtual Int_t SetBranchAddress(const char *bname,void *add, TBranch
**ptr, TClass *realClass, EDataType datatype, Bool_t isptr); | | virtual Int_t SetBranchAddress(const char *bname,void *add, TBranch
**ptr, TClass *realClass, EDataType datatype, Bool_t isptr); | |
| virtual Int_t SetBranchAddress(const char *bname,void *add, TClass *
realClass, EDataType datatype, Bool_t isptr); | | virtual Int_t SetBranchAddress(const char *bname,void *add, TClass *
realClass, EDataType datatype, Bool_t isptr); | |
| | | | |
| virtual void SetBranchStatus(const char *bname, Bool_t status=1, UI
nt_t *found=0); | | virtual void SetBranchStatus(const char *bname, Bool_t status=1, UI
nt_t *found=0); | |
|
| | | virtual void SetCacheSize(Long64_t cacheSize); | |
| virtual void SetDirectory(TDirectory *dir); | | virtual void SetDirectory(TDirectory *dir); | |
| virtual void SetEntryList(TEntryList *elist, Option_t *opt=""); | | virtual void SetEntryList(TEntryList *elist, Option_t *opt=""); | |
| virtual void SetEntryListFile(const char *filename="", Option_t *op
t=""); | | virtual void SetEntryListFile(const char *filename="", Option_t *op
t=""); | |
| virtual void SetEventList(TEventList *evlist); | | virtual void SetEventList(TEventList *evlist); | |
| virtual void SetMakeClass(Int_t make) { TTree::SetMakeClass(make);
if (fTree) fTree->SetMakeClass(make);} | | virtual void SetMakeClass(Int_t make) { TTree::SetMakeClass(make);
if (fTree) fTree->SetMakeClass(make);} | |
| virtual void SetPacketSize(Int_t size = 100); | | virtual void SetPacketSize(Int_t size = 100); | |
| virtual void SetProof(Bool_t on = kTRUE, Bool_t refresh = kFALSE, B
ool_t gettreeheader = kFALSE); | | virtual void SetProof(Bool_t on = kTRUE, Bool_t refresh = kFALSE, B
ool_t gettreeheader = kFALSE); | |
| virtual void SetWeight(Double_t w=1, Option_t *option=""); | | virtual void SetWeight(Double_t w=1, Option_t *option=""); | |
| virtual void UseCache(Int_t maxCacheSize = 10, Int_t pageSize = 0); | | virtual void UseCache(Int_t maxCacheSize = 10, Int_t pageSize = 0); | |
| | | | |
| | | | |
End of changes. 3 change blocks. |
| 1 lines changed or deleted | | 3 lines changed or added | |
|
| TClass.h | | TClass.h | |
|
| // @(#)root/meta:$Id: TClass.h 39694 2011-06-13 21:10:32Z pcanal $ | | // @(#)root/meta:$Id: TClass.h 42967 2012-02-10 22:35:22Z pcanal $ | |
| // Author: Rene Brun 07/01/95 | | // Author: Rene Brun 07/01/95 | |
| | | | |
| /************************************************************************* | | /************************************************************************* | |
| * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * | | * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * | |
| * All rights reserved. * | | * All rights reserved. * | |
| * * | | * * | |
| * For the licensing terms see $ROOTSYS/LICENSE. * | | * For the licensing terms see $ROOTSYS/LICENSE. * | |
| * For the list of contributors see $ROOTSYS/README/CREDITS. * | | * For the list of contributors see $ROOTSYS/README/CREDITS. * | |
| *************************************************************************/ | | *************************************************************************/ | |
| | | | |
| | | | |
| skipping to change at line 53 | | skipping to change at line 53 | |
| class TRealData; | | class TRealData; | |
| class TCint; | | class TCint; | |
| class TBuffer; | | class TBuffer; | |
| class TVirtualStreamerInfo; | | class TVirtualStreamerInfo; | |
| class TVirtualCollectionProxy; | | class TVirtualCollectionProxy; | |
| class TMethodCall; | | class TMethodCall; | |
| class TVirtualIsAProxy; | | class TVirtualIsAProxy; | |
| class TVirtualRefProxy; | | class TVirtualRefProxy; | |
| class THashTable; | | class THashTable; | |
| | | | |
|
| | | namespace clang { | |
| | | class Decl; | |
| | | } | |
| | | | |
| namespace ROOT { | | namespace ROOT { | |
| class TGenericClassInfo; | | class TGenericClassInfo; | |
| class TCollectionProxyInfo; | | class TCollectionProxyInfo; | |
| class TSchemaRuleSet; | | class TSchemaRuleSet; | |
| } | | } | |
| | | | |
| namespace ROOT { | | namespace ROOT { | |
| class TMapTypeToTClass; | | class TMapTypeToTClass; | |
| } | | } | |
| typedef ROOT::TMapTypeToTClass IdMap_t; | | typedef ROOT::TMapTypeToTClass IdMap_t; | |
| | | | |
| class TClass : public TDictionary { | | class TClass : public TDictionary { | |
| | | | |
| friend class TCint; | | friend class TCint; | |
|
| | | friend class TCintWithCling; | |
| friend void ROOT::ResetClassVersion(TClass*, const char*, Short_t); | | friend void ROOT::ResetClassVersion(TClass*, const char*, Short_t); | |
| friend class ROOT::TGenericClassInfo; | | friend class ROOT::TGenericClassInfo; | |
| | | | |
| public: | | public: | |
| // TClass status bits | | // TClass status bits | |
| enum { kClassSaved = BIT(12), kIgnoreTObjectStreamer = BIT(15), | | enum { kClassSaved = BIT(12), kIgnoreTObjectStreamer = BIT(15), | |
| kUnloaded = BIT(16), kIsTObject = BIT(17), | | kUnloaded = BIT(16), kIsTObject = BIT(17), | |
| kIsForeign = BIT(18), kIsEmulation = BIT(19), | | kIsForeign = BIT(18), kIsEmulation = BIT(19), | |
| kStartWithTObject = BIT(20), // see comments for IsStartingWithT
Object() | | kStartWithTObject = BIT(20), // see comments for IsStartingWithT
Object() | |
| kWarned = BIT(21), | | kWarned = BIT(21), | |
| | | | |
| skipping to change at line 303 | | skipping to change at line 308 | |
| TRealData *GetRealData(const char *name) const; | | TRealData *GetRealData(const char *name) const; | |
| TVirtualRefProxy *GetReferenceProxy() const { return fRefProxy; } | | TVirtualRefProxy *GetReferenceProxy() const { return fRefProxy; } | |
| const ROOT::TSchemaRuleSet *GetSchemaRules() const; | | const ROOT::TSchemaRuleSet *GetSchemaRules() const; | |
| ROOT::TSchemaRuleSet *GetSchemaRules(Bool_t create = kFALSE); | | ROOT::TSchemaRuleSet *GetSchemaRules(Bool_t create = kFALSE); | |
| const char *GetSharedLibs(); | | const char *GetSharedLibs(); | |
| ShowMembersFunc_t GetShowMembersWrapper() const { return fShowMembers;
} | | ShowMembersFunc_t GetShowMembersWrapper() const { return fShowMembers;
} | |
| TClassStreamer *GetStreamer() const; | | TClassStreamer *GetStreamer() const; | |
| ClassStreamerFunc_t GetStreamerFunc() const; | | ClassStreamerFunc_t GetStreamerFunc() const; | |
| TObjArray *GetStreamerInfos() const { return fStreamerInfo; } | | TObjArray *GetStreamerInfos() const { return fStreamerInfo; } | |
| TVirtualStreamerInfo *GetStreamerInfo(Int_t version=0) const; | | TVirtualStreamerInfo *GetStreamerInfo(Int_t version=0) const; | |
|
| | | TVirtualStreamerInfo *GetStreamerInfoAbstractEmulated(Int_t version=
0) const; | |
| const type_info *GetTypeInfo() const { return fTypeInfo; }; | | const type_info *GetTypeInfo() const { return fTypeInfo; }; | |
| void IgnoreTObjectStreamer(Bool_t ignore=kTRUE); | | void IgnoreTObjectStreamer(Bool_t ignore=kTRUE); | |
| Bool_t InheritsFrom(const char *cl) const; | | Bool_t InheritsFrom(const char *cl) const; | |
| Bool_t InheritsFrom(const TClass *cl) const; | | Bool_t InheritsFrom(const TClass *cl) const; | |
| void InterpretedShowMembers(void* obj, TMemberInspector &i
nsp); | | void InterpretedShowMembers(void* obj, TMemberInspector &i
nsp); | |
| Bool_t IsFolder() const { return kTRUE; } | | Bool_t IsFolder() const { return kTRUE; } | |
| Bool_t IsLoaded() const; | | Bool_t IsLoaded() const; | |
| Bool_t IsForeign() const; | | Bool_t IsForeign() const; | |
| Bool_t IsStartingWithTObject() const; | | Bool_t IsStartingWithTObject() const; | |
| Bool_t IsTObject() const; | | Bool_t IsTObject() const; | |
| | | | |
End of changes. 4 change blocks. |
| 1 lines changed or deleted | | 7 lines changed or added | |
|
| TDSet.h | | TDSet.h | |
|
| // @(#)root/proof:$Id: TDSet.h 34416 2010-07-14 15:39:20Z ganis $ | | // @(#)root/proof:$Id: TDSet.h 43044 2012-02-17 14:34:52Z ganis $ | |
| // Author: Fons Rademakers 11/01/02 | | // Author: Fons Rademakers 11/01/02 | |
| | | | |
| /************************************************************************* | | /************************************************************************* | |
| * Copyright (C) 1995-2001, Rene Brun and Fons Rademakers. * | | * Copyright (C) 1995-2001, Rene Brun and Fons Rademakers. * | |
| * All rights reserved. * | | * All rights reserved. * | |
| * * | | * * | |
| * For the licensing terms see $ROOTSYS/LICENSE. * | | * For the licensing terms see $ROOTSYS/LICENSE. * | |
| * For the list of contributors see $ROOTSYS/README/CREDITS. * | | * For the list of contributors see $ROOTSYS/README/CREDITS. * | |
| *************************************************************************/ | | *************************************************************************/ | |
| | | | |
| | | | |
| skipping to change at line 60 | | skipping to change at line 60 | |
| class TCut; | | class TCut; | |
| class TDSet; | | class TDSet; | |
| class TEventList; | | class TEventList; | |
| class TEntryList; | | class TEntryList; | |
| class TFileInfo; | | class TFileInfo; | |
| class THashList; | | class THashList; | |
| class TIter; | | class TIter; | |
| class TList; | | class TList; | |
| class TProof; | | class TProof; | |
| class TProofChain; | | class TProofChain; | |
|
| | | class TSelector; | |
| class TTree; | | class TTree; | |
| | | | |
| // For backward compatibility (handle correctly requests from old clients) | | // For backward compatibility (handle correctly requests from old clients) | |
| #include <set> | | #include <set> | |
| #include <list> | | #include <list> | |
| | | | |
| class TDSetElement : public TNamed { | | class TDSetElement : public TNamed { | |
| public: | | public: | |
| typedef std::list<std::pair<TDSetElement*, TString> > FriendsList_t; | | typedef std::list<std::pair<TDSetElement*, TString> > FriendsList_t; | |
| // TDSetElement status bits | | // TDSetElement status bits | |
| | | | |
| skipping to change at line 194 | | skipping to change at line 195 | |
| | | | |
| virtual Bool_t Add(const char *file, const char *objname = 0, | | virtual Bool_t Add(const char *file, const char *objname = 0, | |
| const char *dir = 0, Long64_t first = 0, | | const char *dir = 0, Long64_t first = 0, | |
| Long64_t num = -1, const char *msd = 0); | | Long64_t num = -1, const char *msd = 0); | |
| virtual Bool_t Add(TDSet *set); | | virtual Bool_t Add(TDSet *set); | |
| virtual Bool_t Add(TCollection *fileinfo, const char *meta = 0, | | virtual Bool_t Add(TCollection *fileinfo, const char *meta = 0, | |
| Bool_t availableOnly = kFALSE, TCollection *ba
dlist = 0); | | Bool_t availableOnly = kFALSE, TCollection *ba
dlist = 0); | |
| virtual Bool_t Add(TFileInfo *fileinfo, const char *meta = 0); | | virtual Bool_t Add(TFileInfo *fileinfo, const char *meta = 0); | |
| virtual void AddFriend(TDSet *friendset, const char *alias); | | virtual void AddFriend(TDSet *friendset, const char *alias); | |
| | | | |
|
| | | virtual Long64_t Process(TSelector *selector, Option_t *option = "" | |
| | | , | |
| | | Long64_t nentries = -1, | |
| | | Long64_t firstentry = 0, | |
| | | TObject *enl = 0); // *MENU* | |
| virtual Long64_t Process(const char *selector, Option_t *option = "
", | | virtual Long64_t Process(const char *selector, Option_t *option = "
", | |
| Long64_t nentries = -1, | | Long64_t nentries = -1, | |
| Long64_t firstentry = 0, | | Long64_t firstentry = 0, | |
| TObject *enl = 0); // *MENU* | | TObject *enl = 0); // *MENU* | |
| virtual Long64_t Draw(const char *varexp, const char *selection, | | virtual Long64_t Draw(const char *varexp, const char *selection, | |
| Option_t *option = "", Long64_t nentries = -1
, | | Option_t *option = "", Long64_t nentries = -1
, | |
| Long64_t firstentry = 0); // *MENU* | | Long64_t firstentry = 0); // *MENU* | |
| virtual Long64_t Draw(const char *varexp, const TCut &selection, | | virtual Long64_t Draw(const char *varexp, const TCut &selection, | |
| Option_t *option = "", Long64_t nentries = -1
, | | Option_t *option = "", Long64_t nentries = -1
, | |
| Long64_t firstentry = 0); // *MENU* | | Long64_t firstentry = 0); // *MENU* | |
| | | | |
End of changes. 3 change blocks. |
| 1 lines changed or deleted | | 7 lines changed or added | |
|
| TEntryList.h | | TEntryList.h | |
|
| // @(#)root/tree:$Id: TEntryList.h 34744 2010-08-07 06:16:36Z brun $ | | // @(#)root/tree:$Id: TEntryList.h 42401 2011-12-06 00:22:44Z pcanal $ | |
| // Author: Anna Kreshuk 27/10/2006 | | // Author: Anna Kreshuk 27/10/2006 | |
| | | | |
| /************************************************************************* | | /************************************************************************* | |
| * Copyright (C) 1995-2006, Rene Brun and Fons Rademakers. * | | * Copyright (C) 1995-2006, Rene Brun and Fons Rademakers. * | |
| * All rights reserved. * | | * All rights reserved. * | |
| * * | | * * | |
| * For the licensing terms see $ROOTSYS/LICENSE. * | | * For the licensing terms see $ROOTSYS/LICENSE. * | |
| * For the list of contributors see $ROOTSYS/README/CREDITS. * | | * For the list of contributors see $ROOTSYS/README/CREDITS. * | |
| *************************************************************************/ | | *************************************************************************/ | |
| | | | |
| | | | |
| skipping to change at line 53 | | skipping to change at line 53 | |
| Int_t fTreeNumber;//! the index of the tree in the chain (use
d when the entry | | Int_t fTreeNumber;//! the index of the tree in the chain (use
d when the entry | |
| //list is used as input (TTree::SetEntryLis
t()) | | //list is used as input (TTree::SetEntryLis
t()) | |
| | | | |
| Long64_t fLastIndexQueried; //! used to optimize GetEntry() func
tion from a loop | | Long64_t fLastIndexQueried; //! used to optimize GetEntry() func
tion from a loop | |
| Long64_t fLastIndexReturned; //! used to optimize GetEntry() fun
ction from a loop | | Long64_t fLastIndexReturned; //! used to optimize GetEntry() fun
ction from a loop | |
| Bool_t fShift; //! true when some sub-lists don't c
orrespond to trees | | Bool_t fShift; //! true when some sub-lists don't c
orrespond to trees | |
| //(when the entry list is used as in
put in TChain) | | //(when the entry list is used as in
put in TChain) | |
| TDirectory *fDirectory; //! Pointer to directory holding this tre
e | | TDirectory *fDirectory; //! Pointer to directory holding this tre
e | |
| Bool_t fReapply; // If true, TTree::Draw will 'reapply' t
he original cut | | Bool_t fReapply; // If true, TTree::Draw will 'reapply' t
he original cut | |
| | | | |
|
| | | void GetFileName(const char *filename, TString &fn, Bool_t * | |
| | | = 0); | |
| | | | |
| public: | | public: | |
| enum {kBlockSize = 64000}; //number of entries in each block (not the ph
ysical size). | | enum {kBlockSize = 64000}; //number of entries in each block (not the ph
ysical size). | |
| | | | |
| TEntryList(); | | TEntryList(); | |
| TEntryList(const char *name, const char *title); | | TEntryList(const char *name, const char *title); | |
| TEntryList(const char *name, const char *title, const TTree *tree); | | TEntryList(const char *name, const char *title, const TTree *tree); | |
| TEntryList(const char *name, const char *title, const char *treename, co
nst char *filename); | | TEntryList(const char *name, const char *title, const char *treename, co
nst char *filename); | |
| TEntryList(const TTree *tree); | | TEntryList(const TTree *tree); | |
| TEntryList(const TEntryList& elist); | | TEntryList(const TEntryList& elist); | |
| virtual ~TEntryList(); | | virtual ~TEntryList(); | |
| | | | |
| skipping to change at line 84 | | skipping to change at line 86 | |
| virtual TDirectory *GetDirectory() const { return fDirectory; } | | virtual TDirectory *GetDirectory() const { return fDirectory; } | |
| virtual Long64_t GetN() const { return fN; } | | virtual Long64_t GetN() const { return fN; } | |
| virtual const char *GetTreeName() const { return fTreeName.Data(); } | | virtual const char *GetTreeName() const { return fTreeName.Data(); } | |
| virtual const char *GetFileName() const { return fFileName.Data(); } | | virtual const char *GetFileName() const { return fFileName.Data(); } | |
| virtual Int_t GetTreeNumber() const { return fTreeNumber; } | | virtual Int_t GetTreeNumber() const { return fTreeNumber; } | |
| virtual Bool_t GetReapplyCut() const { return fReapply; }; | | virtual Bool_t GetReapplyCut() const { return fReapply; }; | |
| virtual Int_t Merge(TCollection *list); | | virtual Int_t Merge(TCollection *list); | |
| | | | |
| virtual Long64_t Next(); | | virtual Long64_t Next(); | |
| virtual void OptimizeStorage(); | | virtual void OptimizeStorage(); | |
|
| | | virtual Int_t RelocatePaths(const char *newloc, const char *oldloc
= 0); | |
| virtual Bool_t Remove(Long64_t entry, TTree *tree = 0); | | virtual Bool_t Remove(Long64_t entry, TTree *tree = 0); | |
| virtual void Reset(); | | virtual void Reset(); | |
|
| | | virtual Int_t ScanPaths(TList *roots, Bool_t notify = kTRUE); | |
| | | | |
| virtual void Print(const Option_t* option = "") const; | | virtual void Print(const Option_t* option = "") const; | |
| virtual void SetDirectory(TDirectory *dir); | | virtual void SetDirectory(TDirectory *dir); | |
| virtual void SetEntriesToProcess(Long64_t nen) { fEntriesToProces
s = nen; } | | virtual void SetEntriesToProcess(Long64_t nen) { fEntriesToProces
s = nen; } | |
| virtual void SetShift(Bool_t shift) { fShift = shift; }; | | virtual void SetShift(Bool_t shift) { fShift = shift; }; | |
| virtual void SetTree(const TTree *tree); | | virtual void SetTree(const TTree *tree); | |
| virtual void SetTree(const char *treename, const char *filename); | | virtual void SetTree(const char *treename, const char *filename); | |
| virtual void SetTreeName(const char *treename){ fTreeName = treen
ame; }; | | virtual void SetTreeName(const char *treename){ fTreeName = treen
ame; }; | |
| virtual void SetFileName(const char *filename){ fFileName = filen
ame; }; | | virtual void SetFileName(const char *filename){ fFileName = filen
ame; }; | |
| virtual void SetTreeNumber(Int_t index) { fTreeNumber=index; } | | virtual void SetTreeNumber(Int_t index) { fTreeNumber=index; } | |
| virtual void SetReapplyCut(Bool_t apply = kFALSE) {fReapply = app
ly;}; // *TOGGLE* | | virtual void SetReapplyCut(Bool_t apply = kFALSE) {fReapply = app
ly;}; // *TOGGLE* | |
| virtual void Subtract(const TEntryList *elist); | | virtual void Subtract(const TEntryList *elist); | |
| | | | |
|
| | | static Int_t Relocate(const char *fn, | |
| | | const char *newroot, const char *oldroot = | |
| | | 0, const char *enlnm = 0); | |
| | | static Int_t Scan(const char *fn, TList *roots); | |
| | | | |
| // Preventing warnings with -Weffc++ in GCC since the overloading of the ||
operator was a design choice. | | // Preventing warnings with -Weffc++ in GCC since the overloading of the ||
operator was a design choice. | |
| #if (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) >= 4060
0 | | #if (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) >= 4060
0 | |
| #pragma GCC diagnostic push | | #pragma GCC diagnostic push | |
| #pragma GCC diagnostic ignored "-Weffc++" | | #pragma GCC diagnostic ignored "-Weffc++" | |
| #endif | | #endif | |
| friend TEntryList operator||(TEntryList& elist1, TEntryList& elist2); | | friend TEntryList operator||(TEntryList& elist1, TEntryList& elist2); | |
| #if (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) >= 4060
0 | | #if (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) >= 4060
0 | |
| #pragma GCC diagnostic pop | | #pragma GCC diagnostic pop | |
| #endif | | #endif | |
| | | | |
|
| ClassDef(TEntryList, 1); //A list of entries in a TTree | | ClassDef(TEntryList, 2); //A list of entries in a TTree | |
| }; | | }; | |
| #endif | | #endif | |
| | | | |
End of changes. 6 change blocks. |
| 2 lines changed or deleted | | 12 lines changed or added | |
|
| TEveTrackPropagator.h | | TEveTrackPropagator.h | |
|
| // @(#)root/eve:$Id: TEveTrackPropagator.h 38739 2011-04-05 14:16:41Z matev
z $ | | // @(#)root/eve:$Id: TEveTrackPropagator.h 43121 2012-02-24 21:33:35Z 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 35 | | skipping to change at line 35 | |
| //=========================================================================
===== | | //=========================================================================
===== | |
| // TEveMagField | | // TEveMagField | |
| //=========================================================================
===== | | //=========================================================================
===== | |
| | | | |
| class TEveMagField | | class TEveMagField | |
| { | | { | |
| protected: | | protected: | |
| Bool_t fFieldConstant; | | Bool_t fFieldConstant; | |
| | | | |
| public: | | public: | |
|
| TEveMagField(): fFieldConstant(kFALSE){} | | TEveMagField() : fFieldConstant(kFALSE) {} | |
| virtual ~TEveMagField(){} | | virtual ~TEveMagField() {} | |
| | | | |
|
| virtual Bool_t IsConst() const {return fFieldConstant;}; | | virtual Bool_t IsConst() const { return fFieldConstant; } | |
| | | | |
| virtual void PrintField(Double_t x, Double_t y, Double_t z) const | | virtual void PrintField(Double_t x, Double_t y, Double_t z) const | |
| { | | { | |
| TEveVector b = GetField(x, y, z); | | TEveVector b = GetField(x, y, z); | |
| printf("v(%f, %f, %f) B(%f, %f, %f) \n", x, y, z, b.fX, b.fY, b.fZ); | | printf("v(%f, %f, %f) B(%f, %f, %f) \n", x, y, z, b.fX, b.fY, b.fZ); | |
| } | | } | |
| | | | |
| TEveVectorD GetFieldD(const TEveVectorD &v) const { return GetFieldD(v.f
X, v.fY, v.fZ); } | | TEveVectorD GetFieldD(const TEveVectorD &v) const { return GetFieldD(v.f
X, v.fY, v.fZ); } | |
| | | | |
| // Track propgator uses only GetFieldD() and GetMaxFieldMagD(). Have to
keep/reuse | | // Track propgator uses only GetFieldD() and GetMaxFieldMagD(). Have to
keep/reuse | |
| | | | |
| skipping to change at line 70 | | skipping to change at line 70 | |
| //=========================================================================
===== | | //=========================================================================
===== | |
| // TEveMagFieldConst | | // TEveMagFieldConst | |
| //=========================================================================
===== | | //=========================================================================
===== | |
| | | | |
| class TEveMagFieldConst : public TEveMagField | | class TEveMagFieldConst : public TEveMagField | |
| { | | { | |
| protected: | | protected: | |
| TEveVectorD fB; | | TEveVectorD fB; | |
| | | | |
| public: | | public: | |
|
| TEveMagFieldConst(Double_t x, Double_t y, Double_t z) : TEveMagField(), | | TEveMagFieldConst(Double_t x, Double_t y, Double_t z) : | |
| fB(x, y, z) | | TEveMagField(), fB(x, y, z) | |
| { fFieldConstant = kTRUE; } | | { fFieldConstant = kTRUE; } | |
| virtual ~TEveMagFieldConst() {} | | virtual ~TEveMagFieldConst() {} | |
| | | | |
| using TEveMagField::GetField; | | using TEveMagField::GetField; | |
| virtual TEveVectorD GetFieldD(Double_t /*x*/, Double_t /*y*/, Double_t /
*z*/) const { return fB; } | | virtual TEveVectorD GetFieldD(Double_t /*x*/, Double_t /*y*/, Double_t /
*z*/) const { return fB; } | |
| virtual Double_t GetMaxFieldMagD() const { return fB.Mag(); }; | | virtual Double_t GetMaxFieldMagD() const { return fB.Mag(); }; | |
| | | | |
| ClassDef(TEveMagFieldConst, 0); // Interface to constant magnetic field. | | ClassDef(TEveMagFieldConst, 0); // Interface to constant magnetic field. | |
| }; | | }; | |
| | | | |
| | | | |
| skipping to change at line 93 | | skipping to change at line 94 | |
| //=========================================================================
===== | | //=========================================================================
===== | |
| | | | |
| class TEveMagFieldDuo : public TEveMagField | | class TEveMagFieldDuo : public TEveMagField | |
| { | | { | |
| protected: | | protected: | |
| TEveVectorD fBIn; | | TEveVectorD fBIn; | |
| TEveVectorD fBOut; | | TEveVectorD fBOut; | |
| Double_t fR2; | | Double_t fR2; | |
| | | | |
| public: | | public: | |
|
| TEveMagFieldDuo(Double_t r, Double_t bIn, Double_t bOut) : TEveMagField( | | TEveMagFieldDuo(Double_t r, Double_t bIn, Double_t bOut) : | |
| ), | | TEveMagField(), | |
| fBIn(0,0,bIn), fBOut(0,0,bOut), fR2(r*r) | | fBIn(0,0,bIn), fBOut(0,0,bOut), fR2(r*r) | |
| { | | { | |
| fFieldConstant = kFALSE; | | fFieldConstant = kFALSE; | |
| } | | } | |
| virtual ~TEveMagFieldDuo() {} | | virtual ~TEveMagFieldDuo() {} | |
| | | | |
| using TEveMagField::GetField; | | using TEveMagField::GetField; | |
| virtual TEveVectorD GetFieldD(Double_t x, Double_t y, Double_t /*z*/) co
nst | | virtual TEveVectorD GetFieldD(Double_t x, Double_t y, Double_t /*z*/) co
nst | |
| { return ((x*x+y*y)<fR2) ? fBIn : fBOut; } | | { return ((x*x+y*y)<fR2) ? fBIn : fBOut; } | |
| | | | |
| virtual Double_t GetMaxFieldMagD() const | | virtual Double_t GetMaxFieldMagD() const | |
| { Double_t b1 = fBIn.Mag(), b2 = fBOut.Mag(); return b1 > b2 ? b1 : b2;
} | | { Double_t b1 = fBIn.Mag(), b2 = fBOut.Mag(); return b1 > b2 ? b1 : b2;
} | |
| | | | |
|
| ClassDef(TEveMagFieldDuo, 0); // Interface to magnetic field with two di
fferent values depending of radius. | | ClassDef(TEveMagFieldDuo, 0); // Interface to magnetic field with two di
fferent values depending on radius. | |
| }; | | }; | |
| | | | |
| //=========================================================================
===== | | //=========================================================================
===== | |
| // TEveTrackPropagator | | // TEveTrackPropagator | |
| //=========================================================================
===== | | //=========================================================================
===== | |
| | | | |
| class TEveTrackPropagator : public TEveElementList, | | class TEveTrackPropagator : public TEveElementList, | |
| public TEveRefBackPtr | | public TEveRefBackPtr | |
| { | | { | |
| friend class TEveTrackPropagatorSubEditor; | | friend class TEveTrackPropagatorSubEditor; | |
| | | | |
End of changes. 6 change blocks. |
| 10 lines changed or deleted | | 10 lines changed or added | |
|
| TFPBlock.h | | TFPBlock.h | |
|
| // @(#)root/io:$Id: TFPBlock.h 44777 2012-06-27 15:09:22Z pcanal $ | | // @(#)root/io:$Id: TFPBlock.h 41698 2011-11-01 21:22:54Z 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 | | | |
| | | | |
| 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. |
| 67 lines changed or deleted | | 1 lines changed or added | |
|
| TFile.h | | TFile.h | |
|
| // @(#)root/io:$Id: TFile.h 41698 2011-11-01 21:22:54Z pcanal $ | | // @(#)root/io:$Id: TFile.h 42754 2012-01-20 20:13:07Z pcanal $ | |
| // Author: Rene Brun 28/11/94 | | // Author: Rene Brun 28/11/94 | |
| | | | |
| /************************************************************************* | | /************************************************************************* | |
| * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * | | * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * | |
| * All rights reserved. * | | * All rights reserved. * | |
| * * | | * * | |
| * For the licensing terms see $ROOTSYS/LICENSE. * | | * For the licensing terms see $ROOTSYS/LICENSE. * | |
| * For the list of contributors see $ROOTSYS/README/CREDITS. * | | * For the list of contributors see $ROOTSYS/README/CREDITS. * | |
| *************************************************************************/ | | *************************************************************************/ | |
| | | | |
| | | | |
| skipping to change at line 26 | | skipping to change at line 26 | |
| // // | | // // | |
| // TFile // | | // TFile // | |
| // // | | // // | |
| // ROOT file. // | | // ROOT file. // | |
| // // | | // // | |
| ////////////////////////////////////////////////////////////////////////// | | ////////////////////////////////////////////////////////////////////////// | |
| | | | |
| #ifndef ROOT_TDirectoryFile | | #ifndef ROOT_TDirectoryFile | |
| #include "TDirectoryFile.h" | | #include "TDirectoryFile.h" | |
| #endif | | #endif | |
|
| | | #ifndef ROOT_TMap | |
| | | #include "TMap.h" | |
| | | #endif | |
| #ifndef ROOT_TUrl | | #ifndef ROOT_TUrl | |
| #include "TUrl.h" | | #include "TUrl.h" | |
| #endif | | #endif | |
| | | | |
| class TFree; | | class TFree; | |
| class TArrayC; | | class TArrayC; | |
| class TArchiveFile; | | class TArchiveFile; | |
| class TFileOpenHandle; | | class TFileOpenHandle; | |
| class TFileCacheRead; | | class TFileCacheRead; | |
| class TFileCacheWrite; | | class TFileCacheWrite; | |
| | | | |
| skipping to change at line 78 | | skipping to change at line 81 | |
| Int_t fReadCalls; //Number of read calls ( not counting
the cache calls ) | | Int_t fReadCalls; //Number of read calls ( not counting
the cache calls ) | |
| TString fRealName; //Effective real file name (not origin
al url) | | TString fRealName; //Effective real file name (not origin
al url) | |
| TString fOption; //File options | | TString fOption; //File options | |
| Char_t fUnits; //Number of bytes for file pointers | | Char_t fUnits; //Number of bytes for file pointers | |
| TList *fFree; //Free segments linked list table | | TList *fFree; //Free segments linked list table | |
| TArrayC *fClassIndex; //!Index of TStreamerInfo classes writ
ten to this file | | TArrayC *fClassIndex; //!Index of TStreamerInfo classes writ
ten to this file | |
| TObjArray *fProcessIDs; //!Array of pointers to TProcessIDs | | TObjArray *fProcessIDs; //!Array of pointers to TProcessIDs | |
| Long64_t fOffset; //!Seek offset cache | | Long64_t fOffset; //!Seek offset cache | |
| TArchiveFile *fArchive; //!Archive file from which we read thi
s file | | TArchiveFile *fArchive; //!Archive file from which we read thi
s file | |
| TFileCacheRead *fCacheRead; //!Pointer to the read cache (if any) | | TFileCacheRead *fCacheRead; //!Pointer to the read cache (if any) | |
|
| | | TMap *fCacheReadMap; //!Pointer to the read cache (if any) | |
| TFileCacheWrite *fCacheWrite; //!Pointer to the write cache (if any) | | TFileCacheWrite *fCacheWrite; //!Pointer to the write cache (if any) | |
| Long64_t fArchiveOffset; //!Offset at which file starts in arch
ive | | Long64_t fArchiveOffset; //!Offset at which file starts in arch
ive | |
| Bool_t fIsArchive; //!True if this is a pure archive file | | Bool_t fIsArchive; //!True if this is a pure archive file | |
| Bool_t fNoAnchorInName; //!True if we don't want to force the
anchor to be appended to the file name | | Bool_t fNoAnchorInName; //!True if we don't want to force the
anchor to be appended to the file name | |
| Bool_t fIsRootFile; //!True is this is a ROOT file, raw fi
le otherwise | | Bool_t fIsRootFile; //!True is this is a ROOT file, raw fi
le otherwise | |
| Bool_t fInitDone; //!True if the file has been initializ
ed | | Bool_t fInitDone; //!True if the file has been initializ
ed | |
| Bool_t fMustFlush; //!True if the file buffers must be fl
ushed | | Bool_t fMustFlush; //!True if the file buffers must be fl
ushed | |
| TFileOpenHandle *fAsyncHandle; //!For proper automatic cleanup | | TFileOpenHandle *fAsyncHandle; //!For proper automatic cleanup | |
| EAsyncOpenStatus fAsyncOpenStatus; //!Status of an asynchronous open req
uest | | EAsyncOpenStatus fAsyncOpenStatus; //!Status of an asynchronous open req
uest | |
| TUrl fUrl; //!URL of file | | TUrl fUrl; //!URL of file | |
| | | | |
| skipping to change at line 174 | | skipping to change at line 178 | |
| static TFile *&CurrentFile(); // Return the current file for this t
hread. | | static TFile *&CurrentFile(); // Return the current file for this t
hread. | |
| virtual void Delete(const char *namecycle=""); | | virtual void Delete(const char *namecycle=""); | |
| virtual void Draw(Option_t *option=""); | | virtual void Draw(Option_t *option=""); | |
| virtual void DrawMap(const char *keys="*",Option_t *option=""); /
/ *MENU* | | virtual void DrawMap(const char *keys="*",Option_t *option=""); /
/ *MENU* | |
| virtual void FillBuffer(char *&buffer); | | virtual void FillBuffer(char *&buffer); | |
| virtual void Flush(); | | virtual void Flush(); | |
| TArchiveFile *GetArchive() const { return fArchive; } | | TArchiveFile *GetArchive() const { return fArchive; } | |
| Long64_t GetArchiveOffset() const { return fArchiveOffset; } | | Long64_t GetArchiveOffset() const { return fArchiveOffset; } | |
| Int_t GetBestBuffer() const; | | Int_t GetBestBuffer() const; | |
| virtual Int_t GetBytesToPrefetch() const; | | virtual Int_t GetBytesToPrefetch() const; | |
|
| TFileCacheRead *GetCacheRead() const; | | TFileCacheRead *GetCacheRead(TObject* tree = 0) const; | |
| TFileCacheWrite *GetCacheWrite() const; | | TFileCacheWrite *GetCacheWrite() const; | |
| TArrayC *GetClassIndex() const { return fClassIndex; } | | TArrayC *GetClassIndex() const { return fClassIndex; } | |
| Int_t GetCompressionAlgorithm() const; | | Int_t GetCompressionAlgorithm() const; | |
| Int_t GetCompressionLevel() const; | | Int_t GetCompressionLevel() const; | |
| Int_t GetCompressionSettings() const; | | Int_t GetCompressionSettings() const; | |
| Float_t GetCompressionFactor(); | | Float_t GetCompressionFactor(); | |
| virtual Long64_t GetEND() const { return fEND; } | | virtual Long64_t GetEND() const { return fEND; } | |
| virtual Int_t GetErrno() const; | | virtual Int_t GetErrno() const; | |
| virtual void ResetErrno() const; | | virtual void ResetErrno() const; | |
| Int_t GetFd() const { return fD; } | | Int_t GetFd() const { return fD; } | |
| | | | |
| skipping to change at line 230 | | skipping to change at line 234 | |
| virtual Bool_t ReadBufferAsync(Long64_t offs, Int_t len); | | virtual Bool_t ReadBufferAsync(Long64_t offs, Int_t len); | |
| virtual Bool_t ReadBuffer(char *buf, Int_t len); | | virtual Bool_t ReadBuffer(char *buf, Int_t len); | |
| virtual Bool_t ReadBuffer(char *buf, Long64_t pos, Int_t len); | | virtual Bool_t ReadBuffer(char *buf, Long64_t pos, Int_t len); | |
| virtual Bool_t ReadBuffers(char *buf, Long64_t *pos, Int_t *len, In
t_t nbuf); | | virtual Bool_t ReadBuffers(char *buf, Long64_t *pos, Int_t *len, In
t_t nbuf); | |
| virtual void ReadFree(); | | virtual void ReadFree(); | |
| virtual TProcessID *ReadProcessID(UShort_t pidf); | | virtual TProcessID *ReadProcessID(UShort_t pidf); | |
| virtual void ReadStreamerInfo(); | | virtual void ReadStreamerInfo(); | |
| virtual Int_t Recover(); | | virtual Int_t Recover(); | |
| virtual Int_t ReOpen(Option_t *mode); | | virtual Int_t ReOpen(Option_t *mode); | |
| virtual void Seek(Long64_t offset, ERelativeTo pos = kBeg); | | virtual void Seek(Long64_t offset, ERelativeTo pos = kBeg); | |
|
| virtual void SetCacheRead(TFileCacheRead *cache); | | virtual void SetCacheRead(TFileCacheRead *cache, TObject* tree =
0); | |
| virtual void SetCacheWrite(TFileCacheWrite *cache); | | virtual void SetCacheWrite(TFileCacheWrite *cache); | |
| virtual void SetCompressionAlgorithm(Int_t algorithm=0); | | virtual void SetCompressionAlgorithm(Int_t algorithm=0); | |
| virtual void SetCompressionLevel(Int_t level=1); | | virtual void SetCompressionLevel(Int_t level=1); | |
| virtual void SetCompressionSettings(Int_t settings=1); | | virtual void SetCompressionSettings(Int_t settings=1); | |
| virtual void SetEND(Long64_t last) { fEND = last; } | | virtual void SetEND(Long64_t last) { fEND = last; } | |
| virtual void SetOffset(Long64_t offset, ERelativeTo pos = kBeg); | | virtual void SetOffset(Long64_t offset, ERelativeTo pos = kBeg); | |
| virtual void SetOption(Option_t *option=">") { fOption = option;
} | | virtual void SetOption(Option_t *option=">") { fOption = option;
} | |
| virtual void SetReadCalls(Int_t readcalls = 0) { fReadCalls = rea
dcalls; } | | virtual void SetReadCalls(Int_t readcalls = 0) { fReadCalls = rea
dcalls; } | |
| virtual void ShowStreamerInfo(); | | virtual void ShowStreamerInfo(); | |
| virtual Int_t Sizeof() const; | | virtual Int_t Sizeof() const; | |
| | | | |
End of changes. 5 change blocks. |
| 3 lines changed or deleted | | 7 lines changed or added | |
|
| TFileCacheRead.h | | TFileCacheRead.h | |
|
| // @(#)root/io:$Id: TFileCacheRead.h 44847 2012-07-03 13:05:35Z pcanal $ | | // @(#)root/io:$Id: TFileCacheRead.h 43149 2012-02-27 21:09:07Z 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 39 | | skipping to change at line 39 | |
| class TFilePrefetch; | | class TFilePrefetch; | |
| | | | |
| class TFileCacheRead : public TObject { | | class TFileCacheRead : public TObject { | |
| | | | |
| protected: | | protected: | |
| TFilePrefetch* fPrefetch; //!Object that does the asynchronous rea
ding in another thread | | TFilePrefetch* fPrefetch; //!Object that does the asynchronous rea
ding in another thread | |
| Int_t fBufferSizeMin; //Original size of fBuffer | | Int_t fBufferSizeMin; //Original size of fBuffer | |
| Int_t fBufferSize; //Allocated size of fBuffer (at a given t
ime) | | Int_t fBufferSize; //Allocated size of fBuffer (at a given t
ime) | |
| Int_t fBufferLen; //Current buffer length (<= fBufferSize) | | Int_t fBufferLen; //Current buffer length (<= fBufferSize) | |
| | | | |
|
| | | Long64_t fBytesRead; //Number of bytes read for this cache | |
| | | Long64_t fBytesReadExtra; //Number of extra bytes (overhead) read b | |
| | | y the readahead buffer | |
| | | Int_t fReadCalls; //Number of read calls for this cache | |
| | | Long64_t fNoCacheBytesRead; //Number of bytes read by basket to fil | |
| | | l cached tree | |
| | | Int_t fNoCacheReadCalls; //Number of read calls by basket to fil | |
| | | l cached tree | |
| | | | |
| Bool_t fAsyncReading; | | Bool_t fAsyncReading; | |
| Bool_t fEnablePrefetching; //reading by prefetching asynchronousl
y | | Bool_t fEnablePrefetching; //reading by prefetching asynchronousl
y | |
| | | | |
| Int_t fNseek; //Number of blocks to be prefetched | | Int_t fNseek; //Number of blocks to be prefetched | |
| Int_t fNtot; //Total size of prefetched blocks | | Int_t fNtot; //Total size of prefetched blocks | |
| Int_t fNb; //Number of long buffers | | Int_t fNb; //Number of long buffers | |
| Int_t fSeekSize; //Allocated size of fSeek | | Int_t fSeekSize; //Allocated size of fSeek | |
| Long64_t *fSeek; //[fNseek] Position on file of buffers to
be prefetched | | Long64_t *fSeek; //[fNseek] Position on file of buffers to
be prefetched | |
| Long64_t *fSeekSort; //[fNseek] Position on file of buffers to
be prefetched (sorted) | | Long64_t *fSeekSort; //[fNseek] Position on file of buffers to
be prefetched (sorted) | |
| Int_t *fSeekIndex; //[fNseek] sorted index table of fSeek | | Int_t *fSeekIndex; //[fNseek] sorted index table of fSeek | |
| | | | |
| skipping to change at line 76 | | 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); | | 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 Close(Option_t *option=""); | | virtual void AddNoCacheBytesRead(Long64_t len) { fNoCacheBytesRea | |
| | | d += len; } | |
| | | virtual void AddNoCacheReadCalls(Int_t reads) { fNoCacheReadCalls | |
| | | += reads; } | |
| virtual Int_t GetBufferSize() const { return fBufferSize; }; | | virtual Int_t GetBufferSize() const { return fBufferSize; }; | |
|
| | | virtual Long64_t GetBytesRead() const { return fBytesRead; } | |
| | | virtual Long64_t GetNoCacheBytesRead() const { return fNoCacheBytesRe | |
| | | ad; } | |
| | | virtual Long64_t GetBytesReadExtra() const { return fBytesReadExtra; | |
| | | } | |
| | | 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 GetNtot() const { return fNtot; } // Return the to | |
| | | tal size of the prefetched blocks. | |
| | | virtual Int_t GetReadCalls() const { return fReadCalls; } | |
| | | 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)
; | | virtual void SetEnablePrefetching(Bool_t setPrefetching = kFALSE)
{ fEnablePrefetching = setPrefetching; } | |
| 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) | |
| virtual void Sort(); | | virtual void Sort(); | |
| virtual void SecondSort(); //Method used
to sort and merge the chunks in the second block | | virtual void SecondSort(); //Method used
to sort and merge the chunks in the second block | |
| virtual void SecondPrefetch(Long64_t, Int_t); //Used to add
chunks to the second block | | virtual void SecondPrefetch(Long64_t, Int_t); //Used to add
chunks to the second block | |
| virtual TFilePrefetch* GetPrefetchObj(); | | virtual TFilePrefetch* GetPrefetchObj(); | |
| | | | |
|
| ClassDef(TFileCacheRead,1) //TFile cache when reading | | ClassDef(TFileCacheRead,2) //TFile cache when reading | |
| }; | | }; | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 8 change blocks. |
| 8 lines changed or deleted | | 31 lines changed or added | |
|
| TFilePrefetch.h | | TFilePrefetch.h | |
|
| // @(#)root/io:$Id: TFilePrefetch.h 44777 2012-06-27 15:09:22Z pcanal $ | | // @(#)root/io:$Id: TFilePrefetch.h 41698 2011-11-01 21:22:54Z 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 blocks to be read | | TList *fPendingBlocks; // list of pending block to be read | |
| TList *fReadBlocks; // list of blocks read | | TList *fReadBlocks; // list of block 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 | |
|
| TCondition *fNewBlockAdded; // signal the addition of a new pending | | TMutex *fMutexSynch; // mutex for synchronisation between wor | |
| block | | king and main thread | |
| TCondition *fReadBlockAdded; // signal the addition of a new red bloc | | TCondition *fNewBlockAdded; // condition used to signal the addition | |
| k | | of a new pending block | |
| TCondition *fCondNextFile; // signal TChain that we can move to the | | TCondition *fReadBlockAdded; // condition usd to signal the addition | |
| next file | | of a new red block | |
| TSemaphore *fSemMasterWorker; // semaphore used to kill the consumer t | | TSemaphore *fSem; // 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 116 | | skipping to change at line 115 | |
| 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*); | |
|
| TCondition* GetCondNextFile() const { return fCondNextFile; }; | | TMutex* GetMutexSynch() const { return fMutexSynch; }; | |
| | | | |
| ClassDef(TFilePrefetch, 0); // File block prefetcher | | ClassDef(TFilePrefetch, 0); // File block prefetcher | |
| }; | | }; | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 4 change blocks. |
| 14 lines changed or deleted | | 12 lines changed or added | |
|
| TFitParametersDialog.h | | TFitParametersDialog.h | |
|
| // @(#)root/fitpanel:$Id: TFitParametersDialog.h 26245 2008-11-17 16:32:49Z
moneta $ | | // @(#)root/fitpanel:$Id: TFitParametersDialog.h 43241 2012-03-05 15:42:44Z
bellenot $ | |
| // Author: Ilka Antcheva, Lorenzo Moneta, David Gonzalez Maline 03/10/06 | | // Author: Ilka Antcheva, Lorenzo Moneta, David Gonzalez Maline 03/10/06 | |
| | | | |
| /************************************************************************* | | /************************************************************************* | |
| * Copyright (C) 1995-2006, Rene Brun and Fons Rademakers. * | | * Copyright (C) 1995-2006, Rene Brun and Fons Rademakers. * | |
| * All rights reserved. * | | * All rights reserved. * | |
| * * | | * * | |
| * For the licensing terms see $ROOTSYS/LICENSE. * | | * For the licensing terms see $ROOTSYS/LICENSE. * | |
| * For the list of contributors see $ROOTSYS/README/CREDITS. * | | * For the list of contributors see $ROOTSYS/README/CREDITS. * | |
| *************************************************************************/ | | *************************************************************************/ | |
| | | | |
| | | | |
| skipping to change at line 83 | | skipping to change at line 83 | |
| TGNumberEntryField **fParMin; // min range values | | TGNumberEntryField **fParMin; // min range values | |
| TGNumberEntryField **fParMax; // max range values | | TGNumberEntryField **fParMax; // max range values | |
| TGNumberEntry **fParStp; // step values | | TGNumberEntry **fParStp; // step values | |
| TGTripleHSlider **fParSld; // triple sliders | | TGTripleHSlider **fParSld; // triple sliders | |
| TGNumberEntryField **fParErr; // error values | | TGNumberEntryField **fParErr; // error values | |
| TGCheckButton *fUpdate; // immediate update switch | | TGCheckButton *fUpdate; // immediate update switch | |
| TGTextButton *fApply; // Apply button | | TGTextButton *fApply; // Apply button | |
| TGTextButton *fReset; // Reset button | | TGTextButton *fReset; // Reset button | |
| TGTextButton *fOK; // OK button | | TGTextButton *fOK; // OK button | |
| TGTextButton *fCancel; // Cancel button | | TGTextButton *fCancel; // Cancel button | |
|
| | | TList fTextEntries; // list of text entries used for
keyboard navigation | |
| | | | |
| void DisconnectSlots(); | | void DisconnectSlots(); | |
| public: | | public: | |
| TFitParametersDialog(const TGWindow *p, const TGWindow *main, TF1 *func, | | TFitParametersDialog(const TGWindow *p, const TGWindow *main, TF1 *func, | |
| TVirtualPad *pad, Int_t *ret_code = 0); | | TVirtualPad *pad, Int_t *ret_code = 0); | |
| virtual ~TFitParametersDialog(); | | virtual ~TFitParametersDialog(); | |
| | | | |
| virtual void CloseWindow(); | | virtual void CloseWindow(); | |
| virtual void DoApply(); | | virtual void DoApply(); | |
| virtual void DoCancel(); | | virtual void DoCancel(); | |
| | | | |
| skipping to change at line 104 | | skipping to change at line 105 | |
| virtual void DoParFix(Bool_t on); | | virtual void DoParFix(Bool_t on); | |
| virtual void DoParBound(Bool_t on); | | virtual void DoParBound(Bool_t on); | |
| virtual void DoParMaxLimit(); | | virtual void DoParMaxLimit(); | |
| virtual void DoParMinLimit(); | | virtual void DoParMinLimit(); | |
| virtual void DoParStep(); | | virtual void DoParStep(); | |
| virtual void DoParValue(); | | virtual void DoParValue(); | |
| virtual void DoReset(); | | virtual void DoReset(); | |
| virtual void DoSlider(); | | virtual void DoSlider(); | |
| virtual void DrawFunction(); | | virtual void DrawFunction(); | |
| virtual void HandleButtons(Bool_t update); | | virtual void HandleButtons(Bool_t update); | |
|
| | | virtual void HandleShiftTab(); | |
| | | virtual void HandleTab(); | |
| | | | |
| protected: | | protected: | |
| void SetParameters(); | | void SetParameters(); | |
| | | | |
| ClassDef(TFitParametersDialog, 0) // Fit function parameters dialog | | ClassDef(TFitParametersDialog, 0) // Fit function parameters dialog | |
| }; | | }; | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 3 change blocks. |
| 1 lines changed or deleted | | 4 lines changed or added | |
|
| TGLRnrCtx.h | | TGLRnrCtx.h | |
|
| // @(#)root/gl:$Id: TGLRnrCtx.h 36675 2010-11-15 20:33:58Z matevz $ | | // @(#)root/gl:$Id: TGLRnrCtx.h 42979 2012-02-13 03:17:03Z matevz $ | |
| /************************************************************************* | | /************************************************************************* | |
| * Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. * | | * Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. * | |
| * All rights reserved. * | | * All rights reserved. * | |
| * * | | * * | |
| * For the licensing terms see $ROOTSYS/LICENSE. * | | * For the licensing terms see $ROOTSYS/LICENSE. * | |
| * For the list of contributors see $ROOTSYS/README/CREDITS. * | | * For the list of contributors see $ROOTSYS/README/CREDITS. * | |
| *************************************************************************/ | | *************************************************************************/ | |
| | | | |
| #ifndef ROOT_TGLRnrCtx | | #ifndef ROOT_TGLRnrCtx | |
| #define ROOT_TGLRnrCtx | | #define ROOT_TGLRnrCtx | |
| | | | |
| skipping to change at line 82 | | skipping to change at line 82 | |
| enum EShapeSelectionLevel | | enum EShapeSelectionLevel | |
| { | | { | |
| kSSLNotSelected, | | kSSLNotSelected, | |
| kSSLSelected, | | kSSLSelected, | |
| kSSLImpliedSelected, | | kSSLImpliedSelected, | |
| kSSLHighlighted, | | kSSLHighlighted, | |
| kSSLImpliedHighlighted, | | kSSLImpliedHighlighted, | |
| kSSLEnd | | kSSLEnd | |
| }; | | }; | |
| | | | |
|
| | | enum ESelectabilityOfTransparents | |
| | | { | |
| | | kIfNoOpaques = 0, | |
| | | kIfClosest, | |
| | | kNever | |
| | | }; | |
| | | | |
| private: | | private: | |
| TGLRnrCtx(const TGLRnrCtx&); // Not implemented | | TGLRnrCtx(const TGLRnrCtx&); // Not implemented | |
| TGLRnrCtx& operator=(const TGLRnrCtx&); // Not implemented | | TGLRnrCtx& operator=(const TGLRnrCtx&); // Not implemented | |
| | | | |
| typedef std::list<TGLColorSet*, std::allocator<TGLColorSet*> > lpTGLColo
rSet_t; | | typedef std::list<TGLColorSet*, std::allocator<TGLColorSet*> > lpTGLColo
rSet_t; | |
| | | | |
| protected: | | protected: | |
| TGLViewerBase *fViewer; | | TGLViewerBase *fViewer; | |
| TGLCamera *fCamera; | | TGLCamera *fCamera; | |
| TGLSceneInfo *fSceneInfo; | | TGLSceneInfo *fSceneInfo; | |
| | | | |
| skipping to change at line 121 | | skipping to change at line 128 | |
| Short_t fDrawPass; | | Short_t fDrawPass; | |
| | | | |
| TGLStopwatch fStopwatch; | | TGLStopwatch fStopwatch; | |
| Double_t fRenderTimeOut; | | Double_t fRenderTimeOut; | |
| Bool_t fIsRunning; | | Bool_t fIsRunning; | |
| Bool_t fHasTimedOut; | | Bool_t fHasTimedOut; | |
| | | | |
| // Highlight / Selection stuff | | // Highlight / Selection stuff | |
| Bool_t fHighlight; // True when in highlight. | | Bool_t fHighlight; // True when in highlight. | |
| Bool_t fHighlightOutline; // True when in highlight-outline. | | Bool_t fHighlightOutline; // True when in highlight-outline. | |
|
| Bool_t fSelection; | | Bool_t fSelection; // True when in selection. | |
| Bool_t fSecSelection; | | Bool_t fSecSelection; // True when in secondary selection. | |
| | | Short_t fSelectTransparents; | |
| Int_t fPickRadius; | | Int_t fPickRadius; | |
| TGLRect *fPickRectangle; | | TGLRect *fPickRectangle; | |
| TGLSelectBuffer*fSelectBuffer; | | TGLSelectBuffer*fSelectBuffer; | |
| | | | |
| lpTGLColorSet_t*fColorSetStack; | | lpTGLColorSet_t*fColorSetStack; | |
| Float_t fRenderScale; | | Float_t fRenderScale; | |
| | | | |
| UInt_t fEventKeySym; | | UInt_t fEventKeySym; | |
| | | | |
| // GL state | | // GL state | |
| | | | |
| skipping to change at line 211 | | skipping to change at line 219 | |
| Bool_t IsDrawPassOutlineLine() const { return fDrawPass == kPassOutline
Line; } | | Bool_t IsDrawPassOutlineLine() const { return fDrawPass == kPassOutline
Line; } | |
| | | | |
| // Render time-out | | // Render time-out | |
| Double_t RenderTimeOut() const { return fRenderTimeOut; } | | Double_t RenderTimeOut() const { return fRenderTimeOut; } | |
| void SetRenderTimeOut(Double_t tout) { fRenderTimeOut = tout; } | | void SetRenderTimeOut(Double_t tout) { fRenderTimeOut = tout; } | |
| void StartStopwatch(); | | void StartStopwatch(); | |
| void StopStopwatch(); | | void StopStopwatch(); | |
| Bool_t IsStopwatchRunning() const { return fIsRunning; } | | Bool_t IsStopwatchRunning() const { return fIsRunning; } | |
| Bool_t HasStopwatchTimedOut(); | | Bool_t HasStopwatchTimedOut(); | |
| | | | |
|
| // Highlight / Selection stuff | | // Highlight / Selection state during rendering | |
| Bool_t Highlight() const { return fHighlight; } | | Bool_t Highlight() const { return fHighlight; } | |
| void SetHighlight(Bool_t hil) { fHighlight = hil; } | | void SetHighlight(Bool_t hil) { fHighlight = hil; } | |
| Bool_t HighlightOutline() const { return fHighlightOutline; } | | Bool_t HighlightOutline() const { return fHighlightOutline; } | |
| void SetHighlightOutline(Bool_t ho) { fHighlightOutline = ho; } | | void SetHighlightOutline(Bool_t ho) { fHighlightOutline = ho; } | |
|
| | | | |
| Bool_t Selection() const { return fSelection; } | | Bool_t Selection() const { return fSelection; } | |
| void SetSelection(Bool_t sel) { fSelection = sel; } | | void SetSelection(Bool_t sel) { fSelection = sel; } | |
| Bool_t SecSelection() const { return fSecSelection; } | | Bool_t SecSelection() const { return fSecSelection; } | |
| void SetSecSelection(Bool_t secSel) { fSecSelection = secSel; } | | void SetSecSelection(Bool_t secSel) { fSecSelection = secSel; } | |
|
| // Low-level getters | | // Highlight / selection parameters | |
| | | Short_t SelectTransparents() const { return fSelectTransparents; | |
| | | } | |
| | | void SetSelectTransparents(Short_t st) { fSelectTransparents = st; | |
| | | } | |
| TGLRect * GetPickRectangle(); | | TGLRect * GetPickRectangle(); | |
| Int_t GetPickRadius(); | | Int_t GetPickRadius(); | |
| TGLSelectBuffer * GetSelectBuffer() const { return fSelectBuffer; } | | TGLSelectBuffer * GetSelectBuffer() const { return fSelectBuffer; } | |
|
| // Composed operations | | // Selection setup / end | |
| void BeginSelection(Int_t x, Int_t y, Int_t r=3); | | void BeginSelection(Int_t x, Int_t y, Int_t r=3); | |
| void EndSelection (Int_t glResult); | | void EndSelection (Int_t glResult); | |
| | | | |
| void PushColorSet(); | | void PushColorSet(); | |
| TGLColorSet& ColorSet(); | | TGLColorSet& ColorSet(); | |
| void PopColorSet(); | | void PopColorSet(); | |
| TGLColorSet* ChangeBaseColorSet(TGLColorSet* set); | | TGLColorSet* ChangeBaseColorSet(TGLColorSet* set); | |
| TGLColorSet* GetBaseColorSet(); | | TGLColorSet* GetBaseColorSet(); | |
| | | | |
| void ColorOrForeground(Color_t col); | | void ColorOrForeground(Color_t col); | |
| | | | |
| Float_t GetRenderScale() const { return fRenderScale; } | | Float_t GetRenderScale() const { return fRenderScale; } | |
| | | | |
End of changes. 7 change blocks. |
| 9 lines changed or deleted | | 20 lines changed or added | |
|
| TGLSelectRecord.h | | TGLSelectRecord.h | |
|
| // @(#)root/gl:$Id: TGLSelectRecord.h 33124 2010-04-21 20:04:42Z matevz $ | | // @(#)root/gl:$Id: TGLSelectRecord.h 42974 2012-02-12 07:22:45Z matevz $ | |
| /************************************************************************* | | /************************************************************************* | |
| * Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. * | | * Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. * | |
| * All rights reserved. * | | * All rights reserved. * | |
| * * | | * * | |
| * For the licensing terms see $ROOTSYS/LICENSE. * | | * For the licensing terms see $ROOTSYS/LICENSE. * | |
| * For the list of contributors see $ROOTSYS/README/CREDITS. * | | * For the list of contributors see $ROOTSYS/README/CREDITS. * | |
| *************************************************************************/ | | *************************************************************************/ | |
| | | | |
| #ifndef ROOT_TGLSelectRecord | | #ifndef ROOT_TGLSelectRecord | |
| #define ROOT_TGLSelectRecord | | #define ROOT_TGLSelectRecord | |
| | | | |
| #include <Rtypes.h> | | #include <Rtypes.h> | |
| | | | |
| class TObject; | | class TObject; | |
| class TGLSceneInfo; | | class TGLSceneInfo; | |
| class TGLPhysicalShape; | | class TGLPhysicalShape; | |
|
| | | class TGLLogicalShape; | |
| class TGLOverlayElement; | | class TGLOverlayElement; | |
| | | | |
| /**************************************************************************
/ | | /**************************************************************************
/ | |
| // TGLSelectRecordBase | | // TGLSelectRecordBase | |
| /**************************************************************************
/ | | /**************************************************************************
/ | |
| | | | |
| class TGLSelectRecordBase | | class TGLSelectRecordBase | |
| { | | { | |
| protected: | | protected: | |
| // Primary data - coming from GL. | | // Primary data - coming from GL. | |
| | | | |
| skipping to change at line 81 | | skipping to change at line 82 | |
| { | | { | |
| public: | | public: | |
| enum ESecSelResult { kNone, kEnteringSelection, kLeavingSelection, kModi
fyingInternalSelection }; | | enum ESecSelResult { kNone, kEnteringSelection, kLeavingSelection, kModi
fyingInternalSelection }; | |
| | | | |
| protected: | | protected: | |
| // Secondary data (scene dependent) - use | | // Secondary data (scene dependent) - use | |
| // TGLSceneBase::ResolveSelectRecord() to fill. | | // TGLSceneBase::ResolveSelectRecord() to fill. | |
| Bool_t fTransparent; | | Bool_t fTransparent; | |
| TGLSceneInfo *fSceneInfo; // SceneInfo | | TGLSceneInfo *fSceneInfo; // SceneInfo | |
| TGLPhysicalShape *fPhysShape; // PhysicalShape, if applicable | | TGLPhysicalShape *fPhysShape; // PhysicalShape, if applicable | |
|
| | | TGLLogicalShape *fLogShape; // LogicalShape, if applicable | |
| TObject *fObject; // Master TObject, if applicable | | TObject *fObject; // Master TObject, if applicable | |
| void *fSpecific; // Scene specific, if applicable | | void *fSpecific; // Scene specific, if applicable | |
| Bool_t fMultiple; // Mutliple selection requested (set by ev
ent-handler). | | Bool_t fMultiple; // Mutliple selection requested (set by ev
ent-handler). | |
| Bool_t fHighlight; // Requested for highlight (set by event-h
andler). | | Bool_t fHighlight; // Requested for highlight (set by event-h
andler). | |
| | | | |
| ESecSelResult fSecSelRes; // Result of ProcessSelection; | | ESecSelResult fSecSelRes; // Result of ProcessSelection; | |
| | | | |
| public: | | public: | |
| TGLSelectRecord(); | | TGLSelectRecord(); | |
| TGLSelectRecord(UInt_t* data); | | TGLSelectRecord(UInt_t* data); | |
| | | | |
| skipping to change at line 102 | | skipping to change at line 104 | |
| virtual ~TGLSelectRecord(); | | virtual ~TGLSelectRecord(); | |
| | | | |
| TGLSelectRecord& operator=(const TGLSelectRecord& rec); | | TGLSelectRecord& operator=(const TGLSelectRecord& rec); | |
| | | | |
| virtual void Set(UInt_t* data); | | virtual void Set(UInt_t* data); | |
| virtual void Reset(); | | virtual void Reset(); | |
| | | | |
| Bool_t GetTransparent() const { return fTransparent; } | | Bool_t GetTransparent() const { return fTransparent; } | |
| TGLSceneInfo * GetSceneInfo() const { return fSceneInfo; } | | TGLSceneInfo * GetSceneInfo() const { return fSceneInfo; } | |
| TGLPhysicalShape * GetPhysShape() const { return fPhysShape; } | | TGLPhysicalShape * GetPhysShape() const { return fPhysShape; } | |
|
| | | TGLLogicalShape * GetLogShape() const { return fLogShape; } | |
| TObject * GetObject() const { return fObject; } | | TObject * GetObject() const { return fObject; } | |
| void * GetSpecific() const { return fSpecific; } | | void * GetSpecific() const { return fSpecific; } | |
| Bool_t GetMultiple() const { return fMultiple; } | | Bool_t GetMultiple() const { return fMultiple; } | |
| Bool_t GetHighlight() const { return fHighlight; } | | Bool_t GetHighlight() const { return fHighlight; } | |
| | | | |
| ESecSelResult GetSecSelResult() const { return fSecSelRes; } | | ESecSelResult GetSecSelResult() const { return fSecSelRes; } | |
| | | | |
| void SetTransparent(Bool_t t) { fTransparent = t; } | | void SetTransparent(Bool_t t) { fTransparent = t; } | |
| void SetSceneInfo (TGLSceneInfo* si) { fSceneInfo = si; } | | void SetSceneInfo (TGLSceneInfo* si) { fSceneInfo = si; } | |
| void SetPhysShape (TGLPhysicalShape* pshp) { fPhysShape = pshp; } | | void SetPhysShape (TGLPhysicalShape* pshp) { fPhysShape = pshp; } | |
|
| | | void SetLogShape (TGLLogicalShape* lshp) { fLogShape = lshp; } | |
| void SetObject (TObject* obj) { fObject = obj; } | | void SetObject (TObject* obj) { fObject = obj; } | |
| void SetSpecific (void* spec) { fSpecific = spec; } | | void SetSpecific (void* spec) { fSpecific = spec; } | |
| void SetMultiple (Bool_t multi) { fMultiple = multi; } | | void SetMultiple (Bool_t multi) { fMultiple = multi; } | |
| void SetHighlight (Bool_t hlt) { fHighlight = hlt; } | | void SetHighlight (Bool_t hlt) { fHighlight = hlt; } | |
| | | | |
| void SetSecSelResult(ESecSelResult r) { fSecSelRes = r; } | | void SetSecSelResult(ESecSelResult r) { fSecSelRes = r; } | |
| | | | |
| void Print(); | | void Print(); | |
| | | | |
| static Bool_t AreSameSelectionWise(const TGLSelectRecord& r1, | | static Bool_t AreSameSelectionWise(const TGLSelectRecord& r1, | |
| | | | |
End of changes. 5 change blocks. |
| 1 lines changed or deleted | | 5 lines changed or added | |
|
| TGeoBranchArray.h | | TGeoBranchArray.h | |
|
| // @(#):$Id: TGeoBranchArray.h 38636 2011-03-26 07:14:47Z agheata $ | | // @(#):$Id: TGeoBranchArray.h 43155 2012-02-28 14:27:43Z agheata $ | |
| // Author: Andrei Gheata 01/03/11 | | // Author: Andrei Gheata 01/03/11 | |
| | | | |
| /************************************************************************* | | /************************************************************************* | |
| * 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 33 | | skipping to change at line 33 | |
| // /
/ | | // /
/ | |
| ///////////////////////////////////////////////////////////////////////////
/ | | ///////////////////////////////////////////////////////////////////////////
/ | |
| | | | |
| class TGeoHMatrix; | | class TGeoHMatrix; | |
| class TGeoNavigator; | | class TGeoNavigator; | |
| class TGeoNode; | | class TGeoNode; | |
| | | | |
| class TGeoBranchArray : public TObject | | class TGeoBranchArray : public TObject | |
| { | | { | |
| protected: | | protected: | |
|
| UShort_t fLevel; // Branch depth | | Int_t fLevel; // Branch depth | |
| UShort_t *fArray; //[fLevel] Array of daughter indices | | Int_t fMaxLevel; // Array length | |
| | | TGeoNode **fArray; //![fMaxLevel] Array of nodes | |
| TGeoHMatrix *fMatrix; // Global matrix (owned) | | TGeoHMatrix *fMatrix; // Global matrix (owned) | |
| TObject *fClient; // Client object to notify | | TObject *fClient; // Client object to notify | |
| | | | |
| public: | | public: | |
|
| TGeoBranchArray() : TObject(), fLevel(0), fArray(NULL), fMatrix(NULL), f | | TGeoBranchArray() : TObject(), fLevel(0), fMaxLevel(10), fArray(NULL), f | |
| Client(NULL) {} | | Matrix(NULL), fClient(NULL) {} | |
| TGeoBranchArray(UShort_t level); | | TGeoBranchArray(Int_t level); | |
| virtual ~TGeoBranchArray(); | | virtual ~TGeoBranchArray(); | |
| | | | |
| TGeoBranchArray(const TGeoBranchArray&); | | TGeoBranchArray(const TGeoBranchArray&); | |
| TGeoBranchArray& operator=(const TGeoBranchArray&); | | TGeoBranchArray& operator=(const TGeoBranchArray&); | |
| Bool_t operator ==(const TGeoBranchArray& other) const; | | Bool_t operator ==(const TGeoBranchArray& other) const; | |
| Bool_t operator !=(const TGeoBranchArray& other) const; | | Bool_t operator !=(const TGeoBranchArray& other) const; | |
| Bool_t operator >(const TGeoBranchArray& other) const; | | Bool_t operator >(const TGeoBranchArray& other) const; | |
| Bool_t operator <(const TGeoBranchArray& other) const; | | Bool_t operator <(const TGeoBranchArray& other) const; | |
| Bool_t operator >=(const TGeoBranchArray& other) const; | | Bool_t operator >=(const TGeoBranchArray& other) const; | |
| Bool_t operator <=(const TGeoBranchArray& other) const; | | Bool_t operator <=(const TGeoBranchArray& other) const; | |
| | | | |
|
| void AddLevel(UShort_t dindex); | | void AddLevel(Int_t dindex); | |
| virtual Int_t Compare(const TObject *obj) const; | | virtual Int_t Compare(const TObject *obj) const; | |
| void CleanMatrix(); | | void CleanMatrix(); | |
|
| UShort_t *GetArray() const {return fArray;} | | TGeoNode **GetArray() const {return fArray;} | |
| TObject *GetClient() const {return fClient;} | | TObject *GetClient() const {return fClient;} | |
|
| UShort_t GetLevel() const {return fLevel;} | | Int_t GetLevel() const {return fLevel;} | |
| TGeoHMatrix *GetMatrix() const {return fMatrix;} | | TGeoHMatrix *GetMatrix() const {return fMatrix;} | |
|
| TGeoNode *GetNode(UShort_t level) const; | | TGeoNode *GetNode(Int_t level) const {return fArray[level];} | |
| void GetPath(TString &path) const; | | void GetPath(TString &path) const; | |
| void InitFromNavigator(TGeoNavigator *nav); | | void InitFromNavigator(TGeoNavigator *nav); | |
| virtual Bool_t IsSortable() const {return kTRUE;} | | virtual Bool_t IsSortable() const {return kTRUE;} | |
| virtual Bool_t Notify() {return (fClient)?fClient->Notify():kFALSE;} | | virtual Bool_t Notify() {return (fClient)?fClient->Notify():kFALSE;} | |
| virtual void Print(Option_t *option="") const; | | virtual void Print(Option_t *option="") const; | |
| void SetClient(TObject *client) {fClient = client;} | | void SetClient(TObject *client) {fClient = client;} | |
| static void Sort(Int_t n, TGeoBranchArray **array, Int_t *index, B
ool_t down=kTRUE); | | static void Sort(Int_t n, TGeoBranchArray **array, Int_t *index, B
ool_t down=kTRUE); | |
| static Long64_t BinarySearch(Long64_t n, const TGeoBranchArray **array
, TGeoBranchArray *value); | | static Long64_t BinarySearch(Long64_t n, const TGeoBranchArray **array
, TGeoBranchArray *value); | |
| void UpdateNavigator(TGeoNavigator *nav) const; | | void UpdateNavigator(TGeoNavigator *nav) const; | |
| | | | |
|
| ClassDef(TGeoBranchArray, 2) | | ClassDef(TGeoBranchArray, 3) | |
| }; | | }; | |
| | | | |
| struct compareBAasc { | | struct compareBAasc { | |
| compareBAasc(TGeoBranchArray **d) : fData(d) {} | | compareBAasc(TGeoBranchArray **d) : fData(d) {} | |
| bool operator ()(Int_t i1, Int_t i2) {return **(fData+i1) < **(fData+i2)
;} | | bool operator ()(Int_t i1, Int_t i2) {return **(fData+i1) < **(fData+i2)
;} | |
| TGeoBranchArray **fData; | | TGeoBranchArray **fData; | |
| }; | | }; | |
| | | | |
| struct compareBAdesc { | | struct compareBAdesc { | |
| compareBAdesc(TGeoBranchArray **d) : fData(d) {} | | compareBAdesc(TGeoBranchArray **d) : fData(d) {} | |
| | | | |
End of changes. 8 change blocks. |
| 11 lines changed or deleted | | 12 lines changed or added | |
|
| TGeoCache.h | | TGeoCache.h | |
|
| // @(#)root/geom:$Id: TGeoCache.h 21425 2007-12-17 15:59:27Z brun $ | | // @(#)root/geom:$Id: TGeoCache.h 43155 2012-02-28 14:27:43Z agheata $ | |
| // Author: Andrei Gheata 18/03/02 | | // Author: Andrei Gheata 18/03/02 | |
| | | | |
| /************************************************************************* | | /************************************************************************* | |
| * 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. * | |
| *************************************************************************/ | | *************************************************************************/ | |
| // Author : Andrei Gheata - date Wed 12 Dec 2001 09:45:08 AM CET | | // Author : Andrei Gheata - date Wed 12 Dec 2001 09:45:08 AM CET | |
| | | | |
| #ifndef ROOT_TGeoCache | | #ifndef ROOT_TGeoCache | |
| #define ROOT_TGeoCache | | #define ROOT_TGeoCache | |
| | | | |
| #ifndef ROOT_TGeoNode | | #ifndef ROOT_TGeoNode | |
| #include "TGeoNode.h" | | #include "TGeoNode.h" | |
| #endif | | #endif | |
| | | | |
|
| | | #ifndef ROOT_TGeoStateInfo | |
| | | #include "TGeoStateInfo.h" | |
| | | #endif | |
| | | | |
| // forward declarations | | // forward declarations | |
| class TGeoManager; | | class TGeoManager; | |
| class TGeoHMatrix; | | class TGeoHMatrix; | |
| | | | |
| ///////////////////////////////////////////////////////////////////////////
// | | ///////////////////////////////////////////////////////////////////////////
// | |
| //
// | | //
// | |
| // TGeoCacheState - class storing the state of the cache at a given moment
// | | // TGeoCacheState - class storing the state of the cache at a given moment
// | |
| //
// | | //
// | |
| ///////////////////////////////////////////////////////////////////////////
// | | ///////////////////////////////////////////////////////////////////////////
// | |
| | | | |
| | | | |
| skipping to change at line 56 | | skipping to change at line 60 | |
| TGeoCacheState& operator=(const TGeoCacheState&); | | TGeoCacheState& operator=(const TGeoCacheState&); | |
| | | | |
| public: | | public: | |
| TGeoCacheState(); | | TGeoCacheState(); | |
| TGeoCacheState(Int_t capacity); | | TGeoCacheState(Int_t capacity); | |
| virtual ~TGeoCacheState(); | | virtual ~TGeoCacheState(); | |
| | | | |
| void SetState(Int_t level, Int_t startlevel, Int_t nmany
, Bool_t ovlp, Double_t *point=0); | | void SetState(Int_t level, Int_t startlevel, Int_t nmany
, Bool_t ovlp, Double_t *point=0); | |
| Bool_t GetState(Int_t &level, Int_t &nmany, Double_t *poin
t) const; | | Bool_t GetState(Int_t &level, Int_t &nmany, Double_t *poin
t) const; | |
| | | | |
|
| ClassDef(TGeoCacheState, 4) // class storing the cache state | | ClassDef(TGeoCacheState, 0) // class storing the cache state | |
| }; | | }; | |
| | | | |
| ///////////////////////////////////////////////////////////////////////////
// | | ///////////////////////////////////////////////////////////////////////////
// | |
| //
// | | //
// | |
| // TGeoNodeCache - cache of reusable physical nodes
// | | // TGeoNodeCache - cache of reusable physical nodes
// | |
| //
// | | //
// | |
| ///////////////////////////////////////////////////////////////////////////
// | | ///////////////////////////////////////////////////////////////////////////
// | |
| | | | |
| class TGeoNodeCache : public TObject | | class TGeoNodeCache : public TObject | |
| { | | { | |
| private: | | private: | |
| Int_t fGeoCacheMaxLevels;// maximum supported number of
levels | | Int_t fGeoCacheMaxLevels;// maximum supported number of
levels | |
| Int_t fGeoCacheStackSize;// maximum size of the stack | | Int_t fGeoCacheStackSize;// maximum size of the stack | |
|
| | | Int_t fGeoInfoStackSize; // maximum size of the stack of
info states | |
| Int_t fLevel; // level in the current branch | | Int_t fLevel; // level in the current branch | |
| Int_t fStackLevel; // current level in the stack | | Int_t fStackLevel; // current level in the stack | |
|
| | | Int_t fInfoLevel; // current level in the stack | |
| Int_t fCurrentID; // unique ID of current node | | Int_t fCurrentID; // unique ID of current node | |
| Int_t fIndex; // index in array of ID's | | Int_t fIndex; // index in array of ID's | |
| Int_t fIdBranch[100]; // current branch of indices | | Int_t fIdBranch[100]; // current branch of indices | |
| TString fPath; // path for current branch | | TString fPath; // path for current branch | |
| TGeoNode *fTop; // top node | | TGeoNode *fTop; // top node | |
| TGeoNode *fNode; //! current node | | TGeoNode *fNode; //! current node | |
| TGeoHMatrix *fMatrix; //! current matrix | | TGeoHMatrix *fMatrix; //! current matrix | |
| TObjArray *fStack; // stack of cache states | | TObjArray *fStack; // stack of cache states | |
| TGeoHMatrix **fMatrixBranch; // current branch of global mat
rices | | TGeoHMatrix **fMatrixBranch; // current branch of global mat
rices | |
| TGeoHMatrix **fMPB; // pre-built matrices | | TGeoHMatrix **fMPB; // pre-built matrices | |
| TGeoNode **fNodeBranch; // current branch of nodes | | TGeoNode **fNodeBranch; // current branch of nodes | |
|
| | | TGeoStateInfo **fInfoBranch; // current branch of nodes | |
| Int_t *fNodeIdArray; //! array of node id's | | Int_t *fNodeIdArray; //! array of node id's | |
| | | | |
|
| protected: | | | |
| TGeoNodeCache(const TGeoNodeCache&); // Not implemented | | TGeoNodeCache(const TGeoNodeCache&); // Not implemented | |
| TGeoNodeCache& operator=(const TGeoNodeCache&); // Not implemented | | TGeoNodeCache& operator=(const TGeoNodeCache&); // Not implemented | |
| | | | |
| public: | | public: | |
| TGeoNodeCache(); | | TGeoNodeCache(); | |
| TGeoNodeCache(TGeoNode *top, Bool_t nodeid=kFALSE, Int_t capacity=30); | | TGeoNodeCache(TGeoNode *top, Bool_t nodeid=kFALSE, Int_t capacity=30); | |
| virtual ~TGeoNodeCache(); | | virtual ~TGeoNodeCache(); | |
| | | | |
| void BuildIdArray(); | | void BuildIdArray(); | |
| void CdNode(Int_t nodeid); | | void CdNode(Int_t nodeid); | |
| Bool_t CdDown(Int_t index); | | Bool_t CdDown(Int_t index); | |
|
| | | Bool_t CdDown(TGeoNode *node); | |
| void CdTop() {fLevel=1; CdUp();} | | void CdTop() {fLevel=1; CdUp();} | |
| void CdUp(); | | void CdUp(); | |
| void FillIdBranch(const Int_t *br, Int_t startlevel=0) {
memcpy(fIdBranch+startlevel,br,(fLevel+1-startlevel)*sizeof(Int_t)); fIndex
=fIdBranch[fLevel];} | | void FillIdBranch(const Int_t *br, Int_t startlevel=0) {
memcpy(fIdBranch+startlevel,br,(fLevel+1-startlevel)*sizeof(Int_t)); fIndex
=fIdBranch[fLevel];} | |
| const Int_t *GetIdBranch() const {return fIdBranch;} | | const Int_t *GetIdBranch() const {return fIdBranch;} | |
| void *GetBranch() const {return fNodeBranch;} | | void *GetBranch() const {return fNodeBranch;} | |
| void GetBranchNames(Int_t *names) const; | | void GetBranchNames(Int_t *names) const; | |
| void GetBranchNumbers(Int_t *copyNumbers, Int_t *volumeN
umbers) const; | | void GetBranchNumbers(Int_t *copyNumbers, Int_t *volumeN
umbers) const; | |
| void GetBranchOnlys(Int_t *isonly) const; | | void GetBranchOnlys(Int_t *isonly) const; | |
| void *GetMatrices() const {return fMatrixBranch;} | | void *GetMatrices() const {return fMatrixBranch;} | |
| TGeoHMatrix *GetCurrentMatrix() const {return fMatrix;} | | TGeoHMatrix *GetCurrentMatrix() const {return fMatrix;} | |
| Int_t GetCurrentNodeId() const; | | Int_t GetCurrentNodeId() const; | |
| TGeoNode *GetMother(Int_t up=1) const {return ((fLevel-up)>=0
)?fNodeBranch[fLevel-up]:0;} | | TGeoNode *GetMother(Int_t up=1) const {return ((fLevel-up)>=0
)?fNodeBranch[fLevel-up]:0;} | |
| TGeoHMatrix *GetMotherMatrix(Int_t up=1) const {return ((fLevel-
up)>=0)?fMatrixBranch[fLevel-up]:0;} | | TGeoHMatrix *GetMotherMatrix(Int_t up=1) const {return ((fLevel-
up)>=0)?fMatrixBranch[fLevel-up]:0;} | |
| TGeoNode *GetNode() const {return fNode;} | | TGeoNode *GetNode() const {return fNode;} | |
| TGeoNode *GetTopNode() const {return fTop;} | | TGeoNode *GetTopNode() const {return fTop;} | |
|
| | | TGeoStateInfo *GetInfo(); | |
| | | void ReleaseInfo(); | |
| Int_t GetLevel() const {return fLevel;} | | Int_t GetLevel() const {return fLevel;} | |
| const char *GetPath(); | | const char *GetPath(); | |
| Int_t GetStackLevel() const {return fStackLevel;} | | Int_t GetStackLevel() const {return fStackLevel;} | |
| Int_t GetNodeId() const; | | Int_t GetNodeId() const; | |
| Bool_t HasIdArray() const {return (fNodeIdArray)?kTRUE:kFA
LSE;} | | Bool_t HasIdArray() const {return (fNodeIdArray)?kTRUE:kFA
LSE;} | |
| Bool_t IsDummy() const {return kTRUE;} | | Bool_t IsDummy() const {return kTRUE;} | |
| | | | |
| void LocalToMaster(const Double_t *local, Double_t *mast
er) const; | | void LocalToMaster(const Double_t *local, Double_t *mast
er) const; | |
| void MasterToLocal(const Double_t *master, Double_t *loc
al) const; | | void MasterToLocal(const Double_t *master, Double_t *loc
al) const; | |
| void LocalToMasterVect(const Double_t *local, Double_t *
master) const; | | void LocalToMasterVect(const Double_t *local, Double_t *
master) const; | |
| | | | |
End of changes. 9 change blocks. |
| 3 lines changed or deleted | | 12 lines changed or added | |
|
| TGeoElement.h | | TGeoElement.h | |
|
| // @(#)root/geom:$Id: TGeoElement.h 33465 2010-05-11 09:58:19Z agheata $ | | // @(#)root/geom:$Id: TGeoElement.h 43155 2012-02-28 14:27:43Z agheata $ | |
| // Author: Andrei Gheata 17/06/04 | | // Author: Andrei Gheata 17/06/04 | |
| // Added support for radionuclides: Mihaela Gheata 24/08/2006 | | // Added support for radionuclides: Mihaela Gheata 24/08/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 84 | | skipping to change at line 84 | |
| // methods | | // methods | |
| virtual Int_t ENDFCode() const { return 0;} | | virtual Int_t ENDFCode() const { return 0;} | |
| Int_t Z() const {return fZ;} | | Int_t Z() const {return fZ;} | |
| Int_t N() const {return fN;} | | Int_t N() const {return fN;} | |
| Double_t Neff() const; | | Double_t Neff() const; | |
| Double_t A() const {return fA;} | | Double_t A() const {return fA;} | |
| void AddIsotope(TGeoIsotope *isotope, Double_t relat
iveAbundance); | | void AddIsotope(TGeoIsotope *isotope, Double_t relat
iveAbundance); | |
| Int_t GetNisotopes() const {return fNisotopes;} | | Int_t GetNisotopes() const {return fNisotopes;} | |
| TGeoIsotope *GetIsotope(Int_t i) const; | | TGeoIsotope *GetIsotope(Int_t i) const; | |
| Double_t GetRelativeAbundance(Int_t i) const; | | Double_t GetRelativeAbundance(Int_t i) const; | |
|
| | | // Specific activity (in Bq/gram) | |
| | | virtual Double_t GetSpecificActivity() const {return 0.;} | |
| Bool_t HasIsotopes() const {return (fNisotopes==0)?kFA
LSE:kTRUE;} | | Bool_t HasIsotopes() const {return (fNisotopes==0)?kFA
LSE:kTRUE;} | |
| Bool_t IsDefined() const {return TObject::TestBit(kEle
mDefined);} | | Bool_t IsDefined() const {return TObject::TestBit(kEle
mDefined);} | |
| virtual Bool_t IsRadioNuclide() const {return kFALSE;} | | virtual Bool_t IsRadioNuclide() const {return kFALSE;} | |
| Bool_t IsUsed() const {return TObject::TestBit(kElemUs
ed);} | | Bool_t IsUsed() const {return TObject::TestBit(kElemUs
ed);} | |
| virtual void Print(Option_t *option = "") const; | | virtual void Print(Option_t *option = "") const; | |
| void SetDefined(Bool_t flag=kTRUE) {TObject::SetBit(
kElemDefined,flag);} | | void SetDefined(Bool_t flag=kTRUE) {TObject::SetBit(
kElemDefined,flag);} | |
| void SetUsed(Bool_t flag=kTRUE) {TObject::SetBit(kEl
emUsed,flag);} | | void SetUsed(Bool_t flag=kTRUE) {TObject::SetBit(kEl
emUsed,flag);} | |
| static TGeoElementTable *GetElementTable(); | | static TGeoElementTable *GetElementTable(); | |
| | | | |
| ClassDef(TGeoElement, 2) // base element class | | ClassDef(TGeoElement, 2) // base element class | |
| | | | |
| skipping to change at line 174 | | skipping to change at line 176 | |
| virtual ~TGeoElementRN(); | | virtual ~TGeoElementRN(); | |
| | | | |
| void AddDecay(Int_t decay, Int_t diso, Double_t bran
chingRatio, Double_t qValue); | | void AddDecay(Int_t decay, Int_t diso, Double_t bran
chingRatio, Double_t qValue); | |
| void AddDecay(TGeoDecayChannel *dc); | | void AddDecay(TGeoDecayChannel *dc); | |
| void AddRatio(TGeoBatemanSol &ratio); | | void AddRatio(TGeoBatemanSol &ratio); | |
| void ResetRatio(); | | void ResetRatio(); | |
| static Int_t ENDF(Int_t a, Int_t z, Int_t iso) {return 10000
*z+10*a+iso;} | | static Int_t ENDF(Int_t a, Int_t z, Int_t iso) {return 10000
*z+10*a+iso;} | |
| | | | |
| // Getters | | // Getters | |
| virtual Int_t ENDFCode() const {return fENDFcode;} | | virtual Int_t ENDFCode() const {return fENDFcode;} | |
|
| | | virtual Double_t GetSpecificActivity() const; | |
| virtual Bool_t IsRadioNuclide() const {return kTRUE;} | | virtual Bool_t IsRadioNuclide() const {return kTRUE;} | |
| Int_t MassNo() const {return (Int_t)fA;} | | Int_t MassNo() const {return (Int_t)fA;} | |
| Int_t AtomicNo() const {return fZ;} | | Int_t AtomicNo() const {return fZ;} | |
| Int_t IsoNo() const {return fIso;} | | Int_t IsoNo() const {return fIso;} | |
| Double_t Level() const {return fLevel;} | | Double_t Level() const {return fLevel;} | |
| Double_t MassEx() const {return fDeltaM;} | | Double_t MassEx() const {return fDeltaM;} | |
| Double_t HalfLife() const {return fHalfLife;} | | Double_t HalfLife() const {return fHalfLife;} | |
| Double_t NatAbun() const {return fNatAbun;} | | Double_t NatAbun() const {return fNatAbun;} | |
| const char* PJ() const {return fTitle.Data();} | | const char* PJ() const {return fTitle.Data();} | |
| Double_t TH_F() const {return fTH_F;} | | Double_t TH_F() const {return fTH_F;} | |
| | | | |
End of changes. 3 change blocks. |
| 1 lines changed or deleted | | 4 lines changed or added | |
|
| TGeoManager.h | | TGeoManager.h | |
|
| // @(#)root/geom:$Id: TGeoManager.h 41744 2011-11-03 10:55:33Z agheata $ | | // @(#)root/geom:$Id: TGeoManager.h 42999 2012-02-14 13:42:55Z agheata $ | |
| // Author: Andrei Gheata 25/10/01 | | // Author: Andrei Gheata 25/10/01 | |
| | | | |
| /************************************************************************* | | /************************************************************************* | |
| * 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 50 | | skipping to change at line 50 | |
| // interface for geometry creation, navigation, state querying, /
/ | | // interface for geometry creation, navigation, state querying, /
/ | |
| // visualization, IO, geometry checking and other utilities. /
/ | | // visualization, IO, geometry checking and other utilities. /
/ | |
| // /
/ | | // /
/ | |
| ///////////////////////////////////////////////////////////////////////////
/ | | ///////////////////////////////////////////////////////////////////////////
/ | |
| | | | |
| class TGeoManager : public TNamed | | class TGeoManager : public TNamed | |
| { | | { | |
| protected: | | protected: | |
| static Bool_t fgLock; //! Lock preventing a second ge
ometry to be loaded | | static Bool_t fgLock; //! Lock preventing a second ge
ometry to be loaded | |
| static Int_t fgVerboseLevel; //! Verbosity level for Info me
ssages (no IO). | | static Int_t fgVerboseLevel; //! Verbosity level for Info me
ssages (no IO). | |
|
| | | static Int_t fgMaxLevel; //! Maximum level in geometry | |
| | | static Int_t fgMaxDaughters; //! Maximum number of daughters | |
| | | static Int_t fgMaxXtruVert; //! Maximum number of Xtru vert | |
| | | ices | |
| | | | |
| TGeoManager(const TGeoManager&); | | TGeoManager(const TGeoManager&); | |
| TGeoManager& operator=(const TGeoManager&); | | TGeoManager& operator=(const TGeoManager&); | |
| | | | |
| private : | | private : | |
| Double_t fPhimin; //! lowest range for phi cut | | Double_t fPhimin; //! lowest range for phi cut | |
| Double_t fPhimax; //! highest range for phi cut | | Double_t fPhimax; //! highest range for phi cut | |
| Double_t fTmin; //! lower time limit for tracks
drawing | | Double_t fTmin; //! lower time limit for tracks
drawing | |
| Double_t fTmax; //! upper time limit for tracks
drawing | | Double_t fTmax; //! upper time limit for tracks
drawing | |
| Int_t fNNodes; // total number of physical nod
es | | Int_t fNNodes; // total number of physical nod
es | |
| | | | |
| skipping to change at line 106 | | skipping to change at line 109 | |
| TObjArray *fNodes; //-> current branch of nodes | | TObjArray *fNodes; //-> current branch of nodes | |
| TObjArray *fOverlaps; //-> list of geometrical overla
ps | | TObjArray *fOverlaps; //-> list of geometrical overla
ps | |
| UChar_t *fBits; //! bits used for voxelization | | UChar_t *fBits; //! bits used for voxelization | |
| // Map of navigatorr arrays per thread | | // Map of navigatorr arrays per thread | |
| typedef std::map<Long_t, TGeoNavigatorArray *> NavigatorsMap_t; | | typedef std::map<Long_t, TGeoNavigatorArray *> NavigatorsMap_t; | |
| typedef NavigatorsMap_t::iterator NavigatorsMapIt_t; | | typedef NavigatorsMap_t::iterator NavigatorsMapIt_t; | |
| typedef std::map<Long_t, Int_t> ThreadsMap_t; | | typedef std::map<Long_t, Int_t> ThreadsMap_t; | |
| typedef ThreadsMap_t::const_iterator ThreadsMapIt_t; | | typedef ThreadsMap_t::const_iterator ThreadsMapIt_t; | |
| | | | |
| NavigatorsMap_t fNavigators; //! Map between thread id's and
navigator arrays | | NavigatorsMap_t fNavigators; //! Map between thread id's and
navigator arrays | |
|
| static ThreadsMap_t fgThreadId; //! Thread id's map | | static ThreadsMap_t *fgThreadId; //! Thread id's map | |
| static Int_t fgNumThreads; //! Number of registered thread
s | | static Int_t fgNumThreads; //! Number of registered thread
s | |
| static Bool_t fgLockNavigators; //! Lock existing navigators | | static Bool_t fgLockNavigators; //! Lock existing navigators | |
| TGeoNavigator *fCurrentNavigator; //! current navigator | | TGeoNavigator *fCurrentNavigator; //! current navigator | |
| TGeoVolume *fCurrentVolume; //! current volume | | TGeoVolume *fCurrentVolume; //! current volume | |
| TGeoVolume *fTopVolume; //! top level volume in geometr
y | | TGeoVolume *fTopVolume; //! top level volume in geometr
y | |
| TGeoNode *fTopNode; //! top physical node | | TGeoNode *fTopNode; //! top physical node | |
| TGeoVolume *fMasterVolume; // master volume | | TGeoVolume *fMasterVolume; // master volume | |
| TGeoHMatrix *fGLMatrix; // matrix to be used for view t
ransformations | | TGeoHMatrix *fGLMatrix; // matrix to be used for view t
ransformations | |
| TObjArray *fUniqueVolumes; //-> list of unique volumes | | TObjArray *fUniqueVolumes; //-> list of unique volumes | |
| TGeoShape *fClippingShape; //! clipping shape for raytraci
ng | | TGeoShape *fClippingShape; //! clipping shape for raytraci
ng | |
| | | | |
| skipping to change at line 130 | | skipping to change at line 133 | |
| Int_t fNLevel; // maximum accepted level in ge
ometry | | Int_t fNLevel; // maximum accepted level in ge
ometry | |
| TGeoVolume *fPaintVolume; //! volume currently painted | | TGeoVolume *fPaintVolume; //! volume currently painted | |
| THashList *fHashVolumes; //! hash list of volumes provid
ing fast search | | THashList *fHashVolumes; //! hash list of volumes provid
ing fast search | |
| THashList *fHashGVolumes; //! hash list of group volumes
providing fast search | | THashList *fHashGVolumes; //! hash list of group volumes
providing fast search | |
| THashList *fHashPNE; //-> hash list of phisical node
entries | | THashList *fHashPNE; //-> hash list of phisical node
entries | |
| mutable TObjArray *fArrayPNE; //! array of phisical node entr
ies | | mutable TObjArray *fArrayPNE; //! array of phisical node entr
ies | |
| Int_t fSizePNEId; // size of the array of unique
ID's for PN entries | | Int_t fSizePNEId; // size of the array of unique
ID's for PN entries | |
| Int_t fNPNEId; // number of PN entries having
a unique ID | | Int_t fNPNEId; // number of PN entries having
a unique ID | |
| Int_t *fKeyPNEId; //[fSizePNEId] array of uid val
ues for PN entries | | Int_t *fKeyPNEId; //[fSizePNEId] array of uid val
ues for PN entries | |
| Int_t *fValuePNEId; //[fSizePNEId] array of pointer
s to PN entries with ID's | | Int_t *fValuePNEId; //[fSizePNEId] array of pointer
s to PN entries with ID's | |
|
| | | Int_t fMaxThreads; //! Max number of threads | |
| Bool_t fMultiThread; //! Flag for multi-threading | | Bool_t fMultiThread; //! Flag for multi-threading | |
| //--- private methods | | //--- private methods | |
| | | | |
| Bool_t IsLoopingVolumes() const {return fLoopVolumes;
} | | Bool_t IsLoopingVolumes() const {return fLoopVolumes;
} | |
| void Init(); | | void Init(); | |
| Bool_t InitArrayPNE() const; | | Bool_t InitArrayPNE() const; | |
| Bool_t InsertPNEId(Int_t uid, Int_t ientry); | | Bool_t InsertPNEId(Int_t uid, Int_t ientry); | |
| void SetLoopVolumes(Bool_t flag=kTRUE) {fLoopVolumes=fl
ag;} | | void SetLoopVolumes(Bool_t flag=kTRUE) {fLoopVolumes=fl
ag;} | |
| void UpdateElements(); | | void UpdateElements(); | |
| void Voxelize(Option_t *option = 0); | | void Voxelize(Option_t *option = 0); | |
| | | | |
| public: | | public: | |
| // constructors | | // constructors | |
| TGeoManager(); | | TGeoManager(); | |
| TGeoManager(const char *name, const char *title); | | TGeoManager(const char *name, const char *title); | |
| // destructor | | // destructor | |
| virtual ~TGeoManager(); | | virtual ~TGeoManager(); | |
|
| struct ThreadData_t | | | |
| { | | | |
| Int_t fIntSize; //! int buffer size | | | |
| Int_t fDblSize; //! dbl buffer size | | | |
| Int_t *fIntBuffer; //! transient int buffer | | | |
| Double_t *fDblBuffer; //! transient dbl buffer | | | |
| | | | |
| ThreadData_t(); | | | |
| ~ThreadData_t(); | | | |
| }; | | | |
| | | | |
| mutable std::vector<ThreadData_t*> fThreadData; //! Thread private data | | | |
| mutable Int_t fThreadSize; //! Length of thread dat | | | |
| a | | | |
| | | | |
| ThreadData_t& GetThreadData() const; | | | |
| void ClearThreadData() const; | | | |
| //--- adding geometrical objects | | //--- adding geometrical objects | |
| Int_t AddMaterial(const TGeoMaterial *material); | | Int_t AddMaterial(const TGeoMaterial *material); | |
| Int_t AddOverlap(const TNamed *ovlp); | | Int_t AddOverlap(const TNamed *ovlp); | |
| Int_t AddTransformation(const TGeoMatrix *matrix); | | Int_t AddTransformation(const TGeoMatrix *matrix); | |
| Int_t AddShape(const TGeoShape *shape); | | Int_t AddShape(const TGeoShape *shape); | |
| Int_t AddTrack(Int_t id, Int_t pdgcode, TObject *partic
le=0); | | Int_t AddTrack(Int_t id, Int_t pdgcode, TObject *partic
le=0); | |
| Int_t AddTrack(TVirtualGeoTrack *track); | | Int_t AddTrack(TVirtualGeoTrack *track); | |
| Int_t AddVolume(TGeoVolume *volume); | | Int_t AddVolume(TGeoVolume *volume); | |
| TGeoNavigator *AddNavigator(); | | TGeoNavigator *AddNavigator(); | |
| void ClearOverlaps(); | | void ClearOverlaps(); | |
| | | | |
| skipping to change at line 432 | | skipping to change at line 420 | |
| void CleanGarbage(); | | void CleanGarbage(); | |
| void ClearShape(const TGeoShape *shape); | | void ClearShape(const TGeoShape *shape); | |
| void ClearTracks() {fTracks->Delete(); fNtracks=0;} | | void ClearTracks() {fTracks->Delete(); fNtracks=0;} | |
| void ClearNavigators(); | | void ClearNavigators(); | |
| void RemoveMaterial(Int_t index); | | void RemoveMaterial(Int_t index); | |
| void RemoveNavigator(const TGeoNavigator *nav); | | void RemoveNavigator(const TGeoNavigator *nav); | |
| void ResetUserData(); | | void ResetUserData(); | |
| | | | |
| //--- utilities | | //--- utilities | |
| Int_t CountNodes(const TGeoVolume *vol=0, Int_t nlevels
=10000, Int_t option=0); | | Int_t CountNodes(const TGeoVolume *vol=0, Int_t nlevels
=10000, Int_t option=0); | |
|
| | | void CountLevels(); | |
| virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py); | | virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py); | |
| static Int_t Parse(const char* expr, TString &expr1, TString &
expr2, TString &expr3); | | static Int_t Parse(const char* expr, TString &expr1, TString &
expr2, TString &expr3); | |
| Int_t ReplaceVolume(TGeoVolume *vorig, TGeoVolume *vnew
); | | Int_t ReplaceVolume(TGeoVolume *vorig, TGeoVolume *vnew
); | |
| Int_t TransformVolumeToAssembly(const char *vname); | | Int_t TransformVolumeToAssembly(const char *vname); | |
| UChar_t *GetBits() {return fBits;} | | UChar_t *GetBits() {return fBits;} | |
| virtual Int_t GetByteCount(Option_t *option=0); | | virtual Int_t GetByteCount(Option_t *option=0); | |
|
| Int_t *GetIntBuffer(Int_t length); | | | |
| Double_t *GetDblBuffer(Int_t length); | | | |
| void SetAllIndex(); | | void SetAllIndex(); | |
|
| | | static Int_t GetMaxDaughters() {return fgMaxDaughters;} | |
| | | static Int_t GetMaxLevels() {return fgMaxLevel;} | |
| | | static Int_t GetMaxXtruVert() {return fgMaxXtruVert;} | |
| | | Int_t GetMaxThreads() const {return fMaxThreads;} | |
| | | void SetMaxThreads(Int_t nthreads); | |
| void SetMultiThread(Bool_t flag=kTRUE) {fMultiThread =
flag;} | | void SetMultiThread(Bool_t flag=kTRUE) {fMultiThread =
flag;} | |
| Bool_t IsMultiThread() const {return fMultiThread;} | | Bool_t IsMultiThread() const {return fMultiThread;} | |
| static void SetNavigatorsLock(Bool_t flag) {fgLockNavigators
= flag;} | | static void SetNavigatorsLock(Bool_t flag) {fgLockNavigators
= flag;} | |
| static Int_t ThreadId(); | | static Int_t ThreadId(); | |
| static Int_t GetNumThreads() {return fgNumThreads;} | | static Int_t GetNumThreads() {return fgNumThreads;} | |
| static void ClearThreadsMap(); | | static void ClearThreadsMap(); | |
|
| | | void ClearThreadData() const; | |
| | | void CreateThreadData() const; | |
| | | | |
| //--- I/O | | //--- I/O | |
| virtual Int_t Export(const char *filename, const char *name="",
Option_t *option="vg"); | | virtual Int_t Export(const char *filename, const char *name="",
Option_t *option="vg"); | |
| static void LockGeometry(); | | static void LockGeometry(); | |
| static void UnlockGeometry(); | | static void UnlockGeometry(); | |
| static Int_t GetVerboseLevel(); | | static Int_t GetVerboseLevel(); | |
| static void SetVerboseLevel(Int_t vl); | | static void SetVerboseLevel(Int_t vl); | |
| static TGeoManager *Import(const char *filename, const char *name="",
Option_t *option=""); | | static TGeoManager *Import(const char *filename, const char *name="",
Option_t *option=""); | |
| static Bool_t IsLocked(); | | static Bool_t IsLocked(); | |
| Bool_t IsStreamingVoxels() const {return fStreamVoxels;} | | Bool_t IsStreamingVoxels() const {return fStreamVoxels;} | |
| | | | |
End of changes. 9 change blocks. |
| 21 lines changed or deleted | | 15 lines changed or added | |
|
| TGeoMaterial.h | | TGeoMaterial.h | |
|
| // @(#)root/geom:$Id: TGeoMaterial.h 35651 2010-09-23 13:31:47Z agheata $ | | // @(#)root/geom:$Id: TGeoMaterial.h 43155 2012-02-28 14:27:43Z agheata $ | |
| // Author: Andrei Gheata 25/10/01 | | // Author: Andrei Gheata 25/10/01 | |
| | | | |
| /************************************************************************* | | /************************************************************************* | |
| * 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 102 | | skipping to change at line 102 | |
| static Double_t Coulomb(Double_t z); | | static Double_t Coulomb(Double_t z); | |
| // radioactive mixture evolution | | // radioactive mixture evolution | |
| virtual TGeoMaterial *DecayMaterial(Double_t time, Double_t precision
=0.001); | | virtual TGeoMaterial *DecayMaterial(Double_t time, Double_t precision
=0.001); | |
| virtual void FillMaterialEvolution(TObjArray *population, Do
uble_t precision=0.001); | | virtual void FillMaterialEvolution(TObjArray *population, Do
uble_t precision=0.001); | |
| // getters & setters | | // getters & setters | |
| virtual Int_t GetByteCount() const {return sizeof(*this);} | | virtual Int_t GetByteCount() const {return sizeof(*this);} | |
| virtual Double_t GetA() const {return fA;} | | virtual Double_t GetA() const {return fA;} | |
| virtual Double_t GetZ() const {return fZ;} | | virtual Double_t GetZ() const {return fZ;} | |
| virtual Int_t GetDefaultColor() const; | | virtual Int_t GetDefaultColor() const; | |
| virtual Double_t GetDensity() const {return fDensity;} | | virtual Double_t GetDensity() const {return fDensity;} | |
|
| | | virtual Int_t GetNelements() const {return 1;} | |
| virtual TGeoElement *GetElement(Int_t i=0) const; | | virtual TGeoElement *GetElement(Int_t i=0) const; | |
|
| | | virtual void GetElementProp(Double_t &a, Double_t &z, Double
_t &w, Int_t i=0); | |
| TGeoElement *GetBaseElement() const {return fElement;} | | TGeoElement *GetBaseElement() const {return fElement;} | |
| char *GetPointerName() const; | | char *GetPointerName() const; | |
| virtual Double_t GetRadLen() const {return fRadLen;} | | virtual Double_t GetRadLen() const {return fRadLen;} | |
| virtual Double_t GetIntLen() const {return fIntLen;} | | virtual Double_t GetIntLen() const {return fIntLen;} | |
| Int_t GetIndex(); | | Int_t GetIndex(); | |
| virtual TObject *GetCerenkovProperties() const {return fCerenkov
;} | | virtual TObject *GetCerenkovProperties() const {return fCerenkov
;} | |
| Char_t GetTransparency() const {return (fFillStyle<300
0 || fFillStyle>3100)?0:Char_t(fFillStyle-3000);} | | Char_t GetTransparency() const {return (fFillStyle<300
0 || fFillStyle>3100)?0:Char_t(fFillStyle-3000);} | |
| Double_t GetTemperature() const {return fTemperature;} | | Double_t GetTemperature() const {return fTemperature;} | |
| Double_t GetPressure() const {return fPressure;} | | Double_t GetPressure() const {return fPressure;} | |
| EGeoMaterialState GetState() const {return fState;} | | EGeoMaterialState GetState() const {return fState;} | |
|
| | | virtual Double_t GetSpecificActivity(Int_t) const {return 0.;} | |
| virtual Bool_t IsEq(const TGeoMaterial *other) const; | | virtual Bool_t IsEq(const TGeoMaterial *other) const; | |
| Bool_t IsUsed() const {return TObject::TestBit(kMatUse
d);} | | Bool_t IsUsed() const {return TObject::TestBit(kMatUse
d);} | |
| virtual Bool_t IsMixture() const {return kFALSE;} | | virtual Bool_t IsMixture() const {return kFALSE;} | |
| virtual void Print(const Option_t *option="") const; | | virtual void Print(const Option_t *option="") const; | |
| virtual void SavePrimitive(ostream &out, Option_t *option =
""); | | virtual void SavePrimitive(ostream &out, Option_t *option =
""); | |
| void SetA(Double_t a) {fA = a; SetRadLen(0);} | | void SetA(Double_t a) {fA = a; SetRadLen(0);} | |
| void SetZ(Double_t z) {fZ = z; SetRadLen(0);} | | void SetZ(Double_t z) {fZ = z; SetRadLen(0);} | |
| void SetDensity(Double_t density) {fDensity = densit
y; SetRadLen(0);} | | void SetDensity(Double_t density) {fDensity = densit
y; SetRadLen(0);} | |
| void SetIndex(Int_t index) {fIndex=index;} | | void SetIndex(Int_t index) {fIndex=index;} | |
| virtual void SetCerenkovProperties(TObject* cerenkov) {fCere
nkov = cerenkov;} | | virtual void SetCerenkovProperties(TObject* cerenkov) {fCere
nkov = cerenkov;} | |
| | | | |
| skipping to change at line 178 | | skipping to change at line 181 | |
| // backward compatibility for defining elements | | // backward compatibility for defining elements | |
| void DefineElement(Int_t iel, Double_t a, Double_t z
, Double_t weight); | | void DefineElement(Int_t iel, Double_t a, Double_t z
, Double_t weight); | |
| void DefineElement(Int_t iel, TGeoElement *elem, Dou
ble_t weight); | | void DefineElement(Int_t iel, TGeoElement *elem, Dou
ble_t weight); | |
| void DefineElement(Int_t iel, Int_t z, Int_t natoms)
; | | void DefineElement(Int_t iel, Int_t z, Int_t natoms)
; | |
| // radioactive mixture evolution | | // radioactive mixture evolution | |
| virtual TGeoMaterial *DecayMaterial(Double_t time, Double_t precision
=0.001); | | virtual TGeoMaterial *DecayMaterial(Double_t time, Double_t precision
=0.001); | |
| virtual void FillMaterialEvolution(TObjArray *population, Do
uble_t precision=0.001); | | virtual void FillMaterialEvolution(TObjArray *population, Do
uble_t precision=0.001); | |
| // getters | | // getters | |
| virtual Int_t GetByteCount() const {return 48+12*fNelements;} | | virtual Int_t GetByteCount() const {return 48+12*fNelements;} | |
| virtual TGeoElement *GetElement(Int_t i=0) const; | | virtual TGeoElement *GetElement(Int_t i=0) const; | |
|
| Int_t GetNelements() const {return fNelements;} | | virtual void GetElementProp(Double_t &a, Double_t &z, Double | |
| | | _t &w, Int_t i=0) {a=fAmixture[i]; z=fZmixture[i]; w=fWeights[i];} | |
| | | virtual Int_t GetNelements() const {return fNelements;} | |
| Double_t *GetZmixt() const {return fZmixture;} | | Double_t *GetZmixt() const {return fZmixture;} | |
| Double_t *GetAmixt() const {return fAmixture;} | | Double_t *GetAmixt() const {return fAmixture;} | |
| Double_t *GetWmixt() const {return fWeights;} | | Double_t *GetWmixt() const {return fWeights;} | |
| Int_t *GetNmixt() const {return fNatoms;} | | Int_t *GetNmixt() const {return fNatoms;} | |
|
| | | virtual Double_t GetSpecificActivity(Int_t i=-1) const; | |
| // utilities | | // utilities | |
| virtual Bool_t IsEq(const TGeoMaterial *other) const; | | virtual Bool_t IsEq(const TGeoMaterial *other) const; | |
| virtual Bool_t IsMixture() const {return kTRUE;} | | virtual Bool_t IsMixture() const {return kTRUE;} | |
| virtual void Print(const Option_t *option="") const; | | virtual void Print(const Option_t *option="") const; | |
| virtual void SavePrimitive(ostream &out, Option_t *option =
""); | | virtual void SavePrimitive(ostream &out, Option_t *option =
""); | |
| void SetA(Double_t a) {fA = a;} | | void SetA(Double_t a) {fA = a;} | |
| void SetZ(Double_t z) {fZ = z;} | | void SetZ(Double_t z) {fZ = z;} | |
| | | | |
| ClassDef(TGeoMixture, 2) // material mixtures | | ClassDef(TGeoMixture, 2) // material mixtures | |
| }; | | }; | |
| | | | |
End of changes. 6 change blocks. |
| 2 lines changed or deleted | | 8 lines changed or added | |
|
| TGeoPgon.h | | TGeoPgon.h | |
|
| // @(#)root/geom:$Id: TGeoPgon.h 24870 2008-07-17 16:30:58Z brun $ | | // @(#)root/geom:$Id: TGeoPgon.h 42982 2012-02-13 10:21:23Z agheata $ | |
| // Author: Andrei Gheata 31/01/02 | | // Author: Andrei Gheata 31/01/02 | |
| | | | |
| /************************************************************************* | | /************************************************************************* | |
| * 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 36 | | skipping to change at line 36 | |
| // radii are changing; /
/ | | // radii are changing; /
/ | |
| // - z coordinate, inner and outer radius for each z plane /
/ | | // - z coordinate, inner and outer radius for each z plane /
/ | |
| // /
/ | | // /
/ | |
| ///////////////////////////////////////////////////////////////////////////
/ | | ///////////////////////////////////////////////////////////////////////////
/ | |
| | | | |
| class TGeoPgon : public TGeoPcon | | class TGeoPgon : public TGeoPcon | |
| { | | { | |
| protected: | | protected: | |
| // data members | | // data members | |
| Int_t fNedges; // number of edges (at least one) | | Int_t fNedges; // number of edges (at least one) | |
|
| | | mutable Int_t *fIntBuffer; //![fNedges+4] temporary int buffer ar | |
| | | ray | |
| | | mutable Double_t *fDblBuffer; //![fNedges+4] temporary double buffer | |
| | | array | |
| | | | |
| Int_t GetPhiCrossList(Double_t *point, Double_t *dir, In
t_t istart, Double_t *sphi, Int_t *iphi, Double_t stepmax=TGeoShape::Big())
const; | | Int_t GetPhiCrossList(Double_t *point, Double_t *dir, In
t_t istart, Double_t *sphi, Int_t *iphi, Double_t stepmax=TGeoShape::Big())
const; | |
| Bool_t IsCrossingSlice(Double_t *point, Double_t *dir, In
t_t iphi, Double_t sstart, Int_t &ipl, Double_t &snext, Double_t stepmax) c
onst; | | Bool_t IsCrossingSlice(Double_t *point, Double_t *dir, In
t_t iphi, Double_t sstart, Int_t &ipl, Double_t &snext, Double_t stepmax) c
onst; | |
| void LocatePhi(Double_t *point, Int_t &ipsec) const; | | void LocatePhi(Double_t *point, Int_t &ipsec) const; | |
| Double_t Rpg(Double_t z, Int_t ipl, Bool_t inner, Double_t
&a, Double_t &b) const; | | Double_t Rpg(Double_t z, Int_t ipl, Bool_t inner, Double_t
&a, Double_t &b) const; | |
| Double_t Rproj(Double_t z,Double_t *point, Double_t *dir, D
ouble_t cphi, Double_t sphi, Double_t &a, Double_t &b) const; | | Double_t Rproj(Double_t z,Double_t *point, Double_t *dir, D
ouble_t cphi, Double_t sphi, Double_t &a, Double_t &b) const; | |
| Bool_t SliceCrossing(Double_t *point, Double_t *dir, Int_
t nphi, Int_t *iphi, Double_t *sphi, Double_t &snext, Double_t stepmax) con
st; | | Bool_t SliceCrossing(Double_t *point, Double_t *dir, Int_
t nphi, Int_t *iphi, Double_t *sphi, Double_t &snext, Double_t stepmax) con
st; | |
| Bool_t SliceCrossingIn(Double_t *point, Double_t *dir, In
t_t ipl, Int_t nphi, Int_t *iphi, Double_t *sphi, Double_t &snext, Double_t
stepmax) const; | | Bool_t SliceCrossingIn(Double_t *point, Double_t *dir, In
t_t ipl, Int_t nphi, Int_t *iphi, Double_t *sphi, Double_t &snext, Double_t
stepmax) const; | |
| Bool_t SliceCrossingZ(Double_t *point, Double_t *dir, Int
_t nphi, Int_t *iphi, Double_t *sphi, Double_t &snext, Double_t stepmax) co
nst; | | Bool_t SliceCrossingZ(Double_t *point, Double_t *dir, Int
_t nphi, Int_t *iphi, Double_t *sphi, Double_t &snext, Double_t stepmax) co
nst; | |
| Bool_t SliceCrossingInZ(Double_t *point, Double_t *dir, I
nt_t nphi, Int_t *iphi, Double_t *sphi, Double_t &snext, Double_t stepmax)
const; | | Bool_t SliceCrossingInZ(Double_t *point, Double_t *dir, I
nt_t nphi, Int_t *iphi, Double_t *sphi, Double_t &snext, Double_t stepmax)
const; | |
| | | | |
End of changes. 2 change blocks. |
| 1 lines changed or deleted | | 5 lines changed or added | |
|
| TGeoVoxelFinder.h | | TGeoVoxelFinder.h | |
|
| // @(#)root/geom:$Id: TGeoVoxelFinder.h 41341 2011-10-11 14:58:29Z agheata
$ | | // @(#)root/geom:$Id: TGeoVoxelFinder.h 42982 2012-02-13 10:21:23Z agheata
$ | |
| // Author: Andrei Gheata 04/02/02 | | // Author: Andrei Gheata 04/02/02 | |
| | | | |
| /************************************************************************* | | /************************************************************************* | |
| * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * | | * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * | |
| * All rights reserved. * | | * All rights reserved. * | |
| * * | | * * | |
| * For the licensing terms see $ROOTSYS/LICENSE. * | | * For the licensing terms see $ROOTSYS/LICENSE. * | |
| * For the list of contributors see $ROOTSYS/README/CREDITS. * | | * For the list of contributors see $ROOTSYS/README/CREDITS. * | |
| *************************************************************************/ | | *************************************************************************/ | |
| | | | |
| #ifndef ROOT_TGeoVoxelFinder | | #ifndef ROOT_TGeoVoxelFinder | |
| #define ROOT_TGeoVoxelFinder | | #define ROOT_TGeoVoxelFinder | |
| | | | |
| #ifndef ROOT_TObject | | #ifndef ROOT_TObject | |
| #include "TObject.h" | | #include "TObject.h" | |
| #endif | | #endif | |
| | | | |
| class TGeoVolume; | | class TGeoVolume; | |
|
| | | struct TGeoStateInfo; | |
| | | | |
| /************************************************************************* | | /************************************************************************* | |
| * TGeoVoxelFinder - finder class handling voxels | | * TGeoVoxelFinder - finder class handling voxels | |
| * | | * | |
| *************************************************************************/ | | *************************************************************************/ | |
| | | | |
| class TGeoVoxelFinder : public TObject | | class TGeoVoxelFinder : public TObject | |
| { | | { | |
| public: | | public: | |
| enum EVoxelsType { | | enum EVoxelsType { | |
| kGeoInvalidVoxels = BIT(15), | | kGeoInvalidVoxels = BIT(15), | |
| kGeoRebuildVoxels = BIT(16) | | kGeoRebuildVoxels = BIT(16) | |
| }; | | }; | |
|
| struct ThreadData_t | | | |
| { | | | |
| Int_t fNcandidates; //! number of candidates | | | |
| Int_t fCurrentVoxel; //! index of current voxel in sorted | | | |
| list | | | |
| Int_t *fCheckList; //! list of candidates | | | |
| UChar_t *fBits1; //! bits used for list intersection | | | |
| | | | |
| Int_t fSlices[3]; //! slice indices for current voxel | | | |
| Int_t fInc[3]; //! slice index increment | | | |
| Double_t fInvdir[3]; //! 1/current director cosines | | | |
| Double_t fLimits[3]; //! limits on X,Y,Z | | | |
| | | | |
| ThreadData_t(); | | | |
| ~ThreadData_t(); | | | |
| }; | | | |
| ThreadData_t& GetThreadData(Int_t tid=0) const; | | | |
| void ClearThreadData() const; | | | |
| | | | |
| protected: | | protected: | |
| TGeoVolume *fVolume; // volume to which applies | | TGeoVolume *fVolume; // volume to which applies | |
| | | | |
| Int_t fIbx; // number of different boundaries on
X axis | | Int_t fIbx; // number of different boundaries on
X axis | |
| Int_t fIby; // number of different boundaries on
Y axis | | Int_t fIby; // number of different boundaries on
Y axis | |
| Int_t fIbz; // number of different boundaries on
Z axis | | Int_t fIbz; // number of different boundaries on
Z axis | |
| Int_t fNboxes; // length of boxes array | | Int_t fNboxes; // length of boxes array | |
| Int_t fNox; // length of array of X offsets | | Int_t fNox; // length of array of X offsets | |
| Int_t fNoy; // length of array of Y offsets | | Int_t fNoy; // length of array of Y offsets | |
| | | | |
| skipping to change at line 88 | | skipping to change at line 72 | |
| Int_t *fExtraX; //[fNex] indices of extra daughters i
n X slices | | Int_t *fExtraX; //[fNex] indices of extra daughters i
n X slices | |
| Int_t *fExtraY; //[fNey] indices of extra daughters i
n Y slices | | Int_t *fExtraY; //[fNey] indices of extra daughters i
n Y slices | |
| Int_t *fExtraZ; //[fNez] indices of extra daughters i
n Z slices | | Int_t *fExtraZ; //[fNez] indices of extra daughters i
n Z slices | |
| Int_t *fNsliceX; //[fNox] number of candidates in X sl
ice | | Int_t *fNsliceX; //[fNox] number of candidates in X sl
ice | |
| Int_t *fNsliceY; //[fNoy] number of candidates in Y sl
ice | | Int_t *fNsliceY; //[fNoy] number of candidates in Y sl
ice | |
| Int_t *fNsliceZ; //[fNoz] number of candidates in Z sl
ice | | Int_t *fNsliceZ; //[fNoz] number of candidates in Z sl
ice | |
| UChar_t *fIndcX; //[fNx] array of slices bits on X | | UChar_t *fIndcX; //[fNx] array of slices bits on X | |
| UChar_t *fIndcY; //[fNy] array of slices bits on Y | | UChar_t *fIndcY; //[fNy] array of slices bits on Y | |
| UChar_t *fIndcZ; //[fNz] array of slices bits on Z | | UChar_t *fIndcZ; //[fNz] array of slices bits on Z | |
| | | | |
|
| mutable std::vector<ThreadData_t*> fThreadData; //! | | | |
| mutable Int_t fThreadSize; //! | | | |
| | | | |
| TGeoVoxelFinder(const TGeoVoxelFinder&); | | TGeoVoxelFinder(const TGeoVoxelFinder&); | |
| TGeoVoxelFinder& operator=(const TGeoVoxelFinder&); | | TGeoVoxelFinder& operator=(const TGeoVoxelFinder&); | |
| | | | |
| void BuildVoxelLimits(); | | void BuildVoxelLimits(); | |
| Int_t *GetExtraX(Int_t islice, Bool_t left, Int_t &nextra)
const; | | Int_t *GetExtraX(Int_t islice, Bool_t left, Int_t &nextra)
const; | |
| Int_t *GetExtraY(Int_t islice, Bool_t left, Int_t &nextra)
const; | | Int_t *GetExtraY(Int_t islice, Bool_t left, Int_t &nextra)
const; | |
| Int_t *GetExtraZ(Int_t islice, Bool_t left, Int_t &nextra)
const; | | Int_t *GetExtraZ(Int_t islice, Bool_t left, Int_t &nextra)
const; | |
|
| Bool_t GetIndices(Double_t *point, Int_t tid=0); | | Bool_t GetIndices(Double_t *point, TGeoStateInfo &td); | |
| Int_t GetPriority(Int_t iaxis) const {return fPriority[iax
is];} | | Int_t GetPriority(Int_t iaxis) const {return fPriority[iax
is];} | |
|
| Int_t GetNcandidates(Int_t tid=0) const; | | Int_t GetNcandidates( TGeoStateInfo &td) const; | |
| Int_t *GetValidExtra(Int_t *list, Int_t &ncheck, Int_t tid= | | Int_t *GetValidExtra(Int_t *list, Int_t &ncheck, TGeoStateI | |
| 0); | | nfo &td); | |
| Int_t *GetValidExtra(Int_t n1, UChar_t *array1, Int_t *list | | Int_t *GetValidExtra(Int_t n1, UChar_t *array1, Int_t *list | |
| , Int_t &ncheck, Int_t tid=0); | | , Int_t &ncheck, TGeoStateInfo &td); | |
| Int_t *GetValidExtra(Int_t n1, UChar_t *array1, Int_t n2, U | | Int_t *GetValidExtra(Int_t n1, UChar_t *array1, Int_t n2, U | |
| Char_t *array2, Int_t *list, Int_t &ncheck, Int_t tid=0); | | Char_t *array2, Int_t *list, Int_t &ncheck, TGeoStateInfo &td); | |
| Int_t *GetVoxelCandidates(Int_t i, Int_t j, Int_t k, Int_t | | Int_t *GetVoxelCandidates(Int_t i, Int_t j, Int_t k, Int_t | |
| &ncheck, Int_t tid=0); | | &ncheck, TGeoStateInfo &td); | |
| // Bool_t Intersect(Int_t n1, Int_t *array1, Int_t n2, Int_t | | | |
| *array2, | | | |
| // Int_t n3, Int_t *array3, Int_t &nf, Int_t *r | | | |
| esult); | | | |
| Bool_t Intersect(Int_t n1, UChar_t *array1, Int_t &nf, Int_
t *result); | | Bool_t Intersect(Int_t n1, UChar_t *array1, Int_t &nf, Int_
t *result); | |
| Bool_t Intersect(Int_t n1, UChar_t *array1, Int_t n2, UChar
_t *array2, | | Bool_t Intersect(Int_t n1, UChar_t *array1, Int_t n2, UChar
_t *array2, | |
| Int_t &nf, Int_t *result); | | Int_t &nf, Int_t *result); | |
| Bool_t Intersect(Int_t n1, UChar_t *array1, Int_t n2, UChar
_t *array2, | | Bool_t Intersect(Int_t n1, UChar_t *array1, Int_t n2, UChar
_t *array2, | |
| Int_t n3, UChar_t *array3, Int_t &nf, Int_t *r
esult); | | Int_t n3, UChar_t *array3, Int_t &nf, Int_t *r
esult); | |
|
| // void IntersectAndStore(Int_t n1, Int_t *array1, Int_t n | | Bool_t IntersectAndStore(Int_t n1, UChar_t *array1, TGeoSta | |
| 2, Int_t *array2, | | teInfo &td); | |
| // Int_t n3, Int_t *array3); | | Bool_t IntersectAndStore(Int_t n1, UChar_t *array1, Int_t n | |
| Bool_t IntersectAndStore(Int_t n1, UChar_t *array1, Int_t t | | 2, UChar_t *array2, TGeoStateInfo &td); | |
| id=0); | | | |
| Bool_t IntersectAndStore(Int_t n1, UChar_t *array1, Int_t n | | | |
| 2, UChar_t *array2, Int_t tid=0); | | | |
| Bool_t IntersectAndStore(Int_t n1, UChar_t *array1, Int_t n
2, UChar_t *array2, | | Bool_t IntersectAndStore(Int_t n1, UChar_t *array1, Int_t n
2, UChar_t *array2, | |
|
| Int_t n3, UChar_t *array3, Int_t tid=0); | | Int_t n3, UChar_t *array3, TGeoStateInfo &td); | |
| void SortAll(Option_t *option=""); | | void SortAll(Option_t *option=""); | |
|
| // Bool_t Union(Int_t n1, Int_t *array1, Int_t n2, Int_t *ar | | Bool_t Union(Int_t n1, UChar_t *array1, TGeoStateInfo &td); | |
| ray2, | | Bool_t Union(Int_t n1, UChar_t *array1, Int_t n2, UChar_t * | |
| // Int_t n3, Int_t *array3); | | array2, TGeoStateInfo &td); | |
| Bool_t Union(Int_t n1, UChar_t *array1, Int_t tid=0); | | | |
| Bool_t Union(Int_t n1, UChar_t *array1, Int_t n2, UChar_t * | | | |
| array2, Int_t tid=0); | | | |
| Bool_t Union(Int_t n1, UChar_t *array1, Int_t n2, UChar_t *
array2, | | Bool_t Union(Int_t n1, UChar_t *array1, Int_t n2, UChar_t *
array2, | |
|
| Int_t n3, UChar_t *array3, Int_t tid=0); | | Int_t n3, UChar_t *array3, TGeoStateInfo &td); | |
| public : | | public : | |
| TGeoVoxelFinder(); | | TGeoVoxelFinder(); | |
| TGeoVoxelFinder(TGeoVolume *vol); | | TGeoVoxelFinder(TGeoVolume *vol); | |
| virtual ~TGeoVoxelFinder(); | | virtual ~TGeoVoxelFinder(); | |
|
| virtual void CreateCheckList(Int_t tid=0); | | | |
| void DaughterToMother(Int_t id, Double_t *local, Double_t
*master) const; | | void DaughterToMother(Int_t id, Double_t *local, Double_t
*master) const; | |
| virtual Double_t Efficiency(); | | virtual Double_t Efficiency(); | |
|
| virtual Int_t *GetCheckList(Double_t *point, Int_t &nelem, Int_t ti | | virtual Int_t *GetCheckList(Double_t *point, Int_t &nelem, TGeoStat | |
| d=0); | | eInfo &td); | |
| Int_t *GetCheckList(Int_t &nelem, Int_t tid=0) const; | | Int_t *GetCheckList(Int_t &nelem, TGeoStateInfo &td) const; | |
| // virtual Bool_t GetNextIndices(Double_t *point, Double_t *dir); | | virtual Int_t *GetNextCandidates(Double_t *point, Int_t &ncheck, TG | |
| virtual Int_t *GetNextCandidates(Double_t *point, Int_t &ncheck, In | | eoStateInfo &td); | |
| t_t tid=0); | | | |
| virtual void FindOverlaps(Int_t inode) const; | | virtual void FindOverlaps(Int_t inode) const; | |
| Bool_t IsInvalid() const {return TObject::TestBit(kGeoInval
idVoxels);} | | Bool_t IsInvalid() const {return TObject::TestBit(kGeoInval
idVoxels);} | |
| Bool_t NeedRebuild() const {return TObject::TestBit(kGeoReb
uildVoxels);} | | Bool_t NeedRebuild() const {return TObject::TestBit(kGeoReb
uildVoxels);} | |
| Double_t *GetBoxes() const {return fBoxes;} | | Double_t *GetBoxes() const {return fBoxes;} | |
| Bool_t IsSafeVoxel(Double_t *point, Int_t inode, Double_t m
insafe) const; | | Bool_t IsSafeVoxel(Double_t *point, Int_t inode, Double_t m
insafe) const; | |
| virtual void Print(Option_t *option="") const; | | virtual void Print(Option_t *option="") const; | |
| void PrintVoxelLimits(Double_t *point) const; | | void PrintVoxelLimits(Double_t *point) const; | |
| void SetInvalid(Bool_t flag=kTRUE) {TObject::SetBit(kGeoI
nvalidVoxels, flag);} | | void SetInvalid(Bool_t flag=kTRUE) {TObject::SetBit(kGeoI
nvalidVoxels, flag);} | |
| void SetNeedRebuild(Bool_t flag=kTRUE) {TObject::SetBit(k
GeoRebuildVoxels, flag);} | | void SetNeedRebuild(Bool_t flag=kTRUE) {TObject::SetBit(k
GeoRebuildVoxels, flag);} | |
|
| virtual Int_t *GetNextVoxel(Double_t *point, Double_t *dir, Int_t & | | virtual Int_t *GetNextVoxel(Double_t *point, Double_t *dir, Int_t & | |
| ncheck, Int_t tid=0); | | ncheck, TGeoStateInfo &td); | |
| virtual void SortCrossedVoxels(Double_t *point, Double_t *dir, In | | virtual void SortCrossedVoxels(Double_t *point, Double_t *dir, TG | |
| t_t tid=0); | | eoStateInfo &td); | |
| virtual void Voxelize(Option_t *option=""); | | virtual void Voxelize(Option_t *option=""); | |
| | | | |
| ClassDef(TGeoVoxelFinder, 4) // voxel finder class | | ClassDef(TGeoVoxelFinder, 4) // voxel finder class | |
| }; | | }; | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 13 change blocks. |
| 62 lines changed or deleted | | 30 lines changed or added | |
|
| TH1.h | | TH1.h | |
|
| // @(#)root/hist:$Id: TH1.h 40378 2011-07-27 20:45:07Z pcanal $ | | // @(#)root/hist:$Id: TH1.h 42958 2012-02-10 14:47:09Z moneta $ | |
| // Author: Rene Brun 26/12/94 | | // Author: Rene Brun 26/12/94 | |
| | | | |
| /************************************************************************* | | /************************************************************************* | |
| * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * | | * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * | |
| * All rights reserved. * | | * All rights reserved. * | |
| * * | | * * | |
| * For the licensing terms see $ROOTSYS/LICENSE. * | | * For the licensing terms see $ROOTSYS/LICENSE. * | |
| * For the list of contributors see $ROOTSYS/README/CREDITS. * | | * For the list of contributors see $ROOTSYS/README/CREDITS. * | |
| *************************************************************************/ | | *************************************************************************/ | |
| | | | |
| | | | |
| skipping to change at line 78 | | skipping to change at line 78 | |
| class TDirectory; | | class TDirectory; | |
| class TList; | | class TList; | |
| class TCollection; | | class TCollection; | |
| class TVirtualFFT; | | class TVirtualFFT; | |
| class TVirtualHistPainter; | | class TVirtualHistPainter; | |
| | | | |
| #include "TFitResultPtr.h" | | #include "TFitResultPtr.h" | |
| | | | |
| class TH1 : public TNamed, public TAttLine, public TAttFill, public TAttMar
ker { | | class TH1 : public TNamed, public TAttLine, public TAttFill, public TAttMar
ker { | |
| | | | |
|
| | | public: | |
| | | | |
| | | // enumeration specifying type of statistics for bin errors | |
| | | enum EBinErrorOpt { | |
| | | kNormal = 0, // errors with Normal (Wald) approximation: errorU | |
| | | p=errorLow= sqrt(N) | |
| | | kPoisson = 1 , // errors from Poisson interval at 68.3% (1 sigma) | |
| | | kPoisson2 = 2 // errors from Poisson interval at 95% CL (~ 2 sig | |
| | | ma) | |
| | | }; | |
| | | | |
| protected: | | protected: | |
| Int_t fNcells; //number of bins(1D), cells (2D) +U/Ove
rflows | | Int_t fNcells; //number of bins(1D), cells (2D) +U/Ove
rflows | |
| TAxis fXaxis; //X axis descriptor | | TAxis fXaxis; //X axis descriptor | |
| TAxis fYaxis; //Y axis descriptor | | TAxis fYaxis; //Y axis descriptor | |
| TAxis fZaxis; //Z axis descriptor | | TAxis fZaxis; //Z axis descriptor | |
| Short_t fBarOffset; //(1000*offset) for bar charts or legos | | Short_t fBarOffset; //(1000*offset) for bar charts or legos | |
| Short_t fBarWidth; //(1000*width) for bar charts or legos | | Short_t fBarWidth; //(1000*width) for bar charts or legos | |
| Double_t fEntries; //Number of entries | | Double_t fEntries; //Number of entries | |
| Double_t fTsumw; //Total Sum of weights | | Double_t fTsumw; //Total Sum of weights | |
| Double_t fTsumw2; //Total Sum of squares of weights | | Double_t fTsumw2; //Total Sum of squares of weights | |
| | | | |
| skipping to change at line 103 | | skipping to change at line 112 | |
| TArrayD fContour; //Array to display contour levels | | TArrayD fContour; //Array to display contour levels | |
| TArrayD fSumw2; //Array of sum of squares of weights | | TArrayD fSumw2; //Array of sum of squares of weights | |
| TString fOption; //histogram options | | TString fOption; //histogram options | |
| TList *fFunctions; //->Pointer to list of functions (fits
and user) | | TList *fFunctions; //->Pointer to list of functions (fits
and user) | |
| Int_t fBufferSize; //fBuffer size | | Int_t fBufferSize; //fBuffer size | |
| Double_t *fBuffer; //[fBufferSize] entry buffer | | Double_t *fBuffer; //[fBufferSize] entry buffer | |
| TDirectory *fDirectory; //!Pointer to directory holding this hi
stogram | | TDirectory *fDirectory; //!Pointer to directory holding this hi
stogram | |
| Int_t fDimension; //!Histogram dimension (1, 2 or 3 dim) | | Int_t fDimension; //!Histogram dimension (1, 2 or 3 dim) | |
| Double_t *fIntegral; //!Integral of bins used by GetRandom | | Double_t *fIntegral; //!Integral of bins used by GetRandom | |
| TVirtualHistPainter *fPainter; //!pointer to histogram painter | | TVirtualHistPainter *fPainter; //!pointer to histogram painter | |
|
| | | EBinErrorOpt fBinStatErrOpt; //option for bin statistical errors | |
| static Int_t fgBufferSize; //!default buffer size for automatic hi
stograms | | static Int_t fgBufferSize; //!default buffer size for automatic hi
stograms | |
| static Bool_t fgAddDirectory; //!flag to add histograms to the direct
ory | | static Bool_t fgAddDirectory; //!flag to add histograms to the direct
ory | |
| static Bool_t fgStatOverflows; //!flag to use under/overflows in stati
stics | | static Bool_t fgStatOverflows; //!flag to use under/overflows in stati
stics | |
| static Bool_t fgDefaultSumw2; //!flag to call TH1::Sumw2 automaticall
y at histogram creation time | | static Bool_t fgDefaultSumw2; //!flag to call TH1::Sumw2 automaticall
y at histogram creation time | |
| | | | |
| public: | | public: | |
| static Int_t FitOptionsMake(Option_t *option, Foption_t &Foption); | | static Int_t FitOptionsMake(Option_t *option, Foption_t &Foption); | |
| | | | |
| private: | | private: | |
| Int_t AxisChoice(Option_t *axis) const; | | Int_t AxisChoice(Option_t *axis) const; | |
| | | | |
| skipping to change at line 237 | | skipping to change at line 247 | |
| | | | |
| virtual Int_t GetBin(Int_t binx, Int_t biny=0, Int_t binz=0) const; | | virtual Int_t GetBin(Int_t binx, Int_t biny=0, Int_t binz=0) const; | |
| virtual void GetBinXYZ(Int_t binglobal, Int_t &binx, Int_t &biny, In
t_t &binz) const; | | virtual void GetBinXYZ(Int_t binglobal, Int_t &binx, Int_t &biny, In
t_t &binz) const; | |
| virtual Double_t GetBinCenter(Int_t bin) const {return fXaxis.GetBinCent
er(bin);} | | virtual Double_t GetBinCenter(Int_t bin) const {return fXaxis.GetBinCent
er(bin);} | |
| virtual Double_t GetBinContent(Int_t bin) const; | | virtual Double_t GetBinContent(Int_t bin) const; | |
| virtual Double_t GetBinContent(Int_t binx, Int_t biny) const; | | virtual Double_t GetBinContent(Int_t binx, Int_t biny) const; | |
| virtual Double_t GetBinContent(Int_t binx, Int_t biny, Int_t binz) const
; | | virtual Double_t GetBinContent(Int_t binx, Int_t biny, Int_t binz) const
; | |
| virtual Double_t GetBinError(Int_t bin) const; | | virtual Double_t GetBinError(Int_t bin) const; | |
| virtual Double_t GetBinError(Int_t binx, Int_t biny) const; | | virtual Double_t GetBinError(Int_t binx, Int_t biny) const; | |
| virtual Double_t GetBinError(Int_t binx, Int_t biny, Int_t binz) const; | | virtual Double_t GetBinError(Int_t binx, Int_t biny, Int_t binz) const; | |
|
| | | virtual Double_t GetBinErrorLow(Int_t bin) const; | |
| | | virtual Double_t GetBinErrorUp(Int_t bin) const; | |
| | | virtual EBinErrorOpt GetBinErrorOption() const { return fBinStatErrOpt; | |
| | | } | |
| virtual Double_t GetBinLowEdge(Int_t bin) const {return fXaxis.GetBinLow
Edge(bin);} | | virtual Double_t GetBinLowEdge(Int_t bin) const {return fXaxis.GetBinLow
Edge(bin);} | |
| virtual Double_t GetBinWidth(Int_t bin) const {return fXaxis.GetBinWidth
(bin);} | | virtual Double_t GetBinWidth(Int_t bin) const {return fXaxis.GetBinWidth
(bin);} | |
| virtual Double_t GetBinWithContent(Double_t c, Int_t &binx, Int_t firstx
=0, Int_t lastx=0,Double_t maxdiff=0) const; | | virtual Double_t GetBinWithContent(Double_t c, Int_t &binx, Int_t firstx
=0, Int_t lastx=0,Double_t maxdiff=0) const; | |
| virtual Double_t GetCellContent(Int_t binx, Int_t biny) const; | | virtual Double_t GetCellContent(Int_t binx, Int_t biny) const; | |
| virtual Double_t GetCellError(Int_t binx, Int_t biny) const; | | virtual Double_t GetCellError(Int_t binx, Int_t biny) const; | |
| virtual void GetCenter(Double_t *center) const {fXaxis.GetCenter(cen
ter);} | | virtual void GetCenter(Double_t *center) const {fXaxis.GetCenter(cen
ter);} | |
| static Bool_t GetDefaultSumw2(); | | static Bool_t GetDefaultSumw2(); | |
| TDirectory *GetDirectory() const {return fDirectory;} | | TDirectory *GetDirectory() const {return fDirectory;} | |
| virtual Double_t GetEntries() const; | | virtual Double_t GetEntries() const; | |
| virtual Double_t GetEffectiveEntries() const; | | virtual Double_t GetEffectiveEntries() const; | |
| | | | |
| skipping to change at line 329 | | skipping to change at line 342 | |
| virtual void SetBinError(Int_t binx, Int_t biny, Int_t binz, Double_
t error); | | virtual void SetBinError(Int_t binx, Int_t biny, Int_t binz, Double_
t error); | |
| virtual void SetBins(Int_t nx, Double_t xmin, Double_t xmax); | | virtual void SetBins(Int_t nx, Double_t xmin, Double_t xmax); | |
| virtual void SetBins(Int_t nx, const Double_t *xBins); | | virtual void SetBins(Int_t nx, const Double_t *xBins); | |
| virtual void SetBins(Int_t nx, Double_t xmin, Double_t xmax, Int_t n
y, Double_t ymin, Double_t ymax); | | virtual void SetBins(Int_t nx, Double_t xmin, Double_t xmax, Int_t n
y, Double_t ymin, Double_t ymax); | |
| virtual void SetBins(Int_t nx, const Double_t *xBins, Int_t ny, cons
t Double_t *yBins); | | virtual void SetBins(Int_t nx, const Double_t *xBins, Int_t ny, cons
t Double_t *yBins); | |
| virtual void SetBins(Int_t nx, Double_t xmin, Double_t xmax, Int_t n
y, Double_t ymin, Double_t ymax, | | virtual void SetBins(Int_t nx, Double_t xmin, Double_t xmax, Int_t n
y, Double_t ymin, Double_t ymax, | |
| Int_t nz, Double_t zmin, Double_t zmax); | | Int_t nz, Double_t zmin, Double_t zmax); | |
| virtual void SetBins(Int_t nx, const Double_t *xBins, Int_t ny, cons
t Double_t * yBins, Int_t nz, | | virtual void SetBins(Int_t nx, const Double_t *xBins, Int_t ny, cons
t Double_t * yBins, Int_t nz, | |
| const Double_t *zBins); | | const Double_t *zBins); | |
| virtual void SetBinsLength(Int_t = -1) { } //redefined in derived cl
asses | | virtual void SetBinsLength(Int_t = -1) { } //redefined in derived cl
asses | |
|
| | | virtual void SetBinErrorOption(EBinErrorOpt type) { fBinStatErrOpt =
type; } | |
| virtual void SetBuffer(Int_t buffersize, Option_t *option=""); | | virtual void SetBuffer(Int_t buffersize, Option_t *option=""); | |
| virtual void SetCellContent(Int_t binx, Int_t biny, Double_t content
); | | virtual void SetCellContent(Int_t binx, Int_t biny, Double_t content
); | |
| virtual void SetCellError(Int_t binx, Int_t biny, Double_t content); | | virtual void SetCellError(Int_t binx, Int_t biny, Double_t content); | |
| virtual void SetContent(const Double_t *content); | | virtual void SetContent(const Double_t *content); | |
| virtual void SetContour(Int_t nlevels, const Double_t *levels=0); | | virtual void SetContour(Int_t nlevels, const Double_t *levels=0); | |
| virtual void SetContourLevel(Int_t level, Double_t value); | | virtual void SetContourLevel(Int_t level, Double_t value); | |
| static void SetDefaultBufferSize(Int_t buffersize=1000); | | static void SetDefaultBufferSize(Int_t buffersize=1000); | |
| static void SetDefaultSumw2(Bool_t sumw2=kTRUE); | | static void SetDefaultSumw2(Bool_t sumw2=kTRUE); | |
| virtual void SetDirectory(TDirectory *dir); | | virtual void SetDirectory(TDirectory *dir); | |
| virtual void SetEntries(Double_t n) {fEntries = n;}; | | virtual void SetEntries(Double_t n) {fEntries = n;}; | |
| | | | |
| skipping to change at line 370 | | skipping to change at line 384 | |
| virtual void SetZTitle(const char *title) {fZaxis.SetTitle(title);} | | virtual void SetZTitle(const char *title) {fZaxis.SetTitle(title);} | |
| virtual TH1 *ShowBackground(Int_t niter=20, Option_t *option="same")
; // *MENU* | | virtual TH1 *ShowBackground(Int_t niter=20, Option_t *option="same")
; // *MENU* | |
| virtual Int_t ShowPeaks(Double_t sigma=2, Option_t *option="", Double
_t threshold=0.05); // *MENU* | | virtual Int_t ShowPeaks(Double_t sigma=2, Option_t *option="", Double
_t threshold=0.05); // *MENU* | |
| virtual void Smooth(Int_t ntimes=1, Option_t *option=""); // *MENU* | | virtual void Smooth(Int_t ntimes=1, Option_t *option=""); // *MENU* | |
| static void SmoothArray(Int_t NN, Double_t *XX, Int_t ntimes=1); | | static void SmoothArray(Int_t NN, Double_t *XX, Int_t ntimes=1); | |
| static void StatOverflows(Bool_t flag=kTRUE); | | static void StatOverflows(Bool_t flag=kTRUE); | |
| virtual void Sumw2(); | | virtual void Sumw2(); | |
| void UseCurrentStyle(); | | void UseCurrentStyle(); | |
| static TH1 *TransformHisto(TVirtualFFT *fft, TH1* h_output, Option
_t *option); | | static TH1 *TransformHisto(TVirtualFFT *fft, TH1* h_output, Option
_t *option); | |
| | | | |
|
| ClassDef(TH1,6) //1-Dim histogram base class | | ClassDef(TH1,7) //1-Dim histogram base class | |
| }; | | }; | |
| | | | |
| //________________________________________________________________________ | | //________________________________________________________________________ | |
| | | | |
| class TH1C : public TH1, public TArrayC { | | class TH1C : public TH1, public TArrayC { | |
| | | | |
| public: | | public: | |
| TH1C(); | | TH1C(); | |
| TH1C(const char *name,const char *title,Int_t nbinsx,Double_t xlow,Doubl
e_t xup); | | TH1C(const char *name,const char *title,Int_t nbinsx,Double_t xlow,Doubl
e_t xup); | |
| TH1C(const char *name,const char *title,Int_t nbinsx,const Float_t *xbi
ns); | | TH1C(const char *name,const char *title,Int_t nbinsx,const Float_t *xbi
ns); | |
| | | | |
End of changes. 6 change blocks. |
| 2 lines changed or deleted | | 19 lines changed or added | |
|
| TH2.h | | TH2.h | |
|
| // @(#)root/hist:$Id: TH2.h 40378 2011-07-27 20:45:07Z pcanal $ | | // @(#)root/hist:$Id: TH2.h 42958 2012-02-10 14:47:09Z moneta $ | |
| // Author: Rene Brun 26/12/94 | | // Author: Rene Brun 26/12/94 | |
| | | | |
| /************************************************************************* | | /************************************************************************* | |
| * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * | | * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * | |
| * All rights reserved. * | | * All rights reserved. * | |
| * * | | * * | |
| * For the licensing terms see $ROOTSYS/LICENSE. * | | * For the licensing terms see $ROOTSYS/LICENSE. * | |
| * For the list of contributors see $ROOTSYS/README/CREDITS. * | | * For the list of contributors see $ROOTSYS/README/CREDITS. * | |
| *************************************************************************/ | | *************************************************************************/ | |
| | | | |
| | | | |
| skipping to change at line 82 | | skipping to change at line 82 | |
| virtual Int_t Fill(const char *namex, const char *namey, Double_t w); | | virtual Int_t Fill(const char *namex, const char *namey, Double_t w); | |
| virtual void FillN(Int_t, const Double_t *, const Double_t *, Int_t)
{;} //MayNotUse | | virtual void FillN(Int_t, const Double_t *, const Double_t *, Int_t)
{;} //MayNotUse | |
| virtual void FillN(Int_t ntimes, const Double_t *x, const Double_t *
y, const Double_t *w, Int_t stride=1); | | virtual void FillN(Int_t ntimes, const Double_t *x, const Double_t *
y, const Double_t *w, Int_t stride=1); | |
| virtual void FillRandom(const char *fname, Int_t ntimes=5000); | | virtual void FillRandom(const char *fname, Int_t ntimes=5000); | |
| virtual void FillRandom(TH1 *h, Int_t ntimes=5000); | | virtual void FillRandom(TH1 *h, Int_t ntimes=5000); | |
| virtual Int_t FindFirstBinAbove(Double_t threshold=0, Int_t axis=1) c
onst; | | virtual Int_t FindFirstBinAbove(Double_t threshold=0, Int_t axis=1) c
onst; | |
| virtual Int_t FindLastBinAbove (Double_t threshold=0, Int_t axis=1) c
onst; | | virtual Int_t FindLastBinAbove (Double_t threshold=0, Int_t axis=1) c
onst; | |
| virtual void FitSlicesX(TF1 *f1=0,Int_t firstybin=0, Int_t lastybin=
-1, Int_t cut=0, Option_t *option="QNR", TObjArray* arr = 0); // *MENU* | | virtual void FitSlicesX(TF1 *f1=0,Int_t firstybin=0, Int_t lastybin=
-1, Int_t cut=0, Option_t *option="QNR", TObjArray* arr = 0); // *MENU* | |
| virtual void FitSlicesY(TF1 *f1=0,Int_t firstxbin=0, Int_t lastxbin=
-1, Int_t cut=0, Option_t *option="QNR", TObjArray* arr = 0); // *MENU* | | virtual void FitSlicesY(TF1 *f1=0,Int_t firstxbin=0, Int_t lastxbin=
-1, Int_t cut=0, Option_t *option="QNR", TObjArray* arr = 0); // *MENU* | |
| virtual Double_t GetBinWithContent2(Double_t c, Int_t &binx, Int_t &biny
, Int_t firstxbin=1, Int_t lastxbin=-1,Int_t firstybin=1, Int_t lastybin=-1
, Double_t maxdiff=0) const; | | virtual Double_t GetBinWithContent2(Double_t c, Int_t &binx, Int_t &biny
, Int_t firstxbin=1, Int_t lastxbin=-1,Int_t firstybin=1, Int_t lastybin=-1
, Double_t maxdiff=0) const; | |
|
| | | using TH1::GetBinErrorLow; | |
| | | using TH1::GetBinErrorUp; | |
| | | virtual Double_t GetBinErrorLow(Int_t binx, Int_t biny) { return TH1::Ge | |
| | | tBinErrorLow( GetBin(binx, biny) ); } | |
| | | virtual Double_t GetBinErrorUp(Int_t binx, Int_t biny) { return TH1::Get | |
| | | BinErrorUp( GetBin(binx, biny) ); } | |
| virtual Double_t GetCorrelationFactor(Int_t axis1=1,Int_t axis2=2) const
; | | virtual Double_t GetCorrelationFactor(Int_t axis1=1,Int_t axis2=2) const
; | |
| virtual Double_t GetCovariance(Int_t axis1=1,Int_t axis2=2) const; | | virtual Double_t GetCovariance(Int_t axis1=1,Int_t axis2=2) const; | |
| virtual void GetRandom2(Double_t &x, Double_t &y); | | virtual void GetRandom2(Double_t &x, Double_t &y); | |
| virtual void GetStats(Double_t *stats) const; | | virtual void GetStats(Double_t *stats) const; | |
| virtual Double_t Integral(Option_t *option="") const; | | virtual Double_t Integral(Option_t *option="") const; | |
| //virtual Double_t Integral(Int_t, Int_t, Option_t * ="") const {return
0;} | | //virtual Double_t Integral(Int_t, Int_t, Option_t * ="") const {return
0;} | |
| using TH1::Integral; | | using TH1::Integral; | |
| virtual Double_t Integral(Int_t binx1, Int_t binx2, Int_t biny1, Int_t b
iny2, Option_t *option="") const; | | virtual Double_t Integral(Int_t binx1, Int_t binx2, Int_t biny1, Int_t b
iny2, Option_t *option="") const; | |
| virtual Double_t Integral(Int_t, Int_t, Int_t, Int_t, Int_t, Int_t, Opti
on_t * ="") const {return 0;} | | virtual Double_t Integral(Int_t, Int_t, Int_t, Int_t, Int_t, Int_t, Opti
on_t * ="") const {return 0;} | |
| using TH1::IntegralAndError; | | using TH1::IntegralAndError; | |
| | | | |
| skipping to change at line 107 | | skipping to change at line 111 | |
| virtual Long64_t Merge(TCollection *list); | | virtual Long64_t Merge(TCollection *list); | |
| virtual TH2 *RebinX(Int_t ngroup=2, const char *newname=""); | | virtual TH2 *RebinX(Int_t ngroup=2, const char *newname=""); | |
| virtual TH2 *RebinY(Int_t ngroup=2, const char *newname=""); | | virtual TH2 *RebinY(Int_t ngroup=2, const char *newname=""); | |
| virtual TH2 *Rebin2D(Int_t nxgroup=2, Int_t nygroup=2, const char *n
ewname=""); | | virtual TH2 *Rebin2D(Int_t nxgroup=2, Int_t nygroup=2, const char *n
ewname=""); | |
| TProfile *ProfileX(const char *name="_pfx", Int_t firstybin=1, In
t_t lastybin=-1, Option_t *option="") const; // *MENU* | | TProfile *ProfileX(const char *name="_pfx", Int_t firstybin=1, In
t_t lastybin=-1, Option_t *option="") const; // *MENU* | |
| TProfile *ProfileY(const char *name="_pfy", Int_t firstxbin=1, In
t_t lastxbin=-1, Option_t *option="") const; // *MENU* | | TProfile *ProfileY(const char *name="_pfy", Int_t firstxbin=1, In
t_t lastxbin=-1, Option_t *option="") const; // *MENU* | |
| TH1D *ProjectionX(const char *name="_px", Int_t firstybin=0,
Int_t lastybin=-1, Option_t *option="") const; // *MENU* | | TH1D *ProjectionX(const char *name="_px", Int_t firstybin=0,
Int_t lastybin=-1, Option_t *option="") const; // *MENU* | |
| TH1D *ProjectionY(const char *name="_py", Int_t firstxbin=0,
Int_t lastxbin=-1, Option_t *option="") const; // *MENU* | | TH1D *ProjectionY(const char *name="_py", Int_t firstxbin=0,
Int_t lastxbin=-1, Option_t *option="") const; // *MENU* | |
| virtual void PutStats(Double_t *stats); | | virtual void PutStats(Double_t *stats); | |
| virtual void Reset(Option_t *option=""); | | virtual void Reset(Option_t *option=""); | |
|
| virtual void SetShowProjectionX(Int_t nbins); // *MENU* | | virtual void SetShowProjectionX(Int_t nbins=1); // *MENU* | |
| virtual void SetShowProjectionY(Int_t nbins); // *MENU* | | virtual void SetShowProjectionY(Int_t nbins=1); // *MENU* | |
| virtual TH1 *ShowBackground(Int_t niter=20, Option_t *option="same")
; | | virtual TH1 *ShowBackground(Int_t niter=20, Option_t *option="same")
; | |
| virtual Int_t ShowPeaks(Double_t sigma=2, Option_t *option="", Double
_t threshold=0.05); // *MENU* | | virtual Int_t ShowPeaks(Double_t sigma=2, Option_t *option="", Double
_t threshold=0.05); // *MENU* | |
| virtual void Smooth(Int_t ntimes=1, Option_t *option=""); // *MENU* | | virtual void Smooth(Int_t ntimes=1, Option_t *option=""); // *MENU* | |
| | | | |
| ClassDef(TH2,4) //2-Dim histogram base class | | ClassDef(TH2,4) //2-Dim histogram base class | |
| }; | | }; | |
| | | | |
| //_________________________________________________________________________
_____ | | //_________________________________________________________________________
_____ | |
| | | | |
| class TH2C : public TH2, public TArrayC { | | class TH2C : public TH2, public TArrayC { | |
| | | | |
End of changes. 3 change blocks. |
| 3 lines changed or deleted | | 9 lines changed or added | |
|
| TH3.h | | TH3.h | |
|
| // @(#)root/hist:$Id: TH3.h 40378 2011-07-27 20:45:07Z pcanal $ | | // @(#)root/hist:$Id: TH3.h 42958 2012-02-10 14:47:09Z moneta $ | |
| // Author: Rene Brun 27/10/95 | | // Author: Rene Brun 27/10/95 | |
| | | | |
| /************************************************************************* | | /************************************************************************* | |
| * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * | | * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * | |
| * All rights reserved. * | | * All rights reserved. * | |
| * * | | * * | |
| * For the licensing terms see $ROOTSYS/LICENSE. * | | * For the licensing terms see $ROOTSYS/LICENSE. * | |
| * For the list of contributors see $ROOTSYS/README/CREDITS. * | | * For the list of contributors see $ROOTSYS/README/CREDITS. * | |
| *************************************************************************/ | | *************************************************************************/ | |
| | | | |
| | | | |
| skipping to change at line 88 | | skipping to change at line 88 | |
| virtual Int_t Fill(Double_t x, const char *namey, const char *namez,
Double_t w); | | virtual Int_t Fill(Double_t x, const char *namey, const char *namez,
Double_t w); | |
| virtual Int_t Fill(Double_t x, const char *namey, Double_t z, Double_
t w); | | virtual Int_t Fill(Double_t x, const char *namey, Double_t z, Double_
t w); | |
| virtual Int_t Fill(Double_t x, Double_t y, const char *namez, Double_
t w); | | virtual Int_t Fill(Double_t x, Double_t y, const char *namez, Double_
t w); | |
| | | | |
| virtual void FillRandom(const char *fname, Int_t ntimes=5000); | | virtual void FillRandom(const char *fname, Int_t ntimes=5000); | |
| virtual void FillRandom(TH1 *h, Int_t ntimes=5000); | | virtual void FillRandom(TH1 *h, Int_t ntimes=5000); | |
| virtual Int_t FindFirstBinAbove(Double_t threshold=0, Int_t axis=1) c
onst; | | virtual Int_t FindFirstBinAbove(Double_t threshold=0, Int_t axis=1) c
onst; | |
| virtual Int_t FindLastBinAbove (Double_t threshold=0, Int_t axis=1) c
onst; | | virtual Int_t FindLastBinAbove (Double_t threshold=0, Int_t axis=1) c
onst; | |
| virtual void FitSlicesZ(TF1 *f1=0,Int_t binminx=1, Int_t binmaxx=0,I
nt_t binminy=1, Int_t binmaxy=0, | | virtual void FitSlicesZ(TF1 *f1=0,Int_t binminx=1, Int_t binmaxx=0,I
nt_t binminy=1, Int_t binmaxy=0, | |
| Int_t cut=0 ,Option_t *option="QNR"
); // *MENU* | | Int_t cut=0 ,Option_t *option="QNR"
); // *MENU* | |
|
| | | using TH1::GetBinErrorLow; | |
| | | using TH1::GetBinErrorUp; | |
| | | virtual Double_t GetBinErrorLow(Int_t binx, Int_t biny, Int_t binz) { re | |
| | | turn TH1::GetBinErrorLow( GetBin(binx, biny, binz) ); } | |
| | | virtual Double_t GetBinErrorUp(Int_t binx, Int_t biny, Int_t binz) { re | |
| | | turn TH1::GetBinErrorUp( GetBin(binx, biny, binz) ); } | |
| virtual Double_t GetBinWithContent3(Double_t c, Int_t &binx, Int_t &biny
, Int_t &binz, Int_t firstx=0, Int_t lastx=0,Int_t firsty=0, Int_t lasty=0,
Int_t firstz=0, Int_t lastz=0, Double_t maxdiff=0) const; | | virtual Double_t GetBinWithContent3(Double_t c, Int_t &binx, Int_t &biny
, Int_t &binz, Int_t firstx=0, Int_t lastx=0,Int_t firsty=0, Int_t lasty=0,
Int_t firstz=0, Int_t lastz=0, Double_t maxdiff=0) const; | |
| virtual Double_t GetCorrelationFactor(Int_t axis1=1,Int_t axis2=2) const
; | | virtual Double_t GetCorrelationFactor(Int_t axis1=1,Int_t axis2=2) const
; | |
| virtual Double_t GetCovariance(Int_t axis1=1,Int_t axis2=2) const; | | virtual Double_t GetCovariance(Int_t axis1=1,Int_t axis2=2) const; | |
| virtual void GetRandom3(Double_t &x, Double_t &y, Double_t &z); | | virtual void GetRandom3(Double_t &x, Double_t &y, Double_t &z); | |
| virtual void GetStats(Double_t *stats) const; | | virtual void GetStats(Double_t *stats) const; | |
| virtual Double_t Integral(Option_t *option="") const; | | virtual Double_t Integral(Option_t *option="") const; | |
| using TH1::Integral; | | using TH1::Integral; | |
| virtual Double_t Integral(Int_t binx1, Int_t binx2, Int_t biny1, Int_t b
iny2, Int_t binz1, Int_t binz2, Option_t *option="") const; | | virtual Double_t Integral(Int_t binx1, Int_t binx2, Int_t biny1, Int_t b
iny2, Int_t binz1, Int_t binz2, Option_t *option="") const; | |
| using TH1::IntegralAndError; | | using TH1::IntegralAndError; | |
| virtual Double_t IntegralAndError(Int_t binx1, Int_t binx2, Int_t biny1,
Int_t biny2, Int_t binz1, Int_t binz2, Double_t & err, Option_t *option=""
) const; | | virtual Double_t IntegralAndError(Int_t binx1, Int_t binx2, Int_t biny1,
Int_t biny2, Int_t binz1, Int_t binz2, Double_t & err, Option_t *option=""
) const; | |
| | | | |
End of changes. 2 change blocks. |
| 1 lines changed or deleted | | 7 lines changed or added | |
|
| THnSparse.h | | THnSparse.h | |
|
| // @(#)root/hist:$Id: THnSparse.h 41546 2011-10-24 14:42:42Z axel $ | | // @(#)root/hist:$Id: THnSparse.h 42758 2012-01-23 08:47:17Z axel $ | |
| // Author: Axel Naumann (2007-09-11) | | // Author: Axel Naumann (2007-09-11) | |
| | | | |
| /************************************************************************* | | /************************************************************************* | |
|
| * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. * | | * Copyright (C) 1995-2012, Rene Brun and Fons Rademakers. * | |
| * All rights reserved. * | | * All rights reserved. * | |
| * * | | * * | |
| * For the licensing terms see $ROOTSYS/LICENSE. * | | * For the licensing terms see $ROOTSYS/LICENSE. * | |
| * For the list of contributors see $ROOTSYS/README/CREDITS. * | | * For the list of contributors see $ROOTSYS/README/CREDITS. * | |
| *************************************************************************/ | | *************************************************************************/ | |
| | | | |
| #ifndef ROOT_THnSparse | | #ifndef ROOT_THnSparse | |
| #define ROOT_THnSparse | | #define ROOT_THnSparse | |
| | | | |
| /************************************************************************* | | /************************************************************************* | |
| | | | |
| THnSparse: histogramming multi-dimensional, sparse distributions in | | THnSparse: histogramming multi-dimensional, sparse distributions in | |
| a memory-efficient way. | | a memory-efficient way. | |
| | | | |
| *************************************************************************/ | | *************************************************************************/ | |
| | | | |
|
| | | #ifndef ROOT_THnBase | |
| | | #include "THnBase.h" | |
| | | #endif | |
| #ifndef ROOT_TExMap | | #ifndef ROOT_TExMap | |
| #include "TExMap.h" | | #include "TExMap.h" | |
| #endif | | #endif | |
|
| #ifndef ROOT_TNamed | | | |
| #include "TNamed.h" | | | |
| #endif | | | |
| #ifndef ROOT_TObjArray | | | |
| #include "TObjArray.h" | | | |
| #endif | | | |
| #ifndef ROOT_TArrayD | | | |
| #include "TArrayD.h" | | | |
| #endif | | | |
| #ifndef ROOT_TFitResultPtr | | | |
| #include "TFitResultPtr.h" | | | |
| #endif | | | |
| #ifndef ROOT_THnSparse_Internal | | #ifndef ROOT_THnSparse_Internal | |
| #include "THnSparse_Internal.h" | | #include "THnSparse_Internal.h" | |
| #endif | | #endif | |
| | | | |
| // needed only for template instantiations of THnSparseT: | | // needed only for template instantiations of THnSparseT: | |
| #ifndef ROOT_TArrayF | | #ifndef ROOT_TArrayF | |
| #include "TArrayF.h" | | #include "TArrayF.h" | |
| #endif | | #endif | |
| #ifndef ROOT_TArrayL | | #ifndef ROOT_TArrayL | |
| #include "TArrayL.h" | | #include "TArrayL.h" | |
| | | | |
| skipping to change at line 58 | | skipping to change at line 49 | |
| #ifndef ROOT_TArrayI | | #ifndef ROOT_TArrayI | |
| #include "TArrayI.h" | | #include "TArrayI.h" | |
| #endif | | #endif | |
| #ifndef ROOT_TArrayS | | #ifndef ROOT_TArrayS | |
| #include "TArrayS.h" | | #include "TArrayS.h" | |
| #endif | | #endif | |
| #ifndef ROOT_TArrayC | | #ifndef ROOT_TArrayC | |
| #include "TArrayC.h" | | #include "TArrayC.h" | |
| #endif | | #endif | |
| | | | |
|
| class TAxis; | | | |
| class TCollection; | | | |
| class TH1; | | | |
| class TH1D; | | | |
| class TH2D; | | | |
| class TH3D; | | | |
| class TF1; | | | |
| | | | |
| class THnSparseCompactBinCoord; | | class THnSparseCompactBinCoord; | |
| | | | |
|
| class THnSparse: public TNamed { | | class THnSparse: public THnBase { | |
| private: | | private: | |
|
| Int_t fNdimensions; // number of dimensions | | | |
| Int_t fChunkSize; // number of entries for each chunk | | Int_t fChunkSize; // number of entries for each chunk | |
| Long64_t fFilledBins; // number of filled bins | | Long64_t fFilledBins; // number of filled bins | |
|
| TObjArray fAxes; // axes of the histogram | | | |
| TObjArray fBrowsables; //! browser-helpers for each axis | | | |
| TObjArray fBinContent; // array of THnSparseArrayChunk | | TObjArray fBinContent; // array of THnSparseArrayChunk | |
| TExMap fBins; //! filled bins | | TExMap fBins; //! filled bins | |
| TExMap fBinsContinued;//! filled bins for non-unique hashes, contain
ing pairs of (bin index 0, bin index 1) | | TExMap fBinsContinued;//! filled bins for non-unique hashes, contain
ing pairs of (bin index 0, bin index 1) | |
|
| Double_t fEntries; // number of entries, spread over chunks | | | |
| Double_t fTsumw; // total sum of weights | | | |
| Double_t fTsumw2; // total sum of weights squared; -1 if no erro | | | |
| rs are calculated | | | |
| TArrayD fTsumwx; // total sum of weight*X for each dimension | | | |
| TArrayD fTsumwx2; // total sum of weight*X*X for each dimension | | | |
| THnSparseCompactBinCoord *fCompactCoord; //! compact coordinate | | THnSparseCompactBinCoord *fCompactCoord; //! compact coordinate | |
|
| Double_t *fIntegral; //! array with bin weight sums | | | |
| enum { | | | |
| kNoInt, | | | |
| kValidInt, | | | |
| kInvalidInt | | | |
| } fIntegralStatus; //! status of integral | | | |
| | | | |
| THnSparse(const THnSparse&); // Not implemented | | THnSparse(const THnSparse&); // Not implemented | |
| THnSparse& operator=(const THnSparse&); // Not implemented | | THnSparse& operator=(const THnSparse&); // Not implemented | |
| | | | |
| protected: | | protected: | |
| | | | |
| THnSparse(); | | THnSparse(); | |
| THnSparse(const char* name, const char* title, Int_t dim, | | THnSparse(const char* name, const char* title, Int_t dim, | |
| const Int_t* nbins, const Double_t* xmin, const Double_t* xmax
, | | const Int_t* nbins, const Double_t* xmin, const Double_t* xmax
, | |
| Int_t chunksize); | | Int_t chunksize); | |
|
| Int_t GetChunkSize() const { return fChunkSize; } | | | |
| THnSparseCompactBinCoord* GetCompactCoord() const; | | THnSparseCompactBinCoord* GetCompactCoord() const; | |
| THnSparseArrayChunk* GetChunk(Int_t idx) const { | | THnSparseArrayChunk* GetChunk(Int_t idx) const { | |
| return (THnSparseArrayChunk*) fBinContent[idx]; } | | return (THnSparseArrayChunk*) fBinContent[idx]; } | |
| | | | |
| THnSparseArrayChunk* AddChunk(); | | THnSparseArrayChunk* AddChunk(); | |
|
| | | void Reserve(Long64_t nbins); | |
| void FillExMap(); | | void FillExMap(); | |
| virtual TArray* GenerateArray() const = 0; | | virtual TArray* GenerateArray() const = 0; | |
| Long64_t GetBinIndexForCurrentBin(Bool_t allocate); | | Long64_t GetBinIndexForCurrentBin(Bool_t allocate); | |
|
| Long64_t Fill(Long64_t bin, Double_t w) { | | void FillBin(Long64_t bin, Double_t w) { | |
| // Increment the bin content of "bin" by "w", | | // Increment the bin content of "bin" by "w", | |
| // return the bin index. | | // return the bin index. | |
|
| fEntries += 1; | | | |
| if (GetCalculateErrors()) { | | | |
| fTsumw += w; | | | |
| fTsumw2 += w*w; | | | |
| } | | | |
| fIntegralStatus = kInvalidInt; | | | |
| THnSparseArrayChunk* chunk = GetChunk(bin / fChunkSize); | | THnSparseArrayChunk* chunk = GetChunk(bin / fChunkSize); | |
| chunk->AddBinContent(bin % fChunkSize, w); | | chunk->AddBinContent(bin % fChunkSize, w); | |
|
| return bin; | | FillBinBase(w); | |
| } | | } | |
|
| THnSparse* CloneEmpty(const char* name, const char* title, | | void InitStorage(Int_t* nbins, Int_t chunkSize); | |
| const TObjArray* axes, Int_t chunksize, | | | |
| Bool_t keepTargetAxis) const; | | | |
| | | | |
| Bool_t CheckConsistency(const THnSparse *h, const char *tag) const; | | | |
| Bool_t IsInRange(Int_t *coord) const; | | | |
| TH1* CreateHist(const char* name, const char* title, | | | |
| const TObjArray* axes, Bool_t keepTargetAxis) const; | | | |
| TObject* ProjectionAny(Int_t ndim, const Int_t* dim, | | | |
| Bool_t wantSparse, Option_t* option = "") const; | | | |
| Bool_t PrintBin(Long64_t idx, Int_t* coord, Option_t* options) const; | | | |
| void AddInternal(const THnSparse* h, Double_t c, Bool_t rebinned); | | | |
| | | | |
| public: | | public: | |
| virtual ~THnSparse(); | | virtual ~THnSparse(); | |
| | | | |
| static THnSparse* CreateSparse(const char* name, const char* title, | | static THnSparse* CreateSparse(const char* name, const char* title, | |
|
| const TH1* h1, Int_t ChunkSize = 1024 * 1 | | const TH1* h1, Int_t chunkSize = 1024 * 1 | |
| 6); | | 6) { | |
| | | return (THnSparse*) CreateHnAny(name, title, h1, kTRUE /*sparse*/, | |
| Int_t GetNChunks() const { return fBinContent.GetEntriesFast(); } | | chunkSize); | |
| TObjArray* GetListOfAxes() { return &fAxes; } | | | |
| TAxis* GetAxis(Int_t dim) const { return (TAxis*)fAxes[dim]; } | | | |
| | | | |
| Long64_t Fill(const Double_t *x, Double_t w = 1.) { | | | |
| if (GetCalculateErrors()) { | | | |
| for (Int_t d = 0; d < fNdimensions; ++d) { | | | |
| const Double_t xd = x[d]; | | | |
| fTsumwx[d] += w * xd; | | | |
| fTsumwx2[d] += w * xd * xd; | | | |
| } | | | |
| } | | | |
| return Fill(GetBin(x), w); | | | |
| } | | | |
| Long64_t Fill(const char* name[], Double_t w = 1.) { | | | |
| return Fill(GetBin(name), w); | | | |
| } | | } | |
|
| | | static THnSparse* CreateSparse(const char* name, const char* title, | |
| | | const THnBase* hn, Int_t chunkSize = 1024 | |
| | | * 16) { | |
| | | return (THnSparse*) CreateHnAny(name, title, hn, kTRUE /*sparse*/, | |
| | | chunkSize); | |
| | | } | |
| | | | |
| | | Int_t GetChunkSize() const { return fChunkSize; } | |
| | | Int_t GetNChunks() const { return fBinContent.GetEntriesFast(); } | |
| | | | |
|
| TFitResultPtr Fit(TF1 *f1 ,Option_t *option = "", Option_t *goption = "" | | ROOT::THnBaseBinIter* CreateIter(Bool_t respectAxisRange) const; | |
| ); | | | |
| TList* GetListOfFunctions() { return 0; } | | | |
| | | | |
|
| Double_t GetEntries() const { return fEntries; } | | | |
| Double_t GetWeightSum() const { return fTsumw; } | | | |
| Long64_t GetNbins() const { return fFilledBins; } | | Long64_t GetNbins() const { return fFilledBins; } | |
|
| Int_t GetNdimensions() const { return fNdimensions; } | | void SetFilledBins(Long64_t nbins) { fFilledBins = nbins; } | |
| Bool_t GetCalculateErrors() const { return fTsumw2 >= 0.; } | | | |
| void CalculateErrors(Bool_t calc = kTRUE) { | | | |
| // Calculate errors (or not if "calc" == kFALSE) | | | |
| if (calc) Sumw2(); | | | |
| else fTsumw2 = -1.; | | | |
| } | | | |
| | | | |
|
| | | Long64_t GetBin(const Int_t* idx) const { return const_cast<THnSparse*>( | |
| | | this)->GetBin(idx, kFALSE); } | |
| | | Long64_t GetBin(const Double_t* x) const { return const_cast<THnSparse*> | |
| | | (this)->GetBin(x, kFALSE); } | |
| | | Long64_t GetBin(const char* name[]) const { return const_cast<THnSparse* | |
| | | >(this)->GetBin(name, kFALSE); } | |
| Long64_t GetBin(const Int_t* idx, Bool_t allocate = kTRUE); | | Long64_t GetBin(const Int_t* idx, Bool_t allocate = kTRUE); | |
| Long64_t GetBin(const Double_t* x, Bool_t allocate = kTRUE); | | Long64_t GetBin(const Double_t* x, Bool_t allocate = kTRUE); | |
| Long64_t GetBin(const char* name[], Bool_t allocate = kTRUE); | | Long64_t GetBin(const char* name[], Bool_t allocate = kTRUE); | |
| | | | |
|
| void SetBinEdges(Int_t idim, const Double_t* bins); | | void SetBinContent(const Int_t* idx, Double_t v) { | |
| void SetBinContent(const Int_t* x, Double_t v); | | // Forwards to THnBase::SetBinContent(). | |
| | | // Non-virtual, CINT-compatible replacement of a using declaration. | |
| | | THnBase::SetBinContent(idx, v); | |
| | | } | |
| void SetBinContent(Long64_t bin, Double_t v); | | void SetBinContent(Long64_t bin, Double_t v); | |
|
| void SetBinError(const Int_t* x, Double_t e); | | void SetBinError2(Long64_t bin, Double_t e2); | |
| void SetBinError(Long64_t bin, Double_t e); | | void AddBinContent(const Int_t* idx, Double_t v = 1.) { | |
| void AddBinContent(const Int_t* x, Double_t v = 1.); | | // Forwards to THnBase::SetBinContent(). | |
| | | // Non-virtual, CINT-compatible replacement of a using declaration. | |
| | | THnBase::AddBinContent(idx, v); | |
| | | } | |
| void AddBinContent(Long64_t bin, Double_t v = 1.); | | void AddBinContent(Long64_t bin, Double_t v = 1.); | |
|
| void SetEntries(Double_t entries) { fEntries = entries; } | | void AddBinError2(Long64_t bin, Double_t e2); | |
| void SetTitle(const char *title); | | | |
| | | | |
|
| Double_t GetBinContent(const Int_t *idx) const; | | Double_t GetBinContent(const Int_t *idx) const { | |
| | | // Forwards to THnBase::GetBinContent() overload. | |
| | | // Non-virtual, CINT-compatible replacement of a using declaration. | |
| | | return THnBase::GetBinContent(idx); | |
| | | } | |
| Double_t GetBinContent(Long64_t bin, Int_t* idx = 0) const; | | Double_t GetBinContent(Long64_t bin, Int_t* idx = 0) const; | |
|
| Double_t GetBinError(const Int_t *idx) const; | | Double_t GetBinError2(Long64_t linidx) const; | |
| Double_t GetBinError(Long64_t linidx) const; | | | |
| | | | |
| Double_t GetSparseFractionBins() const; | | Double_t GetSparseFractionBins() const; | |
| Double_t GetSparseFractionMem() const; | | Double_t GetSparseFractionMem() const; | |
| | | | |
|
| Double_t GetSumw() const { return fTsumw; } | | TH1D* Projection(Int_t xDim, Option_t* option = "") const{ | |
| Double_t GetSumw2() const { return fTsumw2; } | | // Forwards to THnBase::Projection(). | |
| Double_t GetSumwx(Int_t dim) const { return fTsumwx[dim]; } | | // Non-virtual, as a CINT-compatible replacement of a using | |
| Double_t GetSumwx2(Int_t dim) const { return fTsumwx2[dim]; } | | // declaration. | |
| | | return THnBase::Projection(xDim, option); | |
| | | } | |
| | | | |
|
| TH1D* Projection(Int_t xDim, Option_t* option = "") const; | | | |
| TH2D* Projection(Int_t yDim, Int_t xDim, | | TH2D* Projection(Int_t yDim, Int_t xDim, | |
|
| Option_t* option = "") const; | | Option_t* option = "") const { | |
| TH3D* Projection(Int_t xDim, Int_t yDim, Int_t zDim, | | // Forwards to THnBase::Projection(). | |
| Option_t* option = "") const; | | // Non-virtual, as a CINT-compatible replacement of a using | |
| THnSparse* Projection(Int_t ndim, const Int_t* dim, | | // declaration. | |
| Option_t* option = "") const; | | return THnBase::Projection(yDim, xDim, option); | |
| | | } | |
| | | | |
|
| THnSparse* Rebin(Int_t group) const; | | TH3D* Projection(Int_t xDim, Int_t yDim, Int_t zDim, | |
| THnSparse* Rebin(const Int_t* group) const; | | Option_t* option = "") const { | |
| | | // Forwards to THnBase::Projection(). | |
| | | // Non-virtual, as a CINT-compatible replacement of a using | |
| | | // declaration. | |
| | | return THnBase::Projection(xDim, yDim, zDim, option); | |
| | | } | |
| | | | |
|
| Long64_t Merge(TCollection* list); | | THnSparse* Projection(Int_t ndim, const Int_t* dim, | |
| | | Option_t* option = "") const { | |
| | | return (THnSparse*) ProjectionND(ndim, dim, option); | |
| | | } | |
| | | | |
|
| void Scale(Double_t c); | | THnSparse* Rebin(Int_t group) const { | |
| void Add(const THnSparse* h, Double_t c=1.); | | return (THnSparse*) RebinBase(group); | |
| void Multiply(const THnSparse* h); | | } | |
| void Multiply(TF1* f, Double_t c = 1.); | | THnSparse* Rebin(const Int_t* group) const { | |
| void Divide(const THnSparse* h); | | return (THnSparse*) RebinBase(group); | |
| void Divide(const THnSparse* h1, const THnSparse* h2, Double_t c1 = 1., | | } | |
| Double_t c2 = 1., Option_t* option=""); | | | |
| void RebinnedAdd(const THnSparse* h, Double_t c=1.); | | | |
| | | | |
| void Reset(Option_t* option = ""); | | void Reset(Option_t* option = ""); | |
| void Sumw2(); | | void Sumw2(); | |
| | | | |
|
| Double_t ComputeIntegral(); | | ClassDef(THnSparse, 3); // Interfaces of sparse n-dimensional histogram | |
| void GetRandom(Double_t *rand, Bool_t subBinRandom = kTRUE); | | | |
| | | | |
| void Print(Option_t* option = "") const; | | | |
| void PrintEntries(Long64_t from = 0, Long64_t howmany = -1, Option_t* op | | | |
| tions = 0) const; | | | |
| void PrintBin(Int_t* coord, Option_t* options) const { | | | |
| PrintBin(-1, coord, options); | | | |
| } | | | |
| void PrintBin(Long64_t idx, Option_t* options) const; | | | |
| | | | |
| void Browse(TBrowser *b); | | | |
| Bool_t IsFolder() const { return kTRUE; } | | | |
| | | | |
| //void Draw(Option_t* option = ""); | | | |
| | | | |
| ClassDef(THnSparse, 2); // Interfaces of sparse n-dimensional histogram | | | |
| }; | | }; | |
| | | | |
| //_________________________________________________________________________
_____ | | //_________________________________________________________________________
_____ | |
| // | | // | |
| // Templated implementation of the abstract base THnSparse. | | // Templated implementation of the abstract base THnSparse. | |
| // All functionality and the interfaces to be used are in THnSparse! | | // All functionality and the interfaces to be used are in THnSparse! | |
| // | | // | |
| // THnSparse does not know how to store any bin content itself. Instead, th
is | | // THnSparse does not know how to store any bin content itself. Instead, th
is | |
| // is delegated to the derived, templated class: the template parameter dec
ides | | // is delegated to the derived, templated class: the template parameter dec
ides | |
| // what the format for the bin content is. In fact it even defines the arra
y | | // what the format for the bin content is. In fact it even defines the arra
y | |
| // itself; possible implementations probably derive from TArray. | | // itself; possible implementations probably derive from TArray. | |
| // | | // | |
| // Typedefs exist for template parematers with ROOT's generic types: | | // Typedefs exist for template parematers with ROOT's generic types: | |
| // | | // | |
| // Templated name Typedef Bin content type | | // Templated name Typedef Bin content type | |
|
| // THnSparseT<TArrayC> THnSparseC Char_r | | // THnSparseT<TArrayC> THnSparseC Char_t | |
| // THnSparseT<TArrayS> THnSparseS Short_t | | // THnSparseT<TArrayS> THnSparseS Short_t | |
| // THnSparseT<TArrayI> THnSparseI Int_t | | // THnSparseT<TArrayI> THnSparseI Int_t | |
| // THnSparseT<TArrayL> THnSparseL Long_t | | // THnSparseT<TArrayL> THnSparseL Long_t | |
| // THnSparseT<TArrayF> THnSparseF Float_t | | // THnSparseT<TArrayF> THnSparseF Float_t | |
| // THnSparseT<TArrayD> THnSparseD Double_t | | // THnSparseT<TArrayD> THnSparseD Double_t | |
| // | | // | |
| // We recommend to use THnSparseC wherever possible, and to map its value s
pace | | // We recommend to use THnSparseC wherever possible, and to map its value s
pace | |
| // of 256 possible values to e.g. float values outside the class. This save
s an | | // of 256 possible values to e.g. float values outside the class. This save
s an | |
| // enourmous amount of memory. Only if more than 256 values need to be | | // enourmous amount of memory. Only if more than 256 values need to be | |
| // distinguished should e.g. THnSparseS or even THnSparseF be chosen. | | // distinguished should e.g. THnSparseS or even THnSparseF be chosen. | |
| | | | |
End of changes. 35 change blocks. |
| 139 lines changed or deleted | | 80 lines changed or added | |
|
| TMCProcess.h | | TMCProcess.h | |
|
| // @(#)root/vmc:$Id: TMCProcess.h 35238 2010-09-13 10:21:18Z ivana $ | | // @(#)root/vmc:$Id: TMCProcess.h 42431 2011-12-07 11:49:23Z ivana $ | |
| // Author: Alice collaboration | | // Author: Alice collaboration | |
| | | | |
| /************************************************************************* | | /************************************************************************* | |
| * Copyright (C) 2006, Rene Brun and Fons Rademakers. * | | * Copyright (C) 2006, Rene Brun and Fons Rademakers. * | |
| * Copyright (C) 2002, ALICE Experiment at CERN. * | | * Copyright (C) 2002, ALICE Experiment at CERN. * | |
| * All rights reserved. * | | * All rights reserved. * | |
| * * | | * * | |
| * For the licensing terms see $ROOTSYS/LICENSE. * | | * For the licensing terms see $ROOTSYS/LICENSE. * | |
| * For the list of contributors see $ROOTSYS/README/CREDITS. * | | * For the list of contributors see $ROOTSYS/README/CREDITS. * | |
| *************************************************************************/ | | *************************************************************************/ | |
| | | | |
| #ifndef ROOT_TMCProcess | | #ifndef ROOT_TMCProcess | |
| #define ROOT_TMCProcess | | #define ROOT_TMCProcess | |
| // | | // | |
| // List of MonteCarlo processes | | // List of MonteCarlo processes | |
| // | | // | |
| #include "Rtypes.h" | | #include "Rtypes.h" | |
| | | | |
|
| const Int_t kMaxMCProcess = 48; | | const Int_t kMaxMCProcess = 49; | |
| | | | |
| enum TMCProcess | | enum TMCProcess | |
| { | | { | |
| kPPrimary = 0, // Primary interaction | | kPPrimary = 0, // Primary interaction | |
| | | | |
| kPMultipleScattering = 1, // multiple scattering | | kPMultipleScattering = 1, // multiple scattering | |
| kPCoulombScattering = 45, // single Coulomb scattering | | kPCoulombScattering = 45, // single Coulomb scattering | |
| kPEnergyLoss = 2, // continuous energy loss | | kPEnergyLoss = 2, // continuous energy loss | |
| kPMagneticFieldL = 3, // bending in mag. field | | kPMagneticFieldL = 3, // bending in mag. field | |
| kPDecay = 4, // particle decay | | kPDecay = 4, // particle decay | |
| | | | |
| skipping to change at line 72 | | skipping to change at line 72 | |
| kPRayleigh = 30, // Rayleigh scattering | | kPRayleigh = 30, // Rayleigh scattering | |
| | | | |
| kPNull = 31, // no mechanism is active, usually at the entr
ance | | kPNull = 31, // no mechanism is active, usually at the entr
ance | |
| // of a new volume | | // of a new volume | |
| kPStop = 32, // particle has fallen below energy threshold | | kPStop = 32, // particle has fallen below energy threshold | |
| // and tracking stops | | // and tracking stops | |
| | | | |
| kPLightAbsorption = 33, // Cerenkov photon absorption | | kPLightAbsorption = 33, // Cerenkov photon absorption | |
| kPLightDetection = 34, // Optical photon detection (absorption + phot
oelectron production) | | kPLightDetection = 34, // Optical photon detection (absorption + phot
oelectron production) | |
| kPLightScattering = 35, // Cerenkov photon reflection/refraction | | kPLightScattering = 35, // Cerenkov photon reflection/refraction | |
|
| | | kPLightWLShifting = 48, // Optical photon wavelength shifting | |
| kStepMax = 36, // step limited by STEMAX | | kStepMax = 36, // step limited by STEMAX | |
| | | | |
| kPCerenkov = 37, // Cerenkov photon generation | | kPCerenkov = 37, // Cerenkov photon generation | |
| kPFeedBackPhoton = 38, // Feed back photon in RICH -- ALICE specific | | kPFeedBackPhoton = 38, // Feed back photon in RICH -- ALICE specific | |
| kPLightReflection = 39, // Cerenkov photon reflection | | kPLightReflection = 39, // Cerenkov photon reflection | |
| kPLightRefraction = 40, // Cerenkov photon refraction | | kPLightRefraction = 40, // Cerenkov photon refraction | |
| kPSynchrotron = 41, // synchrotron radiation generation | | kPSynchrotron = 41, // synchrotron radiation generation | |
| kPScintillation = 42, // scintillation | | kPScintillation = 42, // scintillation | |
| | | | |
| kPTransportation = 43, // Transportation | | kPTransportation = 43, // Transportation | |
| | | | |
| skipping to change at line 136 | | skipping to change at line 137 | |
| "Cerenkov feed back photon", | | "Cerenkov feed back photon", | |
| "Cerenkov photon reflection", | | "Cerenkov photon reflection", | |
| "Cerenkov photon refraction", | | "Cerenkov photon refraction", | |
| "Synchrotron radiation", | | "Synchrotron radiation", | |
| "Scintillation", | | "Scintillation", | |
| "Transportation", | | "Transportation", | |
| "Unknown process", | | "Unknown process", | |
| "Coulomb scattering", | | "Coulomb scattering", | |
| "Photo nuclear interaction", | | "Photo nuclear interaction", | |
| "User defined process", | | "User defined process", | |
|
| | | "Optical photon wavelength shifting", | |
| }; | | }; | |
| | | | |
| #endif //ROOT_TMCProcess | | #endif //ROOT_TMCProcess | |
| | | | |
End of changes. 4 change blocks. |
| 2 lines changed or deleted | | 4 lines changed or added | |
|
| TProof.h | | TProof.h | |
|
| // @(#)root/proof:$Id: TProof.h 43361 2012-03-15 10:58:38Z ganis $ | | // @(#)root/proof:$Id: TProof.h 43107 2012-02-24 12:45:22Z ganis $ | |
| // Author: Fons Rademakers 13/02/97 | | // Author: Fons Rademakers 13/02/97 | |
| | | | |
| /************************************************************************* | | /************************************************************************* | |
| * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * | | * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * | |
| * All rights reserved. * | | * All rights reserved. * | |
| * * | | * * | |
| * For the licensing terms see $ROOTSYS/LICENSE. * | | * For the licensing terms see $ROOTSYS/LICENSE. * | |
| * For the list of contributors see $ROOTSYS/README/CREDITS. * | | * For the list of contributors see $ROOTSYS/README/CREDITS. * | |
| *************************************************************************/ | | *************************************************************************/ | |
| | | | |
| | | | |
| skipping to change at line 97 | | skipping to change at line 97 | |
| class TSignalHandler; | | class TSignalHandler; | |
| class TSlave; | | class TSlave; | |
| class TSemaphore; | | class TSemaphore; | |
| class TSocket; | | class TSocket; | |
| class TTree; | | class TTree; | |
| class TVirtualMutex; | | class TVirtualMutex; | |
| class TFileCollection; | | class TFileCollection; | |
| class TMap; | | class TMap; | |
| class TDataSetManager; | | class TDataSetManager; | |
| class TMacro; | | class TMacro; | |
|
| | | class TSelector; | |
| | | | |
| // protocol changes: | | // protocol changes: | |
| // 1 -> 2: new arguments for Process() command, option added | | // 1 -> 2: new arguments for Process() command, option added | |
| // 2 -> 3: package manager enabling protocol changed | | // 2 -> 3: package manager enabling protocol changed | |
| // 3 -> 4: introduction of multi-level-master support | | // 3 -> 4: introduction of multi-level-master support | |
| // 4 -> 5: added friends support | | // 4 -> 5: added friends support | |
| // 5 -> 6: drop TFTP, support for asynchronous queries | | // 5 -> 6: drop TFTP, support for asynchronous queries | |
| // 6 -> 7: support for multisessions, archieve, retrieve, ... | | // 6 -> 7: support for multisessions, archieve, retrieve, ... | |
| // 7 -> 8: return number of entries in GetNextPacket | | // 7 -> 8: return number of entries in GetNextPacket | |
| // 8 -> 9: support for stateless connection via xproofd | | // 8 -> 9: support for stateless connection via xproofd | |
| | | | |
| skipping to change at line 133 | | skipping to change at line 134 | |
| // 24 -> 25: Handling of 'data' dir; group information | | // 24 -> 25: Handling of 'data' dir; group information | |
| // 25 -> 26: Use new TProofProgressInfo class | | // 25 -> 26: Use new TProofProgressInfo class | |
| // 26 -> 27: Use new file for updating the session status | | // 26 -> 27: Use new file for updating the session status | |
| // 27 -> 28: Support for multi-datasets, fix global pack dirs, fix AskStati
stics, | | // 27 -> 28: Support for multi-datasets, fix global pack dirs, fix AskStati
stics, | |
| // package download, dataset caching | | // package download, dataset caching | |
| // 28 -> 29: Support for config parameters in EnablePackage, idle-timeout | | // 28 -> 29: Support for config parameters in EnablePackage, idle-timeout | |
| // 29 -> 30: Add information about data dir in TSlaveInfo | | // 29 -> 30: Add information about data dir in TSlaveInfo | |
| // 30 -> 31: Development cycle 5.29 | | // 30 -> 31: Development cycle 5.29 | |
| // 31 -> 32: New log path trasmission | | // 31 -> 32: New log path trasmission | |
| // 32 -> 33: Development cycle 5.29/04 (fixed worker activation, new startu
p technology, ...) | | // 32 -> 33: Development cycle 5.29/04 (fixed worker activation, new startu
p technology, ...) | |
|
| | | // 33 -> 34: Development cycle 5.33/02 (fix load issue, ...) | |
| | | | |
| // PROOF magic constants | | // PROOF magic constants | |
|
| const Int_t kPROOF_Protocol = 33; // protocol versi
on number | | const Int_t kPROOF_Protocol = 34; // protocol versi
on number | |
| const Int_t kPROOF_Port = 1093; // IANA registere
d PROOF port | | const Int_t kPROOF_Port = 1093; // IANA registere
d PROOF port | |
| const char* const kPROOF_ConfFile = "proof.conf"; // default config
file | | const char* const kPROOF_ConfFile = "proof.conf"; // default config
file | |
| const char* const kPROOF_ConfDir = "/usr/local/root"; // default c
onfig dir | | const char* const kPROOF_ConfDir = "/usr/local/root"; // default c
onfig dir | |
| const char* const kPROOF_WorkDir = ".proof"; // default workin
g directory | | const char* const kPROOF_WorkDir = ".proof"; // default workin
g directory | |
| const char* const kPROOF_CacheDir = "cache"; // file cache dir
, under WorkDir | | const char* const kPROOF_CacheDir = "cache"; // file cache dir
, under WorkDir | |
| const char* const kPROOF_PackDir = "packages"; // package dir, u
nder WorkDir | | const char* const kPROOF_PackDir = "packages"; // package dir, u
nder WorkDir | |
| const char* const kPROOF_PackDownloadDir = "downloaded"; // subdir with do
wnloaded PARs, under PackDir | | const char* const kPROOF_PackDownloadDir = "downloaded"; // subdir with do
wnloaded PARs, under PackDir | |
| const char* const kPROOF_QueryDir = "queries"; // query dir, und
er WorkDir | | const char* const kPROOF_QueryDir = "queries"; // query dir, und
er WorkDir | |
| const char* const kPROOF_DataSetDir = "datasets"; // dataset dir, u
nder WorkDir | | const char* const kPROOF_DataSetDir = "datasets"; // dataset dir, u
nder WorkDir | |
| const char* const kPROOF_DataDir = "data"; // dir for produc
ed data, under WorkDir | | const char* const kPROOF_DataDir = "data"; // dir for produc
ed data, under WorkDir | |
| | | | |
| skipping to change at line 563 | | skipping to change at line 565 | |
| | | | |
| Bool_t fMergersSet; // Indicates, if the following variabl
es have been initialized properly | | Bool_t fMergersSet; // Indicates, if the following variabl
es have been initialized properly | |
| Bool_t fMergersByHost; // Mergers assigned by host name | | Bool_t fMergersByHost; // Mergers assigned by host name | |
| Int_t fMergersCount; | | Int_t fMergersCount; | |
| Int_t fWorkersToMerge; // Current total number of workers, wh
ich have not been yet assigned to any merger | | Int_t fWorkersToMerge; // Current total number of workers, wh
ich have not been yet assigned to any merger | |
| Int_t fLastAssignedMerger; | | Int_t fLastAssignedMerger; | |
| TList *fMergers; | | TList *fMergers; | |
| Bool_t fFinalizationRunning; | | Bool_t fFinalizationRunning; | |
| Int_t fRedirectNext; | | Int_t fRedirectNext; | |
| | | | |
|
| | | TString fPerfTree; // If non-null triggers saving of the | |
| | | performance info into fPerfTree | |
| | | | |
| static TPluginHandler *fgLogViewer; // Log dialog box plugin | | static TPluginHandler *fgLogViewer; // Log dialog box plugin | |
| | | | |
| protected: | | protected: | |
| enum ESlaves { kAll, kActive, kUnique, kAllUnique }; | | enum ESlaves { kAll, kActive, kUnique, kAllUnique }; | |
| | | | |
| Bool_t fMasterServ; //true if we are a master server | | Bool_t fMasterServ; //true if we are a master server | |
| TUrl fUrl; //Url of the master | | TUrl fUrl; //Url of the master | |
| TString fConfFile; //file containing config information | | TString fConfFile; //file containing config information | |
| TString fConfDir; //directory containing cluster config i
nformation | | TString fConfDir; //directory containing cluster config i
nformation | |
| TString fImage; //master's image name | | TString fImage; //master's image name | |
| | | | |
| skipping to change at line 592 | | skipping to change at line 596 | |
| TList *fRunningDSets; // Temporary datasets used for async ru
nning | | TList *fRunningDSets; // Temporary datasets used for async ru
nning | |
| | | | |
| Int_t fCollectTimeout; // Timeout for (some) collect actions | | Int_t fCollectTimeout; // Timeout for (some) collect actions | |
| | | | |
| TString fDataPoolUrl; // default data pool entry point URL | | TString fDataPoolUrl; // default data pool entry point URL | |
| TProofMgr::EServType fServType; // type of server: proofd, XrdProofd | | TProofMgr::EServType fServType; // type of server: proofd, XrdProofd | |
| TProofMgr *fManager; // manager to which this session belong
s (if any) | | TProofMgr *fManager; // manager to which this session belong
s (if any) | |
| EQueryMode fQueryMode; // default query mode | | EQueryMode fQueryMode; // default query mode | |
| Bool_t fDynamicStartup; // are the workers started dynamically? | | Bool_t fDynamicStartup; // are the workers started dynamically? | |
| | | | |
|
| | | TSelector *fSelector; // Selector to be processed, if any | |
| | | | |
| static TSemaphore *fgSemaphore; //semaphore to control no of parallel
startup threads | | static TSemaphore *fgSemaphore; //semaphore to control no of parallel
startup threads | |
| | | | |
| private: | | private: | |
| TProof(const TProof &); // not implemented | | TProof(const TProof &); // not implemented | |
| void operator=(const TProof &); // idem | | void operator=(const TProof &); // idem | |
| | | | |
| void CleanGDirectory(TList *ol); | | void CleanGDirectory(TList *ol); | |
| | | | |
| Int_t Exec(const char *cmd, ESlaves list, Bool_t plusMaster); | | Int_t Exec(const char *cmd, ESlaves list, Bool_t plusMaster); | |
| Int_t SendCommand(const char *cmd, ESlaves list = kActive); | | Int_t SendCommand(const char *cmd, ESlaves list = kActive); | |
| | | | |
| skipping to change at line 782 | | skipping to change at line 788 | |
| Option_t *option = "", Long64_t nentries = -1, | | Option_t *option = "", Long64_t nentries = -1, | |
| Long64_t firstentry = 0); | | Long64_t firstentry = 0); | |
| virtual Long64_t Process(TFileCollection *fc, const char *selector, | | virtual Long64_t Process(TFileCollection *fc, const char *selector, | |
| Option_t *option = "", Long64_t nentries = -1, | | Option_t *option = "", Long64_t nentries = -1, | |
| Long64_t firstentry = 0); | | Long64_t firstentry = 0); | |
| virtual Long64_t Process(const char *dsetname, const char *selector, | | virtual Long64_t Process(const char *dsetname, const char *selector, | |
| Option_t *option = "", Long64_t nentries = -1, | | Option_t *option = "", Long64_t nentries = -1, | |
| Long64_t firstentry = 0, TObject *enl = 0); | | Long64_t firstentry = 0, TObject *enl = 0); | |
| virtual Long64_t Process(const char *selector, Long64_t nentries, | | virtual Long64_t Process(const char *selector, Long64_t nentries, | |
| Option_t *option = ""); | | Option_t *option = ""); | |
|
| | | // Process via TSelector | |
| | | virtual Long64_t Process(TDSet *dset, TSelector *selector, | |
| | | Option_t *option = "", Long64_t nentries = -1, | |
| | | Long64_t firstentry = 0); | |
| | | virtual Long64_t Process(TFileCollection *fc, TSelector *selector, | |
| | | Option_t *option = "", Long64_t nentries = -1, | |
| | | Long64_t firstentry = 0); | |
| | | virtual Long64_t Process(const char *dsetname, TSelector *selector, | |
| | | Option_t *option = "", Long64_t nentries = -1, | |
| | | Long64_t firstentry = 0, TObject *enl = 0); | |
| | | virtual Long64_t Process(TSelector *selector, Long64_t nentries, | |
| | | Option_t *option = ""); | |
| | | | |
| virtual Long64_t DrawSelect(TDSet *dset, const char *varexp, | | virtual Long64_t DrawSelect(TDSet *dset, const char *varexp, | |
| const char *selection = "", | | const char *selection = "", | |
| Option_t *option = "", Long64_t nentries = -1, | | Option_t *option = "", Long64_t nentries = -1, | |
| Long64_t firstentry = 0); | | Long64_t firstentry = 0); | |
| Long64_t DrawSelect(const char *dsetname, const char *varexp, | | Long64_t DrawSelect(const char *dsetname, const char *varexp, | |
| const char *selection = "", | | const char *selection = "", | |
| Option_t *option = "", Long64_t nentries = -1, | | Option_t *option = "", Long64_t nentries = -1, | |
| Long64_t firstentry = 0, TObject *enl = 0); | | Long64_t firstentry = 0, TObject *enl = 0); | |
| Int_t Archive(Int_t query, const char *url); | | Int_t Archive(Int_t query, const char *url); | |
| | | | |
| skipping to change at line 837 | | skipping to change at line 855 | |
| Int_t UploadPackage(const char *par, EUploadPackageOpt opt = kUn
tar); | | Int_t UploadPackage(const char *par, EUploadPackageOpt opt = kUn
tar); | |
| virtual Int_t Load(const char *macro, Bool_t notOnClient = kFALSE, Bool_
t uniqueOnly = kTRUE, | | virtual Int_t Load(const char *macro, Bool_t notOnClient = kFALSE, Bool_
t uniqueOnly = kTRUE, | |
| TList *wrks = 0); | | TList *wrks = 0); | |
| | | | |
| Int_t AddDynamicPath(const char *libpath, Bool_t onClient = kFALSE
, TList *wrks = 0); | | Int_t AddDynamicPath(const char *libpath, Bool_t onClient = kFALSE
, TList *wrks = 0); | |
| Int_t AddIncludePath(const char *incpath, Bool_t onClient = kFALSE
, TList *wrks = 0); | | Int_t AddIncludePath(const char *incpath, Bool_t onClient = kFALSE
, TList *wrks = 0); | |
| Int_t RemoveDynamicPath(const char *libpath, Bool_t onClient = kFA
LSE); | | Int_t RemoveDynamicPath(const char *libpath, Bool_t onClient = kFA
LSE); | |
| Int_t RemoveIncludePath(const char *incpath, Bool_t onClient = kFA
LSE); | | Int_t RemoveIncludePath(const char *incpath, Bool_t onClient = kFA
LSE); | |
| | | | |
| //-- dataset management | | //-- dataset management | |
|
| Int_t UploadDataSet(const char *dataset, | | Int_t UploadDataSet(const char *, TList *, const char * = 0, Int_t | |
| TList *files, | | = 0, TList * = 0); | |
| const char *dest = 0, | | Int_t UploadDataSet(const char *, const char *, const char * = 0, | |
| Int_t opt = kAskUser, | | Int_t = 0, TList * = 0); | |
| TList *skippedFiles = 0); | | Int_t UploadDataSetFromFile(const char *, const char *, const char | |
| Int_t UploadDataSet(const char *dataset, | | * = 0, Int_t = 0, TList * = 0); | |
| const char *files, | | | |
| const char *dest = 0, | | | |
| Int_t opt = kAskUser, | | | |
| TList *skippedFiles = 0); | | | |
| Int_t UploadDataSetFromFile(const char *dataset, | | | |
| const char *file, | | | |
| const char *dest = 0, | | | |
| Int_t opt = kAskUser, | | | |
| TList *skippedFiles = 0); | | | |
| virtual Bool_t RegisterDataSet(const char *name, | | virtual Bool_t RegisterDataSet(const char *name, | |
| TFileCollection *dataset, const char* optStr
= ""); | | TFileCollection *dataset, const char* optStr
= ""); | |
| virtual TMap *GetDataSets(const char *uri = "", const char* optStr = "")
; | | virtual TMap *GetDataSets(const char *uri = "", const char* optStr = "")
; | |
| virtual void ShowDataSets(const char *uri = "", const char* optStr = ""
); | | virtual void ShowDataSets(const char *uri = "", const char* optStr = ""
); | |
| | | | |
| TMap *GetDataSetQuota(const char* optStr = ""); | | TMap *GetDataSetQuota(const char* optStr = ""); | |
| void ShowDataSetQuota(Option_t* opt = 0); | | void ShowDataSetQuota(Option_t* opt = 0); | |
| | | | |
| virtual Bool_t ExistsDataSet(const char *dataset); | | virtual Bool_t ExistsDataSet(const char *dataset); | |
| void ShowDataSet(const char *dataset = "", const char* opt = "
M"); | | void ShowDataSet(const char *dataset = "", const char* opt = "
M"); | |
| | | | |
| skipping to change at line 1011 | | skipping to change at line 1017 | |
| void Detach(Option_t *opt = ""); | | void Detach(Option_t *opt = ""); | |
| | | | |
| virtual void SetAlias(const char *alias=""); | | virtual void SetAlias(const char *alias=""); | |
| | | | |
| TProofMgr *GetManager() { return fManager; } | | TProofMgr *GetManager() { return fManager; } | |
| void SetManager(TProofMgr *mgr); | | void SetManager(TProofMgr *mgr); | |
| | | | |
| Int_t ActivateWorker(const char *ord); | | Int_t ActivateWorker(const char *ord); | |
| Int_t DeactivateWorker(const char *ord); | | Int_t DeactivateWorker(const char *ord); | |
| | | | |
|
| const char *GetDataPoolUrl() const { return fDataPoolUrl; } | | const char *GetDataPoolUrl() const { return fManager ? fManager->GetMssU | |
| void SetDataPoolUrl(const char *url) { fDataPoolUrl = url; } | | rl() : 0; } | |
| | | void SetDataPoolUrl(const char *url) { if (fManager) fManager->Se | |
| | | tMssUrl(url); } | |
| | | | |
| void SetPrintProgress(PrintProgress_t pp) { fPrintProgress = pp;
} | | void SetPrintProgress(PrintProgress_t pp) { fPrintProgress = pp;
} | |
| | | | |
| void SetProgressDialog(Bool_t on = kTRUE); | | void SetProgressDialog(Bool_t on = kTRUE); | |
| | | | |
|
| | | // Enable the performance tree | |
| | | Int_t SavePerfTree(const char *pf = 0, const char *qref = 0); | |
| | | void SetPerfTree(const char *pf = "perftree.root", Bool_t withWrk | |
| | | s = kFALSE); | |
| | | | |
| // Opening and managing PROOF connections | | // Opening and managing PROOF connections | |
| static TProof *Open(const char *url = 0, const char *conffile = 0, | | static TProof *Open(const char *url = 0, const char *conffile = 0, | |
| const char *confdir = 0, Int_t loglevel = 0); | | const char *confdir = 0, Int_t loglevel = 0); | |
| static void LogViewer(const char *url = 0, Int_t sessionidx = 0
); | | static void LogViewer(const char *url = 0, Int_t sessionidx = 0
); | |
| static TProofMgr *Mgr(const char *url); | | static TProofMgr *Mgr(const char *url); | |
| static void Reset(const char *url, Bool_t hard = kFALSE); | | static void Reset(const char *url, Bool_t hard = kFALSE); | |
| | | | |
| static void AddEnvVar(const char *name, const char *value); | | static void AddEnvVar(const char *name, const char *value); | |
| static void DelEnvVar(const char *name); | | static void DelEnvVar(const char *name); | |
| static const TList *GetEnvVars(); | | static const TList *GetEnvVars(); | |
| | | | |
End of changes. 10 change blocks. |
| 19 lines changed or deleted | | 36 lines changed or added | |
|
| TProofBench.h | | TProofBench.h | |
|
| // @(#)root/proofx:$Id: TProofBench.h 41635 2011-10-28 15:02:31Z ganis $ | | // @(#)root/proofx:$Id: TProofBench.h 42496 2011-12-15 11:16:52Z ganis $ | |
| /************************************************************************* | | /************************************************************************* | |
| * Copyright (C) 1995-2005, Rene Brun and Fons Rademakers. * | | * Copyright (C) 1995-2005, Rene Brun and Fons Rademakers. * | |
| * All rights reserved. * | | * All rights reserved. * | |
| * * | | * * | |
| * For the licensing terms see $ROOTSYS/LICENSE. * | | * For the licensing terms see $ROOTSYS/LICENSE. * | |
| * For the list of contributors see $ROOTSYS/README/CREDITS. * | | * For the list of contributors see $ROOTSYS/README/CREDITS. * | |
| *************************************************************************/ | | *************************************************************************/ | |
| | | | |
| #ifndef ROOT_TProofBench | | #ifndef ROOT_TProofBench | |
| #define ROOT_TProofBench | | #define ROOT_TProofBench | |
| | | | |
| skipping to change at line 31 | | skipping to change at line 31 | |
| #ifndef ROOT_TObject | | #ifndef ROOT_TObject | |
| #include "TObject.h" | | #include "TObject.h" | |
| #endif | | #endif | |
| #ifndef ROOT_TProofBenchTypes | | #ifndef ROOT_TProofBenchTypes | |
| #include "TProofBenchTypes.h" | | #include "TProofBenchTypes.h" | |
| #endif | | #endif | |
| #ifndef ROOT_TString | | #ifndef ROOT_TString | |
| #include "TString.h" | | #include "TString.h" | |
| #endif | | #endif | |
| | | | |
|
| | | class TF1; | |
| class TFile; | | class TFile; | |
| class TProof; | | class TProof; | |
| class TProofBenchRunCPU; | | class TProofBenchRunCPU; | |
| class TProofBenchRunDataRead; | | class TProofBenchRunDataRead; | |
| class TProofBenchDataSet; | | class TProofBenchDataSet; | |
| | | | |
| class TProofBench : public TObject { | | class TProofBench : public TObject { | |
| | | | |
| private: | | private: | |
| Bool_t fUnlinkOutfile; // Whether to remove empty output files | | Bool_t fUnlinkOutfile; // Whether to remove empty output files | |
| | | | |
| skipping to change at line 68 | | skipping to change at line 69 | |
| TString fDataPar; // List of par files to be loaded for data
benchmarks | | TString fDataPar; // List of par files to be loaded for data
benchmarks | |
| TString fDataGenSel; // Selector to be used for generate data f
or benchmarks | | TString fDataGenSel; // Selector to be used for generate data f
or benchmarks | |
| TString fDataGenPar; // List of par files to be loaded to gener
ate data for benchmarks | | TString fDataGenPar; // List of par files to be loaded to gener
ate data for benchmarks | |
| | | | |
| TProofBenchRunCPU *fRunCPU; // Instance to run CPU scans | | TProofBenchRunCPU *fRunCPU; // Instance to run CPU scans | |
| TProofBenchRunDataRead *fRunDS; // Instance to run data-read scans | | TProofBenchRunDataRead *fRunDS; // Instance to run data-read scans | |
| TProofBenchDataSet *fDS; // Instance to handle datasets operatio
ns | | TProofBenchDataSet *fDS; // Instance to handle datasets operatio
ns | |
| | | | |
| Bool_t fDebug; // Debug switch | | Bool_t fDebug; // Debug switch | |
| | | | |
|
| | | TNamed *fDescription; // Strings describing the cluster for this | |
| | | test (saved in the output file) | |
| | | | |
| | | static TF1 *fgFp1; // Simple 1st degree polynomial | |
| | | static TF1 *fgFp1n; // Normalized 1st degree | |
| | | static TF1 *fgFp2; // Simple 2nd degree polynomial | |
| | | static TF1 *fgFp2n; // Normalized 2nd degree | |
| | | | |
| | | static void AssertFittingFun(Double_t mi, Double_t mx); | |
| | | | |
| public: | | public: | |
| | | | |
| TProofBench(const char *url, const char *outfile = "<default>", const ch
ar *proofopt = 0); | | TProofBench(const char *url, const char *outfile = "<default>", const ch
ar *proofopt = 0); | |
| | | | |
| virtual ~TProofBench(); | | virtual ~TProofBench(); | |
| | | | |
| Int_t RunCPU(Long64_t nevents=-1, Int_t start=-1, Int_t stop=-1, Int_t s
tep=-1); | | Int_t RunCPU(Long64_t nevents=-1, Int_t start=-1, Int_t stop=-1, Int_t s
tep=-1); | |
| Int_t RunCPUx(Long64_t nevents=-1, Int_t start=-1, Int_t stop=-1); | | Int_t RunCPUx(Long64_t nevents=-1, Int_t start=-1, Int_t stop=-1); | |
| Int_t RunDataSet(const char *dset = "BenchDataSet", | | Int_t RunDataSet(const char *dset = "BenchDataSet", | |
| Int_t start = 1, Int_t stop = -1, Int_t step = 1); | | Int_t start = 1, Int_t stop = -1, Int_t step = 1); | |
| | | | |
| skipping to change at line 109 | | skipping to change at line 119 | |
| void SetDataPar(const char *par) { fDataPar = par; } | | void SetDataPar(const char *par) { fDataPar = par; } | |
| void SetDataGenSel(const char *sel) { fDataGenSel = sel; } | | void SetDataGenSel(const char *sel) { fDataGenSel = sel; } | |
| void SetDataGenPar(const char *par) { fDataGenPar = par; } | | void SetDataGenPar(const char *par) { fDataGenPar = par; } | |
| | | | |
| void SetProofDS(TProof *p); | | void SetProofDS(TProof *p); | |
| | | | |
| void SetDebug(Bool_t debug = kTRUE) { fDebug = debug; } | | void SetDebug(Bool_t debug = kTRUE) { fDebug = debug; } | |
| | | | |
| Bool_t GetDebug() { return fDebug; } | | Bool_t GetDebug() { return fDebug; } | |
| | | | |
|
| static void DrawCPU(const char *outfile, const char *opt = "std:"); | | static void DrawCPU(const char *outfile, const char *opt = "std:", Bool_ | |
| static void DrawDataSet(const char *outfile, const char *opt = "std:", c | | t verbose = kFALSE, Int_t dofit = 0); | |
| onst char *type = "mbs"); | | static void DrawDataSet(const char *outfile, const char *opt = "std:", c | |
| | | onst char *type = "mbs", Bool_t verbose = kFALSE); | |
| | | static void GetPerfSpecs(const char *path = "."); | |
| | | | |
| ClassDef(TProofBench, 0) // Steering class for PROOF benchmarks | | ClassDef(TProofBench, 0) // Steering class for PROOF benchmarks | |
| }; | | }; | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 4 change blocks. |
| 4 lines changed or deleted | | 17 lines changed or added | |
|
| TProofLite.h | | TProofLite.h | |
|
| // @(#)root/proof:$Id: TProofLite.h 38348 2011-03-09 19:01:38Z ganis $ | | // @(#)root/proof:$Id: TProofLite.h 43044 2012-02-17 14:34:52Z ganis $ | |
| /************************************************************************* | | /************************************************************************* | |
| * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * | | * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * | |
| * All rights reserved. * | | * All rights reserved. * | |
| * * | | * * | |
| * For the licensing terms see $ROOTSYS/LICENSE. * | | * For the licensing terms see $ROOTSYS/LICENSE. * | |
| * For the list of contributors see $ROOTSYS/README/CREDITS. * | | * For the list of contributors see $ROOTSYS/README/CREDITS. * | |
| *************************************************************************/ | | *************************************************************************/ | |
| | | | |
| #ifndef ROOT_TProofLite | | #ifndef ROOT_TProofLite | |
| #define ROOT_TProofLite | | #define ROOT_TProofLite | |
| | | | |
| skipping to change at line 114 | | skipping to change at line 114 | |
| Long64_t Process(TDSet *dset, const char *sel, Option_t *o = "", | | Long64_t Process(TDSet *dset, const char *sel, Option_t *o = "", | |
| Long64_t nent = -1, Long64_t fst = 0); | | Long64_t nent = -1, Long64_t fst = 0); | |
| Long64_t Process(TFileCollection *fc, const char *sel, Option_t *o = "", | | Long64_t Process(TFileCollection *fc, const char *sel, Option_t *o = "", | |
| Long64_t nent = -1, Long64_t fst = 0) | | Long64_t nent = -1, Long64_t fst = 0) | |
| { return TProof::Process(fc, sel, o, nent, fst); } | | { return TProof::Process(fc, sel, o, nent, fst); } | |
| Long64_t Process(const char *dsname, const char *sel, Option_t *o = "", | | Long64_t Process(const char *dsname, const char *sel, Option_t *o = "", | |
| Long64_t nent = -1, Long64_t fst = 0, TObject *enl = 0) | | Long64_t nent = -1, Long64_t fst = 0, TObject *enl = 0) | |
| { return TProof::Process(dsname, sel, o, nent, fst, enl
); } | | { return TProof::Process(dsname, sel, o, nent, fst, enl
); } | |
| Long64_t Process(const char *sel, Long64_t nent, Option_t *o = "") | | Long64_t Process(const char *sel, Long64_t nent, Option_t *o = "") | |
| { return TProof::Process(sel, nent, o); } | | { return TProof::Process(sel, nent, o); } | |
|
| | | // Process via TSelector | |
| | | Long64_t Process(TDSet *dset, TSelector *sel, Option_t *o = "", | |
| | | Long64_t nent = -1, Long64_t fst = 0) | |
| | | { return TProof::Process(dset, sel, o, nent, fst); } | |
| | | Long64_t Process(TFileCollection *fc, TSelector *sel, Option_t *o = "", | |
| | | Long64_t nent = -1, Long64_t fst = 0) | |
| | | { return TProof::Process(fc, sel, o, nent, fst); } | |
| | | Long64_t Process(const char *dsname, TSelector *sel, Option_t *o = "", | |
| | | Long64_t nent = -1, Long64_t fst = 0, TObject *enl = 0) | |
| | | { return TProof::Process(dsname, sel, o, nent, fst, enl | |
| | | ); } | |
| | | Long64_t Process(TSelector* sel, Long64_t nent, Option_t *o = "") | |
| | | { return TProof::Process(sel, nent, o); } | |
| | | | |
| // Cache management | | // Cache management | |
| void ShowCache(Bool_t all = kFALSE); | | void ShowCache(Bool_t all = kFALSE); | |
| void ClearCache(const char *file = 0); | | void ClearCache(const char *file = 0); | |
| Int_t Load(const char *macro, Bool_t notOnClient = kFALSE, Bool_t unique
Only = kTRUE, | | Int_t Load(const char *macro, Bool_t notOnClient = kFALSE, Bool_t unique
Only = kTRUE, | |
| TList *wrks = 0); | | TList *wrks = 0); | |
| | | | |
| // Query management | | // Query management | |
| TList *GetListOfQueries(Option_t *opt = ""); | | TList *GetListOfQueries(Option_t *opt = ""); | |
| Int_t Remove(const char *ref, Bool_t all); | | Int_t Remove(const char *ref, Bool_t all); | |
| | | | |
End of changes. 2 change blocks. |
| 1 lines changed or deleted | | 14 lines changed or added | |
|
| TProofMgr.h | | TProofMgr.h | |
|
| // @(#)root/proof:$Id: TProofMgr.h 42019 2011-11-15 15:31:01Z ganis $ | | // @(#)root/proof:$Id: TProofMgr.h 42858 2012-02-03 11:34:05Z ganis $ | |
| /************************************************************************* | | /************************************************************************* | |
| * Copyright (C) 1995-2005, Rene Brun and Fons Rademakers. * | | * Copyright (C) 1995-2005, Rene Brun and Fons Rademakers. * | |
| * All rights reserved. * | | * All rights reserved. * | |
| * * | | * * | |
| * For the licensing terms see $ROOTSYS/LICENSE. * | | * For the licensing terms see $ROOTSYS/LICENSE. * | |
| * For the list of contributors see $ROOTSYS/README/CREDITS. * | | * For the list of contributors see $ROOTSYS/README/CREDITS. * | |
| *************************************************************************/ | | *************************************************************************/ | |
| | | | |
| #ifndef ROOT_TProofMgr | | #ifndef ROOT_TProofMgr | |
| #define ROOT_TProofMgr | | #define ROOT_TProofMgr | |
| | | | |
| skipping to change at line 24 | | skipping to change at line 24 | |
| // // | | // // | |
| // TProofMgr // | | // TProofMgr // | |
| // // | | // // | |
| // The PROOF manager interacts with the PROOF server coordinator to // | | // The PROOF manager interacts with the PROOF server coordinator to // | |
| // create or destroy a PROOF session, attach to or detach from // | | // create or destroy a PROOF session, attach to or detach from // | |
| // existing one, and to monitor any client activity on the cluster. // | | // existing one, and to monitor any client activity on the cluster. // | |
| // At most one manager instance per server is allowed. // | | // At most one manager instance per server is allowed. // | |
| // // | | // // | |
| ////////////////////////////////////////////////////////////////////////// | | ////////////////////////////////////////////////////////////////////////// | |
| | | | |
|
| | | #ifndef ROOT_TList | |
| | | #include "TList.h" | |
| | | #endif | |
| #ifndef ROOT_TNamed | | #ifndef ROOT_TNamed | |
| #include "TNamed.h" | | #include "TNamed.h" | |
| #endif | | #endif | |
| #ifndef ROOT_TUrl | | #ifndef ROOT_TUrl | |
| #include "TUrl.h" | | #include "TUrl.h" | |
| #endif | | #endif | |
|
| | | #ifndef ROOT_TString | |
| | | #include "TString.h" | |
| | | #endif | |
| #ifndef ROOT_TSystem | | #ifndef ROOT_TSystem | |
| #include "TSystem.h" | | #include "TSystem.h" | |
| #endif | | #endif | |
| | | | |
|
| class TList; | | class TFileCollection; | |
| class TObjString; | | class TObjString; | |
| class TProof; | | class TProof; | |
| class TProofDesc; | | class TProofDesc; | |
| class TProofLog; | | class TProofLog; | |
| class TProofMgr; | | class TProofMgr; | |
| class TSignalHandler; | | class TSignalHandler; | |
| | | | |
| typedef TProofMgr *(*TProofMgr_t)(const char *, Int_t, const char *); | | typedef TProofMgr *(*TProofMgr_t)(const char *, Int_t, const char *); | |
| | | | |
| class TProofMgr : public TNamed { | | class TProofMgr : public TNamed { | |
| | | | |
| skipping to change at line 56 | | skipping to change at line 62 | |
| public: | | public: | |
| enum EServType { kProofd = 0, kXProofd = 1, kProofLite = 2 }; | | enum EServType { kProofd = 0, kXProofd = 1, kProofLite = 2 }; | |
| | | | |
| private: | | private: | |
| TProofMgr(const TProofMgr&); // Not implemented | | TProofMgr(const TProofMgr&); // Not implemented | |
| TProofMgr& operator=(const TProofMgr&); // Not implemented | | TProofMgr& operator=(const TProofMgr&); // Not implemented | |
| | | | |
| static TProofMgr_t fgTXProofMgrHook; // Constructor hooks for TXProofMgr | | static TProofMgr_t fgTXProofMgrHook; // Constructor hooks for TXProofMgr | |
| static TProofMgr_t GetXProofMgrHook(); | | static TProofMgr_t GetXProofMgrHook(); | |
| | | | |
|
| | | static void ReplaceSubdirs(const char *fn, TString &fdst, TList &dirph); | |
| | | | |
| protected: | | protected: | |
|
| | | TString fMssUrl; // URL for the remote data pool, if any | |
| Int_t fRemoteProtocol; // Protocol number run by the daemon ser
ver | | Int_t fRemoteProtocol; // Protocol number run by the daemon ser
ver | |
| EServType fServType; // Type of server: old-proofd, XrdProofd | | EServType fServType; // Type of server: old-proofd, XrdProofd | |
| TList *fSessions; // PROOF session managed by this server | | TList *fSessions; // PROOF session managed by this server | |
| TUrl fUrl; // Server URL | | TUrl fUrl; // Server URL | |
| | | | |
| TSignalHandler *fIntHandler; // Interrupt signal handler (ctrl-c) | | TSignalHandler *fIntHandler; // Interrupt signal handler (ctrl-c) | |
| | | | |
| static TList fgListOfManagers; // Sub-list of TROOT::ListOfProofs for
managers | | static TList fgListOfManagers; // Sub-list of TROOT::ListOfProofs for
managers | |
| | | | |
| TProofMgr() : fRemoteProtocol(-1), | | TProofMgr() : fRemoteProtocol(-1), | |
| | | | |
| skipping to change at line 85 | | skipping to change at line 94 | |
| virtual Bool_t IsValid() const { return kTRUE; } | | virtual Bool_t IsValid() const { return kTRUE; } | |
| virtual void SetInvalid() { } | | virtual void SetInvalid() { } | |
| void Close() { SetInvalid(); } | | void Close() { SetInvalid(); } | |
| | | | |
| virtual TProof *AttachSession(Int_t, Bool_t = kFALSE); | | virtual TProof *AttachSession(Int_t, Bool_t = kFALSE); | |
| virtual TProof *AttachSession(TProofDesc *, Bool_t = kFALSE); | | virtual TProof *AttachSession(TProofDesc *, Bool_t = kFALSE); | |
| virtual TProof *CreateSession(const char * = 0, const char * = 0, In
t_t = -1); | | virtual TProof *CreateSession(const char * = 0, const char * = 0, In
t_t = -1); | |
| virtual void DetachSession(Int_t, Option_t * = ""); | | virtual void DetachSession(Int_t, Option_t * = ""); | |
| virtual void DetachSession(TProof *, Option_t * = ""); | | virtual void DetachSession(TProof *, Option_t * = ""); | |
| virtual void DiscardSession(TProof *p); | | virtual void DiscardSession(TProof *p); | |
|
| | | virtual const char *GetMssUrl(Bool_t = kFALSE) { return fMssUrl.Data();
} | |
| virtual TProofDesc *GetProofDesc(Int_t id); | | virtual TProofDesc *GetProofDesc(Int_t id); | |
| virtual TProofDesc *GetProofDesc(TProof *p); | | virtual TProofDesc *GetProofDesc(TProof *p); | |
| virtual Int_t GetRemoteProtocol() const { return fRemoteProtocol;
} | | virtual Int_t GetRemoteProtocol() const { return fRemoteProtocol;
} | |
| virtual TProofLog *GetSessionLogs(Int_t = 0, const char * = 0, | | virtual TProofLog *GetSessionLogs(Int_t = 0, const char * = 0, | |
| const char * = "-v \"| SvcMsg\"", Boo
l_t = kFALSE) | | const char * = "-v \"| SvcMsg\"", Boo
l_t = kFALSE) | |
| { return (TProofLog *)0; } | | { return (TProofLog *)0; } | |
| virtual const char *GetUrl() { return fUrl.GetUrl(); } | | virtual const char *GetUrl() { return fUrl.GetUrl(); } | |
| virtual Bool_t MatchUrl(const char *url); | | virtual Bool_t MatchUrl(const char *url); | |
| virtual TList *QuerySessions(Option_t *opt = "S"); | | virtual TList *QuerySessions(Option_t *opt = "S"); | |
| virtual TObjString *ReadBuffer(const char *, Long64_t, Int_t) | | virtual TObjString *ReadBuffer(const char *, Long64_t, Int_t) | |
| { return (TObjString *)0; } | | { return (TObjString *)0; } | |
| virtual TObjString *ReadBuffer(const char *, const char *) | | virtual TObjString *ReadBuffer(const char *, const char *) | |
| { return (TObjString *)0; } | | { return (TObjString *)0; } | |
| virtual Int_t Reset(Bool_t hard = kFALSE, const char *usr = 0); | | virtual Int_t Reset(Bool_t hard = kFALSE, const char *usr = 0); | |
| virtual void ShowWorkers(); | | virtual void ShowWorkers(); | |
| virtual Int_t SendMsgToUsers(const char *, const char * = 0); | | virtual Int_t SendMsgToUsers(const char *, const char * = 0); | |
| virtual void SetAlias(const char *alias="") { TNamed::SetTitle(al
ias); } | | virtual void SetAlias(const char *alias="") { TNamed::SetTitle(al
ias); } | |
|
| | | virtual void SetMssUrl(const char *mss) { fMssUrl = mss; } | |
| virtual void SetROOTVersion(const char *) { } | | virtual void SetROOTVersion(const char *) { } | |
| virtual void ShowROOTVersions() { } | | virtual void ShowROOTVersions() { } | |
| virtual void ShutdownSession(Int_t id) { DetachSession(id,"S"); } | | virtual void ShutdownSession(Int_t id) { DetachSession(id,"S"); } | |
| virtual void ShutdownSession(TProof *p) { DetachSession(p,"S"); } | | virtual void ShutdownSession(TProof *p) { DetachSession(p,"S"); } | |
| | | | |
| // Remote file system actions | | // Remote file system actions | |
| virtual Int_t Cp(const char *, const char * = 0, const char * = 0)
{ return -1; } | | virtual Int_t Cp(const char *, const char * = 0, const char * = 0)
{ return -1; } | |
| virtual void Find(const char * = "~/", const char * = 0, const ch
ar * = 0) { } | | virtual void Find(const char * = "~/", const char * = 0, const ch
ar * = 0) { } | |
| virtual void Grep(const char *, const char * = 0, const char * =
0) { } | | virtual void Grep(const char *, const char * = 0, const char * =
0) { } | |
| virtual void Ls(const char * = "~/", const char * = 0, const char
* = 0) { } | | virtual void Ls(const char * = "~/", const char * = 0, const char
* = 0) { } | |
| | | | |
| skipping to change at line 129 | | skipping to change at line 140 | |
| virtual Int_t PutFile(const char *, const char *, const char * = 0
) { return -1; } | | virtual Int_t PutFile(const char *, const char *, const char * = 0
) { return -1; } | |
| | | | |
| static TList *GetListOfManagers(); | | static TList *GetListOfManagers(); | |
| | | | |
| static void SetTXProofMgrHook(TProofMgr_t pmh); | | static void SetTXProofMgrHook(TProofMgr_t pmh); | |
| | | | |
| static TProofMgr *Create(const char *url, Int_t loglevel = -1, | | static TProofMgr *Create(const char *url, Int_t loglevel = -1, | |
| const char *alias = 0, Bool_t xpd = kTRUE); | | const char *alias = 0, Bool_t xpd = kTRUE); | |
| static Int_t Ping(const char *url, Bool_t checkxrd = kFALSE); | | static Int_t Ping(const char *url, Bool_t checkxrd = kFALSE); | |
| | | | |
|
| | | static TFileCollection *UploadFiles(TList *src, const char *mss, const c | |
| | | har *dest = 0); | |
| | | static TFileCollection *UploadFiles(const char *txtfile, const char *mss | |
| | | , const char *dest = 0); | |
| | | | |
| ClassDef(TProofMgr,0) // Abstract PROOF manager interface | | ClassDef(TProofMgr,0) // Abstract PROOF manager interface | |
| }; | | }; | |
| | | | |
| // | | // | |
| // Metaclass describing the essentials of a PROOF session | | // Metaclass describing the essentials of a PROOF session | |
| // | | // | |
| class TProofDesc : public TNamed { | | class TProofDesc : public TNamed { | |
| public: | | public: | |
| enum EStatus { kUnknown = -1, kIdle = 0, kRunning =1, kShutdown = 2}; | | enum EStatus { kUnknown = -1, kIdle = 0, kRunning =1, kShutdown = 2}; | |
| | | | |
| | | | |
End of changes. 9 change blocks. |
| 2 lines changed or deleted | | 18 lines changed or added | |
|
| TProofPlayer.h | | TProofPlayer.h | |
|
| // @(#)root/proofplayer:$Id: TProofPlayer.h 44400 2012-05-31 13:42:20Z gani
s $ | | // @(#)root/proofplayer:$Id: TProofPlayer.h 43044 2012-02-17 14:34:52Z gani
s $ | |
| // Author: Maarten Ballintijn 07/01/02 | | // Author: Maarten Ballintijn 07/01/02 | |
| | | | |
| /************************************************************************* | | /************************************************************************* | |
| * Copyright (C) 1995-2001, Rene Brun and Fons Rademakers. * | | * Copyright (C) 1995-2001, Rene Brun and Fons Rademakers. * | |
| * All rights reserved. * | | * All rights reserved. * | |
| * * | | * * | |
| * For the licensing terms see $ROOTSYS/LICENSE. * | | * For the licensing terms see $ROOTSYS/LICENSE. * | |
| * For the list of contributors see $ROOTSYS/README/CREDITS. * | | * For the list of contributors see $ROOTSYS/README/CREDITS. * | |
| *************************************************************************/ | | *************************************************************************/ | |
| | | | |
| | | | |
| skipping to change at line 83 | | skipping to change at line 83 | |
| | | | |
| class TProofPlayer : public TVirtualProofPlayer { | | class TProofPlayer : public TVirtualProofPlayer { | |
| | | | |
| private: | | private: | |
| TList *fAutoBins; // Map of min/max values by name for slaves | | TList *fAutoBins; // Map of min/max values by name for slaves | |
| | | | |
| protected: | | protected: | |
| TList *fInput; //-> list with input objects | | TList *fInput; //-> list with input objects | |
| TList *fOutput; // list with output objects | | TList *fOutput; // list with output objects | |
| TSelector *fSelector; //! the latest selector | | TSelector *fSelector; //! the latest selector | |
|
| | | Bool_t fCreateSelObj; //! kTRUE when fSelector has been creat
ed locally | |
| TClass *fSelectorClass; //! class of the latest selector | | TClass *fSelectorClass; //! class of the latest selector | |
| TTimer *fFeedbackTimer; //! timer for sending intermediate resu
lts | | TTimer *fFeedbackTimer; //! timer for sending intermediate resu
lts | |
| Long_t fFeedbackPeriod; //! period (ms) for sending intermediat
e results | | Long_t fFeedbackPeriod; //! period (ms) for sending intermediat
e results | |
| TEventIter *fEvIter; //! iterator on events or objects | | TEventIter *fEvIter; //! iterator on events or objects | |
| TStatus *fSelStatus; //! status of query in progress | | TStatus *fSelStatus; //! status of query in progress | |
| EExitStatus fExitStatus; // exit status | | EExitStatus fExitStatus; // exit status | |
| Long64_t fTotalEvents; // number of events requested | | Long64_t fTotalEvents; // number of events requested | |
| TProofProgressStatus *fProgressStatus; // the progress status object; | | TProofProgressStatus *fProgressStatus; // the progress status object; | |
| | | | |
| TList *fQueryResults; //List of TQueryResult | | TList *fQueryResults; //List of TQueryResult | |
| | | | |
| skipping to change at line 125 | | skipping to change at line 126 | |
| | | | |
| protected: | | protected: | |
| class TCleanup { | | class TCleanup { | |
| private: | | private: | |
| TProofPlayer *fPlayer; | | TProofPlayer *fPlayer; | |
| public: | | public: | |
| TCleanup(TProofPlayer *p) : fPlayer(p) { } | | TCleanup(TProofPlayer *p) : fPlayer(p) { } | |
| ~TCleanup() { fPlayer->StopFeedback(); } | | ~TCleanup() { fPlayer->StopFeedback(); } | |
| }; | | }; | |
| | | | |
|
| | | Int_t AssertSelector(const char *selector_file); | |
| Bool_t CheckMemUsage(Long64_t &mfreq, Bool_t &w80r, Bool_t &w80v, TStrin
g &wmsg); | | Bool_t CheckMemUsage(Long64_t &mfreq, Bool_t &w80r, Bool_t &w80v, TStrin
g &wmsg); | |
| | | | |
| void MapOutputListToDataMembers() const; | | void MapOutputListToDataMembers() const; | |
| | | | |
| public: | | public: | |
| enum EStatusBits { kDispatchOneEvent = BIT(15), kIsProcessing = BIT(16)
}; | | enum EStatusBits { kDispatchOneEvent = BIT(15), kIsProcessing = BIT(16)
}; | |
| | | | |
| TProofPlayer(TProof *proof = 0); | | TProofPlayer(TProof *proof = 0); | |
| virtual ~TProofPlayer(); | | virtual ~TProofPlayer(); | |
| | | | |
| Long64_t Process(TDSet *set, | | Long64_t Process(TDSet *set, | |
| const char *selector, Option_t *option = "", | | const char *selector, Option_t *option = "", | |
| Long64_t nentries = -1, Long64_t firstentry = 0); | | Long64_t nentries = -1, Long64_t firstentry = 0); | |
|
| | | Long64_t Process(TDSet *set, | |
| | | TSelector *selector, Option_t *option = "", | |
| | | Long64_t nentries = -1, Long64_t firstentry = 0); | |
| TVirtualPacketizer *GetPacketizer() const { return 0; } | | TVirtualPacketizer *GetPacketizer() const { return 0; } | |
| Long64_t Finalize(Bool_t force = kFALSE, Bool_t sync = kFALSE); | | Long64_t Finalize(Bool_t force = kFALSE, Bool_t sync = kFALSE); | |
| Long64_t Finalize(TQueryResult *qr); | | Long64_t Finalize(TQueryResult *qr); | |
| Long64_t DrawSelect(TDSet *set, const char *varexp, | | Long64_t DrawSelect(TDSet *set, const char *varexp, | |
| const char *selection, Option_t *option = "", | | const char *selection, Option_t *option = "", | |
| Long64_t nentries = -1, Long64_t firstentry = 0); | | Long64_t nentries = -1, Long64_t firstentry = 0); | |
| Int_t GetDrawArgs(const char *var, const char *sel, Option_t *opt, | | Int_t GetDrawArgs(const char *var, const char *sel, Option_t *opt, | |
| TString &selector, TString &objname); | | TString &selector, TString &objname); | |
| void HandleGetTreeHeader(TMessage *mess); | | void HandleGetTreeHeader(TMessage *mess); | |
| void HandleRecvHisto(TMessage *mess); | | void HandleRecvHisto(TMessage *mess); | |
| | | | |
| skipping to change at line 263 | | skipping to change at line 268 | |
| | | | |
| protected: | | protected: | |
| TProof *fProof; // link to associated PROOF session | | TProof *fProof; // link to associated PROOF session | |
| TList *fOutputLists; // results returned by slaves | | TList *fOutputLists; // results returned by slaves | |
| TList *fFeedback; // reference for use on master | | TList *fFeedback; // reference for use on master | |
| TList *fFeedbackLists; // intermediate results | | TList *fFeedbackLists; // intermediate results | |
| TVirtualPacketizer *fPacketizer; // transform TDSet into packets for
slaves | | TVirtualPacketizer *fPacketizer; // transform TDSet into packets for
slaves | |
| Bool_t fMergeFiles; // is True when merging output files
centrally is needed | | Bool_t fMergeFiles; // is True when merging output files
centrally is needed | |
| TDSet *fDSet; //!tdset for current processing | | TDSet *fDSet; //!tdset for current processing | |
| ErrorHandlerFunc_t fErrorHandler; // Store previous handler when redir
ecting output | | ErrorHandlerFunc_t fErrorHandler; // Store previous handler when redir
ecting output | |
|
| Bool_t fMergeTH1OneByOne; // If kTRUE forces TH1 merge one
-by-one [kTRUE] | | Bool_t fUseTH1Merge; // If kTRUE forces use of TH1::Merge
[kFALSE] | |
| | | | |
| virtual Bool_t HandleTimer(TTimer *timer); | | virtual Bool_t HandleTimer(TTimer *timer); | |
| Int_t InitPacketizer(TDSet *dset, Long64_t nentries, | | Int_t InitPacketizer(TDSet *dset, Long64_t nentries, | |
| Long64_t first, const char *defpackunit, | | Long64_t first, const char *defpackunit, | |
| const char *defpackdata); | | const char *defpackdata); | |
| TList *MergeFeedback(); | | TList *MergeFeedback(); | |
| Bool_t MergeOutputFiles(); | | Bool_t MergeOutputFiles(); | |
| void NotifyMemory(TObject *obj); | | void NotifyMemory(TObject *obj); | |
| void SetLastMergingMsg(TObject *obj); | | void SetLastMergingMsg(TObject *obj); | |
| virtual Bool_t SendSelector(const char *selector_file); //send selector
to slaves | | virtual Bool_t SendSelector(const char *selector_file); //send selector
to slaves | |
| TProof *GetProof() const { return fProof; } | | TProof *GetProof() const { return fProof; } | |
| void SetupFeedback(); // specialized setup | | void SetupFeedback(); // specialized setup | |
| void StopFeedback(); // specialized teardown | | void StopFeedback(); // specialized teardown | |
| void SetSelectorDataMembersFromOutputList(); | | void SetSelectorDataMembersFromOutputList(); | |
| | | | |
| public: | | public: | |
| TProofPlayerRemote(TProof *proof = 0) : fProof(proof), fOutputLists(0),
fFeedback(0), | | TProofPlayerRemote(TProof *proof = 0) : fProof(proof), fOutputLists(0),
fFeedback(0), | |
| fFeedbackLists(0), fPacketizer(0
), | | fFeedbackLists(0), fPacketizer(0
), | |
| fMergeFiles(kFALSE), fDSet(0), f
ErrorHandler(0), | | fMergeFiles(kFALSE), fDSet(0), f
ErrorHandler(0), | |
|
| fMergeTH1OneByOne(kTRUE) | | fUseTH1Merge(kFALSE) | |
| { fProgressStatus = new TProofPr
ogressStatus(); } | | { fProgressStatus = new TProofPr
ogressStatus(); } | |
| virtual ~TProofPlayerRemote(); // Owns the fOutput list | | virtual ~TProofPlayerRemote(); // Owns the fOutput list | |
| virtual Long64_t Process(TDSet *set, const char *selector, | | virtual Long64_t Process(TDSet *set, const char *selector, | |
| Option_t *option = "", Long64_t nentries = -1, | | Option_t *option = "", Long64_t nentries = -1, | |
| Long64_t firstentry = 0); | | Long64_t firstentry = 0); | |
|
| | | virtual Long64_t Process(TDSet *set, TSelector *selector, | |
| | | Option_t *option = "", Long64_t nentries = -1, | |
| | | Long64_t firstentry = 0); | |
| virtual Long64_t Finalize(Bool_t force = kFALSE, Bool_t sync = kFALSE); | | virtual Long64_t Finalize(Bool_t force = kFALSE, Bool_t sync = kFALSE); | |
| virtual Long64_t Finalize(TQueryResult *qr); | | virtual Long64_t Finalize(TQueryResult *qr); | |
| Long64_t DrawSelect(TDSet *set, const char *varexp, | | Long64_t DrawSelect(TDSet *set, const char *varexp, | |
| const char *selection, Option_t *option = "", | | const char *selection, Option_t *option = "", | |
| Long64_t nentries = -1, Long64_t firstentry =
0); | | Long64_t nentries = -1, Long64_t firstentry =
0); | |
| | | | |
| void RedirectOutput(Bool_t on = kTRUE); | | void RedirectOutput(Bool_t on = kTRUE); | |
| void StopProcess(Bool_t abort, Int_t timeout = -1); | | void StopProcess(Bool_t abort, Int_t timeout = -1); | |
| void StoreOutput(TList *out); // Adopts the list | | void StoreOutput(TList *out); // Adopts the list | |
| virtual void StoreFeedback(TObject *slave, TList *out); // Adopts the
list | | virtual void StoreFeedback(TObject *slave, TList *out); // Adopts the
list | |
| | | | |
| skipping to change at line 381 | | skipping to change at line 389 | |
| void SetupFeedback(); | | void SetupFeedback(); | |
| | | | |
| public: | | public: | |
| TProofPlayerSuperMaster(TProof *proof = 0) : | | TProofPlayerSuperMaster(TProof *proof = 0) : | |
| TProofPlayerRemote(proof), fReturnFeedback(kFALSE) { } | | TProofPlayerRemote(proof), fReturnFeedback(kFALSE) { } | |
| virtual ~TProofPlayerSuperMaster() { } | | virtual ~TProofPlayerSuperMaster() { } | |
| | | | |
| Long64_t Process(TDSet *set, const char *selector, | | Long64_t Process(TDSet *set, const char *selector, | |
| Option_t *option = "", Long64_t nentries = -1, | | Option_t *option = "", Long64_t nentries = -1, | |
| Long64_t firstentry = 0); | | Long64_t firstentry = 0); | |
|
| | | Long64_t Process(TDSet *set, TSelector *selector, | |
| | | Option_t *option = "", Long64_t nentries = -1, | |
| | | Long64_t firstentry = 0) | |
| | | { return TProofPlayerRemote::Process(set, selector, opt | |
| | | ion, | |
| | | nentries, firstent | |
| | | ry); } | |
| void Progress(Long64_t total, Long64_t processed) | | void Progress(Long64_t total, Long64_t processed) | |
| { TProofPlayerRemote::Progress(total, processed); } | | { TProofPlayerRemote::Progress(total, processed); } | |
| void Progress(Long64_t total, Long64_t processed, Long64_t bytesread, | | void Progress(Long64_t total, Long64_t processed, Long64_t bytesread, | |
| Float_t initTime, Float_t procTime, | | Float_t initTime, Float_t procTime, | |
| Float_t evtrti, Float_t mbrti) | | Float_t evtrti, Float_t mbrti) | |
| { TProofPlayerRemote::Progress(total, processed, bytesr
ead, | | { TProofPlayerRemote::Progress(total, processed, bytesr
ead, | |
| initTime, procTime, evtr
ti, mbrti); } | | initTime, procTime, evtr
ti, mbrti); } | |
| void Progress(TProofProgressInfo *pi) { TProofPlayerRemote::Progress(pi
); } | | void Progress(TProofProgressInfo *pi) { TProofPlayerRemote::Progress(pi
); } | |
| void Progress(TSlave *sl, Long64_t total, Long64_t processed); | | void Progress(TSlave *sl, Long64_t total, Long64_t processed); | |
| void Progress(TSlave *sl, Long64_t total, Long64_t processed, Long64_t
bytesread, | | void Progress(TSlave *sl, Long64_t total, Long64_t processed, Long64_t
bytesread, | |
| | | | |
End of changes. 8 change blocks. |
| 3 lines changed or deleted | | 18 lines changed or added | |
|
| TProofSuperMaster.h | | TProofSuperMaster.h | |
|
| // @(#)root/proof:$Id: TProofSuperMaster.h 27171 2009-01-16 16:04:00Z ganis
$ | | // @(#)root/proof:$Id: TProofSuperMaster.h 43044 2012-02-17 14:34:52Z ganis
$ | |
| // Author: Fons Rademakers 13/02/97 | | // Author: Fons Rademakers 13/02/97 | |
| | | | |
| /************************************************************************* | | /************************************************************************* | |
| * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * | | * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * | |
| * All rights reserved. * | | * All rights reserved. * | |
| * * | | * * | |
| * For the licensing terms see $ROOTSYS/LICENSE. * | | * For the licensing terms see $ROOTSYS/LICENSE. * | |
| * For the list of contributors see $ROOTSYS/README/CREDITS. * | | * For the list of contributors see $ROOTSYS/README/CREDITS. * | |
| *************************************************************************/ | | *************************************************************************/ | |
| | | | |
| | | | |
| skipping to change at line 63 | | skipping to change at line 63 | |
| Long64_t firstentry = 0); | | Long64_t firstentry = 0); | |
| Long64_t Process(TFileCollection *fc, const char *sel, Option_t *o = "", | | Long64_t Process(TFileCollection *fc, const char *sel, Option_t *o = "", | |
| Long64_t nent = -1, Long64_t fst = 0) | | Long64_t nent = -1, Long64_t fst = 0) | |
| { return TProof::Process(fc, sel, o, nent, fst); } | | { return TProof::Process(fc, sel, o, nent, fst); } | |
| Long64_t Process(const char *dsname, const char *sel, | | Long64_t Process(const char *dsname, const char *sel, | |
| Option_t *o = "", Long64_t nent = -1, | | Option_t *o = "", Long64_t nent = -1, | |
| Long64_t fst = 0, TObject *enl = 0) | | Long64_t fst = 0, TObject *enl = 0) | |
| { return TProof::Process(dsname, sel, o, nent, fst, enl
); } | | { return TProof::Process(dsname, sel, o, nent, fst, enl
); } | |
| Long64_t Process(const char *sel, Long64_t nent, Option_t *o = "") | | Long64_t Process(const char *sel, Long64_t nent, Option_t *o = "") | |
| { return TProof::Process(sel, nent, o); } | | { return TProof::Process(sel, nent, o); } | |
|
| | | // Process via TSelector | |
| | | Long64_t Process(TDSet *set, TSelector *selector, | |
| | | Option_t *option = "", Long64_t nentries = -1, | |
| | | Long64_t firstentry = 0) | |
| | | { return TProof::Process(set, selector, option, nentrie | |
| | | s, firstentry); } | |
| | | Long64_t Process(TFileCollection *fc, TSelector *sel, Option_t *o = "", | |
| | | Long64_t nent = -1, Long64_t fst = 0) | |
| | | { return TProof::Process(fc, sel, o, nent, fst); } | |
| | | Long64_t Process(const char *dsname, TSelector *sel, | |
| | | Option_t *o = "", Long64_t nent = -1, | |
| | | Long64_t fst = 0, TObject *enl = 0) | |
| | | { return TProof::Process(dsname, sel, o, nent, fst, enl | |
| | | ); } | |
| | | Long64_t Process(TSelector *sel, Long64_t nent, Option_t *o = "") | |
| | | { return TProof::Process(sel, nent, o); } | |
| | | | |
| ClassDef(TProofSuperMaster,0) //PROOF control class for making submaster
s | | ClassDef(TProofSuperMaster,0) //PROOF control class for making submaster
s | |
| }; | | }; | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 2 change blocks. |
| 1 lines changed or deleted | | 17 lines changed or added | |
|
| TSelector.h | | TSelector.h | |
|
| // @(#)root/tree:$Id: TSelector.h 38869 2011-04-15 11:29:04Z pcanal $ | | // @(#)root/tree:$Id: TSelector.h 43038 2012-02-16 20:33:22Z pcanal $ | |
| // Author: Rene Brun 05/02/97 | | // Author: Rene Brun 05/02/97 | |
| | | | |
| /************************************************************************* | | /************************************************************************* | |
| * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * | | * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * | |
| * All rights reserved. * | | * All rights reserved. * | |
| * * | | * * | |
| * For the licensing terms see $ROOTSYS/LICENSE. * | | * For the licensing terms see $ROOTSYS/LICENSE. * | |
| * For the list of contributors see $ROOTSYS/README/CREDITS. * | | * For the list of contributors see $ROOTSYS/README/CREDITS. * | |
| *************************************************************************/ | | *************************************************************************/ | |
| | | | |
| | | | |
| skipping to change at line 41 | | skipping to change at line 41 | |
| #endif | | #endif | |
| | | | |
| class TTree; | | class TTree; | |
| | | | |
| class TSelector : public TObject { | | class TSelector : public TObject { | |
| | | | |
| public: | | public: | |
| enum EAbort { kContinue, kAbortProcess, kAbortFile }; | | enum EAbort { kContinue, kAbortProcess, kAbortFile }; | |
| | | | |
| protected: | | protected: | |
|
| Long64_t fStatus; //selector status | | Long64_t fStatus; // Selector status | |
| EAbort fAbort; //abort status | | EAbort fAbort; // Abort status | |
| TString fOption; //option given to TTree::Process | | TString fOption; // Option given to TTree::Process | |
| TObject *fObject; //current object if processing object (vs. TTre | | TObject *fObject; //!Current object if processing object (vs. TTr | |
| e) | | ee) | |
| TList *fInput; //list of objects available during processing | | TList *fInput; // List of objects available during processing | |
| TSelectorList *fOutput; //list of objects created during processing | | TSelectorList *fOutput; //!List of objects created during processing | |
| | | | |
| private: | | private: | |
| TSelector(const TSelector&); // not implemented | | TSelector(const TSelector&); // not implemented | |
| TSelector& operator=(const TSelector&); // not implemented | | TSelector& operator=(const TSelector&); // not implemented | |
| | | | |
| public: | | public: | |
| TSelector(); | | TSelector(); | |
| virtual ~TSelector(); | | virtual ~TSelector(); | |
| | | | |
| virtual int Version() const { return 0; } | | virtual int Version() const { return 0; } | |
| virtual void Init(TTree *) { } | | virtual void Init(TTree *) { } | |
| virtual void Begin(TTree *) { } | | virtual void Begin(TTree *) { } | |
| virtual void SlaveBegin(TTree *) { } | | virtual void SlaveBegin(TTree *) { } | |
| virtual Bool_t Notify() { return kTRUE; } | | virtual Bool_t Notify() { return kTRUE; } | |
| virtual const char *GetOption() const { return fOption; } | | virtual const char *GetOption() const { return fOption; } | |
| virtual Long64_t GetStatus() const { return fStatus; } | | virtual Long64_t GetStatus() const { return fStatus; } | |
| virtual Int_t GetEntry(Long64_t /*entry*/, Int_t /*getall*/ = 0) {
return 0; } | | virtual Int_t GetEntry(Long64_t /*entry*/, Int_t /*getall*/ = 0) {
return 0; } | |
|
| virtual Bool_t ProcessCut(Long64_t /*entry*/) { return kTRUE; } | | virtual Bool_t ProcessCut(Long64_t /*entry*/); | |
| virtual void ProcessFill(Long64_t /*entry*/) { } | | virtual void ProcessFill(Long64_t /*entry*/); | |
| virtual Bool_t Process(Long64_t /*entry*/) { return kFALSE; } | | virtual Bool_t Process(Long64_t /*entry*/); | |
| virtual void SetOption(const char *option) { fOption = option; } | | virtual void SetOption(const char *option) { fOption = option; } | |
| virtual void SetObject(TObject *obj) { fObject = obj; } | | virtual void SetObject(TObject *obj) { fObject = obj; } | |
| virtual void SetInputList(TList *input) { fInput = input; } | | virtual void SetInputList(TList *input) { fInput = input; } | |
| virtual void SetStatus(Long64_t status) { fStatus = status; } | | virtual void SetStatus(Long64_t status) { fStatus = status; } | |
|
| | | virtual TList *GetInputList() const { return fInput; } | |
| virtual TList *GetOutputList() const { return fOutput; } | | virtual TList *GetOutputList() const { return fOutput; } | |
| virtual void SlaveTerminate() { } | | virtual void SlaveTerminate() { } | |
| virtual void Terminate() { } | | virtual void Terminate() { } | |
| virtual void Abort(const char *why, EAbort what = kAbortProcess); | | virtual void Abort(const char *why, EAbort what = kAbortProcess); | |
| virtual EAbort GetAbort() const { return fAbort; } | | virtual EAbort GetAbort() const { return fAbort; } | |
| virtual void ResetAbort() { fAbort = kContinue; } | | virtual void ResetAbort() { fAbort = kContinue; } | |
| | | | |
| static TSelector *GetSelector(const char *filename); | | static TSelector *GetSelector(const char *filename); | |
| static Bool_t IsStandardDraw(const char *selec); | | static Bool_t IsStandardDraw(const char *selec); | |
| | | | |
|
| ClassDef(TSelector,0) //A utility class for tree and object processing | | ClassDef(TSelector,2) //A utility class for tree and object processing | |
| }; | | }; | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 5 change blocks. |
| 12 lines changed or deleted | | 13 lines changed or added | |
|
| TString.h | | TString.h | |
|
| // @(#)root/base:$Id: TString.h 40340 2011-07-23 16:57:07Z rdm $ | | // @(#)root/base:$Id: TString.h 43133 2012-02-27 09:50:10Z rdm $ | |
| // Author: Fons Rademakers 04/08/95 | | // Author: Fons Rademakers 04/08/95 | |
| | | | |
| /************************************************************************* | | /************************************************************************* | |
| * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * | | * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * | |
| * All rights reserved. * | | * All rights reserved. * | |
| * * | | * * | |
| * For the licensing terms see $ROOTSYS/LICENSE. * | | * For the licensing terms see $ROOTSYS/LICENSE. * | |
| * For the list of contributors see $ROOTSYS/README/CREDITS. * | | * For the list of contributors see $ROOTSYS/README/CREDITS. * | |
| *************************************************************************/ | | *************************************************************************/ | |
| | | | |
| | | | |
| skipping to change at line 265 | | skipping to change at line 265 | |
| TString(const char *s); // Copy to embedded null | | TString(const char *s); // Copy to embedded null | |
| TString(const char *s, Ssiz_t n); // Copy past any embedded nulls | | TString(const char *s, Ssiz_t n); // Copy past any embedded nulls | |
| TString(const std::string &s); | | TString(const std::string &s); | |
| TString(char c); | | TString(char c); | |
| TString(char c, Ssiz_t s); | | TString(char c, Ssiz_t s); | |
| TString(const TSubString &sub); | | TString(const TSubString &sub); | |
| | | | |
| virtual ~TString(); | | virtual ~TString(); | |
| | | | |
| // ROOT I/O interface | | // ROOT I/O interface | |
|
| virtual void FillBuffer(char *&buffer); | | virtual void FillBuffer(char *&buffer) const; | |
| virtual void ReadBuffer(char *&buffer); | | virtual void ReadBuffer(char *&buffer); | |
| virtual Int_t Sizeof() const; | | virtual Int_t Sizeof() const; | |
| | | | |
| static TString *ReadString(TBuffer &b, const TClass *clReq); | | static TString *ReadString(TBuffer &b, const TClass *clReq); | |
| static void WriteString(TBuffer &b, const TString *a); | | static void WriteString(TBuffer &b, const TString *a); | |
| | | | |
| friend TBuffer &operator<<(TBuffer &b, const TString *obj); | | friend TBuffer &operator<<(TBuffer &b, const TString *obj); | |
| | | | |
| // C I/O interface | | // C I/O interface | |
| Bool_t Gets(FILE *fp, Bool_t chop=kTRUE); | | Bool_t Gets(FILE *fp, Bool_t chop=kTRUE); | |
| | | | |
| skipping to change at line 371 | | skipping to change at line 371 | |
| TString &Insert(Ssiz_t pos, const char *s); | | TString &Insert(Ssiz_t pos, const char *s); | |
| TString &Insert(Ssiz_t pos, const char *s, Ssiz_t extent); | | TString &Insert(Ssiz_t pos, const char *s, Ssiz_t extent); | |
| TString &Insert(Ssiz_t pos, const TString &s); | | TString &Insert(Ssiz_t pos, const TString &s); | |
| TString &Insert(Ssiz_t pos, const TString &s, Ssiz_t extent); | | TString &Insert(Ssiz_t pos, const TString &s, Ssiz_t extent); | |
| Bool_t IsAscii() const; | | Bool_t IsAscii() const; | |
| Bool_t IsAlpha() const; | | Bool_t IsAlpha() const; | |
| Bool_t IsAlnum() const; | | Bool_t IsAlnum() const; | |
| Bool_t IsDigit() const; | | Bool_t IsDigit() const; | |
| Bool_t IsFloat() const; | | Bool_t IsFloat() const; | |
| Bool_t IsHex() const; | | Bool_t IsHex() const; | |
|
| | | Bool_t IsBin() const; | |
| | | Bool_t IsOct() const; | |
| | | Bool_t IsDec() const; | |
| | | Bool_t IsInBaseN(Int_t base) const; | |
| Bool_t IsNull() const { return Length() == 0; } | | Bool_t IsNull() const { return Length() == 0; } | |
| Bool_t IsWhitespace() const { return (Length() == CountChar(' ')
); } | | Bool_t IsWhitespace() const { return (Length() == CountChar(' ')
); } | |
| Ssiz_t Last(char c) const; | | Ssiz_t Last(char c) const; | |
| Ssiz_t Length() const { return IsLong() ? GetLongSize() :
GetShortSize(); } | | Ssiz_t Length() const { return IsLong() ? GetLongSize() :
GetShortSize(); } | |
| Bool_t MaybeRegexp() const; | | Bool_t MaybeRegexp() const; | |
| Bool_t MaybeWildcard() const; | | Bool_t MaybeWildcard() const; | |
|
| | | TString MD5() const; | |
| TString &Prepend(const char *cs); // Prepend a character string | | TString &Prepend(const char *cs); // Prepend a character string | |
| TString &Prepend(const char *cs, Ssiz_t n); | | TString &Prepend(const char *cs, Ssiz_t n); | |
| TString &Prepend(const TString &s); | | TString &Prepend(const TString &s); | |
| TString &Prepend(const TString &s, Ssiz_t n); | | TString &Prepend(const TString &s, Ssiz_t n); | |
| TString &Prepend(char c, Ssiz_t rep = 1); // Prepend c rep times | | TString &Prepend(char c, Ssiz_t rep = 1); // Prepend c rep times | |
| istream &ReadFile(istream &str); // Read to EOF or null charact
er | | istream &ReadFile(istream &str); // Read to EOF or null charact
er | |
| istream &ReadLine(istream &str, | | istream &ReadLine(istream &str, | |
| Bool_t skipWhite = kTRUE); // Read to EOF or new
line | | Bool_t skipWhite = kTRUE); // Read to EOF or new
line | |
| istream &ReadString(istream &str); // Read to EOF or nul
l character | | istream &ReadString(istream &str); // Read to EOF or nul
l character | |
| istream &ReadToDelim(istream &str, char delim = '\n'); // Read to EO
F or delimitor | | istream &ReadToDelim(istream &str, char delim = '\n'); // Read to EO
F or delimitor | |
| | | | |
| skipping to change at line 415 | | skipping to change at line 420 | |
| Bool_t Tokenize(TString &tok, Ssiz_t &from, const char *delim = "
") const; | | Bool_t Tokenize(TString &tok, Ssiz_t &from, const char *delim = "
") const; | |
| | | | |
| // Static member functions | | // Static member functions | |
| static UInt_t Hash(const void *txt, Int_t ntxt); // Calculates hash
index from any char string. | | static UInt_t Hash(const void *txt, Int_t ntxt); // Calculates hash
index from any char string. | |
| static Ssiz_t InitialCapacity(Ssiz_t ic = 15); // Initial allocati
on capacity | | static Ssiz_t InitialCapacity(Ssiz_t ic = 15); // Initial allocati
on capacity | |
| static Ssiz_t MaxWaste(Ssiz_t mw = 15); // Max empty space
before reclaim | | static Ssiz_t MaxWaste(Ssiz_t mw = 15); // Max empty space
before reclaim | |
| static Ssiz_t ResizeIncrement(Ssiz_t ri = 16); // Resizing increme
nt | | static Ssiz_t ResizeIncrement(Ssiz_t ri = 16); // Resizing increme
nt | |
| static Ssiz_t GetInitialCapacity(); | | static Ssiz_t GetInitialCapacity(); | |
| static Ssiz_t GetResizeIncrement(); | | static Ssiz_t GetResizeIncrement(); | |
| static Ssiz_t GetMaxWaste(); | | static Ssiz_t GetMaxWaste(); | |
|
| | | static TString Itoa ( Int_t value, Int_t base); // Converts int to | |
| | | string with respect to the base specified (2-36) | |
| | | static TString UItoa ( UInt_t value, Int_t base); | |
| | | static TString LLtoa ( Long64_t value, Int_t base); | |
| | | static TString ULLtoa (ULong64_t value, Int_t base); | |
| | | static TString BaseConvert(const TString& s_in, Int_t base_in, Int_t bas | |
| | | e_out); // Converts string from base base_in to base base_out (supported b | |
| | | ases 2-36) | |
| static TString Format(const char *fmt, ...) | | static TString Format(const char *fmt, ...) | |
| #if defined(__GNUC__) && !defined(__CINT__) | | #if defined(__GNUC__) && !defined(__CINT__) | |
| __attribute__((format(printf, 1, 2))) | | __attribute__((format(printf, 1, 2))) | |
| #endif | | #endif | |
| ; | | ; | |
| | | | |
| ClassDef(TString,2) //Basic string class | | ClassDef(TString,2) //Basic string class | |
| }; | | }; | |
| | | | |
| // Related global functions | | // Related global functions | |
| | | | |
End of changes. 5 change blocks. |
| 2 lines changed or deleted | | 15 lines changed or added | |
|
| TTable.h | | TTable.h | |
|
| // @(#)root/table:$Id: TTable.h 34910 2010-08-20 18:21:43Z pcanal $ | | // @(#)root/table:$Id: TTable.h 43213 2012-03-02 04:59:38Z pcanal $ | |
| // Author: Valery Fine(fine@mail.cern.ch) 03/07/98 | | // Author: Valery Fine(fine@mail.cern.ch) 03/07/98 | |
| | | | |
| /************************************************************************* | | /************************************************************************* | |
| * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * | | * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * | |
| * All rights reserved. * | | * All rights reserved. * | |
| * * | | * * | |
| * For the licensing terms see $ROOTSYS/LICENSE. * | | * For the licensing terms see $ROOTSYS/LICENSE. * | |
| * For the list of contributors see $ROOTSYS/README/CREDITS. * | | * For the list of contributors see $ROOTSYS/README/CREDITS. * | |
| *************************************************************************/ | | *************************************************************************/ | |
| | | | |
| | | | |
| skipping to change at line 199 | | skipping to change at line 199 | |
| vec_iterator fCurrentRow; | | vec_iterator fCurrentRow; | |
| public: | | public: | |
| iterator(): fRowSize(0), fThisTable(0) {;} | | iterator(): fRowSize(0), fThisTable(0) {;} | |
| iterator(const TTable &table, vec_iterator &arowPtr) : | | iterator(const TTable &table, vec_iterator &arowPtr) : | |
| fRowSize(table.GetRowSize()), fThisTable(&table), fCurrentRow(a
rowPtr) {;} | | fRowSize(table.GetRowSize()), fThisTable(&table), fCurrentRow(a
rowPtr) {;} | |
| iterator(const TTable &table, vec_const_iterator &arowPtr) : | | iterator(const TTable &table, vec_const_iterator &arowPtr) : | |
| fRowSize(table.GetRowSize()), fThisTable(&table), | | fRowSize(table.GetRowSize()), fThisTable(&table), | |
| fCurrentRow(*(std::vector<Long_t>::iterator *)(void *)&arowPtr)
{;} | | fCurrentRow(*(std::vector<Long_t>::iterator *)(void *)&arowPtr)
{;} | |
| //fCurrentRow(* const_cast<vector<Long_t>::iterator *>(&arowPtr
) ) {;} | | //fCurrentRow(* const_cast<vector<Long_t>::iterator *>(&arowPtr
) ) {;} | |
| iterator(const iterator& iter) : fRowSize (iter.fRowSize), fThisTa
ble(iter.fThisTable),fCurrentRow(iter.fCurrentRow){} | | iterator(const iterator& iter) : fRowSize (iter.fRowSize), fThisTa
ble(iter.fThisTable),fCurrentRow(iter.fCurrentRow){} | |
|
| void operator=(const iterator& iter) { fRowSize = iter.fRowSize;
fThisTable = iter.fThisTable; fCurrentRow=iter.fCurrentRow; } | | iterator &operator=(const iterator& iter) { fRowSize = iter.fRow
Size; fThisTable = iter.fThisTable; fCurrentRow=iter.fCurrentRow; return *t
his; } | |
| void operator++() { ++fCurrentRow; } | | void operator++() { ++fCurrentRow; } | |
| void operator++(int) { fCurrentRow++; } | | void operator++(int) { fCurrentRow++; } | |
| void operator--() { --fCurrentRow; } | | void operator--() { --fCurrentRow; } | |
| void operator--(int) { fCurrentRow--; } | | void operator--(int) { fCurrentRow--; } | |
| iterator operator+(Int_t idx) { std::vector<Long_t>::iterator ad
dition = fCurrentRow+idx; return iterator(*fThisTable,addition); } | | iterator operator+(Int_t idx) { std::vector<Long_t>::iterator ad
dition = fCurrentRow+idx; return iterator(*fThisTable,addition); } | |
| iterator operator-(Int_t idx) { std::vector<Long_t>::iterator su
btraction = fCurrentRow-idx; return iterator(*fThisTable,subtraction); } | | iterator operator-(Int_t idx) { std::vector<Long_t>::iterator su
btraction = fCurrentRow-idx; return iterator(*fThisTable,subtraction); } | |
| void operator+=(Int_t idx) { fCurrentRow+=idx; } | | void operator+=(Int_t idx) { fCurrentRow+=idx; } | |
| void operator-=(Int_t idx) { fCurrentRow-=idx; } | | void operator-=(Int_t idx) { fCurrentRow-=idx; } | |
| void *rowPtr() const { return (void *)(((const char *)fThisTable-
>GetArray()) + (*fCurrentRow)*fRowSize ); } | | void *rowPtr() const { return (void *)(((const char *)fThisTable-
>GetArray()) + (*fCurrentRow)*fRowSize ); } | |
| operator void *() const { return rowPtr(); } | | operator void *() const { return rowPtr(); } | |
| | | | |
End of changes. 2 change blocks. |
| 2 lines changed or deleted | | 2 lines changed or added | |
|
| TTree.h | | TTree.h | |
|
| // @(#)root/tree:$Id: TTree.h 44281 2012-05-18 06:06:55Z pcanal $ | | // @(#)root/tree:$Id: TTree.h 41101 2011-10-03 16:23:48Z pcanal $ | |
| // Author: Rene Brun 12/01/96 | | // Author: Rene Brun 12/01/96 | |
| | | | |
| /************************************************************************* | | /************************************************************************* | |
| * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * | | * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * | |
| * All rights reserved. * | | * All rights reserved. * | |
| * * | | * * | |
| * For the licensing terms see $ROOTSYS/LICENSE. * | | * For the licensing terms see $ROOTSYS/LICENSE. * | |
| * For the list of contributors see $ROOTSYS/README/CREDITS. * | | * For the list of contributors see $ROOTSYS/README/CREDITS. * | |
| *************************************************************************/ | | *************************************************************************/ | |
| | | | |
| | | | |
| skipping to change at line 486 | | skipping to change at line 486 | |
| virtual void Refresh(); | | virtual void Refresh(); | |
| virtual void RecursiveRemove(TObject *obj); | | virtual void RecursiveRemove(TObject *obj); | |
| virtual void RemoveFriend(TTree*); | | virtual void RemoveFriend(TTree*); | |
| virtual void Reset(Option_t* option = ""); | | virtual void Reset(Option_t* option = ""); | |
| virtual void ResetAfterMerge(TFileMergeInfo *); | | virtual void ResetAfterMerge(TFileMergeInfo *); | |
| virtual void ResetBranchAddress(TBranch *); | | virtual void ResetBranchAddress(TBranch *); | |
| virtual void ResetBranchAddresses(); | | virtual void ResetBranchAddresses(); | |
| virtual Long64_t Scan(const char* varexp = "", const char* select
ion = "", Option_t* option = "", Long64_t nentries = 1000000000, Long64_t f
irstentry = 0); // *MENU* | | virtual Long64_t Scan(const char* varexp = "", const char* select
ion = "", Option_t* option = "", Long64_t nentries = 1000000000, Long64_t f
irstentry = 0); // *MENU* | |
| virtual Bool_t SetAlias(const char* aliasName, const char* alia
sFormula); | | virtual Bool_t SetAlias(const char* aliasName, const char* alia
sFormula); | |
| virtual void SetAutoSave(Long64_t autos = 300000000); | | virtual void SetAutoSave(Long64_t autos = 300000000); | |
|
| virtual void SetAutoFlush(Long64_t autof = -30000000); | | virtual void SetAutoFlush(Long64_t autof = 30000000); | |
| virtual void SetBasketSize(const char* bname, Int_t buffsize
= 16000); | | virtual void SetBasketSize(const char* bname, Int_t buffsize
= 16000); | |
| #if !defined(__CINT__) | | #if !defined(__CINT__) | |
| virtual Int_t SetBranchAddress(const char *bname,void *add, TB
ranch **ptr = 0); | | virtual Int_t SetBranchAddress(const char *bname,void *add, TB
ranch **ptr = 0); | |
| #endif | | #endif | |
| virtual Int_t SetBranchAddress(const char *bname,void *add, TC
lass *realClass, EDataType datatype, Bool_t isptr); | | virtual Int_t SetBranchAddress(const char *bname,void *add, TC
lass *realClass, EDataType datatype, Bool_t isptr); | |
| virtual Int_t SetBranchAddress(const char *bname,void *add, TB
ranch **ptr, TClass *realClass, EDataType datatype, Bool_t isptr); | | virtual Int_t SetBranchAddress(const char *bname,void *add, TB
ranch **ptr, TClass *realClass, EDataType datatype, Bool_t isptr); | |
| template <class T> Int_t SetBranchAddress(const char *bname, T **add, TB
ranch **ptr = 0) { | | template <class T> Int_t SetBranchAddress(const char *bname, T **add, TB
ranch **ptr = 0) { | |
| TClass *cl = TClass::GetClass(typeid(T)); | | TClass *cl = TClass::GetClass(typeid(T)); | |
| EDataType type = kOther_t; | | EDataType type = kOther_t; | |
| if (cl==0) type = TDataType::GetType(typeid(T)); | | if (cl==0) type = TDataType::GetType(typeid(T)); | |
| | | | |
End of changes. 2 change blocks. |
| 2 lines changed or deleted | | 2 lines changed or added | |
|
| TTreeCache.h | | TTreeCache.h | |
|
| // @(#)root/tree:$Id: TTreeCache.h 41101 2011-10-03 16:23:48Z pcanal $ | | // @(#)root/tree:$Id: TTreeCache.h 42856 2012-02-02 21:09:30Z pcanal $ | |
| // Author: Rene Brun 04/06/2006 | | // Author: Rene Brun 04/06/2006 | |
| | | | |
| /************************************************************************* | | /************************************************************************* | |
| * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * | | * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * | |
| * All rights reserved. * | | * All rights reserved. * | |
| * * | | * * | |
| * For the licensing terms see $ROOTSYS/LICENSE. * | | * For the licensing terms see $ROOTSYS/LICENSE. * | |
| * For the list of contributors see $ROOTSYS/README/CREDITS. * | | * For the list of contributors see $ROOTSYS/README/CREDITS. * | |
| *************************************************************************/ | | *************************************************************************/ | |
| | | | |
| | | | |
| skipping to change at line 46 | | skipping to change at line 46 | |
| Long64_t fEntryMin; //! first entry in the cache | | Long64_t fEntryMin; //! first entry in the cache | |
| Long64_t fEntryMax; //! last entry in the cache | | Long64_t fEntryMax; //! last entry in the cache | |
| Long64_t fEntryCurrent;//! current lowest entry number in the cac
he | | Long64_t fEntryCurrent;//! current lowest entry number in the cac
he | |
| Long64_t fEntryNext; //! next entry number where cache must be
filled | | Long64_t fEntryNext; //! next entry number where cache must be
filled | |
| Int_t fNbranches; //! Number of branches in the cache | | Int_t fNbranches; //! Number of branches in the cache | |
| Int_t fNReadOk; //Number of blocks read and found in the c
ache | | Int_t fNReadOk; //Number of blocks read and found in the c
ache | |
| Int_t fNReadMiss; //Number of blocks read and not found in t
he chache | | Int_t fNReadMiss; //Number of blocks read and not found in t
he chache | |
| Int_t fNReadPref; //Number of blocks that were prefetched | | Int_t fNReadPref; //Number of blocks that were prefetched | |
| TObjArray *fBranches; //! List of branches to be stored in the c
ache | | TObjArray *fBranches; //! List of branches to be stored in the c
ache | |
| TList *fBrNames; //! list of branch names in the cache | | TList *fBrNames; //! list of branch names in the cache | |
|
| TTree *fOwner; //! pointer to the owner Tree/chain | | | |
| TTree *fTree; //! pointer to the current Tree | | TTree *fTree; //! pointer to the current Tree | |
| Bool_t fIsLearning; //! true if cache is in learning mode | | Bool_t fIsLearning; //! true if cache is in learning mode | |
| Bool_t fIsManual; //! true if cache is StopLearningPhase was
used | | Bool_t fIsManual; //! true if cache is StopLearningPhase was
used | |
| Bool_t fFirstBuffer; //! true if first buffer is used for prefe
tching | | Bool_t fFirstBuffer; //! true if first buffer is used for prefe
tching | |
| Bool_t fOneTime; //! used in the learning phase | | Bool_t fOneTime; //! used in the learning phase | |
| Bool_t fReverseRead; //! reading in reverse mode | | Bool_t fReverseRead; //! reading in reverse mode | |
| Int_t fFillTimes; //! how many times we can fill the curren
t buffer | | Int_t fFillTimes; //! how many times we can fill the curren
t buffer | |
| Bool_t fFirstTime; //! save the fact that we processes the fi
rst entry | | Bool_t fFirstTime; //! save the fact that we processes the fi
rst entry | |
| Long64_t fFirstEntry; //! save the value of the first entry | | Long64_t fFirstEntry; //! save the value of the first entry | |
| Bool_t fReadDirectionSet; //! read direction established | | Bool_t fReadDirectionSet; //! read direction established | |
| static Int_t fgLearnEntries; // number of entries used for learning m
ode | | static Int_t fgLearnEntries; // number of entries used for learning m
ode | |
| | | | |
| private: | | private: | |
| TTreeCache(const TTreeCache &); //this class cannot be copied | | TTreeCache(const TTreeCache &); //this class cannot be copied | |
| TTreeCache& operator=(const TTreeCache &); | | TTreeCache& operator=(const TTreeCache &); | |
| | | | |
| public: | | public: | |
| TTreeCache(); | | TTreeCache(); | |
| TTreeCache(TTree *tree, Int_t buffersize=0); | | TTreeCache(TTree *tree, Int_t buffersize=0); | |
| virtual ~TTreeCache(); | | virtual ~TTreeCache(); | |
|
| virtual void AddBranch(TBranch *b, Bool_t subbranches = kFALSE); | | virtual void AddBranch(TBranch *b, Bool_t subgbranches = kFALSE); | |
| virtual void AddBranch(const char *branch, Bool_t subbranches = k
FALSE); | | virtual void AddBranch(const char *branch, Bool_t subbranches = k
FALSE); | |
| virtual void DropBranch(TBranch *b, Bool_t subbranches = kFALSE); | | virtual void DropBranch(TBranch *b, Bool_t subbranches = kFALSE); | |
| virtual void DropBranch(const char *branch, Bool_t subbranches =
kFALSE); | | virtual void DropBranch(const char *branch, Bool_t subbranches =
kFALSE); | |
| const TObjArray *GetCachedBranches() const { return fBranches; } | | const TObjArray *GetCachedBranches() const { return fBranches; } | |
| Double_t GetEfficiency() const; | | Double_t GetEfficiency() const; | |
| Double_t GetEfficiencyRel() const; | | Double_t GetEfficiencyRel() const; | |
| static Int_t GetLearnEntries(); | | static Int_t GetLearnEntries(); | |
| | | | |
| virtual Bool_t FillBuffer(); | | virtual Bool_t FillBuffer(); | |
|
| TTree *GetOwner() const; | | | |
| TTree *GetTree() const; | | TTree *GetTree() const; | |
| virtual Bool_t IsLearning() const {return fIsLearning;} | | virtual Bool_t IsLearning() const {return fIsLearning;} | |
| virtual void Print(Option_t *option="") const; | | virtual void Print(Option_t *option="") const; | |
| 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 Int_t ReadBufferNormal(char *buf, Long64_t pos, Int_t len)
; | | virtual Int_t ReadBufferNormal(char *buf, Long64_t pos, Int_t len)
; | |
| virtual Int_t ReadBufferPrefetch(char *buf, Long64_t pos, Int_t le
n); | | virtual Int_t ReadBufferPrefetch(char *buf, Long64_t pos, Int_t le
n); | |
| virtual void ResetCache(); | | virtual void ResetCache(); | |
| virtual void SetEntryRange(Long64_t emin, Long64_t emax); | | virtual void SetEntryRange(Long64_t emin, Long64_t emax); | |
| static void SetLearnEntries(Int_t n = 10); | | static void SetLearnEntries(Int_t n = 10); | |
| void StartLearningPhase(); | | void StartLearningPhase(); | |
| virtual void StopLearningPhase(); | | virtual void StopLearningPhase(); | |
|
| virtual void UpdateBranches(TTree *tree, Bool_t owner = kFALSE); | | virtual void UpdateBranches(TTree *tree); | |
| | | | |
| ClassDef(TTreeCache,2) //Specialization of TFileCacheRead for a TTree | | ClassDef(TTreeCache,2) //Specialization of TFileCacheRead for a TTree | |
| }; | | }; | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 5 change blocks. |
| 5 lines changed or deleted | | 3 lines changed or added | |
|
| TVirtualPad.h | | TVirtualPad.h | |
|
| // @(#)root/base:$Id: TVirtualPad.h 41495 2011-10-20 09:54:31Z rdm $ | | // @(#)root/base:$Id: TVirtualPad.h 42441 2011-12-08 14:15:45Z couet $ | |
| // Author: Rene Brun 05/12/95 | | // Author: Rene Brun 05/12/95 | |
| | | | |
| /************************************************************************* | | /************************************************************************* | |
| * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * | | * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * | |
| * All rights reserved. * | | * All rights reserved. * | |
| * * | | * * | |
| * For the licensing terms see $ROOTSYS/LICENSE. * | | * For the licensing terms see $ROOTSYS/LICENSE. * | |
| * For the list of contributors see $ROOTSYS/README/CREDITS. * | | * For the list of contributors see $ROOTSYS/README/CREDITS. * | |
| *************************************************************************/ | | *************************************************************************/ | |
| | | | |
| | | | |
| skipping to change at line 53 | | skipping to change at line 53 | |
| | | | |
| // forward declarations | | // forward declarations | |
| class TAxis; | | class TAxis; | |
| class TObject; | | class TObject; | |
| class TObjLink; | | class TObjLink; | |
| class TView; | | class TView; | |
| class TCanvas; | | class TCanvas; | |
| class TCanvasImp; | | class TCanvasImp; | |
| class TH1F; | | class TH1F; | |
| class TFrame; | | class TFrame; | |
|
| | | class TLegend; | |
| class TBox; | | class TBox; | |
| class TVirtualViewer3D; | | class TVirtualViewer3D; | |
| | | | |
| class TVirtualPad : public TObject, public TAttLine, public TAttFill, | | class TVirtualPad : public TObject, public TAttLine, public TAttFill, | |
| public TAttPad, public TQObject { | | public TAttPad, public TQObject { | |
| | | | |
| protected: | | protected: | |
| Bool_t fResizing; //!true when resizing the pad | | Bool_t fResizing; //!true when resizing the pad | |
| | | | |
| virtual void *GetSender() { return this; } //used to set gTQSender | | virtual void *GetSender() { return this; } //used to set gTQSender | |
| | | | |
| skipping to change at line 74 | | skipping to change at line 75 | |
| public: | | public: | |
| TVirtualPad(); | | TVirtualPad(); | |
| TVirtualPad(const char *name, const char *title, Double_t xlow, | | TVirtualPad(const char *name, const char *title, Double_t xlow, | |
| Double_t ylow, Double_t xup, Double_t yup, | | Double_t ylow, Double_t xup, Double_t yup, | |
| Color_t color=19, Short_t bordersize=4, Short_t bordermode=1
); | | Color_t color=19, Short_t bordersize=4, Short_t bordermode=1
); | |
| virtual ~TVirtualPad(); | | virtual ~TVirtualPad(); | |
| virtual void AbsCoordinates(Bool_t set) = 0; | | virtual void AbsCoordinates(Bool_t set) = 0; | |
| virtual Double_t AbsPixeltoX(Int_t px) = 0; | | virtual Double_t AbsPixeltoX(Int_t px) = 0; | |
| virtual Double_t AbsPixeltoY(Int_t py) = 0; | | virtual Double_t AbsPixeltoY(Int_t py) = 0; | |
| virtual void AddExec(const char *name, const char *command) = 0; | | virtual void AddExec(const char *name, const char *command) = 0; | |
|
| | | virtual TLegend *BuildLegend(Double_t x1=0.5, Double_t y1=0.67, Double_t
x2=0.88, Double_t y2=0.88, const char *title="") = 0; | |
| virtual TVirtualPad* cd(Int_t subpadnumber=0) = 0; | | virtual TVirtualPad* cd(Int_t subpadnumber=0) = 0; | |
| virtual void Clear(Option_t *option="") = 0; | | virtual void Clear(Option_t *option="") = 0; | |
| virtual void Close(Option_t *option="") = 0; | | virtual void Close(Option_t *option="") = 0; | |
| virtual void CopyPixmap() = 0; | | virtual void CopyPixmap() = 0; | |
| virtual void CopyPixmaps() = 0; | | virtual void CopyPixmaps() = 0; | |
| virtual void DeleteExec(const char *name) = 0; | | virtual void DeleteExec(const char *name) = 0; | |
| virtual void Divide(Int_t nx=1, Int_t ny=1, Float_t xmargin=0.01, Fl
oat_t ymargin=0.01, Int_t color=0) = 0; | | virtual void Divide(Int_t nx=1, Int_t ny=1, Float_t xmargin=0.01, Fl
oat_t ymargin=0.01, Int_t color=0) = 0; | |
| virtual void Draw(Option_t *option="") = 0; | | virtual void Draw(Option_t *option="") = 0; | |
| virtual void DrawClassObject(const TObject *obj, Option_t *option=""
) = 0; | | virtual void DrawClassObject(const TObject *obj, Option_t *option=""
) = 0; | |
| virtual TH1F *DrawFrame(Double_t xmin, Double_t ymin, Double_t xmax,
Double_t ymax, const char *title="") = 0; | | virtual TH1F *DrawFrame(Double_t xmin, Double_t ymin, Double_t xmax,
Double_t ymax, const char *title="") = 0; | |
| | | | |
End of changes. 3 change blocks. |
| 1 lines changed or deleted | | 3 lines changed or added | |
|
| TVirtualProofPlayer.h | | TVirtualProofPlayer.h | |
|
| // @(#)root/proof:$Id: TVirtualProofPlayer.h 39171 2011-05-12 16:21:17Z gan
is $ | | // @(#)root/proof:$Id: TVirtualProofPlayer.h 43044 2012-02-17 14:34:52Z gan
is $ | |
| // Author: Fons Rademakers 15/03/07 | | // Author: Fons Rademakers 15/03/07 | |
| | | | |
| /************************************************************************* | | /************************************************************************* | |
| * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. * | | * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. * | |
| * All rights reserved. * | | * All rights reserved. * | |
| * * | | * * | |
| * For the licensing terms see $ROOTSYS/LICENSE. * | | * For the licensing terms see $ROOTSYS/LICENSE. * | |
| * For the list of contributors see $ROOTSYS/README/CREDITS. * | | * For the list of contributors see $ROOTSYS/README/CREDITS. * | |
| *************************************************************************/ | | *************************************************************************/ | |
| | | | |
| | | | |
| skipping to change at line 44 | | skipping to change at line 44 | |
| class TQueryResult; | | class TQueryResult; | |
| class TDrawFeedback; | | class TDrawFeedback; | |
| class TList; | | class TList; | |
| class TSlave; | | class TSlave; | |
| class TMessage; | | class TMessage; | |
| class TProof; | | class TProof; | |
| class TSocket; | | class TSocket; | |
| class TVirtualPacketizer; | | class TVirtualPacketizer; | |
| class TProofProgressStatus; | | class TProofProgressStatus; | |
| class TProofProgressInfo; | | class TProofProgressInfo; | |
|
| | | class TSelector; | |
| | | | |
| class TVirtualProofPlayer : public TObject, public TQObject { | | class TVirtualProofPlayer : public TObject, public TQObject { | |
| | | | |
| public: | | public: | |
| enum EStatusBits { kIsSubmerger = BIT(16) }; | | enum EStatusBits { kIsSubmerger = BIT(16) }; | |
| // TDSet status bits | | // TDSet status bits | |
| enum EExitStatus { kFinished, kStopped, kAborted }; | | enum EExitStatus { kFinished, kStopped, kAborted }; | |
| | | | |
| TVirtualProofPlayer() { ResetBit(TVirtualProofPlayer::kIsSubmerger); } | | TVirtualProofPlayer() { ResetBit(TVirtualProofPlayer::kIsSubmerger); } | |
| virtual ~TVirtualProofPlayer() { } | | virtual ~TVirtualProofPlayer() { } | |
| | | | |
| virtual Long64_t Process(TDSet *set, | | virtual Long64_t Process(TDSet *set, | |
| const char *selector, Option_t *option = "", | | const char *selector, Option_t *option = "", | |
| Long64_t nentries = -1, Long64_t firstentry =
0) = 0; | | Long64_t nentries = -1, Long64_t firstentry =
0) = 0; | |
|
| | | virtual Long64_t Process(TDSet *set, | |
| | | TSelector *selector, Option_t *option = "", | |
| | | Long64_t nentries = -1, Long64_t firstentry = | |
| | | 0) = 0; | |
| virtual Long64_t Finalize(Bool_t force = kFALSE, Bool_t sync = kFALSE)
= 0; | | virtual Long64_t Finalize(Bool_t force = kFALSE, Bool_t sync = kFALSE)
= 0; | |
| virtual Long64_t Finalize(TQueryResult *qr) = 0; | | virtual Long64_t Finalize(TQueryResult *qr) = 0; | |
| virtual Long64_t DrawSelect(TDSet *set, const char *varexp, | | virtual Long64_t DrawSelect(TDSet *set, const char *varexp, | |
| const char *selection, Option_t *option = "
", | | const char *selection, Option_t *option = "
", | |
| Long64_t nentries = -1, Long64_t firstentry
= 0) = 0; | | Long64_t nentries = -1, Long64_t firstentry
= 0) = 0; | |
| virtual Int_t GetDrawArgs(const char *var, const char *sel, Option_t
*opt, | | virtual Int_t GetDrawArgs(const char *var, const char *sel, Option_t
*opt, | |
| TString &selector, TString &objname) = 0; | | TString &selector, TString &objname) = 0; | |
| virtual void HandleGetTreeHeader(TMessage *mess) = 0; | | virtual void HandleGetTreeHeader(TMessage *mess) = 0; | |
| virtual void HandleRecvHisto(TMessage *mess) = 0; | | virtual void HandleRecvHisto(TMessage *mess) = 0; | |
| | | | |
| | | | |
End of changes. 3 change blocks. |
| 1 lines changed or deleted | | 6 lines changed or added | |
|
| TXNetSystem.h | | TXNetSystem.h | |
|
| // @(#)root/netx:$Id: TXNetSystem.h 43298 2012-03-08 15:11:51Z ganis $ | | // @(#)root/netx:$Id: TXNetSystem.h 41574 2011-10-25 13:42:03Z ganis $ | |
| // Author: Frank Winklmeier, Fabrizio Furano | | // Author: Frank Winklmeier, Fabrizio Furano | |
| | | | |
| /************************************************************************* | | /************************************************************************* | |
| * Copyright (C) 1995-2005, Rene Brun and Fons Rademakers. * | | * Copyright (C) 1995-2005, Rene Brun and Fons Rademakers. * | |
| * All rights reserved. * | | * All rights reserved. * | |
| * * | | * * | |
| * For the licensing terms see $ROOTSYS/LICENSE. * | | * For the licensing terms see $ROOTSYS/LICENSE. * | |
| * For the list of contributors see $ROOTSYS/README/CREDITS. * | | * For the list of contributors see $ROOTSYS/README/CREDITS. * | |
| *************************************************************************/ | | *************************************************************************/ | |
| | | | |
| | | | |
| skipping to change at line 40 | | skipping to change at line 40 | |
| #endif | | #endif | |
| | | | |
| #ifndef ROOT_Rtypes | | #ifndef ROOT_Rtypes | |
| #include "Rtypes.h" | | #include "Rtypes.h" | |
| #endif | | #endif | |
| | | | |
| #ifndef ROOT_TString | | #ifndef ROOT_TString | |
| #include "TString.h" | | #include "TString.h" | |
| #endif | | #endif | |
| | | | |
|
| | | #include "XrdProofdXrdVers.h" | |
| | | | |
| | | #if ROOTXRDVERS >= ROOT_OldXrdLocate | |
| #ifndef ROOT_THashList | | #ifndef ROOT_THashList | |
| #include "THashList.h" | | #include "THashList.h" | |
| #endif | | #endif | |
|
| | | #endif | |
| | | | |
| #include "XrdOuc/XrdOucString.hh" | | #include "XrdOuc/XrdOucString.hh" | |
| #include "XrdClient/XrdClientVector.hh" | | #include "XrdClient/XrdClientVector.hh" | |
| | | | |
| class XrdClientAdmin; | | class XrdClientAdmin; | |
| class TCollection; | | class TCollection; | |
| class TXNetSystemConnectGuard; | | class TXNetSystemConnectGuard; | |
| | | | |
| typedef XrdClientVector<XrdOucString> vecString; | | typedef XrdClientVector<XrdOucString> vecString; | |
| typedef XrdClientVector<bool> vecBool; | | typedef XrdClientVector<bool> vecBool; | |
| | | | |
|
| | | #if ROOTXRDVERS >= ROOT_OldXrdLocate | |
| class TXrdClientAdminWrapper : public TNamed { | | class TXrdClientAdminWrapper : public TNamed { | |
| public: | | public: | |
| TXrdClientAdminWrapper(const char *key, XrdClientAdmin *ca) : TNamed(key
,""), fXCA(ca) { } | | TXrdClientAdminWrapper(const char *key, XrdClientAdmin *ca) : TNamed(key
,""), fXCA(ca) { } | |
| virtual ~TXrdClientAdminWrapper(); | | virtual ~TXrdClientAdminWrapper(); | |
| XrdClientAdmin *fXCA; | | XrdClientAdmin *fXCA; | |
| }; | | }; | |
|
| | | #endif | |
| | | | |
| class TXNetSystem : public TNetSystem { | | class TXNetSystem : public TNetSystem { | |
| | | | |
| friend class TXNetSystemConnectGuard; | | friend class TXNetSystemConnectGuard; | |
| | | | |
| private: | | private: | |
| Bool_t fIsRootd; // Nature of remote file server | | Bool_t fIsRootd; // Nature of remote file server | |
| Bool_t fIsXRootd; // Nature of remote file server | | Bool_t fIsXRootd; // Nature of remote file server | |
| TString fDir; // Current directory | | TString fDir; // Current directory | |
| void *fDirp; // Directory pointer | | void *fDirp; // Directory pointer | |
| | | | |
| skipping to change at line 82 | | skipping to change at line 88 | |
| TString fDirEntry; // Last dir entry | | TString fDirEntry; // Last dir entry | |
| TString fUrl; // Initial url | | TString fUrl; // Initial url | |
| | | | |
| static Bool_t fgInitDone; // Avoid initializing more than once | | static Bool_t fgInitDone; // Avoid initializing more than once | |
| static Bool_t fgRootdBC; // Control rootd backward compatibility | | static Bool_t fgRootdBC; // Control rootd backward compatibility | |
| | | | |
| XrdClientAdmin *Connect(const char *url); // Connect to server | | XrdClientAdmin *Connect(const char *url); // Connect to server | |
| void *GetDirPtr() const { return fDirp; } | | void *GetDirPtr() const { return fDirp; } | |
| void InitXrdClient(); | | void InitXrdClient(); | |
| | | | |
|
| | | #if ROOTXRDVERS >= ROOT_OldXrdLocate | |
| static THashList fgAddrFQDN; // Cross-table address<->FQDN | | static THashList fgAddrFQDN; // Cross-table address<->FQDN | |
| static THashList fgAdminHash; // List of existing XrdClientAdmin | | static THashList fgAdminHash; // List of existing XrdClientAdmin | |
| static XrdClientAdmin *GetClientAdmin(const char *url); | | static XrdClientAdmin *GetClientAdmin(const char *url); | |
| static TString GetKey(const char *url); | | static TString GetKey(const char *url); | |
|
| | | #endif | |
| | | | |
| public: | | public: | |
| TXNetSystem(Bool_t owner = kTRUE); | | TXNetSystem(Bool_t owner = kTRUE); | |
| TXNetSystem(const char *url, Bool_t owner = kTRUE); | | TXNetSystem(const char *url, Bool_t owner = kTRUE); | |
| virtual ~TXNetSystem() { } | | virtual ~TXNetSystem() { } | |
| | | | |
| Bool_t AccessPathName(const char *path, EAccessMode mode); | | Bool_t AccessPathName(const char *path, EAccessMode mode); | |
| virtual Bool_t ConsistentWith(const char *path, void *dirptr); | | virtual Bool_t ConsistentWith(const char *path, void *dirptr); | |
| virtual void FreeDirectory(void *dirp); | | virtual void FreeDirectory(void *dirp); | |
| virtual const char *GetDirEntry(void *dirp); | | virtual const char *GetDirEntry(void *dirp); | |
| | | | |
End of changes. 7 change blocks. |
| 1 lines changed or deleted | | 9 lines changed or added | |
|
| ToyMCSampler.h | | ToyMCSampler.h | |
|
| // @(#)root/roostats:$Id: ToyMCSampler.h 42320 2011-11-30 10:37:33Z moneta
$ | | // @(#)root/roostats:$Id: ToyMCSampler.h 43199 2012-03-01 20:17:42Z moneta
$ | |
| // Author: Kyle Cranmer, Lorenzo Moneta, Gregory Schott, Wouter Verkerke | | // Author: Kyle Cranmer, Lorenzo Moneta, Gregory Schott, Wouter Verkerke | |
| // Additions and modifications by Mario Pelliccioni | | // Additions and modifications by Mario Pelliccioni | |
| /************************************************************************* | | /************************************************************************* | |
| * Copyright (C) 1995-2008, Rene Brun and Fons Rademakers. * | | * Copyright (C) 1995-2008, Rene Brun and Fons Rademakers. * | |
| * All rights reserved. * | | * All rights reserved. * | |
| * * | | * * | |
| * For the licensing terms see $ROOTSYS/LICENSE. * | | * For the licensing terms see $ROOTSYS/LICENSE. * | |
| * For the list of contributors see $ROOTSYS/README/CREDITS. * | | * For the list of contributors see $ROOTSYS/README/CREDITS. * | |
| *************************************************************************/ | | *************************************************************************/ | |
| | | | |
| | | | |
| skipping to change at line 56 | | skipping to change at line 56 | |
| #include "RooWorkspace.h" | | #include "RooWorkspace.h" | |
| #include "RooMsgService.h" | | #include "RooMsgService.h" | |
| #include "RooAbsPdf.h" | | #include "RooAbsPdf.h" | |
| #include "RooRealVar.h" | | #include "RooRealVar.h" | |
| | | | |
| #include "RooDataSet.h" | | #include "RooDataSet.h" | |
| | | | |
| namespace RooStats { | | namespace RooStats { | |
| | | | |
| // only used inside ToyMCSampler, ie "private" in the cxx file | | // only used inside ToyMCSampler, ie "private" in the cxx file | |
|
| class NuisanceParametersSampler; | | class NuisanceParametersSampler { | |
| | | // Helper for ToyMCSampler. Handles all of the nuisance parameter relate | |
| class ToyMCSampler: public TestStatSampler { | | d | |
| | | // functions. Once instantiated, it gives a new nuisance parameter point | |
| | | // at each call to nextPoint(...). | |
| | | | |
| public: | | public: | |
|
| ToyMCSampler() : | | NuisanceParametersSampler(RooAbsPdf *prior=NULL, const RooArgSet *par | |
| fTestStat(NULL), fSamplingDistName("temp"), fNToys(1) | | ameters=NULL, Int_t nToys=1000, Bool_t asimov=kFALSE) : | |
| | | fPrior(prior), | |
| | | fParams(parameters), | |
| | | fNToys(nToys), | |
| | | fExpected(asimov), | |
| | | fPoints(NULL), | |
| | | fIndex(0) | |
| { | | { | |
|
| // Proof constructor. Do not use. | | if(prior) Refresh(); | |
| | | } | |
| fPdf = NULL; | | virtual ~NuisanceParametersSampler() { | |
| fPriorNuisance = NULL; | | if(fPoints) { delete fPoints; fPoints = NULL; } | |
| fNullPOI = NULL; | | | |
| fNuisancePars = NULL; | | | |
| fObservables = NULL; | | | |
| fGlobalObservables = NULL; | | | |
| | | | |
| fSize = 0.05; | | | |
| fNEvents = 0; | | | |
| fGenerateBinned = kFALSE; | | | |
| fGenerateBinnedTag = ""; | | | |
| fGenerateAutoBinned = kTRUE; | | | |
| fExpectedNuisancePar = kFALSE; | | | |
| | | | |
| fToysInTails = 0.0; | | | |
| fMaxToys = RooNumber::infinity(); | | | |
| fAdaptiveLowLimit = -RooNumber::infinity(); | | | |
| fAdaptiveHighLimit = RooNumber::infinity(); | | | |
| | | | |
| fImportanceDensity = NULL; | | | |
| fImportanceSnapshot = NULL; | | | |
| fProtoData = NULL; | | | |
| | | | |
| fProofConfig = NULL; | | | |
| fNuisanceParametersSampler = NULL; | | | |
| | | | |
| _allVars = NULL ; | | | |
| _gs1 = NULL ; | | | |
| _gs2 = NULL ; | | | |
| _gs3 = NULL ; | | | |
| _gs4 = NULL ; | | | |
| | | | |
| //suppress messages for num integration of Roofit | | | |
| RooMsgService::instance().getStream(1).removeTopic(RooFit::NumInteg | | | |
| ration); | | | |
| | | | |
| fUseMultiGen = kFALSE ; | | | |
| } | | } | |
|
| ToyMCSampler(TestStatistic &ts, Int_t ntoys) : | | | |
| fTestStat(&ts), fSamplingDistName(ts.GetVarName()), fNToys(ntoys) | | | |
| { | | | |
| fPdf = NULL; | | | |
| fPriorNuisance = NULL; | | | |
| fNullPOI = NULL; | | | |
| fNuisancePars = NULL; | | | |
| fObservables = NULL; | | | |
| fGlobalObservables = NULL; | | | |
| | | | |
| fSize = 0.05; | | | |
| fNEvents = 0; | | | |
| fGenerateBinned = kFALSE; | | | |
| fGenerateBinnedTag = ""; | | | |
| fGenerateAutoBinned = kTRUE; | | | |
| fExpectedNuisancePar = kFALSE; | | | |
| | | | |
|
| fToysInTails = 0.0; | | void NextPoint(RooArgSet& nuisPoint, Double_t& weight); | |
| fMaxToys = RooNumber::infinity(); | | | |
| fAdaptiveLowLimit = -RooNumber::infinity(); | | | |
| fAdaptiveHighLimit = RooNumber::infinity(); | | | |
| | | | |
|
| fImportanceDensity = NULL; | | protected: | |
| fImportanceSnapshot = NULL; | | void Refresh(); | |
| fProtoData = NULL; | | | |
| | | | |
| fProofConfig = NULL; | | | |
| fNuisanceParametersSampler = NULL; | | | |
| | | | |
| _allVars = NULL ; | | | |
| _gs1 = NULL ; | | | |
| _gs2 = NULL ; | | | |
| _gs3 = NULL ; | | | |
| _gs4 = NULL ; | | | |
| | | | |
|
| //suppress messages for num integration of Roofit | | private: | |
| RooMsgService::instance().getStream(1).removeTopic(RooFit::NumInteg | | RooAbsPdf *fPrior; // prior for nuisance parameters | |
| ration); | | const RooArgSet *fParams; // nuisance parameters | |
| | | Int_t fNToys; | |
| | | Bool_t fExpected; | |
| | | | |
| | | RooAbsData *fPoints; // generated nuisance parameter points | |
| | | Int_t fIndex; // current index in fPoints array | |
| | | }; | |
| | | | |
|
| fUseMultiGen = kFALSE ; | | class ToyMCSampler: public TestStatSampler { | |
| } | | | |
| | | | |
|
| | | public: | |
| | | | |
| | | ToyMCSampler(); | |
| | | ToyMCSampler(TestStatistic &ts, Int_t ntoys); | |
| virtual ~ToyMCSampler(); | | virtual ~ToyMCSampler(); | |
| | | | |
| static void SetAlwaysUseMultiGen(Bool_t flag) { fgAlwaysUseMultiGen =
flag ; } | | static void SetAlwaysUseMultiGen(Bool_t flag) { fgAlwaysUseMultiGen =
flag ; } | |
| void SetUseMultiGen(Bool_t flag) { fUseMultiGen = flag ; } | | void SetUseMultiGen(Bool_t flag) { fUseMultiGen = flag ; } | |
| | | | |
| // main interface | | // main interface | |
| virtual SamplingDistribution* GetSamplingDistribution(RooArgSet& para
mPoint); | | virtual SamplingDistribution* GetSamplingDistribution(RooArgSet& para
mPoint); | |
|
| | | virtual RooDataSet* GetSamplingDistributions(RooArgSet& paramPoint); | |
| | | virtual RooDataSet* GetSamplingDistributionsSingleWorker(RooArgSet& p | |
| | | aramPoint); | |
| | | | |
| | | virtual SamplingDistribution* AppendSamplingDistribution( | |
| | | RooArgSet& allParameters, | |
| | | SamplingDistribution* last, | |
| | | Int_t additionalMC | |
| | | ); | |
| | | | |
| | | // The pdf can be NULL in which case the density from SetPdf() | |
| | | // is used. The snapshot and TestStatistic is also optional. | |
| | | virtual void AddTestStatistic(TestStatistic* t = NULL) { | |
| | | if( t == NULL ) { | |
| | | oocoutI((TObject*)0,InputArguments) << "No test statistic given | |
| | | . Doing nothing." << endl; | |
| | | return; | |
| | | } | |
| | | | |
|
| virtual SamplingDistribution* GetSamplingDistributionSingleWorker(Roo | | if( t == NULL && fTestStatistics.size() >= 1 ) t = fTestStatistics | |
| ArgSet& paramPoint); | | [0]; | |
| | | fTestStatistics.push_back( t ); | |
| | | } | |
| | | | |
| // generates toy data | | // generates toy data | |
| // without weight | | // without weight | |
|
| virtual RooAbsData* GenerateToyData(RooArgSet& paramPoint) const { | | virtual RooAbsData* GenerateToyData(RooArgSet& paramPoint, RooAbsPdf&
pdf) const { | |
| if(fExpectedNuisancePar) oocoutE((TObject*)NULL,InputArguments) <<
"ToyMCSampler: using expected nuisance parameters but ignoring weight. Use
GetSamplingDistribution(paramPoint, weight) instead." << endl; | | if(fExpectedNuisancePar) oocoutE((TObject*)NULL,InputArguments) <<
"ToyMCSampler: using expected nuisance parameters but ignoring weight. Use
GetSamplingDistribution(paramPoint, weight) instead." << endl; | |
| double weight; | | double weight; | |
|
| return GenerateToyData(paramPoint, weight); | | return GenerateToyData(paramPoint, weight, pdf); | |
| } | | } | |
|
| // importance sampling without weight does not make sense | | virtual RooAbsData* GenerateToyData(RooArgSet& paramPoint) const { re | |
| // so the equivalent function to the one above is omitted | | turn GenerateToyData(paramPoint,*fPdf); } | |
| // | | | |
| // with weight | | // with weight | |
|
| virtual RooAbsData* GenerateToyData(RooArgSet& paramPoint, double& we | | virtual RooAbsData* GenerateToyData(RooArgSet& paramPoint, double& we | |
| ight) const; | | ight, RooAbsPdf& pdf) const; | |
| virtual RooAbsData* GenerateToyDataImportanceSampling(RooArgSet& para | | virtual RooAbsData* GenerateToyData(RooArgSet& paramPoint, double& we | |
| mPoint, double& weight) const; | | ight) const { return GenerateToyData(paramPoint,weight,*fPdf); } | |
| | | | |
| // generate global observables | | // generate global observables | |
|
| virtual void GenerateGlobalObservables(void) const; | | virtual void GenerateGlobalObservables(RooAbsPdf& pdf) const; | |
| | | | |
| // Extended interface to append to sampling distribution more samples | | | |
| virtual SamplingDistribution* AppendSamplingDistribution(RooArgSet& a | | | |
| llParameters, | | | |
| SamplingDistr | | | |
| ibution* last, | | | |
| Int_t additio | | | |
| nalMC) { | | | |
| | | | |
| Int_t tmp = fNToys; | | | |
| fNToys = additionalMC; | | | |
| SamplingDistribution* newSamples = GetSamplingDistribution(allParame | | | |
| ters); | | | |
| fNToys = tmp; | | | |
| | | | |
| if(last){ | | | |
| last->Add(newSamples); | | | |
| delete newSamples; | | | |
| return last; | | | |
| } | | | |
| | | | |
| return newSamples; | | | |
| } | | | |
| | | | |
| // Main interface to evaluate the test statistic on a dataset | | // Main interface to evaluate the test statistic on a dataset | |
|
| virtual Double_t EvaluateTestStatistic(RooAbsData& data, RooArgSet& n | | virtual Double_t EvaluateTestStatistic(RooAbsData& data, RooArgSet& n | |
| ullPOI) { | | ullPOI, int i ) { | |
| return fTestStat->Evaluate(data, nullPOI); | | return fTestStatistics[i]->Evaluate(data, nullPOI); | |
| } | | } | |
|
| | | virtual Double_t EvaluateTestStatistic(RooAbsData& data, RooArgSet& n | |
| | | ullPOI) { return EvaluateTestStatistic( data,nullPOI, 0 ); } | |
| | | virtual RooArgList* EvaluateAllTestStatistics(RooAbsData& data, RooAr | |
| | | gSet& nullPOI) { | |
| | | RooArgList* allTS = new RooArgList( "allTS" ); | |
| | | for( unsigned int i = 0; i < fTestStatistics.size(); i++ ) { | |
| | | if( fTestStatistics[i] == NULL ) continue; | |
| | | allTS->add( *(new RooRealVar( | |
| | | TString::Format( "%s_TS%d", fSamplingDistName.c_str(),i ), | |
| | | fTestStatistics[i]->GetVarName(), | |
| | | fTestStatistics[i]->Evaluate( data, nullPOI ) | |
| | | ) ) ); | |
| | | } | |
| | | return allTS; | |
| | | } | |
| | | | |
| | | virtual TestStatistic* GetTestStatistic(unsigned int i) const { | |
| | | if( fTestStatistics.size() <= i ) return NULL; | |
| | | return fTestStatistics[i]; | |
| | | } | |
| | | virtual TestStatistic* GetTestStatistic(void) const { return GetTestS | |
| | | tatistic(0); } | |
| | | | |
|
| virtual TestStatistic* GetTestStatistic() const { return fTestStat; } | | | |
| virtual Double_t ConfidenceLevel() const { return 1. - fSize; } | | virtual Double_t ConfidenceLevel() const { return 1. - fSize; } | |
| virtual void Initialize( | | virtual void Initialize( | |
| RooAbsArg& /*testStatistic*/, | | RooAbsArg& /*testStatistic*/, | |
| RooArgSet& /*paramsOfInterest*/, | | RooArgSet& /*paramsOfInterest*/, | |
| RooArgSet& /*nuisanceParameters*/ | | RooArgSet& /*nuisanceParameters*/ | |
| ) {} | | ) {} | |
| | | | |
| virtual Int_t GetNToys(void) { return fNToys; } | | virtual Int_t GetNToys(void) { return fNToys; } | |
| virtual void SetNToys(const Int_t ntoy) { fNToys = ntoy; } | | virtual void SetNToys(const Int_t ntoy) { fNToys = ntoy; } | |
| virtual void SetNEventsPerToy(const Int_t nevents) { | | virtual void SetNEventsPerToy(const Int_t nevents) { | |
| // Forces n events even for extended PDFs. Set NEvents=0 to | | // Forces n events even for extended PDFs. Set NEvents=0 to | |
| // use the Poisson distributed events from the extended PDF. | | // use the Poisson distributed events from the extended PDF. | |
| fNEvents = nevents; | | fNEvents = nevents; | |
| } | | } | |
| | | | |
|
| // specify the values of parameters used when evaluating test statist
ic | | // Set the Pdf, add to the the workspace if not already there | |
| virtual void SetParametersForTestStat(const RooArgSet& nullpoi) { | | virtual void SetParametersForTestStat(const RooArgSet& nullpoi) { | |
|
| if (fNullPOI) delete fNullPOI; fNullPOI = (RooArgSet*)nullpoi.snap | | if( fParametersForTestStat ) delete fParametersForTestStat; | |
| shot(); | | fParametersForTestStat = (const RooArgSet*)nullpoi.snapshot(); | |
| } | | } | |
|
| // Set the Pdf, add to the the workspace if not already there | | | |
| virtual void SetPdf(RooAbsPdf& pdf) { fPdf = &pdf; ClearCache(); } | | virtual void SetPdf(RooAbsPdf& pdf) { fPdf = &pdf; ClearCache(); } | |
|
| | | | |
| // How to randomize the prior. Set to NULL to deactivate randomizatio
n. | | // How to randomize the prior. Set to NULL to deactivate randomizatio
n. | |
| virtual void SetPriorNuisance(RooAbsPdf* pdf) { fPriorNuisance = pdf;
} | | virtual void SetPriorNuisance(RooAbsPdf* pdf) { fPriorNuisance = pdf;
} | |
| // specify the nuisance parameters (eg. the rest of the parameters) | | // specify the nuisance parameters (eg. the rest of the parameters) | |
| virtual void SetNuisanceParameters(const RooArgSet& np) { fNuisancePa
rs = &np; } | | virtual void SetNuisanceParameters(const RooArgSet& np) { fNuisancePa
rs = &np; } | |
| // specify the observables in the dataset (needed to evaluate the tes
t statistic) | | // specify the observables in the dataset (needed to evaluate the tes
t statistic) | |
| virtual void SetObservables(const RooArgSet& o) { fObservables = &o;
} | | virtual void SetObservables(const RooArgSet& o) { fObservables = &o;
} | |
| // specify the conditional observables | | // specify the conditional observables | |
| virtual void SetGlobalObservables(const RooArgSet& o) { fGlobalObserv
ables = &o; } | | virtual void SetGlobalObservables(const RooArgSet& o) { fGlobalObserv
ables = &o; } | |
| | | | |
| // set the size of the test (rate of Type I error) ( Eg. 0.05 for a 9
5% Confidence Interval) | | // set the size of the test (rate of Type I error) ( Eg. 0.05 for a 9
5% Confidence Interval) | |
| virtual void SetTestSize(Double_t size) { fSize = size; } | | virtual void SetTestSize(Double_t size) { fSize = size; } | |
| // set the confidence level for the interval (eg. 0.95 for a 95% Conf
idence Interval) | | // set the confidence level for the interval (eg. 0.95 for a 95% Conf
idence Interval) | |
| virtual void SetConfidenceLevel(Double_t cl) { fSize = 1. - cl; } | | virtual void SetConfidenceLevel(Double_t cl) { fSize = 1. - cl; } | |
| | | | |
| // Set the TestStatistic (want the argument to be a function of the d
ata & parameter points | | // Set the TestStatistic (want the argument to be a function of the d
ata & parameter points | |
|
| virtual void SetTestStatistic(TestStatistic *testStatistic) { fTestSt | | virtual void SetTestStatistic(TestStatistic *testStatistic, unsigned | |
| at = testStatistic; } | | int i) { | |
| | | if( fTestStatistics.size() <= i ) { | |
| | | oocoutE((TObject*)NULL,InputArguments) << "Cannot set test stat | |
| | | istic for this index." << endl; | |
| | | return; | |
| | | } | |
| | | fTestStatistics[i] = testStatistic; | |
| | | } | |
| | | virtual void SetTestStatistic(TestStatistic *t) { return SetTestStati | |
| | | stic(t,0); } | |
| | | | |
| virtual void SetExpectedNuisancePar(Bool_t i = kTRUE) { fExpectedNuis
ancePar = i; } | | virtual void SetExpectedNuisancePar(Bool_t i = kTRUE) { fExpectedNuis
ancePar = i; } | |
| virtual void SetAsimovNuisancePar(Bool_t i = kTRUE) { fExpectedNuisan
cePar = i; } | | virtual void SetAsimovNuisancePar(Bool_t i = kTRUE) { fExpectedNuisan
cePar = i; } | |
| | | | |
| // Checks for sufficient information to do a GetSamplingDistribution(
...). | | // Checks for sufficient information to do a GetSamplingDistribution(
...). | |
| Bool_t CheckConfig(void); | | Bool_t CheckConfig(void); | |
| | | | |
| // control to use bin data generation (=> see RooFit::AllBinned() opt
ion) | | // control to use bin data generation (=> see RooFit::AllBinned() opt
ion) | |
| void SetGenerateBinned(bool binned = true) { fGenerateBinned = binned
; } | | void SetGenerateBinned(bool binned = true) { fGenerateBinned = binned
; } | |
| // name of the tag for individual components to be generated binned (
=> see RooFit::GenBinned() option) | | // name of the tag for individual components to be generated binned (
=> see RooFit::GenBinned() option) | |
| | | | |
| skipping to change at line 270 | | skipping to change at line 247 | |
| fToysInTails = toys; | | fToysInTails = toys; | |
| fAdaptiveHighLimit = threshold; | | fAdaptiveHighLimit = threshold; | |
| fAdaptiveLowLimit = -RooNumber::infinity(); | | fAdaptiveLowLimit = -RooNumber::infinity(); | |
| } | | } | |
| void SetToysBothTails(Double_t toys, Double_t low_threshold, Double_t
high_threshold) { | | void SetToysBothTails(Double_t toys, Double_t low_threshold, Double_t
high_threshold) { | |
| fToysInTails = toys; | | fToysInTails = toys; | |
| fAdaptiveHighLimit = high_threshold; | | fAdaptiveHighLimit = high_threshold; | |
| fAdaptiveLowLimit = low_threshold; | | fAdaptiveLowLimit = low_threshold; | |
| } | | } | |
| | | | |
|
| // for importance sampling, specifies the pdf to sample from | | | |
| void SetImportanceDensity(RooAbsPdf *p) { | | | |
| if(p) oocoutW((TObject*)NULL,InputArguments) << "ToyMCSampler Impo | | | |
| rtance Sampling: This is in beta." << endl; | | | |
| fImportanceDensity = p; | | | |
| } | | | |
| // for importance sampling, a snapshot of the parameters used in impo | | | |
| rtance density | | | |
| void SetImportanceSnapshot(const RooArgSet &s) { fImportanceSnapshot | | | |
| = &s; } | | | |
| | | | |
| // calling with argument or NULL deactivates proof | | // calling with argument or NULL deactivates proof | |
| void SetProofConfig(ProofConfig *pc = NULL) { fProofConfig = pc; } | | void SetProofConfig(ProofConfig *pc = NULL) { fProofConfig = pc; } | |
| | | | |
| void SetProtoData(const RooDataSet* d) { fProtoData = d; } | | void SetProtoData(const RooDataSet* d) { fProtoData = d; } | |
| | | | |
| protected: | | protected: | |
| | | | |
| // helper for GenerateToyData | | // helper for GenerateToyData | |
| RooAbsData* Generate(RooAbsPdf &pdf, RooArgSet &observables, const Ro
oDataSet *protoData=NULL, int forceEvents=0) const; | | RooAbsData* Generate(RooAbsPdf &pdf, RooArgSet &observables, const Ro
oDataSet *protoData=NULL, int forceEvents=0) const; | |
| | | | |
| // helper method for clearing the cache | | // helper method for clearing the cache | |
|
| void ClearCache(); | | virtual void ClearCache(); | |
| | | | |
| | | // densities, snapshots, and test statistics to reweight to | |
| | | RooAbsPdf *fPdf; // model (can be alt or null) | |
| | | const RooArgSet* fParametersForTestStat; | |
| | | vector<TestStatistic*> fTestStatistics; | |
| | | | |
|
| TestStatistic *fTestStat; // test statistic that is being sampled | | | |
| RooAbsPdf *fPdf; // model | | | |
| string fSamplingDistName; // name of the model | | string fSamplingDistName; // name of the model | |
| RooAbsPdf *fPriorNuisance; // prior pdf for nuisance parameters | | RooAbsPdf *fPriorNuisance; // prior pdf for nuisance parameters | |
|
| RooArgSet *fNullPOI; // parameters of interest | | | |
| const RooArgSet *fNuisancePars; | | const RooArgSet *fNuisancePars; | |
| const RooArgSet *fObservables; | | const RooArgSet *fObservables; | |
| const RooArgSet *fGlobalObservables; | | const RooArgSet *fGlobalObservables; | |
| Int_t fNToys; // number of toys to generate | | Int_t fNToys; // number of toys to generate | |
| Int_t fNEvents; // number of events per toy (may be ignored depending
on settings) | | Int_t fNEvents; // number of events per toy (may be ignored depending
on settings) | |
| Double_t fSize; | | Double_t fSize; | |
| Bool_t fExpectedNuisancePar; // whether to use expectation values for
nuisance parameters (ie Asimov data set) | | Bool_t fExpectedNuisancePar; // whether to use expectation values for
nuisance parameters (ie Asimov data set) | |
| Bool_t fGenerateBinned; | | Bool_t fGenerateBinned; | |
| TString fGenerateBinnedTag; | | TString fGenerateBinnedTag; | |
| Bool_t fGenerateAutoBinned; | | Bool_t fGenerateAutoBinned; | |
| | | | |
| skipping to change at line 318 | | skipping to change at line 289 | |
| // (taking weights into account, therefore double) | | // (taking weights into account, therefore double) | |
| // Default: 0.0 which means no adaptive sampling | | // Default: 0.0 which means no adaptive sampling | |
| Double_t fToysInTails; | | Double_t fToysInTails; | |
| // maximum no of toys | | // maximum no of toys | |
| // (taking weights into account, therefore double) | | // (taking weights into account, therefore double) | |
| Double_t fMaxToys; | | Double_t fMaxToys; | |
| // tails | | // tails | |
| Double_t fAdaptiveLowLimit; | | Double_t fAdaptiveLowLimit; | |
| Double_t fAdaptiveHighLimit; | | Double_t fAdaptiveHighLimit; | |
| | | | |
|
| RooAbsPdf *fImportanceDensity; // in dev | | | |
| const RooArgSet *fImportanceSnapshot; // in dev | | | |
| | | | |
| const RooDataSet *fProtoData; // in dev | | const RooDataSet *fProtoData; // in dev | |
| | | | |
| ProofConfig *fProofConfig; //! | | ProofConfig *fProofConfig; //! | |
| | | | |
| mutable NuisanceParametersSampler *fNuisanceParametersSampler; //! | | mutable NuisanceParametersSampler *fNuisanceParametersSampler; //! | |
| | | | |
| // objects below cache information and are mutable and non-persistent | | // objects below cache information and are mutable and non-persistent | |
| mutable RooArgSet* _allVars ; //! | | mutable RooArgSet* _allVars ; //! | |
| mutable list<RooAbsPdf*> _pdfList ; //! | | mutable list<RooAbsPdf*> _pdfList ; //! | |
| mutable list<RooArgSet*> _obsList ; //! | | mutable list<RooArgSet*> _obsList ; //! | |
| | | | |
End of changes. 30 change blocks. |
| 145 lines changed or deleted | | 113 lines changed or added | |
|
| ToyMCStudy.h | | ToyMCStudy.h | |
|
| // @(#)root/roostats:$Id: ToyMCStudy.h 39928 2011-06-24 08:18:59Z moneta $ | | // @(#)root/roostats:$Id: ToyMCStudy.h 43199 2012-03-01 20:17:42Z 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_ToyMCStudy | | #ifndef ROOSTATS_ToyMCStudy | |
| #define ROOSTATS_ToyMCStudy | | #define ROOSTATS_ToyMCStudy | |
| | | | |
| skipping to change at line 41 | | skipping to change at line 41 | |
| #include "RooStats/ToyMCSampler.h" | | #include "RooStats/ToyMCSampler.h" | |
| #include "RooStats/SamplingDistribution.h" | | #include "RooStats/SamplingDistribution.h" | |
| | | | |
| #include "RooWorkspace.h" | | #include "RooWorkspace.h" | |
| #include "RooArgSet.h" | | #include "RooArgSet.h" | |
| | | | |
| #include "RooDataSet.h" | | #include "RooDataSet.h" | |
| #include "RooLinkedList.h" | | #include "RooLinkedList.h" | |
| #include "RooLinkedListIter.h" | | #include "RooLinkedListIter.h" | |
| | | | |
|
| | | #include <vector> | |
| | | | |
| namespace RooStats { | | namespace RooStats { | |
| | | | |
| class ToyMCStudy: public RooAbsStudy { | | class ToyMCStudy: public RooAbsStudy { | |
| | | | |
| public: | | public: | |
| // need to have constructor without arguments for proof | | // need to have constructor without arguments for proof | |
| ToyMCStudy(const char *name = "ToyMCStudy", const char *title = "ToyM
CStudy") : | | ToyMCStudy(const char *name = "ToyMCStudy", const char *title = "ToyM
CStudy") : | |
| RooAbsStudy(name, title), | | RooAbsStudy(name, title), | |
|
| | | | |
| fToyMCSampler(NULL) | | fToyMCSampler(NULL) | |
| { | | { | |
| // In this case, this is the normal output. The SamplingDistributi
on | | // In this case, this is the normal output. The SamplingDistributi
on | |
| // instances are stored as detailed output. | | // instances are stored as detailed output. | |
| storeDetailedOutput(kTRUE); | | storeDetailedOutput(kTRUE); | |
| } | | } | |
| | | | |
|
| RooAbsStudy* clone(const char* /*newname*/="") const { return new To
yMCStudy(*this) ; } | | RooAbsStudy* clone(const char* /*newname*/="") const { return new
ToyMCStudy(*this) ; } | |
| | | | |
|
| virtual ~ToyMCStudy() { | | virtual ~ToyMCStudy() {} | |
| } | | | |
| | | | |
| // RooAbsStudy interfaces | | // RooAbsStudy interfaces | |
| virtual Bool_t initialize(void); | | virtual Bool_t initialize(void); | |
| virtual Bool_t execute(void); | | virtual Bool_t execute(void); | |
| virtual Bool_t finalize(void); | | virtual Bool_t finalize(void); | |
| | | | |
|
| Bool_t merge(SamplingDistribution& result); | | RooDataSet* merge(); | |
| | | | |
| void SetToyMCSampler(ToyMCSampler& t) { fToyMCSampler = &t; } | | void SetToyMCSampler(ToyMCSampler& t) { fToyMCSampler = &t; } | |
|
| void SetParamPoint(const RooArgSet& poi) { fParamPointOfInterest.add(
poi); } | | void SetParamPoint(const RooArgSet& paramPoint) { fParamPoint.add(par
amPoint); } | |
| | | | |
| protected: | | protected: | |
| | | | |
| ToyMCSampler *fToyMCSampler; | | ToyMCSampler *fToyMCSampler; | |
|
| RooArgSet fParamPointOfInterest; | | RooArgSet fParamPoint; | |
| | | | |
| | | protected: | |
| | | ClassDef(ToyMCStudy,1); // toy MC study for parallel processing | |
| | | | |
| | | }; | |
| | | | |
| | | class ToyMCPayload : public TNamed { | |
| | | | |
| | | public: | |
| | | | |
| | | ToyMCPayload() { | |
| | | // proof constructor, do not use | |
| | | } | |
| | | | |
| | | ToyMCPayload(RooDataSet* sd) | |
| | | { | |
| | | fDataSet = sd; | |
| | | } | |
| | | | |
| | | virtual ~ToyMCPayload() { | |
| | | } | |
| | | | |
| | | RooDataSet* GetSamplingDistributions() | |
| | | { | |
| | | return fDataSet; | |
| | | } | |
| | | | |
| | | private: | |
| | | RooDataSet* fDataSet; | |
| | | | |
| protected: | | protected: | |
|
| ClassDef(ToyMCStudy,1) // toy MC study for parallel processing | | ClassDef(ToyMCPayload,1); | |
| }; | | }; | |
|
| | | | |
| } | | } | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 10 change blocks. |
| 9 lines changed or deleted | | 39 lines changed or added | |
|