Mantid
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
BankPulseTimes Class Reference

This class defines the pulse times for a specific bank. More...

#include <BankPulseTimes.h>

Public Member Functions

 BankPulseTimes (::NeXus::File &file, const std::vector< int > &pNumbers)
 Constructor with NeXus::File. More...
 
 BankPulseTimes (const std::vector< Mantid::Types::Core::DateAndTime > &times)
 Constructor with vector of DateAndTime. More...
 
bool equals (size_t otherNumPulse, const std::string &otherStartTime)
 Equals. More...
 

Public Attributes

std::vector< int > periodNumbers
 Vector of period numbers corresponding to each pulse. More...
 
std::vector< Mantid::Types::Core::DateAndTime > pulseTimes
 Array of the pulse times. More...
 
std::string startTime
 String describing the start time. More...
 

Static Public Attributes

static const unsigned int FirstPeriod = 1
 Starting number for assigning periods. More...
 

Detailed Description

This class defines the pulse times for a specific bank.

Since some instruments (ARCS, VULCAN) have multiple preprocessors, this means that some banks have different lists of pulse times.

Definition at line 20 of file BankPulseTimes.h.

Constructor & Destructor Documentation

◆ BankPulseTimes() [1/2]

BankPulseTimes::BankPulseTimes ( ::NeXus::File &  file,
const std::vector< int > &  pNumbers 
)

Constructor with NeXus::File.

Constructor.

Loads the pulse times from the bank entry of the file

Parameters
file:: nexus file open in the right bank entry
pNumbers:: Period numbers to index into. Index via frame/pulse

Definition at line 25 of file BankPulseTimes.cpp.

References FirstPeriod, periodNumbers, pulseTimes, and startTime.

◆ BankPulseTimes() [2/2]

BankPulseTimes::BankPulseTimes ( const std::vector< Mantid::Types::Core::DateAndTime > &  times)

Constructor with vector of DateAndTime.

Constructor.

Build from a vector of date and times. Handles a zero-sized vector

Parameters
times

Definition at line 75 of file BankPulseTimes.cpp.

References FirstPeriod, periodNumbers, and pulseTimes.

Member Function Documentation

◆ equals()

bool BankPulseTimes::equals ( size_t  otherNumPulse,
const std::string &  otherStartTime 
)

Equals.

Comparison.

Is this bank's pulse times array the same as another one.

Parameters
otherNumPulse:: number of pulses in the OTHER bank event_time_zero.
otherStartTime:: "offset" attribute of the OTHER bank event_time_zero.
Returns
true if the pulse times are the same and so don't need to be reloaded.

Definition at line 92 of file BankPulseTimes.cpp.

References pulseTimes, and startTime.

Member Data Documentation

◆ FirstPeriod

const unsigned int BankPulseTimes::FirstPeriod = 1
static

Starting number for assigning periods.

The first period.

Definition at line 23 of file BankPulseTimes.h.

Referenced by BankPulseTimes().

◆ periodNumbers

std::vector<int> BankPulseTimes::periodNumbers

Vector of period numbers corresponding to each pulse.

Definition at line 41 of file BankPulseTimes.h.

Referenced by BankPulseTimes().

◆ pulseTimes

std::vector<Mantid::Types::Core::DateAndTime> BankPulseTimes::pulseTimes

Array of the pulse times.

Definition at line 38 of file BankPulseTimes.h.

Referenced by BankPulseTimes(), and equals().

◆ startTime

std::string BankPulseTimes::startTime

String describing the start time.

Definition at line 35 of file BankPulseTimes.h.

Referenced by BankPulseTimes(), and equals().


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