TWiki> ALICE Web>AliceSkafAnalysis (03 May 2010, _47C_61UK_47O_61eScience_47OU_61Birmingham_47L_61ParticlePhysics_47CN_61arvinder_32palaha? ) EditAttach

Creating a run macro for SKAF

This page will give the necessary ingredients to create a macro that will run an analysis task on the Slovakian Kosice Analysis Facility (SKAF) cluster. It was created using the information from the skaf pages and personal experience. Using it will create a macro that can run a modified version of the tutorial analysis that creates a Pt spectrum

Prerequisites

In order to connect to the SKAF Proof cluster, the following is required:

  • valid grid certificate saved in the ~/.globus directory
  • valid alien token, created by invoking the command "alien-token-init "
  • correct version of root and aliroot sourced in local session as to be used for SKAF

Creating a macro

Using the quick start pages, create the following lines in a macro called runSKAF.C:

void runSKAF(){
   // loads libraries
   gSystem->Load("libVMC.so");
   gSystem->Load("libPhysics.so");
   gSystem->Load("libSTEERBase.so");
   gSystem->Load("libESD.so");
   gSystem->Load("libAOD.so");
   gSystem->Load("libANALYSIS.so");
   gSystem->Load("libANALYSISalice.so");
 
   // add aliroot indlude path
   gROOT->ProcessLine(Form(".include %s/include",gSystem->ExpandPathName("$ALICE_ROOT")));
 
   // connect to proof 
   gEnv->SetValue("XSec.GSI.DelegProxy", "2");
   TProof::Open("<username>@skaf.saske.sk");
 
   // enable aliroot
   gProof->EnablePackage("VO_ALICE@AliRoot::v4-19-04-AN");
}

This will enable the v4-19-04-AN version of aliroot on SKAF after connecting using your normal CAF details. This will allow you to run from the lxplus machines after you have sourced aliroot, or one can run a diffrent version of aliroot from another computer, provided that version is installed on that computer.

After the loading of the libraries and connecting to SKAF, the same functions are called as for the CAF cluster. Namely:

   // esdchain 
   gROOT->LoadMacro("$ALICE_ROOT/PWG0/CreateESDChain.C");

   // analysis manager
   AliAnalysisManager* mgr = new AliAnalysisManager("AliAnalysisTaskPt");
   AliVEventHandler* esdH = new AliESDInputHandler();
   mgr->SetInputEventHandler(esdH);

   // create task
   gProof->Load("AliAnalysisTaskPt.cxx++g");
   AliAnalysisTask *task = new AliAnalysisTaskPt("TaskPt");
   mgr->AddTask(task);

   // create containers for input/output
   AliAnalysisDataContainer *cinput = mgr->GetCommonInputContainer();
   AliAnalysisDataContainer *coutput1 = mgr->CreateContainer("coutput1", TList::Class(), AliAnalysisManager::kOutputContainer, "list.root");

   // connect input/output
   mgr->ConnectInput(task, 0, cinput);
   mgr->ConnectOutput(task, 1, coutput1);

   // enable debug printouts
   mgr->SetDebugLevel(2);
   if(!mgr->InitAnalysis()) return;
   mgr->PrintStatus();

        // start analysis
   mgr->StartAnalysis("proof","/ALICE/pp007000/LHC10b_000115328_p1");

-- ArvinderPalaha - 03 May 2010

Edit | Attach | Watch | Print version | History: r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r1 - 03 May 2010 - _47C_61UK_47O_61eScience_47OU_61Birmingham_47L_61ParticlePhysics_47CN_61arvinder_32palaha?
 
This site is powered by the TWiki collaboration platform Powered by Perl This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback