00001 /* 00002 * rdChecksum.h - declaration of MINOS raw data checksumming functions 00003 * 00004 * Author: rhatcher@fnal.gov 2001-06 00005 * 00006 * CVS Tag: "$Id: rdChecksum.h,v 1.1 2003/01/17 21:41:58 rhatcher Exp $" 00007 * 00008 */ 00009 #ifndef RDCHECKSUM_H 00010 #define RDCHECKSUM_H 00011 00012 /* 00013 *========================================================================= 00014 * forward declaration of function prototypes 00015 *========================================================================= 00016 */ 00017 00018 #ifndef __CINT__ 00019 #ifdef __cplusplus 00020 extern "C" { 00021 #endif /* __cplusplus */ 00022 #endif /* __CINT__ */ 00023 00024 /* 00025 * rdxsum routines assume a basic block structure of: 00026 * 0: word count (inclusive) 00027 * 1: checksum value 00028 * ...: data 00029 * 00030 * the upper 2 bits of the checksum are allocated for 00031 * tagging different algorithms (in case we want to change 00032 * at some point). 00033 * 00034 * rdxsum_calc: calculates and returns the value (ignoring word 1) 00035 * rdxsum_fill: calculates the value and stores it in word 1 00036 * rdxsum_test: calculates the value and tests it against the 00037 * stored value (returning non-zero if different) 00038 * 00039 */ 00040 unsigned long rdxsum_calc(const long* ptr, char version); 00041 void rdxsum_fill(long* ptr, char version); 00042 int rdxsum_test(const long* ptr); 00043 00044 #ifndef __CINT__ 00045 #ifdef __cplusplus 00046 } 00047 #endif /* __cplusplus */ 00048 #endif /* __CINT__ */ 00049 00050 #endif /* RDCHECKSUM_H */
1.3.9.1