]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/misc/AliL3TPCMapping.h
New version of SPD raw-data reconstruction. The format now correponds to the actual...
[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
3e87ef69 14 public:
5929c18d 15 virtual ~AliL3TPCMapping() {}
3e87ef69 16 //taken from GSI TPC numbering document
17 static Int_t GetRealNPads(Int_t slicerow); //Number of pads per row
18 static Double_t GetRealX(Int_t slicerow); //Local X in cm for modules 0,36
19 static Double_t GetRealY(Int_t slicerow, Int_t pad); //Local Y in cm for modules 0,36
20
54b54089 21 private:
22 static const Int_t fgkNIROC; // Number of inner ROC
23 static const Int_t fgkIRows[fNIROC_def];// Inner rows
24 static const Int_t fgkIPad[fNIROC_def]; // Inner pads
25 static const Int_t fgkICon[fNIROC_def]; // Inner con(?)
26 static const Int_t fgkIPin[fNIROC_def]; // Inner pin(?)
27 static const Int_t fgkIFec[fNIROC_def]; // Inner fec(?)
28 static const Int_t fgkIFecChannel[fNIROC_def]; // Inner fec(?) channel
29 static const Int_t fgkIFecCon[fNIROC_def]; // Inner fec(?) con(?)
30
31 static const Int_t fgkNOROC; // Number of outer ROC
32 static const Int_t fgkORows[fNOROC_def]; // Outer rows
33 static const Int_t fgkOPad[fNOROC_def]; // Outer pads
34 static const Int_t fgkOCon[fNOROC_def]; // Outer con(?)
35 static const Int_t fgkOPin[fNOROC_def]; // Outer pin(?)
36 static const Int_t fgkOFec[fNOROC_def]; // Outer fec(?)
37 static const Int_t fgkOFecChannel[fNOROC_def]; // Outer fec(?) channel
38 static const Int_t fgkOFecCon[fNOROC_def]; // Outer fec(?) con(?)
39
3e87ef69 40 ClassDef(AliL3TPCMapping,1)
41};
42#endif
43
44
45#if __old__
46
47#include <iostream.h>
48#include <fstream.h>
49#include <stdio.h>
50#include <stdlib.h>
51#include <fcntl.h>
52/*
53g++ -O3 -c -o TPCMapping.o TPCMapping.C
54g++ -O3 TPCMapping.o -o TPCMappingmain.app TPCMappingmain.C
55*/
56
57class TPCMapping
58{
59 public:
60 TPCMapping(char *file);
61 ~TPCMapping();
62 void open();
63 void isOpen();
64 void read();
65 void read(int* listofRCUs, int numofRCU);
66 void print();
67 void print(int index);
68 void print(int start, int end);
69 void myprint();
70 void myprint1();
71 void myprint2();
72 //COLUMN 0 -> INDEX (0 - 9983)
73 //COLUMN 1 -> PADROW (0 - 95)
74 //COLUMN 2 -> PAD (0 - (Np-1))
75 //COLUMN 3 -> Connector (1 - 468)
76 //COLUMN 4 -> Pin (0 - 22)
77 //COLUMN 5 -> FEC (0 - 77)
78 //COLUMN 6 -> FEC Channel (0 - 127)
79 //COLUMN 7 -> FEC Connector (0 - 5)
80 int getIndex(int index);
81 int getPadrow(int index);
82 int getPad(int index);
83 int getConnector(int index);
84 int getPin(int index);
85 int getFEC(int index);
86 int getFECchannel(int index);
87 int getFECconnector(int index);
88 int getAltroChannel(int index);
89 int getAltro(int index);
90
91 int getPadsperRow(int row);
92
93 private:
94 int kreadfile;
95// int kpartialread;
96 ifstream *fin;
97 char* ffile;
98 short fIRORC [5504][8];
99 int fsizeoffIRORC;
100};
101
102
103#endif