ROOT logo
//Macro to test Analysis Macros on the GRID 
//please check settings for output files
//for local test use 'test' mode

AliAnalysisGrid* CreateAlienHandlerpPb(bool isAOD = kFALSE)
{
// Check if user has a valid token, otherwise make one. This has limitations.
// One can always follow the standard procedure of calling alien-token-init then
//   source /tmp/gclient_env_$UID in the current shell.
//   if (!AliAnalysisGrid::CreateToken()) return NULL;
   AliAnalysisAlien *plugin = new AliAnalysisAlien();
   plugin->SetOverwriteMode();
// Set the run mode (can be "full", "test", "offline", "submit" or "terminate")
   plugin->SetRunMode("test");
//   plugin->SetRunMode("offline");
//   plugin->SetRunMode("full");
//   plugin->SetRunMode("terminate");
   plugin->SetNtestFiles(1);
// Set versions of used packages

   plugin->SetAPIVersion("V1.1x");
   plugin->SetROOTVersion("v5-34-02-1");
   plugin->SetAliROOTVersion("v5-04-32-AN");
// Declare input data to be processed.
// Method 1: Create automatically XML collections using alien 'find' command.
// Define production directory LFN
// On real reconstructed data:
   plugin->SetGridDataDir("/alice/data/2013/LHC13b");
// Set data search pattern
   if(isAOD)
      plugin->SetDataPattern("*/pass2/AOD/*/AliAOD.root");
   else
      plugin->SetDataPattern("*/pass2/*/AliESDs.root");

//same for pp MC:
//   plugin->SetGridDataDir("/alice/sim/LHC10f6a");
//  plugin->SetDataPattern("*/*/AliESDs.root");
// Data pattern for reconstructed data
//   plugin->SetDataPattern("*AliAOD.root"); //esta linea sirve para pruebas

   plugin->SetRunPrefix("000");   // real data

// ...then add run numbers to be considered
//   plugin->SetRunRange(122374,126437); //sim data
//10d
// plugin->AddRunNumber(126437); //sim data
//11h.pass2
plugin->AddRunNumber(195351); 
//   plugin->SetOutputSingleFolder("output");
   plugin->SetOutputToRunNo();
// Method 2: Declare existing data files (raw collections, xml collections, root file)
// If no path mentioned data is supposed to be in the work directory (see SetGridWorkingDir())
// XML collections added via this method can be combined with the first method if
// the content is compatible (using or not tags)
//   plugin->AddDataFile("tag.xml");
//   plugin->AddDataFile("/alice/data/2008/LHC08c/000057657/raw/Run57657.Merged.RAW.tag.root");
// Define alien work directory where all files will be copied. Relative to alien $HOME.
   plugin->SetGridWorkingDir("work");
// Declare alien output directory. Relative to working directory.
   plugin->SetGridOutputDir("output"); // In this case will be $HOME/work/output
// Declare the analysis source files names separated by blancs. To be compiled runtime
// using ACLiC on the worker nodes.
//   plugin->SetAnalysisSource("AliAnalysisHelperJetTasks.cxx AliAnalysisTaskPartonDisc.cxx");
   plugin->AddIncludePath("-I. .I$ALIEN_ROOT/api/lib -I$ROOTSYS/lib -I$ROOTSYS/include -I$ALICE_ROOT/include -I$ALICE_ROOT/PWGHF/ -I$ALICE_ROOT/PWGHF/hfe/macros -I$ALICE_ROOT/PWGHF/hfe -I$ALICE_ROOT/ANALYSIS -I$ALICE_ROOT/ANALYSIS/Tender -I$ALICE_ROOT/ANALYSIS/TenderSupplies -I$ALICE_ROOT/PWG/ -I$ALICE_ROOT/PWG/FLOW -I$ALICE_ROOT/PWG/Base -I$ALICE_ROOT/PWG/Tasks");
 //  plugin->SetAdditionalLibs("libGui.so  libXMLParser.so libSTEERBase.so libESD.so libAOD.so libCDB.so libANALYSIS.so libANALYSISalice.so libCORRFW.so  libTENDER.so libProof.so libRAWDatabase.so libSTEER.so libTOFbase.so libPWGDQdielectron.so");// ConfigLowMassDiE.C")
   plugin->SetAdditionalLibs("libGui.so  libXMLParser.so libSTEERBase.so libESD.so libAOD.so libCDB.so libANALYSIS.so libANALYSISalice.so libCORRFW.so  libPWGflowBase.so libPWGflowTasks.so libPWGHFhfe.so libTENDER.so libProof.so libRAWDatabase.so libSTEER.so libTOFbase.so");
   
// Declare all libraries (other than the default ones for the framework. These will be
// loaded by the generated analysis macro. Add all extra files (task .cxx/.h) here.
//   plugin->SetAdditionalLibs("AliAnalysisHelperJetTasks.h AliAnalysisHelperJetTasks.cxx AliAnalysisTaskPartonDisc.h AliAnalysisTaskPartonDisc.cxx");
// Declare the output file names separated by blancs.
// (can be like: file.root or file.root@ALICE::Niham::File)
//   plugin->SetOutputFiles("Output.root");
   //plugin->SetDefaultOutputs(); 
   plugin->SetDefaultOutputs(kFALSE);
   plugin->SetOutputFiles("AnalysisResults.root"); 
     //plugin->SetOutputFiles("cbaumann_LMEEpp2010_out.root"); 
//   plugin->SetOutputFiles("cbaumann_lowmass_out.root cbaumann_lowmass_CF.root");
// Optionally define the files to be archived.
//   plugin->SetOutputArchive("log_archive.zip:stdout,stderr@disk=2 root_archive.zip:*.root@disk=2");
//   plugin->SetOutputArchive("log_archive.zip:stdout,stderr");
// Optionally set a name for the generated analysis macro (default MyAnalysis.C)
   plugin->SetAnalysisMacro("TPCTOFanalysispPb.C");
// Optionally set maximum number of input files/subjob (default 100, put 0 to ignore)
//   plugin->SetSplitMaxInputFileNumber(2);
// Optionally modify the executable name (default analysis.sh)
   plugin->SetExecutable("TPCTOFanalysispPb.sh");
   plugin->SetExecutableCommand("aliroot -b -q");
// Optionally set number of failed jobs that will trigger killing waiting sub-jobs.
//   plugin->SetMaxInitFailed(5);
// Optionally resubmit threshold.
//   plugin->SetMasterResubmitThreshold(90);
// Optionally set time to live (default 30000 sec)
   plugin->SetTTL(30000);
// Optionally set input format (default xml-single)
   plugin->SetInputFormat("xml-single");
// Optionally modify the name of the generated JDL (default analysis.jdl)
   plugin->SetJDLName("TPCTOFanalysispPb.jdl");
// Optionally modify job price (default 1)
   plugin->SetPrice(1);      
// Optionally modify split mode (default 'se')    
   plugin->SetSplitMode("se");
   return plugin;
}
 CreateAlienHandlerpPb.C:1
 CreateAlienHandlerpPb.C:2
 CreateAlienHandlerpPb.C:3
 CreateAlienHandlerpPb.C:4
 CreateAlienHandlerpPb.C:5
 CreateAlienHandlerpPb.C:6
 CreateAlienHandlerpPb.C:7
 CreateAlienHandlerpPb.C:8
 CreateAlienHandlerpPb.C:9
 CreateAlienHandlerpPb.C:10
 CreateAlienHandlerpPb.C:11
 CreateAlienHandlerpPb.C:12
 CreateAlienHandlerpPb.C:13
 CreateAlienHandlerpPb.C:14
 CreateAlienHandlerpPb.C:15
 CreateAlienHandlerpPb.C:16
 CreateAlienHandlerpPb.C:17
 CreateAlienHandlerpPb.C:18
 CreateAlienHandlerpPb.C:19
 CreateAlienHandlerpPb.C:20
 CreateAlienHandlerpPb.C:21
 CreateAlienHandlerpPb.C:22
 CreateAlienHandlerpPb.C:23
 CreateAlienHandlerpPb.C:24
 CreateAlienHandlerpPb.C:25
 CreateAlienHandlerpPb.C:26
 CreateAlienHandlerpPb.C:27
 CreateAlienHandlerpPb.C:28
 CreateAlienHandlerpPb.C:29
 CreateAlienHandlerpPb.C:30
 CreateAlienHandlerpPb.C:31
 CreateAlienHandlerpPb.C:32
 CreateAlienHandlerpPb.C:33
 CreateAlienHandlerpPb.C:34
 CreateAlienHandlerpPb.C:35
 CreateAlienHandlerpPb.C:36
 CreateAlienHandlerpPb.C:37
 CreateAlienHandlerpPb.C:38
 CreateAlienHandlerpPb.C:39
 CreateAlienHandlerpPb.C:40
 CreateAlienHandlerpPb.C:41
 CreateAlienHandlerpPb.C:42
 CreateAlienHandlerpPb.C:43
 CreateAlienHandlerpPb.C:44
 CreateAlienHandlerpPb.C:45
 CreateAlienHandlerpPb.C:46
 CreateAlienHandlerpPb.C:47
 CreateAlienHandlerpPb.C:48
 CreateAlienHandlerpPb.C:49
 CreateAlienHandlerpPb.C:50
 CreateAlienHandlerpPb.C:51
 CreateAlienHandlerpPb.C:52
 CreateAlienHandlerpPb.C:53
 CreateAlienHandlerpPb.C:54
 CreateAlienHandlerpPb.C:55
 CreateAlienHandlerpPb.C:56
 CreateAlienHandlerpPb.C:57
 CreateAlienHandlerpPb.C:58
 CreateAlienHandlerpPb.C:59
 CreateAlienHandlerpPb.C:60
 CreateAlienHandlerpPb.C:61
 CreateAlienHandlerpPb.C:62
 CreateAlienHandlerpPb.C:63
 CreateAlienHandlerpPb.C:64
 CreateAlienHandlerpPb.C:65
 CreateAlienHandlerpPb.C:66
 CreateAlienHandlerpPb.C:67
 CreateAlienHandlerpPb.C:68
 CreateAlienHandlerpPb.C:69
 CreateAlienHandlerpPb.C:70
 CreateAlienHandlerpPb.C:71
 CreateAlienHandlerpPb.C:72
 CreateAlienHandlerpPb.C:73
 CreateAlienHandlerpPb.C:74
 CreateAlienHandlerpPb.C:75
 CreateAlienHandlerpPb.C:76
 CreateAlienHandlerpPb.C:77
 CreateAlienHandlerpPb.C:78
 CreateAlienHandlerpPb.C:79
 CreateAlienHandlerpPb.C:80
 CreateAlienHandlerpPb.C:81
 CreateAlienHandlerpPb.C:82
 CreateAlienHandlerpPb.C:83
 CreateAlienHandlerpPb.C:84
 CreateAlienHandlerpPb.C:85
 CreateAlienHandlerpPb.C:86
 CreateAlienHandlerpPb.C:87
 CreateAlienHandlerpPb.C:88
 CreateAlienHandlerpPb.C:89
 CreateAlienHandlerpPb.C:90
 CreateAlienHandlerpPb.C:91
 CreateAlienHandlerpPb.C:92
 CreateAlienHandlerpPb.C:93
 CreateAlienHandlerpPb.C:94
 CreateAlienHandlerpPb.C:95
 CreateAlienHandlerpPb.C:96
 CreateAlienHandlerpPb.C:97
 CreateAlienHandlerpPb.C:98
 CreateAlienHandlerpPb.C:99
 CreateAlienHandlerpPb.C:100
 CreateAlienHandlerpPb.C:101
 CreateAlienHandlerpPb.C:102
 CreateAlienHandlerpPb.C:103
 CreateAlienHandlerpPb.C:104
 CreateAlienHandlerpPb.C:105