]>
Commit | Line | Data |
---|---|---|
2ab3623b | 1 | #ifndef ALIMUONTRIGGERIO_H |
2 | #define ALIMUONTRIGGERIO_H | |
3 | ||
4 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
5 | * See cxx source for full Copyright notice */ | |
6 | ||
7 | // $Id$ | |
8 | ||
9 | /// \ingroup trigger | |
10 | /// \class AliMUONTriggerIO | |
11 | /// \brief Handles read/write of masks and LUT to/from online files | |
12 | /// | |
13 | // Author Laurent Aphecetche, Subatech | |
14 | ||
15 | #ifndef ROOT_TArrayI | |
890cc210 | 16 | # include <TArrayI.h> |
2ab3623b | 17 | #endif |
18 | ||
19 | #ifndef ROOT_TObject | |
890cc210 | 20 | # include <TObject.h> |
2ab3623b | 21 | #endif |
22 | ||
890cc210 | 23 | #include <Riostream.h> |
24 | ||
25 | class AliMUONTriggerLut; | |
2ab3623b | 26 | class AliMUONVCalibParam; |
27 | class AliMUONVStore; | |
28 | ||
29 | class AliMUONTriggerIO : public TObject | |
30 | { | |
31 | public: | |
32 | AliMUONTriggerIO(); | |
890cc210 | 33 | AliMUONTriggerIO(const char* regionalFileToRead); |
2ab3623b | 34 | virtual ~AliMUONTriggerIO(); |
35 | ||
36 | Bool_t ReadMasks(const char* localFile, | |
37 | const char* regionalFile, | |
38 | const char* globalFile, | |
39 | AliMUONVStore* localMasks, | |
40 | AliMUONVStore* regionalMasks, | |
41 | AliMUONVCalibParam* globalMasks); | |
42 | ||
890cc210 | 43 | Bool_t ReadLUT(const char* lutFileToRead, AliMUONTriggerLut& lut); |
44 | ||
45 | Bool_t WriteLUT(const AliMUONTriggerLut& lut, | |
46 | const char* lutFileToWrite); | |
47 | ||
2ab3623b | 48 | // void SetLocalBoardIds(const TArrayI& localBoardIds); |
49 | ||
50 | // Bool_t WriteMasks(AliMUONVStore* localMasks, | |
51 | // AliMUONVStore* regionalMasks, | |
52 | // AliMUONVCalibParam* globalMasks) const; | |
53 | ||
54 | private: | |
55 | ||
890cc210 | 56 | void DeCompAddress(UChar_t &ypos, UChar_t &ytri, UChar_t &xdev, UChar_t &xpos, |
57 | UShort_t address) const; | |
58 | ||
59 | void FillLut(AliMUONTriggerLut& lut, | |
60 | Int_t icirc, UChar_t istripX, UChar_t idev, | |
61 | Int_t lutLpt[16][2], Int_t lutHpt[16][2]) ; | |
62 | ||
2ab3623b | 63 | Int_t LocalBoardId(Int_t index) const; |
64 | ||
65 | /// Return number of local boards | |
66 | Int_t NofLocalBoards() const { return fNofLocalBoards; } | |
67 | ||
68 | Int_t ReadRegional(const char* regionalFile, AliMUONVStore* regionalMasks); | |
69 | ||
70 | Int_t ReadLocalMasks(const char* localFile, AliMUONVStore& localMasks) const; | |
71 | ||
890cc210 | 72 | void ReadLocalLUT(AliMUONTriggerLut& lut, Int_t localBoardId, FILE* flut); |
73 | ||
74 | void WriteLocalLUT(const AliMUONTriggerLut& lut, Int_t localBoardId, | |
75 | FILE* flut); | |
76 | ||
2ab3623b | 77 | // void WriteRegional() const; |
78 | ||
79 | private: | |
80 | TArrayI fLocalBoardIds; //!< order of the localboards | |
81 | Int_t fNofLocalBoards; //!< number of local boards | |
82 | ||
83 | ClassDef(AliMUONTriggerIO,0) // Read/Write trigger masks and LUT to/from online files | |
84 | }; | |
85 | ||
86 | #endif |