Logo ROOT   6.12/07
Reference Guide
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 #include "TObject.h"
22 #include "TString.h"
23 
24 const char* const kPROOF_BenchCPUSelPar = "ProofBenchCPUSel"; // PAR with bench CPU selectors
25 const char* const kPROOF_BenchDataSelPar = "ProofBenchDataSel"; // PAR with bench data selectors
26 const char* const kPROOF_BenchParDir = "proof/proofbench/"; // Dir with ProofBench Par files (under 'etc')
27 const char* const kPROOF_BenchSrcDir = "proof/proofbench/src/"; // Dir with ProofBench Src files
28 const char* const kPROOF_BenchIncDir = "proof/proofbench/inc/"; // Dir with ProofBench Inc files
29 const char* const kPROOF_BenchSelCPUDef = "TSelHist"; // default CPU selector
30 const char* const kPROOF_BenchSelDataDef = "TSelEvent"; // default Data Read selector
31 const char* const kPROOF_BenchSelDataGenDef = "TSelEventGen"; // default Data generator selector
32 
33 class TPBReadType : public TObject {
34 public:
35  enum EReadType {
36  kReadNotSpecified = 0, //read type not specified
37  kReadFull = 1, //read in a full event
38  kReadOpt = 2, //read in part of an event
39  kReadNo = 4 //do not read in event
40  };
41 private:
44 public:
45  TPBReadType(EReadType type = kReadOpt) : fType(type), fName("PROOF_Benchmark_ReadType") { }
46  virtual ~TPBReadType() { }
47 
48  EReadType GetType() const { return fType; }
49  Bool_t IsReadFull() const { return (fType == kReadFull) ? kTRUE : kFALSE; }
50  Bool_t IsReadOpt() const { return (fType == kReadOpt) ? kTRUE : kFALSE; }
51  Bool_t IsReadNo() const { return (fType == kReadNo) ? kTRUE : kFALSE; }
52  const char *GetName() const { return fName; }
53 
54  ClassDef(TPBReadType, 1) // Streamable PBReadType
55 };
56 
57 class TPBHistType : public TObject {
58 public:
59  enum EHistType {
60  kHistNotSpecified = 0, //histogram type not specified
61  kHist1D = 1, //1-D histogram
62  kHist2D = 2, //2-D histogram
63  kHist3D = 4, //3-D histogram
64  kHistAll = kHist1D | kHist2D | kHist3D //1-D, 2-D and 3-D histograms
65  };
66 private:
69 public:
70  TPBHistType(EHistType type = kHist1D) : fType(type), fName("PROOF_Benchmark_HistType") { }
71  virtual ~TPBHistType() { }
72 
73  EHistType GetType() const { return fType; }
74  Bool_t IsHist1D() const { return (fType == kHist1D) ? kTRUE : kFALSE; }
75  Bool_t IsHist2D() const { return (fType == kHist2D) ? kTRUE : kFALSE; }
76  Bool_t IsHist3D() const { return (fType == kHist3D) ? kTRUE : kFALSE; }
77  Bool_t IsHistAll() const { return (fType == kHistAll) ? kTRUE : kFALSE; }
78  const char *GetName() const { return fName; }
79 
80  ClassDef(TPBHistType, 1) // Streamable PBHistType
81 };
82 
83 class TPBHandleDSType : public TObject {
84 public:
86  kReleaseCache = 0, // Release memory cache for the given file
87  kCheckCache = 1, // Check memory cache for the given files
88  kRemoveFiles = 2, // Remove (physically) the given files
89  kCopyFiles = 3 // Copy the given files to a destination dir
90  };
91 private:
94 public:
95  TPBHandleDSType(EHandleDSType type = kReleaseCache) : fType(type), fName("PROOF_Benchmark_HandleDSType") { }
96  virtual ~TPBHandleDSType() { }
97 
98  EHandleDSType GetType() const { return fType; }
99  Bool_t IsReleaseCache() const { return (fType == kReleaseCache) ? kTRUE : kFALSE; }
100  Bool_t IsCheckCache() const { return (fType == kCheckCache) ? kTRUE : kFALSE; }
101  Bool_t IsRemoveFiles() const { return (fType == kRemoveFiles) ? kTRUE : kFALSE; }
102  Bool_t IsCopyFiles() const { return (fType == kCopyFiles) ? kTRUE : kFALSE; }
103  const char *GetName() const { return fName; }
104 
105  ClassDef(TPBHandleDSType, 1) // Streamable PBHandleDSType
106 };
107 
108 #endif
Bool_t IsHistAll() const
const char *const kPROOF_BenchCPUSelPar
TPBHistType(EHistType type=kHist1D)
const char * GetName() const
Returns name of object.
Bool_t IsReadNo() const
virtual ~TPBHistType()
EHistType fType
Basic string class.
Definition: TString.h:125
bool Bool_t
Definition: RtypesCore.h:59
const char *const kPROOF_BenchParDir
#define ClassDef(name, id)
Definition: Rtypes.h:320
EReadType fType
const char * GetName() const
Returns name of object.
EHandleDSType fType
virtual ~TPBReadType()
Bool_t IsHist1D() const
const char *const kPROOF_BenchSelDataDef
EHistType GetType() const
EReadType GetType() const
const char *const kPROOF_BenchDataSelPar
Bool_t IsHist2D() const
Bool_t IsCheckCache() const
TPBReadType(EReadType type=kReadOpt)
Bool_t IsCopyFiles() const
const Bool_t kFALSE
Definition: RtypesCore.h:88
const char *const kPROOF_BenchSrcDir
Bool_t IsReadFull() const
int type
Definition: TGX11.cxx:120
const char *const kPROOF_BenchSelDataGenDef
EHandleDSType GetType() const
Mother of all ROOT objects.
Definition: TObject.h:37
Bool_t IsRemoveFiles() const
virtual ~TPBHandleDSType()
const char *const kPROOF_BenchSelCPUDef
Bool_t IsReadOpt() const
Bool_t IsHist3D() const
TPBHandleDSType(EHandleDSType type=kReleaseCache)
const Bool_t kTRUE
Definition: RtypesCore.h:87
const char * GetName() const
Returns name of object.
Bool_t IsReleaseCache() const
const char *const kPROOF_BenchIncDir