ROOT logo
// $Id$
/**
 * @file split-hltout.C
 * @brief Example for the AliHLTOUTPublisherComponent
 *
 * Example macro to run a small chain with the AliHLTOUTPublisherComponent.
 * The AliHLTOUTPublisherComponent is a tool to publish data blocks from
 * the HLTOUT data stream into an AliHLT reconstruction chain.
 *
 * Usage: aliroot -b -q split-hltout.C | tee split-hltout.log
 *
 * The macro asumes HLTOUT raw data ddl files in order to open an
 * AliRawReaderFile, e.g. simulated by sim-hlt-rawddl.C. A small chain with
 * just a FileWriter connected is run embedded into AliReconstruction.
 *
 * \b Note: The example disables a few steps in the AliReconstruction,
 * mainly because of crashes in various parts of AliRoot. This does not
 * have any impact to the HLT features to be presented.
 *
 * @author Matthias.Richter@ift.uib.no
 * @ingroup alihlt_tutorial
 */
void split_hltout()
{
  /////////////////////////////////////////////////////////////////////////
  /////////////////////////////////////////////////////////////////////////
  //
  // setup of the HLT system
  AliHLTSystem* pHLT=AliHLTPluginBase::GetInstance();
  if (!pHLT) {
    cerr << "fatal error: can not get HLT instance" << endl;
  }

  /////////////////////////////////////////////////////////////////////////
  /////////////////////////////////////////////////////////////////////////
  //
  // the configuration chain
  TString arg;

  // the publisher configuration
  arg.Form("");
  AliHLTConfiguration publisher("hltout-publisher", "AliHLTOUTPublisher" , NULL, arg.Data());

  // the writer configuration
  arg.Form("-subdir=out%%d -datafile hltout.dat -specfmt=_0x%%x");
  // see AliHLTFileWriter
  AliHLTConfiguration fwconf("sink1", "FileWriter"   , "hltout-publisher", arg.Data());

  /////////////////////////////////////////////////////////////////////////
  /////////////////////////////////////////////////////////////////////////
  //
  // setup of the reconstruction
  AliReconstruction rec;
  rec.SetInput("./");
  rec.SetRunLocalReconstruction("HLT");
  rec.SetRunTracking("");
  rec.SetFillESD("");
  rec.SetRunQA(":");
  rec.SetFillTriggerESD(kFALSE);
  rec.SetRunVertexFinder(kFALSE);
  rec.SetOption("HLT", "libAliHLTUtil.so loglevel=0x7c chains=sink1");
  rec.Run();
}
 split-hltout.C:1
 split-hltout.C:2
 split-hltout.C:3
 split-hltout.C:4
 split-hltout.C:5
 split-hltout.C:6
 split-hltout.C:7
 split-hltout.C:8
 split-hltout.C:9
 split-hltout.C:10
 split-hltout.C:11
 split-hltout.C:12
 split-hltout.C:13
 split-hltout.C:14
 split-hltout.C:15
 split-hltout.C:16
 split-hltout.C:17
 split-hltout.C:18
 split-hltout.C:19
 split-hltout.C:20
 split-hltout.C:21
 split-hltout.C:22
 split-hltout.C:23
 split-hltout.C:24
 split-hltout.C:25
 split-hltout.C:26
 split-hltout.C:27
 split-hltout.C:28
 split-hltout.C:29
 split-hltout.C:30
 split-hltout.C:31
 split-hltout.C:32
 split-hltout.C:33
 split-hltout.C:34
 split-hltout.C:35
 split-hltout.C:36
 split-hltout.C:37
 split-hltout.C:38
 split-hltout.C:39
 split-hltout.C:40
 split-hltout.C:41
 split-hltout.C:42
 split-hltout.C:43
 split-hltout.C:44
 split-hltout.C:45
 split-hltout.C:46
 split-hltout.C:47
 split-hltout.C:48
 split-hltout.C:49
 split-hltout.C:50
 split-hltout.C:51
 split-hltout.C:52
 split-hltout.C:53
 split-hltout.C:54
 split-hltout.C:55
 split-hltout.C:56
 split-hltout.C:57
 split-hltout.C:58
 split-hltout.C:59
 split-hltout.C:60
 split-hltout.C:61
 split-hltout.C:62
 split-hltout.C:63
 split-hltout.C:64