ROOT logo
// $Id$
/**
 * @file sim-hlt-rawddl.C
 * @brief Publishing of RAW DDL data into the HLTOUT.
 *
 * Example macro to produce ddl raw data blocks in the HLTOUT. The HLT
 * chain is run embedded into AliRoot simulation. 
 *
 * The example publishes the ITSSDD data into the HLTOUT according to
 * the configuration in the conf-hlt-rawddl.C macro. The normal digit
 * to raw conversion is used to have the raw data available.
 * \b Note: if you want to change this example for another detector,
 * you need to change the detector in both this macro and the
 * configuration.
 *
 * Usage: aliroot -b -q sim-hlt-rawddl.C | tee sim-hlt-rawddl.log
 *
 * The chain to be run is defined by the macro given to the parameter
 * 'config='
 *
 * The macro assumes the data to be already simulated. If it should run
 * within the initial simulation, comment the corresponding functions
 * below (SetRunGeneration etc.)
 *
 * @author Matthias.Richter@ift.uib.no
 * @ingroup alihlt_tutorial
 */
void sim_hlt_rawddl() {  

  AliSimulation sim;

  // switch of simulation and data generation
  // comment all that stuff to also simulate the events and data
  sim.SetRunGeneration(kFALSE);
  sim.SetMakeDigits("");
  sim.SetMakeSDigits("");
  sim.SetMakeDigitsFromHits("");
  sim.SetMakeTrigger("");

  // write the raw data for the ITS since we want to publish those
  // write HLT raw data since we want to replace the original	
  // detector data from the HLTOUT
  sim.SetWriteRawData("HLT");
  
  // the normal simulation sets the specific storage for the GRP entry
  if (gSystem->AccessPathName("GRP/GRP/Data")) {
    cerr << "*********************************************************" << endl;
    cerr << "error: no GRP entry found in the currect directory, simulation might be incomplete. Skip setting specific storage for GRP entry" << endl;
    cerr << "*********************************************************" << endl << endl;
  } else {
    sim.SetSpecificStorage("GRP/GRP/Data", Form("local://%s",gSystem->pwd()));
  }
  
  // set the options for the HLT simulation:
  // libAliHLTUtil.so libAliHLTSample.so
  //     loads the specified libraries since the HLT chain will use components
  //     from those two
  // loglevel=
  //     the internal logging level in the HLT, use 0x7c for higher verbosity
  // config=<file>
  //     the configuration to be run
  // chains=<chain>
  //     run the specified chains, defined in the configuration macro
  // rawfile=<path>
  //     in this case we want to just forward the DDL data blocks
  //     to the HLTOUT. We need to set the location of the formerly generated
  //     rawfiles with the rawfile
 
  sim.SetRunHLT("libAliHLTUtil.so libAliHLTSample.so loglevel=0x7c rawfile=./ config=$ALICE_ROOT/HLT/exa/conf-hlt-rawddl.C chains=publisher");
  sim.Run();
}
 sim-hlt-rawddl.C:1
 sim-hlt-rawddl.C:2
 sim-hlt-rawddl.C:3
 sim-hlt-rawddl.C:4
 sim-hlt-rawddl.C:5
 sim-hlt-rawddl.C:6
 sim-hlt-rawddl.C:7
 sim-hlt-rawddl.C:8
 sim-hlt-rawddl.C:9
 sim-hlt-rawddl.C:10
 sim-hlt-rawddl.C:11
 sim-hlt-rawddl.C:12
 sim-hlt-rawddl.C:13
 sim-hlt-rawddl.C:14
 sim-hlt-rawddl.C:15
 sim-hlt-rawddl.C:16
 sim-hlt-rawddl.C:17
 sim-hlt-rawddl.C:18
 sim-hlt-rawddl.C:19
 sim-hlt-rawddl.C:20
 sim-hlt-rawddl.C:21
 sim-hlt-rawddl.C:22
 sim-hlt-rawddl.C:23
 sim-hlt-rawddl.C:24
 sim-hlt-rawddl.C:25
 sim-hlt-rawddl.C:26
 sim-hlt-rawddl.C:27
 sim-hlt-rawddl.C:28
 sim-hlt-rawddl.C:29
 sim-hlt-rawddl.C:30
 sim-hlt-rawddl.C:31
 sim-hlt-rawddl.C:32
 sim-hlt-rawddl.C:33
 sim-hlt-rawddl.C:34
 sim-hlt-rawddl.C:35
 sim-hlt-rawddl.C:36
 sim-hlt-rawddl.C:37
 sim-hlt-rawddl.C:38
 sim-hlt-rawddl.C:39
 sim-hlt-rawddl.C:40
 sim-hlt-rawddl.C:41
 sim-hlt-rawddl.C:42
 sim-hlt-rawddl.C:43
 sim-hlt-rawddl.C:44
 sim-hlt-rawddl.C:45
 sim-hlt-rawddl.C:46
 sim-hlt-rawddl.C:47
 sim-hlt-rawddl.C:48
 sim-hlt-rawddl.C:49
 sim-hlt-rawddl.C:50
 sim-hlt-rawddl.C:51
 sim-hlt-rawddl.C:52
 sim-hlt-rawddl.C:53
 sim-hlt-rawddl.C:54
 sim-hlt-rawddl.C:55
 sim-hlt-rawddl.C:56
 sim-hlt-rawddl.C:57
 sim-hlt-rawddl.C:58
 sim-hlt-rawddl.C:59
 sim-hlt-rawddl.C:60
 sim-hlt-rawddl.C:61
 sim-hlt-rawddl.C:62
 sim-hlt-rawddl.C:63
 sim-hlt-rawddl.C:64
 sim-hlt-rawddl.C:65
 sim-hlt-rawddl.C:66
 sim-hlt-rawddl.C:67
 sim-hlt-rawddl.C:68
 sim-hlt-rawddl.C:69
 sim-hlt-rawddl.C:70
 sim-hlt-rawddl.C:71
 sim-hlt-rawddl.C:72