]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TPC/recTPC.C
prevent running if CDB snapshot setting failed
[u/mrichter/AliRoot.git] / TPC / recTPC.C
CommitLineData
a7a1dd76 1/// \file recTPC.C
2/// \brief Example macro for reconstruction of the TPC raw data
3///
4/// The path to the Calibration parameters is for the moment hard-wired in the code
5/// Taken from /afs
53cc7be4 6
f3895d52 7void recTPC(Int_t type, const char *filename="data.root")
53cc7be4 8{
194b0609 9 //
10 // Set path to calibration data
11 //
530474cc 12 // type variable = 0 - cosmic test
13 // = 1 - laser test
53cc7be4 14 AliCDBManager * man = AliCDBManager::Instance();
162637e4 15 man->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
9355efb7 16 //man->SetRun(0);
17 //man->SetSpecificStorage("TPC/*/*","local:///afs/cern.ch/user/m/mivanov/public/Calib");
194b0609 18 //
19 // Set reconstruction parameters
20 //
829455ad 21 AliLog::SetClassDebugLevel("AliTPCclusterer",2);
f5d176d8 22 AliTPCRecoParam * tpcRecoParam = 0;
4f543b2f 23 if (type==0) tpcRecoParam = AliTPCRecoParam::GetCosmicTestParam(kTRUE);
24 if (type>0) tpcRecoParam = AliTPCRecoParam::GetLaserTestParam(kTRUE);
25 tpcRecoParam->Dump();
194b0609 26 AliTPCReconstructor::SetRecoParam(tpcRecoParam);
27 AliTPCReconstructor::SetStreamLevel(1);
28 //
29 //
30 //
53cc7be4 31 AliReconstruction rec;
162637e4 32 rec.SetDefaultStorage("local://$ALICE_ROOT/OCDB");
cb83f73d 33 rec.SetSpecificStorage("TPC/*/*","local:///afs/cern.ch/user/m/mivanov/public/Calib");
53cc7be4 34 rec.SetLoadAlignData("");
35 rec.SetWriteESDfriend(kTRUE);
36 rec.SetInput(filename);
37 rec.SetEquipmentIdMap("EquipmentIdMap.data");
38 rec.SetRunReconstruction("TPC");
9a090ccd 39 rec.SetOption("TPC","PedestalSubtraction");
53cc7be4 40 // rec.SetRunLocalReconstruction("");
41 // rec.SetRunTracking("TPC");
42 rec.SetFillESD("TPC");
43 rec.SetFillTriggerESD(kFALSE);
44 rec.SetRunVertexFinder(kFALSE);
53cc7be4 45 rec.SetWriteAlignmentData(kTRUE);
46 rec.Run();
47}
48
9355efb7 49void recTracking(Int_t type, const char *filename="data.root")
53cc7be4 50{
194b0609 51 //
52 // Set path to calibration data
53 //
53cc7be4 54 AliCDBManager * man = AliCDBManager::Instance();
162637e4 55 man->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
53cc7be4 56 man->SetRun(0);
cb83f73d 57 man->SetSpecificStorage("TPC/*/*","local:///afs/cern.ch/user/m/mivanov/public/Calib");
194b0609 58 //
59 // Set reconstruction parameters
60 //
829455ad 61 AliLog::SetClassDebugLevel("AliTPCclusterer",2);
f5d176d8 62
63 AliTPCRecoParam * tpcRecoParam = 0;
4f543b2f 64 if (type==0) tpcRecoParam = AliTPCRecoParam::GetCosmicTestParam(kTRUE);
65 if (type>0) tpcRecoParam = AliTPCRecoParam::GetLaserTestParam(kTRUE);
530474cc 66
194b0609 67 AliTPCReconstructor::SetRecoParam(tpcRecoParam);
68 AliTPCReconstructor::SetStreamLevel(1);
69
70 //
71 //
72 //
53cc7be4 73 AliReconstruction rec;
cb83f73d 74 rec.SetSpecificStorage("TPC/*/*","local:///afs/cern.ch/user/m/mivanov/public/Calib");
53cc7be4 75 rec.SetLoadAlignData("");
76 rec.SetWriteESDfriend(kTRUE);
77 rec.SetInput(filename);
78 rec.SetEquipmentIdMap("EquipmentIdMap.data");
79 //rec.SetRunReconstruction("TPC");
9a090ccd 80 rec.SetOption("TPC","PedestalSubtraction");
53cc7be4 81 rec.SetRunLocalReconstruction("");
82 rec.SetRunTracking("TPC");
83 rec.SetFillESD("TPC");
84 rec.SetFillTriggerESD(kFALSE);
85 rec.SetRunVertexFinder(kFALSE);
53cc7be4 86 rec.SetWriteAlignmentData(kTRUE);
9355efb7 87 rec.Run(0);
53cc7be4 88}
89
90