1 AliAnalysisGrid* CreateAlienHandler_FromESDToAOD()
3 //========================================================================
4 // Macro to configure the GRID plugin
5 // (see Alice offline web pages for definitions)
6 //========================================================================
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 //=====================================================================
13 if (!AliAnalysisGrid::CreateToken()) return NULL;
14 AliAnalysisAlien *plugin = new AliAnalysisAlien();
16 // Set the run mode (can be "full", "test", "offline", "submit" or "terminate")
17 //=====================================================================
18 plugin->SetRunMode("full"); // VERY IMPORTANT
20 // Set versions of used packages
21 //=====================================================================
22 plugin->SetAPIVersion("V2.4");
23 plugin->SetROOTVersion("v5-23-04");
24 plugin->SetAliROOTVersion("v4-17-03");
26 // Declare input data to be processed.
27 //=====================================================================
29 // Method 1: Create automatically XML collections using alien 'find' command.
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);
39 // Method 2: Declare existing data files (raw collections, xml collections, root file)
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");
46 // Define alien work directory where all files will be copied. Relative to alien $HOME.
47 //=====================================================================
48 plugin->SetGridWorkingDir("FromESDToAOD/Plugin");
50 // Declare alien output directory. Relative to working directory.
51 //=====================================================================
52 plugin->SetGridOutputDir("outputPlugin"); // In this case will be $HOME/work/output
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");
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");
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");
73 // Optionally set a name for the generated analysis macro (default MyAnalysis.C)
74 //=====================================================================
75 plugin->SetAnalysisMacro("analysisFromESDToAOD_Plugin.C");
77 // Optionally set maximum number of input files/subjob (default 100, put 0 to ignore)
78 //=====================================================================
79 plugin->SetSplitMaxInputFileNumber(0);
81 // Optionally set number of failed jobs that will trigger killing waiting sub-jobs.
82 //=====================================================================
83 plugin->SetMaxInitFailed(5);
85 // Optionally resubmit threshold.
86 //=====================================================================
87 plugin->SetMasterResubmitThreshold(90);
89 // Optionally set time to live (default 30000 sec)
90 //=====================================================================
91 plugin->SetTTL(20000);
93 // Optionally set input format (default xml-single)
94 //=====================================================================
95 plugin->SetInputFormat("xml-single");
97 // Optionally modify the name of the generated JDL (default analysis.jdl)
98 //=====================================================================
99 plugin->SetJDLName("analysisFromESDToAOD_Plugin.jdl");
101 // Optionally modify job price (default 1)
102 //=====================================================================
105 // Optionally modify split mode (default 'se')
106 //=====================================================================
107 plugin->SetSplitMode("se");
109 // Optionally define preferred SE
110 //=====================================================================
111 plugin->SetPreferedSE("ALICE::Torino::DPM");