1 ////////////////////////////////////////////////////////////////////////////////
3 // Author: Artur Szostak
4 // Email: artur@alice.phy.uct.ac.za | artursz@iafrica.com
6 // Author: Gareth de Vaux
7 // Email: devaux@lhc.phy.uct.ac.za | dhlt@lordcow.org
9 ////////////////////////////////////////////////////////////////////////////////
11 #ifndef dHLT_PUBSUB_TRACKERCALLBACK_HPP
12 #define dHLT_PUBSUB_TRACKERCALLBACK_HPP
14 #include "Tracking/Tracker.hpp"
15 #include "Tracking/MansoTracker.hpp"
16 #include "Cluster.hpp"
26 class TrackerCallback: public Tracking::TrackerCallback
32 virtual ~TrackerCallback() {}
34 /* All clusters that fall within the specified boundary box on the specified
35 chamber should be returned the the tracker, by calling the ReturnClusters
36 method of the given tracker. The same tag parameter must be passed on the
37 ReturnClusters method's parameter list.
39 virtual void RequestClusters(
40 Tracking::Tracker* tracker,
41 const Float left, const Float right, const Float bottom, const Float top,
42 const ChamberID chamber, const void* tag
45 /* When this method is called then one knows no more RequestClusters method
48 virtual void EndOfClusterRequests(Tracking::Tracker* tracker);
50 /* This method is called when the tracker has found a track. The FillTrackData
51 method of the given tracker should be called to received the track data.
52 At this point all cluster blocks can be released.
54 virtual void FoundTrack(Tracking::Tracker* tracker);
56 /* When the tracker is finished with its work but no track was found then
57 this method is called. At this point no more work should be performed by
58 the tracker and all cluster blocks can be released.
60 virtual void NoTrackFound(Tracking::Tracker* tracker);
62 /* Store a pointer to cluster data
64 void AddClusterBlock(const ClusterPoint *clusters, const UInt size, const UInt chamber);
66 /* gives tracks access to the externally allocated output buffer
68 void SetTracks(Track* output) {tracks = output;}
70 UInt TrackCount() const {return trackcount;}
76 const ClusterPoint* data;
80 std::vector<ClusterBlock> clusterblocks[10]; // cluster blocks for the 10 tracking chambers
82 Track* tracks; // array of tracks
85 UInt cyclic_count; // TODO
92 #endif // dHLT_TRACKING_TRACKERCALLBACK_HPP