30 #include "StDaqLib/GENERIC/swaps.hh"
31 #include "TPCV2P0.Banks.hh"
33 using namespace OLDEVP;
35 int classname(Bank_TPCRBP)::swap()
38 int words = header.BankLength;
39 int iret = swap_raw(header.ByteOrder,&words,1);
44 if(iret < 0)
return iret;
47 iret = swap_raw(header.ByteOrder,(INT32 *)Mz,
sizeof(Mz)/4);
56 int classname(Bank_TPCADCD)::swap()
61 int classname(Bank_TPCADCR)::swap()
66 int classname(Bank_TPCPADK)::swap()
69 int words = header.BankLength;
70 int iret = swap_raw(header.ByteOrder,&words,1);
73 if(iret < 0)
return iret;
76 iret = swap_raw(header.ByteOrder,&bpADC,6);
83 int classname(Bank_TPCCPPR)::swap()
86 int words = header.BankLength;
87 int iret = swap_raw(header.ByteOrder,&words,1);
90 if(iret<0)
return iret;
93 iret = swap_short(header.ByteOrder,(INT32 *)entry,12288);
100 int classname(Bank_TPCSEQD)::swap()
102 int words = header.BankLength;
103 int iret = swap_raw(header.ByteOrder,&words,1);
106 if(iret < 0)
return iret;
108 words -= (
sizeof(header)/4);
109 swap_short(header.ByteOrder,(INT32 *)sequence,words);
112 iret = header.swap();
116 int classname(Bank_TPCCFGR)::swap()
118 return header.swap();
121 int classname(Bank_TPCBADR)::swap()
123 return header.swap();
126 int classname(Bank_TPCPEDR)::swap()
128 int iret = swap_raw(header.ByteOrder,&NumEvents,1);
129 if(iret <= 0)
return iret;
131 return header.swap();
134 int classname(Bank_TPCRMSR)::swap()
136 int iret = swap_raw(header.ByteOrder,&NumEvents,1);
137 if(iret <= 0)
return iret;
139 return header.swap();
142 int classname(Bank_TPCGAINR)::swap()
144 int iret = swap_raw(header.ByteOrder,&NumEvents,2);
145 if(iret <= 0)
return iret;
149 if(iret != 1)
return -1;
155 iret = header.swap();
158 char *curr = (
char *)
Gain;
159 for(
int i = 0; i < TPC_MZPADS; i++)
172 int iret = swap_raw(header.ByteOrder,&NumRows,1);
173 if(iret <= 0)
return iret;
176 int *word = &NumRows;
178 for (
int i=0; i<NumRows; i++){
179 swap_raw(header.ByteOrder,word,2);
182 swap_short(header.ByteOrder,word,2*nsp);
186 return header.swap();