ROOT logo
// $Id$
/**
 * @file raw-hlt-its.C
 * @brief HLT data replay in AliReconstruction
 *
 * <pre>
 * Usage: aliroot -b -q ra-hlt-it.C'("raw.root","cdburi", minevent, maxevent)'
 * Parameter:
 *     input     default 'raw.root'
 *     cdburi    default 'raw://'
 *     minevent  default 0  (no restriction)
 *     maxevent  default -1 (no restriction)
 *     usepredefined  default false
 * </pre>
 *
 * Replay of raw data through the ITS chain. The reduced configuration
 * consists of SPD clusterfinder, SPD vetexer and histogram component.
 * Histograms are written to file 'histos.root'.
 *
 * The predefined chain can be run by specifying the 'GLOBAL-vertexhisto'
 * configuration. In that case also TPC tracking, ITS tracking, generation
 * of ESD and GlobalVertexer are executed as input to the histogramming
 * component.
 *
 * @author Matthias.Richter@ift.uib.no
 * @ingroup alihlt_its
 */
void rec_its_raw(const char* input="raw.root", 
		 const char* cdburi="raw://",
		 int minevent=0, int maxevent=-1,
		 bool usepredefined=false)
{
  AliReconstruction rec;

  TString uri=cdburi;
  if (!uri.BeginsWith("local://")) {
    TGrid::Connect("alien");
  }
  rec.SetDefaultStorage(cdburi);
  rec.SetRunQA(":") ;

  // AliReconstruction settings
  rec.SetInput(input);
  rec.SetRunVertexFinder(kFALSE);
  rec.SetLoadAlignFromCDB(0);

  rec.SetRunReconstruction("HLT");

  if (minevent>=0 && maxevent>=minevent) {
    rec.SetEventRange(minevent, maxevent);
  }

  AliHLTSystem* pHLT=AliHLTPluginBase::GetInstance();

  if (!usepredefined) {
    // build up the chain only for the SPD CF and vertexer, including the histogramming
    AliHLTConfiguration vertexerSPD("vertexerSPD","ITSVertexerSPD", "ITS-SPD-CF","");
    AliHLTConfiguration vertexhisto("vertexhisto","GlobalVertexerHisto", "vertexerSPD","");

    AliHLTConfiguration filedump("file-dump","ROOTFileWriter", "vertexhisto vertexerSPD", "-datafile histos.root -concatenate-events -overwrite");
  } else {
    // use the default chain from the agents
    AliHLTConfiguration filedump("file-dump","ROOTFileWriter", "GLOBAL-vertexhisto", "-datafile histos.root -concatenate-events -overwrite");
  }

  rec.SetOption("HLT", "loglevel=0x7c ignore-hltout chains=file-dump");

  AliLog::Flush();
  rec.Run();
}
 rec-its-raw.C:1
 rec-its-raw.C:2
 rec-its-raw.C:3
 rec-its-raw.C:4
 rec-its-raw.C:5
 rec-its-raw.C:6
 rec-its-raw.C:7
 rec-its-raw.C:8
 rec-its-raw.C:9
 rec-its-raw.C:10
 rec-its-raw.C:11
 rec-its-raw.C:12
 rec-its-raw.C:13
 rec-its-raw.C:14
 rec-its-raw.C:15
 rec-its-raw.C:16
 rec-its-raw.C:17
 rec-its-raw.C:18
 rec-its-raw.C:19
 rec-its-raw.C:20
 rec-its-raw.C:21
 rec-its-raw.C:22
 rec-its-raw.C:23
 rec-its-raw.C:24
 rec-its-raw.C:25
 rec-its-raw.C:26
 rec-its-raw.C:27
 rec-its-raw.C:28
 rec-its-raw.C:29
 rec-its-raw.C:30
 rec-its-raw.C:31
 rec-its-raw.C:32
 rec-its-raw.C:33
 rec-its-raw.C:34
 rec-its-raw.C:35
 rec-its-raw.C:36
 rec-its-raw.C:37
 rec-its-raw.C:38
 rec-its-raw.C:39
 rec-its-raw.C:40
 rec-its-raw.C:41
 rec-its-raw.C:42
 rec-its-raw.C:43
 rec-its-raw.C:44
 rec-its-raw.C:45
 rec-its-raw.C:46
 rec-its-raw.C:47
 rec-its-raw.C:48
 rec-its-raw.C:49
 rec-its-raw.C:50
 rec-its-raw.C:51
 rec-its-raw.C:52
 rec-its-raw.C:53
 rec-its-raw.C:54
 rec-its-raw.C:55
 rec-its-raw.C:56
 rec-its-raw.C:57
 rec-its-raw.C:58
 rec-its-raw.C:59
 rec-its-raw.C:60
 rec-its-raw.C:61
 rec-its-raw.C:62
 rec-its-raw.C:63
 rec-its-raw.C:64
 rec-its-raw.C:65
 rec-its-raw.C:66
 rec-its-raw.C:67
 rec-its-raw.C:68
 rec-its-raw.C:69
 rec-its-raw.C:70
 rec-its-raw.C:71