1 |
/** @file |
/** @file |
2 |
* $Source: /home/cvsmanager/yoda/techmodel/physics/CalorimeterReader.cpp,v $ |
* $Source: /home/cvsmanager/yoda/techmodel/physics/CalorimeterReader.cpp,v $ |
3 |
* $Id: CalorimeterReader.cpp,v 1.1 2004/07/17 20:03:48 kusanagi Exp $ |
* $Id: CalorimeterReader.cpp,v 1.2 2004/08/19 15:24:58 kusanagi Exp $ |
4 |
* $Author: kusanagi $ |
* $Author: kusanagi $ |
5 |
* |
* |
6 |
* Implementation of the CalorimeterReader class. |
* Implementation of the CalorimeterReader class. |
49 |
*/ |
*/ |
50 |
std::string CalorimeterReader::GetVersionInfo(void) const { |
std::string CalorimeterReader::GetVersionInfo(void) const { |
51 |
return |
return |
52 |
"$Header: /home/cvsmanager/yoda/techmodel/physics/CalorimeterReader.cpp,v 1.1 2004/07/17 20:03:48 kusanagi Exp $"; |
"$Header: /home/cvsmanager/yoda/techmodel/physics/CalorimeterReader.cpp,v 1.2 2004/08/19 15:24:58 kusanagi Exp $"; |
53 |
} |
} |
54 |
|
|
55 |
/** |
/** |
83 |
|
|
84 |
//Call to the routine that unpack calorimeter events |
//Call to the routine that unpack calorimeter events |
85 |
calunpack_((short*)convdata, &length, &ERROR); |
calunpack_((short*)convdata, &length, &ERROR); |
86 |
|
|
87 |
/*switch (ERROR){ |
if (ERROR != 0) { |
88 |
case: |
char *errmsg; |
89 |
}*/ |
switch (ERROR){ |
90 |
|
case 1: errmsg = "CALORIMETER NOT FOUND"; |
91 |
calorimeter->IEV2 = evento_.IEV2; |
} |
92 |
calorimeter->stwerr = evento_.stwerr; |
cat << log4cpp::Priority::ERROR |
93 |
calorimeter->perror = evento_.perror; |
<< "Fortran77 function calunpack error code = " << ERROR |
94 |
|
<< errmsg |
95 |
//--------have to invert array because of FORTRAN <-> C different management of the indexes |
<< "\n " << log4cpp::CategoryStream::ENDLINE; |
96 |
int tempDexy[96][22][2]; |
} else { |
97 |
int tempDexyc[96][22][2]; |
calorimeter->IEV2 = evento_.IEV2; |
98 |
int tempBase[96][22][2]; |
calorimeter->stwerr = evento_.stwerr; |
99 |
int tempCalselftrig[7][4]; |
calorimeter->perror = evento_.perror; |
100 |
memcpy(tempDexy, evento_.dexy, sizeof(tempDexy)); |
|
101 |
memcpy(tempDexyc, evento_.dexyc, sizeof(tempDexyc)); |
//--------have to invert array because of FORTRAN <-> C different management of the indexes |
102 |
memcpy(tempBase, evento_.base, sizeof(tempBase)); |
int tempDexy[96][22][2]; |
103 |
memcpy(tempCalselftrig, evento_.calselftrig, sizeof(tempCalselftrig)); |
int tempDexyc[96][22][2]; |
104 |
|
int tempBase[96][22][2]; |
105 |
for (int i = 0; i < 4; i++){ |
int tempCalselftrig[7][4]; |
106 |
for (int j = 0; j < 7; j++){ |
memcpy(tempDexy, evento_.dexy, sizeof(tempDexy)); |
107 |
calorimeter->calselftrig[i][j] = tempCalselftrig[j][i]; |
memcpy(tempDexyc, evento_.dexyc, sizeof(tempDexyc)); |
108 |
|
memcpy(tempBase, evento_.base, sizeof(tempBase)); |
109 |
|
memcpy(tempCalselftrig, evento_.calselftrig, sizeof(tempCalselftrig)); |
110 |
|
|
111 |
|
for (int i = 0; i < 4; i++){ |
112 |
|
for (int j = 0; j < 7; j++){ |
113 |
|
calorimeter->calselftrig[i][j] = tempCalselftrig[j][i]; |
114 |
|
} |
115 |
} |
} |
|
} |
|
116 |
|
|
117 |
for (int i = 0; i < 2; i++){ |
for (int i = 0; i < 2; i++){ |
118 |
for (int j = 0; j < 22; j++){ |
for (int j = 0; j < 22; j++){ |
119 |
for (int z = 0; z < 96; z++){ |
for (int z = 0; z < 96; z++){ |
120 |
calorimeter->dexy[i][j][z] = tempDexy[z][j][i]; |
calorimeter->dexy[i][j][z] = tempDexy[z][j][i]; |
121 |
calorimeter->dexyc[i][j][z] = tempDexyc[z][j][i]; |
calorimeter->dexyc[i][j][z] = tempDexyc[z][j][i]; |
122 |
calorimeter->base[i][j][z] = tempBase[z][j][i]; |
calorimeter->base[i][j][z] = tempBase[z][j][i]; |
123 |
|
} |
124 |
} |
} |
125 |
} |
} |
126 |
} |
//----------------------------------------------------------------------------------------- |
|
//----------------------------------------------------------------------------------------- |
|
127 |
|
|
128 |
|
memcpy(calorimeter->calIItrig, evento_.calIItrig, sizeof(calorimeter->calIItrig)); |
129 |
memcpy(calorimeter->calIItrig, evento_.calIItrig, sizeof(calorimeter->calIItrig)); |
memcpy(calorimeter->calstripshift, evento_.calstripshift, sizeof(calorimeter->calstripshift)); |
130 |
memcpy(calorimeter->calstripshift, evento_.calstripshift, sizeof(calorimeter->calstripshift)); |
memcpy(calorimeter->calDSPtaberr, evento_.calDSPtaberr, sizeof(calorimeter->calDSPtaberr)); |
131 |
memcpy(calorimeter->calDSPtaberr, evento_.calDSPtaberr, sizeof(calorimeter->calDSPtaberr)); |
memcpy(calorimeter->calevnum, evento_.calevnum, sizeof(calorimeter->calevnum)); |
132 |
memcpy(calorimeter->calevnum, evento_.calevnum, sizeof(calorimeter->calevnum)); |
} |
|
|
|
|
cat << log4cpp::Priority::ERROR |
|
|
<< "Fortran77 function calunpack error code = " << ERROR |
|
|
<< "\n " << log4cpp::CategoryStream::ENDLINE; |
|
133 |
} |
} |