3. Running your task

Basically, there's 3 options for running

  • Run on local data
  • Run on GRID (either in test or full mode) yourself
  • Run on GRID using the LEGO train system

There's also proof, not covered in these slides, but your supervisor might suggest it.

Let's take a look at running our task on our own laptop. So we have to

  • Compile our code
  • Launch our analysis

First let's have a look at runAnalysis.C

void runAnalysis() {
    // header location
    gROOT->ProcessLine(".include $ROOTSYS/include");
    gROOT->ProcessLine(".include $ALICE_ROOT/include");
    // create the analysis manager
    AliAnalysisManager* mgr = new AliAnalysisManager("AnalysisMyTask");
    AliAODInputHandler* aodH = new AliAODInputHandler();
    mgr->SetInputEventHandler(aodH);
    // compile the class (locally)
    gROOT->LoadMacro("AliAnalysisTaskMyTask.cxx ++g");
    // load the addtask macro
    gROOT->LoadMacro("AddMyTask.C");
    // create an instance of your analysis task
    AliAnalysisTaskMyTask* task = AddMyTask();
    // if you want to run locally , we need to define some input
    TChain* chain = new TChain("aodTree");
    chain->Add("/scratch/.../AliAOD.root");
    // start the analysis locally
    mgr->StartAnalysis("local", chain);
}

This is a great point to start with the tutorial and run the example. The rest of PART I will cover some additional information and tips for your future work.

results matching ""

    No results matching ""