]>
Commit | Line | Data |
---|---|---|
596a855f | 1 | #ifndef ALIRECONSTRUCTION_H |
2 | #define ALIRECONSTRUCTION_H | |
3 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
4 | * See cxx source for full Copyright notice */ | |
5 | ||
6 | /* $Id$ */ | |
7 | ||
8 | #include <TNamed.h> | |
9 | #include <TString.h> | |
59697224 | 10 | #include <TObjArray.h> |
c757bafd | 11 | #include "AliReconstructor.h" |
12 | #include "AliDetector.h" | |
596a855f | 13 | |
14 | class AliRunLoader; | |
15 | class AliLoader; | |
2257f27e | 16 | class AliVertexer; |
596a855f | 17 | class AliTracker; |
18 | class AliESD; | |
e583c30d | 19 | class TFile; |
596a855f | 20 | |
21 | ||
22 | class AliReconstruction: public TNamed { | |
23 | public: | |
e583c30d | 24 | AliReconstruction(const char* gAliceFilename = "galice.root", |
25 | const char* name = "AliReconstruction", | |
596a855f | 26 | const char* title = "reconstruction"); |
27 | AliReconstruction(const AliReconstruction& rec); | |
28 | AliReconstruction& operator = (const AliReconstruction& rec); | |
29 | virtual ~AliReconstruction(); | |
30 | ||
31 | void SetGAliceFile(const char* fileName); | |
32 | ||
59697224 | 33 | void SetRunLocalReconstruction(const char* detectors) { |
34 | fRunLocalReconstruction = detectors;}; | |
2257f27e | 35 | void SetRunVertexFinder(Bool_t run) {fRunVertexFinder = run;}; |
596a855f | 36 | void SetRunTracking(Bool_t run) {fRunTracking = run;}; |
37 | void SetFillESD(const char* detectors) {fFillESD = detectors;}; | |
38 | ||
24f7a148 | 39 | void SetStopOnError(Bool_t stopOnError) |
40 | {fStopOnError = stopOnError;} | |
41 | void SetCheckPointLevel(Int_t checkPointLevel) | |
42 | {fCheckPointLevel = checkPointLevel;} | |
43 | ||
596a855f | 44 | virtual Bool_t Run(); |
45 | ||
46 | private: | |
c757bafd | 47 | class AliDummyReconstructor: public AliReconstructor { |
48 | public: | |
49 | AliDummyReconstructor(AliDetector* detector) {fDetector = detector;}; | |
50 | virtual ~AliDummyReconstructor() {}; | |
51 | ||
52 | virtual void Reconstruct(AliRunLoader* /*runLoader*/) const | |
53 | {fDetector->Reconstruct();}; | |
54 | virtual AliVertexer* CreateVertexer(AliRunLoader* /*runLoader*/) const | |
55 | {return fDetector->CreateVertexer();} | |
56 | virtual AliTracker* CreateTracker(AliRunLoader* /*runLoader*/) const | |
57 | {return fDetector->CreateTracker();} | |
58 | virtual void FillESD(AliRunLoader* /*runLoader*/, AliESD* esd) const | |
59 | {fDetector->FillESD(esd);}; | |
60 | ||
61 | virtual const char* GetDetectorName() const | |
62 | {return fDetector->GetName();}; | |
63 | private: | |
64 | AliDetector* fDetector; // detector object | |
65 | }; | |
66 | ||
59697224 | 67 | Bool_t RunLocalReconstruction(const TString& detectors); |
2257f27e | 68 | Bool_t RunVertexFinder(AliESD*& esd); |
24f7a148 | 69 | Bool_t RunTracking(AliESD*& esd); |
70 | Bool_t FillESD(AliESD*& esd, const TString& detectors); | |
596a855f | 71 | |
e583c30d | 72 | Bool_t IsSelected(TString detName, TString& detectors) const; |
c757bafd | 73 | AliReconstructor* GetReconstructor(const char* detName) const; |
2257f27e | 74 | Bool_t CreateVertexer(); |
24f7a148 | 75 | Bool_t CreateTrackers(); |
e583c30d | 76 | void CleanUp(TFile* file = NULL); |
77 | ||
24f7a148 | 78 | Bool_t ReadESD(AliESD*& esd, const char* recStep) const; |
79 | void WriteESD(AliESD* esd, const char* recStep) const; | |
80 | ||
59697224 | 81 | TString fRunLocalReconstruction; // run the local reconstruction for these detectors |
2257f27e | 82 | Bool_t fRunVertexFinder; // run the vertex finder |
596a855f | 83 | Bool_t fRunTracking; // run the barrel tracking |
84 | TString fFillESD; // fill ESD for these detectors | |
596a855f | 85 | TString fGAliceFileName; // name of the galice file |
e583c30d | 86 | Bool_t fStopOnError; // stop or continue on errors |
24f7a148 | 87 | Int_t fCheckPointLevel; // level of ESD check points |
596a855f | 88 | |
89 | AliRunLoader* fRunLoader; //! current run loader object | |
90 | AliLoader* fITSLoader; //! loader for ITS | |
2257f27e | 91 | AliVertexer* fITSVertexer; //! vertexer for ITS |
596a855f | 92 | AliTracker* fITSTracker; //! tracker for ITS |
93 | AliLoader* fTPCLoader; //! loader for TPC | |
94 | AliTracker* fTPCTracker; //! tracker for TPC | |
95 | AliLoader* fTRDLoader; //! loader for TRD | |
96 | AliTracker* fTRDTracker; //! tracker for TRD | |
97 | AliLoader* fTOFLoader; //! loader for TOF | |
98 | AliTracker* fTOFTracker; //! tracker for TOF | |
99 | ||
c757bafd | 100 | static const Int_t fgkNDetectors = 14; //! number of detectors |
101 | static const char* fgkDetectorName[fgkNDetectors]; //! names of detectors | |
59697224 | 102 | TObjArray fReconstructors; //! array of reconstructor objects |
103 | ||
596a855f | 104 | ClassDef(AliReconstruction, 1) // class for running the reconstruction |
105 | }; | |
106 | ||
107 | #endif |