Print

Print


Hi,

I'm seeing something a bit strange in EvioToLcio.  It seems that when processing one of the files from 5772 I spot at least one out of order event '10' in the data stream which occurs after several hundred thousand events have been processed.  So the event number seems incorrect or out of sequence.

Then looking at the event builder code (LCSimTestRunEventBuilder), I see that instead of using EvioEvent.getEventNumber() to set the output LCSim event number, the event ID bank is being used directly for this information.  But I don't think this is necessary, as the EVIO events are always parsed before they are sent to the event builder, which means the event number should be set already.

I am wondering if sometimes this event number coming from the event ID bank could be wrong or out of sequence for some reason like a DAQ error.  If not, I don't understand what I'm seeing here with this strange out of order event number in the data stream.  Probably there are others too lurking in there (just spotted the one in the huge log file).

When I replace this code using the event ID bank by reading from the EVIO event, this gets cleaned up and I don't see the out of sequence event numbers.  In this case, the LCSim output events match up 1-to-1 with the EVIO data.  I think that's better.  So can I commit this change?  Or is there some reason to prefer reading directly from the event ID bank?

Also, there's this code in there for handling the case when the event ID bank does not exist at all, which I think is a bit problemmatic....

if (eventID == null) {
    logger.warning("No event ID bank found");
    eventID = new int[3];
}

In this case, the event number on the LCSim event is set to zero!  I'm not sure that makes any sense, and maybe instead it should be a fatal error causing that event to be skipped if there is no event bank in it.  (That would also mean you don't know the trigger code or readout status either so the event is likely unusable if it is a physics events.)

--Jeremy

########################################################################
Use REPLY-ALL to reply to list

To unsubscribe from the HPS-SOFTWARE list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=HPS-SOFTWARE&A=1