--- yoda/techmodel/TofAlarmReader.cpp 2004/09/21 20:24:33 1.1 +++ yoda/techmodel/TofAlarmReader.cpp 2006/02/07 17:11:10 6.0 @@ -1,20 +1,13 @@ +/** @file + * $Author: kusanagi $ + * $Date: 2006/02/07 10:43:06 $ + * $Revision: 5.3 $ + * + * Implementation of the TofAlarmReader class. + */ -// Implementation of the TofAlarmReader class. - - -#define UINT unsigned int -#define BYTE unsigned char -#include -#include -extern "C" { -#include "CRC.h" -} - -#include -#include "stdio.h" #include "ReaderAlgorithms.h" -using namespace pamela; using namespace pamela::techmodel; static log4cxx::LoggerPtr logger = log4cxx::Logger::getLogger(_T("pamela.techmodel.TofAlarmReader")); @@ -33,7 +26,7 @@ */ std::string TofAlarmReader::GetVersionInfo(void) const { return - "$Trailer: /home/cvsmanager/yoda/techmodel/TofAlarmReader.cpp,v 1.1.1.1 2004/07/06 12:20:23 kusanagi Exp $\n"; + "$Trailer: /home/cvsmanager/yoda/techmodel/TofAlarmReader.cpp,v 1.1.1.1 2004/07/06 12:20:23 Maurizio Nagni Exp $\n"; } /** @@ -48,9 +41,13 @@ /** * Unpack the TofAlarm event from an input file. + * The CPU does not add any CRC control at the packet end. + * @param EventNumber + * @param dataLength */ -void TofAlarmReader::RunEvent(int EventNumber, long int length) { - - +void TofAlarmReader::RunEvent(int EventNumber, long int dataLength) throw (WrongCRCException){ + char subData[dataLength]; + InputFile->read(subData, sizeof(subData)); + tofAlarm->tofAlarmData = new TArrayC(dataLength, subData); }