/[PAMELA software]/yoda/techmodel/TabDumpReader.cpp
ViewVC logotype

Diff of /yoda/techmodel/TabDumpReader.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 4.4 by kusanagi, Sat May 28 10:44:11 2005 UTC revision 6.1 by kusanagi, Tue May 30 19:10:02 2006 UTC
# Line 1  Line 1 
1  /** @file  /** @file
2   * $Source: /home/cvsmanager/yoda/techmodel/TabDumpReader.cpp,v $   * $Source: /home/cvsmanager/yoda/techmodel/TabDumpReader.cpp,v $
3   * $Id: TabDumpReader.cpp,v 4.0 2005/03/06 04:33:02 kusanagi Exp $   * $Id: TabDumpReader.cpp,v 6.0 2006/02/07 17:11:10 kusanagi Exp $
4   * $Author: kusanagi $   * $Author: kusanagi $
5   *   *
6   * Implementation of the TabDumpReader class.   * Implementation of the TabDumpReader class.
7   */   */
8    
 #include <string>  
 #include <log4cxx/logger.h>  
 #include <fstream>  
 #include "stdio.h"  
9  extern "C" {  extern "C" {
10      #include "CRC.h"      #include "CRC.h"
11  }  }
12  #include "ReaderAlgorithms.h"  #include "ReaderAlgorithms.h"
   
 using namespace pamela;  
13  using namespace pamela::techmodel;  using namespace pamela::techmodel;
14    
15  static log4cxx::LoggerPtr logger = log4cxx::Logger::getLogger(_T("pamela.techmodel.TabDumpReader"));  static log4cxx::LoggerPtr logger = log4cxx::Logger::getLogger(_T("pamela.techmodel.TabDumpReader"));
# Line 33  TabDumpReader::TabDumpReader(void): Line 27  TabDumpReader::TabDumpReader(void):
27   * Get a string with the version info of the algorithm.   * Get a string with the version info of the algorithm.
28   */   */
29  std::string TabDumpReader::GetVersionInfo(void) const {  std::string TabDumpReader::GetVersionInfo(void) const {
30    return "$Header: /home/cvsmanager/yoda/techmodel/TabDumpReader.cpp,v 4.0 2005/03/06 04:33:02 kusanagi Exp $\n";    return "$Header: /home/cvsmanager/yoda/techmodel/TabDumpReader.cpp,v 6.0 2006/02/07 17:11:10 kusanagi Exp $\n";
31  }  }
32    
33  /**  /**
# Line 60  void TabDumpReader::RunEvent(int EventNu Line 54  void TabDumpReader::RunEvent(int EventNu
54      subCRC  = CM_Compute_CRC16(0, (UINT8*)subData, dataLength);      subCRC  = CM_Compute_CRC16(0, (UINT8*)subData, dataLength);
55      readCRC = (((UINT16)(subData[length - 2]<<8))&0xFF00) + (((UINT16)subData[length - 1])&0x00FF);      readCRC = (((UINT16)(subData[length - 2]<<8))&0xFF00) + (((UINT16)subData[length - 1])&0x00FF);
56            
57      //if (subCRC != readCRC) throw WrongCRCException(" Wrong CRC for TabDump Packet ");      if (subCRC != readCRC) throw WrongCRCException(" Wrong CRC for TabDump Packet ");
58      if (subCRC != readCRC) {      /*if (subCRC != readCRC) {
59          logger->error("WRONG CRC FOR TabDump PACKET. Processed anyway for CPU debugging");          logger->error("WRONG CRC FOR TabDump PACKET. Processed anyway for CPU debugging");
60      }      }*/
61    
62      TabDumpRecord* rec;      TabDumpRecord* rec;
63      TabDump->PARAMETER_STAMP = (((UINT32)subData[0]<<24)&0xFF000000) + (((UINT32)subData[1]<<16)&0x00FF0000) +  (((UINT32)subData[2]<<8)&0x0000FF00) + (((UINT32)subData[3])&0x000000FF);      TabDump->PARAMETER_STAMP = (((UINT32)subData[0]<<24)&0xFF000000) + (((UINT32)subData[1]<<16)&0x00FF0000) +  (((UINT32)subData[2]<<8)&0x0000FF00) + (((UINT32)subData[3])&0x000000FF);

Legend:
Removed from v.4.4  
changed lines
  Added in v.6.1

  ViewVC Help
Powered by ViewVC 1.1.23