L3 becomes HLT
[u/mrichter/AliRoot.git] / HLT / misc / AliHLTTPCMapping.h
CommitLineData
3e87ef69 1// @(#) $Id$
2
3#ifndef ALIL3TPCMAPPING_H
4#define ALIL3TPCMAPPING_H
5
4aa41877 6#include "AliHLTRootTypes.h"
3e87ef69 7
8#define fNIROC_def 5504 //see ulis file
9#define fNOROC_def 9984 //see ulis file
10
11
4aa41877 12class AliHLTTPCMapping {
3e87ef69 13
3e87ef69 14 public:
4aa41877 15 virtual ~AliHLTTPCMapping() {}
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
4aa41877 40 ClassDef(AliHLTTPCMapping,1)
3e87ef69 41};
4aa41877 42
43typedef AliHLTTPCMapping AliL3TPCMapping; // for backward compatibility
44
3e87ef69 45#endif
46
47
48#if __old__
49
50#include <iostream.h>
51#include <fstream.h>
52#include <stdio.h>
53#include <stdlib.h>
54#include <fcntl.h>
55/*
56g++ -O3 -c -o TPCMapping.o TPCMapping.C
57g++ -O3 TPCMapping.o -o TPCMappingmain.app TPCMappingmain.C
58*/
59
60class TPCMapping
61{
62 public:
63 TPCMapping(char *file);
64 ~TPCMapping();
65 void open();
66 void isOpen();
67 void read();
68 void read(int* listofRCUs, int numofRCU);
69 void print();
70 void print(int index);
71 void print(int start, int end);
72 void myprint();
73 void myprint1();
74 void myprint2();
75 //COLUMN 0 -> INDEX (0 - 9983)
76 //COLUMN 1 -> PADROW (0 - 95)
77 //COLUMN 2 -> PAD (0 - (Np-1))
78 //COLUMN 3 -> Connector (1 - 468)
79 //COLUMN 4 -> Pin (0 - 22)
80 //COLUMN 5 -> FEC (0 - 77)
81 //COLUMN 6 -> FEC Channel (0 - 127)
82 //COLUMN 7 -> FEC Connector (0 - 5)
83 int getIndex(int index);
84 int getPadrow(int index);
85 int getPad(int index);
86 int getConnector(int index);
87 int getPin(int index);
88 int getFEC(int index);
89 int getFECchannel(int index);
90 int getFECconnector(int index);
91 int getAltroChannel(int index);
92 int getAltro(int index);
93
94 int getPadsperRow(int row);
95
96 private:
97 int kreadfile;
98// int kpartialread;
99 ifstream *fin;
100 char* ffile;
101 short fIRORC [5504][8];
102 int fsizeoffIRORC;
103};
3e87ef69 104#endif