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

Annotation of /yoda/event/PscuHeader.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (hide annotations) (download)
Thu Jul 29 16:18:54 2004 UTC (20 years, 4 months ago) by kusanagi
Branch: MAIN
Changes since 1.2: +35 -20 lines
*** empty log message ***

1 kusanagi 1.1 /** @file
2 kusanagi 1.2 * $Source: /home/cvsmanager/yoda/event/PscuHeader.cpp,v $
3 kusanagi 1.3 * $Id: PscuHeader.cpp,v 1.2 2004/07/06 13:31:14 kusanagi Exp $
4 kusanagi 1.2 * $Author: kusanagi $
5 kusanagi 1.1 *
6     * Implementation of the PscuHeader class.
7     */
8     #include <exception>
9     #include <string>
10    
11     #include <log4cpp/Category.hh>
12    
13     #include "PscuHeader.h"
14     #include "Exception.h"
15    
16     using namespace pamela;
17    
18     log4cpp::Category& cat = log4cpp::Category::getInstance("pamela.Techmodel.PscuHeader");
19    
20     /**
21     * Create an PscuHeader object.
22     */
23     PscuHeader::PscuHeader():
24     OrbitalTime(0),
25     PacketId1(0),
26     PacketId2(0),
27     Counter(0),
28     PacketLenght(0) { }
29    
30     PscuHeader::~PscuHeader() { }
31    
32     /**
33     * Get the packet type of this header.
34     */
35     const PacketType* PscuHeader::GetPacketType(void) const throw (std::exception) {
36     switch (PacketId1) {
37 kusanagi 1.3 case 0x07: return PacketType::PhysEndRun;
38     case 0x08: return PacketType::CalibCalPulse1;
39     case 0x09: return PacketType::CalibCalPulse2;
40     case 0x10: return PacketType::Physics;
41     case 0x11: return PacketType::CalibTrkBoth;
42     case 0x12: return PacketType::CalibTrk1;
43     case 0x13: return PacketType::CalibTrk2;
44     case 0x14: return PacketType::CalibCal;
45     case 0x15: return PacketType::CalibTrd;
46     case 0x16: return PacketType::CalibTof;
47     case 0x17: return PacketType::CalibS4;
48     case 0x18: return PacketType::CalibCalPed;
49     case 0x19: return PacketType::CalibAc;
50     case 0x20: return PacketType::RunHeader;
51     case 0x21: return PacketType::RunTrailer;
52     case 0x22: return PacketType::CalibHeader;
53     case 0x23: return PacketType::CalibTrailer;
54     case 0x24: return PacketType::InitHeader;
55     case 0x25: return PacketType::InitTrailer;
56     case 0x30: return PacketType::EventTrk;
57     case 0x40: return PacketType::TestTrk;
58     case 0x50: return PacketType::Log;
59     case 0x51: return PacketType::VarDump;
60     case 0x52: return PacketType::ArrDump;
61     case 0x53: return PacketType::TabDump;
62     case 0x54: return PacketType::Tmtc;
63     case 0x55: return PacketType::Mcmd;
64     case 0x60: return PacketType::ForcedFECmd;
65     case 0x70: return PacketType::AcInit;
66     case 0x71: return PacketType::CalInit;
67     case 0x72: return PacketType::TrkInit;
68     case 0x73: return PacketType::TofInit;
69     case 0x74: return PacketType::TrgInit;
70    
71 kusanagi 1.1 default: {
72     cat << log4cpp::Priority::ERROR
73     << "\n Unrecognized PacketType: "
74     << (int)PacketId1;
75     throw Exception("Invalid Packed Id1");
76     }
77     }
78     }
79    
80    
81     ClassImp(PscuHeader)
82    

  ViewVC Help
Powered by ViewVC 1.1.23