1 /**************************************************************************
2 * This file is property of and copyright by the ALICE HLT Project *
3 * ALICE Experiment at CERN, All rights reserved. *
5 * Primary Authors: Oystein Djuvsland <oysteind@ift.uib.no> *
6 * for The ALICE HLT Project. *
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 **************************************************************************/
17 #ifndef ALIHLTCALODIGITHANDLER_H
18 #define ALIHLTCALODIGITHANDLER_H
21 #include "AliHLTLogging.h"
22 #include "../AliHLTCaloConstantsHandler.h"
25 class AliHLTCaloGeometry;
28 struct AliHLTCaloDigitDataStruct;
31 class AliHLTCaloDigitHandler : public AliHLTLogging, public AliHLTCaloConstantsHandler
37 AliHLTCaloDigitHandler(TString detName);
40 virtual ~AliHLTCaloDigitHandler();
43 * Initialise the digit handler
44 * @param runLoader is a pointer to the run loader we're going
46 * @return number of events on success, negative on error
48 virtual Int_t Init(AliRunLoader *runLoader);
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
56 Int_t GetDigits(Int_t module, AliHLTCaloDigitDataStruct *buffer);
60 * @param ev is the event number
61 * @return 0 on success
63 virtual Int_t ProcessEvent(UInt_t ev);
65 /** Return the data type produced */
66 virtual AliHLTComponentDataType GetDataType() = 0;
70 /** Convert an offline digit to a HLT digit */
71 virtual Int_t ConvertDigit(AliDigitNew *digit) = 0;
73 /** Initialise the digit array */
74 void InitDigitArray();
76 /** Reset the digit array */
77 void ResetDigitArray();
80 AliRunLoader *fRunLoader;
82 /** Detector loader */
83 AliLoader *fDetLoader;
85 /** Number of events */
86 UInt_t fNumberOfEvents;
91 /** Array of translated digits for each module */
92 AliHLTCaloDigitDataStruct **fDigits;
94 /** Number of digits in each module */
95 Int_t *fDigitsInModule;
97 /** Geometry class, must be initialised by child class */
98 AliHLTCaloGeometry *fGeometry;
100 /** The current event */
101 UInt_t fCurrentEvent;
106 /** Constructor Prohibited*/
107 AliHLTCaloDigitHandler();
110 AliHLTCaloDigitHandler(const AliHLTCaloDigitHandler& );
113 AliHLTCaloDigitHandler& operator=(const AliHLTCaloDigitHandler& );
115 ClassDef(AliHLTCaloDigitHandler, 0);
118 #endif // ALIHLTCALODIGITHANDLER_H