Moving PbPb multiplicity in the new directory structure
[u/mrichter/AliRoot.git] / PWGLF / SPECTRA / ChargedHadrons / multPbPb / CreateAlienHandlerTrigger.C
CommitLineData
eef42d18 1
2AliAnalysisGrid* CreateAlienHandlerTrigger(const char * run,const char * recopass="pass1", Bool_t isMC=kFALSE)
3{
4
5
6// Check if user has a valid token, otherwise make one. This has limitations.
7// One can always follow the standard procedure of calling alien-token-init then
8// source /tmp/gclient_env_$UID in the current shell.
9 TGrid::Connect("alien:");
10 AliAnalysisAlien *plugin = new AliAnalysisAlien();
11// Set the run mode (can be "full", "test", "offline", "submit" or "terminate")
12 plugin->SetRunMode("full");
13 //plugin->SetRunMode("test");
14// Set versions of used packages
15 plugin->SetAPIVersion("V1.1x");
16 plugin->SetROOTVersion("v5-27-06-2");
17 plugin->SetAliROOTVersion("v4-21-03-AN");
18// Declare input data to be processed.
19// Method 1: Create automatically XML collections using alien 'find' command.
20// Define production directory LFN
21// LHC09d
22// /alice/data/2009/LHC09d/000104892/ESDs/pass6/
23 if (!isMC)
24 plugin->SetGridDataDir(Form("/alice/data/2010/LHC10h/%s/ESDs/%s/", run,recopass));
25 else
26 plugin->SetGridDataDir(Form("/alice/sim/%s",recopass));
27// Set data search pattern
28 plugin->SetDataPattern("AliESDs.root");
29// ...then add run numbers to be considered
30// plugin->AddRunNumber(104892);
31// plugin->AddRunNumber(300001);
32// Method 2: Declare existing data files (raw collections, xml collections, root file)
33// If no path mentioned data is supposed to be in the work directory (see SetGridWorkingDir())
34// XML collections added via this method can be combined with the first method if
35// the content is compatible (using or not tags)
36 // plugin->AddDataFile("tag.xml");
37 // plugin->AddDataFile("/alice/data/2008/LHC08c/000057657/raw/Run57657.Merged.RAW.tag.root");
38// Define alien work directory where all files will be copied. Relative to alien $HOME.
39 plugin->SetGridWorkingDir(Form("MultPb/Task_%s_%s",run,recopass));
40// Declare alien output directory. Relative to working directory.
41 plugin->SetGridOutputDir("out");
42// Declare the analysis source files names separated by blancs. To be compiled runtime
43// using ACLiC on the worker nodes.
44 plugin->SetAnalysisSource("AliAnalysisTaskTriggerStudy.cxx AliHistoListWrapper.cxx");
45// Declare all libraries (other than the default ones for the framework. These will be
46// loaded by the generated analysis macro. Add all extra files (task .cxx/.h) here.
47 plugin->SetAdditionalLibs("AliAnalysisTaskTriggerStudy.cxx AliHistoListWrapper.cxx AliAnalysisTaskTriggerStudy.h AliHistoListWrapper.h");
48// plugin->SetAdditionalLibs("AliCollisionsNormalization.cxx AliCollisionNormalizationTask.cxx AliPhysicsSelection.cxx AliCollisionsNormalization.h AliCollisionNormalizationTask.h AliPhysicsSelection.h");
49 // I'm using a modified ANALYSISalice package, so I need to load par files for everything
50 plugin->EnablePackage("STEERBase");
51 plugin->EnablePackage("ESD");
52 plugin->EnablePackage("AOD");
53 plugin->EnablePackage("CORRFW");
54 plugin->EnablePackage("ANALYSIS");
55 plugin->EnablePackage("ANALYSISalice");
56
57// Declare the output file names separated by blancs.
58// (can be like: file.root or file.root@ALICE::Niham::File)
59 plugin->SetDefaultOutputs(kFALSE);
60 // plugin->SetOutputFiles(Form("EventStat_temp.root %s",outfilename);
61 plugin->SetOutputFiles("Trig_Temp.root");
62// Optionally define the files to be archived.
63// plugin->SetOutputArchive("log_archive.zip:stdout,stderr@ALICE::NIHAM::File root_archive.zip:*.root@ALICE::NIHAM::File");
64 plugin->SetOutputArchive("log_archive.zip:stdout,stderr");
65// Optionally set a name for the generated analysis macro (default MyAnalysis.C)
66 plugin->SetAnalysisMacro("AnalysisTrigger.C");
67// Optionally set maximum number of input files/subjob (default 100, put 0 to ignore)
68 plugin->SetSplitMaxInputFileNumber(100);
69// Optionally set number of failed jobs that will trigger killing waiting sub-jobs.
70 plugin->SetMaxInitFailed(5);
71// Optionally resubmit threshold.
72 plugin->SetMasterResubmitThreshold(90);
73// Optionally set time to live (default 30000 sec)
74 plugin->SetTTL(30000);
75// Optionally set input format (default xml-single)
76 plugin->SetInputFormat("xml-single");
77// Optionally modify the name of the generated JDL (default analysis.jdl)
78 plugin->SetJDLName("TaskNorm.jdl");
79// Optionally modify job price (default 1)
80 plugin->SetPrice(1);
81// Optionally modify split mode (default 'se')
82 plugin->SetSplitMode("se");
83 return plugin;
84}