ROOT logo
/**************************************************************************
 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
 *                                                                        *
 * Author: The ALICE Off-line Project.                                    *
 * Contributors are mentioned in the code where appropriate.              *
 *                                                                        *
 * Permission to use, copy, modify and distribute this software and its   *
 * documentation strictly for non-commercial purposes is hereby granted   *
 * without fee, provided that the above copyright notice appears in all   *
 * copies and that both the copyright notice and this permission notice   *
 * appear in the supporting documentation. The authors make no claims     *
 * about the suitability of this software for any purpose. It is          *
 * provided "as is" without express or implied warranty.                  *
 **************************************************************************/

/* $Id$ */

/// \ingroup macros
/// \file runReconstruction.C
/// \brief Macro for running reconstruction
///
/// Macro extracted from the MUON test script
///
/// \author Laurent Aphecetche

#if !defined(__CINT__) || defined(__MAKECINT__)
#include "AliMUONReconstructor.h"
#include "AliMUONRecoParam.h"
#include "AliRecoParam.h"
#include "AliCDBManager.h"
#include "AliTracker.h"
#include "AliReconstruction.h"
#include <TRandom.h>
#include <Riostream.h>
//#include <TObjectTable.h>
#endif

void runReconstruction(int seed, const char* input, const char* recoptions, bool rawocdb)
{ 
  AliCDBManager* man = AliCDBManager::Instance();
  
  if ( rawocdb ) 
  {
    cout << "**** WILL USE RAW OCDB" << endl;
    man->SetDefaultStorage("raw://"); //alien://folder=/alice/data/2011/OCDB?cacheFold=/Users/laurent/OCDBcache");
    man->SetSpecificStorage("ITS/Calib/RecoParam","alien://folder=/alice/cern.ch/user/p/ppillot/OCDB_PbPbSim");
  } 
  else
  {
    man->SetDefaultStorage("local://$ALICE_ROOT/OCDB");

    man->SetSpecificStorage("GRP/GRP/Data",
                            Form("local://%s",gSystem->pwd()));

  }
  
  gRandom->SetSeed(seed);
  
  AliReconstruction* MuonRec = new AliReconstruction("galice.root");
  MuonRec->SetInput(gSystem->ExpandPathName(input));
  MuonRec->SetRunReconstruction("MUON ITS");
  MuonRec->SetFillESD("HLT");
  MuonRec->SetOption("HLT", "libAliHLTMUON.so");
  MuonRec->SetNumberOfEventsPerFile(10000);
  MuonRec->SetOption("MUON",recoptions);
  MuonRec->SetRunQA("MUON:ALL");
  MuonRec->SetQAWriteExpert(AliQAv1::kMUON);
  MuonRec->SetQARefDefaultStorage("local://$ALICE_ROOT/QAref") ;
  MuonRec->SetWriteESDfriend(kFALSE);
  MuonRec->SetCleanESD(kFALSE);  
  MuonRec->SetStopOnError(kFALSE);
  
  // uncomment the following lines if you want to set custom RecoParam
  // instead of getting them from the OCDB
  //  AliMUONRecoParam *muonRecoParam = AliMUONRecoParam::GetLowFluxParam();
  //  muonRecoParam->SaveFullClusterInESD(kTRUE,100.);
  //  MuonRec->SetRecoParam("MUON",muonRecoParam);
  
  MuonRec->Run();
  
  delete MuonRec;
  
  //gObjectTable->Print();
}
 runReconstruction.C:1
 runReconstruction.C:2
 runReconstruction.C:3
 runReconstruction.C:4
 runReconstruction.C:5
 runReconstruction.C:6
 runReconstruction.C:7
 runReconstruction.C:8
 runReconstruction.C:9
 runReconstruction.C:10
 runReconstruction.C:11
 runReconstruction.C:12
 runReconstruction.C:13
 runReconstruction.C:14
 runReconstruction.C:15
 runReconstruction.C:16
 runReconstruction.C:17
 runReconstruction.C:18
 runReconstruction.C:19
 runReconstruction.C:20
 runReconstruction.C:21
 runReconstruction.C:22
 runReconstruction.C:23
 runReconstruction.C:24
 runReconstruction.C:25
 runReconstruction.C:26
 runReconstruction.C:27
 runReconstruction.C:28
 runReconstruction.C:29
 runReconstruction.C:30
 runReconstruction.C:31
 runReconstruction.C:32
 runReconstruction.C:33
 runReconstruction.C:34
 runReconstruction.C:35
 runReconstruction.C:36
 runReconstruction.C:37
 runReconstruction.C:38
 runReconstruction.C:39
 runReconstruction.C:40
 runReconstruction.C:41
 runReconstruction.C:42
 runReconstruction.C:43
 runReconstruction.C:44
 runReconstruction.C:45
 runReconstruction.C:46
 runReconstruction.C:47
 runReconstruction.C:48
 runReconstruction.C:49
 runReconstruction.C:50
 runReconstruction.C:51
 runReconstruction.C:52
 runReconstruction.C:53
 runReconstruction.C:54
 runReconstruction.C:55
 runReconstruction.C:56
 runReconstruction.C:57
 runReconstruction.C:58
 runReconstruction.C:59
 runReconstruction.C:60
 runReconstruction.C:61
 runReconstruction.C:62
 runReconstruction.C:63
 runReconstruction.C:64
 runReconstruction.C:65
 runReconstruction.C:66
 runReconstruction.C:67
 runReconstruction.C:68
 runReconstruction.C:69
 runReconstruction.C:70
 runReconstruction.C:71
 runReconstruction.C:72
 runReconstruction.C:73
 runReconstruction.C:74
 runReconstruction.C:75
 runReconstruction.C:76
 runReconstruction.C:77
 runReconstruction.C:78
 runReconstruction.C:79
 runReconstruction.C:80
 runReconstruction.C:81
 runReconstruction.C:82
 runReconstruction.C:83
 runReconstruction.C:84
 runReconstruction.C:85