]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/MUON/src/Tracking/IOInterface.hpp
This commit was generated by cvs2svn to compensate for changes in r11742,
[u/mrichter/AliRoot.git] / HLT / MUON / src / Tracking / IOInterface.hpp
1 ////////////////////////////////////////////////////////////////////////////////
2 //
3 // Author: Artur Szostak
4 // Email:  artur@alice.phy.uct.ac.za | artursz@iafrica.com
5 //
6 ////////////////////////////////////////////////////////////////////////////////
7
8 #ifndef dHLT_TRACKING_IO_INTERFACE_HPP
9 #define dHLT_TRACKING_IO_INTERFACE_HPP
10
11 #include "BasicTypes.hpp"
12 #include "EventID.hpp"
13 #include "TriggerRecord.hpp"
14 #include "RegionOfInterest.hpp"
15 #include "Cluster.hpp"
16 #include "Track.hpp"
17
18 namespace dHLT
19 {
20 namespace Tracking
21 {
22
23
24 class IOInterface
25 {
26 public:
27
28         // Do not free memory of triggers nor clusters for a given event until the
29         // corresponding ReleaseTriggers or ReleaseClusters method is called.
30
31         /* Called by the framework when a new trigger record is to be processed.
32          */
33         virtual void AddTriggers(const EventID event, const TriggerRecord* triggers, const UInt count) = 0;
34
35         /* When no more triggers are expected by the framework then this method is called.
36          */
37         virtual void EndOfTriggers(const EventID event) = 0;
38
39         /* Called by the framework when the requested cluster blocks are to be processed.
40          */
41         virtual void AddClusters(const EventID event, const ROI region, const ClusterPoint* clusters, const UInt count) = 0;
42
43         /* When no more clusters are expected by the framework then this method is called.
44          */
45         virtual void EndOfClusters(const EventID event, const ROI region) = 0;
46
47 };
48
49
50 class IOCallback
51 {
52 public:
53
54         /* Called when clusters from the specified region of interest are required
55            to reconstruct the track.
56          */
57         virtual void RequestClusters(const EventID event, const ROI region) = 0;
58
59         /* When no more clusters are required for a given event then this method
60            is called.
61          */
62         virtual void EndOfClusterRequests(const EventID event) = 0;
63
64         // Do not free the returned memory until ReturnTracks is called
65         // with the same memory pointer.
66         virtual Track* AllocateTrackBlock(const UInt size) = 0;
67
68         /* When tracks have been found they are returned to the framework with
69            this method.
70          */
71         virtual void ReturnTracks(const EventID event, Track* newtracks, const UInt count) = 0;
72
73         /* When no more tracks can be found for this event then this method is called.
74          */
75         virtual void EndOfTracks(const EventID event) = 0;
76
77         // Do not free trigger blocks until this method is called for the given block of memory.
78         virtual void ReleaseTriggers(const TriggerRecord* triggers) = 0;
79
80         // Do not free cluster blocks until this method is called for the given block of memory.
81         virtual void ReleaseClusters(const ClusterPoint* clusters) = 0;
82
83 };
84
85
86 } // Tracking
87 } // dHLT
88
89 #endif // dHLT_TRACKING_IO_INTERFACE_HPP