]>
Commit | Line | Data |
---|---|---|
7c4d1228 | 1 | //-*- Mode: C++ -*- |
2 | // $Id$ | |
3 | ||
4 | #ifndef ALIHLTOUTHANDLERDETECTORDDL_H | |
5 | #define ALIHLTOUTHANDLERDETECTORDDL_H | |
6 | //* This file is property of and copyright by the ALICE HLT Project * | |
7 | //* ALICE Experiment at CERN, All rights reserved. * | |
8 | //* See cxx source for full Copyright notice * | |
9 | ||
10 | /** @file AliHLTOUTHandlerDetectorDDL.h | |
11 | @author Matthias Richter | |
12 | @date 2008-09-09 | |
13 | @brief Default HLTOUT handler returning equipment id from data type and | |
14 | bit pattern in spec. | |
15 | */ | |
16 | ||
17 | #include "AliHLTOUTHandlerEquId.h" | |
18 | ||
19 | /** | |
20 | * @class AliHLTOUTHandlerDetectorDDL | |
21 | * A default handler class for DDL raw data redirection handlers. | |
22 | * | |
23 | * This class implements an AliHLTOUTHandlerEquId which extracts the | |
24 | * equipment Id from the bit pattern in the specification. All detectors | |
25 | * with up to 32 DDL links follow this convention. The bit no in the | |
26 | * data specification word corresponds to the DDL number within the | |
27 | * sub-detector. | |
28 | * | |
29 | * DDL offsets for sub-detectors can be fetched by means of AliDAQ. | |
30 | * The class must be initialized with the detector identification and the | |
31 | * data type it should be used for. | |
32 | * @note The detector identification is according to AliDAQ. E.g. for ITS | |
33 | * and MUON there are ITSSPD, ITSSDD, ITSSSD, and MUONTRK and MUONTRG | |
34 | * respectively. | |
35 | * | |
36 | * @ingroup alihlt_aliroot_reconstruction | |
37 | */ | |
38 | class AliHLTOUTHandlerDetectorDDL : public AliHLTOUTHandlerEquId { | |
39 | public: | |
40 | /** constructor | |
41 | * the class is initialized with the detector identification and the | |
42 | * data type it should be used for. Note: the detector identification | |
43 | * is according to AliDAQ. E.g. for ITS and MUON there are ITSSPD, | |
44 | * ITSSDD, ITSSSD, and MUONTRK and MUONTRG respectively. | |
45 | */ | |
46 | AliHLTOUTHandlerDetectorDDL(const char* detector, AliHLTComponentDataType dt); | |
47 | /** standard destructor */ | |
48 | virtual ~AliHLTOUTHandlerDetectorDDL(); | |
49 | ||
50 | /** | |
51 | * Process a data block. | |
52 | * Derives the eqipment ID from the DDL offset of the detector and | |
53 | * the DDL no within the detector which corresponds to a bit in the | |
54 | * data specification. Only one bit is allowed to be set. | |
55 | * @return equipment id the block should be used for. | |
56 | */ | |
57 | virtual int ProcessData(AliHLTOUT* pData); | |
58 | ||
59 | private: | |
60 | /** standard constructor prohibited */ | |
61 | AliHLTOUTHandlerDetectorDDL(); | |
62 | /** copy constructor prohibited */ | |
63 | AliHLTOUTHandlerDetectorDDL(const AliHLTOUTHandlerDetectorDDL&); | |
64 | /** assignment operator prohibited */ | |
65 | AliHLTOUTHandlerDetectorDDL& operator=(const AliHLTOUTHandlerDetectorDDL&); | |
66 | ||
67 | int fDDLOffset; //!transient | |
68 | int fNumberOfDDLs; //!transient | |
69 | AliHLTComponentDataType fDt; //!transient | |
70 | ||
71 | ClassDef(AliHLTOUTHandlerDetectorDDL, 0) | |
72 | }; | |
73 | #endif |