]>
Commit | Line | Data |
---|---|---|
af2b48fb | 1 | AliAnalysisGrid* CreateAlienHandler_FromESDToAOD() |
2 | { | |
3 | //======================================================================== | |
4 | // Macro to configure the GRID plugin | |
5 | // (see Alice offline web pages for definitions) | |
6 | //======================================================================== | |
7 | ||
8 | // Check if user has a valid token, otherwise make one. This has limitations. | |
9 | // One can always follow the standard procedure of calling alien-token-init then | |
10 | // source /tmp/gclient_env_$UID in the current shell | |
11 | //===================================================================== | |
12 | ||
13 | if (!AliAnalysisGrid::CreateToken()) return NULL; | |
14 | AliAnalysisAlien *plugin = new AliAnalysisAlien(); | |
15 | ||
16 | // Set the run mode (can be "full", "test", "offline", "submit" or "terminate") | |
17 | //===================================================================== | |
18 | plugin->SetRunMode("full"); // VERY IMPORTANT | |
19 | ||
20 | // Set versions of used packages | |
21 | //===================================================================== | |
22 | plugin->SetAPIVersion("V2.4"); | |
23 | plugin->SetROOTVersion("v5-23-04"); | |
24 | plugin->SetAliROOTVersion("v4-17-03"); | |
25 | ||
26 | // Declare input data to be processed. | |
27 | //===================================================================== | |
28 | ||
29 | // Method 1: Create automatically XML collections using alien 'find' command. | |
30 | //=========== | |
31 | // Define production directory LFN | |
32 | // plugin->SetGridDataDir("/alice/cern.ch/user/a/arnaldi/FromESDToAOD/JPSI_generation/1001"); | |
33 | // Set data search pattern | |
34 | // plugin->SetDataPattern("*tag.root"); | |
35 | // ...then add run numbers to be considered | |
36 | // plugin->AddRunNumber(300000); | |
37 | // plugin->AddRunNumber(1001); | |
38 | ||
39 | // Method 2: Declare existing data files (raw collections, xml collections, root file) | |
40 | //=========== | |
41 | // If no path mentioned data is supposed to be in the work directory (see SetGridWorkingDir()) | |
42 | // XML collections added via this method can be combined with the first method if | |
43 | // the content is compatible (using or not tags) | |
44 | plugin->AddDataFile("/alice/cern.ch/user/a/arnaldi/FromESDToAOD/Plugin/FromESDToAOD.xml"); | |
45 | ||
46 | // Define alien work directory where all files will be copied. Relative to alien $HOME. | |
47 | //===================================================================== | |
48 | plugin->SetGridWorkingDir("FromESDToAOD/Plugin"); | |
49 | ||
50 | // Declare alien output directory. Relative to working directory. | |
51 | //===================================================================== | |
52 | plugin->SetGridOutputDir("outputPlugin"); // In this case will be $HOME/work/output | |
53 | ||
54 | // Declare the analysis source files names separated by blancs. | |
55 | // Declare all libraries (other than the default ones for the framework). These will be | |
56 | // loaded by the generated analysis macro and compiled runtime. | |
57 | // Add par files, if needed. | |
58 | // Add all extra files (task .cxx/.h/.C) here. | |
59 | // (AddTaskTagCreation.C can be removed from SetAdditionalLibs, if available in the grid aliroot version) | |
60 | //===================================================================== | |
61 | plugin->SetAdditionalLibs("libPWG3base.so libPWG3muon.so AddTaskTagCreation.C"); | |
62 | ||
63 | // Declare the output file names separated by blancs. | |
64 | //===================================================================== | |
65 | // (can be like: file.root or file.root@ALICE::Niham::File) | |
66 | plugin->SetOutputFiles("AliAODs.root AOD.tag.root"); | |
67 | ||
68 | // Optionally define the files to be archived. | |
69 | //===================================================================== | |
70 | // plugin->SetOutputArchive("log_archive.zip:stdout,stderr@ALICE::NIHAM::File root_archive.zip:*.root@ALICE::NIHAM::File"); | |
71 | plugin->SetOutputArchive("log_archive.zip:stdout,stderr"); | |
72 | ||
73 | // Optionally set a name for the generated analysis macro (default MyAnalysis.C) | |
74 | //===================================================================== | |
75 | plugin->SetAnalysisMacro("analysisFromESDToAOD_Plugin.C"); | |
76 | ||
77 | // Optionally set maximum number of input files/subjob (default 100, put 0 to ignore) | |
78 | //===================================================================== | |
79 | plugin->SetSplitMaxInputFileNumber(0); | |
80 | ||
81 | // Optionally set number of failed jobs that will trigger killing waiting sub-jobs. | |
82 | //===================================================================== | |
83 | plugin->SetMaxInitFailed(5); | |
84 | ||
85 | // Optionally resubmit threshold. | |
86 | //===================================================================== | |
87 | plugin->SetMasterResubmitThreshold(90); | |
88 | ||
89 | // Optionally set time to live (default 30000 sec) | |
90 | //===================================================================== | |
91 | plugin->SetTTL(20000); | |
92 | ||
93 | // Optionally set input format (default xml-single) | |
94 | //===================================================================== | |
95 | plugin->SetInputFormat("xml-single"); | |
96 | ||
97 | // Optionally modify the name of the generated JDL (default analysis.jdl) | |
98 | //===================================================================== | |
99 | plugin->SetJDLName("analysisFromESDToAOD_Plugin.jdl"); | |
100 | ||
101 | // Optionally modify job price (default 1) | |
102 | //===================================================================== | |
103 | plugin->SetPrice(1); | |
104 | ||
105 | // Optionally modify split mode (default 'se') | |
106 | //===================================================================== | |
107 | plugin->SetSplitMode("se"); | |
108 | ||
109 | // Optionally define preferred SE | |
110 | //===================================================================== | |
111 | plugin->SetPreferedSE("ALICE::Torino::DPM"); | |
112 | return plugin; | |
113 | } |