Line data Source code
1 : /**************************************************************************
2 : * This file is property of and copyright by the ALICE HLT Project *
3 : * All rights reserved. *
4 : * *
5 : * Primary Authors: Markus Fasel *
6 : * *
7 : * Permission to use, copy, modify and distribute this software and its *
8 : * documentation strictly for non-commercial purposes is hereby granted *
9 : * without fee, provided that the above copyright notice appears in all *
10 : * copies and that both the copyright notice and this permission notice *
11 : * appear in the supporting documentation. The authors make no claims *
12 : * about the suitability of this software for any purpose. It is *
13 : * provided "as is" without express or implied warranty. *
14 : **************************************************************************/
15 : #ifndef AliHLTEMCALSTURawDigitMaker_H
16 : #define AliHLTEMCALSTURawDigitMaker_H
17 :
18 : #include <AliHLTCaloTriggerRawDigitDataStruct.h>
19 : #include <TObject.h>
20 : #include <vector>
21 : #include "AliCaloBunchInfo.h"
22 : #include "AliHLTLogging.h"
23 :
24 : class AliCaloRawStreamV3;
25 : class AliEMCALTriggerData;
26 : class AliEMCALTriggerSTUDCSConfig;
27 : class AliEMCALTriggerSTURawStream;
28 : class AliRawReader;
29 :
30 : class AliHLTEMCALGeometry;
31 :
32 : class AliHLTEMCALSTURawDigitMaker : public TObject, public AliHLTLogging {
33 : public:
34 : /**
35 : * Constructor
36 : */
37 : AliHLTEMCALSTURawDigitMaker();
38 :
39 : /**
40 : * Destructor
41 : */
42 : virtual ~AliHLTEMCALSTURawDigitMaker();
43 :
44 : /**
45 : * Post process digits
46 : */
47 : void ProcessSTUStream(AliEMCALTriggerSTURawStream *stustream, Int_t detector);
48 :
49 : /**
50 : * Set the geometry ptr for this class
51 : * @param geo Geometry ptr
52 : */
53 0 : void SetGeometry(const AliHLTEMCALGeometry *geo) { fkGeometryPtr = geo; }
54 :
55 : /**
56 : * Reset indices
57 : */
58 : void Reset();
59 :
60 : Int_t WriteRawDigitsBuffer(AliHLTCaloTriggerRawDigitDataStruct *bufferptr, AliHLTUInt32_t &availableSize) const;
61 :
62 0 : Int_t GetNumberOfRawDigits() const { return fNRawDigits; }
63 :
64 0 : const AliEMCALTriggerData *GetTriggerData() const { return fTriggerData; }
65 :
66 : protected:
67 : enum{
68 : fgkNRawDigits = 5952,
69 : fgkMaxFastorModule = 144
70 : };
71 :
72 :
73 : /**
74 : * Get the raw digit for a given index. If not existing, create it.
75 : * @param index
76 : * @return
77 : */
78 : AliHLTCaloTriggerRawDigitDataStruct &GetRawDigit(Int_t index);
79 :
80 : /** Ptr to the EMCAL geometry */
81 : const AliHLTEMCALGeometry *fkGeometryPtr;
82 : /** DCS Config */
83 : AliEMCALTriggerSTUDCSConfig *fDCSConfigSTU;
84 : /** Raw digit container */
85 : /** Trigger data */
86 : AliEMCALTriggerData *fTriggerData;
87 :
88 : AliHLTCaloTriggerRawDigitDataStruct fRawDigitBuffer[fgkNRawDigits];
89 : /** Raw digit indexes */
90 : Short_t fNRawDigits;
91 : Short_t fRawDigitIndex[fgkNRawDigits];
92 :
93 : private:
94 : AliHLTEMCALSTURawDigitMaker(const AliHLTEMCALSTURawDigitMaker &);
95 : AliHLTEMCALSTURawDigitMaker &operator=(const AliHLTEMCALSTURawDigitMaker &);
96 :
97 6 : ClassDef(AliHLTEMCALSTURawDigitMaker, 1);
98 : };
99 :
100 : #endif
|