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

Diff of /yoda/techmodel/CalibAcReader.cpp

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

revision 2.0 by kusanagi, Tue Sep 21 20:50:54 2004 UTC revision 2.1 by kusanagi, Sun Oct 17 12:28:38 2004 UTC
# Line 1  Line 1 
1  /** @file  /** @file
2   * $Source: /home/cvsmanager/yoda/techmodel/CalibAcReader.cpp,v $   * $Source: /home/cvsmanager/yoda/techmodel/CalibAcReader.cpp,v $
3   * $Id: CalibAcReader.cpp,v 1.5 2004/09/21 20:24:33 kusanagi Exp $   * $Id: CalibAcReader.cpp,v 2.0 2004/09/21 20:50:54 kusanagi Exp $
4   * $Author: kusanagi $   * $Author: kusanagi $
5   *   *
6   * Implementation of the ArrDumpReader class.   * Implementation of the ArrDumpReader class.
# Line 12  Line 12 
12  #include "stdio.h"  #include "stdio.h"
13  extern "C" {  extern "C" {
14      #include "CRC.h"      #include "CRC.h"
15      #include "forroutines/anticounter/ACcalib.h"      #include "forroutines/anticounter/AC.h"
16      extern int ACcalib(int length, unsigned short* datapointer, struct datastruct* calibpointer);      extern int ACcalib(int length, unsigned char* calibpointer, struct calibstruct* calibpointer);
17  }  }
18    
19  #include "ReaderAlgorithms.h"  #include "ReaderAlgorithms.h"
# Line 36  CalibAcReader::CalibAcReader(void): Line 36  CalibAcReader::CalibAcReader(void):
36   * Get a string with the version info of the algorithm.   * Get a string with the version info of the algorithm.
37   */   */
38  std::string CalibAcReader::GetVersionInfo(void) const {  std::string CalibAcReader::GetVersionInfo(void) const {
39    return "$Header: /home/cvsmanager/yoda/techmodel/CalibAcReader.cpp,v 1.5 2004/09/21 20:24:33 kusanagi Exp $\n";    return "$Header: /home/cvsmanager/yoda/techmodel/CalibAcReader.cpp,v 2.0 2004/09/21 20:50:54 kusanagi Exp $\n";
40  }  }
41    
42  /**  /**
# Line 71  void CalibAcReader::RunEvent(int EventNu Line 71  void CalibAcReader::RunEvent(int EventNu
71      readCRC = (((UINT16)(eventCRC[0]<<8))&0xFF00) + (((UINT16)eventCRC[1])&0x00FF);      readCRC = (((UINT16)(eventCRC[0]<<8))&0xFF00) + (((UINT16)eventCRC[1])&0x00FF);
72            
73      if (subCRC == readCRC){      if (subCRC == readCRC){
74          datastruct output;          calibstruct output;
75          int ERROR;          int ERROR;
76          ERROR = ACcalib(dataLength, (unsigned short*)subData, &output);          ERROR = ACcalib(dataLength, (unsigned char*)subData, &output);
77            
78          CalibAc->header = output.header;          CalibAc->header = output.header;
79          memcpy(CalibAc->status,     output.status,     sizeof(CalibAc->status));          memcpy(CalibAc->status,     output.status,     sizeof(CalibAc->status));

Legend:
Removed from v.2.0  
changed lines
  Added in v.2.1

  ViewVC Help
Powered by ViewVC 1.1.23