ROOT logo
// $Id$

/**************************************************************************
 * This file is property of and copyright by the ALICE HLT Project        * 
 * ALICE Experiment at CERN, All rights reserved.                         *
 *                                                                        *
 * Primary Authors: Matthias Richter <Matthias.Richter@ift.uib.no>        *
 *                  for The ALICE HLT Project.                            *
 *                                                                        *
 * 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.                  *
 **************************************************************************/

/** @file   testAliHLTRootSchemaEvolutionComponent.C
    @author Matthias Richter
    @date   
    @brief  Test macro/program for the AliHLTRootSchemaEvolutionComponent
 */
int testAliHLTRootSchemaEvolutionComponent(const char* rawfile, int firstevent=0, int lastevent=-1) 
{
  AliRawReader* rawreader=AliRawReader::Create(rawfile);
  if (!rawreader) {
    cerr << "error: can not open raw file " << rawfile << endl;
    return -1;
  }

  AliHLTSystem* pHLT=AliHLTPluginBase::GetInstance();
  pHLT->SetGlobalLoggingLevel(kHLTLogAll);
  pHLT->LoadComponentLibraries("libAliHLTUtil.so");

  AliHLTConfiguration publisher("hltout-publisher", "AliHLTOUTPublisher" , NULL, "");
  AliHLTConfiguration esdfilter("esdfilter", "BlockFilter" , "hltout-publisher", "-datatype ALIESDV0 'HLT ' -prescalar 2 -skip-events 3");  
  AliHLTConfiguration objfilter("objfilter", "BlockFilter" , "hltout-publisher", "-datatype ROOTTOBJ 'HLT '");  
  AliHLTConfiguration streamerinfo("streamerinfo", "ROOTSchemaEvolutionComponent" , "esdfilter objfilter", "");
  AliHLTConfiguration writer("writer", "FileWriter" , "streamerinfo", "-write-all-events -directory streamerinfo");

  pHLT->BuildTaskList("writer");
  AliHLTOfflineInterface::SetParamsToComponents(NULL, rawreader);

  if (!rawreader->GotoEvent(firstevent)) {
    cerr << "error: can not access event " << firstevent << endl;
    return 0;
  }
  int event=firstevent;
  do {
    pHLT->Run(1,0);
  } while ((++event<=lastevent || lastevent<0) && rawreader->NextEvent());
  pHLT->Run(-1);
}
 testAliHLTRootSchemaEvolutionComponent.C:1
 testAliHLTRootSchemaEvolutionComponent.C:2
 testAliHLTRootSchemaEvolutionComponent.C:3
 testAliHLTRootSchemaEvolutionComponent.C:4
 testAliHLTRootSchemaEvolutionComponent.C:5
 testAliHLTRootSchemaEvolutionComponent.C:6
 testAliHLTRootSchemaEvolutionComponent.C:7
 testAliHLTRootSchemaEvolutionComponent.C:8
 testAliHLTRootSchemaEvolutionComponent.C:9
 testAliHLTRootSchemaEvolutionComponent.C:10
 testAliHLTRootSchemaEvolutionComponent.C:11
 testAliHLTRootSchemaEvolutionComponent.C:12
 testAliHLTRootSchemaEvolutionComponent.C:13
 testAliHLTRootSchemaEvolutionComponent.C:14
 testAliHLTRootSchemaEvolutionComponent.C:15
 testAliHLTRootSchemaEvolutionComponent.C:16
 testAliHLTRootSchemaEvolutionComponent.C:17
 testAliHLTRootSchemaEvolutionComponent.C:18
 testAliHLTRootSchemaEvolutionComponent.C:19
 testAliHLTRootSchemaEvolutionComponent.C:20
 testAliHLTRootSchemaEvolutionComponent.C:21
 testAliHLTRootSchemaEvolutionComponent.C:22
 testAliHLTRootSchemaEvolutionComponent.C:23
 testAliHLTRootSchemaEvolutionComponent.C:24
 testAliHLTRootSchemaEvolutionComponent.C:25
 testAliHLTRootSchemaEvolutionComponent.C:26
 testAliHLTRootSchemaEvolutionComponent.C:27
 testAliHLTRootSchemaEvolutionComponent.C:28
 testAliHLTRootSchemaEvolutionComponent.C:29
 testAliHLTRootSchemaEvolutionComponent.C:30
 testAliHLTRootSchemaEvolutionComponent.C:31
 testAliHLTRootSchemaEvolutionComponent.C:32
 testAliHLTRootSchemaEvolutionComponent.C:33
 testAliHLTRootSchemaEvolutionComponent.C:34
 testAliHLTRootSchemaEvolutionComponent.C:35
 testAliHLTRootSchemaEvolutionComponent.C:36
 testAliHLTRootSchemaEvolutionComponent.C:37
 testAliHLTRootSchemaEvolutionComponent.C:38
 testAliHLTRootSchemaEvolutionComponent.C:39
 testAliHLTRootSchemaEvolutionComponent.C:40
 testAliHLTRootSchemaEvolutionComponent.C:41
 testAliHLTRootSchemaEvolutionComponent.C:42
 testAliHLTRootSchemaEvolutionComponent.C:43
 testAliHLTRootSchemaEvolutionComponent.C:44
 testAliHLTRootSchemaEvolutionComponent.C:45
 testAliHLTRootSchemaEvolutionComponent.C:46
 testAliHLTRootSchemaEvolutionComponent.C:47
 testAliHLTRootSchemaEvolutionComponent.C:48
 testAliHLTRootSchemaEvolutionComponent.C:49
 testAliHLTRootSchemaEvolutionComponent.C:50
 testAliHLTRootSchemaEvolutionComponent.C:51
 testAliHLTRootSchemaEvolutionComponent.C:52
 testAliHLTRootSchemaEvolutionComponent.C:53
 testAliHLTRootSchemaEvolutionComponent.C:54
 testAliHLTRootSchemaEvolutionComponent.C:55