]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGPP/CalibMacros/CPass0/recCPass0.C
Merge branch 'master' into TPCdev
[u/mrichter/AliRoot.git] / PWGPP / CalibMacros / CPass0 / recCPass0.C
1 /*
2    rec.C to be used for pass0
3    - reconstruction of raw data
4    - QA information switched off
5    - store all friends
6    - default OCDB storage set to "raw://"
7
8    Example:
9    aliroot -b -q 'recCPass0.C("raw.root",100)'
10 */
11
12 void recCPass0(const char *filename="raw.root",Int_t nevents=-1, const char *ocdb="raw://", const char* options="?Trigger=kCalibBarrel")
13 {
14
15   if (gSystem->Getenv("ALIROOT_FORCE_COREDUMP"))
16   {
17     printf("ALIROOT_FORCE_COREDUMP set\n");
18     gSystem->ResetSignal(kSigFloatingException);
19     gSystem->ResetSignal(kSigSegmentationViolation);
20   }
21
22   // Load some system libs for Grid and monitoring
23   // Set the CDB storage location
24   AliCDBManager * man = AliCDBManager::Instance();
25   man->SetDefaultStorage(ocdb);
26   // Reconstruction settings
27   AliReconstruction rec;
28   // Upload CDB entries from the snapshot (local root file) if snapshot exist
29   if (gSystem->AccessPathName("OCDB.root", kFileExists)==0) {        
30     rec.SetCDBSnapshotMode("OCDB.root");
31   }
32
33   if (gSystem->AccessPathName("localOCDBaccessConfig.C", kFileExists)==0) {        
34     gROOT->LoadMacro("localOCDBaccessConfig.C");
35     localOCDBaccessConfig();
36   }
37
38   // All friends
39   rec.SetFractionFriends(2.0);
40
41  // AliReconstruction settings - hardwired MB trigger for calibration
42
43   TString newfilename = filename;
44   newfilename += options;
45   rec.SetInput(newfilename.Data());
46
47   // Set protection against too many events in a chunk (should not happen)
48   if (nevents>0) rec.SetEventRange(0,nevents);
49
50   // Remove recpoints after each event
51   rec.SetDeleteRecPoints("TPC TRD ITS"); 
52   //
53
54
55   // Switch off the V0 finder - saves time!
56   //  rec.SetRunMultFinder(kFALSE);
57   rec.SetRunV0Finder(kFALSE); 
58
59   //
60   // QA options - all QA is off
61   //
62   rec.SetRunQA(":");
63   rec.SetRunGlobalQA(kFALSE);
64
65   // AliReconstruction settings
66   rec.SetWriteESDfriend(kTRUE);
67   rec.SetWriteAlignmentData();
68   rec.SetUseTrackingErrorsForAlignment("ITS");
69   rec.SetRunReconstruction("ALL");
70   rec.SetFillESD("ALL");
71   rec.SetCleanESD(kFALSE);
72
73   //Ignore SetStopOnError
74   rec.SetStopOnError(kFALSE);
75
76   AliLog::Flush();
77   rec.Run();
78 }
79