/[PAMELA software]/yoda/event/SubPacket.h
ViewVC logotype

Contents of /yoda/event/SubPacket.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2.0 - (show annotations) (download)
Tue Sep 21 20:49:57 2004 UTC (20 years, 2 months ago) by kusanagi
Branch: MAIN
Changes since 1.1: +3 -3 lines
File MIME type: text/plain
Major release

1 /** @file
2 * $Source: /home/cvsmanager/yoda/event/SubPacket.h,v $
3 * $Id: SubPacket.h,v 1.1.1.1 2004/07/06 12:20:23 kusanagi Exp $
4 * $Author: kusanagi $
5 *
6 * Header file for the SubPacket class.
7 */
8 #ifndef SUB_PACKET_H
9 #define SUB_PACKET_H
10
11
12 #include <string>
13
14 // #include <root/TObject.h>
15 #include <TObject.h> //Substituted by Maurizio 05 Feb 2004
16
17 #include "PacketType.h"
18 #include "SubDetector.h"
19
20 namespace pamela {
21 /**
22 * A SubPacket is the basic structure of all event data in the ROOT storage.
23 * Every ROOT tree is built on top of one SubPacket. An analys step
24 * which wants to save data needs to create a SubPacket.
25 */
26 class SubPacket: public TObject {
27 private:
28 /**
29 * The packet type of the sub packet.
30 */
31 const pamela::PacketType* Type; //!
32 /**
33 * The subdetector this packet belongs to, or 0 if it is not specific to
34 * any subdetector.
35 */
36 const pamela::SubDetector* Detector; //!
37 /**
38 * The name of the subpacket.
39 */
40 std::string SubPacketName; //!
41 protected:
42 SubPacket(std::string, const pamela::PacketType* = 0, const pamela::SubDetector* = 0);
43 public:
44 SubPacket(void);
45 /**
46 * Get the name of the SubPacket.
47 */
48 virtual std::string GetSubPacketName(void) const { return SubPacketName; }
49 /**
50 * Return TRUE if the SubPacket belongs to a certain subdetector.
51 */
52 bool IsDetectorSpecific(void) const { return (Detector != 0); }
53 /**
54 * Get the subdetector if the SubPacket is detector specific.
55 */
56 const pamela::SubDetector* GetSubDetector(void) const { return Detector; }
57 /**
58 * Get the packet type (physics, orbital etc.) the SubPacket belongs to.
59 */
60 const pamela::PacketType* GetPacketType(void) const { return Type; }
61 ClassDef(SubPacket, 1)
62 };
63 }
64
65 #endif /* SUB_PACKET_H */
66

  ViewVC Help
Powered by ViewVC 1.1.23