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

Annotation of /yoda/event/PscuHeader.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 6.1 - (hide annotations) (download)
Tue May 30 19:10:01 2006 UTC (18 years, 6 months ago) by kusanagi
Branch: MAIN
Changes since 6.0: +6 -2 lines
Major update.
All the packet officially produced by PAMELA are implemented and unpacked.
The RegistryEvent Packet has been removed and put into another library.
New version, releasd by D.Campana, of tofunpack.

1 kusanagi 1.1 /** @file
2 kusanagi 1.2 * $Source: /home/cvsmanager/yoda/event/PscuHeader.cpp,v $
3 kusanagi 6.1 * $Id: PscuHeader.cpp,v 6.0 2006/02/07 17:11:07 kusanagi Exp $
4 kusanagi 6.0 * $Author: kusanagi $
5 kusanagi 1.1 *
6     * Implementation of the PscuHeader class.
7     */
8 kusanagi 1.5 #include <log4cxx/logger.h>
9 kusanagi 1.1 #include "PscuHeader.h"
10    
11     using namespace pamela;
12    
13 kusanagi 1.5 static log4cxx::LoggerPtr logger = log4cxx::Logger::getLogger(_T("pamela.techmodel.PscuHeader"));
14 kusanagi 2.2 //static std::stringstream oss;
15 kusanagi 1.1
16     /**
17     * Create an PscuHeader object.
18     */
19     PscuHeader::PscuHeader():
20     OrbitalTime(0),
21     PacketId1(0),
22     PacketId2(0),
23     Counter(0),
24     PacketLenght(0) { }
25    
26     PscuHeader::~PscuHeader() { }
27    
28     /**
29     * Get the packet type of this header.
30     */
31 kusanagi 2.2 const PacketType* PscuHeader::GetPacketType(void) const throw (UnidentifiedPacketException) {
32 kusanagi 1.1 switch (PacketId1) {
33 kusanagi 1.3 case 0x07: return PacketType::PhysEndRun;
34     case 0x08: return PacketType::CalibCalPulse1;
35     case 0x09: return PacketType::CalibCalPulse2;
36     case 0x10: return PacketType::Physics;
37 kusanagi 6.1 case 0x11: return PacketType::CalibTrkBoth;
38 kusanagi 1.3 case 0x12: return PacketType::CalibTrk1;
39     case 0x13: return PacketType::CalibTrk2;
40     case 0x16: return PacketType::CalibTof;
41     case 0x17: return PacketType::CalibS4;
42     case 0x18: return PacketType::CalibCalPed;
43 kusanagi 2.4 case 0x19: return PacketType::Calib1_Ac1;
44     case 0x1A: return PacketType::Calib2_Ac1;
45     case 0x1B: return PacketType::Calib1_Ac2;
46     case 0x1C: return PacketType::Calib2_Ac2;
47 kusanagi 6.1 case 0x1D: return PacketType::CalibCal;
48 kusanagi 1.3 case 0x20: return PacketType::RunHeader;
49     case 0x21: return PacketType::RunTrailer;
50     case 0x22: return PacketType::CalibHeader;
51     case 0x23: return PacketType::CalibTrailer;
52     case 0x24: return PacketType::InitHeader;
53     case 0x25: return PacketType::InitTrailer;
54 kusanagi 6.1 case 0x30: return PacketType::EventTrk;
55 kusanagi 1.3 case 0x50: return PacketType::Log;
56     case 0x51: return PacketType::VarDump;
57     case 0x52: return PacketType::ArrDump;
58     case 0x53: return PacketType::TabDump;
59     case 0x54: return PacketType::Tmtc;
60     case 0x55: return PacketType::Mcmd;
61     case 0x60: return PacketType::ForcedFECmd;
62 kusanagi 2.4 case 0x70: return PacketType::Ac1Init;
63 kusanagi 1.3 case 0x71: return PacketType::CalInit;
64     case 0x72: return PacketType::TrkInit;
65     case 0x73: return PacketType::TofInit;
66     case 0x74: return PacketType::TrgInit;
67 kusanagi 2.3 case 0x75: return PacketType::NdInit;
68     case 0x76: return PacketType::S4Init;
69 kusanagi 2.4 case 0x77: return PacketType::Ac2Init;
70 kusanagi 1.5 case 0x81: return PacketType::CalAlarm;
71 kusanagi 6.1 case 0x82: return PacketType::Ac1Alarm;
72 kusanagi 1.5 case 0x83: return PacketType::TrkAlarm;
73     case 0x84: return PacketType::TrgAlarm;
74     case 0x85: return PacketType::TofAlarm;
75 kusanagi 2.3 case 0x86: return PacketType::S4Alarm;
76 kusanagi 6.1 case 0x89: return PacketType::Ac2Alarm;
77 kusanagi 2.5 case 0xA1: return PacketType::TsbT;
78     case 0xAB: return PacketType::TsbB;
79 kusanagi 1.3
80 kusanagi 1.1 default: {
81 kusanagi 2.2 throw UnidentifiedPacketException(PacketId1);
82 kusanagi 1.1 }
83     }
84     }
85    
86    
87     ClassImp(PscuHeader)
88    
89 kusanagi 2.3

  ViewVC Help
Powered by ViewVC 1.1.23