]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/misc/AliL3TPCMapping.h
Merged HLT tag v1-2 with ALIROOT tag v3-09-Release.
[u/mrichter/AliRoot.git] / HLT / misc / AliL3TPCMapping.h
CommitLineData
3e87ef69 1// @(#) $Id$
2
3#ifndef ALIL3TPCMAPPING_H
4#define ALIL3TPCMAPPING_H
5
6#include "AliL3RootTypes.h"
7
8#define fNIROC_def 5504 //see ulis file
9#define fNOROC_def 9984 //see ulis file
10
11
12class AliL3TPCMapping {
13
14 private:
15 static const Int_t fNIROC;
16 static const Int_t fIRows[fNIROC_def];
17 static const Int_t fIPad[fNIROC_def];
18 static const Int_t fICon[fNIROC_def];
19 static const Int_t fIPin[fNIROC_def];
20 static const Int_t fIFec[fNIROC_def];
21 static const Int_t fIFecChannel[fNIROC_def];
22 static const Int_t fIFecCon[fNIROC_def];
23
24 static const Int_t fNOROC;
25 static const Int_t fORows[fNOROC_def];
26 static const Int_t fOPad[fNOROC_def];
27 static const Int_t fOCon[fNOROC_def];
28 static const Int_t fOPin[fNOROC_def];
29 static const Int_t fOFec[fNOROC_def];
30 static const Int_t fOFecChannel[fNOROC_def];
31 static const Int_t fOFecCon[fNOROC_def];
32
33 public:
34 //taken from GSI TPC numbering document
35 static Int_t GetRealNPads(Int_t slicerow); //Number of pads per row
36 static Double_t GetRealX(Int_t slicerow); //Local X in cm for modules 0,36
37 static Double_t GetRealY(Int_t slicerow, Int_t pad); //Local Y in cm for modules 0,36
38
39 ClassDef(AliL3TPCMapping,1)
40};
41#endif
42
43
44#if __old__
45
46#include <iostream.h>
47#include <fstream.h>
48#include <stdio.h>
49#include <stdlib.h>
50#include <fcntl.h>
51/*
52g++ -O3 -c -o TPCMapping.o TPCMapping.C
53g++ -O3 TPCMapping.o -o TPCMappingmain.app TPCMappingmain.C
54*/
55
56class TPCMapping
57{
58 public:
59 TPCMapping(char *file);
60 ~TPCMapping();
61 void open();
62 void isOpen();
63 void read();
64 void read(int* listofRCUs, int numofRCU);
65 void print();
66 void print(int index);
67 void print(int start, int end);
68 void myprint();
69 void myprint1();
70 void myprint2();
71 //COLUMN 0 -> INDEX (0 - 9983)
72 //COLUMN 1 -> PADROW (0 - 95)
73 //COLUMN 2 -> PAD (0 - (Np-1))
74 //COLUMN 3 -> Connector (1 - 468)
75 //COLUMN 4 -> Pin (0 - 22)
76 //COLUMN 5 -> FEC (0 - 77)
77 //COLUMN 6 -> FEC Channel (0 - 127)
78 //COLUMN 7 -> FEC Connector (0 - 5)
79 int getIndex(int index);
80 int getPadrow(int index);
81 int getPad(int index);
82 int getConnector(int index);
83 int getPin(int index);
84 int getFEC(int index);
85 int getFECchannel(int index);
86 int getFECconnector(int index);
87 int getAltroChannel(int index);
88 int getAltro(int index);
89
90 int getPadsperRow(int row);
91
92 private:
93 int kreadfile;
94// int kpartialread;
95 ifstream *fin;
96 char* ffile;
97 short fIRORC [5504][8];
98 int fsizeoffIRORC;
99};
100
101
102#endif