Пример #1
0
AliAnalysisGrid *CreateAlienHandler()
{

  AliAnalysisAlien *plugin = new AliAnalysisAlien();
  //plugin->SetOverwriteMode();

  // Set the run mode (can be "full", "test", "offline", "submit" or "terminate")
  //plugin->SetRunMode("test");
  plugin->SetRunMode("full");
  //plugin->SetRunMode("terminate");

  // Set versions of used packages
  plugin->SetAPIVersion("V1.1x");
  plugin->SetROOTVersion("v5-34-08-6");
  plugin->SetAliROOTVersion("vAN-20141031");

  // Set the path for finding the data
  plugin->SetGridDataDir("/alice/data/2010/LHC10h/");
  plugin->SetDataPattern("ESDs/pass2/AOD086/*/AliAOD.root"); // for testing over multiple files
  //plugin->SetDataPattern("ESDs/pass2/AOD086/0001/AliAOD.root"); // for testing over a single file
  plugin->SetRunPrefix("000");
  //plugin->AddRunNumber(137161);
  gROOT->ProcessLine(".L AddRunNumbers.C");
  int added = AddRunNumbers(plugin,0,95,"lhc10h");
  if(added<0) return NULL;

  // Set the path for the output
  plugin->SetGridWorkingDir("TaskExample"); // $HOME/TaskExample
  plugin->SetGridOutputDir("OutputTesting_X005"); // $HOME/TaskExample/OutputTesting

  // Specify the source code for the analysis
  plugin->SetAnalysisSource("AliAnalysisTaskExample.cxx"); // class file
  plugin->SetAdditionalLibs("AliAnalysisTaskExample.h AliAnalysisTaskExample.cxx"); // header space class

  // Default outputs (?)
  plugin->SetDefaultOutputs(); // ALWAYS use default outputs, code warns then crashes if not
  // The rest of these are optional, though some are very useful
  plugin->SetSplitMaxInputFileNumber(100); // default 100 input files/subjob
  plugin->SetMaxInitFailed(5); // default (?) jobs fail to kill waiting subjobs
  plugin->SetMasterResubmitThreshold(90); // default (?) resubmit threshold
  plugin->SetTTL(50000); // default 30000 sec time to live
  plugin->SetAnalysisMacro("TaskExample.C"); // default "MyAnalysis.C"
  plugin->SetExecutable("TaskExample.sh"); // default "analysis.sh"
  plugin->SetJDLName("TaskExample.jdl"); // default "analysis.jdl"
  plugin->SetInputFormat("xml-single"); // default "xml-single"
  plugin->SetPrice(1); // default 1 price to modify job
  plugin->SetSplitMode("se"); // default "se"

  return plugin;

}
Пример #2
0
AliAnalysisGrid* CreateAlienHandlerTrigger(const char * run,const char * recopass="******", Bool_t isMC=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.
  TGrid::Connect("alien:");
   AliAnalysisAlien *plugin = new AliAnalysisAlien();
// Set the run mode (can be "full", "test", "offline", "submit" or "terminate")
   plugin->SetRunMode("full");
   //plugin->SetRunMode("test");
// Set versions of used packages
   plugin->SetAPIVersion("V1.1x");
   plugin->SetROOTVersion("v5-27-06-2");
   plugin->SetAliROOTVersion("v4-21-03-AN");
// Declare input data to be processed.
// Method 1: Create automatically XML collections using alien 'find' command.
// Define production directory LFN
// LHC09d
// /alice/data/2009/LHC09d/000104892/ESDs/pass6/
   if (!isMC)
     plugin->SetGridDataDir(Form("/alice/data/2010/LHC10h/%s/ESDs/%s/", run,recopass));
   else 
     plugin->SetGridDataDir(Form("/alice/sim/%s",recopass));     
// Set data search pattern
   plugin->SetDataPattern("AliESDs.root");
// ...then add run numbers to be considered
//   plugin->AddRunNumber(104892);
//   plugin->AddRunNumber(300001);
// 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(Form("MultPb/Task_%s_%s",run,recopass));
// Declare alien output directory. Relative to working directory.
   plugin->SetGridOutputDir("out"); 
// Declare the analysis source files names separated by blancs. To be compiled runtime
// using ACLiC on the worker nodes.
   plugin->SetAnalysisSource("AliAnalysisTaskTriggerStudy.cxx AliHistoListWrapper.cxx");
// 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("AliAnalysisTaskTriggerStudy.cxx AliHistoListWrapper.cxx AliAnalysisTaskTriggerStudy.h AliHistoListWrapper.h");
//   plugin->SetAdditionalLibs("AliCollisionsNormalization.cxx AliCollisionNormalizationTask.cxx AliPhysicsSelection.cxx AliCollisionsNormalization.h AliCollisionNormalizationTask.h AliPhysicsSelection.h");
   // I'm using a modified ANALYSISalice package, so I need to load par files for everything
   plugin->EnablePackage("STEERBase");
   plugin->EnablePackage("ESD");
   plugin->EnablePackage("AOD");
   plugin->EnablePackage("CORRFW");
   plugin->EnablePackage("ANALYSIS");
   plugin->EnablePackage("ANALYSISalice");

// Declare the output file names separated by blancs.
// (can be like: file.root or file.root@ALICE::Niham::File)
   plugin->SetDefaultOutputs(kFALSE);
   //   plugin->SetOutputFiles(Form("EventStat_temp.root %s",outfilename);
   plugin->SetOutputFiles("Trig_Temp.root");
// Optionally define the files to be archived.
//   plugin->SetOutputArchive("log_archive.zip:stdout,stderr@ALICE::NIHAM::File root_archive.zip:*.root@ALICE::NIHAM::File");
   plugin->SetOutputArchive("log_archive.zip:stdout,stderr");
// Optionally set a name for the generated analysis macro (default MyAnalysis.C)
   plugin->SetAnalysisMacro("AnalysisTrigger.C");
// Optionally set maximum number of input files/subjob (default 100, put 0 to ignore)
   plugin->SetSplitMaxInputFileNumber(100);
// 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("TaskNorm.jdl");
// Optionally modify job price (default 1)
   plugin->SetPrice(1);      
// Optionally modify split mode (default 'se')    
   plugin->SetSplitMode("se");
   return plugin;
}
Пример #3
0
AliAnalysisGrid* CreateAlienHandler(const char* mode = "offline")
{

  //if (!AliAnalysisGrid::CreateToken()) return NULL;

   AliAnalysisAlien *plugin = new AliAnalysisAlien();
   
   plugin->SetRunMode(mode); // "full", "test", "offline", "submit" or "terminate"
   plugin->SetMergeViaJDL(kTRUE);
   plugin->SetOneStageMerging(kFALSE);
   plugin->SetMaxMergeStages(2);

   plugin->SetAPIVersion("V1.1x");
   plugin->SetROOTVersion("v5-30-03");
   plugin->SetAliROOTVersion("v5-02-16-AN");

   // add data through aliensh find procedure.
   //plugin->SetGridDataDir("/alice/sim/LHC11d2/");
   plugin->SetGridDataDir("/alice/data/2011/LHC11e");
   //plugin->SetDataPattern("*pass1/*ESDs.root");
   //plugin->SetDataPattern("*tag.root");
   //plugin->SetDataPattern("*pass1/*tag.root");
   plugin->SetDataPattern("*AOD.root");
   //plugin->AddRunNumber(119161);
   //plugin->AddRunNumber("000162740");
   //plugin->AddRunNumber("000161585");
   plugin->AddRunNumber("000162644");
   
   
   // Method 2: Declare existing data files 
   //plugin->AddDataFile("tag.xml");
   // plugin->AddDataFile("/alice/data/2008/LHC08c/000057657/raw/Run57657.Merged.RAW.tag.root");

   
   plugin->SetGridWorkingDir("eta");
   plugin->SetGridOutputDir("output"); // In this case will be $HOME/work/output

   // TString source = "";
   // source += "EtaCandidate.cxx ";
   // source += "EtaPriCandidate.cxx ";
   // source += "EtaConfig.cxx ";
   // source += "EtaOutput.cxx ";
   // source += "EtaAnalysis.cxx ";
   // source += "EtaTask.cxx ";
   // plugin->SetAnalysisSource(source);
   plugin->SetAnalysisSource("EtaCandidate.cxx EtaPriCandidate.cxx EtaConfig.cxx EtaOutput.cxx EtaAnalysis.cxx EtaTask.cxx");
   
   // TString libs = source;
   // libs += "EtaCandidate.h ";
   // libs += " EtaPriCandidate.h";
   // libs += " EtaConfig.h";
   // libs += " EtaOutput.h";
   // libs += " EtaAnalysis.h";
   // libs += " EtaTask.h";
   // plugin->SetAdditionalLibs(libs);
   plugin->SetAdditionalLibs("EtaCandidate.h EtaCandidate.cxx EtaPriCandidate.h EtaPriCandidate.cxx EtaConfig.h EtaConfig.cxx EtaOutput.h EtaOutput.cxx EtaAnalysis.h EtaAnalysis.cxx EtaTask.h EtaTask.cxx");

   plugin->SetDefaultOutputs(kTRUE);
   //plugin->SetDefaultOutputs(kFALSE);
   //plugin->SetOutputFiles("eta.output.ESD.root EventStat_temp.root");
   
   
   // Optionally define the files to be archived.
   // plugin->SetOutputArchive("log_archive.zip:stdout,stderr@ALICE::NIHAM::File root_archive.zip:*.root@ALICE::NIHAM::File");
   // plugin->SetOutputArchive("log_archive.zip:stdout,stderr");

   // Optionally set a name for the generated analysis macro (default MyAnalysis.C)
   plugin->SetAnalysisMacro("EtaAnalysis.C");
   plugin->SetExecutable("runEtaAnalysis.sh");
   plugin->SetJDLName("EtaAnalysis.jdl");

   plugin->SetSplitMaxInputFileNumber(100);
   plugin->SetMaxInitFailed(5);
   plugin->SetMasterResubmitThreshold(90);
   plugin->SetTTL(43200);
   plugin->SetInputFormat("xml-single");
   plugin->SetPrice(1);      
   plugin->SetSplitMode("se");

   return plugin;
}