]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TOF/AliTOFFEEReader.h
Merging of the three alignment macros into one
[u/mrichter/AliRoot.git] / TOF / AliTOFFEEReader.h
CommitLineData
1605abc6 1#ifndef ALITOFFEEREADER_H
2#define ALITOFFEEREADER_H
3
4/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
6
7///////////////////////////////////////////////////////////////
8// //
9// This class provides the TOF FEE reader. //
10// //
11///////////////////////////////////////////////////////////////
12
13/*
14 * author: Roberto Preghenella (R+), Roberto.Preghenella@bo.infn.it
15 */
16
17#include "TObject.h"
39dff6a4 18//#include "AliTOFGeometry.h"
1605abc6 19
20class AliTOFFEEConfig;
21
22class AliTOFFEEReader :
23public TObject
24{
25
1605abc6 26 public:
27
28 AliTOFFEEReader(); // default constructor
29 AliTOFFEEReader(const AliTOFFEEReader &source); // copy constructor
30 AliTOFFEEReader &operator=(const AliTOFFEEReader &source); // operator =
31 virtual ~AliTOFFEEReader(); // default destructor
32
33 /* getters */
34 static Int_t GetNumberOfDDLs() {return fgkNumberOfDDLs;}; // get number of DDLs
35 static Int_t GetNumberOfTRMs() {return fgkNumberOfTRMs;}; // get number of TRMs
36 static Int_t GetNumberOfChains() {return fgkNumberOfChains;}; // get number of chains
37 static Int_t GetNumberOfTDCs() {return fgkNumberOfTDCs;}; // get number of TDCs
38 static Int_t GetNumberOfChannels() {return fgkNumberOfChannels;}; // get number of channels
39 static Int_t GetNumberOfIndexes() {return fgkNumberOfIndexes;}; // get number of indexes
40 AliTOFFEEConfig *GetFEEConfig() const {return fFEEConfig;}; // get FEE config
41 Bool_t GetChannelEnabled(Int_t iIndex) const {return iIndex < GetNumberOfIndexes() ? fChannelEnabled[iIndex] : kFALSE;}; // get channel enabled
b059882a 42 Int_t GetMatchingWindow(Int_t iIndex) const {return iIndex < GetNumberOfIndexes() ? fMatchingWindow[iIndex] : 0;}; // get matching window
1605abc6 43
44 /* setters */
45
46 /* methods */
39dff6a4 47 void LoadFEEConfig(const Char_t *FileName) const; // load FEE config
1605abc6 48 void DumpFEEConfig(); // dump FEE config
49 Int_t ParseFEEConfig(); // parse FEE config
50 void ResetChannelEnabledArray(); // reset channel enabled array
b059882a 51 void Reset(); // reset channel enabled array
39dff6a4 52 Bool_t IsChannelEnabled(Int_t iDDL, Int_t iTRM, Int_t iChain, Int_t iTDC, Int_t iChannel) const; // is channel enabled
53 Bool_t IsChannelEnabled(Int_t iIndex) const {return GetChannelEnabled(iIndex);}; // is channel enabled
b059882a 54 Int_t GetMatchingWindow(Int_t iDDL, Int_t iTRM, Int_t iChain, Int_t iTDC, Int_t iChannel) const; // get matching window
1605abc6 55
39dff6a4 56 private:
57
58 static const Int_t fgkNumberOfDDLs = 72; // number of DDLs
59 static const Int_t fgkNumberOfTRMs = 10; // number of TRMs
60 static const Int_t fgkNumberOfChains = 2; // number of chains
61 static const Int_t fgkNumberOfTDCs = 15; // number of TDCs
62 static const Int_t fgkNumberOfChannels = 8; // number of channels
63 static const Int_t fgkNumberOfIndexes = 157248; // number of indexes
64
65 AliTOFFEEConfig *fFEEConfig; // FEE config
66 Bool_t fChannelEnabled[fgkNumberOfIndexes]; // channel enabled
b059882a 67 Int_t fMatchingWindow[fgkNumberOfIndexes]; // matching window
39dff6a4 68
1605abc6 69 ClassDef(AliTOFFEEReader, 1);
70
71};
72
73#endif /* ALITOFFEEREADER_H */