13 #include "TResponseTable.h"
52 const Int_t maxResponseCounter = 15;
53 const char *next = &path[0];
54 while( ( *next && *next !=
' ') && counter < maxResponseCounter ) {
56 for (
int j=0; j<4 && (next[j] !=
' ');j++) elName += next[j];
68 const Int_t maxResponseCounter = 15;
69 const char *next = &chit[0];
70 while( ( *next !=
' ' ) && counter < maxResponseCounter ) {
72 for (
int j=0; j<4 && (next[j] !=
' ');j++) elName += next[j];
83 assert( (type == kInt || type == kFloat ) );
89 memset(&row,0,
sizeof(row));
90 strlcpy(row.fColumnName,path,
sizeof(row.fColumnName));
91 if (nRow) row.fOffset = dsc[nRow-1].fOffset + dsc[nRow-1].fSize;
95 row.fTypeSize =
sizeof(Int_t);
97 row.fTypeSize =
sizeof(Float_t);
99 row.fSize = row.fTypeSize;
110 Int_t *nvlBuffer = (Int_t *)charBuffer;
111 Float_t *responseBuffer = (Float_t *)charBuffer;
119 nvlBuffer[0] = track; row++;
120 for (
int i=1;i<nRow;i++,row++) {
121 if (row->fType == kFloat) {
122 responseBuffer[i] = response[jResponse++];
124 nvlBuffer[i] = nvl[jNvl++];
128 delete [] charBuffer;
147 Int_t responseLocation = -1;
150 for (
int i=0;i<nRow;i++,row++) {
151 if (row->fType == kFloat) {
153 responseLocation = i;
157 return responseLocation;
void SetResponse(int track, int *nvl, float *response)
void AddResponse(const char *chit)
to be documented
void AddElement(const char *path, EColumnType type)
to be documented
virtual void SetDescriptorPointer(TTableDescriptor *list)
to be documented
virtual Long_t GetRowSize() const
Returns the size (in bytes) of one table row.
virtual TTableDescriptor * GetDescriptorPointer() const
to be documented
Int_t Sizeof() const
to be documented
void AddVolumePath(const char *path)
to be documented
virtual Int_t AddAt(const void *c)
Append one row pointed by "c" to the descriptor.
static Int_t FindResponseLocation(TTableDescriptor &dsc)
virtual void SetType(const char *const type)
to be documented
virtual Long_t GetNRows() const
Returns the number of the used rows for the wrapped table.
virtual Int_t AddAt(const void *c)
TResponseTable()
to be documented
TTableDescriptor * GetTableDescriptors() const
protected: create a new TTableDescriptor descriptor for this table