1 #ifndef ALIHLTMUONHITRECONSTRUCTORCOMPONENT_H
2 #define ALIHLTMUONHITRECONSTRUCTORCOMPONENT_H
3 /* This file is property of and copyright by the ALICE HLT Project *
4 * ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
10 /// @file AliHLTMUONHitReconstructorComponent.h
11 /// @author Indranil Das <indra.das@saha.ac.in> | <indra.ehep@gmail.com>
13 /// @brief Hit Reconstruction processing component for the dimuon HLT.
16 #include "AliHLTProcessor.h"
17 #include "AliHLTMUONHitReconstructor.h"
19 #if __GNUC__ && __GNUC__ < 3
24 extern "C" struct AliHLTMUONHitRecoLutRow;
27 class AliHLTMUONHitReconstructorComponent : public AliHLTProcessor
30 AliHLTMUONHitReconstructorComponent();
31 virtual ~AliHLTMUONHitReconstructorComponent();
33 // Public functions to implement AliHLTComponent's interface.
34 // These functions are required for the registration process
36 virtual const char* GetComponentID();
37 virtual void GetInputDataTypes(std::vector<AliHLTComponentDataType>& list);
38 virtual AliHLTComponentDataType GetOutputDataType();
39 virtual void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier );
40 virtual AliHLTComponent* Spawn();
43 * Generates a ASCII text file containing the lookup table (LUT) from
44 * the CDB, which can be used for the hit reconstructor component later.
45 * @param ddl Must be the DDL for which to generate the DDL,
46 * in the range [12..19].
47 * @param filename The name of the LUT file to generate.
48 * @param cdbPath The CDB path to use.
49 * @param run The run number to use for the CDB.
50 * @return True if the generation of the LUT file succeeded.
52 static bool GenerateLookupTable(
53 AliHLTInt32_t ddl, const char* filename,
54 const char* cdbPath, Int_t run
59 // Protected functions to implement AliHLTComponent's interface.
60 // These functions provide initialization as well as the actual processing
61 // capabilities of the component.
63 virtual int DoInit(int argc, const char** argv);
64 virtual int DoDeinit();
66 const AliHLTComponentEventData& evtData,
67 const AliHLTComponentBlockData* blocks,
68 AliHLTComponentTriggerData& trigData,
69 AliHLTUInt8_t* outputPtr,
71 std::vector<AliHLTComponentBlockData>& outputBlocks
74 using AliHLTProcessor::DoEvent;
78 // Do not allow copying of this class.
79 AliHLTMUONHitReconstructorComponent(const AliHLTMUONHitReconstructorComponent& /*obj*/);
80 AliHLTMUONHitReconstructorComponent& operator = (const AliHLTMUONHitReconstructorComponent& /*obj*/);
83 int ReadLookUpTable(const char* lutpath);
84 int ReadCDB(const char* cdbpath, Int_t run);
86 AliHLTMUONHitReconstructor* fHitRec; // Internal class instance implementing the hit reconstruction algorithm.
87 AliHLTInt32_t fDDL; // DDL number in the range [12..19]. Set to -1 for invalid/unspecified value.
88 AliHLTUInt32_t fLutSize; // The number of rows / entries in the LUT.
89 AliHLTMUONHitRecoLutRow* fLut; // The lookup table used by the hit reconstruction algorithm (Owned by this component however).
90 IdManuChannelToEntry fIdToEntry; // id to line mapping.
91 bool fWarnForUnexpecedBlock; // Flag indicating if we should log a warning if we got a block of an unexpected type.
93 ClassDef(AliHLTMUONHitReconstructorComponent, 0)
96 #endif // ALIHLTMUONHITRECONSTRUCTORCOMPONENT_H