Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 12 additions & 9 deletions Framework/DataObjects/inc/MantidDataObjects/EventList.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,9 @@ class MANTID_DATAOBJECTS_DLL EventList : public Mantid::API::IEventList {
* @param event :: TofEvent to add at the end of the list.
* */
inline void addEventQuickly(const Types::Event::TofEvent &event) {
this->events.emplace_back(event);
this->setSortOrder(UNSORTED);
this->events->emplace_back(event);
if (this->order != UNSORTED)
this->setSortOrder(UNSORTED);
}

// --------------------------------------------------------------------------
Expand All @@ -112,8 +113,9 @@ class MANTID_DATAOBJECTS_DLL EventList : public Mantid::API::IEventList {
* @param event :: WeightedEvent to add at the end of the list.
* */
inline void addEventQuickly(const WeightedEvent &event) {
this->weightedEvents.emplace_back(event);
this->setSortOrder(UNSORTED);
this->weightedEvents->emplace_back(event);
if (this->order != UNSORTED)
this->setSortOrder(UNSORTED);
}

// --------------------------------------------------------------------------
Expand All @@ -122,8 +124,9 @@ class MANTID_DATAOBJECTS_DLL EventList : public Mantid::API::IEventList {
* @param event :: WeightedEventNoTime to add at the end of the list.
* */
inline void addEventQuickly(const WeightedEventNoTime &event) {
this->weightedEventsNoTime.emplace_back(event);
this->setSortOrder(UNSORTED);
this->weightedEventsNoTime->emplace_back(event);
if (this->order != UNSORTED)
this->setSortOrder(UNSORTED);
}

Mantid::API::EventType getEventType() const override;
Expand Down Expand Up @@ -326,13 +329,13 @@ class MANTID_DATAOBJECTS_DLL EventList : public Mantid::API::IEventList {
HistogramData::Histogram m_histogram;

/// List of TofEvent (no weights).
mutable std::vector<Types::Event::TofEvent> events;
mutable std::unique_ptr<std::vector<Types::Event::TofEvent>> events;

/// List of WeightedEvent's
mutable std::vector<WeightedEvent> weightedEvents;
mutable std::unique_ptr<std::vector<WeightedEvent>> weightedEvents;

/// List of WeightedEvent's
mutable std::vector<WeightedEventNoTime> weightedEventsNoTime;
mutable std::unique_ptr<std::vector<WeightedEventNoTime>> weightedEventsNoTime;

/// What type of event is in our list.
Mantid::API::EventType eventType;
Expand Down
Loading
Loading