]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Fixing virtual destructor problem.
authorszostak <szostak@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 13 Dec 2005 18:50:11 +0000 (18:50 +0000)
committerszostak <szostak@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 13 Dec 2005 18:50:11 +0000 (18:50 +0000)
HLT/MUON/src/AliRoot/ClusterFinder.hpp
HLT/MUON/src/AliRoot/ClusterFinderCallback.hpp
HLT/MUON/src/AliRoot/MicrodHLT.cxx
HLT/MUON/src/AliRoot/Tracker.hpp
HLT/MUON/src/Decision/DecisionMaker.hpp
HLT/MUON/src/Tracking/Tracker.hpp

index 3087c1665b034df9768d5216b9f94f392b92ec6c..1e96579cc467c71986e6a263f2bfea23ef61042e 100644 (file)
 
 namespace AliMUONHLT
 {
-       class ClusterFinder {
-         public:
 
-         ClusterFinder() :fInterface(this)
-           {
+class ClusterFinder
+{
+public:
+
+       ClusterFinder() :fInterface(this)
+       {
                fCallback = NULL;
-           };
-
-           /* This is the starting point of the cluster finding algorithm.
-              Deriving cluster finders should implement all processing in this method
-              to find clusters in the specified ADC stream. When all clusters are found
-              the FoundClusters method should be called to indicate that processing is
-              complete. If no clusters could be found then call NoClustersFound instead.
-            */
-           virtual void FindClusters(const ADCStream * stream) = 0;
-
-           /* After a call to FoundClusters this method will be called to retreive the
-              cluster points. The clusters array should be filled consecutively with 
-              the points that were found. However no more than 'arraysize' number of 
-              points should be written to the clusters array.
-              This method should also return the actual number of cluster points written
-              to the array.
-              If the number of clusters written is less that the number specified in the
-              'numberfound' parameter of the FoundClusters method, then this method will
-              be called again by the framework. Thus on successive calls to this method,
-              the cluster finder must resume writing clusters at the point it stopped at
-              in the previous call to FillClusterData.
-            */
-           virtual UInt_t FillClusterData(Point * clusters, UInt_t arraysize) = 0;
-
-           /* This is called when the cluster finder should be reset to an initial state.
-              All extra internal memory allocated during processing should be released.
-            */
-           virtual void Reset() = 0;
-
-           /* Sets the ClusterFinderCallback callback interface.
-            */
-           inline void SetCallback(ClusterFinderCallback * callback) {
+       };
+
+       virtual ~ClusterFinder() {};
+
+       /* This is the starting point of the cluster finding algorithm.
+          Deriving cluster finders should implement all processing in this method
+          to find clusters in the specified ADC stream. When all clusters are found
+          the FoundClusters method should be called to indicate that processing is
+          complete. If no clusters could be found then call NoClustersFound instead.
+        */
+       virtual void FindClusters(const ADCStream * stream) = 0;
+
+       /* After a call to FoundClusters this method will be called to retreive the
+          cluster points. The clusters array should be filled consecutively with 
+          the points that were found. However no more than 'arraysize' number of 
+          points should be written to the clusters array.
+          This method should also return the actual number of cluster points written
+          to the array.
+          If the number of clusters written is less that the number specified in the
+          'numberfound' parameter of the FoundClusters method, then this method will
+          be called again by the framework. Thus on successive calls to this method,
+          the cluster finder must resume writing clusters at the point it stopped at
+          in the previous call to FillClusterData.
+         */
+       virtual UInt_t FillClusterData(Point * clusters, UInt_t arraysize) = 0;
+
+       /* This is called when the cluster finder should be reset to an initial state.
+          All extra internal memory allocated during processing should be released.
+        */
+       virtual void Reset() = 0;
+
+       /* Sets the ClusterFinderCallback callback interface.
+        */
+       inline void SetCallback(ClusterFinderCallback * callback) {
                this->fCallback = callback;
-           };
+       };
 
-           ClusterFinderInterface* Interface()
-           {
+       ClusterFinderInterface* Interface()
+       {
                return &fInterface;
-           };
+       };
 
-         private:
+private:
+
+       ClusterFinderInterface fInterface;
+       ClusterFinderCallback * fCallback;
+};
 
-           ClusterFinderInterface fInterface;
-           ClusterFinderCallback * fCallback;
-       };
 
 void ClusterFinderInterface::FindClusters(const ADCStream * stream)
 {
index d539d1ae3ce7bd9e1e95782e891d8a42a6e0040f..0a2c6aa7041c1046f43ce1fd8f465bcfafe8063d 100644 (file)
@@ -19,6 +19,8 @@ class ClusterFinderCallback : public TObject
 {
 public:
 
+       virtual ~ClusterFinderCallback() {};
+
        virtual void FoundClusters(UInt_t numberfound) = 0;
        virtual void NoClustersFound() = 0;
        
index b611f31a22e4c50f76276c7573a6577e0e21faa0..013242ceb9c11bae58d44fcacb18e036654ec7da 100644 (file)
@@ -33,6 +33,8 @@ class MicroFramework : public Tracking::TrackerCallback
 {
 public:
 
+       virtual ~MicroFramework() {};
+
        virtual void RequestClusters(
                        Tracking::Tracker* tracker, 
                        Float /*left*/, Float /*right*/, Float /*bottom*/, Float /*top*/,
index 151ed9bf5ee21b34d8d401dd1cbd12d4a3b6668b..d999da25a9401ccbf009b50e5404fa9c8012afe8 100644 (file)
@@ -29,6 +29,8 @@ public:
                fCallback = NULL;
        };
 
+       virtual ~Tracker() {};
+
        /* Methods required to be implemented by the tracker.
           These correspond to the dHLT::Tracker specification, refer to that
           class for more information.
index f1ffc1e2fce17b6144520c49e9acd34c7a8c6bbf..3621740096c21b459dea92baa47b54a7a32690a8 100644 (file)
@@ -27,6 +27,8 @@ class DecisionMakerCallback
 {
 public:
 
+       virtual ~DecisionMakerCallback() {};
+
        /* Called when the decision maker has finished processing.
           At this point and tracks passed to the decision maker are no longer is use
           by the decision maker and the tracks can be released.
@@ -48,6 +50,8 @@ public:
                callback = NULL;
        };
 
+       virtual ~DecisionMaker() {};
+
        /* This is the starting point of the decision algorithm. Any initialisation
           processing should be performed here.
         */
index 35644ee3c9e95e9431dc6cbc748ee075f682965a..646d902405537e29b834e5692528fc3fafa1c1e8 100644 (file)
@@ -29,6 +29,8 @@ class Tracker;
 class TrackerCallback
 {
 public:
+
+       virtual ~TrackerCallback() {};
        
        /* All clusters that fall within the specified boundary box on the specified
           chamber should be returned to the tracker, by calling the ReturnClusters
@@ -69,6 +71,8 @@ public:
                callback = NULL;
        };
 
+       virtual ~Tracker() {};
+
        /* This is the starting point for the tracking algorithm. The tracker is 
           called at this point with the specified trigger record. It needs to figure
           out which cluster blocks it needs and request them with calls to