45 #include "L3_Banks.hh"
48 using namespace OLDEVP;
50 int Bank_L3_SUMD::swap()
53 int words = header.BankLength;
54 int iret = swap_raw(header.ByteOrder,&words,1);
59 if(iret < 0)
return iret;
62 iret = swap_raw(header.ByteOrder, (INT32 *)&nProcessed, 3);
66 for (
int i=0; i<nAlg; i++) {
67 iret = swap_raw(header.ByteOrder, (INT32 *)&alg[i].algId, 1);
68 iret = swap_raw(header.ByteOrder, (INT32 *)&alg[i].nProcessed, 13);
78 int Bank_L3_GTD::swap()
81 int words = header.BankLength;
82 int iret = swap_raw(header.ByteOrder,&words,1);
87 if(iret < 0)
return iret;
90 iret = swap_raw(header.ByteOrder, (INT32 *)&nHits, 5);
94 for (
unsigned int i=0; i<nTracks; i++) {
95 iret = swap_raw(header.ByteOrder, (
int *)&
track[i].id, 1);
96 iret = l3Swap_short((
short *)&
track[i].flag, (
short) 1);
97 iret = swap_raw(header.ByteOrder, (
int *)&
track[i].chi2, 13);
101 iret = header.swap();
107 int Bank_L3_LTD::swap()
110 int words = header.BankLength;
111 int iret = swap_raw(header.ByteOrder,&words,1);
116 if(iret < 0)
return iret;
121 for (
int i=0; i<nTracks; i++) {
122 iret = l3Swap_short((
short *)&
track[i].
id, 1);
123 iret = l3Swap_short((
short *)&
track[i].innerMostRow, (
short) 4);
124 iret = swap_raw(header.ByteOrder, (INT32 *)&
track[i].dedx, 8);
125 iret = l3Swap_short((
short *)&
track[i].dpt, 4);
129 iret = header.swap();
135 int Bank_L3_SECCD::swap()
138 int words = header.BankLength;
139 int iret = swap_raw(header.ByteOrder,&words,1);
144 if(iret < 0)
return iret;
147 iret = swap_raw(header.ByteOrder, (INT32 *)&nrClusters_in_sector, 1);
151 for (
unsigned int i=0; i<nrClusters_in_sector; i++) {
152 iret = l3Swap_short((
short *)&cluster[i].pad, (
short) 5);
156 iret = header.swap();
163 int Bank_TPCMZCLD::swap()
165 int iret = swap_raw(header.ByteOrder, &numberOfRows, 1);
166 if(iret <= 0)
return iret;
169 int *word = &numberOfRows;
171 for (
int i=0; i<numberOfRows; i++) {
172 swap_raw(header.ByteOrder, word, 2);
175 swap_short(header.ByteOrder, word, 2*nsp);
179 return header.swap();
184 int l3Swap_short (
short*
data,
short size)
186 char *curr = (
char *)data;
187 for (
int i=0; i<size; i++) {