Print

Print


this seems like a stupid question but how do I get an "EventHeader" from a
file?

I get this error:

ifarm1101> java -cp "lib/*:bin" hps.protonradius.GetCharge
/work/hallb/hps/data/engrun2015/pass1/recon/hps_005779.81_recon_R3321.slcio
5779

blah

Exception in thread "main"
org.lcsim.conditions.ConditionsManager$ConditionsSetNotFoundException: No
converter registered for type: org.lcsim.geometry.Detector

at
org.lcsim.conditions.ConditionsManagerImplementation.getCachedConditions(ConditionsManagerImplementation.java:92)

at org.lcsim.event.base.BaseLCSimEvent.getDetector(BaseLCSimEvent.java:76)

at
org.lcsim.lcio.SIOTrackBlockHandler.addCollectionElements(SIOTrackBlockHandler.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 hps.protonradius.GetCharge.main(GetCharge.java:22)


With this program:

public class GetCharge {

public static void main(String arg[]) throws IOException,
NumberFormatException, ConditionsNotFoundException{

LCIOReader reader = new LCIOReader(new File(arg[0]));

//ConditionsManagerImplementation.defaultInstance().setRun(Integer.parseInt(arg[1]));

//ConditionsManagerImplementation.defaultInstance().

System.out.println("blah");

EventHeader h = reader.read();

while(h != null){

process(h);

}

System.out.println("done");

}

....

}

########################################################################
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