ROOT  6.06/09
Reference Guide
TGridJDL.h
Go to the documentation of this file.
1 // @(#)root/net:$Id$
2 // Author: Jan Fiete Grosse-Oetringhaus 28/9/2004
3 // Jancurova.lucia@cern.ch Slovakia 29/9/2008
4 
5 /*************************************************************************
6  * Copyright (C) 1995-2008, Rene Brun and Fons Rademakers. *
7  * All rights reserved. *
8  * *
9  * For the licensing terms see $ROOTSYS/LICENSE. *
10  * For the list of contributors see $ROOTSYS/README/CREDITS. *
11  *************************************************************************/
12 
13 #ifndef ROOT_TGridJDL
14 #define ROOT_TGridJDL
15 
16 //////////////////////////////////////////////////////////////////////////
17 // //
18 // TGridJDL //
19 // //
20 // Abstract base class to generate JDL files for job submission to the //
21 // Grid. //
22 // //
23 // Related classes are TGLiteJDL //
24 // . //
25 //////////////////////////////////////////////////////////////////////////
26 
27 #ifndef ROOT_TObject
28 #include "TObject.h"
29 #endif
30 #ifndef ROOT_TString
31 #include "TString.h"
32 #endif
33 #ifndef ROOT_TMap
34 #include "TMap.h"
35 #endif
36 
37 
38 class TGridJDL : public TObject {
39 protected:
40  TMap fMap; // stores the key, value pairs of the JDL
41  TMap fDescriptionMap; // stores the key, value pairs of the JDL
42 public:
43  TGridJDL() : fMap(), fDescriptionMap() { }
44  virtual ~TGridJDL();
45 
46  void SetValue(const char *key, const char *value);
47  const char *GetValue(const char *key);
48  void SetDescription(const char *key, const char *description);
49  const char *GetDescription(const char *key);
50  TString AddQuotes(const char *value);
51  void AddToSet(const char *key, const char *value);
52  void AddToSetDescription(const char *key, const char *description);
53  virtual TString Generate();
54  virtual void Clear(const Option_t* = 0);
55 
56  virtual void SetExecutable(const char *value=0, const char *description=0) = 0;
57  virtual void SetArguments(const char *value=0, const char *description=0) = 0;
58  virtual void SetEMail(const char *value=0, const char *description=0) = 0;
59  virtual void SetOutputDirectory(const char *value=0, const char *description=0) = 0;
60  virtual void SetPrice(UInt_t price=1, const char *description=0) = 0;
61  virtual void SetTTL(UInt_t ttl=72000, const char *description=0) = 0;
62  virtual void SetJobTag(const char *jobtag=0, const char *description=0) = 0;
63  virtual void SetInputDataListFormat(const char *format="xml-single", const char *description=0) = 0;
64  virtual void SetInputDataList(const char *list="collection.xml", const char *description=0) = 0;
65 
66  virtual void SetSplitMode(const char *value, UInt_t maxnumberofinputfiles=0,
67  UInt_t maxinputfilesize=0, const char *d1=0,
68  const char *d2=0, const char *d3=0) = 0;
69  virtual void SetSplitArguments(const char *splitarguments=0, const char *description=0) = 0;
70  virtual void SetValidationCommand(const char *value, const char *description=0) = 0;
71 
72  virtual void AddToInputSandbox(const char *value=0, const char *description=0) = 0;
73  virtual void AddToOutputSandbox(const char *value=0, const char *description=0) = 0;
74  virtual void AddToInputData(const char *value=0, const char *description=0) = 0;
75  virtual void AddToInputDataCollection(const char *value=0, const char *description=0) = 0;
76  virtual void AddToRequirements(const char *value=0, const char *description=0) = 0;
77  virtual void AddToPackages(const char *name="AliRoot", const char *version="default",
78  const char *type="VO_ALICE", const char *description=0) = 0;
79  virtual void AddToOutputArchive(const char *value=0, const char *description=0) = 0;
80 
81  ClassDef(TGridJDL,1) // ABC defining interface JDL generator
82 };
83 
84 #endif
TString AddQuotes(const char *value)
Adds quotes to the provided string.
Definition: TGridJDL.cxx:159
void SetValue(const char *key, const char *value)
Sets a value. If the entry already exists the old one is replaced.
Definition: TGridJDL.cxx:50
const char Option_t
Definition: RtypesCore.h:62
virtual void SetTTL(UInt_t ttl=72000, const char *description=0)=0
virtual void SetInputDataList(const char *list="collection.xml", const char *description=0)=0
virtual void SetArguments(const char *value=0, const char *description=0)=0
Basic string class.
Definition: TString.h:137
static std::string format(double x, double y, int digits, int width)
virtual void AddToInputData(const char *value=0, const char *description=0)=0
virtual void SetSplitArguments(const char *splitarguments=0, const char *description=0)=0
virtual void SetValidationCommand(const char *value, const char *description=0)=0
virtual void SetSplitMode(const char *value, UInt_t maxnumberofinputfiles=0, UInt_t maxinputfilesize=0, const char *d1=0, const char *d2=0, const char *d3=0)=0
#define ClassDef(name, id)
Definition: Rtypes.h:254
virtual ~TGridJDL()
void AddToSet(const char *key, const char *value)
Adds a value to a key value which hosts a set of values.
Definition: TGridJDL.cxx:172
virtual void SetJobTag(const char *jobtag=0, const char *description=0)=0
virtual void SetInputDataListFormat(const char *format="xml-single", const char *description=0)=0
virtual void AddToOutputArchive(const char *value=0, const char *description=0)=0
virtual void AddToPackages(const char *name="AliRoot", const char *version="default", const char *type="VO_ALICE", const char *description=0)=0
void AddToSetDescription(const char *key, const char *description)
Adds a value to a key value which hosts a set of values.
Definition: TGridJDL.cxx:195
TGridJDL()
Definition: TGridJDL.h:43
unsigned int UInt_t
Definition: RtypesCore.h:42
TMap fDescriptionMap
Definition: TGridJDL.h:41
virtual void SetPrice(UInt_t price=1, const char *description=0)=0
virtual void SetOutputDirectory(const char *value=0, const char *description=0)=0
virtual void AddToOutputSandbox(const char *value=0, const char *description=0)=0
void SetDescription(const char *key, const char *description)
Sets a value. If the entry already exists the old one is replaced.
Definition: TGridJDL.cxx:104
const char * GetValue(const char *key)
Returns the value corresponding to the provided key.
Definition: TGridJDL.cxx:77
TMap implements an associative array of (key,value) pairs using a THashTable for efficient retrieval ...
Definition: TMap.h:44
int type
Definition: TGX11.cxx:120
const char * GetDescription(const char *key)
Returns the value corresponding to the provided key.
Definition: TGridJDL.cxx:131
#define name(a, b)
Definition: linkTestLib0.cpp:5
Mother of all ROOT objects.
Definition: TObject.h:58
virtual void SetExecutable(const char *value=0, const char *description=0)=0
virtual void AddToInputDataCollection(const char *value=0, const char *description=0)=0
virtual void AddToRequirements(const char *value=0, const char *description=0)=0
virtual void Clear(const Option_t *=0)
Clears the JDL information.
Definition: TGridJDL.cxx:42
virtual TString Generate()
Generates the JDL snippet.
Definition: TGridJDL.cxx:208
virtual void AddToInputSandbox(const char *value=0, const char *description=0)=0
float value
Definition: math.cpp:443
TMap fMap
Definition: TGridJDL.h:40
virtual void SetEMail(const char *value=0, const char *description=0)=0