]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/MUON/src/AliRoot/MicrodHLT.hpp
Coding conventions
[u/mrichter/AliRoot.git] / HLT / MUON / src / AliRoot / MicrodHLT.hpp
1 ////////////////////////////////////////////////////////////////////////////////
2 //
3 // Author: Artur Szostak
4 // Email:  artur@alice.phy.uct.ac.za | artursz@iafrica.com
5 //
6 ////////////////////////////////////////////////////////////////////////////////
7
8 /* AliHLTMUONMicrodHLT is a minimalist framework for the dHLT tracking algorithm
9    to run in. It integrates all the internal components to execute the algorithm
10    properly.
11    To run the dHLT with the default Manso algorithm one performs the following
12    steps (Assuming we have an initialise AliMUONDataInterface object called
13    data):
14
15      // Create a trigger source for the track seeds and populate it with data.
16      AliHLTMUONTriggerSource ts(data);
17      // We also need the cluster points.
18      AliHLTMUONClusterSource cs(data);
19      // Need a track sink to store the output data.
20      AliHLTMUONTrackSink output;
21
22      // Now we need the framework created and hook up the input and output.
23      AliHLTMUONMicrodHLT dhlt;
24      dhlt.SetTriggerSource(&ts);
25      dhlt.SetClusterSource(&ts);
26      dhlt.SetTrackSink(&output);
27
28      // And finally run the algorithm.
29      dhlt.Run();
30  */
31
32 #ifndef ALIHLTMUONMICRODHLT_H
33 #define ALIHLTMUONMICRODHLT_H
34
35 #include "TROOT.h"
36 #include "TObject.h"
37 #include "TString.h"
38 #include "AliRoot/TriggerSource.hpp"
39 #include "AliRoot/ClusterSource.hpp"
40 #include "AliRoot/TrackSink.hpp"
41 #include "AliRoot/TrackerCallback.hpp"
42
43
44 class AliHLTMUONDummyClusterFinder;
45 class AliHLTMUONClusterFinderInterface;
46 class AliHLTMUONDummyTracker;
47 class AliHLTMUONTrackerInterface;
48
49
50 /* Routines for getting dHLT version information.
51 */
52 TString AliHLTMUONVersion();
53 UInt_t AliHLTMUONMajorVersion();
54 UInt_t AliHLTMUONMinorVersion();
55 UInt_t AliHLTMUONBuildNumber();
56
57
58 class AliHLTMUONMicrodHLT : public TObject
59 {
60 public:
61
62         AliHLTMUONMicrodHLT();
63         virtual ~AliHLTMUONMicrodHLT();
64
65         /* Get/Set methods for the trigger data source.
66            Note: The source object must be cleaned up by the caller.
67          */
68         void SetTriggerSource(const AliHLTMUONTriggerSource* source);
69         const AliHLTMUONTriggerSource* GetTriggerSource() const { return fTriggerSource; };
70         
71         /* Get/Set methods for the cluster data source.
72            Note: The source object must be cleaned up by the caller.
73          */
74         void SetClusterSource(const AliHLTMUONClusterSource* source);
75         const AliHLTMUONClusterSource* GetClusterSource() const { return fClusterSource; };
76         
77         /* Get/Set methods for the track data sink (output target).
78            Note: The output object must be cleaned up by the caller.
79          */
80         void SetTrackSink(AliHLTMUONTrackSink* sink)    { fTrackSink = sink; };
81         const AliHLTMUONTrackSink* GetTrackSink() const { return fTrackSink; };
82         
83         /* Get/Set methods for the cluster finder interface.
84            Note: The cluster finder object must be cleaned up by the caller.
85            This field is optional. Use it if a custom cluster finder should be used.
86          */
87         void SetClusterFinder(AliHLTMUONClusterFinderInterface* clusterfinder)
88         {
89                 fClusterFinder = clusterfinder;
90         }
91
92         const AliHLTMUONClusterFinderInterface* GetClusterFinder() const { return fClusterFinder; };
93         void SetClusterFinder(AliHLTMUONDummyClusterFinder* clusterfinder);
94         
95         /* Get/Set methods for the tracker interface.
96            Note: The tracker object must be cleaned up by the caller.
97            This field is optional. Use it if a custom tracker should be used.
98          */
99         void SetTracker(AliHLTMUONTrackerInterface* tracker) { fTracker = tracker; };
100         const AliHLTMUONTrackerInterface* GetTracker() const { return fTracker; };
101         void SetTracker(AliHLTMUONDummyTracker* tracker);
102         
103         /* The entry point routine for the dHLT algorithm in the micro format.
104            To run the dHLT set the input and output objects with the set methods
105            provided and then call this Run method.
106          */
107         void Run();
108         
109         // Get and set methods for the dHLT debug level.
110         static void DebugLevel(Int_t value);
111         static Int_t DebugLevel();
112         
113 private:
114         
115         // Do not allow copying of this object.
116         AliHLTMUONMicrodHLT(const AliHLTMUONMicrodHLT& /*object*/) : TObject() {}
117         AliHLTMUONMicrodHLT& operator = (const AliHLTMUONMicrodHLT& /*object*/) { return *this; }
118
119         AliHLTMUONTriggerSource* fTriggerSource;           //! Trigger record input source.
120         AliHLTMUONClusterSource* fClusterSource;           //! Cluster point input source.
121         AliHLTMUONTrackSink* fTrackSink;                   //! Track output sink.
122         AliHLTMUONClusterFinderInterface* fClusterFinder;  //! Interface to a custom cluster finder.
123         AliHLTMUONTrackerInterface* fTracker;              //! Interface to a custom tracker.
124
125         ClassDef(AliHLTMUONMicrodHLT, 0);  // A very minimal implementation of the dHLT algorithm.
126 };
127
128
129 #endif // ALIHLTMUONMICRODHLT_H