TABLE OF CONTENTS
- 1. /PreEvList
- 1.1. PreEvList/CreateSortedPreEvent
- 1.2. PreEvList/ComparePreEvent
- 1.3. PreEvList/PreEvList_INIT
- 1.4. PreEvList/PreEvList_CLEAR
- 1.5. PreEvList/PreEvList_INSERT
- 1.6. PreEvList/PreEvList_GET
- 1.7. PreEvList/PreEvList_Print
- 1.8. PreEvList/PreEvList_PrintEntry
- 1.9. PreEvList/PreEvList_PrintEntryRaw
- 1.10. PreEvList/PreEvList_Sort
- 1.11. PreEvList/compare
/PreEvList [ Modules ]
NAME
module PreEvList
PURPOSE
Here the handling of "type tPreEvList" are given.
PreEvList/CreateSortedPreEvent [ Functions ]
[ Top ] [ PreEvList ] [ Functions ]
NAME
logical function CreateSortedPreEvent(E, PreE, chargeZero) logical function CreateSortedPreEvent(Parts, PreE, chargeZero)
PURPOSE
This routine creates a sorted list of particles on the basis of type "preEvent" out of the given tEvent.
INPUTS
or * type(particle), dimension(:) :: Parts -- The Particles
OUTPUT
- type(preEvent), dimension(:) :: PreE -- the list of particles
- return value flags success or not
NOTES
Only a maximum number of particles is considered, at the moment: 40.
PreEvList/ComparePreEvent [ Functions ]
[ Top ] [ PreEvList ] [ Functions ]
NAME
integer function ComparePreEvent(preE1, preE2)
PURPOSE
return -1,0,1 as ordering parameter of preEvents
PreEvList/PreEvList_INIT [ Subroutines ]
[ Top ] [ PreEvList ] [ Subroutines ]
NAME
subroutine PreEvList_INIT(L)
PURPOSE
Initialize the List (call only at start; to reset the list please call PreEvList_CLEAR)
INPUTS
- type(tPreEvList) :: L -- The List
OUTPUT
(none)
PreEvList/PreEvList_CLEAR [ Subroutines ]
[ Top ] [ PreEvList ] [ Subroutines ]
NAME
subroutine PreEvList_CLEAR(L)
PURPOSE
Reset the List: Delete all Nodes and Entries and re-init the pointers
INPUTS
- type(tPreEvList) :: L -- The List
OUTPUT
(none)
PreEvList/PreEvList_INSERT [ Subroutines ]
[ Top ] [ PreEvList ] [ Subroutines ]
NAME
subroutine PreEvList_INSERT(L, V, ipos)
PURPOSE
Insert the entry "V" into the list "L", if it is not already in. In this case, just sum up the value of "weight" of the corresponding node
INPUTS
- type(tPreEvList) :: L -- The List
- type(tPreEvListEntry) :: V -- The Entry
OUTPUT
- integer, OPTIONAL :: ipos -- the position in the list
- The list is modified
NOTES
one could think about building up a sorted list instead of just appending new entries at the end.
PreEvList/PreEvList_GET [ Subroutines ]
[ Top ] [ PreEvList ] [ Subroutines ]
NAME
logical function PreEvList_GET(L, V, ipos)
PURPOSE
return the value stored at ipos in the list L (as a copy)
INPUTS
- type(tPreEvList) :: L -- The List
- type(tPreEvListEntry) :: V -- The Entry
- integer :: ipos -- the position in the list
OUTPUT
- type(tPreEvListEntry) :: V -- The Entry
- function value : .true. at success
PreEvList/PreEvList_Print [ Subroutines ]
[ Top ] [ PreEvList ] [ Subroutines ]
NAME
subroutine PreEvList_Print(iFile, L, fak, n, iBreak, sBreak, withLN, SortCrit)
PURPOSE
Write the list "L" to file "iFile". Multiply the written weights by the factor "fak". As a side effect, the list is being sorted (before printing).
INPUTS
- integer :: iFile -- The file number
- type(tPreEvList) :: L -- The List
- real :: fak -- the factor to multiply the weights with
- integer,OPTIONAL :: n -- number of columns to print
- integer,OPTIONAL :: iBreak -- some string is inserted after entry nnn
- character*(*),OPTIONAL :: sBreak -- string to insert
- logical, OPTIONAL :: withLN -- print with line numbers
- integer, OPTIONAL :: SortCrit -- switch sorting on/off
The parameter SortCrit may take the values:
- 0: no sorting
- 1: only weight (default)
- 2: first weight, then the content
- 3: only the content (it is not possible to have same content and different wight)
OUTPUT
witten to file "iFile"
NOTES
The format is not very clean.
PreEvList/PreEvList_PrintEntry [ Subroutines ]
[ Top ] [ PreEvList ] [ Subroutines ]
NAME
subroutine PreEvList_PrintEntry(iFile,E,fak,n,iBreak,sBreak,iLN,doWeight,noAdvance)
PURPOSE
Print a tPreEvListEntry to output.
INPUTS
- integer :: iFile -- The file number
- type(tPreEvListEntry) :: E -- The List-Entry
- real :: fak -- the factor to multiply the weights with
- integer,OPTIONAL :: n -- number of columns to print
- integer,OPTIONAL :: iBreak -- some string is inserted after entry nnn
- character*(*),OPTIONAL :: sBreak -- string to insert
- integer, OPTIONAL :: iLN -- line number to print
- logical, OPTIONAL :: doWeight -- print weight or not
- logical, OPTIONAL :: noAdvance -- print line feed or not
OUTPUT
witten to file "iFile"
NOTES
The format is not very clean.
PreEvList/PreEvList_PrintEntryRaw [ Subroutines ]
[ Top ] [ PreEvList ] [ Subroutines ]
NAME
subroutine PreEvList_PrintEntryRaw
PURPOSE
Print a tPreEvListEntry to output.
INPUTS
- integer :: iFile -- The file number
- type(tPreEvListEntry) :: E -- The List-Entry
- real :: fak -- the factor to multiply the weights with
- integer,OPTIONAL :: n -- number of columns to print
- integer,OPTIONAL :: iBreak -- some string is inserted after entry nnn
- character*(*),OPTIONAL :: sBreak -- string to insert
- integer, OPTIONAL :: iLN -- line number to print
- logical, OPTIONAL :: doWeight -- print weight or not
- logical, OPTIONAL :: noAdvance -- print line feed or not
OUTPUT
witten to file "iFile"
NOTES
The format is not very clean.
PreEvList/PreEvList_Sort [ Subroutines ]
[ Top ] [ PreEvList ] [ Subroutines ]
NAME
subroutine PreEvList_Sort(L,crit)
PURPOSE
Sort the list 'L' by weights (using the 'mergesort' algorithm).
INPUTS
- type(tPreEvList) :: L -- the unsorted list
- integer, OPTIONAL :: crit -- the sort criterion
OUTPUT
- type(tPreEvList) :: L -- the sorted list
NOTE This routine represents a rather direct translation of the C code from http://www.chiark.greenend.org.uk/~sgtatham/algorithms/listsort.html
The criterion 'crit' may have the values:
- 1: only weight (default)
- 2: first weight, then the content
- 3: only the content (it is not possible to have same content and different wight)
PreEvList/compare [ Functions ]
[ Top ] [ PreEvList ] [ Functions ]
NAME
integer function compare(p,q,crit)
PURPOSE
return -1,0,1 as ordering parameter for sorting the whole list