Mantid
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Protected Attributes | Friends | List of all members
Mantid::DataObjects::WeightedEventNoTime Class Reference

Info about a single neutron detection event, including a weight and error value, but excluding the pulsetime to save memory: More...

#include <Events.h>

Public Member Functions

bool equals (const WeightedEventNoTime &rhs, const double tolTof, const double tolWeight) const
 Compare two events within the specified tolerance. More...
 
double error () const
 Return the error of the neutron, as a double (it is saved as a float). More...
 
double errorSquared () const
 Return the squared error of the neutron, as a double. More...
 
double operator() () const
 
bool operator< (const double rhs_tof) const
 < comparison operator, using the TOF to do the comparison. More...
 
bool operator< (const WeightedEventNoTime &rhs) const
 < comparison operator, using the TOF to do the comparison. More...
 
bool operator== (const WeightedEventNoTime &rhs) const
 Comparison operator. More...
 
Mantid::Types::Core::DateAndTime pulseTime () const
 Return the pulse time; this returns 0 since this type of Event has no time associated. More...
 
double tof () const
 Return the time-of-flight of the neutron, as a double. More...
 
double weight () const
 Return the weight of the neutron, as a double (it is saved as a float). More...
 
 WeightedEventNoTime ()
 Empty constructor. More...
 
 WeightedEventNoTime (const Types::Event::TofEvent &)
 
 WeightedEventNoTime (const Types::Event::TofEvent &, double weight, double errorSquared)
 
 WeightedEventNoTime (const Types::Event::TofEvent &, float weight, float errorSquared)
 
 WeightedEventNoTime (const WeightedEvent &)
 Constructor, copy from a WeightedEvent object. More...
 
 WeightedEventNoTime (double time_of_flight)
 Constructor, specifying only the time of flight. More...
 
 WeightedEventNoTime (double tof, const Mantid::Types::Core::DateAndTime pulsetime, double weight, double errorSquared)
 Constructor that ignores a time: More...
 
 WeightedEventNoTime (double tof, const Mantid::Types::Core::DateAndTime pulsetime, float weight, float errorSquared)
 Constructor that ignores a time: More...
 
 WeightedEventNoTime (double tof, double weight, double errorSquared)
 Constructor, full. More...
 
 WeightedEventNoTime (double tof, float weight, float errorSquared)
 Constructor, full: More...
 

Public Attributes

float m_errorSquared
 The SQUARE of the error that this neutron contributes. More...
 
float m_weight
 The weight of this neutron. More...
 

Protected Attributes

double m_tof
 The 'x value' (e.g. time-of-flight) of this neutron. More...
 

Friends

class EventList
 EventList has the right to mess with this. More...
 
std::ostream & operator<< (std::ostream &os, const WeightedEvent &event)
 Output a string representation of the event to a stream. More...
 
class tofGreater
 
class tofGreaterOrEqual
 

Detailed Description

Info about a single neutron detection event, including a weight and error value, but excluding the pulsetime to save memory:

Definition at line 91 of file Events.h.

Constructor & Destructor Documentation

◆ WeightedEventNoTime() [1/10]

Mantid::DataObjects::WeightedEventNoTime::WeightedEventNoTime ( double  time_of_flight)

Constructor, specifying only the time of flight.

------------------— WeightedEventNoTime stuff ---------------------—

Constructor, tof only:

Parameters
time_of_flighttof in microseconds.

Definition at line 128 of file Events.cpp.

◆ WeightedEventNoTime() [2/10]

Mantid::DataObjects::WeightedEventNoTime::WeightedEventNoTime ( double  tof,
double  weight,
double  errorSquared 
)

Constructor, full.

Constructor, full:

Parameters
toftof in microseconds.
weightweight of this neutron event.
errorSquaredthe square of the error on the event

Definition at line 136 of file Events.cpp.

◆ WeightedEventNoTime() [3/10]

Mantid::DataObjects::WeightedEventNoTime::WeightedEventNoTime ( double  tof,
float  weight,
float  errorSquared 
)

Constructor, full:

Parameters
toftof in microseconds.
weightweight of this neutron event.
errorSquaredthe square of the error on the event

Definition at line 144 of file Events.cpp.

◆ WeightedEventNoTime() [4/10]

Mantid::DataObjects::WeightedEventNoTime::WeightedEventNoTime ( double  tof,
const Mantid::Types::Core::DateAndTime  pulsetime,
double  weight,
double  errorSquared 
)

Constructor that ignores a time:

Parameters
toftof in microseconds.
pulsetimean ignored pulse time.
weightweight of this neutron event.
errorSquaredthe square of the error on the event

Definition at line 153 of file Events.cpp.

◆ WeightedEventNoTime() [5/10]

Mantid::DataObjects::WeightedEventNoTime::WeightedEventNoTime ( double  tof,
const Mantid::Types::Core::DateAndTime  pulsetime,
float  weight,
float  errorSquared 
)

Constructor that ignores a time:

Parameters
toftof in microseconds.
pulsetimean ignored pulse time.
weightweight of this neutron event.
errorSquaredthe square of the error on the event

Definition at line 163 of file Events.cpp.

◆ WeightedEventNoTime() [6/10]

Mantid::DataObjects::WeightedEventNoTime::WeightedEventNoTime ( const Types::Event::TofEvent &  ,
double  weight,
double  errorSquared 
)

