/[PAMELA software]/yoda/event/PscuHeader.cpp
ViewVC logotype

Diff of /yoda/event/PscuHeader.cpp

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

revision 1.3 by kusanagi, Thu Jul 29 16:18:54 2004 UTC revision 2.0 by kusanagi, Tue Sep 21 20:49:57 2004 UTC
# Line 1  Line 1 
1  /** @file  /** @file
2   * $Source: /home/cvsmanager/yoda/event/PscuHeader.cpp,v $   * $Source: /home/cvsmanager/yoda/event/PscuHeader.cpp,v $
3   * $Id: PscuHeader.cpp,v 1.2 2004/07/06 13:31:14 kusanagi Exp $   * $Id: PscuHeader.cpp,v 1.5 2004/09/21 20:23:37 kusanagi Exp $
4   * $Author: kusanagi $   * $Author: kusanagi $
5   *   *
6   * Implementation of the PscuHeader class.   * Implementation of the PscuHeader class.
7   */   */
8  #include <exception>  #include <exception>
9  #include <string>  #include <string>
10    #include <sstream>
11    
12  #include <log4cpp/Category.hh>  #include <log4cxx/logger.h>
13    
14  #include "PscuHeader.h"  #include "PscuHeader.h"
15  #include "Exception.h"  #include "Exception.h"
16    
17  using namespace pamela;  using namespace pamela;
18    
19  log4cpp::Category& cat = log4cpp::Category::getInstance("pamela.Techmodel.PscuHeader");  static log4cxx::LoggerPtr logger = log4cxx::Logger::getLogger(_T("pamela.techmodel.PscuHeader"));
20    static std::stringstream oss;
21    
22  /**  /**
23   * Create an PscuHeader object.   * Create an PscuHeader object.
# Line 41  const PacketType* PscuHeader::GetPacketT Line 43  const PacketType* PscuHeader::GetPacketT
43      case 0x11: return PacketType::CalibTrkBoth;      case 0x11: return PacketType::CalibTrkBoth;
44      case 0x12: return PacketType::CalibTrk1;      case 0x12: return PacketType::CalibTrk1;
45      case 0x13: return PacketType::CalibTrk2;      case 0x13: return PacketType::CalibTrk2;
     case 0x14: return PacketType::CalibCal;  
46      case 0x15: return PacketType::CalibTrd;      case 0x15: return PacketType::CalibTrd;
47      case 0x16: return PacketType::CalibTof;      case 0x16: return PacketType::CalibTof;
48      case 0x17: return PacketType::CalibS4;      case 0x17: return PacketType::CalibS4;
# Line 55  const PacketType* PscuHeader::GetPacketT Line 56  const PacketType* PscuHeader::GetPacketT
56      case 0x25: return PacketType::InitTrailer;      case 0x25: return PacketType::InitTrailer;
57      case 0x30: return PacketType::EventTrk;      case 0x30: return PacketType::EventTrk;
58      case 0x40: return PacketType::TestTrk;      case 0x40: return PacketType::TestTrk;
59        case 0x41: return PacketType::TestTof;
60      case 0x50: return PacketType::Log;      case 0x50: return PacketType::Log;
61      case 0x51: return PacketType::VarDump;      case 0x51: return PacketType::VarDump;
62      case 0x52: return PacketType::ArrDump;      case 0x52: return PacketType::ArrDump;
# Line 67  const PacketType* PscuHeader::GetPacketT Line 69  const PacketType* PscuHeader::GetPacketT
69      case 0x72: return PacketType::TrkInit;      case 0x72: return PacketType::TrkInit;
70      case 0x73: return PacketType::TofInit;      case 0x73: return PacketType::TofInit;
71      case 0x74: return PacketType::TrgInit;      case 0x74: return PacketType::TrgInit;
72        case 0x81: return PacketType::CalAlarm;
73        case 0x82: return PacketType::AcAlarm;
74        case 0x83: return PacketType::TrkAlarm;
75        case 0x84: return PacketType::TrgAlarm;
76        case 0x85: return PacketType::TofAlarm;
77        
78    default: {    default: {
79      cat <<  log4cpp::Priority::ERROR      oss.flush();
80          <<  "\n Unrecognized PacketType: "      oss <<  "\n Unrecognized PacketType: "
81          <<  (int)PacketId1;          <<  (int)PacketId1;
82        logger->error(oss.str().c_str());
83      throw Exception("Invalid Packed Id1");      throw Exception("Invalid Packed Id1");
84    }    }
85    }    }

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

  ViewVC Help
Powered by ViewVC 1.1.23