1 AliAnalysisGrid* CreateAnalysisPlugin(TString analysisMode="full")
3 AliAnalysisAlien *plugin = new AliAnalysisAlien();
5 // Overwrite all generated files, datasets and output results from a previous session
6 plugin->SetOverwriteMode();
7 // Set the run mode (can be "full", "test", "offline", "submit" or "terminate")
9 plugin->SetRunMode(TString (analysisMode.Data()));
11 // Set versions of used packages
12 plugin->SetAPIVersion("V1.1x");
13 plugin->SetROOTVersion("v5-28-00f");
14 plugin->SetAliROOTVersion("v4-21-33-AN");
15 // Declare input data to be processed.
17 // Method 1: Create automatically XML collections using alien 'find' command.
18 // Define production directory LFN
19 // plugin->SetGridDataDir("/alice/sim/LHC10a6");
20 //* plugin->SetGridDataDir("/alice/data/2010/LHC10b");
21 // Set data search pattern
22 // plugin->SetDataPattern("*ESDs.root"); // simulated, tags not used
23 //* plugin->SetDataPattern("*ESDs/pass2/*ESDs.root"); // real data check reco pass and data base directory
24 //* plugin->SetRunPrefix("000"); // real data
25 // plugin->SetDataPattern("*tag.root"); // Use ESD tags (same applies for AOD's)
26 // ...then add run numbers to be considered
27 // plugin->AddRunNumber(125020); // simulated
30 plugin->SetGridDataDir("/alice/data/2011/LHC11a");
31 plugin->SetDataPattern("*ESDs/pass1/*ESDs.root");
32 plugin->SetRunPrefix("000");
35 // plugin->SetGridDataDir("/alice/sim/LHC10f9b");
36 //plugin->SetDataPattern("*ESDs.root");
39 // plugin->SetGridDataDir("/alice/data/2010/LHC10c");
40 // plugin->SetRunPrefix("000"); // real data
41 //plugin->SetDataPattern("*ESDs/pass2_recovery_900GeV/AOD017/*AOD.root");
44 // plugin->SetGridDataDir("/alice/sim/LHC10d4a");
45 //plugin->SetDataPattern("*AOD012/*AOD.root");
47 // TString runs ="120824:120823:120822:120821:120820:120758:120750:120741:120671:120617:120616:120505:120504:120503:120244:120079:120076:120073:120072:120069:120067:119862:119859:119856:119853:119849:119846:119845:119844:119842:119841:119163:119161:119159:119086:119085:119084:119079:119077:119067:119061:119047:119041:119037"; // dont forget last two runs
49 //TString runs ="120829:120825";
50 // TString runs="118506:118507:118512:118518:118556:118558:118560:118561";
51 TString runs ="146801";
53 TObjArray* array = runs.Tokenize ( ":" );
55 TString strr,strr2_1,strr2_2;
56 for ( Int_t i = 0;i < array->GetEntriesFast();i++ ) {
57 str = ( TObjString * ) array->At ( i );
58 strr = str->GetString();
59 if ( !strr.IsNull() ) {
60 plugin->AddRunNumber(strr.Atoi());
64 // Method 2: Declare existing data files (raw collections, xml collections, root file)
65 // If no path mentioned data is supposed to be in the work directory (see SetGridWorkingDir())
66 // XML collections added via this method can be combined with the first method if
67 // the content is compatible (using or not tags)
68 // plugin->AddDataFile("tag.xml");
69 // plugin->AddDataFile("/alice/data/2008/LHC08c/000057657/raw/Run57657.Merged.RAW.tag.root");
71 // Define alien work directory where all files will be copied. Relative to alien $HOME.
72 plugin->SetGridWorkingDir("146801");
73 // Declare alien output directory. Relative to working directory.
74 plugin->SetGridOutputDir("output"); // In this case will be $HOME/work/output
75 // Declare the analysis source files names separated by blancs. To be compiled runtime
76 // using ACLiC on the worker nodes.
77 plugin->SetAnalysisSource("AliAnalysisTaskEfficiency.cxx");
78 // plugin->SetAdditionalRootLibs("CORRFW PWG2resonances");
79 // plugin->SetAdditionalRootLibs("PWG2resonances");
80 // plugin->SetAdditionalRootLibs("PWG2resonances");
82 plugin->SetAdditionalLibs("AliAnalysisTaskEfficiency.h AliAnalysisTaskEfficiency.cxx");
83 // plugin->EnablePackage("PWG2resonances");
84 // plugin->EnablePackage("");
85 // plugin->EnablePackage("");
86 // Declare all libraries (other than the default ones for the framework. These will be
87 // loaded by the generated analysis macro. Add all extra files (task .cxx/.h) here.
89 // No need for output file names. Procedure is automatic.
90 // plugin->SetOutputFiles("Pt.ESD.1.root");
91 // plugin->SetDefaultOutputs();
92 // No need define the files to be archived. Note that this is handled automatically by the plugin.
93 // plugin->SetOutputArchive("log_archive.zip:stdout,stderr");
94 // Set a name for the generated analysis macro (default MyAnalysis.C) Make this unique !
95 plugin->SetAnalysisMacro("AnalysisTest.C");
96 // Optionally set maximum number of input files/subjob (default 100, put 0 to ignore). The optimum for an analysis
97 // is correlated with the run time - count few hours TTL per job, not minutes !
98 plugin->SetSplitMaxInputFileNumber(100);
99 // Optionally set number of failed jobs that will trigger killing waiting sub-jobs.
100 plugin->SetMaxInitFailed(5);
101 // Optionally resubmit threshold.
102 plugin->SetMasterResubmitThreshold(90);
103 // Optionally set time to live (default 30000 sec)
104 plugin->SetTTL(20000);
105 // Optionally set input format (default xml-single)
106 plugin->SetInputFormat("xml-single");
107 // Optionally modify the name of the generated JDL (default analysis.jdl)
108 plugin->SetJDLName("TaskRsn.jdl");
109 // Optionally modify job price (default 1)
111 // Optionally modify split mode (default 'se')
112 plugin->SetSplitMode("se");
115 //++++++++++++++++ PROOF ++++++++++++++++
118 plugin->SetProofCluster("alice-caf");
119 //plugin->SetProofCluster("skaf.saske.sk");
120 // plugin->SetProofCluster("skaf-test.saske.sk");
121 // Dataset to be used
122 // plugin->SetProofDataSet("/alice/sim/LHC10a12_104316#esdTree");
123 // plugin->SetProofDataSet("/alice/sim/LHC10a12_104157#esdTree");
124 // plugin->SetProofDataSet("ds.txt");
125 plugin->SetProofDataSet("g4g.txt");
126 // May need to reset proof. Supported modes: 0-no reset, 1-soft, 2-hard
127 plugin->SetProofReset(0);
128 // May limit the number of workers per slave. If used with SetNproofWorkers, SetParallel(nproofworkers) will be called after connection
129 //plugin->SetNproofWorkersPerSlave(1);
130 // May request connection to alien upon connection to grid
131 // plugin->SetProofConnectGrid(kTRUE);
133 // plugin->SetNproofWorkers(51);
134 // May use a specific version of root installed in proof
135 // plugin->SetRootVersionForProof("current");
136 // May set the aliroot mode. Check http://aaf.cern.ch/node/83
137 plugin->SetAliRootMode("default"); // Loads AF libs by default
138 // May request ClearPackages (individual ClearPackage not supported)
139 plugin->SetClearPackages(kFALSE);
140 // Plugin test mode works only providing a file containing test file locations
141 // plugin->SetFileForTestMode("AOD.txt");
142 plugin->SetFileForTestMode("test.txt");
143 //++++++++++++++ end PROOF ++++++++++++++++