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.1.1.1 2004/07/06 12:20:23 kusanagi Exp $ |
* $Id: PscuHeader.cpp,v 1.3 2004/07/29 16:18:54 kusanagi Exp $ |
4 |
* $Author: kusanagi $ |
* $Author: kusanagi $ |
5 |
* |
* |
6 |
* Implementation of the PscuHeader class. |
* Implementation of the PscuHeader class. |
15 |
|
|
16 |
using namespace pamela; |
using namespace pamela; |
17 |
|
|
18 |
log4cpp::Category& cat = log4cpp::Category::getInstance("pamela.Techmodel.PscuHeader"); |
log4cpp::Category& cat = log4cpp::Category::getInstance("pamela.techmodel.PscuHeader"); |
19 |
|
|
20 |
/** |
/** |
21 |
* Create an PscuHeader object. |
* Create an PscuHeader object. |
34 |
*/ |
*/ |
35 |
const PacketType* PscuHeader::GetPacketType(void) const throw (std::exception) { |
const PacketType* PscuHeader::GetPacketType(void) const throw (std::exception) { |
36 |
switch (PacketId1) { |
switch (PacketId1) { |
37 |
case 0x10: return PacketType::Physics; |
case 0x07: return PacketType::PhysEndRun; |
38 |
case 0x11: return PacketType::ForcedPkt; |
case 0x08: return PacketType::CalibCalPulse1; |
39 |
case 0x12: return PacketType::CalibTrk1; |
case 0x09: return PacketType::CalibCalPulse2; |
40 |
case 0x13: return PacketType::CalibTrk2; |
case 0x10: return PacketType::Physics; |
41 |
case 0x14: return PacketType::CalibCal; |
case 0x11: return PacketType::CalibTrkBoth; |
42 |
case 0x15: return PacketType::CalibTrd; |
case 0x12: return PacketType::CalibTrk1; |
43 |
case 0x16: return PacketType::CalibTof; |
case 0x13: return PacketType::CalibTrk2; |
44 |
case 0x17: return PacketType::CalibS4; |
case 0x15: return PacketType::CalibTrd; |
45 |
case 0x20: return PacketType::RunHeader; |
case 0x16: return PacketType::CalibTof; |
46 |
case 0x21: return PacketType::RunTrailer; |
case 0x17: return PacketType::CalibS4; |
47 |
case 0x30: return PacketType::Alarm; |
case 0x18: return PacketType::CalibCalPed; |
48 |
case 0x40: return PacketType::Khb; |
case 0x19: return PacketType::CalibAc; |
49 |
case 0x50: return PacketType::Log; |
case 0x20: return PacketType::RunHeader; |
50 |
case 0x51: return PacketType::VarDump; |
case 0x21: return PacketType::RunTrailer; |
51 |
case 0x52: return PacketType::ArrDump; |
case 0x22: return PacketType::CalibHeader; |
52 |
case 0x53: return PacketType::TabDump; |
case 0x23: return PacketType::CalibTrailer; |
53 |
case 0x54: return PacketType::Tmtc; |
case 0x24: return PacketType::InitHeader; |
54 |
case 0x55: return PacketType::Mcmd; |
case 0x25: return PacketType::InitTrailer; |
55 |
case 0x56: return PacketType::HA_Header_E5; |
case 0x30: return PacketType::EventTrk; |
56 |
|
case 0x40: return PacketType::TestTrk; |
57 |
|
case 0x50: return PacketType::Log; |
58 |
|
case 0x51: return PacketType::VarDump; |
59 |
|
case 0x52: return PacketType::ArrDump; |
60 |
|
case 0x53: return PacketType::TabDump; |
61 |
|
case 0x54: return PacketType::Tmtc; |
62 |
|
case 0x55: return PacketType::Mcmd; |
63 |
|
case 0x60: return PacketType::ForcedFECmd; |
64 |
|
case 0x70: return PacketType::AcInit; |
65 |
|
case 0x71: return PacketType::CalInit; |
66 |
|
case 0x72: return PacketType::TrkInit; |
67 |
|
case 0x73: return PacketType::TofInit; |
68 |
|
case 0x74: return PacketType::TrgInit; |
69 |
|
|
70 |
default: { |
default: { |
71 |
cat << log4cpp::Priority::ERROR |
cat << log4cpp::Priority::ERROR |
72 |
<< "\n Unrecognized PacketType: " |
<< "\n Unrecognized PacketType: " |