ROOT logo
#ifndef HRPCLOOKUPGEOM_H
#define HRPCLOOKUPGEOM_H

#include "TNamed.h"
#include "TObjArray.h"
#include "hparset.h"

class HParIo;

class HRpcLookupGCell: public TObject {
protected:
    Int_t fLeftFeeAddress;        //left fee addr from lookuptable
    Int_t fRightFeeAddress;       //right fee addr from lookuptable
public:
    HRpcLookupGCell() {
	fLeftFeeAddress  = -1;
	fRightFeeAddress = -1;
    }
    ~HRpcLookupGCell() {}

    void fill(Int_t lFee=-1,Int_t rFee=-1) {
	fLeftFeeAddress  = lFee;
	fRightFeeAddress = rFee;
    }
    Int_t getLeftMBOnum();
    Int_t getLeftDBOnum();
    Int_t getLeftTRBnum();
    Int_t getRightMBOnum();
    Int_t getRightDBOnum();
    Int_t getRightTRBnum();
    void  getTrbMboDboLeftNum(Int_t& trbnum,Int_t& mbonum,Int_t& dbonum);
    void  getTrbMboDboRightNum(Int_t& trbnum,Int_t& mbonum,Int_t& dbonum);
    Int_t getLeftFEEAddress( )  { return fLeftFeeAddress; }
    Int_t getRightFEEAddress( ) { return fRightFeeAddress; }
    void  getLeftRightRegAdd(Int_t sec, Int_t& leftRegNum, Int_t& rightRegNum);
    void  setLeftFEEAddress(Int_t ladd = -1)  { fLeftFeeAddress  = ladd; }
    void  setRightFEEAddress(Int_t radd = -1) { fRightFeeAddress = radd; }

    void clear() {
	fLeftFeeAddress  = -1;
	fRightFeeAddress = -1;
    }
    ClassDef(HRpcLookupGCell,1) // RPC cell geom->FEE
};


class HRpcLookupGCol: public TObject {
protected:
    TObjArray* array;
public:
    HRpcLookupGCol(Int_t n = 0);
    ~HRpcLookupGCol();
    HRpcLookupGCell& operator[](Int_t i) {
	return *static_cast<HRpcLookupGCell*>((*array)[i]);
    }
    Int_t getSize() {return array->GetEntries();}
    ClassDef(HRpcLookupGCol,1) // Layer level of RPC lookup table (cell->channel)
};

class HRpcLookupGSec: public TObject {
protected:
  TObjArray* array;
public:
    HRpcLookupGSec(Int_t n = 0);
    ~HRpcLookupGSec();
    HRpcLookupGCol& operator[](Int_t i) {
	return *static_cast<HRpcLookupGCol*>((*array)[i]);
    }
    Int_t getSize() {return array->GetEntries();}
    ClassDef(HRpcLookupGSec,1) // Sector level of RPC lookup table (cell->channel)
};


class HRpcLookupGeom : public HParSet {
protected:
  TObjArray* array;     // array of pointers
public:
    HRpcLookupGeom(const Char_t* name="RpcLookupGeom",
				   const Char_t* title="Rpc lookup table from geom to channel",
				   const Char_t* context="",
				   Int_t n = 6);
    ~HRpcLookupGeom();
    HRpcLookupGSec& operator[](Int_t i) {
	return *static_cast<HRpcLookupGSec*>((*array)[i]);
    }
    Bool_t init(HParIo* input);
    Int_t  write(HParIo* output);
    Bool_t writeline(Char_t *, Int_t, Int_t, Int_t);
    void   putAsciiHeader(TString&);
    Int_t  getSize() {return array->GetEntries();}
    void   clear();
    ClassDef(HRpcLookupGeom,1) //  RPC lookup table (cell->channel)
};


















