]> git.uio.no Git - u/mrichter/AliRoot.git/blame_incremental - TRD/AliTRDfeeParam.h
changes for merging in production mode
[u/mrichter/AliRoot.git] / TRD / AliTRDfeeParam.h
... / ...
CommitLineData
1#ifndef ALITRDFEEPARAM_H
2#define ALITRDFEEPARAM_H
3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6/* $Id$ */
7
8////////////////////////////////////////////////////////////////////////////
9// //
10// TRD front end electronics parameters class //
11// Contains all FEE (MCM, TRAP, PASA) related //
12// parameters, constants, and mapping. //
13// //
14// Author: //
15// Ken Oyama (oyama@physi.uni-heidelberg.de) //
16// //
17// many things now configured by AliTRDtrapConfig reflecting //
18// the real memory structure of the TRAP (Jochen) //
19// //
20////////////////////////////////////////////////////////////////////////////
21
22#include <TObject.h>
23
24class TRootIoCtor;
25
26class AliTRDCommonParam;
27class AliTRDpadPlane;
28class AliTRDgeometry;
29
30//_____________________________________________________________________________
31class AliTRDfeeParam : public TObject
32{
33
34 public:
35
36 AliTRDfeeParam(TRootIoCtor *);
37 AliTRDfeeParam(const AliTRDfeeParam &p);
38 virtual ~AliTRDfeeParam();
39 AliTRDfeeParam &operator=(const AliTRDfeeParam &p);
40 virtual void Copy(TObject &p) const;
41
42 static AliTRDfeeParam *Instance(); // Singleton
43 static void Terminate();
44
45 // Translation from MCM to Pad and vice versa
46 virtual Int_t GetPadRowFromMCM(Int_t irob, Int_t imcm) const;
47 virtual Int_t GetPadColFromADC(Int_t irob, Int_t imcm, Int_t iadc) const;
48 virtual Int_t GetExtendedPadColFromADC(Int_t irob, Int_t imcm, Int_t iadc) const;
49 virtual Int_t GetMCMfromPad(Int_t irow, Int_t icol) const;
50 virtual Int_t GetMCMfromSharedPad(Int_t irow, Int_t icol) const;
51 virtual Int_t GetROBfromPad(Int_t irow, Int_t icol) const;
52 virtual Int_t GetROBfromSharedPad(Int_t irow, Int_t icol) const;
53 virtual Int_t GetRobSide(Int_t irob) const;
54 virtual Int_t GetColSide(Int_t icol) const;
55
56 // SCSN-related
57 static UInt_t AliToExtAli(Int_t rob, Int_t aliid); // Converts the MCM-ROB combination to the extended MCM ALICE ID (used to address MCMs on the SCSN Bus)
58 static Int_t ExtAliToAli( UInt_t dest, UShort_t linkpair, UShort_t rocType, Int_t *list, Int_t listSize); // translates an extended MCM ALICE ID to a list of MCMs
59 static Short_t ChipmaskToMCMlist( UInt_t cmA, UInt_t cmB, UShort_t linkpair, Int_t *mcmList, Int_t listSize );
60 static Short_t GetRobAB( UShort_t robsel, UShort_t linkpair ); // Returns the chamber side (A=0, B=0) of a ROB
61
62 // geometry
63 static Float_t GetSamplingFrequency() { return (Float_t)fgkLHCfrequency / 4000000.0; }
64 static Int_t GetNmcmRob() { return fgkNmcmRob; }
65 static Int_t GetNmcmRobInRow() { return fgkNmcmRobInRow; }
66 static Int_t GetNmcmRobInCol() { return fgkNmcmRobInCol; }
67 static Int_t GetNrobC0() { return fgkNrobC0; }
68 static Int_t GetNrobC1() { return fgkNrobC1; }
69 static Int_t GetNadcMcm() { return fgkNadcMcm; }
70 static Int_t GetNcol() { return fgkNcol; }
71 static Int_t GetNcolMcm() { return fgkNcolMcm; }
72 static Int_t GetNrowC0() { return fgkNrowC0; }
73 static Int_t GetNrowC1() { return fgkNrowC1; }
74
75 // tracklet simulation
76 Bool_t GetTracklet() const { return fgTracklet; }
77 static void SetTracklet(Bool_t trackletSim = kTRUE) { fgTracklet = trackletSim; }
78
79 // Concerning raw data format
80 Int_t GetRAWversion() const { return fRAWversion; }
81 void SetRAWversion( Int_t rawver );
82
83 protected:
84
85 static AliTRDfeeParam *fgInstance; // Singleton instance
86 static Bool_t fgTerminated; // Defines if this class has already been terminated
87
88 AliTRDCommonParam *fCP; // TRD common parameters class
89
90 // Remark: ISO C++ allows initialization of static const values only for integer.
91
92 // Basic Geometrical numbers
93 static const Int_t fgkLHCfrequency = 40079000 ; // [Hz] LHC clock (should be moved to STEER?)
94 static const Int_t fgkNmcmRob = 16; // Number of MCMs per ROB (old fgkMCMmax)
95 static const Int_t fgkNmcmRobInRow = 4; // Number of MCMs per ROB in row dir. (old fgkMCMrow)
96 static const Int_t fgkNmcmRobInCol = 4; // Number of MCMs per ROB in col dir. (old fgkMCMrow)
97 static const Int_t fgkNrobC0 = 6; // Number of ROBs per C0 chamber (old fgkROBmaxC0)
98 static const Int_t fgkNrobC1 = 8; // Number of ROBs per C1 chamber (old fgkROBmaxC1)
99 static const Int_t fgkNadcMcm = 21; // Number of ADC channels per MCM (old fgkADCmax)
100 static const Int_t fgkNcol = 144; // Number of pads per padplane row(old fgkColmax)
101 static const Int_t fgkNcolMcm = 18; // Number of pads per MCM (old fgkPadmax)
102 static const Int_t fgkNrowC0 = 12; // Number of Rows per C0 chamber (old fgkRowmaxC0)
103 static const Int_t fgkNrowC1 = 16; // Number of Rows per C1 chamber (old fgkRowmaxC1)
104
105 // Tracklet processing on/off
106 static Bool_t fgTracklet; // tracklet processing
107
108 // For raw production
109 Int_t fRAWversion; // Raw data production version
110 static const Int_t fgkMaxRAWversion = 3; // Maximum raw version number supported
111
112 private:
113
114 AliTRDfeeParam();
115
116 ClassDef(AliTRDfeeParam,4) // The TRD front end electronics parameter
117
118};
119#endif
120