280 |
// first of all load the MIP to ADC conversion values |
// first of all load the MIP to ADC conversion values |
281 |
// |
// |
282 |
stringstream calfile; |
stringstream calfile; |
283 |
Int_t error = 0; |
// Int_t error = 0; |
284 |
GL_PARAM *glparam = new GL_PARAM(); |
GL_PARAM *glparam = new GL_PARAM(); |
285 |
// |
// |
286 |
// determine where I can find calorimeter ADC to MIP conversion file |
// determine where I can find calorimeter ADC to MIP conversion file |
287 |
// |
// |
288 |
error = 0; |
// error = 0; |
289 |
error = glparam->Query_GL_PARAM(3,101,fDbc); |
glparam->Query_GL_PARAM(3,101,fDbc); |
290 |
// |
// |
291 |
calfile.str(""); |
calfile.str(""); |
292 |
calfile << glparam->PATH.Data() << "/"; |
calfile << glparam->PATH.Data() << "/"; |
348 |
printf("\n Section %i : using file %s calibration at entry %i: \n",s,fcalname.Data(),calibno); |
printf("\n Section %i : using file %s calibration at entry %i: \n",s,fcalname.Data(),calibno); |
349 |
// |
// |
350 |
} else { |
} else { |
351 |
error = 0; |
// error = 0; |
352 |
error = glparam->Query_GL_PARAM(1,104,fDbc); |
glparam->Query_GL_PARAM(1,104,fDbc); |
353 |
// |
// |
354 |
calfile.str(""); |
calfile.str(""); |
355 |
calfile << glparam->PATH.Data() << "/"; |
calfile << glparam->PATH.Data() << "/"; |
865 |
// |
// |
866 |
// Write the correct length |
// Write the correct length |
867 |
// |
// |
868 |
fDataCALO[fSecPointer+1] = fCALOlength-fSecPointer+1 ; |
fDataCALO[fSecPointer+1] = (fCALOlength-fSecPointer+1)-2 ; |
869 |
|
// total length of the packet: -2: because the words with status and length are not included |
870 |
fDataCALO[fNofTStripsPointer] = NofTransmittedStrips ; |
fDataCALO[fNofTStripsPointer] = NofTransmittedStrips ; |
871 |
// |
// |
872 |
// here we calculate and save the CRC |
// here we calculate and save the CRC |
873 |
// |
// |
874 |
Short_t CRC = 0; |
Short_t CRC = 0; |
875 |
|
fDataCALO[fCALOlength] =0 ; |
876 |
for (UInt_t i=0; i<(fCALOlength-fSecPointer); i++){ |
for (UInt_t i=0; i<(fCALOlength-fSecPointer); i++){ |
877 |
CRC=crc(CRC,fDataCALO[i+fSecPointer]); |
CRC=crc(CRC,fDataCALO[i+fSecPointer]); |
878 |
}; |
}; |