next up previous contents index
Next: A more complex Up: Ntuples Previous: One-dimensional convolution of

Ntuple examples

The first example shows the use of Row-Wise-Ntuples, containing only floating point data.

Creating and using a RWN

      SUBROUTINE HEXAM7
*.==========>
*.           Example of N-tuples.
*..=========>
      DIMENSION X(3)
      CHARACTER*8 CHTAGS(3)
      DATA CHTAGS/'   X   ','   Y   ','   Z   '/
*.___________________________________________
*.
*             Reopen data base
*
      CALL HROPEN(1,'HEXAM7','hexam.dat','U',1024,ISTAT)
*
      CALL HBOOK1(10,'TEST1',100,-3.,3.,0.)
      CALL HBOOK2(20,'TEST2',20,-3.,3.,20,-3.,3.,250.)
      CALL HBOOKN(30,'N-TUPLE',3,'//HEXAM7,1000,CHTAGS)
*
      DO 10 I=1,10000
         CALL RANNOR(A,B)
         X(1)=A
         X(2)=B
         X(3)=A*A+B*B
         CALL HFN(30,X)
  10  CONTINUE
*
      CALL HROUT(30,ICYCLE,' ')
      CALL HPROJ1(10,30,0,0,1,999999,1)
      CALL HPROJ2(20,30,0,0,1,999999,1,2)
      CALL HPRINT(0)
*
      CALL HROUT(10,ICYCLE,' ')
      CALL HROUT(20,ICYCLE,' ')
*
      CALL HLDIR(' ',' ')
*
      CALL HREND('HEXAM7')
      CLOSE (1)
*
      END

 TEST1                                                                           
 
 HBOOK     ID =        10                                        DATE  17/12/91              NO =  20
 
      250                                                        -   -  -
      240                                                      --I  -I- I
      230                                                  - - I I  I I-I
      220                                                 -I-I I I--I   I-   -
      210                                                -I  I-I         I---I
      200                                              --I                   I
      190                                           -- I                     I-
      180                                         --II-I                      I-
      170                                        -I                            I
      160                                        I                             I
      150                                       -I                             I
      140                                      -I                              I-- -
      130                                      I                                 I-I- -
      120                                    - I                                    I-I -
      110                                   -I-I                                      I-I
      100                                 --I                                           I
       90                                -I                                             I-
       80                               -I                                               I -
       70                             - I                                                I-I -
       60                            -I-I                                                  I-I
       50                        - --I                                                       I-- -
       40                       -I-I                                                           I-I-
       30                   -- -I                                                                 I----
       20          -    ----II-I                                                                      I------
       10       ---I----I                                                                                   I-------
 
 CHANNELS 100   0                                                                                                  1   
           10   0        1         2         3         4         5         6         7         8         9         0   
            1   1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890   
 
 CONTENTS 100                               111111111111122222222222222222222211111111111                           
           10      1    1111221234344665789911044677997990122303341234324100018734232120186756443432222111111       
            1.  1591794631142995679730577637087033910061276900757760757337734725809812493999812692748547445127656864
 
 LOW-EDGE       ---------------------------------------------------                                                 
            1.  3222222222222222211111111111111111                                 111111111111111112222222222222222
            0   0988776554432211099887665543322100998776654433211000112334456677899001223345566788990112234455677889
            0   0482604826048260482604826048260482604826048260482606284062840628406284062840628406284062840628406284
 
 * ENTRIES =      10000      * ALL CHANNELS = 0.9979E+04      * UNDERFLOW = 0.1000E+02      * OVERFLOW = 0.1100E+02
 * BIN WID = 0.6000E-01      * MEAN VALUE   =-0.1499E-01      * R . M . S = 0.9921E+00

\finalnewpage
\scriptsize

 TEST2                                                                           
 
 HBOOK     ID = 20                       DATE  17/12/91              NO =  21
 
 CHANNELS  10 U 0        1         2 O 
            1 N 12345678901234567890 V 
            ****************************
   OVE      *         ++22 3+  +       * OVE
     2.7    *     + ++233+3+6 ++ +     *  20
     2.4    *      + +396353325+3+ +   *  19
     2.1    *    ++2288EBCB89852 + 2   *  18
     1.8    *   +23+5B7HJIIKC8552++    *  17
     1.5    * + + 525CTJY*WQWUF864+2   *  16
     1.2    *    +78BRX******WMF8532   *  15
      .9    * 2 328DS**********KC72    *  14
      .6    * + 9+6IY**********RGA22 2 *  13
      .3    *   378LU**********VI563 2 *  12
            * + 43ARX**********TPC63 2 *  11
 -    .3    * + +3IQZ**********UFB53 3 *  10
 -    .6    * + 298PY**********SIB83 + *   9
 -    .9    *    65JS**********QKE55   *   8
 -   1.2    * + 4358MT********NN863  + *   7
 -   1.5    * + 3 3AIS*******QFF7+4+   *   6
 -   1.8    *     44ADKQZYX*YPG942++   *   5
 -   2.1    *   +4334BELLKCNE7F66+++   *   4
 -   2.4    * + ++ 327598C7943672+3    *   3
 -   2.7    *      + 23467382+2        *   2
 -   3      *      2 ++++332+42        *   1
   UND      *        ++2 +++++ 2       * UND
            ****************************
 LOW-EDGE       -----------         
            1.  3222111       111222
            0   07418529630369258147
  *                                                        I   11    I
  * ENTRIES =    10000                 PLOT       ---------I---------I---------
  * SATURATION  AT=          255                     10    I 9957    I   11
  * SCALE  .,+,2,3,.,., A,B,         STATISTICS   ---------I---------I---------
  * STEP = 1.00     * MINIMUM=0.000                        I   11    I

 ********************************************************
 * NTUPLE ID=   30  ENTRIES=  10000   N-TUPLE 
 ********************************************************
 *  Var numb  *   Name    *    Lower     *    Upper     *
 ********************************************************
 *      1     *    X      * -.359595E+01 * 0.396836E+01 *
 *      2     *    Y      * -.398909E+01 * 0.381000E+01 *
 *      3     *    Z      * 0.748417E-03 * 0.162475E+02 *
 ********************************************************

 ===> Directory : 
         30 (N)   N-TUPLE 
         10 (1)   TEST1   
         20 (2)   TEST2



Last update: Tue May 16 09:09:27 METDST 1995