/[PAMELA software]/yoda/mkinstalldirs
ViewVC logotype

Contents of /yoda/mkinstalldirs

Parent Directory Parent Directory | Revision Log Revision Log


Revision 6.0 - (show annotations) (download)
Tue Feb 7 17:10:40 2006 UTC (18 years, 9 months ago) by kusanagi
Branch: MAIN
CVS Tags: YODA6_2/01, YODA6_2/00, YODA6_3/19, YODA6_3/18, YODA6_3/13, YODA6_3/12, YODA6_3/11, YODA6_3/10, YODA6_3/17, YODA6_3/16, YODA6_3/15, YODA6_3/14, YODA6_3/06, YODA6_1/00, YODA6_0/00, YODA6_3/04, YODA6_3/05, YODA6_3/20, YODA6_3/07, YODA6_3/00, YODA6_3/01, YODA6_3/02, YODA6_3/03, YODA6_3/08, YODA6_3/09, HEAD
Changes since 5.0: +0 -0 lines
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 #! /bin/sh
2 # mkinstalldirs --- make directory hierarchy
3 # Author: Noah Friedman <friedman@prep.ai.mit.edu>
4 # Created: 1993-05-16
5 # Public domain
6
7 errstatus=0
8 dirmode=""
9
10 usage="\
11 Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..."
12
13 # process command line arguments
14 while test $# -gt 0 ; do
15 case "${1}" in
16 -h | --help | --h* ) # -h for help
17 echo "${usage}" 1>&2; exit 0 ;;
18 -m ) # -m PERM arg
19 shift
20 test $# -eq 0 && { echo "${usage}" 1>&2; exit 1; }
21 dirmode="${1}"
22 shift ;;
23 -- ) shift; break ;; # stop option processing
24 -* ) echo "${usage}" 1>&2; exit 1 ;; # unknown option
25 * ) break ;; # first non-opt arg
26 esac
27 done
28
29 for file
30 do
31 if test -d "$file"; then
32 shift
33 else
34 break
35 fi
36 done
37
38 case $# in
39 0) exit 0 ;;
40 esac
41
42 case $dirmode in
43 '')
44 if mkdir -p -- . 2>/dev/null; then
45 echo "mkdir -p -- $*"
46 exec mkdir -p -- "$@"
47 fi ;;
48 *)
49 if mkdir -m "$dirmode" -p -- . 2>/dev/null; then
50 echo "mkdir -m $dirmode -p -- $*"
51 exec mkdir -m "$dirmode" -p -- "$@"
52 fi ;;
53 esac
54
55 for file
56 do
57 set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
58 shift
59
60 pathcomp=
61 for d
62 do
63 pathcomp="$pathcomp$d"
64 case "$pathcomp" in
65 -* ) pathcomp=./$pathcomp ;;
66 esac
67
68 if test ! -d "$pathcomp"; then
69 echo "mkdir $pathcomp"
70
71 mkdir "$pathcomp" || lasterr=$?
72
73 if test ! -d "$pathcomp"; then
74 errstatus=$lasterr
75 else
76 if test ! -z "$dirmode"; then
77 echo "chmod $dirmode $pathcomp"
78
79 lasterr=""
80 chmod "$dirmode" "$pathcomp" || lasterr=$?
81
82 if test ! -z "$lasterr"; then
83 errstatus=$lasterr
84 fi
85 fi
86 fi
87 fi
88
89 pathcomp="$pathcomp/"
90 done
91 done
92
93 exit $errstatus
94
95 # Local Variables:
96 # mode: shell-script
97 # sh-indentation: 3
98 # End:
99 # mkinstalldirs ends here

  ViewVC Help
Powered by ViewVC 1.1.23