]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/PHOS/macros/rec-hlt-calo-phos.C
ec376efcffbbb5a37ea4fc6c8775a2a24c4d53bd
[u/mrichter/AliRoot.git] / HLT / PHOS / macros / rec-hlt-calo-phos.C
1
2 //#include "AliHLTPHOSConstants.h"
3
4 //void rec_hlt_phos(const char* input="./")//, char* opt="decoder ESD")
5 void rec_hlt_phos()//, char* opt="decoder ESD")
6 {
7   //  AliCDBManager::Instance()->SetDefaultStorage("raw://");
8   //  AliCDBManager::Instance()->SetDefaultStorage("raw://");
9  
10   
11   if(!gSystem->AccessPathName("galice.root")){
12     cerr << "please delete the galice.root or run at different place." << endl;
13     return;
14   }
15  
16 //   if (!input) {
17 //     cerr << "please specify input or run without arguments" << endl;
18 //     return;
19 //   }
20
21   ///////////////////////////////////////////////////////////////////////////////////////////////////
22   //
23   // init the HLT system in order to define the analysis chain below
24   //
25   AliHLTSystem* gHLT=AliHLTPluginBase::GetInstance();
26  
27   ///////////////////////////////////////////////////////////////////////////////////////////////////
28   //
29   // define the analysis chain to be run
30   //
31   int moduleStart = 2;
32   int moduleEnd = 2;
33   int rcuStart = 1;
34   int rcuEnd = 1;
35   //  TString option="libAliHLTUtil.so libAliHLTRCU.so libAliHLTPHOS.so libAliHLTGlobal.so loglevel=0x7f chains=ESD-FILE";
36   //TString option="libAliHLTUtil.so libAliHLTRCU.so libAliHLTPHOS.so libAliHLTGlobal.so loglevel=0x7f chains=PHS-CA_02";
37   TString option="libAliHLTUtil.so libAliHLTRCU.so libAliHLTCalo.so libAliHLTPHOS.so libAliHLTGlobal.so loglevel=0x7f chains=PHS-DM_02_1";
38   TString ecInput;
39   TString emInput;
40   
41   for (int module = moduleStart; module <= moduleEnd; module++) 
42     {
43       TString clInput;
44       
45       for(int rcu = rcuStart; rcu <= rcuEnd; rcu++) 
46         {
47           TString arg, publisher, ra, dm;
48           // raw data publisher components
49           publisher.Form("PHS-RP_%02d_%d", module, rcu);
50           arg.Form("-minid %d -datatype 'DDL_RAW ' 'PHOS'  -dataspec 0x%x ", 1792 + module*(4) + rcu, 0x1 << (module*4 + rcu));
51           AliHLTConfiguration pubConf(publisher.Data(), "AliRawReaderPublisher", NULL , arg.Data());
52           
53           // Raw analyzer
54           arg = "";
55           ra.Form("PHS-RA_%02d_%d", module, rcu);
56           //      AliHLTConfiguration rawConf(ra.Data(), "PhosRawCrudev2", publisher.Data(), arg.Data());
57           AliHLTConfiguration rawConf(ra.Data(), "PhosRawCrude", publisher.Data(), arg.Data());
58           
59           // digit maker components
60           dm.Form("PHS-DM_%02d_%d", module, rcu);
61           arg="";
62           arg.Form("-sethighgainfactor 0.005 -setlowgainfactor 0.08 -setdigitthresholds 0.005 0.002");
63           AliHLTConfiguration dmConf(dm.Data(), "PhosDigitMaker", ra.Data(), arg.Data());
64
65           if(clInput.Length() > 0) clInput += " ";
66           clInput+=dm;
67         }
68         TString arg, cl, ca;
69
70 //       cl.Form("PHS-CL_%02d", module);
71 //       arg = "";
72 //       arg.Form("-digitthreshold 0.005 -recpointthreshold 0.1 -modulemode");
73 //       AliHLTConfiguration clConf(cl.Data(), "PhosClusterizer", clInput.Data(), arg.Data());
74 //      
75 //       ca.Form("PHS-CA_%02d", module);
76 //       arg = "";
77 //       AliHLTConfiguration caConf(ca.Data(), "PhosClusterAnalyser", cl.Data(), arg.Data());
78
79       if(ecInput.Length() > 0) ecInput += " ";
80       ecInput += ca;
81     }
82       
83   emInput = ecInput;
84
85   TString arg, ec, em, hp, ef;
86   
87
88 //   ec.Form("ESD-CONVERTER");
89 //   arg = "";
90 // 
91 //   //  AliHLTConfiguration emConf(em.Data(), "PhosEsdEntriesMaker", ecInput.Data(), "");
92 // 
93 //   AliHLTConfiguration esdcconf(ec.Data(), "GlobalEsdConverter"   , ecInput.Data(), "");
94 //   
95 //   // the root file writer configuration
96 //   ef.Form("ESD-FILE");
97 //   AliHLTConfiguration sink(ef.Data(), "EsdCollector", ec.Data(), "-directory hlt-phos-esd");
98 // 
99
100   ///////////////////////////////////////////////////////////////////////////////////////////////////
101   //
102   // Init and run the reconstruction
103   // All but HLT reconstructio is switched off 
104   //
105   AliReconstruction rec;
106   //  rec.SetInput(input);
107   rec.SetInput("./");
108   rec.SetRunVertexFinder(kFALSE);
109   rec.SetRunReconstruction("HLT");
110   rec.SetRunTracking(":");
111   rec.SetLoadAlignFromCDB(0);
112   rec.SetRunQA(":");
113
114   // NOTE: FillESD is a step in the AliReconstruction sequence and has
115   // nothing to do with the fact that this macro writes ESD output
116   // HLT processes the HLTOUT during FillESD and extracts data which
117   // has already been prepared. This step is currently not necessary for
118   // this macro
119   //  rec.SetRunLocalReconstruction("PHOS") ;
120     rec.SetOption("HLT", option);
121   //  rec.SetOption("HLT", "libAliHLTUtil.so libAliHLTRCU.so libAliHLTPHOS.so loglevel=0x7f chains=ESD_WRITER" )
122     rec.SetSpecificStorage("GRP/GRP/Data", Form("local://%s", gSystem->pwd()));
123   rec.Run();
124 }