gavalian / hipo

High Performance Output Data format for experimental Physics
2 stars 9 forks source link

stop rare crash, add verbose #11

Closed dglazier closed 3 years ago

dglazier commented 3 years ago

add verbose option, prevent reader proceeding when event count is zero, preventing crash. This crash occurred when analysing order 10k simulated files. One file was not able to be read an caused crash. I found the follwing fix stopped the crash and allowed to continue analysing the chain of files,

//a catch for broken files
//can use hiporeader.getNRecords() to see if succesful (=-1 if not)
if(inputRecord.getEventCount()==0) return;//dglazier

Verbose output can be produced with reader::setVerbose()