#ifndef HRICHMAPPINGPAR_H
#define HRICHMAPPINGPAR_H
#include "hparset.h"
#include "richdef.h"
class HRichMappingPar : public HParSet {
private:
Int_t fAddrArrHW[RICH_SIZE_HW];
Int_t fAddrArrSW[RICH_SIZE_SW];
public:
HRichMappingPar(const Char_t* name = "RichMappingParameters",
const Char_t* title = "Rich Mapping Parameters",
const Char_t* context = "RichMappingParProduction");
~HRichMappingPar() {}
Bool_t setAddress(UInt_t row, UInt_t col, UInt_t adc, UInt_t apv, UInt_t ch);
Bool_t readline(const Char_t* buf);
Bool_t init(HParIo* input, Int_t* set);
Int_t write(HParIo* output);
void clear();
void putAsciiHeader(TString& header);
void write(std::fstream& fout);
void printParams();
Bool_t isValidSWAddress(Int_t row, Int_t col);
Bool_t isValidHWAddress(Int_t addrHW);
Bool_t getHWAddress(Int_t row, Int_t col, UInt_t& adc, UInt_t& apv, UInt_t& ch);
Bool_t getSWAddress(Int_t address, Int_t& row, Int_t& col);
ClassDef(HRichMappingPar, 1)
};
#endif // HRICHMAPPINGPAR_H