ROOT logo
// $Id: rec-tpc-its.C 35299 2009-10-07 09:07:29Z kkanaki $
/*
 * Example macro to run the ITS tracker with the TPC reconstruction.
 * The reconstruction is done from the TPC and ITS raw data.
 *
 * Usage:
 * <pre>
 *   aliroot -b -q rec-tpc-its.C | tee rec-tpc-its.log
 *   aliroot -b -q rec-tpc-its.C'("./","spd")' | tee rec-tpc-its.log
 * </pre>
 *
 * The macro asumes raw data to be available in the rawx folders, either
 * simulated or real data. A different input can be specified as parameter
 * <pre>
 *   aliroot -b -q rec-tpc-its.C'("input.root")'
 * </pre>
 * 
 * In the first section, an analysis chain is defined. The scale of the
 * chain can be defined by choosing the range of sectors and partitions.
 *
 * The reconstruction is steered by the AliReconstruction object in the
 * usual way.
 *
 * @ingroup alihlt_tpc
 * @author Gaute.Ovrebekk@ift.uib.no
 */
void rec_vtxSPD(const char* input="./")
{
  
  if(!gSystem->AccessPathName("galice.root")){
    cerr << "please delete the galice.root or run at different place." << endl;
    return;
  }

  if (!input) {
    cerr << "please specify input or run without arguments" << endl;
    return;
  }
  ///////////////////////////////////////////////////////////////////////////////////////////////////
  //
  // init the HLT system in order to define the analysis chain below
  //
  AliHLTSystem* gHLT=AliHLTPluginBase::GetInstance();
 
  ///////////////////////////////////////////////////////////////////////////////////////////////////
  //
  // Setting up which output to give
  //
  TString option="libAliHLTUtil.so libAliHLTRCU.so libAliHLTTPC.so libAliHLTITS.so libAliHLTGlobal.so loglevel=0x7c chains=";


  ///////////////////////////////////////////////////////////////////////////////////////////////////
  //
  // define the analysis chain to be run
  //
  int minddl=0;          //min ddl number for SPD
  int maxddl=19;         //max ddl number for SPD
  int spec=0x1;          //spec for ddl's
  int ddlno=0;
  TString cfout="";

  for(ddlno=minddl;ddlno<=maxddl;ddlno++){  
    TString arg, publisher, cf;
    
    arg.Form("-minid %d -datatype 'DDL_RAW ' 'ISPD ' -dataspec 0x%08x -verbose",ddlno, spec);
    publisher.Form("DP_%d", ddlno);
    new AliHLTConfiguration(publisher.Data(), "AliRawReaderPublisher", NULL , arg.Data());
    
    cf.Form("CF_%d",ddlno);
    new AliHLTConfiguration(cf.Data(), "ITSClusterFinderSPD", publisher.Data(), "");
    
    if (cfout.Length()>0) cfout+=" ";
    cfout+=cf;
    
    spec=spec<<1;
  }

  
  AliHLTConfiguration itsvtx("itsvtx", "ITSVertexerSPD"   , cfout.Data(), "");

  AliHLTConfiguration rootFileWriterClusters("historootfile", "ROOTFileWriter", "itsvtx" , "-datafile ITSHistograms -concatenate-events -overwrite");


  AliHLTConfiguration globalConverter("globalConverter", "GlobalEsdConverter"   , "itsvtx", "");
  AliHLTConfiguration sink("esdfile", "EsdCollector"   , "globalConverter", "");
  option+="historootfile,esdfile ";

  ///////////////////////////////////////////////////////////////////////////////////////////////////
  //
  // Init and run the reconstruction
  // All but HLT reconstructio is switched off
  //
  AliReconstruction rec;
  rec.SetInput(input);
  rec.SetRunVertexFinder(kFALSE);
  rec.SetRunReconstruction("HLT");
  rec.SetLoadAlignFromCDB(0);
  rec.SetDefaultStorage("local://$ALICE_ROOT/OCDB");
  rec.SetSpecificStorage("GRP/GRP/Data",Form("local://%s",gSystem->pwd())); 
  rec.SetQARefDefaultStorage("local://$ALICE_ROOT/QAref") ;
  rec.SetRunQA(":");
  rec.SetOption("HLT", option);
  //rec.SetEventRange(0,0);
rec.Run();
}
 rec-vtxSPD.C:1
 rec-vtxSPD.C:2
 rec-vtxSPD.C:3
 rec-vtxSPD.C:4
 rec-vtxSPD.C:5
 rec-vtxSPD.C:6
 rec-vtxSPD.C:7
 rec-vtxSPD.C:8
 rec-vtxSPD.C:9
 rec-vtxSPD.C:10
 rec-vtxSPD.C:11
 rec-vtxSPD.C:12
 rec-vtxSPD.C:13
 rec-vtxSPD.C:14
 rec-vtxSPD.C:15
 rec-vtxSPD.C:16
 rec-vtxSPD.C:17
 rec-vtxSPD.C:18
 rec-vtxSPD.C:19
 rec-vtxSPD.C:20
 rec-vtxSPD.C:21
 rec-vtxSPD.C:22
 rec-vtxSPD.C:23
 rec-vtxSPD.C:24
 rec-vtxSPD.C:25
 rec-vtxSPD.C:26
 rec-vtxSPD.C:27
 rec-vtxSPD.C:28
 rec-vtxSPD.C:29
 rec-vtxSPD.C:30
 rec-vtxSPD.C:31
 rec-vtxSPD.C:32
 rec-vtxSPD.C:33
 rec-vtxSPD.C:34
 rec-vtxSPD.C:35
 rec-vtxSPD.C:36
 rec-vtxSPD.C:37
 rec-vtxSPD.C:38
 rec-vtxSPD.C:39
 rec-vtxSPD.C:40
 rec-vtxSPD.C:41
 rec-vtxSPD.C:42
 rec-vtxSPD.C:43
 rec-vtxSPD.C:44
 rec-vtxSPD.C:45
 rec-vtxSPD.C:46
 rec-vtxSPD.C:47
 rec-vtxSPD.C:48
 rec-vtxSPD.C:49
 rec-vtxSPD.C:50
 rec-vtxSPD.C:51
 rec-vtxSPD.C:52
 rec-vtxSPD.C:53
 rec-vtxSPD.C:54
 rec-vtxSPD.C:55
 rec-vtxSPD.C:56
 rec-vtxSPD.C:57
 rec-vtxSPD.C:58
 rec-vtxSPD.C:59
 rec-vtxSPD.C:60
 rec-vtxSPD.C:61
 rec-vtxSPD.C:62
 rec-vtxSPD.C:63
 rec-vtxSPD.C:64
 rec-vtxSPD.C:65
 rec-vtxSPD.C:66
 rec-vtxSPD.C:67
 rec-vtxSPD.C:68
 rec-vtxSPD.C:69
 rec-vtxSPD.C:70
 rec-vtxSPD.C:71
 rec-vtxSPD.C:72
 rec-vtxSPD.C:73
 rec-vtxSPD.C:74
 rec-vtxSPD.C:75
 rec-vtxSPD.C:76
 rec-vtxSPD.C:77
 rec-vtxSPD.C:78
 rec-vtxSPD.C:79
 rec-vtxSPD.C:80
 rec-vtxSPD.C:81
 rec-vtxSPD.C:82
 rec-vtxSPD.C:83
 rec-vtxSPD.C:84
 rec-vtxSPD.C:85
 rec-vtxSPD.C:86
 rec-vtxSPD.C:87
 rec-vtxSPD.C:88
 rec-vtxSPD.C:89
 rec-vtxSPD.C:90
 rec-vtxSPD.C:91
 rec-vtxSPD.C:92
 rec-vtxSPD.C:93
 rec-vtxSPD.C:94
 rec-vtxSPD.C:95
 rec-vtxSPD.C:96
 rec-vtxSPD.C:97
 rec-vtxSPD.C:98
 rec-vtxSPD.C:99
 rec-vtxSPD.C:100
 rec-vtxSPD.C:101
 rec-vtxSPD.C:102
 rec-vtxSPD.C:103
 rec-vtxSPD.C:104
 rec-vtxSPD.C:105
 rec-vtxSPD.C:106