1 |
/** @file |
/** @file |
2 |
* $Source: /home/cvsmanager/yoda/techmodel/physics/CalorimeterReader.cpp,v $ |
* $Source: /afs/ba.infn.it/user/pamela/src/CVS/yoda/techmodel/physics/TriggerReader.cpp,v $ |
3 |
* $Id: CalorimeterReader.cpp,v 2.3 2004/10/18 14:28:03 kusanagi Exp $ |
* $Id: TriggerReader.cpp,v 6.1 2006/09/12 08:56:31 mocchiut Exp $ |
4 |
* $Author: kusanagi $ |
* $Author: mocchiut $ |
5 |
* |
* |
6 |
* Implementation of the CalorimeterReader class. |
* Implementation of the CalorimeterReader class. |
7 |
*/ |
*/ |
52 |
*/ |
*/ |
53 |
std::string TriggerReader::GetVersionInfo(void) const { |
std::string TriggerReader::GetVersionInfo(void) const { |
54 |
return |
return |
55 |
"$Header: /home/cvsmanager/yoda/techmodel/physics/TriggerReader.cpp,v 2.3 2004/10/18 14:28:03 kusanagi Exp $"; |
"$Header: /afs/ba.infn.it/user/pamela/src/CVS/yoda/techmodel/physics/TriggerReader.cpp,v 6.1 2006/09/12 08:56:31 mocchiut Exp $"; |
56 |
} |
} |
57 |
|
|
58 |
/** |
/** |
88 |
|
|
89 |
|
|
90 |
//Call to the routine that unpack trigger events |
//Call to the routine that unpack trigger events |
91 |
triggerunpack_((unsigned char*)data, &length, &ERROR); |
if ( length < 500000 && length >= 0 ){ |
92 |
|
triggerunpack_((unsigned char*)data, &length, &ERROR); |
93 |
|
} else { |
94 |
|
ERROR = 1; |
95 |
|
}; |
96 |
|
|
97 |
|
|
98 |
if (ERROR != 0) { |
if (ERROR != 0) { |
99 |
char *errmsg; |
char *errmsg; |
100 |
switch (ERROR){ |
switch (ERROR){ |
101 |
case 1: errmsg = "GENERIC TRIGGER ERROR"; |
case 1: errmsg = "GENERIC TRIGGER ERROR"; |
102 |
|
break; |
103 |
|
default: errmsg = "TRIGGER ERRROR CODE UNIDENTIFIED"; |
104 |
} |
} |
105 |
oss.flush(); |
oss.str(""); |
106 |
oss << "Fortran77 function triggerunpack: " << errmsg; |
oss << "Fortran77 function triggerunpack: " << errmsg; |
107 |
logger->warn(oss.str().c_str()); |
logger->warn(oss.str().c_str()); |
108 |
} |
} |
109 |
// 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 |
110 |
// parameters to zero |
// parameters to zero |
111 |
//} else { |
//} else { |
112 |
|
trigger->unpackError = (unsigned short)ERROR; |
113 |
trigger->evcount = trig_.evcount; |
trigger->evcount = trig_.evcount; |
114 |
memcpy(trigger->pmtpl, trig_.pmtpl, sizeof(trigger->pmtpl)); |
memcpy(trigger->pmtpl, trig_.pmtpl, sizeof(trigger->pmtpl)); |
115 |
memcpy(trigger->trigrate, trig_.trigrate, sizeof(trigger->trigrate)); |
memcpy(trigger->trigrate, trig_.trigrate, sizeof(trigger->trigrate)); |
121 |
memcpy(trigger->patterntrig, trig_.patterntrig, sizeof(trigger->patterntrig)); |
memcpy(trigger->patterntrig, trig_.patterntrig, sizeof(trigger->patterntrig)); |
122 |
trigger->trigconf = trig_.trigconf; |
trigger->trigconf = trig_.trigconf; |
123 |
|
|
124 |
delete[] data; |
delete [] data; |
125 |
} |
} |