]> git.uio.no Git - u/mrichter/AliRoot.git/blame - GEANT321/gbase/gwork.F
Initial version
[u/mrichter/AliRoot.git] / GEANT321 / gbase / gwork.F
CommitLineData
fe4da5cc 1*
2* $Id$
3*
4* $Log$
5* Revision 1.1.1.1 1995/10/24 10:20:11 cernlib
6* Geant
7*
8*
9#include "geant321/pilot.h"
10*CMZ : 3.21/02 29/03/94 15.41.19 by S.Giani
11*-- Author :
12 SUBROUTINE GWORK(NWORK)
13C.
14C. ******************************************************************
15C. * *
16C. * Handle working space. *
17C. * *
18C. * If NWORK>0 make sure that at least NWORK words of working *
19C. * space are available in the GCBANK common. If current *
20C. * working space is >= NWORK, do nothing. *
21C. * *
22C. * If NWORK=0 return in NWORK the current size of the *
23C. * working space. *
24C. * *
25C. * If NWORK<0 reset the working space to be NWORK words *
26C. * irrespective of its value. *
27C. * *
28C. * ==>Called by :USER,GZINIT,GPHYSI,GDRAWC,GDRAWX,GDSHOW,GKXYZ *
29C. * *
30C. * Author R.Brun ********* *
31C. * *
32C. ******************************************************************
33C.
34#include "geant321/gcbank.inc"
35#if defined(CERNLIB_DEBUG)
36#include "geant321/gcunit.inc"
37#endif
38 COMMON / QUEST / IQUEST(100)
39C.
40C. ------------------------------------------------------------------
41C.
42 IF(NWORK.GE.0) THEN
43 CALL MZINQS(IXSTOR)
44 NOWORK = IQUEST(5)-IQUEST(3)-1
45#if defined(CERNLIB_DEBUG)
46 WRITE(CHMAIL,
47 + '('' *** GWORK: Size of the working space = '',I10)') NOWORK
48 CALL GMAIL(0,0)
49#endif
50 IF(NWORK.EQ.0) THEN
51 NWORK=NOWORK
52 ELSE
53 IF(NWORK.GT.NOWORK) THEN
54 CALL MZWORK(IXSTOR,WS,WS(NWORK),0)
55 ENDIF
56 ENDIF
57 ELSE
58 CALL MZWORK(IXSTOR,WS,WS(-NWORK),0)
59 ENDIF
60 END