ROOT  6.07/01
Reference Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
TProofBenchTypes.h
Go to the documentation of this file.
1 // @(#)root/proof:$Id$
2 // Author: G. Ganis Oct 2010
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2005, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 #ifndef ROOT_TProofBenchTypes
13 #define ROOT_TProofBenchTypes
14 
15 //////////////////////////////////////////////////////////////////////////
16 // //
17 // ProofBenchTypes //
18 // Const and types used by ProofBench and its selectors //
19 // //
20 //////////////////////////////////////////////////////////////////////////
21 #ifndef ROOT_TObject
22 #include "TObject.h"
23 #endif
24 #ifndef ROOT_TString
25 #include "TString.h"
26 #endif
27 
28 const char* const kPROOF_BenchCPUSelPar = "ProofBenchCPUSel"; // PAR with bench CPU selectors
29 const char* const kPROOF_BenchDataSelPar = "ProofBenchDataSel"; // PAR with bench data selectors
30 const char* const kPROOF_BenchParDir = "proof/proofbench/"; // Dir with ProofBench Par files (under 'etc')
31 const char* const kPROOF_BenchSrcDir = "proof/proofbench/src/"; // Dir with ProofBench Src files
32 const char* const kPROOF_BenchIncDir = "proof/proofbench/inc/"; // Dir with ProofBench Inc files
33 const char* const kPROOF_BenchSelCPUDef = "TSelHist"; // default CPU selector
34 const char* const kPROOF_BenchSelDataDef = "TSelEvent"; // default Data Read selector
35 const char* const kPROOF_BenchSelDataGenDef = "TSelEventGen"; // default Data generator selector
36 
37 class TPBReadType : public TObject {
38 public:
39  enum EReadType {
40  kReadNotSpecified = 0, //read type not specified
41  kReadFull = 1, //read in a full event
42  kReadOpt = 2, //read in part of an event
43  kReadNo = 4 //do not read in event
44  };
45 private:
48 public:
49  TPBReadType(EReadType type = kReadOpt) : fType(type), fName("PROOF_Benchmark_ReadType") { }
50  virtual ~TPBReadType() { }
51 
52  EReadType GetType() const { return fType; }
53  Bool_t IsReadFull() const { return (fType == kReadFull) ? kTRUE : kFALSE; }
54  Bool_t IsReadOpt() const { return (fType == kReadOpt) ? kTRUE : kFALSE; }
55  Bool_t IsReadNo() const { return (fType == kReadNo) ? kTRUE : kFALSE; }
56  const char *GetName() const { return fName; }
57 
58  ClassDef(TPBReadType, 1) // Streamable PBReadType
59 };
60 
61 class TPBHistType : public TObject {
62 public:
63  enum EHistType {
64  kHistNotSpecified = 0, //histogram type not specified
65  kHist1D = 1, //1-D histogram
66  kHist2D = 2, //2-D histogram
67  kHist3D = 4, //3-D histogram
68  kHistAll = kHist1D | kHist2D | kHist3D //1-D, 2-D and 3-D histograms
69  };
70 private:
73 public:
74  TPBHistType(EHistType type = kHist1D) : fType(type), fName("PROOF_Benchmark_HistType") { }
75  virtual ~TPBHistType() { }
76 
77  EHistType GetType() const { return fType; }
78  Bool_t IsHist1D() const { return (fType == kHist1D) ? kTRUE : kFALSE; }
79  Bool_t IsHist2D() const { return (fType == kHist2D) ? kTRUE : kFALSE; }
80  Bool_t IsHist3D() const { return (fType == kHist3D) ? kTRUE : kFALSE; }
81  Bool_t IsHistAll() const { return (fType == kHistAll) ? kTRUE : kFALSE; }
82  const char *GetName() const { return fName; }
83 
84  ClassDef(TPBHistType, 1) // Streamable PBHistType
85 };
86 
87 class TPBHandleDSType : public TObject {
88 public:
90  kReleaseCache = 0, // Release memory cache for the given file
91  kCheckCache = 1, // Check memory cache for the given files
92  kRemoveFiles = 2, // Remove (physically) the given files
93  kCopyFiles = 3 // Copy the given files to a destination dir
94  };
95 private:
98 public:
99  TPBHandleDSType(EHandleDSType type = kReleaseCache) : fType(type), fName("PROOF_Benchmark_HandleDSType") { }
100  virtual ~TPBHandleDSType() { }
101 
102  EHandleDSType GetType() const { return fType; }
103  Bool_t IsReleaseCache() const { return (fType == kReleaseCache) ? kTRUE : kFALSE; }
104  Bool_t IsCheckCache() const { return (fType == kCheckCache) ? kTRUE : kFALSE; }
105  Bool_t IsRemoveFiles() const { return (fType == kRemoveFiles) ? kTRUE : kFALSE; }
106  Bool_t IsCopyFiles() const { return (fType == kCopyFiles) ? kTRUE : kFALSE; }
107  const char *GetName() const { return fName; }
108 
109  ClassDef(TPBHandleDSType, 1) // Streamable PBHandleDSType
110 };
111 
112 #endif
const char *const kPROOF_BenchCPUSelPar
const char * GetName() const
Returns name of object.
TPBHistType(EHistType type=kHist1D)
virtual ~TPBHistType()
const char * GetName() const
Returns name of object.
EHistType fType
Bool_t IsReadOpt() const
Basic string class.
Definition: TString.h:137
EHandleDSType GetType() const
bool Bool_t
Definition: RtypesCore.h:59
const char *const kPROOF_BenchParDir
const Bool_t kFALSE
Definition: Rtypes.h:92
Bool_t IsCheckCache() const
Bool_t IsHist3D() const
Bool_t IsReleaseCache() const
Bool_t IsReadFull() const
Bool_t IsHist1D() const
#define ClassDef(name, id)
Definition: Rtypes.h:254
EReadType fType
Bool_t IsHistAll() const
EHandleDSType fType
virtual ~TPBReadType()
const char * GetName() const
Returns name of object.
const char *const kPROOF_BenchSelDataDef
const char *const kPROOF_BenchDataSelPar
EHistType GetType() const
Bool_t IsCopyFiles() const
EReadType GetType() const
Bool_t IsRemoveFiles() const
Bool_t IsHist2D() const
TPBReadType(EReadType type=kReadOpt)
const char *const kPROOF_BenchSrcDir
int type
Definition: TGX11.cxx:120
const char *const kPROOF_BenchSelDataGenDef
Mother of all ROOT objects.
Definition: TObject.h:58
virtual ~TPBHandleDSType()
const char *const kPROOF_BenchSelCPUDef
Bool_t IsReadNo() const
const Bool_t kTRUE
Definition: Rtypes.h:91
TPBHandleDSType(EHandleDSType type=kReleaseCache)
const char *const kPROOF_BenchIncDir