ROOT logo
#ifndef HTRB2CORRECTION_H

#define HTRB2CORRECTION_H


#include "TNamed.h"

#include "TArrayF.h"


using namespace std;
#include <fstream>


class HTrb2Correction: public TNamed {
protected:
  const Int_t nValuesPerChannel; // number of values per channel

  TString boardType;             // type of board

  Int_t subeventId;              // related subevent id

  Int_t nChannels;               // number of channels with corrections

  Int_t highResolutionFlag;      // 0 = low resolution, 1 = high resolution 

  TArrayF corrData;              // correction data for the tdc channels

public:
  HTrb2Correction(const Char_t* temperatureSensor="");
  ~HTrb2Correction() {;}
  Int_t getNChannels() { return nChannels; }
  Int_t getHighResolutionFlag() { return highResolutionFlag; }
  Bool_t isHighResolution() {return (0==highResolutionFlag) ? kFALSE : kTRUE;}
  const Char_t* getBoardType() { return boardType.Data(); }
  Int_t getSubeventId() { return subeventId; }
  Int_t getNValuesPerChannel() { return nValuesPerChannel; }
  Int_t getSize() { return corrData.GetSize(); }
  Float_t getCorrection(Int_t, Int_t);
  void setBoardType(const Char_t* t) { boardType=t; }
  void setHighResolutionFlag(Int_t f) {highResolutionFlag=f; }
  void setSubeventId(Int_t i) {subeventId=i; }
  Float_t* makeArray();
  void deleteArray();
  void setCorrection(Int_t c, Int_t i, Float_t v);
  Bool_t fillArray(Float_t*,Int_t);
  void clearArray();
  void print();
  void write(fstream&);
  Float_t compare(HTrb2Correction&);
  Float_t* getCorrections() {
    return corrData.GetArray();
  }
  ClassDef(HTrb2Correction,1) // Correction table for the tdc channels of one TRB board

};

#endif  /*!HTRB2CORRECTION_H*/

 htrb2correction.h:1
 htrb2correction.h:2
 htrb2correction.h:3
 htrb2correction.h:4
 htrb2correction.h:5
 htrb2correction.h:6
 htrb2correction.h:7
 htrb2correction.h:8
 htrb2correction.h:9
 htrb2correction.h:10
 htrb2correction.h:11
 htrb2correction.h:12
 htrb2correction.h:13
 htrb2correction.h:14
 htrb2correction.h:15
 htrb2correction.h:16
 htrb2correction.h:17
 htrb2correction.h:18
 htrb2correction.h:19
 htrb2correction.h:20
 htrb2correction.h:21
 htrb2correction.h:22
 htrb2correction.h:23
 htrb2correction.h:24
 htrb2correction.h:25
 htrb2correction.h:26
 htrb2correction.h:27
 htrb2correction.h:28
 htrb2correction.h:29
 htrb2correction.h:30
 htrb2correction.h:31
 htrb2correction.h:32
 htrb2correction.h:33
 htrb2correction.h:34
 htrb2correction.h:35
 htrb2correction.h:36
 htrb2correction.h:37
 htrb2correction.h:38
 htrb2correction.h:39
 htrb2correction.h:40
 htrb2correction.h:41
 htrb2correction.h:42
 htrb2correction.h:43
 htrb2correction.h:44
 htrb2correction.h:45
 htrb2correction.h:46