Porting HLT doxygen documentation to cmake
[u/mrichter/AliRoot.git] / HLT / MUON / OfflineInterface / AliHLTMUONDigitPublisherComponent.h
CommitLineData
887a669c 1#ifndef ALIHLTMUONDIGITPUBLISHERCOMPONENT_H
2#define ALIHLTMUONDIGITPUBLISHERCOMPONENT_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 */
6
1d8ae082 7// $Id: AliHLTMUONDigitPublisherComponent.h 26179 2008-05-29 22:27:27Z aszostak $
887a669c 8
9///
10/// @file AliHLTMUONDigitPublisherComponent.h
11/// @author Artur Szostak <artursz@iafrica.com>
12/// @date 29 May 2008
13/// @brief Declaration of a component to publish MUON data from digits.
14///
15
16#include "AliHLTOfflineDataSource.h"
649ab027 17#include "TArrayI.h"
887a669c 18
19#if __GNUC__ && __GNUC__ < 3
20#define std
21#endif
22
2ee47a65 23class AliMUONVDigitStore;
24class AliMUONVTriggerStore;
25class AliMpExMap;
26class AliMUONMCDataInterface;
27class AliMUONDataInterface;
28
887a669c 29/**
30 * @class AliHLTMUONDigitPublisherComponent
31 * The component is used to convert simulated or reconstructed digits into DDL
32 * raw data streams on the fly and publish them. This is useful for running
33 * dHLT simulations on digit data where the raw data files are not available.
34 * The component is also used during dHLT simulation under AliSimulation where
35 * we do not have access to a rawReader.<br>
36 *
37 * Component ID: \b MUONDigitPublisher <br>
38 * Library: \b libAliHLTMUON.so <br>
39 *
40 * Manditory arguments:<br>
41 * \li -ddl <number> <br>
42 * Specifies which DDL to generate raw data for. <number> should be in the
43 * range [1..22], where 1..20 are for tracker DDLs and 21 or 22 is for the
44 * dimuon trigger.<br>
45 *
46 * Optional arguments:<br>
649ab027 47 * \li -ddlid <br>
48 * This is an alternative to using -ddl which allows specifying a DDL in
49 * terms of the DDL equipment IDs.<br>
2ee47a65 50 * \li -makescalars <br>
51 * If set then the scalar events will be generated for the trigger DDLs.
52 * (default is not to generate the scalars)<br>
887a669c 53 * \li -simdata <br>
54 * Indicates that the simulated digits should be used. (default option)<br>
55 * \li -recdata <br>
56 * Indicates that the reconstructed digits tree should be used.<br>
57 * \li -firstevent <number> <br>
58 * Indicates the first event number to fetch from AliRoot. The default is to
59 * start from zero and increment the event number after every GetEvent call.
60 * This mode causes the component to ignore the event number passed to it by
61 * the system and rather use an internal counter. This mode can be overriden
62 * with the -event_number_literal flag. <br>
63 * \li -event_number_literal <br>
64 * This flag indicates to use the event numbers as literal indices into the
65 * AliRoot trees. This option will cause the component to ignore the -firstevent
66 * flag. <br>
a47233fb 67 * \li -exclude_chamber <number>|<number>-<number>[,<number>|<number>-<number>,...] <br>
68 * Allows one to exclude (mask out) digits from certain chambers in the generated
69 * raw DDL stream. The chamber numbers <number> should be in the range [1..10]. <br>
70 * \li -exclude_detelem <number>|<number>-<number>[,<number>|<number>-<number>,...] <br>
71 * Allows one to exclude (mask out) digits from certain detector elements in
72 * the generated raw DDL stream. The detector element ID numbers <number> should
73 * be in the range [100..1099]. <br>
887a669c 74 *
ebf7a8e8 75 * @ingroup alihlt_muon_components
887a669c 76 */
77class AliHLTMUONDigitPublisherComponent : public AliHLTOfflineDataSource
78{
79public:
80 AliHLTMUONDigitPublisherComponent();
81 virtual ~AliHLTMUONDigitPublisherComponent();
82
83 // Public functions to implement AliHLTComponent's interface.
84 // These functions are required for the component registration process.
85
86 virtual const char* GetComponentID();
87 virtual AliHLTComponentDataType GetOutputDataType();
88 virtual void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier );
89 virtual AliHLTComponent* Spawn();
90
91protected:
92
93 // Protected functions to implement AliHLTComponent's interface.
94 // These functions provide initialization as well as the actual processing
95 // capabilities of the component.
96
97 virtual int DoInit(int argc, const char** argv);
98 virtual int DoDeinit();
99
100 virtual int GetEvent(
101 const AliHLTComponentEventData& evtData,
102 AliHLTComponentTriggerData& trigData,
103 AliHLTUInt8_t* outputPtr,
104 AliHLTUInt32_t& size,
ffb64d3e 105 AliHLTComponentBlockDataList& outputBlocks
887a669c 106 );
107
108 using AliHLTOfflineDataSource::GetEvent;
109
110private:
111
112 // Do not allow copying of this class.
113 AliHLTMUONDigitPublisherComponent(const AliHLTMUONDigitPublisherComponent& /*obj*/);
114 AliHLTMUONDigitPublisherComponent& operator = (const AliHLTMUONDigitPublisherComponent& /*obj*/);
115
649ab027 116 int ParseChamberString(const char* str);
117 int ParseDetElemString(const char* str);
118
2ee47a65 119 /////////////////////////////////////////////////////////////////////////////////////////
120 // Methods copied from AliMUONRawWriter.
121 //TODO: This is not ideal. We should have AliMUONRawWriter re-factored so that
122 // we can have raw data generated into a memory resident buffer, rather than
123 // always written to a file on disk, as it is now. But this will take some time
124 // since people need to be convinced of this fact.
125 void Digits2BusPatchMap(
126 const AliMUONVDigitStore& digitStore,
127 AliMpExMap& busPatchMap, Int_t iDDL
128 );
129
130 int WriteTrackerDDL(
131 const AliMUONVDigitStore* digitStore, Int_t iDDL,
132 AliHLTUInt8_t* outBuffer, AliHLTUInt32_t& outBufferSize
133 );
134
135 int WriteTriggerDDL(
136 const AliMUONVTriggerStore* triggerStore, Int_t iDDL,
137 AliHLTUInt8_t* outBuffer, AliHLTUInt32_t& outBufferSize,
138 bool scalarEvent = false
139 );
140
141 static void LocalWordPacking(UInt_t &word, UInt_t locId, UInt_t locDec,
142 UInt_t trigY, UInt_t posY, UInt_t posX,
143 UInt_t sdevX, UInt_t devX);
144
145 /////////////////////////////////////////////////////////////////////////////////////////
146
887a669c 147 AliHLTInt32_t fDDL; ///< DDL number in the range [0..21]. Set to -1 for invalid/unspecified value.
148
149 Int_t fCurrentEventIndex; ///< The current event index that is to be loaded.
150 // -1 indicates that we should rather use the event
151 // numbers as given by the system.
152
2ee47a65 153 bool fMakeScalars; ///< Flag indicating if the scalars should be generated for the trigger DDLs.
154
155 AliMUONMCDataInterface* fMCDataInterface; ///< Access to MUON MC-related data.
156 AliMUONDataInterface* fDataInterface; ///< Access to MUON data.
157
649ab027 158 TArrayI fChamberExclusionList; //! Exclusion list for tracking chambers.
159 TArrayI fDetElemExclusionList; //! Exclusion list for tracking detector elements.
160
887a669c 161 ClassDef(AliHLTMUONDigitPublisherComponent, 0) // dHLT component for publishing DDL streams from digits on the fly.
162};
163
164#endif // ALIHLTMUONDIGITPUBLISHERCOMPONENT_H