ВЕС. Подпрограммы для работы с процессорами.

This set of routines produces management over processors. Coded by: Borisov G.V. 29-aug-88

Этот набор подпрограмм задумывался, как пакет для обслуживания ZEBRA структуры,

придуманной для удобства трековой реконструкции Г.Борисовым (её описание см. здесь).

 


List of routines.

      subroutine psaddf(nwd1,arr,nwr1,iaddr,ihitr,ief)
           entry pscref(nwd1,nwr1,ief)
           entry pscrea(nwlead,nwtr)
      subroutine psdelf(ief)
           entry psdlf1(ipra,ief)
           entry psrstf(ief)
      subroutine pspurg(iprcnm)
      subroutine psilad(inum1,ihit,iprcnm,ief)
      subroutine psildl(inum,ihit,ipr,ief)
           entry psilrs(inum,ihit,ipr,ief)
      subroutine psilst(inum1,ihit,ladbeg,ladst,ladr,nril)
      subroutine psilgt(inum,ihit,nref,ipr,ief,nref1)
           entry psilex(inum,ihit,ipr1,nref,ief,nref1)
      subroutine psclos
      subroutine psinit
      subroutine psnext(inum,ief,ladr)
      Additional subroutines(psgref,psghit,psgpnm)

PSADDF(nwd1,arr,nwr1,iaddr,ihitr,ief)


	This routine fills information about EF (Events Fragment)
	into corresponding bank.

  Parameters:
        nwd1  - the length of the fragment
        arr   - array with content of the fragment  
        nwr1  - the number of the references to the data in TD bank 
        iaddr(*) - the relative address of data for given detector in TD bank
        ihitr(*) - hits numbers
        ief (output) - the Event Fragment number

entry PSCREF(nwd1,nwr1,ief)


       This routine creates empty Event Fragment

  Parameters:
        nwd1  - the length of the fragment
        nwr1  - the number of the references to the data in TD bank 
        ief (output) - the Event Fragment number

entry PSCREA(nwlead,nwtr)

      This routine creates empty PO structure (leading and trailing banks)
  Parameters:
        nwlead - the length of the Leading  PO bank
        nwtr   - the length of the Trailing PO bank

PSDELF(ief)

	This routine deletes Event_Fragment from the Bank.
	(Really it remains in the bank_body until someone makes
	purge operation).
        You can restore previously deleted EF calling PSRSTF(ief)
  Parameters:
        ief (input) - the Event Fragment number for current processor

  Примечание:	
		!Delete all Fragments, that refer to this one.

	For the sake of simplicity now we do not make this
	combersome procedure.	If it will be needed later,
	we shall try to do it.		G.Borisov.

entry PSDLF1(ipra,ief)


	This routine deletes Event_Fragment from the Bank.
	(Really it remains in the bank_body until someone makes
	purge operation).

  Parameters:
        ipra(input) - the processor number
        ief (input) - the Event Fragment number for processor ipra 

entry PSRSTF(ief)


	This routine restore previously deleted EF

  Parameters:
        ief(input) - the Event Fragment number for current processor

PSPURG(iprcnm)


	This routine purges bank with Event_Fragments for given
	processor (as defined by lrgprc) from all deleted EF.

  Parameters:
        iprcnm (input) - the processor number

PSILAD(inum1,ihit,iprcnm,ief)


	This routine Adds information into IL for given processor
	or detector.
            Используется только внутри PS-пакета и только один раз -
            в подпрограмме PSADDF.

  Parameters:
        inum1  - if<32768 detector number if>32768 - processor number + 32768
        ihit   - hit number
        iprcnm - current processor number
        ief    - event fragment number

PSILDL(inum,ihit,ipr,ief)

	This routine deletes IL reference for
	processor (detector) INUM, hit no. IHIT on event fragment IEF
	of processor IPR.
  Parameters:
        inum  - detector/processor  number 
        ihit  - hit number
        ipr   - "upper" processor of event fragment
        ief   - "upper" event fragment number

entry PSRSTF(ief)

	This routine drestores IL reference for
	processor (detector) INUM, hit no. IHIT on event fragment IEF
	of processor IPR.
  Parameters:
        inum  - detector/processor  number 
        ihit  - hit number
        ipr   - "upper" processor of event fragment
        ief   - "upper" event fragment number
        ief(input) - the Event Fragment number for current processor

PSILST(inum1,ihit,ladbeg,ladst,ladr,nril)

	This routine finds start of IL for
	processor (detector) INUM, hit no. IHIT.
  Parameters:
  input:inum1  - detector/processor  number 
        ihit   - hit/fragment number
 output:ladbeg - address of DR/PR bank
        ladst  - address of the reference (K-address) of the ladr
        ladr   - address of the first IL segment
        nril   - the number of IL segments in the chain    

PSILGT(inum,ihit,nref,ipr,ief,nref1)

	This routine gets for given INUM (detector or processor)
	and IHIT all recorded Inclusion_References.
  Parameters:
  input:inum   - detector/processor  number 
        ihit   - hit/fragment number
        nref   - the maximum number of the Inclusion_References
                 (the length of ipr&ief)
 output:ipr    - processors numbers
        ief    - fragments numbers
        nref1  - number of founded Inclusion_references

entry PSILEX(inum,ihit,ipr1,nref,ief,nref1)

	This routine gets for given INUM (detector or processor)
	and IHIT all recorded Inclusion_References to given processor ipr1.
  Parameters:
  input:inum   - detector/processor  number 
        ihit   - hit/fragment number
        ipr1   - "upper" processor number
        nref   - the maximum number of the Inclusion_References
                 (the length of ief)
 output:ief    - fragments numbers
        nref1  - number of founded Inclusion_references

PSCLOS()

	This routine closes all PO,DR,PR banks: it purges, cuts
	and prepear them for output.

PSINIT()

	This routine makes initilisation procedures
	for PO,DR,PR structures.

psnext(inum,ief,lad)


This routine determines the address of next EF, which number
greater or equal IEF and returns it. On return IEF - number
of found EF. (If there is no any EF for given processor,
it returns IEF=0)
.