BankPulseTimes.h 1.33 KB
Newer Older
1
2
3
// Mantid Repository : https://github.com/mantidproject/mantid
//
// Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI,
4
5
//   NScD Oak Ridge National Laboratory, European Spallation Source,
//   Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
6
// SPDX - License - Identifier: GPL - 3.0 +
7
#pragma once
8

9
#include "MantidKernel/DateAndTime.h"
LamarMoore's avatar
LamarMoore committed
10
#include "MantidKernel/Property.h"
11

12
#include <nexus/NeXusFile.hpp>
13

14
using namespace ::NeXus;
15
16
17
18
19
20
21
22
23
24
25
26
27
28

/** 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.
 */
class BankPulseTimes {
public:
  /// Starting number for assigning periods.
  static const unsigned int FirstPeriod;

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

  /// Constructor with vector of DateAndTime
29
  BankPulseTimes(const std::vector<Mantid::Types::Core::DateAndTime> &times);
30
31

  /// Equals
David Fairbrother's avatar
David Fairbrother committed
32
  bool equals(size_t otherNumPulse, const std::string &otherStartTime);
33
34
35
36
37

  /// String describing the start time
  std::string startTime;

  /// Array of the pulse times
38
  std::vector<Mantid::Types::Core::DateAndTime> pulseTimes;
39
40
41
42

  /// Vector of period numbers corresponding to each pulse
  std::vector<int> periodNumbers;
};