| 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 | |
|
| TDataSetManager.h | | TDataSetManager.h | |
|
| // @(#)root/proof:$Id: TDataSetManager.h 33447 2010-05-10 13:26:51Z ganis $ | | // @(#)root/proof:$Id: TDataSetManager.h 43571 2012-03-30 12:37:08Z ganis $ | |
| // Author: Jan Fiete Grosse-Oetringhaus, 08.08.07 | | // Author: Jan Fiete Grosse-Oetringhaus, 08.08.07 | |
| | | | |
| /************************************************************************* | | /************************************************************************* | |
| * 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 43 | | skipping to change at line 43 | |
| #endif | | #endif | |
| #ifndef ROOT_TUri | | #ifndef ROOT_TUri | |
| #include "TUri.h" | | #include "TUri.h" | |
| #endif | | #endif | |
| | | | |
| class TFileCollection; | | class TFileCollection; | |
| class TFileInfo; | | class TFileInfo; | |
| class TMD5; | | class TMD5; | |
| class TUrl; | | class TUrl; | |
| class TVirtualMonitoringWriter; | | class TVirtualMonitoringWriter; | |
|
| | | class TFileStager; | |
| | | | |
| class TDataSetManager : public TObject { | | class TDataSetManager : public TObject { | |
| | | | |
| private: | | private: | |
| TDataSetManager(const TDataSetManager&); // not implemented | | TDataSetManager(const TDataSetManager&); // not implemented | |
| TDataSetManager& operator=(const TDataSetManager&); // not implemented | | TDataSetManager& operator=(const TDataSetManager&); // not implemented | |
| | | | |
| protected: | | protected: | |
| TString fGroup; // Group to which the owner of this session bel
ongs | | TString fGroup; // Group to which the owner of this session bel
ongs | |
| TString fUser; // Owner of the session | | TString fUser; // Owner of the session | |
| | | | |
| skipping to change at line 153 | | skipping to change at line 154 | |
| static TString CreateUri(const char *dsGroup = 0, const char *
dsUser = 0, | | static TString CreateUri(const char *dsGroup = 0, const char *
dsUser = 0, | |
| const char *dsName = 0, const char *d
sTree = 0); | | const char *dsName = 0, const char *d
sTree = 0); | |
| static Bool_t CheckDataSetSrvMaps(TUrl *furl, TString &fn, TL
ist *srvmaplist = 0); | | static Bool_t CheckDataSetSrvMaps(TUrl *furl, TString &fn, TL
ist *srvmaplist = 0); | |
| static TList *GetDataSetSrvMaps(); | | static TList *GetDataSetSrvMaps(); | |
| static TList *ParseDataSetSrvMaps(const TString &srvmaps); | | static TList *ParseDataSetSrvMaps(const TString &srvmaps); | |
| static Int_t ScanDataSet(TFileCollection *dataset, Int_t fop
t, Int_t sopt = 0, Int_t ropt = 0, | | static Int_t ScanDataSet(TFileCollection *dataset, Int_t fop
t, Int_t sopt = 0, Int_t ropt = 0, | |
| Bool_t dbg = kFALSE, | | Bool_t dbg = kFALSE, | |
| Int_t *touched = 0, Int_t *opened =
0, Int_t *disappeared = 0, | | Int_t *touched = 0, Int_t *opened =
0, Int_t *disappeared = 0, | |
| TList *flist = 0, Long64_t avgsz =
-1, const char *mss = 0, | | TList *flist = 0, Long64_t avgsz =
-1, const char *mss = 0, | |
| Int_t maxfiles = -1, const char *st
ageopts = 0); | | Int_t maxfiles = -1, const char *st
ageopts = 0); | |
|
| | | static Bool_t CheckStagedStatus(TFileInfo *fileInfo, Int_t fo | |
| | | pt, Int_t maxfiles, | |
| | | Int_t newstagedfiles, TFileSt | |
| | | ager* stager, Bool_t createStager, | |
| | | Bool_t dbg, Bool_t &changed, | |
| | | Bool_t& touched, | |
| | | Bool_t& disappeared); | |
| | | static void ProcessFile(TFileInfo *fileInfo, Int_t sopt, Bo | |
| | | ol_t checkstg, Bool_t doall, | |
| | | TFileStager* stager, Bool_t createS | |
| | | tager, const char* stageopts, | |
| | | Bool_t dbg, Bool_t &changed, Bool_t | |
| | | & opened); | |
| | | | |
| static Int_t ScanFile(TFileInfo *fileinfo, Bool_t notify); | | static Int_t ScanFile(TFileInfo *fileinfo, Bool_t notify); | |
| static Int_t FillMetaData(TFileInfo *fi, TDirectory *d, cons
t char *rdir = "/"); | | static Int_t FillMetaData(TFileInfo *fi, TDirectory *d, cons
t char *rdir = "/"); | |
| | | | |
| ClassDef(TDataSetManager, 0) // Abstract data set manager class | | ClassDef(TDataSetManager, 0) // Abstract data set manager class | |
| }; | | }; | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 3 change blocks. |
| 1 lines changed or deleted | | 16 lines changed or added | |
|
| TFileInfo.h | | TFileInfo.h | |
|
| // @(#)root/base:$Id: TFileInfo.h 33389 2010-05-05 14:18:07Z rdm $ | | // @(#)root/base:$Id: TFileInfo.h 43571 2012-03-30 12:37:08Z ganis $ | |
| // Author: Andreas-Joachim Peters 20/9/2005 | | // Author: Andreas-Joachim Peters 20/9/2005 | |
| | | | |
| /************************************************************************* | | /************************************************************************* | |
| * Copyright (C) 1995-2005, Rene Brun and Fons Rademakers. * | | * Copyright (C) 1995-2005, Rene Brun and Fons Rademakers. * | |
| * All rights reserved. * | | * All rights reserved. * | |
| * * | | * * | |
| * For the licensing terms see $ROOTSYS/LICENSE. * | | * For the licensing terms see $ROOTSYS/LICENSE. * | |
| * For the list of contributors see $ROOTSYS/README/CREDITS. * | | * For the list of contributors see $ROOTSYS/README/CREDITS. * | |
| *************************************************************************/ | | *************************************************************************/ | |
| | | | |
| | | | |
| skipping to change at line 60 | | skipping to change at line 60 | |
| | | | |
| private: | | private: | |
| TUrl *fCurrentUrl; //! current URL to access the file, po
ints to URL | | TUrl *fCurrentUrl; //! current URL to access the file, po
ints to URL | |
| // in the fUrlList or 0, if the list
end is reached | | // in the fUrlList or 0, if the list
end is reached | |
| TList *fUrlList; // list of file URLs | | TList *fUrlList; // list of file URLs | |
| Long64_t fSize; // file size | | Long64_t fSize; // file size | |
| TUUID *fUUID; //-> uuid of the referenced file | | TUUID *fUUID; //-> uuid of the referenced file | |
| TMD5 *fMD5; //-> md5 digest of the file | | TMD5 *fMD5; //-> md5 digest of the file | |
| TList *fMetaDataList; // generic list of file meta data obje
ct(s) | | TList *fMetaDataList; // generic list of file meta data obje
ct(s) | |
| | | | |
|
| | | Int_t fIndex; // Index to be used when sorting with | |
| | | index | |
| | | | |
| void ParseInput(const char *in); | | void ParseInput(const char *in); | |
| | | | |
| TFileInfo& operator=(const TFileInfo&); // not implemented | | TFileInfo& operator=(const TFileInfo&); // not implemented | |
| | | | |
| public: | | public: | |
| enum EStatusBits { | | enum EStatusBits { | |
| kStaged = BIT(15), | | kStaged = BIT(15), | |
|
| kCorrupted = BIT(16) | | kCorrupted = BIT(16), | |
| | | kSortWithIndex = BIT(17) // Use index when sorting (in Compare) | |
| }; | | }; | |
| | | | |
| TFileInfo(const char *url = 0, Long64_t size = -1, const char *uuid = 0, | | TFileInfo(const char *url = 0, Long64_t size = -1, const char *uuid = 0, | |
| const char *md5 = 0, TObject *meta = 0); | | const char *md5 = 0, TObject *meta = 0); | |
| TFileInfo(const TFileInfo &); | | TFileInfo(const TFileInfo &); | |
| | | | |
| virtual ~TFileInfo(); | | virtual ~TFileInfo(); | |
| | | | |
| void ResetUrl() { fCurrentUrl = (TUrl*)fUrlList->First(); } | | void ResetUrl() { fCurrentUrl = (TUrl*)fUrlList->First(); } | |
| TUrl *NextUrl(); | | TUrl *NextUrl(); | |
| | | | |
| skipping to change at line 104 | | skipping to change at line 107 | |
| TUrl *FindByUrl(const char *url, Bool_t withDeflt = kFALSE); | | TUrl *FindByUrl(const char *url, Bool_t withDeflt = kFALSE); | |
| | | | |
| Bool_t AddUrl(const char *url, Bool_t infront = kFALSE); | | Bool_t AddUrl(const char *url, Bool_t infront = kFALSE); | |
| Bool_t RemoveUrl(const char *url); | | Bool_t RemoveUrl(const char *url); | |
| Bool_t AddMetaData(TObject *meta); | | Bool_t AddMetaData(TObject *meta); | |
| Bool_t RemoveMetaData(const char *meta = 0); | | Bool_t RemoveMetaData(const char *meta = 0); | |
| | | | |
| Bool_t IsSortable() const { return kTRUE; } | | Bool_t IsSortable() const { return kTRUE; } | |
| Int_t Compare(const TObject *obj) const; | | Int_t Compare(const TObject *obj) const; | |
| | | | |
|
| | | Int_t GetIndex() const { return fIndex; } | |
| | | void SetIndex(Int_t idx) { fIndex = idx; } | |
| | | | |
| void Print(Option_t *options="") const; | | void Print(Option_t *options="") const; | |
| | | | |
|
| ClassDef(TFileInfo,3) // Describes generic file info including meta da
ta information | | ClassDef(TFileInfo,4) // Describes generic file info including meta da
ta information | |
| }; | | }; | |
| | | | |
| class TFileInfoMeta : public TNamed { | | class TFileInfoMeta : public TNamed { | |
| | | | |
| private: | | private: | |
| Long64_t fEntries; // number of entries in tree or number of obj
ects | | Long64_t fEntries; // number of entries in tree or number of obj
ects | |
| Long64_t fFirst; // first valid tree entry | | Long64_t fFirst; // first valid tree entry | |
| Long64_t fLast; // last valid tree entry | | Long64_t fLast; // last valid tree entry | |
| Bool_t fIsTree; // true if type is a TTree (or TTree derived) | | Bool_t fIsTree; // true if type is a TTree (or TTree derived) | |
| Long64_t fTotBytes; // uncompressed size in bytes | | Long64_t fTotBytes; // uncompressed size in bytes | |
| | | | |
End of changes. 5 change blocks. |
| 3 lines changed or deleted | | 10 lines changed or added | |
|
| TPacketizerFile.h | | TPacketizerFile.h | |
|
| // @(#)root/proofplayer:$Id: TPacketizerFile.h 36876 2010-11-23 11:45:47Z g
anis $ | | // @(#)root/proofplayer:$Id: TPacketizerFile.h 43571 2012-03-30 12:37:08Z g
anis $ | |
| // Author: G. Ganis 2009 | | // Author: G. Ganis 2009 | |
| | | | |
| /************************************************************************* | | /************************************************************************* | |
| * Copyright (C) 1995-2002, Rene Brun and Fons Rademakers. * | | * Copyright (C) 1995-2002, Rene Brun and Fons Rademakers. * | |
| * All rights reserved. * | | * All rights reserved. * | |
| * * | | * * | |
| * For the licensing terms see $ROOTSYS/LICENSE. * | | * For the licensing terms see $ROOTSYS/LICENSE. * | |
| * For the list of contributors see $ROOTSYS/README/CREDITS. * | | * For the list of contributors see $ROOTSYS/README/CREDITS. * | |
| *************************************************************************/ | | *************************************************************************/ | |
| | | | |
| | | | |
| skipping to change at line 48 | | skipping to change at line 48 | |
| public: // This is always needed | | public: // This is always needed | |
| class TSlaveStat; | | class TSlaveStat; | |
| class TIterObj; | | class TIterObj; | |
| | | | |
| private: | | private: | |
| TMap *fFiles; // Files to be produced/processed per node | | TMap *fFiles; // Files to be produced/processed per node | |
| TList *fNotAssigned; // List of files not assigned to a specifi
c node | | TList *fNotAssigned; // List of files not assigned to a specifi
c node | |
| TList *fIters; // Iterators on the file lists per node | | TList *fIters; // Iterators on the file lists per node | |
| Long64_t fAssigned; // No.files processed or being processed. | | Long64_t fAssigned; // No.files processed or being processed. | |
| Bool_t fProcNotAssigned; // Whether to process files not asdigned t
o a worker | | Bool_t fProcNotAssigned; // Whether to process files not asdigned t
o a worker | |
|
| | | Bool_t fAddFileInfo; // Whether to add the TFileInfo object in
the packet | |
| | | | |
| TStopwatch *fStopwatch; // For measuring the start time of each pa
cket | | TStopwatch *fStopwatch; // For measuring the start time of each pa
cket | |
| | | | |
| TPacketizerFile(); | | TPacketizerFile(); | |
|
| // : fFiles(0), fIters(0), fAssigned(0), fStopwatch(0) { } | | // : fFiles(0), fNotAssigned(0), fIters(0), fAssigned(0), | |
| | | // fProcNotAssigned(kTRUE), fAddFileInfo(kFALSE), fSt | |
| | | opwatch(0) { } | |
| TPacketizerFile(const TPacketizerFile&); // no implementation, will
generate | | TPacketizerFile(const TPacketizerFile&); // no implementation, will
generate | |
| void operator=(const TPacketizerFile&); // error on accidental usage | | void operator=(const TPacketizerFile&); // error on accidental usage | |
| | | | |
| public: | | public: | |
| TPacketizerFile(TList *workers, Long64_t, TList *input, TProofProgressSt
atus *st = 0); | | TPacketizerFile(TList *workers, Long64_t, TList *input, TProofProgressSt
atus *st = 0); | |
| virtual ~TPacketizerFile(); | | virtual ~TPacketizerFile(); | |
| | | | |
| TDSetElement *GetNextPacket(TSlave *wrk, TMessage *r); | | TDSetElement *GetNextPacket(TSlave *wrk, TMessage *r); | |
| | | | |
| Double_t GetCurrentTime(); | | Double_t GetCurrentTime(); | |
| | | | |
End of changes. 3 change blocks. |
| 2 lines changed or deleted | | 5 lines changed or added | |
|
| TProofServ.h | | TProofServ.h | |
|
| // @(#)root/proof:$Id: TProofServ.h 39696 2011-06-13 21:35:34Z pcanal $ | | // @(#)root/proof:$Id: TProofServ.h 43571 2012-03-30 12:37:08Z ganis $ | |
| // Author: Fons Rademakers 16/02/97 | | // Author: Fons Rademakers 16/02/97 | |
| | | | |
| /************************************************************************* | | /************************************************************************* | |
| * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * | | * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * | |
| * All rights reserved. * | | * All rights reserved. * | |
| * * | | * * | |
| * For the licensing terms see $ROOTSYS/LICENSE. * | | * For the licensing terms see $ROOTSYS/LICENSE. * | |
| * For the list of contributors see $ROOTSYS/README/CREDITS. * | | * For the list of contributors see $ROOTSYS/README/CREDITS. * | |
| *************************************************************************/ | | *************************************************************************/ | |
| | | | |
| | | | |
| skipping to change at line 45 | | skipping to change at line 45 | |
| #ifndef ROOT_TStopwatch | | #ifndef ROOT_TStopwatch | |
| #include "TStopwatch.h" | | #include "TStopwatch.h" | |
| #endif | | #endif | |
| #ifndef ROOT_TTimer | | #ifndef ROOT_TTimer | |
| #include "TTimer.h" | | #include "TTimer.h" | |
| #endif | | #endif | |
| #ifndef ROOT_TProofQueryResult | | #ifndef ROOT_TProofQueryResult | |
| #include "TProofQueryResult.h" | | #include "TProofQueryResult.h" | |
| #endif | | #endif | |
| | | | |
|
| | | class TDataSetManager; | |
| class TDSet; | | class TDSet; | |
|
| class TProof; | | | |
| class TVirtualProofPlayer; | | | |
| class TProofLockPath; | | | |
| class TQueryResultManager; | | | |
| class TSocket; | | | |
| class THashList; | | | |
| class TList; | | | |
| class TDSetElement; | | class TDSetElement; | |
|
| class TMessage; | | | |
| class TShutdownTimer; | | | |
| class TReaperTimer; | | | |
| class TIdleTOTimer; | | | |
| class TMutex; | | | |
| class TFileCollection; | | class TFileCollection; | |
|
| class TDataSetManager; | | | |
| class TFileHandler; | | class TFileHandler; | |
|
| | | class THashList; | |
| | | class TIdleTOTimer; | |
| | | class TList; | |
| | | class TMap; | |
| | | class TMessage; | |
| class TMonitor; | | class TMonitor; | |
|
| | | class TMutex; | |
| | | class TProof; | |
| | | class TProofLockPath; | |
| | | class TQueryResultManager; | |
| | | class TReaperTimer; | |
| class TServerSocket; | | class TServerSocket; | |
|
| | | class TShutdownTimer; | |
| | | class TSocket; | |
| | | class TVirtualProofPlayer; | |
| | | | |
| // Hook to external function setting up authentication related stuff | | // Hook to external function setting up authentication related stuff | |
| // for old versions. | | // for old versions. | |
| // For backward compatibility | | // For backward compatibility | |
| typedef Int_t (*OldProofServAuthSetup_t)(TSocket *, Bool_t, Int_t, | | typedef Int_t (*OldProofServAuthSetup_t)(TSocket *, Bool_t, Int_t, | |
| TString &, TString &, TString &); | | TString &, TString &, TString &); | |
| | | | |
| class TProofServ : public TApplication { | | class TProofServ : public TApplication { | |
| | | | |
| friend class TProofServLite; | | friend class TProofServLite; | |
| | | | |
| skipping to change at line 201 | | skipping to change at line 202 | |
| // Query handlers | | // Query handlers | |
| TProofQueryResult *MakeQueryResult(Long64_t nentries, const char *opt, | | TProofQueryResult *MakeQueryResult(Long64_t nentries, const char *opt, | |
| TList *inl, Long64_t first, TDSet *ds
et, | | TList *inl, Long64_t first, TDSet *ds
et, | |
| const char *selec, TObject *elist); | | const char *selec, TObject *elist); | |
| void SetQueryRunning(TProofQueryResult *pq); | | void SetQueryRunning(TProofQueryResult *pq); | |
| | | | |
| // Results handling | | // Results handling | |
| Int_t SendResults(TSocket *sock, TList *outlist = 0, TQueryResul
t *pq = 0); | | Int_t SendResults(TSocket *sock, TList *outlist = 0, TQueryResul
t *pq = 0); | |
| Bool_t AcceptResults(Int_t connections, TVirtualProofPlayer *merg
erPlayer); | | Bool_t AcceptResults(Int_t connections, TVirtualProofPlayer *merg
erPlayer); | |
| | | | |
|
| | | TMap *GetDataSetNodeMap(const char *dsn, TString &emsg); | |
| Int_t RegisterDataSets(TList *in, TList *out); | | Int_t RegisterDataSets(TList *in, TList *out); | |
| | | | |
| // Waiting queries handlers | | // Waiting queries handlers | |
| void SetIdle(Bool_t st = kTRUE); | | void SetIdle(Bool_t st = kTRUE); | |
| Bool_t IsWaiting(); | | Bool_t IsWaiting(); | |
| Int_t WaitingQueries(); | | Int_t WaitingQueries(); | |
| Int_t QueueQuery(TProofQueryResult *pq); | | Int_t QueueQuery(TProofQueryResult *pq); | |
| TProofQueryResult *NextQuery(); | | TProofQueryResult *NextQuery(); | |
| Int_t CleanupWaitingQueries(Bool_t del = kTRUE, TList *qls = 0); | | Int_t CleanupWaitingQueries(Bool_t del = kTRUE, TList *qls = 0); | |
| | | | |
| | | | |
End of changes. 9 change blocks. |
| 14 lines changed or deleted | | 16 lines changed or added | |
|