]>
Commit | Line | Data |
---|---|---|
b92524d0 | 1 | #ifndef AliHLTMUONMANSOTRACKERFSMCOMPONENT_H |
2 | #define AliHLTMUONMANSOTRACKERFSMCOMPONENT_H | |
3 | /************************************************************************** | |
4 | * This file is property of and copyright by the ALICE HLT Project * | |
5 | * All rights reserved. * | |
6 | * * | |
7 | * Primary Authors: * | |
8 | * Artur Szostak <artursz@iafrica.com> * | |
9 | * Indranil Das <indra.das@saha.ac.in> * | |
10 | * * | |
11 | * Permission to use, copy, modify and distribute this software and its * | |
12 | * documentation strictly for non-commercial purposes is hereby granted * | |
13 | * without fee, provided that the above copyright notice appears in all * | |
14 | * copies and that both the copyright notice and this permission notice * | |
15 | * appear in the supporting documentation. The authors make no claims * | |
16 | * about the suitability of this software for any purpose. It is * | |
17 | * provided "as is" without express or implied warranty. * | |
18 | **************************************************************************/ | |
19 | ||
20 | /* $Id$ */ | |
21 | ||
6253e09b | 22 | /// |
23 | /// @file AliHLTMUONMansoTrackerFSMComponent.h | |
24 | /// @author Artur Szostak <artursz@iafrica.com>, | |
25 | /// Indranil Das <indra.das@saha.ac.in> | |
26 | /// @date | |
27 | /// @brief Tracker component for the dimuon HLT using the Manso algorithm | |
28 | /// implemented as a finite state machine. | |
29 | /// | |
b92524d0 | 30 | |
31 | #include "AliHLTProcessor.h" | |
32 | #include "AliHLTMUONDataTypes.h" | |
33 | #include "AliHLTMUONMansoTrackerFSMCallback.h" | |
34 | #include <vector> | |
35 | ||
e29a165d | 36 | #if __GNUC__ && __GNUC__ < 3 |
4e150e47 | 37 | #define std |
38 | #endif | |
39 | ||
b92524d0 | 40 | class AliHLTMUONMansoTrackerFSM; |
41 | //class AliHLTMUONMansoTracksBlockWriter; | |
42 | extern "C" { | |
43 | struct AliHLTMUONRecHitStruct; | |
44 | } // extern C | |
45 | ||
46 | ||
47 | /** | |
48 | * @class AliHLTMUONMansoTrackerFSMComponent | |
49 | * @brief Dimuon HLT tracker component using the Manso tracking algorithm | |
50 | * implemented as a finite state machine. | |
51 | */ | |
52 | class AliHLTMUONMansoTrackerFSMComponent | |
53 | : public AliHLTProcessor, public AliHLTMUONMansoTrackerFSMCallback | |
54 | { | |
55 | public: | |
56 | AliHLTMUONMansoTrackerFSMComponent(); | |
57 | virtual ~AliHLTMUONMansoTrackerFSMComponent(); | |
58 | ||
59 | // Public functions to implement the AliHLTProcessor interface. | |
60 | // These functions are required for the registration process. | |
61 | virtual const char* GetComponentID(); | |
62 | virtual void GetInputDataTypes(std::vector<AliHLTComponentDataType>& list); | |
63 | virtual AliHLTComponentDataType GetOutputDataType(); | |
64 | virtual void GetOutputDataSize(unsigned long& constBase, double& inputMultiplier); | |
65 | virtual AliHLTComponent* Spawn(); | |
66 | ||
67 | // Inherited from AliHLTMUONMansoTrackerFSMCallback: | |
68 | virtual void RequestClusters( | |
69 | AliHLTMUONMansoTrackerFSM* tracker, | |
70 | AliHLTFloat32_t left, AliHLTFloat32_t right, | |
71 | AliHLTFloat32_t bottom, AliHLTFloat32_t top, | |
72 | AliHLTMUONChamberName chamber, const void* tag | |
73 | ); | |
74 | virtual void EndOfClusterRequests(AliHLTMUONMansoTrackerFSM* tracker); | |
75 | virtual void FoundTrack(AliHLTMUONMansoTrackerFSM* tracker); | |
76 | virtual void NoTrackFound(AliHLTMUONMansoTrackerFSM* tracker); | |
77 | ||
78 | protected: | |
79 | ||
80 | // Protected functions to implement the AliHLTProcessor interface. | |
81 | // These functions provide initialization as well as the actual processing | |
82 | // capabilities of the component. | |
6253e09b | 83 | virtual int DoInit(int argc, const char** argv); |
84 | virtual int DoDeinit(); | |
85 | virtual int DoEvent( | |
b92524d0 | 86 | const AliHLTComponentEventData& evtData, |
87 | const AliHLTComponentBlockData* blocks, | |
88 | AliHLTComponentTriggerData& trigData, | |
89 | AliHLTUInt8_t* outputPtr, | |
90 | AliHLTUInt32_t& size, | |
91 | std::vector<AliHLTComponentBlockData>& outputBlocks | |
92 | ); | |
6253e09b | 93 | |
94 | using AliHLTProcessor::DoEvent; | |
b92524d0 | 95 | |
96 | private: | |
97 | ||
6253e09b | 98 | // Do not allow copying of this class. |
99 | AliHLTMUONMansoTrackerFSMComponent(const AliHLTMUONMansoTrackerFSMComponent& /*obj*/); | |
100 | AliHLTMUONMansoTrackerFSMComponent& operator = (const AliHLTMUONMansoTrackerFSMComponent& /*obj*/); | |
101 | ||
b92524d0 | 102 | void Reset(); |
103 | ||
104 | void AddRecHits( | |
105 | AliHLTUInt32_t specification, | |
106 | const AliHLTMUONRecHitStruct* recHits, | |
107 | AliHLTUInt32_t count | |
108 | ); | |
109 | ||
110 | AliHLTMUONMansoTrackerFSM* fTracker; //! Tracker to do the actual work. | |
111 | ||
112 | AliHLTUInt32_t fTrackCount; //! Number of tracks currently found. | |
113 | /*AliHLTMUONMansoTracksBlockWriter*/void* fBlock; //! The current data block we are writing. | |
114 | ||
115 | struct RecHitBlockInfo | |
116 | { | |
117 | AliHLTUInt32_t fCount; // Number of elements in fData. | |
118 | const AliHLTMUONRecHitStruct* fData; // Pointer to the array of rec hits. | |
119 | }; | |
120 | ||
121 | std::vector<RecHitBlockInfo> fRecHitBlock[4]; //! Arrays of rec hit block data. | |
122 | ||
d42549e3 | 123 | bool fWarnForUnexpecedBlock; // Flag indicating if we should log a warning if we got a block of an unexpected type. |
124 | ||
b92524d0 | 125 | ClassDef(AliHLTMUONMansoTrackerFSMComponent, 0); // Manso tracker component implemented as a finite state machine (FSM). |
126 | }; | |
127 | ||
128 | #endif // AliHLTMUONMANSOTRACKERFSMCOMPONENT_H |