CW-Ntuple duplicated with selection (2)

This example is similar to the previous one, except that more operations are done is the COMIS routine.

A sub-Ntuple with nation = 'IT'

opt stat hi/file 1 cwn_aptuple.hbook uwfunc //lun1/11 cwn.inc hi/file 2 cwn_aptuple_dup.hbook ! N * application comis quit subroutine ntdup(Id1,Id2) include 'cwn.inc' 1 CALL HNTDUP(ID1,ID2,-1,' ','A') call hnoent(Id1,Noent) do ievent=1,noent call hgnt(id1,ievent,ierr) if (ierr.ne.0) goto 20 if (Nation.eq.'IT') then call hfnt(id2) endif enddo 1 20 CALL HROUT(ID2,ICYCLE,' ') * end quit * call ntdup(11,110) * nt/plot //lun1/11.children set hcol 1105 nt/plot //lun2/110.children option=s set hwid 8 nt/plot //lun1/11.children nation='IT' option=s 2 CLOSE 0

  1. The ntuple duplication and its ouput on disk can be done inside the COMIS routine itself.
  2. Note that if 0 is given the command CLOSE all the opened files are closed.



Last update: 96/05/24 17.23
Olivier.Couet@Cern.Ch