#ifndef HHODOLOOKUP_H
#define HHODOLOOKUP_H
#include "TObject.h"
#include "TObjArray.h"
#include "hparset.h"
class HHodoLookupChan : public TObject {
protected:
Int_t module;
Int_t fiber;
public:
HHodoLookupChan(void) { clear(); }
~HHodoLookupChan(void) {;}
Int_t getModule(void) { return module; }
Int_t getFiber(void) { return fiber; }
void getAddress(Int_t& m,Int_t& f) {
m=module;
f=fiber;
}
void fill(HHodoLookupChan& r) {
module=r.getModule();
fiber=r.getFiber();
}
void setModule(const Int_t n) { module=n; }
void setFiber(const Int_t n) { fiber=n; }
void fill(const Int_t m,const Int_t f) {
module=m;
fiber=f;
}
void clear(void) {
module=fiber=-1;
}
ClassDef(HHodoLookupChan,1)
};
class HHodoLookupSlot: public TObject {
protected:
TObjArray* array;
Int_t maxChannel;
Int_t nChannels;
public:
HHodoLookupSlot(Int_t numChannels=1);
~HHodoLookupSlot(void);
HHodoLookupChan& operator[](Int_t i) {
return *static_cast<HHodoLookupChan*>((*array)[i]);
}
HHodoLookupChan* getChannel(Int_t c) {
if (c>=0 && c<=maxChannel) return &((*this)[c]);
else return 0;
}
Int_t getSize(void) { return maxChannel+1; }
Int_t getMaxSize(void) { return nChannels; }
void fill(Int_t,Int_t,Int_t);
void clear(void);
ClassDef(HHodoLookupSlot,1)
};
class HHodoLookupCrate: public TObject {
protected:
TObjArray* array;
Int_t maxSlot;
Int_t nSlots;
public:
HHodoLookupCrate(Int_t numSlots=1);
~HHodoLookupCrate(void);
HHodoLookupSlot& operator[](Int_t i) {
return *static_cast<HHodoLookupSlot*>((*array)[i]);
}
HHodoLookupSlot* getSlot(Int_t s) {
if (s>=0 && s<=maxSlot) return &((*this)[s]);
else return 0;
}
Int_t getSize(void) { return maxSlot+1; }
Int_t getMaxSize(void) { return nSlots; }
void fill(Int_t,Int_t,Int_t,Int_t);
ClassDef(HHodoLookupCrate,1)
};
class HHodoLookup : public HParSet {
protected:
TObjArray* array;
Int_t maxCrate;
public:
HHodoLookup(const Char_t* name="HodoLookup",
const Char_t* title="Lookup table for Hodoscopes unpacker",
const Char_t* context="HodoLookupProduction",
Int_t nCrates=1, Int_t nSlots=1);
~HHodoLookup(void);
HHodoLookupCrate& operator[](Int_t i) {
return *static_cast<HHodoLookupCrate*>((*array)[i]);
}
HHodoLookupSlot* getSlot(Int_t c, Int_t s) {
if (c>=0 && c<=maxCrate) return (*this)[c].getSlot(s);
else return 0;
}
Int_t getSize(void) { return maxCrate+1; }
Bool_t init(HParIo*,Int_t*);
Int_t write(HParIo*);
void clear(void);
void printParam(void);
void fill(Int_t,Int_t,Int_t,Int_t,Int_t);
void readline(const Char_t*, Int_t*);
void putAsciiHeader(TString&);
Bool_t writeline(Char_t*,Int_t,Int_t,Int_t);
ClassDef(HHodoLookup,1)
};
#endif /*!HHODOLOOKUP_H*/
Last change: Sat May 22 12:57:29 2010
Last generated: 2010-05-22 12:57
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.