mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2026-01-16 03:25:13 +01:00
Fixed file cluster closing and cprintf warning in moenchZmqProcess
This commit is contained in:
@@ -602,12 +602,14 @@ int *getClusters(char *data, int *ph=NULL) {
|
||||
*/
|
||||
|
||||
static void writeClusters(FILE *f, single_photon_hit *cl, int nph, int fn=0){
|
||||
if (nph>0) {
|
||||
if (f) {
|
||||
if (nph>0) {
|
||||
#ifndef OLDFORMAT
|
||||
if (fwrite((void*)&fn, 1, sizeof(int), f))
|
||||
if (fwrite((void*)&nph, 1, sizeof(int), f))
|
||||
if (fwrite((void*)&fn, 1, sizeof(int), f))
|
||||
if (fwrite((void*)&nph, 1, sizeof(int), f))
|
||||
#endif
|
||||
for (int i=0; i<nph; i++) (cl+i)->write(f);
|
||||
for (int i=0; i<nph; i++) (cl+i)->write(f);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user