43 #include "StDaqLib/GENERIC/swaps.hh"
44 #include "SVTV1P0.Banks.hh"
46 using namespace OLDEVP;
48 int classname(Bank_SVTRBP)::swap()
51 int words = header.BankLength;
52 int iret = swap_raw(header.ByteOrder,&words,1);
57 if(iret < 0)
return iret;
60 iret = swap_raw(header.ByteOrder,(INT32 *)Mz,
sizeof(Mz)/4);
69 int classname(Bank_SVTADCD)::swap()
74 int classname(Bank_SVTADCR)::swap()
79 int classname(Bank_SVTANODK)::swap()
82 int words = header.BankLength;
84 int iret = swap_raw(header.ByteOrder,&words,1);
88 #if defined (sparc) || defined (__hpux)
95 iret = swap_raw(header.ByteOrder,&bpADC,12);
96 #elif defined(__i386__) || defined(__osf__) || defined(__x86_64__)
102 iret = swap_raw(header.ByteOrder,&bpADC,12);
104 #error "Unknown machine type"
114 return header.swap();
117 int classname(Bank_SVTCPPR)::swap()
120 int words = header.BankLength;
121 int iret = swap_raw(header.ByteOrder,&words,1);
124 if(iret<0)
return iret;
127 iret = swap_short(header.ByteOrder,(INT32 *)entry,12288);
131 return header.swap();
134 int classname(Bank_SVTSEQD)::swap()
136 int words = header.BankLength;
137 int iret = swap_raw(header.ByteOrder,&words,1);
140 if(iret < 0)
return iret;
142 words -= (
sizeof(header)/4);
143 swap_short(header.ByteOrder,(INT32 *)sequence,words);
146 iret = header.swap();
150 int classname(Bank_SVTCFGR)::swap()
152 return header.swap();
155 int classname(Bank_SVTBADR)::swap()
157 return header.swap();
160 int classname(Bank_SVTPEDR)::swap()
162 int iret = swap_raw(header.ByteOrder,&NumEvents,1);
163 if(iret <= 0)
return iret;
165 return header.swap();
168 int classname(Bank_SVTRMSR)::swap()
170 int iret = swap_raw(header.ByteOrder,&NumEvents,1);
171 if(iret <= 0)
return iret;
173 return header.swap();
176 int classname(Bank_SVTGAINR)::swap()
178 int iret = swap_raw(header.ByteOrder,&NumEvents,2);
179 if(iret <= 0)
return iret;
183 if(iret != 1)
return -1;
189 iret = header.swap();
192 char *curr = (
char *)
Gain;
193 for(
int i = 0; i < SVT_MZANODES; i++)
204 int classname(Bank_SVTMZCLD)::swap()
206 int iret = swap_raw(header.ByteOrder,&NumHybrids,1);
207 if(iret <= 0)
return iret;
210 int *word = &NumHybrids;
212 for (
int i=0; i<NumHybrids; i++){
213 swap_raw(header.ByteOrder,word,2);
216 swap_short(header.ByteOrder,word,2*nsp);
220 return header.swap();