#ifndef HEMCSIMULPAR_H
#define HEMCSIMULPAR_H
#include "hparcond.h"
#include "TArrayI.h"
class HEmcSimulPar : public HParCond {
protected:
Int_t numRows;
Int_t numCols;
Int_t numPmtTypes;
TArrayI lookupPmtType;
public:
HEmcSimulPar(const char* name="EmcSimulPar",
const char* title="Emc simulation parameters",
const char* context="EmcSimulProduction");
~HEmcSimulPar() {;}
Int_t pmIndex(Int_t sec,Int_t cell) { return sec*numRows*numCols + cell; }
Int_t pmIndex(Int_t sec,Int_t row,Int_t col) { return sec*numRows*numCols + row*numCols + col; }
void setNumPmtTypes(const Int_t n) { numPmtTypes=n;}
void setPmtType(Int_t sec,Int_t cell,Int_t pmtype) { lookupPmtType.SetAt(pmtype ,pmIndex(sec,cell)); }
Int_t getNumPmtTypes() const { return numPmtTypes; }
Int_t getPmtType(Int_t sec,Int_t cell) { return lookupPmtType[pmIndex(sec,cell)]; }
Int_t getPmtType(Int_t sec,Int_t row,Int_t col) { return lookupPmtType[pmIndex(sec,row,col)]; }
Bool_t getLookupArray(Int_t, Int_t*);
void clear(void);
void putParams(HParamList*);
Bool_t getParams(HParamList*);
void printLookupPmtType(void);
ClassDef(HEmcSimulPar,1)
};
#endif /* !HEMCSIMULPAR_H */