Print

Print


Hello hps-software,

I am trying to open several LCIO files simultaneously in the same process. Because of this, I can't use the LCSim event stream and have to do it manually using the LCIOReader class. When I try to read an event from a file, however, I get the following error:

Exception in thread "main" java.lang.NullPointerException
        at org.lcsim.event.base.BaseCalorimeterHit.calculateCorrectedEnergy(BaseCalorimeterHit.java:119)
        at org.lcsim.lcio.SIOSimCalorimeterHit.<init>(SIOSimCalorimeterHit.java:68)
        at org.lcsim.lcio.SIOSimCalorimeterHitBlockHandler.addCollectionElements(SIOSimCalorimeterHitBlockHandler.java:23)
        at org.lcsim.lcio.AbstractBlockHandler.readCollection(AbstractBlockHandler.java:39)
        at org.lcsim.lcio.AbstractBlockHandler.readBlock(AbstractBlockHandler.java:32)
        at org.lcsim.lcio.LCIOReader.read(LCIOReader.java:77)
        at org.hps.analysis.trigger.LCIOOutputCompare.main(LCIOOutputCompare.java:19)

I believe that this is caused because the calculateCorrectedEnergy(BaseCalorimeterHit) method tries to access metadata related to the detector file to perform its function, and that is not available. I was not able to figure out where LCSim actually does the loading, so I couldn't figure out how it associates the detector data with the reader. Can anyone advise me as to how to properly open an LCIO file so that I can read its contents?

Thanks,

Kyle


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