1 |
/** @file |
/** @file |
2 |
* $Source: /home/cvsmanager/yoda/techmodel/physics/TofReader.cpp,v $ |
* $Source: /afs/ba.infn.it/user/pamela/src/CVS/yoda/techmodel/physics/TofReader.cpp,v $ |
3 |
* $Id: TofReader.cpp,v 2.1 2005/01/29 00:31:36 kusanagi Exp $ |
* $Id: TofReader.cpp,v 6.3 2006/09/12 08:56:30 mocchiut Exp $ |
4 |
* $Author: kusanagi $ |
* $Author: mocchiut $ |
5 |
* |
* |
6 |
* Implementation of the CalorimeterReader class. |
* Implementation of the CalorimeterReader class. |
7 |
*/ |
*/ |
50 |
*/ |
*/ |
51 |
std::string TofReader::GetVersionInfo(void) const { |
std::string TofReader::GetVersionInfo(void) const { |
52 |
return |
return |
53 |
"$Header: /home/cvsmanager/yoda/techmodel/physics/TofReader.cpp,v 2.1 2005/01/29 00:31:36 kusanagi Exp $"; |
"$Header: /afs/ba.infn.it/user/pamela/src/CVS/yoda/techmodel/physics/TofReader.cpp,v 6.3 2006/09/12 08:56:30 mocchiut Exp $"; |
54 |
} |
} |
55 |
|
|
56 |
/** |
/** |
86 |
|
|
87 |
|
|
88 |
//Call to the routine that unpack tof events |
//Call to the routine that unpack tof events |
89 |
tofunpack_((unsigned char*)data, &length, &ERROR); |
if ( length < 500000 && length >= 0 ){ |
90 |
|
tofunpack_((unsigned char*)data, &length, &ERROR); |
91 |
|
} else { |
92 |
|
ERROR = 1; |
93 |
|
}; |
94 |
|
|
95 |
if (ERROR != 0) { |
if (ERROR != 0) { |
96 |
char *errmsg; |
char *errmsg; |
97 |
switch (ERROR){ |
switch (ERROR){ |
98 |
case 1: errmsg = "GENERIC TOF ERROR"; |
case 1: errmsg = "CRC TOF ERROR"; |
99 |
|
break; |
100 |
|
default: errmsg = "TOF ERROR CODE UNIDENTIFIED"; |
101 |
} |
} |
102 |
oss.flush(); |
oss.str(""); |
103 |
oss << "Fortran77 function tofunpack: " << errmsg; |
oss << "Fortran77 function tofunpack: " << errmsg; |
104 |
logger->warn(oss.str().c_str()); |
logger->debug(oss.str().c_str()); |
105 |
} |
} |
106 |
// In case of "ERROR != 0" the calunpack will take care to set all |
// In case of "ERROR != 0" the calunpack will take care to set all |
107 |
// parameters to zero |
// parameters to zero |
109 |
// only for a variable tof->tof1int = evento_.IEV2; |
// only for a variable tof->tof1int = evento_.IEV2; |
110 |
// memcpy(tof->tof1int, tofvar_.tof1int, sizeof(tofvar_.tof1int)); |
// memcpy(tof->tof1int, tofvar_.tof1int, sizeof(tofvar_.tof1int)); |
111 |
// printf("tof->tof1int[1] %i \n",tof->tof1int[0]); |
// printf("tof->tof1int[1] %i \n",tof->tof1int[0]); |
112 |
|
tof->unpackError = (unsigned short)ERROR; |
113 |
|
|
114 |
// for (int i = 0; i < 6; i++){ |
// for (int i = 0; i < 6; i++){ |
115 |
// tof->tof1int[i] = tofvar_.tof1int[i]; |
// tof->tof1int[i] = tofvar_.tof1int[i]; |
135 |
// } |
// } |
136 |
// } |
// } |
137 |
|
|
|
|
|
138 |
int tmpadc[12][4]; |
int tmpadc[12][4]; |
139 |
int tmptdc[12][4]; |
int tmptdc[12][4]; |
140 |
|
|
148 |
} |
} |
149 |
} |
} |
150 |
|
|
151 |
delete[] data; |
delete [] data; |
152 |
} |
} |