Logo ROOT   6.14/05
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 #include "TObject.h"
28 #include "TString.h"
29 #include "TMap.h"
30 
31 
32 class TGridJDL : public TObject {
33 protected:
34  TMap fMap; // stores the key, value pairs of the JDL
35  TMap fDescriptionMap; // stores the key, value pairs of the JDL
36 public:
37  TGridJDL() : fMap(), fDescriptionMap() { }
38  virtual ~TGridJDL();
39 
40  void SetValue(const char *key, const char *value);
41  const char *GetValue(const char *key);
42  void SetDescription(const char *key, const char *description);
43  const char *GetDescription(const char *key);
44  TString AddQuotes(const char *value);
45  void AddToSet(const char *key, const char *value);
46  void AddToSetDescription(const char *key, const char *description);
47  virtual TString Generate();
48  virtual void Clear(const Option_t* = 0);
49 
50  virtual void SetExecutable(const char *value=0, const char *description=0) = 0;
51  virtual void SetArguments(const char *value=0, const char *description=0) = 0;
52  virtual void SetEMail(const char *value=0, const char *description=0) = 0;
53  virtual void SetOutputDirectory(const char *value=0, const char *description=0) = 0;
54  virtual void SetPrice(UInt_t price=1, const char *description=0) = 0;
55  virtual void SetTTL(UInt_t ttl=72000, const char *description=0) = 0;
56  virtual void SetJobTag(const char *jobtag=0, const char *description=0) = 0;
57  virtual void SetInputDataListFormat(const char *format="xml-single", const char *description=0) = 0;
58  virtual void SetInputDataList(const char *list="collection.xml", const char *description=0) = 0;
59 
60  virtual void SetSplitMode(const char *value, UInt_t maxnumberofinputfiles=0,
61  UInt_t maxinputfilesize=0, const char *d1=0,
62  const char *d2=0, const char *d3=0) = 0;
63  virtual void SetSplitArguments(const char *splitarguments=0, const char *description=0) = 0;
64  virtual void SetValidationCommand(const char *value, const char *description=0) = 0;
65 
66  virtual void AddToInputSandbox(const char *value=0, const char *description=0) = 0;
67  virtual void AddToOutputSandbox(const char *value=0, const char *description=0) = 0;
68  virtual void AddToInputData(const char *value=0, const char *description=0) = 0;
69  virtual void AddToInputDataCollection(const char *value=0, const char *description=0) = 0;
70  virtual void AddToRequirements(const char *value=0, const char *description=0) = 0;
71  virtual void AddToPackages(const char *name="AliRoot", const char *version="default",
72  const char *type="VO_ALICE", const char *description=0) = 0;
73  virtual void AddToOutputArchive(const char *value=0, const char *description=0) = 0;
74 
75  ClassDef(TGridJDL,1) // ABC defining interface JDL generator
76 };
77 
78 #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:131
virtual ~TGridJDL()
Cleanup.
Definition: TGridJDL.cxx:34
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:320
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:37
unsigned int UInt_t
Definition: RtypesCore.h:42
TMap fDescriptionMap
Definition: TGridJDL.h:35
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:40
int type
Definition: TGX11.cxx:120
const char * GetDescription(const char *key)
Returns the value corresponding to the provided key.
Definition: TGridJDL.cxx:131
Mother of all ROOT objects.
Definition: TObject.h:37
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
TMap fMap
Definition: TGridJDL.h:34
virtual void SetEMail(const char *value=0, const char *description=0)=0
char name[80]
Definition: TGX11.cxx:109