New FMD reference distributions for low mult
[u/mrichter/AliRoot.git] / ANALYSIS / AliAnalysisGrid.h
CommitLineData
c57f56b7 1#ifndef ALIANALYSISGRID_H
2#define ALIANALYSISGRID_H
3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6// Author: Mihaela Gheata, 01/09/2008
7
8//==============================================================================
9// AliAnalysisGrid - Base grid utility class. Provides interface for creating
10// a personalized JDL, finding and creating a dataset.
11//==============================================================================
12
13#ifndef ROOT_TNamed
14#include <TNamed.h>
15#endif
16
17class AliAnalysisGrid : public TNamed {
18
19public:
20
21enum EPluginRunMode {
22 kFull = 0,
23 kTest = BIT(14),
24 kOffline = BIT(15),
25 kSubmit = BIT(16),
26 kMerge = BIT(17),
27 kUseTags = BIT(18),
28 kUseESD = BIT(19),
29 kUseAOD = BIT(20),
4e5c5506 30 kUseMC = BIT(21),
31 kUsePars = BIT(22)
c57f56b7 32};
33
34 AliAnalysisGrid() {}
35 AliAnalysisGrid(const char *name) : TNamed(name,"") {}
36 virtual ~AliAnalysisGrid() {}
37 AliAnalysisGrid(const AliAnalysisGrid& other);
38 AliAnalysisGrid& operator=(const AliAnalysisGrid& other);
39// Getters
40 virtual EPluginRunMode GetRunMode() const;
41// Setters
42 virtual void AddRunNumber(Int_t run) = 0;
43 virtual void AddDataFile(const char *lfn) = 0;
44 virtual void SetExecutable(const char *name="analysis.sh") = 0;
45 virtual void SetArguments(const char *name="") = 0;
46 virtual void SetAnalysisMacro(const char *name="myAnalysis.C") = 0;
47 virtual void SetAnalysisSource(const char *name="myAnalysisClass.cxx") = 0;
48 virtual void SetAdditionalLibs(const char *list) = 0;
49 virtual void SetPrice(Int_t price=1) = 0;
50 virtual void SetSplitMode(const char *type="se") = 0;
51 virtual void SetSplitMaxInputFileNumber(Int_t nfiles=100) = 0;
52 virtual void SetAPIVersion(const char *version) = 0;
53 virtual void SetROOTVersion(const char *version) = 0;
54 virtual void SetAliROOTVersion(const char *version) = 0;
55 virtual void SetUser(const char *user) = 0;
56 virtual void SetTTL(Int_t ttl=30000) = 0;
57 virtual void SetGridWorkingDir(const char *name="workdir") = 0;
58 virtual void SetGridDataDir(const char *name) = 0;
59 virtual void SetDataPattern(const char *pattern) = 0;
60 virtual void SetGridOutputDir(const char *name="output") = 0;
61 virtual void SetOutputArchive(const char *list="log_archive.zip:stdout,stderr root_archive.zip:*.root") = 0;
62 virtual void SetOutputFiles(const char *list) = 0;
63 virtual void SetInputFormat(const char *format="xml-single") = 0;
64 virtual void SetMaxInitFailed(Int_t nfail=5) = 0;
65 virtual void SetMasterResubmitThreshold(Int_t percentage) = 0;
66 virtual void SetJDLName(const char *name="analysis.jdl") = 0;
67
68 // Set run mode. Can be "full", "test", "offline", "submit" or "merge"
69 virtual void SetRunMode(const char *mode="full");
70//Utilities
71 static Bool_t CreateToken(const char *username=0);
72 virtual Bool_t CreateDataset(const char *pattern) = 0;
73 virtual Bool_t CreateJDL() = 0;
4e5c5506 74 virtual void EnablePackage(const char *package) = 0;
c57f56b7 75 virtual Bool_t MergeOutputs() = 0;
76 virtual void StartAnalysis(Long64_t nentries=123456789, Long64_t firstentry=0) = 0;
77 virtual void WriteAnalysisFile() = 0;
78 virtual void WriteAnalysisMacro() = 0;
79 virtual void WriteExecutable() = 0;
80 virtual void WriteValidationScript() = 0;
81
82protected:
83 virtual Bool_t Connect() = 0;
84 virtual void SetDefaults() = 0;
85 ClassDef(AliAnalysisGrid, 1) // Base class for GRID utilities
86};
87#endif