This commit was generated by cvs2svn to compensate for changes in r2,
[u/mrichter/AliRoot.git] / GEANT321 / cgpack / cgcopy.F
CommitLineData
fe4da5cc 1*
2* $Id$
3*
4* $Log$
5* Revision 1.1.1.1 1995/10/24 10:19:42 cernlib
6* Geant
7*
8*
9#include "geant321/pilot.h"
10*CMZ : 3.21/02 29/03/94 15.41.31 by S.Giani
11*-- Author :
12 SUBROUTINE CGCOPY(A,NMAX,B)
13************************************************************************
14* *
15* Name: CGCOPY *
16* Author: E. Chernyaev Date: 02.11.88 *
17* Revised: *
18* *
19* Function: Copy one CG-object to another *
20* *
21* References: none *
22* *
23* Input: A(*) - 1-st CG-object *
24* NMAX - max length B array *
25* *
26* Output: B(*) - resulting CG-object *
27* *
28* Errors: none *
29* *
30************************************************************************
31#include "geant321/cggpar.inc"
32 REAL A(*),B(*)
33*-
34 NSIZE = A(KCGSIZ)
35 B(KCGSIZ) = 0.
36 IF (NSIZE .LE. 0) GOTO 999
37 IF (NMAX .LE. 0) GOTO 999
38 IF (NSIZE .GT. NMAX) B(KCGSIZ) = NMAX - NSIZE
39 IF (NSIZE .GT. NMAX) GOTO 999
40 DO 100 I=1,NSIZE
41 B(I) = A(I)
42 100 CONTINUE
43*
44 999 RETURN
45 END