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. *
8 * Artur Szostak <artursz@iafrica.com> *
9 * Indranil Das <indra.das@saha.ac.in> *
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 **************************************************************************/
23 /// @file AliHLTMUONMansoTrackerFSMComponent.h
24 /// @author Artur Szostak <artursz@iafrica.com>,
25 /// Indranil Das <indra.das@saha.ac.in>
27 /// @brief Tracker component for the dimuon HLT using the Manso algorithm
28 /// implemented as a finite state machine.
31 #include "AliHLTProcessor.h"
32 #include "AliHLTMUONDataTypes.h"
33 #include "AliHLTMUONMansoTrackerFSMCallback.h"
36 #if __GNUC__ && __GNUC__ < 3
40 class AliHLTMUONMansoTrackerFSM;
41 //class AliHLTMUONMansoTracksBlockWriter;
43 struct AliHLTMUONRecHitStruct;
48 * @class AliHLTMUONMansoTrackerFSMComponent
49 * @brief Dimuon HLT tracker component using the Manso tracking algorithm
50 * implemented as a finite state machine.
52 class AliHLTMUONMansoTrackerFSMComponent
53 : public AliHLTProcessor, public AliHLTMUONMansoTrackerFSMCallback
56 AliHLTMUONMansoTrackerFSMComponent();
57 virtual ~AliHLTMUONMansoTrackerFSMComponent();
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();
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
74 virtual void EndOfClusterRequests(AliHLTMUONMansoTrackerFSM* tracker);
75 virtual void FoundTrack(AliHLTMUONMansoTrackerFSM* tracker);
76 virtual void NoTrackFound(AliHLTMUONMansoTrackerFSM* tracker);
80 // Protected functions to implement the AliHLTProcessor interface.
81 // These functions provide initialization as well as the actual processing
82 // capabilities of the component.
83 virtual int DoInit(int argc, const char** argv);
84 virtual int DoDeinit();
86 const AliHLTComponentEventData& evtData,
87 const AliHLTComponentBlockData* blocks,
88 AliHLTComponentTriggerData& trigData,
89 AliHLTUInt8_t* outputPtr,
91 std::vector<AliHLTComponentBlockData>& outputBlocks
94 using AliHLTProcessor::DoEvent;
98 // Do not allow copying of this class.
99 AliHLTMUONMansoTrackerFSMComponent(const AliHLTMUONMansoTrackerFSMComponent& /*obj*/);
100 AliHLTMUONMansoTrackerFSMComponent& operator = (const AliHLTMUONMansoTrackerFSMComponent& /*obj*/);
105 AliHLTUInt32_t specification,
106 const AliHLTMUONRecHitStruct* recHits,
110 AliHLTMUONMansoTrackerFSM* fTracker; //! Tracker to do the actual work.
112 AliHLTUInt32_t fTrackCount; //! Number of tracks currently found.
113 /*AliHLTMUONMansoTracksBlockWriter*/void* fBlock; //! The current data block we are writing.
115 struct RecHitBlockInfo
117 AliHLTUInt32_t fCount; // Number of elements in fData.
118 const AliHLTMUONRecHitStruct* fData; // Pointer to the array of rec hits.
121 std::vector<RecHitBlockInfo> fRecHitBlock[4]; //! Arrays of rec hit block data.
123 bool fWarnForUnexpecedBlock; // Flag indicating if we should log a warning if we got a block of an unexpected type.
125 ClassDef(AliHLTMUONMansoTrackerFSMComponent, 0); // Manso tracker component implemented as a finite state machine (FSM).
128 #endif // AliHLTMUONMANSOTRACKERFSMCOMPONENT_H