#endif /* !HRPCLOOKUPGEOM_H */

 hrpclookupgeom.h:1
 hrpclookupgeom.h:2
 hrpclookupgeom.h:3
 hrpclookupgeom.h:4
 hrpclookupgeom.h:5
 hrpclookupgeom.h:6
 hrpclookupgeom.h:7
 hrpclookupgeom.h:8
 hrpclookupgeom.h:9
 hrpclookupgeom.h:10
 hrpclookupgeom.h:11
 hrpclookupgeom.h:12
 hrpclookupgeom.h:13
 hrpclookupgeom.h:14
 hrpclookupgeom.h:15
 hrpclookupgeom.h:16
 hrpclookupgeom.h:17
 hrpclookupgeom.h:18
 hrpclookupgeom.h:19
 hrpclookupgeom.h:20
 hrpclookupgeom.h:21
 hrpclookupgeom.h:22
 hrpclookupgeom.h:23
 hrpclookupgeom.h:24
 hrpclookupgeom.h:25
 hrpclookupgeom.h:26
 hrpclookupgeom.h:27
 hrpclookupgeom.h:28
 hrpclookupgeom.h:29
 hrpclookupgeom.h:30
 hrpclookupgeom.h:31
 hrpclookupgeom.h:32
 hrpclookupgeom.h:33
 hrpclookupgeom.h:34
 hrpclookupgeom.h:35
 hrpclookupgeom.h:36
 hrpclookupgeom.h:37
 hrpclookupgeom.h:38
 hrpclookupgeom.h:39
 hrpclookupgeom.h:40
 hrpclookupgeom.h:41
 hrpclookupgeom.h:42
 hrpclookupgeom.h:43
 hrpclookupgeom.h:44
 hrpclookupgeom.h:45
 hrpclookupgeom.h:46
 hrpclookupgeom.h:47
 hrpclookupgeom.h:48
 hrpclookupgeom.h:49
 hrpclookupgeom.h:50
 hrpclookupgeom.h:51
 hrpclookupgeom.h:52
 hrpclookupgeom.h:53
 hrpclookupgeom.h:54
 hrpclookupgeom.h:55
 hrpclookupgeom.h:56
 hrpclookupgeom.h:57
 hrpclookupgeom.h:58
 hrpclookupgeom.h:59
 hrpclookupgeom.h:60
 hrpclookupgeom.h:61
 hrpclookupgeom.h:62
 hrpclookupgeom.h:63
 hrpclookupgeom.h:64
 hrpclookupgeom.h:65
 hrpclookupgeom.h:66
 hrpclookupgeom.h:67
 hrpclookupgeom.h:68
 hrpclookupgeom.h:69
 hrpclookupgeom.h:70
 hrpclookupgeom.h:71
 hrpclookupgeom.h:72
 hrpclookupgeom.h:73
 hrpclookupgeom.h:74
 hrpclookupgeom.h:75
 hrpclookupgeom.h:76
 hrpclookupgeom.h:77
 hrpclookupgeom.h:78
 hrpclookupgeom.h:79
 hrpclookupgeom.h:80
 hrpclookupgeom.h:81
 hrpclookupgeom.h:82
 hrpclookupgeom.h:83
 hrpclookupgeom.h:84
 hrpclookupgeom.h:85
 hrpclookupgeom.h:86
 hrpclookupgeom.h:87
 hrpclookupgeom.h:88
 hrpclookupgeom.h:89
 hrpclookupgeom.h:90
 hrpclookupgeom.h:91
 hrpclookupgeom.h:92
 hrpclookupgeom.h:93
 hrpclookupgeom.h:94
 hrpclookupgeom.h:95
 hrpclookupgeom.h:96
 hrpclookupgeom.h:97
 hrpclookupgeom.h:98
 hrpclookupgeom.h:99
 hrpclookupgeom.h:100
 hrpclookupgeom.h:101
 hrpclookupgeom.h:102
 hrpclookupgeom.h:103
 hrpclookupgeom.h:104
 hrpclookupgeom.h:105
 hrpclookupgeom.h:106
 hrpclookupgeom.h:107
 hrpclookupgeom.h:108
 hrpclookupgeom.h:109
 hrpclookupgeom.h:110
 hrpclookupgeom.h:111
 hrpclookupgeom.h:112
 hrpclookupgeom.h:113