ROOT logo
#ifndef HMDCLOOKUPRAW_H
#define HMDCLOOKUPRAW_H

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

class HParIo;

class HMdcLookupCell: public TObject {
protected:
  Int_t nMoth;        // number of the Motherboard
  Int_t nChan;        // number of the TDC channel
  Char_t readoutSide; // side, where thes signal is read out
public:
  HMdcLookupCell(Int_t m=-1,Int_t c=-1, Char_t s='0') {
    nMoth=m;
    nChan=c;
    readoutSide=s;
  }
  ~HMdcLookupCell() {}
  void setNMoth(Int_t m) {nMoth=m;}
  void setNChan(Int_t c) {nChan=c;}
  void setReadoutSide(Char_t s) {
    readoutSide=(s=='L'||s=='R'||s=='U') ? s : '0';
  }
  void fill(Int_t m,Int_t c,Char_t s) {
    nMoth=m;
    nChan=c;
    setReadoutSide(s);
  }
  Int_t getNMoth() {return nMoth;}
  Int_t getNChan() {return nChan;}
  Char_t getReadoutSide() {return readoutSide;}
  void clear() {
    nMoth=-1;
    nChan=-1;
    readoutSide='0';
  }
  ClassDef(HMdcLookupCell,2) // Cell level of MDC lookup table (cell->channel)
};


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


class HMdcLookupRMod: public TObject {
protected:
  TObjArray* array;
public:
  HMdcLookupRMod(Int_t n=6);
  ~HMdcLookupRMod();
  HMdcLookupLayer& operator[](Int_t i) {
    return *static_cast<HMdcLookupLayer*>((*array)[i]);
  }
  Int_t getSize() {return array->GetEntries();}
  void createLayer(Int_t, Int_t);
  ClassDef(HMdcLookupRMod,1) // Module level of MDC lookup table (cell->channel)
};


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


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

#endif /* !HMDCLOOKUPRAW_H */

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