--- yoda/techmodel/CalibAcReader.cpp 2004/08/25 10:14:26 1.4 +++ yoda/techmodel/CalibAcReader.cpp 2004/09/21 20:24:33 1.5 @@ -1,13 +1,13 @@ /** @file * $Source: /home/cvsmanager/yoda/techmodel/CalibAcReader.cpp,v $ - * $Id: CalibAcReader.cpp,v 1.3 2004/08/24 16:01:57 kusanagi Exp $ + * $Id: CalibAcReader.cpp,v 1.4 2004/08/25 10:14:26 kusanagi Exp $ * $Author: kusanagi $ * * Implementation of the ArrDumpReader class. */ #include -#include +#include #include #include "stdio.h" extern "C" { @@ -21,14 +21,14 @@ using namespace pamela; using namespace pamela::techmodel; - -static log4cpp::Category& cat = log4cpp::Category::getInstance("pamela.techmodel.CalibAcReader"); +static log4cxx::LoggerPtr logger = log4cxx::Logger::getLogger(_T("pamela.techmodel.CalibAcReader")); /** * Constructor. */ CalibAcReader::CalibAcReader(void): TechmodelAlgorithm(PacketType::CalibAc, "TechmodelCalibAc") { + logger->debug(_T("Constructor")); CalibAc = new CalibAcEvent(); } @@ -36,7 +36,7 @@ * Get a string with the version info of the algorithm. */ std::string CalibAcReader::GetVersionInfo(void) const { - return "$Header: /home/cvsmanager/yoda/techmodel/CalibAcReader.cpp,v 1.3 2004/08/24 16:01:57 kusanagi Exp $\n"; + return "$Header: /home/cvsmanager/yoda/techmodel/CalibAcReader.cpp,v 1.4 2004/08/25 10:14:26 kusanagi Exp $\n"; } /** @@ -44,6 +44,7 @@ * event reader routines for all packet types. */ void CalibAcReader::Init(PamelaRun *run) { + logger->debug(_T("Initialize")); SetInputStream(run); run->WriteSubPacket(this, &CalibAc, CalibAc->Class()); } @@ -52,7 +53,6 @@ * Unpack the CalibAc event from an input file. */ void CalibAcReader::RunEvent(int EventNumber, long int length) { - char *subData; char eventCRC[2]; UINT16 subCRC; //CRC of the data @@ -90,9 +90,7 @@ CalibAc->tail = output.tail; CalibAc->CRC = output.CRC; } else { - cat << log4cpp::Priority::ERROR - << "Wrong CRC on Subpacket in ArrDump Packet " - << "\n " << log4cpp::CategoryStream::ENDLINE; + logger->warn(_T("Wrong CRC on Subpacket in ArrDump Packet ")); } delete [] subData; }