]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGLF/totEt/macros/CreateAlienHandlerCaloEtSim.C
Updates to macros to get code working on grid
[u/mrichter/AliRoot.git] / PWGLF / totEt / macros / CreateAlienHandlerCaloEtSim.C
CommitLineData
53992099 1AliAnalysisGrid* CreateAlienHandlerCaloEtSim(TString outputDir, TString outputName, const char * pluginRunMode)
4998bf42 2{
99a6613d 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.
c9bdd83c 6 //if (!AliAnalysisGrid::CreateToken()) return NULL;
99a6613d 7 AliAnalysisAlien *plugin = new AliAnalysisAlien();
4998bf42 8
99a6613d 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")
53992099 12 // plugin->SetRunMode("full"); // VERY IMPORTANT - DECRIBED BELOW
13 // plugin->SetRunMode("test"); // VERY IMPORTANT - DECRIBED BELOW
14 plugin->SetRunMode(pluginRunMode); // VERY IMPORTANT - DECRIBED BELOW
8df12228 15 cout<<"Running in "<<pluginRunMode<<" mode"<<endl;
53992099 16
99a6613d 17 // Set versions of used packages
964c8159 18 plugin->SetAPIVersion("V1.1x");
4cb06159 19 plugin->SetROOTVersion("v5-28-00a");
c9bdd83c 20 plugin->SetAliROOTVersion("v4-21-17b-AN");
99a6613d 21 // Declare input data to be processed.
4998bf42 22
99a6613d 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
4998bf42 34
83de2448 35 plugin->SetGridDataDir("/alice/sim/LHC10d4");
36 plugin->SetDataPattern("*ESDs.root");
37 plugin->AddRunNumber("120741");//smallest of the above
99a6613d 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)
83de2448 42 //plugin->AddDataFile("tag.xml");
6ad010c1 43 // plugin->AddDataFile("wn.xml"); // test
99a6613d 44 // file generated with: find -x tag /alice/sim/LHC10d1/117222/* AliESDs.root > tag.xml
4998bf42 45
99a6613d 46 // Define alien work directory where all files will be copied. Relative to alien $HOME.
47 plugin->SetGridWorkingDir(outputDir.Data());
48 // Declare alien output directory. Relative to working directory.
49 plugin->SetGridOutputDir("output"); // In this case will be $HOME/work/output
50 // Declare the analysis source files names separated by blancs. To be compiled runtime IN THE SAME ORDER THEY ARE LISTED
9fb993e3 51 //plugin->SetAdditionalRootLibs("libPHOSUtils.so libEMCALUtils.so libPWG4CaloCalib.so libPWG4PartCorrBase.so libPWG4PartCorrDep.so");
99a6613d 52 // using ACLiC on the worker nodes.
fe71c343 53 plugin->SetAnalysisSource("AliAnalysisEtCuts.cxx AliAnalysisHadEtCorrections.cxx AliAnalysisEtCommon.cxx AliAnalysisEtSelector.cxx AliAnalysisEtSelectorPhos.cxx AliAnalysisEtSelectorEmcal.cxx AliAnalysisEt.cxx AliAnalysisEtMonteCarlo.cxx AliAnalysisEtMonteCarloPhos.cxx AliAnalysisEtMonteCarloEmcal.cxx AliAnalysisEtReconstructed.cxx AliAnalysisEtReconstructedPhos.cxx AliAnalysisEtReconstructedEmcal.cxx AliAnalysisTaskTransverseEnergy.cxx AliAnalysisEmEtMonteCarlo.cxx AliAnalysisEmEtReconstructed.cxx AliAnalysisTaskTotEt.cxx");
54 //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");
99a6613d 55 // Declare all libraries (other than the default ones for the framework. These will be
56 // loaded by the generated analysis macro. Add all extra files (task .cxx/.h) here.
fe71c343 57 plugin->SetAdditionalLibs("libPHOSUtils.so AliAnalysisEtCuts.h AliAnalysisEt.h AliAnalysisEtMonteCarlo.h AliAnalysisEtMonteCarloPhos.h AliAnalysisEtMonteCarloEmcal.h AliAnalysisEtReconstructed.h AliAnalysisEtReconstructedPhos.h AliAnalysisEtReconstructedEmcal.h AliAnalysisTaskTotEt.h AliAnalysisEtCuts.cxx AliAnalysisEt.cxx AliAnalysisEtMonteCarlo.cxx AliAnalysisEtMonteCarloPhos.cxx AliAnalysisEtMonteCarloEmcal.cxx AliAnalysisEtReconstructed.cxx AliAnalysisEtReconstructedPhos.cxx AliAnalysisEtReconstructedEmcal.cxx AliAnalysisTaskTotEt.cxx AliAnalysisEtCommon.cxx AliAnalysisEtSelector.cxx AliAnalysisEtSelectorPhos.cxx AliAnalysisEtSelectorEmcal.cxx AliAnalysisEtCommon.h AliAnalysisHadEtCorrections.h AliAnalysisHadEtCorrections.cxx AliAnalysisTaskTransverseEnergy.h AliAnalysisTaskTransverseEnergy.cxx AliAnalysisEmEtMonteCarlo.cxx AliAnalysisEmEtReconstructed.cxx AliAnalysisEmEtMonteCarlo.h AliAnalysisEmEtReconstructed.h AliAnalysisEtSelector.h AliAnalysisEtSelectorPhos.h AliAnalysisEtSelectorEmcal.h ConfigEtMonteCarlo.C ConfigEtReconstructed.C corrections.root badchannels.root libTENDER.so libTENDERSupplies.so");
6ad010c1 58 plugin->SetExecutableCommand("aliroot -b -q");
59 // add extra include files/path
60 plugin->AddIncludePath("-I. -I$ALICE_ROOT/EMCAL -I$ALICE_ROOT/ANALYSIS");
99a6613d 61
62 // No need for output file names. Procedure is automatic. <-- not true
62633297 63 //plugin->SetDefaultOutputs(kFALSE);
8df12228 64 //plugin->SetOutputFiles(outputName.Data());
62633297 65 //plugin->SetOutputFiles("Et.ESD.sim.EMCAL.root event_stat.root");
99a6613d 66 // No need define the files to be archived. Note that this is handled automatically by the plugin.
67 // plugin->SetOutputArchive("log_archive.zip:stdout,stderr");
68 // Set a name for the generated analysis macro (default MyAnalysis.C) Make this unique !
69 plugin->SetAnalysisMacro("DavidEtAnalysis.C");
70 // Optionally set maximum number of input files/subjob (default 100, put 0 to ignore). The optimum for an analysis
71 // is correlated with the run time - count few hours TTL per job, not minutes !
72 plugin->SetSplitMaxInputFileNumber(100);
73 // Optionally set number of failed jobs that will trigger killing waiting sub-jobs.
74 plugin->SetMaxInitFailed(5);
75 // Optionally resubmit threshold.
c9bdd83c 76 //plugin->SetMasterResubmitThreshold(90);
99a6613d 77 // Optionally set time to live (default 30000 sec)
78 plugin->SetTTL(20000);
79 // Optionally set input format (default xml-single)
80 plugin->SetInputFormat("xml-single");
81 // Optionally modify the name of the generated JDL (default analysis.jdl)
82 plugin->SetJDLName("TaskEt.jdl");
83 // Optionally modify job price (default 1)
84 plugin->SetPrice(1);
85 // Optionally modify split mode (default 'se')
86 plugin->SetSplitMode("se");
6ad010c1 87
99a6613d 88 return plugin;
4998bf42 89}