Skip to content

Commit

Permalink
The ticket took longer to write than the fix. Re #4077.
Browse files Browse the repository at this point in the history
  • Loading branch information
RussellTaylor committed Nov 8, 2011
1 parent d10b11b commit 71c598d
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions Code/Mantid/Framework/DataHandling/src/LoadEventNexus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1094,7 +1094,8 @@ void LoadEventNexus::loadEvents(API::Progress * const prog, const bool monitors)
}

//Info reporting
g_log.information() << "Read " << WS->getNumberEvents() << " events"
const std::size_t eventsLoaded = WS->getNumberEvents();
g_log.information() << "Read " << eventsLoaded << " events"
<< ". Shortest TOF: " << shortest_tof << " microsec; longest TOF: "
<< longest_tof << " microsec." << std::endl;

Expand All @@ -1105,9 +1106,12 @@ void LoadEventNexus::loadEvents(API::Progress * const prog, const bool monitors)
//Now, create a default X-vector for histogramming, with just 2 bins.
Kernel::cow_ptr<MantidVec> axis;
MantidVec& xRef = axis.access();
xRef.resize(2);
xRef[0] = shortest_tof - 1; //Just to make sure the bins hold it all
xRef[1] = longest_tof + 1;
xRef.resize(2,0.0);
if ( eventsLoaded > 0)
{
xRef[0] = shortest_tof - 1; //Just to make sure the bins hold it all
xRef[1] = longest_tof + 1;
}
//Set the binning axis using this.
WS->setAllX(axis);

Expand Down

0 comments on commit 71c598d

Please sign in to comment.