Parent Directory | Revision Log
Several new features in this revision: a) all the packets are conform to the Mass Memory Format specifications (http://people.roma2.infn.it/~cpu/Mass_Memory_Format.html) b) unpacking either using the old files structure OR the new one file unpacking. c) parametrized root files compression factor d) deleting of the following packet: TofTest, TrkTest, TrkEvent. e) the Tracker routines now work without the use of temp files. The point a) allow Yoda to unpack in the root file all the packets generated by the CPU. According to the MassMemoryFormat; that is three possible data are available: 1) almost explicit structure of the packet (like for Log, Tracker, Mcmd, etc....); 2) dummy data collection structure (InitHeader, InitTrailer, CalibHeader, CalibTrailer); 3) just the data of the packet (almost all Alarm and Init procedures). The class regarding this packets have only one parameters, a TArrayC class, which contain the data-block included in the packet (tat is the data below the packet Header). The point b) has been implemented as a consequence of an agreement about a more compact structure of the unpacked data. Up to now the structure of each unpacked data consisted of a folder, named after the packet type, and three files: xxx.Header.root, xxx.NamePacket.root, xxx.Registry.root. Starting from this release YODA, by default will unpack the data in a unique root file. The structure of this file will consist of: - several TTree(s) named after the packet type; - into each TTree are foreseen three TBranche(s): - 'Header' (the old xxx.Header.root file) - 'NameOfThePacket' (the old xxx.Event.root file or the xxx.Event.DETECTOR.root) - 'Registry' (the old xxx.Registry.root file) Anyway is still possible, but deprecated, to unpack using the old structure, passing to the "yoda" command the optional parameter "-multifile" The point c) has been implemented because is well know that writing time in a TTree is as much fast as much lower is the compression factor for the root file; anyway for a PAMELA dat file, a compression equal to 0 will generate a root file which will be more than two times the original size. To modify the compression parameter just add the optional parameter "-c [0-9]" to the yoda command line.
1 | /** @file |
2 | * $Source: /home/cvsmanager/yoda/event/SubPacket.h,v $ |
3 | * $Id: SubPacket.h,v 5.1 2006/02/04 12:37:43 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 | #define UINT32 unsigned int |
12 | #define UINT16 unsigned short |
13 | #define UINT8 unsigned char |
14 | #include "PacketType.h" |
15 | #include "SubDetector.h" |
16 | #include "TObject.h" |
17 | |
18 | namespace pamela { |
19 | /** |
20 | * A SubPacket is the basic structure of all event data in the ROOT storage. |
21 | * Every ROOT tree is built on top of one SubPacket. An analys step |
22 | * which wants to save data needs to create a SubPacket. |
23 | */ |
24 | class SubPacket: public TObject { |
25 | private: |
26 | /** |
27 | * The packet type of the sub packet. |
28 | */ |
29 | const pamela::PacketType* Type; //! |
30 | /** |
31 | * The subdetector this packet belongs to, or 0 if it is not specific to |
32 | * any subdetector. |
33 | */ |
34 | const pamela::SubDetector* Detector; //! |
35 | /** |
36 | * The name of the subpacket. |
37 | */ |
38 | std::string SubPacketName; //! |
39 | protected: |
40 | SubPacket(std::string, const pamela::PacketType* = 0, const pamela::SubDetector* = 0); |
41 | virtual const char* Print(){ return "SubType"; } |
42 | std::stringstream oss; //! |
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 | |
62 | ClassDef(SubPacket, 1) |
63 | }; |
64 | } |
65 | |
66 | #endif /* SUB_PACKET_H */ |
67 |
ViewVC Help | |
Powered by ViewVC 1.1.23 |