GET library
GETLookupTable Class Reference

#include <GETLookupTable.hh>

Public Member Functions

Constructors, affectation, destructor
 GETLookupTable (u_int nch=0, u_int nx=0, u_int ny=0)
 
virtual ~GETLookupTable ()
 
Table building
virtual void EraseTables ()
 
virtual int InitTables (u_int nch, u_int nx, u_int ny)
 
virtual int InitTables (GETSystem &get, u_int nx, u_int ny)
 
virtual bool IsTableSet () const
 
virtual int SetDefaultTable (GETSystem &get, u_int nx, u_int ny)
 
virtual int SetHVpad64Table (GETSystem &get, u_int ny)
 
Table data
virtual u_int GetSize () const
 
virtual int GetPad (u_int nch) const
 
virtual int GetCoBo (u_int nch) const
 
virtual int GetAsAd (u_int nch) const
 
virtual int GetAGet (u_int nch) const
 
virtual int GetChannel (u_int nch) const
 
virtual int GetIpx (u_int nch) const
 
virtual int GetIpy (u_int nch) const
 
virtual int GetChannel (u_int ix, u_int iy) const
 
virtual u_int GetNpadX () const
 
virtual u_int GetNpadY () const
 
virtual void DumpTable (const string &fname, bool head=true) const
 
virtual void DumpTable (FILE *fp, bool head=true) const
 
virtual void DumpXY (const string &fname, bool head=true) const
 
virtual void DumpXY (FILE *fp, bool head=true) const
 
virtual int Read (const string &fname, bool rpad=true, bool invxy=false)
 
virtual int Read (FILE *fp, bool rpad=true, bool invxy=false)
 
ROOT related functions
 ClassDef (GETLookupTable, 0)
 

Protected Attributes

int * aget
 AGet identifier.
 
int * asad
 AsAd identifier.
 
int * chan_xy
 Array identifying channel from ix and iy indexes.
 
int * channel
 AGet channel identifier.
 
int * cobo
 CoBo identifier.
 
bool defined
 Whether the table data has been set.
 
int * ipx
 Pad X number.
 
int * ipy
 Pad Y number.
 
u_int npad_x
 Number of pads along X.
 
u_int npad_y
 Number of pads along Y.
 
int * pad
 Pad identifier (effective signal channel)
 
u_int pads_number
 Number of pads.
 
u_int size
 Number of GET channels.
 

Private Member Functions

 GObject (GETLookupTable)
 

Detailed Description

This class defines a lookup table for a detector using the GET electronics.

The lookup table allows to relate the electronic channel identification to the detector physical channel. The FPN channels are not part of the detector physical channels.

The electronics channels are defined by their CoBo, AsAd, AGet and channel (in AGet) indexes. The physical channels are defined by their pad number and X/Y position index (for a pad plane detector).

Constructor & Destructor Documentation

GETLookupTable::GETLookupTable ( u_int  nch = 0,
u_int  nx = 0,
u_int  ny = 0 
)

Constructor. If the number of channel is defined, the tables are initialized.

Parameters
nchnumber of channels of the GET system
nxnumber of pads along X
nynumber of pads along Y

References aget, asad, chan_xy, channel, cobo, defined, InitTables(), ipx, ipy, npad_x, npad_y, pad, pads_number, and size.

GETLookupTable::~GETLookupTable ( )
virtual

Destructor.

References EraseTables().

Member Function Documentation

GETLookupTable::ClassDef ( GETLookupTable  ,
 
)

for use within ROOT.

void GETLookupTable::DumpTable ( const string &  fname,
bool  head = true 
) const
virtual

Dump the look-up table into a formatted text file.

Parameters
fnamename of the txte file
headwhether a header line is printed

Referenced by GETActarEventReader::ConfigCommand().

void GETLookupTable::DumpTable ( FILE *  fp,
bool  head = true 
) const
virtual

Dump the look-up table into a formatted text file.

Parameters
fpfile pointer
headwhether a header line is printed

References aget, asad, channel, cobo, ipx, ipy, pad, and size.

void GETLookupTable::DumpXY ( const string &  fname,
bool  head = true 
) const
virtual

Dump the look-up table channel - XY correspondance.

Parameters
fnamename of the txte file
headwhether a header line is printed
void GETLookupTable::DumpXY ( FILE *  fp,
bool  head = true 
) const
virtual

Dump the look-up table channel - XY correspondance.

Parameters
fpfile pointer
headwhether a header line is printed

References chan_xy, npad_x, npad_y, and pad.

void GETLookupTable::EraseTables ( )
virtual

Deallocate the tables.

References aget, asad, chan_xy, channel, cobo, defined, ipx, ipy, pad, pads_number, and size.

Referenced by GETSystem::Init(), InitTables(), and ~GETLookupTable().

int GETLookupTable::GetAGet ( u_int  ch) const
inlinevirtual

Return the AGet chip number (in AsAd board) of a GET channel.

Parameters
chGET system channel index

