]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/MUON/AliHLTMUONConstants.h
Fixing code so that components use the new standard DDL_RAW data type.
[u/mrichter/AliRoot.git] / HLT / MUON / AliHLTMUONConstants.h
1 #ifndef ALIHLTMUONCONSTANTS_H
2 #define ALIHLTMUONCONSTANTS_H
3 /**************************************************************************
4  * This file is property of and copyright by the ALICE HLT Project        * 
5  * All rights reserved.                                                   *
6  *                                                                        *
7  * Primary Authors:                                                       *
8  *   Indranil Das <indra.das@saha.ac.in>                                  *
9  *   Artur Szostak <artursz@iafrica.com>                                  *
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
22 /**
23  * @file   AliHLTMUONConstants.h
24  * @author Indranil Das <indra.das@saha.ac.in>,
25  *         Artur Szostak <artursz@iafrica.com>
26  * @date   
27  * @brief  Class containing various dimuon HLT constants used in the system.
28  */
29
30 // Forward declare structures.
31 extern "C" {
32 struct AliHLTComponentDataType;
33 struct AliHLTMUONTriggerRecordStruct;
34 struct AliHLTMUONTrigRecInfoStruct;
35 struct AliHLTMUONTriggerChannelStruct;
36 struct AliHLTMUONRecHitStruct;
37 struct AliHLTMUONChannelStruct;
38 struct AliHLTMUONClusterStruct;
39 struct AliHLTMUONMansoTrackStruct;
40 struct AliHLTMUONMansoRoIStruct;
41 struct AliHLTMUONMansoCandidateStruct;
42 struct AliHLTMUONTrackDecisionStruct;
43 struct AliHLTMUONPairDecisionStruct;
44 } // extern "C"
45
46 /**
47  * AliHLTMUONConstants contains a list of global dimuon HLT specific constants
48  * and constant structures used in the system.
49  * Static methods are provided to access these values.
50  */
51 class AliHLTMUONConstants
52 {
53 public:
54
55         static const AliHLTMUONTriggerRecordStruct& NilTriggerRecordStruct()
56         {
57                 return fgkNilTriggerRecordStruct;
58         }
59
60         static const AliHLTMUONTrigRecInfoStruct& NilTrigRecInfoStruct()
61         {
62                 return fgkNilTrigRecInfoStruct;
63         }
64
65         static const AliHLTMUONTriggerChannelStruct& NilTriggerChannelStruct()
66         {
67                 return fgkNilTriggerChannelStruct;
68         }
69
70         static const AliHLTMUONRecHitStruct& NilRecHitStruct()
71         {
72                 return fgkNilRecHitStruct;
73         }
74
75         static const AliHLTMUONChannelStruct& NilChannelStruct()
76         {
77                 return fgkNilChannelStruct;
78         }
79
80         static const AliHLTMUONClusterStruct& NilClusterStruct()
81         {
82                 return fgkNilClusterStruct;
83         }
84
85         static const AliHLTMUONMansoTrackStruct& NilMansoTrackStruct()
86         {
87                 return fgkNilMansoTrackStruct;
88         }
89
90         static const AliHLTMUONMansoRoIStruct& NilMansoRoIStruct()
91         {
92                 return fgkNilMansoRoIStruct;
93         }
94
95         static const AliHLTMUONMansoCandidateStruct& NilMansoCandidateStruct()
96         {
97                 return fgkNilMansoCandidateStruct;
98         }
99
100         static const AliHLTMUONTrackDecisionStruct& NilTrackDecisionStruct()
101         {
102                 return fgkNilTrackDecisionStruct;
103         }
104
105         static const AliHLTMUONPairDecisionStruct& NilPairDecisionStruct()
106         {
107                 return fgkNilPairDecisionStruct;
108         }
109
110         // Returns the raw data type for MUON DDLs. To figure out if the DDL format
111         // will be for a tracking DDL or trigger DDL one needs to also check the
112         // sepcification word of the input data block. If one of the first 20 least
113         // significant bits are set then it is a tracker DDL otherwise if it is
114         // the 21st or 22nd bit then it is from the muon trigger.
115         static const AliHLTComponentDataType& DDLRawDataType()
116         {
117                 return fgkDDLRawDataType;
118         }
119
120         static const AliHLTComponentDataType& TriggerRecordsBlockDataType()
121         {
122                 return fgkTriggerRecordsBlockDataType;
123         }
124
125         static const AliHLTComponentDataType& TrigRecsDebugBlockDataType()
126         {
127                 return fgkTrigRecsDebugBlockDataType;
128         }
129
130         static const AliHLTComponentDataType& TriggerChannelBlockDataType()
131         {
132                 return fgkTriggerChannelBlockDataType;
133         }
134
135         static const AliHLTComponentDataType& RecHitsBlockDataType()
136         {
137                 return fgkRecHitsBlockDataType;
138         }
139
140         static const AliHLTComponentDataType& ClusterBlockDataType()
141         {
142                 return fgkClusterBlockDataType;
143         }
144
145         static const AliHLTComponentDataType& ChannelBlockDataType()
146         {
147                 return fgkChannelBlockDataType;
148         }
149
150         static const AliHLTComponentDataType& MansoTracksBlockDataType()
151         {
152                 return fgkMansoTracksBlockDataType;
153         }
154
155         static const AliHLTComponentDataType& MansoCandidatesBlockDataType()
156         {
157                 return fgkMansoCandidatesBlockDataType;
158         }
159
160         static const AliHLTComponentDataType& SinglesDecisionBlockDataType()
161         {
162                 return fgkSinglesDecisionBlockDataType;
163         }
164
165         static const AliHLTComponentDataType& PairsDecisionBlockDataType()
166         {
167                 return fgkPairsDecisionBlockDataType;
168         }
169         
170         static const char* RecHitsSourceId()
171         {
172                 return fgkRecHitsSourceId;
173         }
174         
175         static const char* TriggerRecordsSourceId()
176         {
177                 return fgkTriggerRecordsSourceId;
178         }
179         
180         static const char* MansoTracksSourceId()
181         {
182                 return fgkMansoTracksSourceId;
183         }
184         
185         static const char* TriggerReconstructorId()
186         {
187                 return fgkTriggerReconstructorId;
188         }
189         
190         static const char* HitReconstructorId()
191         {
192                 return fgkHitReconstructorId;
193         }
194         
195         static const char* MansoTrackerFSMId()
196         {
197                 return fgkMansoTrackerFSMId;
198         }
199         
200         static const char* DecisionComponentId()
201         {
202                 return fgkDecisionComponentId;
203         }
204         
205         static const char* TriggerCalibratorId()
206         {
207                 return fgkTriggerCalibratorId;
208         }
209         
210         static const char* TrackerCalibratorId()
211         {
212                 return fgkTrackerCalibratorId;
213         }
214         
215         static const char* EmptyEventFilterComponentId()
216         {
217                 return fgkEmptyEventFilterComponentId;
218         }
219
220 private:
221
222         // Should never have to create, destroy or copy this object.
223         AliHLTMUONConstants();
224         AliHLTMUONConstants(const AliHLTMUONConstants& obj);
225         ~AliHLTMUONConstants();
226         AliHLTMUONConstants& operator = (const AliHLTMUONConstants& obj);
227         
228         // The following are null/nil structures that can also be used as sentinels:
229         static const AliHLTMUONTriggerRecordStruct fgkNilTriggerRecordStruct; // Nil trigger record.
230         static const AliHLTMUONTrigRecInfoStruct fgkNilTrigRecInfoStruct; // Nil trigger record debug information.
231         static const AliHLTMUONTriggerChannelStruct fgkNilTriggerChannelStruct; // Nil trigger chamber channel.
232         static const AliHLTMUONRecHitStruct fgkNilRecHitStruct; // Nil reconstructed hit.
233         static const AliHLTMUONChannelStruct fgkNilChannelStruct; // Nil tracking chamber channel.
234         static const AliHLTMUONClusterStruct fgkNilClusterStruct; // Nil tracking chamber cluster.
235         static const AliHLTMUONMansoTrackStruct fgkNilMansoTrackStruct; // Nil manso track.
236         static const AliHLTMUONMansoRoIStruct fgkNilMansoRoIStruct; // Nil manso region of interest.
237         static const AliHLTMUONMansoCandidateStruct fgkNilMansoCandidateStruct; // Nil manso candidate track.
238         static const AliHLTMUONTrackDecisionStruct fgkNilTrackDecisionStruct; // Nil decision for single track.
239         static const AliHLTMUONPairDecisionStruct fgkNilPairDecisionStruct; // Nil decision for track pair.
240
241         // HLT component input and output data block types:
242         static const AliHLTComponentDataType fgkDDLRawDataType; // DDL packed data block type from dimuon spectrometer.
243         static const AliHLTComponentDataType fgkTriggerRecordsBlockDataType; // Trigger records block type generated by trigger DDL translation components.
244         static const AliHLTComponentDataType fgkTrigRecsDebugBlockDataType; // Debugging information block type generated by trigger DDL translation components.
245         static const AliHLTComponentDataType fgkTriggerChannelBlockDataType; // Debugging information about the channels from the hardware trigger.
246         static const AliHLTComponentDataType fgkRecHitsBlockDataType; // Reconstructed hits block type generated by hit reconstruction components.
247         static const AliHLTComponentDataType fgkClusterBlockDataType; // Debugging information block type for reconstructed hit clusters.
248         static const AliHLTComponentDataType fgkChannelBlockDataType; // Debugging information block type for channels corresponding to clusters.
249         static const AliHLTComponentDataType fgkMansoTracksBlockDataType; // Manso tracks block type generated by Manso tracker components.
250         static const AliHLTComponentDataType fgkMansoCandidatesBlockDataType; // Debugging information about a track candidate generated by the Manso algorithm.
251         static const AliHLTComponentDataType fgkSinglesDecisionBlockDataType; // Trigger decision block type for single track decisions.
252         static const AliHLTComponentDataType fgkPairsDecisionBlockDataType; // Trigger decision block type for pairs of particles.
253         
254         // Component ID names:
255         static const char* fgkRecHitsSourceId; // Name of source component for reconstructed hits for debugging.
256         static const char* fgkTriggerRecordsSourceId; // Name of source component for trigger records for debugging.
257         static const char* fgkMansoTracksSourceId; // Name of source component for Manso tracks for debugging.
258         static const char* fgkTriggerReconstructorId; // Trigger record reconstructor component name.
259         static const char* fgkHitReconstructorId; // Centre of gravity cluster finder component name.
260         static const char* fgkMansoTrackerFSMId; // Manso tracker FSM implementation component name.
261         static const char* fgkDecisionComponentId; // dHLT decision component name.
262         static const char* fgkTriggerCalibratorId; // Trigger calibration component name.
263         static const char* fgkTrackerCalibratorId; // Tracking stations calibration component name.
264         static const char* fgkEmptyEventFilterComponentId; // The name of the event filter debugging component.
265 };
266
267 #endif // ALIHLTMUONCONSTANTS_H