// @(#)root/proof:$Id$
// Author: G. Ganis Oct 2010

/*************************************************************************
 * Copyright (C) 1995-2005, Rene Brun and Fons Rademakers.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

#ifndef ROOT_TProofBenchTypes
#define ROOT_TProofBenchTypes

//////////////////////////////////////////////////////////////////////////
//                                                                      //
// ProofBenchTypes                                                      //
// Const and types used by ProofBench and its selectors                 //
//                                                                      //
//////////////////////////////////////////////////////////////////////////
#ifndef ROOT_TObject
#include "TObject.h"
#endif
#ifndef ROOT_TString
#include "TString.h"
#endif

const char* const kPROOF_BenchCPUSelPar  = "ProofBenchCPUSel";  // PAR with bench CPU selectors
const char* const kPROOF_BenchDataSelPar = "ProofBenchDataSel";  // PAR with bench data selectors
const char* const kPROOF_BenchParDir     = "proof/proofbench/";  // Dir with ProofBench Par files (under 'etc')
const char* const kPROOF_BenchSrcDir     = "proof/proofbench/src/";  // Dir with ProofBench Src files
const char* const kPROOF_BenchIncDir     = "proof/proofbench/inc/";  // Dir with ProofBench Inc files
const char* const kPROOF_BenchSelCPUDef  = "TSelHist";   // default CPU selector
const char* const kPROOF_BenchSelDataDef = "TSelEvent";  // default Data Read selector
const char* const kPROOF_BenchSelDataGenDef = "TSelEventGen";  // default Data generator selector

class TPBReadType : public TObject {
public:
   enum EReadType {
      kReadNotSpecified = 0,                    //read type not specified
      kReadFull = 1,                            //read in a full event
      kReadOpt = 2,                             //read in part of an event
      kReadNo = 4                               //do not read in event
   };
private:
   EReadType fType;
   TString fName;
public:
   TPBReadType(EReadType type = kReadOpt) : fType(type), fName("PROOF_Benchmark_ReadType") { }
   virtual ~TPBReadType() { }

   EReadType GetType() const { return fType; }
   Bool_t IsReadFull() const { return (fType == kReadFull) ? kTRUE : kFALSE; }
   Bool_t IsReadOpt() const { return (fType == kReadOpt) ? kTRUE : kFALSE; }
   Bool_t IsReadNo() const { return (fType == kReadNo) ? kTRUE : kFALSE; }
   const char *GetName() const { return fName; }

   ClassDef(TPBReadType, 1)     // Streamable PBReadType
};

class TPBHistType : public TObject {
public:
   enum EHistType {
      kHistNotSpecified = 0,                  //histogram type not specified
      kHist1D = 1,                            //1-D histogram
      kHist2D = 2,                            //2-D histogram
      kHist3D = 4,                            //3-D histogram
      kHistAll = kHist1D | kHist2D | kHist3D  //1-D, 2-D and 3-D histograms
   };
private:
   EHistType fType;
   TString fName;
public:
   TPBHistType(EHistType type = kHist1D) : fType(type), fName("PROOF_Benchmark_HistType") { }
   virtual ~TPBHistType() { }

   EHistType GetType() const { return fType; }
   Bool_t IsHist1D() const { return (fType == kHist1D) ? kTRUE : kFALSE; }
   Bool_t IsHist2D() const { return (fType == kHist2D) ? kTRUE : kFALSE; }
   Bool_t IsHist3D() const { return (fType == kHist3D) ? kTRUE : kFALSE; }
   Bool_t IsHistAll() const { return (fType == kHistAll) ? kTRUE : kFALSE; }
   const char *GetName() const { return fName; }

   ClassDef(TPBHistType, 1)     // Streamable PBHistType
};

class TPBHandleDSType : public TObject {
public:
   enum EHandleDSType {
      kReleaseCache   = 0,               // Release memory cache for the given file
      kCheckCache     = 1,               // Check memory cache for the given files
      kRemoveFiles    = 2,               // Remove (physically) the given files
      kCopyFiles      = 3                // Copy the given files to a destination dir
   };
private:
   EHandleDSType fType;
   TString fName;
public:
   TPBHandleDSType(EHandleDSType type = kReleaseCache) : fType(type), fName("PROOF_Benchmark_HandleDSType") { }
   virtual ~TPBHandleDSType() { }

   EHandleDSType GetType() const { return fType; }
   Bool_t IsReleaseCache() const { return (fType == kReleaseCache) ? kTRUE : kFALSE; }
   Bool_t IsCheckCache() const { return (fType == kCheckCache) ? kTRUE : kFALSE; }
   Bool_t IsRemoveFiles() const { return (fType == kRemoveFiles) ? kTRUE : kFALSE; }
   Bool_t IsCopyFiles() const { return (fType == kCopyFiles) ? kTRUE : kFALSE; }
   const char *GetName() const { return fName; }

   ClassDef(TPBHandleDSType, 1)     // Streamable PBHandleDSType
};

#endif
 TProofBenchTypes.h:1
 TProofBenchTypes.h:2
 TProofBenchTypes.h:3
 TProofBenchTypes.h:4
 TProofBenchTypes.h:5
 TProofBenchTypes.h:6
 TProofBenchTypes.h:7
 TProofBenchTypes.h:8
 TProofBenchTypes.h:9
 TProofBenchTypes.h:10
 TProofBenchTypes.h:11
 TProofBenchTypes.h:12
 TProofBenchTypes.h:13
 TProofBenchTypes.h:14
 TProofBenchTypes.h:15
 TProofBenchTypes.h:16
 TProofBenchTypes.h:17
 TProofBenchTypes.h:18
 TProofBenchTypes.h:19
 TProofBenchTypes.h:20
 TProofBenchTypes.h:21
 TProofBenchTypes.h:22
 TProofBenchTypes.h:23
 TProofBenchTypes.h:24
 TProofBenchTypes.h:25
 TProofBenchTypes.h:26
 TProofBenchTypes.h:27
 TProofBenchTypes.h:28
 TProofBenchTypes.h:29
 TProofBenchTypes.h:30
 TProofBenchTypes.h:31
 TProofBenchTypes.h:32
 TProofBenchTypes.h:33
 TProofBenchTypes.h:34
 TProofBenchTypes.h:35
 TProofBenchTypes.h:36
 TProofBenchTypes.h:37
 TProofBenchTypes.h:38
 TProofBenchTypes.h:39
 TProofBenchTypes.h:40
 TProofBenchTypes.h:41
 TProofBenchTypes.h:42
 TProofBenchTypes.h:43
 TProofBenchTypes.h:44
 TProofBenchTypes.h:45
 TProofBenchTypes.h:46
 TProofBenchTypes.h:47
 TProofBenchTypes.h:48
 TProofBenchTypes.h:49
 TProofBenchTypes.h:50
 TProofBenchTypes.h:51
 TProofBenchTypes.h:52
 TProofBenchTypes.h:53
 TProofBenchTypes.h:54
 TProofBenchTypes.h:55
 TProofBenchTypes.h:56
 TProofBenchTypes.h:57
 TProofBenchTypes.h:58
 TProofBenchTypes.h:59
 TProofBenchTypes.h:60
 TProofBenchTypes.h:61
 TProofBenchTypes.h:62
 TProofBenchTypes.h:63
 TProofBenchTypes.h:64
 TProofBenchTypes.h:65
 TProofBenchTypes.h:66
 TProofBenchTypes.h:67
 TProofBenchTypes.h:68
 TProofBenchTypes.h:69
 TProofBenchTypes.h:70
 TProofBenchTypes.h:71
 TProofBenchTypes.h:72
 TProofBenchTypes.h:73
 TProofBenchTypes.h:74
 TProofBenchTypes.h:75
 TProofBenchTypes.h:76
 TProofBenchTypes.h:77
 TProofBenchTypes.h:78
 TProofBenchTypes.h:79
 TProofBenchTypes.h:80
 TProofBenchTypes.h:81
 TProofBenchTypes.h:82
 TProofBenchTypes.h:83
 TProofBenchTypes.h:84
 TProofBenchTypes.h:85
 TProofBenchTypes.h:86
 TProofBenchTypes.h:87
 TProofBenchTypes.h:88
 TProofBenchTypes.h:89
 TProofBenchTypes.h:90
 TProofBenchTypes.h:91
 TProofBenchTypes.h:92
 TProofBenchTypes.h:93
 TProofBenchTypes.h:94
 TProofBenchTypes.h:95
 TProofBenchTypes.h:96
 TProofBenchTypes.h:97
 TProofBenchTypes.h:98
 TProofBenchTypes.h:99
 TProofBenchTypes.h:100
 TProofBenchTypes.h:101
 TProofBenchTypes.h:102
 TProofBenchTypes.h:103
 TProofBenchTypes.h:104
 TProofBenchTypes.h:105
 TProofBenchTypes.h:106
 TProofBenchTypes.h:107
 TProofBenchTypes.h:108
 TProofBenchTypes.h:109
 TProofBenchTypes.h:110
 TProofBenchTypes.h:111
 TProofBenchTypes.h:112