ROOT logo


#include "AliHLTPHOSConstants.h"

//void rec_hlt_phos(const char* input="./")//, char* opt="decoder ESD")
void rec_hlt_phos()//, char* opt="decoder ESD")
{
  AliCDBManager::Instance()->SetDefaultStorage("raw://");
  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();
 
  ///////////////////////////////////////////////////////////////////////////////////////////////////
  //
  // define the analysis chain to be run
  //
   
  int moduleStart = 0;
  int moduleEnd = 4;
  int rcuStart = 0;
  int rcuEnd = 3;
  TString option="libAliHLTUtil.so libAliHLTRCU.so libAliHLTPHOS.so libAliHLTGlobal.so loglevel=0x7f chains=ESD-FILE";
  TString ecInput;
  TString emInput;
  
  for (int module = moduleStart; module <= moduleEnd; module++) 
    {
      TString clInput;
      
      for(int rcu = rcuStart; rcu <= rcuEnd; rcu++) 
	{
	  TString arg, publisher, ra, dm;
	  // raw data publisher components
	  publisher.Form("PHS-RP_%02d_%d", module, rcu);
	  arg.Form("-minid %d -datatype 'DDL_RAW ' 'PHOS'  -dataspec 0x%x ", 1792 + module*(PhosHLTConst::NRCUSPERMODULE) + rcu, 0x1 << (module*PhosHLTConst::NRCUSPERMODULE + rcu));
	  AliHLTConfiguration pubConf(publisher.Data(), "AliRawReaderPublisher", NULL , arg.Data());
	  
	  // Raw analyzer
	  arg = "";
	  ra.Form("PHS-RA_%02d_%d", module, rcu);
	  //	  AliHLTConfiguration rawConf(ra.Data(), "PhosRawCrudev2", publisher.Data(), arg.Data())
;	  AliHLTConfiguration rawConf(ra.Data(), "PhosRawCrudev2", publisher.Data(), arg.Data());
	  
	  // digit maker components
	  dm.Form("PHS-DM_%02d_%d", module, rcu);
	  arg="";
	  arg.Form("-sethighgainfactor 0.005 -setlowgainfactor 0.08 -setdigitthresholds 0.005 0.002");
	  AliHLTConfiguration dmConf(dm.Data(), "PhosDigitMaker", ra.Data(), arg.Data());

	  if(clInput.Length() > 0) clInput += " ";
	  clInput+=dm;
	}
        TString arg, cl, ca;

      cl.Form("PHS-CL_%02d", module);
      arg = "";
      arg.Form("-digitthreshold 0.005 -recpointthreshold 0.1 -modulemode");
      AliHLTConfiguration clConf(cl.Data(), "PhosClusterizer", clInput.Data(), arg.Data());
	
      ca.Form("PHS-CA_%02d", module);
      arg = "";
      AliHLTConfiguration caConf(ca.Data(), "PhosClusterAnalyser", cl.Data(), arg.Data());

      if(ecInput.Length() > 0) ecInput += " ";
      ecInput += ca;
    }
      
  emInput = ecInput;

  TString arg, ec, em, hp, ef;
  
  em.Form("ESD-MAKER");

  ec.Form("ESD-CONVERTER");
  arg = "";

  AliHLTConfiguration emConf(em.Data(), "PhosEsdEntriesMaker", ecInput.Data(), "");

  AliHLTConfiguration esdcconf(ec.Data(), "GlobalEsdConverter"   , ecInput.Data(), "");
  
  // the root file writer configuration
  ef.Form("ESD-FILE");
  AliHLTConfiguration sink(ef.Data(), "EsdCollector", ec.Data(), "-directory hlt-phos-esd");

  ///////////////////////////////////////////////////////////////////////////////////////////////////
  //
  // Init and run the reconstruction
  // All but HLT reconstructio is switched off 
  //
  AliReconstruction rec;
  //  rec.SetInput(input);
  rec.SetInput("./");
  rec.SetRunVertexFinder(kFALSE);
  rec.SetRunLocalReconstruction("HLT PHOS");
  rec.SetRunTracking(":");
  rec.SetLoadAlignFromCDB(0);
  rec.SetRunQA(":");

  // NOTE: FillESD is a step in the AliReconstruction sequence and has
  // nothing to do with the fact that this macro writes ESD output
  // HLT processes the HLTOUT during FillESD and extracts data which
  // has already been prepared. This step is currently not necessary for
  // this macro
  //  rec.SetRunLocalReconstruction("PHOS") ;

  rec.SetFillESD("PHOS");
  rec.SetOption("HLT", option);
  rec.Run();
}
 rec-hlt-phos.C:1
 rec-hlt-phos.C:2
 rec-hlt-phos.C:3
 rec-hlt-phos.C:4
 rec-hlt-phos.C:5
 rec-hlt-phos.C:6
 rec-hlt-phos.C:7
 rec-hlt-phos.C:8
 rec-hlt-phos.C:9
 rec-hlt-phos.C:10
 rec-hlt-phos.C:11
 rec-hlt-phos.C:12
 rec-hlt-phos.C:13
 rec-hlt-phos.C:14
 rec-hlt-phos.C:15
 rec-hlt-phos.C:16
 rec-hlt-phos.C:17
 rec-hlt-phos.C:18
 rec-hlt-phos.C:19
 rec-hlt-phos.C:20
 rec-hlt-phos.C:21
 rec-hlt-phos.C:22
 rec-hlt-phos.C:23
 rec-hlt-phos.C:24
 rec-hlt-phos.C:25
 rec-hlt-phos.C:26
 rec-hlt-phos.C:27
 rec-hlt-phos.C:28
 rec-hlt-phos.C:29
 rec-hlt-phos.C:30
 rec-hlt-phos.C:31
 rec-hlt-phos.C:32
 rec-hlt-phos.C:33
 rec-hlt-phos.C:34
 rec-hlt-phos.C:35
 rec-hlt-phos.C:36
 rec-hlt-phos.C:37
 rec-hlt-phos.C:38
 rec-hlt-phos.C:39
 rec-hlt-phos.C:40
 rec-hlt-phos.C:41
 rec-hlt-phos.C:42
 rec-hlt-phos.C:43
 rec-hlt-phos.C:44
 rec-hlt-phos.C:45
 rec-hlt-phos.C:46
 rec-hlt-phos.C:47
 rec-hlt-phos.C:48
 rec-hlt-phos.C:49
 rec-hlt-phos.C:50
 rec-hlt-phos.C:51
 rec-hlt-phos.C:52
 rec-hlt-phos.C:53
 rec-hlt-phos.C:54
 rec-hlt-phos.C:55
 rec-hlt-phos.C:56
 rec-hlt-phos.C:57
 rec-hlt-phos.C:58
 rec-hlt-phos.C:59
 rec-hlt-phos.C:60
 rec-hlt-phos.C:61
 rec-hlt-phos.C:62
 rec-hlt-phos.C:63
 rec-hlt-phos.C:64
 rec-hlt-phos.C:65
 rec-hlt-phos.C:66
 rec-hlt-phos.C:67
 rec-hlt-phos.C:68
 rec-hlt-phos.C:69
 rec-hlt-phos.C:70
 rec-hlt-phos.C:71
 rec-hlt-phos.C:72
 rec-hlt-phos.C:73
 rec-hlt-phos.C:74
 rec-hlt-phos.C:75
 rec-hlt-phos.C:76
 rec-hlt-phos.C:77
 rec-hlt-phos.C:78
 rec-hlt-phos.C:79
 rec-hlt-phos.C:80
 rec-hlt-phos.C:81
 rec-hlt-phos.C:82
 rec-hlt-phos.C:83
 rec-hlt-phos.C:84
 rec-hlt-phos.C:85
 rec-hlt-phos.C:86
 rec-hlt-phos.C:87
 rec-hlt-phos.C:88
 rec-hlt-phos.C:89
 rec-hlt-phos.C:90
 rec-hlt-phos.C:91
 rec-hlt-phos.C:92
 rec-hlt-phos.C:93
 rec-hlt-phos.C:94
 rec-hlt-phos.C:95
 rec-hlt-phos.C:96
 rec-hlt-phos.C:97
 rec-hlt-phos.C:98
 rec-hlt-phos.C:99
 rec-hlt-phos.C:100
 rec-hlt-phos.C:101
 rec-hlt-phos.C:102
 rec-hlt-phos.C:103
 rec-hlt-phos.C:104
 rec-hlt-phos.C:105
 rec-hlt-phos.C:106
 rec-hlt-phos.C:107
 rec-hlt-phos.C:108
 rec-hlt-phos.C:109
 rec-hlt-phos.C:110
 rec-hlt-phos.C:111
 rec-hlt-phos.C:112
 rec-hlt-phos.C:113
 rec-hlt-phos.C:114
 rec-hlt-phos.C:115
 rec-hlt-phos.C:116
 rec-hlt-phos.C:117
 rec-hlt-phos.C:118
 rec-hlt-phos.C:119
 rec-hlt-phos.C:120
 rec-hlt-phos.C:121
 rec-hlt-phos.C:122