◆ WeightedEventNoTime() [7/10]

Mantid::DataObjects::WeightedEventNoTime::WeightedEventNoTime ( const Types::Event::TofEvent &  ,
float  weight,
float  errorSquared 
)

◆ WeightedEventNoTime() [8/10]

Mantid::DataObjects::WeightedEventNoTime::WeightedEventNoTime ( const WeightedEvent rhs)

Constructor, copy from a WeightedEvent object.

Parameters
rhssource WeightedEvent

Definition at line 186 of file Events.cpp.

◆ WeightedEventNoTime() [9/10]

Mantid::DataObjects::WeightedEventNoTime::WeightedEventNoTime ( const Types::Event::TofEvent &  )

References std::operator==().

◆ WeightedEventNoTime() [10/10]

Mantid::DataObjects::WeightedEventNoTime::WeightedEventNoTime ( )

Empty constructor.

Definition at line 195 of file Events.cpp.

Member Function Documentation

◆ equals()

bool Mantid::DataObjects::WeightedEventNoTime::equals ( const WeightedEventNoTime rhs,
const double  tolTof,
const double  tolWeight 
) const

Compare two events within the specified tolerance.

Parameters
rhsthe other TofEvent to compare
tolTofthe tolerance of a difference in m_tof.
tolWeightthe tolerance of a difference in m_weight and m_errorSquared.
Returns
True if the are the same within the specifed tolerances

Definition at line 215 of file Events.cpp.

References m_errorSquared, m_tof, and m_weight.

◆ error()

double Mantid::DataObjects::WeightedEventNoTime::error ( ) const
inline

Return the error of the neutron, as a double (it is saved as a float).

Definition at line 194 of file Events.h.

References m_errorSquared.

◆ errorSquared()

double Mantid::DataObjects::WeightedEventNoTime::errorSquared ( ) const
inline

Return the squared error of the neutron, as a double.

Definition at line 197 of file Events.h.

References m_errorSquared.

◆ operator()()

double Mantid::DataObjects::WeightedEventNoTime::operator() ( ) const
inline

Definition at line 180 of file Events.h.

References m_tof.

◆ operator<() [1/2]

bool Mantid::DataObjects::WeightedEventNoTime::operator< ( const double  rhs_tof) const
inline

< comparison operator, using the TOF to do the comparison.

Parameters
rhs_tofthe other time of flight to compare.
Returns
true if this->m_tof < rhs.m_tof

Definition at line 141 of file Events.h.

◆ operator<() [2/2]

bool Mantid::DataObjects::WeightedEventNoTime::operator< ( const WeightedEventNoTime rhs) const
inline

< comparison operator, using the TOF to do the comparison.

Parameters
rhsthe other WeightedEventNoTime to compare.
Returns
true if this->m_tof < rhs.m_tof

Definition at line 135 of file Events.h.

References rhs.

◆ operator==()

bool Mantid::DataObjects::WeightedEventNoTime::operator== ( const WeightedEventNoTime rhs) const

Comparison operator.

Parameters
rhs:: event to which we are comparing.
Returns
true if all elements of this event are identical

Definition at line 201 of file Events.cpp.

References m_errorSquared, m_tof, and m_weight.

◆ pulseTime()

Types::Core::DateAndTime Mantid::DataObjects::WeightedEventNoTime::pulseTime ( ) const
inline

Return the pulse time; this returns 0 since this type of Event has no time associated.

Definition at line 188 of file Events.h.

◆ tof()

double Mantid::DataObjects::WeightedEventNoTime::tof ( ) const
inline

Return the time-of-flight of the neutron, as a double.

Definition at line 183 of file Events.h.

References m_tof.

◆ weight()

double Mantid::DataObjects::WeightedEventNoTime::weight ( ) const
inline

Return the weight of the neutron, as a double (it is saved as a float).

Definition at line 191 of file Events.h.

References m_weight.

Friends And Related Function Documentation

◆ EventList

friend class EventList
friend

EventList has the right to mess with this.

Definition at line 94 of file Events.h.

◆ operator<<

std::ostream & operator<< ( std::ostream &  os,
const WeightedEvent event 
)
friend

Output a string representation of the event to a stream.

Parameters
os:: Stream
event:: WeightedEvent to output to the stream

Definition at line 115 of file Events.cpp.

◆ tofGreater

friend class tofGreater
friend

Definition at line 96 of file Events.h.

◆ tofGreaterOrEqual

friend class tofGreaterOrEqual
friend

Definition at line 95 of file Events.h.

Member Data Documentation

◆ m_errorSquared

float Mantid::DataObjects::WeightedEventNoTime::m_errorSquared

The SQUARE of the error that this neutron contributes.

Definition at line 107 of file Events.h.

Referenced by equals(), error(), errorSquared(), and operator==().

◆ m_tof

double Mantid::DataObjects::WeightedEventNoTime::m_tof
protected

The 'x value' (e.g. time-of-flight) of this neutron.

Definition at line 100 of file Events.h.

Referenced by equals(), operator()(), operator==(), and tof().

◆ m_weight

float Mantid::DataObjects::WeightedEventNoTime::m_weight

The weight of this neutron.

Definition at line 104 of file Events.h.

Referenced by equals(), operator==(), and weight().


The documentation for this class was generated from the following files: