Пример #1
0
AliAnalysisGrid* CreateAlienHandler(TString mode="test",TString fname="testName"){
  AliAnalysisAlien *plugin = new AliAnalysisAlien();
  plugin->SetOverwriteMode();
  plugin->SetExecutableCommand("aliroot -q -b");  
  plugin->SetRunMode(mode.Data());
  plugin->SetNtestFiles(20);
  // Set versions of used packages
  plugin->SetAPIVersion("V1.1x");
  //plugin->SetROOTVersion("v5-34-26");
  plugin->SetAliROOTVersion("v5-07-20");
  plugin->SetAliPhysicsVersion("vAN-20160203");
  // Declare input data to be processed.
  plugin->SetNrunsPerMaster(100);
  plugin->SetSplitMaxInputFileNumber(15); // 3 in the LEGO trains

    plugin->SetGridDataDir("/alice/data/2013/LHC13c/");
    plugin->SetGridWorkingDir(Form("%s/",fname.Data()));
    plugin->SetRunPrefix("000"); 
    plugin->SetDataPattern("/ESDs/pass2/*/AliESDs.root");
    plugin->SetAnalysisMacro("TaskDeuteronTreeTest.C");
    plugin->SetExecutable("TaskDeuteronTreeTest.sh");
    plugin->SetJDLName("TaskDeuteronTreeTest.jdl");
    Int_t runnumbers[]={195596,195592};

    for(Int_t irun=0;irun<2;irun++){
      Printf("%d %d",irun,runnumbers[irun]);
      plugin->AddRunNumber(runnumbers[irun]);
    }

 

    TString extraLibs;
  plugin->AddIncludePath("-I. -I$ROOTSYS/include -I$ALICE_ROOT/include -I$ALICE_PHYSICS/include");
  
  //plugin->SetAdditionalLibs("libCORRFW.so libPWGTools.so libPWGCFCorrelationsBase.so libPWGCFCorrelationsDPhi.so AliAnalysisTaskPhiCorrelations.cxx AliAnalysisTaskPhiCorrelations.h");
  //plugin->SetAnalysisSource("AliAnalysisTaskPhiCorrelations.cxx");

  plugin->SetGridOutputDir("output"); // In this case will be $HOME/work/output
  
  // Declare the output file names separated by blancs.
  // (can be like: file.root or file.root@ALICE::Niham::File)
  //plugin->SetDefaultOutputs(0);
  //plugin->SetOutputFiles("AnalysisResults.root.root");
  plugin->SetMergeViaJDL(kTRUE);
  plugin->SetOneStageMerging(kFALSE);
  //plugin->SetMaxMergeFiles(40);
  //plugin->SetMaxMergeStages(4);
  
  plugin->SetTTL(50000);
  // Optionally set input format (default xml-single)
  plugin->SetInputFormat("xml-single");
  // Optionally modify job price (default 1)
  plugin->SetPrice(1);      
  // Optionally modify split mode (default 'se')    
  //plugin->SetSplitMaxInputFileNumber();
  plugin->SetSplitMode("se");
  return plugin;
}
//_______________________________| CreateAlienHandler |________________________________
AliAnalysisGrid* CreateAlienHandler()
{
    
    AliAnalysisAlien *Plugin = new AliAnalysisAlien();
    Plugin->SetRunMode(fPluginMode.Data());
    Plugin->SetUser(fUsername.Data());
    Plugin->SetAPIVersion("V1.1x");
    Plugin->SetROOTVersion("v5-34-30-alice-12");
    Plugin->SetAliROOTVersion("v5-07-20-4");
    Plugin->SetAliPhysicsVersion("vAN-20160129-1");
    Plugin->SetNtestFiles(1);
    Plugin->SetFileForTestMode(TestFilesWPlugin.Data());
    
    // Set data search pattern for DATA grid Mode
    Plugin->SetGridDataDir("/alice/sim/2013/LHC13b2_efix_p1"); // specify MC sample
    if(readAOD) Plugin->SetDataPattern("AOD/*AliAOD.root");// specify AOD set
    else Plugin->SetDataPattern("*/AliESDs.root");
    
    Int_t totruns=0;
    //gROOT->LoadMacro("$ALICE_PHYSICS/PWGHF/vertexingHF/AddGoodRuns.C");
    gROOT->LoadMacro("AddGoodRuns.C");
    totruns += AddGoodRuns(Plugin,"LHC13b","LHC13b2_efix_p1"); //Set accordingly
    Plugin->SetNrunsPerMaster(totruns);
    
    Plugin->SetGridWorkingDir("SingleTrkEff/LHC13b2_efix_p1/16Feb2016/");
    Plugin->SetGridOutputDir("out");
    
    Plugin->SetExecutable("STE16Feb2016.sh");
    Plugin->AddIncludePath("-I. -I$ROOTSYS/include -I$ALICE_PHYSICS -I$ALICE_PHYSICS/include -I$ALICE_PHYSICS/ITS -I$ALICE_PHYSICS/TPC -I$ALICE_PHYSICS/CONTAINERS -I$ALICE_PHYSICS/STEER/STEER -I$ALICE_PHYSICS/STEER/STEERBase -I$ALICE_PHYSICS/STEER/ESD -I$ALICE_PHYSICS/STEER/AOD -I$ALICE_PHYSICS/TRD -I$ALICE_PHYSICS/macros -I$ALICE_PHYSICS/ANALYSIS -I$ALICE_PHYSICS/OADB -g");
    
    Plugin->SetSplitMaxInputFileNumber(5);
    Plugin->SetDefaultOutputs(kTRUE);
    Plugin->SetMergeViaJDL(kTRUE); // Merge Via JDL
    Plugin->SetOneStageMerging(kFALSE);
    Plugin->SetMaxMergeStages(2);
    Plugin->SetAnalysisMacro("STE16Feb2016.C");
    Plugin->SetJDLName("STE16Feb2016.jdl");
    
    return Plugin;
}
Пример #3
0
//######################################################################################################################################
AliAnalysisAlien* CreateAlienHandler ( const char* gridMode, const char* tag, unsigned int nr_test_files, unsigned int TTL,
                                       const char* outdir, const char subworkdir, const char* extradirlvl ) {

  AliAnalysisAlien* plugin = new AliAnalysisAlien();
  if ( !plugin ) { std::cout << "!!! -->> alien handler could not be created <<-- !!!" << std::endl; return NULL;}

  plugin->AddIncludePath("-I.");
  plugin->AddIncludePath("-I$ALICE_PHYSICS/include");
  plugin->AddIncludePath("-I$ALICE_ROOT/include");
  plugin->AddIncludePath("-I$FASTJET/include");
  plugin->AddIncludePath("-I/usr/include");

//   unsigned int       kGridMaxMergeFiles       = 100;            // Number of files merged in a chunk grid run range
//   unsigned int       kMaxInitFailed           = 10 ;            // Optionally set number of failed jobs that will trigger killing waiting sub-jobs.

  TString     kGridOutdir              = outdir ;       // AliEn output directory. If blank will become output_<kTrainName>
  TString     kGridSubWorkDir          = subworkdir ;   // sub working directory not to confuse different run xmls
  TString     kGridExtraAliendirLevel  = extradirlvl ;  // sub working directory not to confuse different run xmls
  TString     kWorkDir                 = tag;           // AliEn work dir; relative to AliEn $HOME
  TString     kTrainName               = "cdfjets";     // *CHANGE ME* (no blancs or special characters)

  TString macroName("");  macroName = Form("%s.C", kTrainName.Data());
  TString execName("");   execName  = Form("%s.sh", kTrainName.Data());
  TString jdlName("");    jdlName   = Form("%s.jdl", kTrainName.Data());

  // Set run mode.  Can be "full", "test", "offline", "submit" or "merge"
  plugin->SetRunMode(gridMode);
  if (std::strcmp(gridMode, "test")) { plugin->SetCheckCopy(kFALSE); }

  // Set the number of test files; set to kGridFilesPerJob as to evaluate the memory consumption and ttl on grid
  plugin->SetNtestFiles ( nr_test_files );

  // Job tag
  plugin->SetJobTag(tag);

  // AliEn directory containing the input packages
  plugin->SetGridWorkingDir(tag);

  // Declare alien output directory. Relative to working directory.
  plugin->SetGridOutputDir( kGridOutdir.Data() ); // In this case will be $HOME/work/output

  // Optionally modify the executable name (default analysis.sh)
  plugin->SetExecutable(execName.Data());

  // Optionally set a name for the generated analysis macro (default MyAnalysis.C)
  plugin->SetAnalysisMacro(macroName.Data());

  // Optionally modify the name of the generated JDL (default analysis.jdl)
  plugin->SetJDLName(jdlName.Data());

  // Use the output files connected to output containers from the analysis manager
  // rather than the files defined by SetOutputFiles
  plugin->SetDefaultOutputs(kTRUE);

  //********************   PLUGIN OPTIONS   ************************
  // min (nr,4) replicas in grid storage
  plugin->SetNumberOfReplicas(2);

  // Optionally set time to live
  plugin->SetTTL(TTL);

  // Optionally set maximum number of input files/subjob (default 100, put 0 to ignore)
  plugin->SetSplitMaxInputFileNumber ( nr_test_files );

  // Use xrootd tweaks to reduce timeouts in file access
  plugin->SetFastReadOption ( kFALSE );

  // Maximum initial consecutive subjobs accepted to fail.
  // plugin->SetMaxInitFailed ( kMaxInitFailed );

  // Optionally resubmit threshold.
  // plugin->SetMasterResubmitThreshold(90);

  // Number of runs per masterjob
  // plugin->SetNrunsPerMaster(1);

  // exit from aliensh after submmiting job
  plugin->SetDropToShell ( kTRUE );

  // Overwrite existing files if any
  plugin->SetOverwriteMode();

  // write the output to subdirs named after run number
  // plugin->SetOutputToRunNo(1);

  // Optionally set input format (default xml-single)
  plugin->SetInputFormat("xml-single");

  // Optionally modify job price (default 1)
  plugin->SetPrice(1);

  // We split per SE or file
  plugin->SetSplitMode("se");

  // MERGING - Enable merging via automatic JDL
  plugin->SetMergeViaJDL(kTRUE);

  // Maximum number of files to be merged in one chunk
  plugin->SetOneStageMerging(kFALSE);

  // Maximum number of merging stages
  plugin->SetMaxMergeStages(2);

  // Optionally set maximum number of files merged in a chunk (default 100, put 0 to ignore)
  // plugin->SetMaxMergeFiles ( kGridMaxMergeFiles );

  return plugin;
}
Пример #4
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;
}