]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/MUON/src/AliRoot/ClusterFinder.hpp
Removing warnings related to -Weffc++ flag.
[u/mrichter/AliRoot.git] / HLT / MUON / src / AliRoot / ClusterFinder.hpp
CommitLineData
8789841b 1////////////////////////////////////////////////////////////////////////////////
2//
3// Author: Artur Szostak
4// Email: artur@alice.phy.uct.ac.za | artursz@iafrica.com
5//
6////////////////////////////////////////////////////////////////////////////////
7
69d7cf2e 8#ifndef ALIHLTMUONDUMMYCLUSTERFINDER_H
9#define ALIHLTMUONDUMMYCLUSTERFINDER_H
8789841b 10
11#ifndef __CINT__
69d7cf2e 12#include "AliRoot/Point.hpp"
13#include "AliRoot/ADCStream.hpp"
8789841b 14#endif // __CINT__
15
8789841b 16
69d7cf2e 17class AliHLTMUONDummyClusterFinder
d3a17842 18{
19public:
20
77650318 21 AliHLTMUONDummyClusterFinder() : fInterface(this), fCallback(NULL)
d3a17842 22 {
8789841b 23 fCallback = NULL;
d3a17842 24 };
25
69d7cf2e 26 virtual ~AliHLTMUONDummyClusterFinder() {};
d3a17842 27
28 /* This is the starting point of the cluster finding algorithm.
29 Deriving cluster finders should implement all processing in this method
30 to find clusters in the specified ADC stream. When all clusters are found
31 the FoundClusters method should be called to indicate that processing is
32 complete. If no clusters could be found then call NoClustersFound instead.
33 */
77650318 34 virtual void FindClusters(const AliHLTMUONADCStream* stream) = 0;
d3a17842 35
36 /* After a call to FoundClusters this method will be called to retreive the
37 cluster points. The clusters array should be filled consecutively with
38 the points that were found. However no more than 'arraysize' number of
39 points should be written to the clusters array.
40 This method should also return the actual number of cluster points written
41 to the array.
42 If the number of clusters written is less that the number specified in the
43 'numberfound' parameter of the FoundClusters method, then this method will
44 be called again by the framework. Thus on successive calls to this method,
45 the cluster finder must resume writing clusters at the point it stopped at
46 in the previous call to FillClusterData.
47 */
69d7cf2e 48 virtual UInt_t FillClusterData(AliHLTMUONPoint* clusters, UInt_t arraysize) = 0;
d3a17842 49
50 /* This is called when the cluster finder should be reset to an initial state.
51 All extra internal memory allocated during processing should be released.
52 */
53 virtual void Reset() = 0;
54
55 /* Sets the ClusterFinderCallback callback interface.
56 */
77650318 57 inline void SetCallback(AliHLTMUONClusterFinderCallback* callback)
58 {
8789841b 59 this->fCallback = callback;
d3a17842 60 };
8789841b 61
69d7cf2e 62 AliHLTMUONClusterFinderInterface* Interface()
d3a17842 63 {
8789841b 64 return &fInterface;
d3a17842 65 };
8789841b 66
d3a17842 67private:
68
69d7cf2e 69 AliHLTMUONClusterFinderInterface fInterface;
77650318 70 AliHLTMUONClusterFinderCallback* fCallback;
71
72 // Hide copy constructor and assignment operator
73 AliHLTMUONDummyClusterFinder(const AliHLTMUONDummyClusterFinder& /*clusterfinder*/)
74 : fInterface(this), fCallback(NULL)
75 {};
76
77 AliHLTMUONDummyClusterFinder& operator = (const AliHLTMUONDummyClusterFinder& /*clusterfinder*/)
78 {
79 return *this;
80 };
d3a17842 81};
8789841b 82
8789841b 83
69d7cf2e 84void AliHLTMUONClusterFinderInterface::FindClusters(const AliHLTMUONADCStream* stream)
8789841b 85{
86 fClusterFinder->FindClusters(stream);
87};
88
69d7cf2e 89UInt_t AliHLTMUONClusterFinderInterface::FillClusterData(AliHLTMUONPoint* clusters, UInt_t arraysize)
8789841b 90{
69d7cf2e 91 return fClusterFinder->FillClusterData(clusters, arraysize);
8789841b 92};
93
69d7cf2e 94void AliHLTMUONClusterFinderInterface::Reset()
8789841b 95{
96 fClusterFinder->Reset();
97};
98
69d7cf2e 99void AliHLTMUONClusterFinderInterface::SetCallback(AliHLTMUONClusterFinderCallback* callback)
8789841b 100{
101 fClusterFinder->SetCallback(callback);
102};
103
69d7cf2e 104void AliHLTMUONMicrodHLT::SetClusterFinder(AliHLTMUONDummyClusterFinder* clusterfinder)
8789841b 105{
106 SetClusterFinder(clusterfinder->Interface());
107};
108
8789841b 109
69d7cf2e 110#endif // ALIHLTMUONDUMMYCLUSTERFINDER_H