Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
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
24const char* const kPROOF_BenchCPUSelPar = "ProofBenchCPUSel"; // PAR with bench CPU selectors
25const char* const kPROOF_BenchDataSelPar = "ProofBenchDataSel"; // PAR with bench data selectors
26const char* const kPROOF_BenchParDir = "proof/proofbench/"; // Dir with ProofBench Par files (under 'etc')
27const char* const kPROOF_BenchSrcDir = "proof/proofbench/src/"; // Dir with ProofBench Src files
28const char* const kPROOF_BenchIncDir = "proof/proofbench/inc/"; // Dir with ProofBench Inc files
29const char* const kPROOF_BenchSelCPUDef = "TSelHist"; // default CPU selector
30const char* const kPROOF_BenchSelDataDef = "TSelEvent"; // default Data Read selector
31const char* const kPROOF_BenchSelDataGenDef = "TSelEventGen"; // default Data generator selector
32
33class TPBReadType : public TObject {
34public:
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 };
41private:
44public:
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
57class TPBHistType : public TObject {
58public:
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 };
66private:
69public:
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
83class TPBHandleDSType : public TObject {
84public:
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 };
91private:
94public:
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
const Bool_t kFALSE
Definition RtypesCore.h:101
const Bool_t kTRUE
Definition RtypesCore.h:100
#define ClassDef(name, id)
Definition Rtypes.h:325
int type
Definition TGX11.cxx:121
const char *const kPROOF_BenchCPUSelPar
const char *const kPROOF_BenchIncDir
const char *const kPROOF_BenchSrcDir
const char *const kPROOF_BenchSelDataDef
const char *const kPROOF_BenchDataSelPar
const char *const kPROOF_BenchSelCPUDef
const char *const kPROOF_BenchParDir
const char *const kPROOF_BenchSelDataGenDef
Mother of all ROOT objects.
Definition TObject.h:41
Bool_t IsReleaseCache() const
Bool_t IsCopyFiles() const
TPBHandleDSType(EHandleDSType type=kReleaseCache)
EHandleDSType GetType() const
virtual ~TPBHandleDSType()
EHandleDSType fType
Bool_t IsRemoveFiles() const
const char * GetName() const
Returns name of object.
Bool_t IsCheckCache() const
TPBHistType(EHistType type=kHist1D)
const char * GetName() const
Returns name of object.
Bool_t IsHist3D() const
Bool_t IsHist2D() const
Bool_t IsHistAll() const
EHistType fType
Bool_t IsHist1D() const
EHistType GetType() const
virtual ~TPBHistType()
Bool_t IsReadFull() const
EReadType fType
EReadType GetType() const
const char * GetName() const
Returns name of object.
Bool_t IsReadOpt() const
TPBReadType(EReadType type=kReadOpt)
virtual ~TPBReadType()
Bool_t IsReadNo() const
Basic string class.
Definition TString.h:136