References aget, and size.

Referenced by GETActarEventReader::DefinePadSpectrum(), GETActarEventReader::HistoClickedSlot(), and GETActarEventReader::HistoEventSlot().

int GETLookupTable::GetAsAd ( u_int  ch) const
inlinevirtual

Return the AsAd board number (in CoBo module) of a GET channel.

Parameters
chGET system channel index

References asad, and size.

Referenced by GETActarEventReader::DefinePadSpectrum(), GETActarEventReader::HistoClickedSlot(), and GETActarEventReader::HistoEventSlot().

int GETLookupTable::GetChannel ( u_int  ix,
u_int  iy 
) const
inlinevirtual

Return the channel index (including FPN) from pad position.

Parameters
ixX pad index
iyY pad index

References chan_xy, npad_x, and pads_number.

int GETLookupTable::GetCoBo ( u_int  ch) const
inlinevirtual

Return the CoBo module number of a GET channel.

Parameters
chGET system channel index

References cobo, and size.

Referenced by GETActarEventReader::DefinePadSpectrum(), GETActarEventReader::HistoClickedSlot(), and GETActarEventReader::HistoEventSlot().

u_int GETLookupTable::GetSize ( ) const
inlinevirtual

Return the number of data in the look-up table.

References size.

GETLookupTable::GObject ( GETLookupTable  )
private

Macro from GCpp library that defines the following functions:

  • ClassName(): return the real class name of the object
  • StaticClassName(): return the used class name of the object (that may be a base class of the real object).
  • IsInstanceOf<T>(): return true if the current object is an instance of the template class name argument
  • Clone(): return an allocated copy of the object.
int GETLookupTable::InitTables ( u_int  nch,
u_int  nx,
u_int  ny 
)
virtual

Initializes tables. If the number of channels has changed, new tables are allocated and the data are initialized to -1. The function returns 0 if no error occured.

Parameters
nchnumber of channels of the GET system
nxnumber of pads along X
nynumber of pads along Y

References aget, AGET_CHANNELS, AGET_SIZE, asad, chan_xy, channel, cobo, defined, EraseTables(), ipx, ipy, npad_x, npad_y, pad, pads_number, and size.

Referenced by GETLookupTable(), InitTables(), SetDefaultTable(), and SetHVpad64Table().

int GETLookupTable::InitTables ( GETSystem get,
u_int  nx,
u_int  ny 
)
virtual

Initializes tables from a defined GET system.

Parameters
getthe GET system
nxnumber of pads along X
nynumber of pads along Y

References AGET_SIZE, and InitTables().

bool GETLookupTable::IsTableSet ( ) const
inlinevirtual

Return true if the table data have been defined.

References defined.

Referenced by GETHitMask::InitMask().

int GETLookupTable::Read ( const string &  fname,
bool  rpad = true,
bool  invxy = false 
)
virtual

Read a lookup table from a text file. The file format is:

  • a header line
  • the information for each electronics channel: pad id (-1 for FPN channels), CoBo, AsAd, AGET, channel (in AGET), X pad index, Y pad index.
    Parameters
    fnamename of the file
    rpadwhether the pad index is read (else computed from ipx & ipy)
    invxywhether the X & Y index are inverted

Referenced by GETActarEventReader::GETInit().

int GETLookupTable::Read ( FILE *  fp,
bool  rpad = true,
bool  invxy = false 
)
virtual

Read a lookup table from a text file.

Parameters
fpfile pointer
rpadwhether the pad index is read (else computed from ipx & ipy)
invxywhether the X & Y index are inverted

References aget, asad, chan_xy, channel, cobo, ipx, ipy, npad_x, npad_y, pad, and size.

int GETLookupTable::SetDefaultTable ( GETSystem get,
u_int  nx,
u_int  ny 
)
virtual

Defines the default look-up table for a GET system. The function initilizes the tables. The default table is 1 row of pads per AGet.

Parameters
getthe GET system
nxnumber of pads along X
nynumber of pads along Y

References aget, AGET_SIZE, asad, ASAD_SIZE, chan_xy, channel, cobo, defined, GETObject::GetTotalChannel(), InitTables(), ipx, ipy, GETChannel::IsSignalChannel(), npad_x, npad_y, pad, pads_number, and size.

Referenced by GETActarEventReader::GETInit(), and GETActarTpc::Init().

int GETLookupTable::SetHVpad64Table ( GETSystem get,
u_int  ny 
)
virtual

Defines the look-up table for a GET system with HV pads version of ZAP. This function considers that there are 64 pads on X dimension. The function initilizes the tables.

Parameters
getthe GET system
nynumber of pads along Y

References aget, AGET_CHANNELS, AGET_SIZE, asad, ASAD_SIZE, chan_xy, channel, cobo, defined, GETObject::GetTotalChannel(), InitTables(), ipx, ipy, GETChannel::IsSignalChannel(), npad_x, pad, pads_number, and size.


The documentation for this class was generated from the following files: