]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGPP/EVCHAR/CreateAlienHandler.C
include rndm ZPA to calculate ncoll
[u/mrichter/AliRoot.git] / PWGPP / EVCHAR / CreateAlienHandler.C
1 AliAnalysisGrid* CreateAlienHandler(const char * filename)
2 {
3 // Check if user has a valid token, otherwise make one. This has limitations.
4 // One can always follow the standard procedure of calling alien-token-init then
5 //   source /tmp/gclient_env_$UID in the current shell.
6 //   if (!AliAnalysisGrid::CreateToken()) return NULL;
7    AliAnalysisAlien *plugin = new AliAnalysisAlien();
8    plugin->SetOverwriteMode();
9 // Set the run mode (can be "full", "test", "offline", "submit" or "terminate")
10    plugin->SetRunMode("full");
11    plugin->SetNtestFiles(3);
12 // Set versions of used packages
13    plugin->SetAPIVersion("V1.1x");
14 //    plugin->SetROOTVersion("v5-27-05");
15 //    plugin->SetAliROOTVersion("v4-20-08-AN");
16    //change: 28/09/10
17    //VO_ALICE@AliRoot::v4-20-09-AN-build1 VO_ALICE@ROOT::v5-27-05-build3,VO_ALICE@GEANT3::v1-11-14 
18    plugin->SetROOTVersion("v5-27-05-build3");
19    plugin->SetAliROOTVersion("v4-20-09-AN-build1");
20
21 // Declare input data to be processed.
22 // Method 1: Create automatically XML collections using alien 'find' command.
23 // Define production directory LFN
24 // LHC10f
25 // /alice/sim/LHC10f4a/198000  
26 //   plugin->SetGridDataDir("/alice/sim/LHC10f4a");
27    TString filenameStr = Form("%s",filename);
28    filenameStr = TString("/alice/sim/")+filenameStr;
29    const char * inputfilename = filenameStr.Data();
30    plugin->SetGridDataDir(inputfilename);
31 // Set data search pattern
32    plugin->SetDataPattern("*ESDs.root");
33 // Data pattern for reconstructed data
34 //   plugin->SetDataPattern("AliESDs.root");
35 // ...then add run numbers to be considered
36    plugin->AddRunNumber(130844);
37    //   plugin->AddRunNumber(198000);
38 // Method 2: Declare existing data files (raw collections, xml collections, root file)
39 // If no path mentioned data is supposed to be in the work directory (see SetGridWorkingDir())
40 // XML collections added via this method can be combined with the first method if
41 // the content is compatible (using or not tags)
42    // plugin->AddDataFile("tag.xml");
43    // plugin->AddDataFile("/alice/data/2008/LHC08c/000057657/raw/Run57657.Merged.RAW.tag.root");
44 // Define alien work directory where all files will be copied. Relative to alien $HOME.
45    plugin->SetGridWorkingDir(Form("work2/%s",filename));
46    //plugin->SetGridWorkingDir("work");
47 // Declare alien output directory. Relative to working directory.
48    plugin->SetGridOutputDir("output"); 
49
50 // Declare the analysis source files names separated by blancs. To be compiled runtime
51 // using ACLiC on the worker nodes.
52    plugin->SetAnalysisSource("AliAnalysisTaskCentralityTreeMaker.cxx");
53 // Declare all libraries (other than the default ones for the framework. These will be
54 // loaded by the generated analysis macro. Add all extra files (task .cxx/.h) here.
55    plugin->SetAdditionalLibs("AliAnalysisTaskCentralityTreeMaker.h AliAnalysisTaskCentralityTreeMaker.cxx");
56
57 // Declare the output file names separated by blancs.
58 // (can be like: file.root or file.root@ALICE::Niham::File)
59    plugin->SetDefaultOutputs();
60 // Optionally define the files to be archived.
61 //   plugin->SetOutputArchive("log_archive.zip:stdout,stderr@ALICE::NIHAM::File root_archive.zip:*.root@ALICE::NIHAM::File");
62 //   plugin->SetOutputArchive("log_archive.zip:stdout,stderr");
63
64 // Optionally set a name for the generated analysis macro (default MyAnalysis.C)
65    plugin->SetAnalysisMacro("CentralityAnalysis.C");
66
67 // Optionally set maximum number of input files/subjob (default 100, put 0 to ignore)
68    plugin->SetSplitMaxInputFileNumber(100);
69 // Optionally modify the executable name (default analysis.sh)
70    plugin->SetExecutable("CentralityAnalysis.sh");
71 // Optionally set number of failed jobs that will trigger killing waiting sub-jobs.
72    plugin->SetMaxInitFailed(5);
73 // Optionally resubmit threshold.
74    plugin->SetMasterResubmitThreshold(90);
75 // Optionally set time to live (default 30000 sec)
76    plugin->SetTTL(30000);
77 // Optionally set input format (default xml-single)
78    plugin->SetInputFormat("xml-single");
79 // Optionally modify the name of the generated JDL (default analysis.jdl)
80    plugin->SetJDLName("CentralityAnalysis.jdl");
81 // Optionally modify job price (default 1)
82    plugin->SetPrice(1);      
83 // Optionally modify split mode (default 'se')    
84    plugin->SetSplitMode("se");
85    return plugin;
86 }