]>
Commit | Line | Data |
---|---|---|
868a198e | 1 | /************************************************************************** |
2 | * This file is property of and copyright by the ALICE HLT Project * | |
3 | * ALICE Experiment at CERN, All rights reserved. * | |
4 | * * | |
5 | * Primary Authors: Oystein Djuvsland <oysteind@ift.uib.no> * | |
6 | * for The ALICE HLT Project. * | |
7 | * * | |
8 | * Permission to use, copy, modify and distribute this software and its * | |
9 | * documentation strictly for non-commercial purposes is hereby granted * | |
10 | * without fee, provided that the above copyright notice appears in all * | |
11 | * copies and that both the copyright notice and this permission notice * | |
12 | * appear in the supporting documentation. The authors make no claims * | |
13 | * about the suitability of this software for any purpose. It is * | |
14 | * provided "as is" without express or implied warranty. * | |
15 | **************************************************************************/ | |
16 | ||
17 | #ifndef ALIHLTCALODIGITHANDLER_H | |
18 | #define ALIHLTCALODIGITHANDLER_H | |
19 | ||
20 | #include "Rtypes.h" | |
21 | #include "AliHLTLogging.h" | |
22 | #include "../AliHLTCaloConstantsHandler.h" | |
23 | ||
24 | class AliDigitNew; | |
25 | class AliHLTCaloGeometry; | |
26 | class TTree; | |
27 | class AliRunLoader; | |
4487d14c | 28 | struct AliHLTCaloDigitDataStruct; |
868a198e | 29 | class AliLoader; |
30 | ||
31 | class AliHLTCaloDigitHandler : public AliHLTLogging, public AliHLTCaloConstantsHandler | |
32 | { | |
33 | ||
34 | public: | |
35 | ||
36 | /** Constructor */ | |
37 | AliHLTCaloDigitHandler(TString detName); | |
38 | ||
39 | /** Destructor */ | |
40 | virtual ~AliHLTCaloDigitHandler(); | |
41 | ||
42 | /** | |
43 | * Initialise the digit handler | |
44 | * @param runLoader is a pointer to the run loader we're going | |
45 | * to use. | |
46 | * @return number of events on success, negative on error | |
47 | */ | |
48 | virtual Int_t Init(AliRunLoader *runLoader); | |
49 | ||
50 | /** | |
51 | * Get digits for the specified module | |
52 | * @param module is the module number | |
53 | * @param buffer is the data buffer to fill the digits | |
54 | * @param return number of digits | |
55 | */ | |
56 | Int_t GetDigits(Int_t module, AliHLTCaloDigitDataStruct *buffer); | |
57 | ||
58 | /** | |
59 | * Process event | |
60 | * @param ev is the event number | |
61 | * @return 0 on success | |
62 | */ | |
63 | virtual Int_t ProcessEvent(UInt_t ev); | |
64 | ||
65 | /** Return the data type produced */ | |
66 | virtual AliHLTComponentDataType GetDataType() = 0; | |
67 | ||
68 | protected: | |
69 | ||
70 | /** Convert an offline digit to a HLT digit */ | |
71 | virtual Int_t ConvertDigit(AliDigitNew *digit) = 0; | |
72 | ||
73 | /** Initialise the digit array */ | |
74 | void InitDigitArray(); | |
75 | ||
76 | /** Reset the digit array */ | |
77 | void ResetDigitArray(); | |
78 | ||
79 | /** Run loader */ | |
80 | AliRunLoader *fRunLoader; | |
81 | ||
82 | /** Detector loader */ | |
83 | AliLoader *fDetLoader; | |
84 | ||
85 | /** Number of events */ | |
86 | UInt_t fNumberOfEvents; | |
87 | ||
88 | /** Tree of digits */ | |
89 | TTree *fDigitTree; | |
90 | ||
91 | /** Array of translated digits for each module */ | |
92 | AliHLTCaloDigitDataStruct **fDigits; | |
93 | ||
94 | /** Number of digits in each module */ | |
95 | Int_t *fDigitsInModule; | |
96 | ||
97 | /** Geometry class, must be initialised by child class */ | |
98 | AliHLTCaloGeometry *fGeometry; | |
99 | ||
100 | /** The current event */ | |
101 | UInt_t fCurrentEvent; | |
102 | ||
103 | private: | |
104 | ||
105 | ||
106 | /** Constructor Prohibited*/ | |
107 | AliHLTCaloDigitHandler(); | |
108 | ||
109 | /** Prohibited */ | |
110 | AliHLTCaloDigitHandler(const AliHLTCaloDigitHandler& ); | |
111 | ||
112 | /** Prohibited */ | |
113 | AliHLTCaloDigitHandler& operator=(const AliHLTCaloDigitHandler& ); | |
114 | ||
115 | ClassDef(AliHLTCaloDigitHandler, 0); | |
116 | }; | |
117 | ||
118 | #endif // ALIHLTCALODIGITHANDLER_H |