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

Annotation of /yoda/event/SubPacket.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations) (download)
Tue Jul 6 12:20:23 2004 UTC (20 years, 5 months ago) by kusanagi
Branch: MAIN
File MIME type: text/plain
Initial revision

1 kusanagi 1.1 /** @file
2     * $Source: /home/cvspamela/yoda/event/SubPacket.h,v $
3     * $Id: SubPacket.h,v 1.6 2004/03/16 10:18:28 nagni Exp $
4     * $Author: nagni $
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