As described earlier four control words ( fev.ctlw1, fev.ctlw2,
fev.ctlb1, fev.ctlb2) are used to distribute the events (the first
two operate on a equal basis, the other two on a bit basis).
The conditions are implemented as a macro and can therefore
easily be changed by the user (file $DD_INC/dd_fifo_conditions.h).
The relevant listing is given below:
if ( (p2f->fhdr.fctlw1 != -1) & & FIFO_COND1 )
this_fifo = i;
if ( (p2f->fhdr.fctlb1 != -1) & & FIFO_COND2 )
this_fifo = i;
if ( (p2f->fhdr.fctlw2 != -1) & & FIFO_COND3 )
this_fifo = i;
if ( (p2f->fhdr.fctlb2 != -1) & & FIFO_COND4 )
this_fifo = i;
}
Code fragment for deciding whether to put the event into this fifo
else if (p2f->fhdr.fmode == FMODE_COND){
Fifo conditions as implemented in $DD_INC/dd_fifo_conditions.h
#define FIFO_COND1 (p2f->fhdr.fctlw1 == fev.ctlw1)
#define FIFO_COND2 (p2f->fhdr.fctlb1 & fev.ctlb1)
#define FIFO_COND3 (p2f->fhdr.fctlw2 == fev.ctlw2)
#define FIFO_COND4 (p2f->fhdr.fctlb2 & fev.ctlb2)