Author: [log in to unmask] Date: Mon Mar 30 16:46:01 2015 New Revision: 2628 Log: don't try to set up the DAQ map unless we need it (i.e. don't crash on ECal-only data with an ECal-only detector) Modified: java/trunk/evio/src/main/java/org/hps/evio/AbstractSvtEvioReader.java Modified: java/trunk/evio/src/main/java/org/hps/evio/AbstractSvtEvioReader.java ============================================================================= --- java/trunk/evio/src/main/java/org/hps/evio/AbstractSvtEvioReader.java (original) +++ java/trunk/evio/src/main/java/org/hps/evio/AbstractSvtEvioReader.java Mon Mar 30 16:46:01 2015 @@ -143,14 +143,6 @@ */ public boolean makeHits(EvioEvent event, EventHeader lcsimEvent) { - // Setup the DAQ map if it's not setup - if (!this.isDaqMapSetup) - this.setupDaqMap(lcsimEvent.getDetector().getSubdetector( - SUBDETECTOR_NAME)); - - // Clear the list of raw tracker hits - rawHits.clear(); - // Retrieve the ROC banks encapsulated by the physics bank. The ROC // bank range is set in the subclass. List<BassStructure> rocBanks = new ArrayList<BassStructure>(); @@ -170,6 +162,14 @@ // Return false if ROC banks weren't found if (rocBanks.isEmpty()) return false; + // Setup the DAQ map if it's not setup + if (!this.isDaqMapSetup) + this.setupDaqMap(lcsimEvent.getDetector().getSubdetector( + SUBDETECTOR_NAME)); + + // Clear the list of raw tracker hits + rawHits.clear(); + // Loop over the SVT ROC banks and process all samples for (BaseStructure rocBank : rocBanks) {