TENDER becomes Tender
[u/mrichter/AliRoot.git] / PWGLF / totEt / macros / emEt / CreateAlienHandlerCaloEtSim.C
CommitLineData
f1eeb37a 1AliAnalysisGrid* CreateAlienHandlerCaloEtSim(TString outputDir, TString outputName, const char * pluginRunMode, int production, Bool_t isPHOS, Bool_t ispp,Bool_t isData)
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
9 // Overwrite all generated files, datasets and output results from a previous session
10 plugin->SetOverwriteMode();
11 // Set the run mode (can be "full", "test", "offline", "submit" or "terminate")
12 // plugin->SetRunMode("full"); // VERY IMPORTANT - DECRIBED BELOW
13 // plugin->SetRunMode("test"); // VERY IMPORTANT - DECRIBED BELOW
14 plugin->SetRunMode(pluginRunMode); // VERY IMPORTANT - DECRIBED BELOW
15 cout<<"Running in "<<pluginRunMode<<" mode"<<endl;
16
17 // Set versions of used packages
18 plugin->SetAPIVersion("V1.1x");
19 plugin->SetROOTVersion("v5-34-02-1");
20 plugin->SetAliROOTVersion("v5-04-34-AN");
21 // Declare input data to be processed.
22
23 // Method 1: Create automatically XML collections using alien 'find' command.
24 // Define production directory LFN
25 // plugin->SetGridDataDir("/alice/sim/LHC10a18");
26 // Set data search pattern
27 // plugin->SetDataPattern("*ESDs.root"); // simulated, tags not used
28 // plugin->SetDataPattern("*ESDs/pass4/*ESDs.root"); // real data check reco pass and data base directory
29 // plugin->SetRunPrefix("000"); // real data
30 // plugin->SetDataPattern("*tag.root"); // Use ESD tags (same applies for AOD's)
31 // ...then add run numbers to be considered
32 // plugin->AddRunNumber(125020); // simulated
33 // plugin->AddRunNumber(104065); // real data
34
35 //plugin->SetGridDataDir("/alice/sim/LHC10d4");
36 //plugin->AddRunNumber("120741");//smallest of the above
37 if(ispp && production==0){
38 //pp
39 plugin->SetGridDataDir("/alice/sim/2012/LHC12a15e/");
40 plugin->AddRunNumber(169838);
41 }
42 else{
43 if(isData){//185 jobs
44 cout<<"Running over data"<<endl;
45 plugin->SetGridDataDir("/alice/data/2010/LHC10h");//PbPb data
46 plugin->SetDataPattern("*ESDs/pass2/*ESDs.root");
47 plugin->SetRunPrefix("000"); // real data
48 plugin->AddRunNumber(139465);
49 outputDir = outputDir + "LHC10hPass2";
50 }
51 else{
52 if(production==0){
53 //Standard
54 if(isPHOS){
55 plugin->SetGridDataDir("/alice/sim/LHC11a10a_bis");
56 }
57 else{
58 outputDir = outputDir + "LHC11a4_bis";
59 plugin->SetGridDataDir("/alice/sim/LHC11a4_bis");
60 plugin->SetGridDataDir("/alice/sim/LHC11a4_bis");
61 }
62 plugin->AddRunNumber(139465);
63 plugin->AddRunNumber(139470);
64 plugin->AddRunNumber(137366);
65 plugin->AddRunNumber(137161);
66 }
67 if(production==1){
68 //if(!isPHOS){
69 outputDir = outputDir + "LHC11a10a_bis";
70 plugin->SetGridDataDir("/alice/sim/LHC11a10a_bis");
71 //}
72// plugin->AddRunNumber(137366);
73// plugin->AddRunNumber(137161);
74// plugin->AddRunNumber(139470);
75 plugin->AddRunNumber(139465);//probably our focus now
76 }
77 if(production==2){
78 if(!isPHOS){
79 outputDir = outputDir + "LHC11b7";
80 plugin->SetGridDataDir("/alice/sim/LHC11b7");
81 }
82 plugin->AddRunNumber(137549);
83 plugin->AddRunNumber(138200);
84 }
85 if(production==3){
86 if(!isPHOS){
87 outputDir = outputDir + "LHC11a10a";
88 plugin->SetGridDataDir("/alice/sim/LHC11a10a");
89 }
90 plugin->AddRunNumber(139470);
91 }
92 }
93 }
94
95 plugin->SetDataPattern("*ESDs.root");
96 // Method 2: Declare existing data files (raw collections, xml collections, root file)
97 // If no path mentioned data is supposed to be in the work directory (see SetGridWorkingDir())
98 // XML collections added via this method can be combined with the first method if
99 // the content is compatible (using or not tags)
100 //plugin->AddDataFile("tag.xml");
101 // plugin->AddDataFile("wn.xml"); // test
102 // file generated with: find -x tag /alice/sim/LHC10d1/117222/* AliESDs.root > tag.xml
103
104 // Define alien work directory where all files will be copied. Relative to alien $HOME.
105 plugin->SetGridWorkingDir(outputDir.Data());
106 // Declare alien output directory. Relative to working directory.
107 plugin->SetGridOutputDir("output"); // In this case will be $HOME/work/output
108 // Declare the analysis source files names separated by blancs. To be compiled runtime IN THE SAME ORDER THEY ARE LISTED
109 //plugin->SetAdditionalRootLibs("libPHOSUtils.so libEMCALUtils.so libPWG4CaloCalib.so libPWG4PartCorrBase.so libPWG4PartCorrDep.so");
110 // using ACLiC on the worker nodes.
111 plugin->SetAnalysisSource("AliAnalysisEtCuts.cxx AliAnalysisHadEtCorrections.cxx AliAnalysisEtCommon.cxx AliAnalysisEtSelector.cxx AliAnalysisEtSelectorPhos.cxx AliAnalysisEtSelectorEmcal.cxx AliAnalysisEtTrackMatchCorrections.cxx AliAnalysisEtRecEffCorrection.cxx AliAnalysisEt.cxx AliAnalysisEtMonteCarlo.cxx AliAnalysisEtMonteCarloPhos.cxx AliAnalysisEtMonteCarloEmcal.cxx AliAnalysisEtReconstructed.cxx AliAnalysisEtReconstructedPhos.cxx AliAnalysisEtReconstructedEmcal.cxx AliAnalysisTaskTransverseEnergy.cxx AliAnalysisEmEtMonteCarlo.cxx AliAnalysisEmEtReconstructed.cxx AliAnalysisTaskTotEt.cxx");
112 //plugin->SetAnalysisSource("AliAnalysisEtCuts.cxx AliAnalysisHadEtCorrections.cxx AliAnalysisEtCommon.cxx AliAnalysisEtSelector.cxx AliAnalysisEtSelectorPhos.cxx AliAnalysisEt.cxx AliAnalysisEtMonteCarlo.cxx AliAnalysisEtMonteCarloPhos.cxx AliAnalysisEtMonteCarloEmcal.cxx AliAnalysisEtReconstructed.cxx AliAnalysisEtReconstructedPhos.cxx AliAnalysisEtReconstructedEmcal.cxx AliAnalysisTaskTransverseEnergy.cxx AliAnalysisTaskTotEt.cxx");
113 // Declare all libraries (other than the default ones for the framework. These will be
114 // loaded by the generated analysis macro. Add all extra files (task .cxx/.h) here.
af472fff 115 plugin->SetAdditionalLibs("libPHOSUtils.so libTender.so libTenderSupplies.so AliAnalysisEtCuts.cxx AliAnalysisEtCuts.h AliAnalysisHadEtCorrections.cxx AliAnalysisHadEtCorrections.h AliAnalysisEtCommon.cxx AliAnalysisEtCommon.h AliAnalysisEtSelector.cxx AliAnalysisEtSelector.h AliAnalysisEtSelectorPhos.cxx AliAnalysisEtSelectorPhos.h AliAnalysisEtSelectorEmcal.cxx AliAnalysisEtSelectorEmcal.h AliAnalysisEtTrackMatchCorrections.cxx AliAnalysisEtTrackMatchCorrections.h AliAnalysisEtRecEffCorrection.cxx AliAnalysisEtRecEffCorrection.h AliAnalysisEt.cxx AliAnalysisEt.h AliAnalysisEtMonteCarlo.cxx AliAnalysisEtMonteCarlo.h AliAnalysisEtMonteCarloPhos.cxx AliAnalysisEtMonteCarloPhos.h AliAnalysisEtMonteCarloEmcal.cxx AliAnalysisEtMonteCarloEmcal.h AliAnalysisEtReconstructed.cxx AliAnalysisEtReconstructed.h AliAnalysisEtReconstructedPhos.cxx AliAnalysisEtReconstructedPhos.h AliAnalysisEtReconstructedEmcal.cxx AliAnalysisEtReconstructedEmcal.h AliAnalysisTaskTransverseEnergy.cxx AliAnalysisTaskTransverseEnergy.h AliAnalysisEmEtMonteCarlo.cxx AliAnalysisEmEtMonteCarlo.h AliAnalysisEmEtReconstructed.cxx AliAnalysisEmEtReconstructed.h AliAnalysisTaskTotEt.cxx AliAnalysisTaskTotEt.h badchannels.root corrections.root calocorrections.root ConfigEtMonteCarlo.C ConfigEtReconstructed.C");
f1eeb37a 116 plugin->SetExecutableCommand("aliroot -b -q");
117 // add extra include files/path
118 plugin->AddIncludePath("-I. -I$ALICE_ROOT/EMCAL -I$ALICE_ROOT/ANALYSIS");
119
120 // No need for output file names. Procedure is automatic. <-- not true
121 //plugin->SetDefaultOutputs(kFALSE);
122 //plugin->SetOutputFiles(outputName.Data());
123 //plugin->SetOutputFiles("Et.ESD.sim.EMCAL.root event_stat.root");
124 // No need define the files to be archived. Note that this is handled automatically by the plugin.
125 // plugin->SetOutputArchive("log_archive.zip:stdout,stderr");
126 // Set a name for the generated analysis macro (default MyAnalysis.C) Make this unique !
127 plugin->SetAnalysisMacro("DavidEtAnalysis.C");
128 // Optionally set maximum number of input files/subjob (default 100, put 0 to ignore). The optimum for an analysis
129 // is correlated with the run time - count few hours TTL per job, not minutes !
130 plugin->SetSplitMaxInputFileNumber(100);
131 // Optionally set number of failed jobs that will trigger killing waiting sub-jobs.
132 plugin->SetMaxInitFailed(5);
133 // Optionally resubmit threshold.
134 //plugin->SetMasterResubmitThreshold(90);
135 // Optionally set time to live (default 30000 sec)
136 plugin->SetTTL(20000);
137 // Optionally set input format (default xml-single)
138 plugin->SetInputFormat("xml-single");
139 // Optionally modify the name of the generated JDL (default analysis.jdl)
140 plugin->SetJDLName("TaskEt.jdl");
141 // Optionally modify job price (default 1)
142 plugin->SetPrice(1);
143 // Optionally modify split mode (default 'se')
144 plugin->SetSplitMode("se");
145
146 return plugin;
147}