NXEventDataSource.h 1.29 KB
Newer Older
1
2
3
4
5
6
// Mantid Repository : https://github.com/mantidproject/mantid
//
// Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI,
//     NScD Oak Ridge National Laboratory, European Spallation Source
//     & Institut Laue - Langevin
// SPDX - License - Identifier: GPL - 3.0 +
7
#pragma once
8
9
10
11

#include <vector>

#include "MantidParallel/DllConfig.h"
12
#include "MantidParallel/IO/EventDataPartitioner.h"
13
14
15
16
17

namespace Mantid {
namespace Parallel {
namespace IO {

18
19
20
21
22
23
/** Abstract base class for sources of NXevent_data. For files this is
  subclassed in NXEventDataLoader. The base class exists for testing purposes
  and potentially for supporting event streams in the future.

  @author Simon Heybrock
  @date 2017
24
*/
Simon Heybrock's avatar
Simon Heybrock committed
25
template <class TimeOffsetType> class NXEventDataSource {
26
27
28
public:
  virtual ~NXEventDataSource() = default;

29
  virtual std::unique_ptr<AbstractEventDataPartitioner<TimeOffsetType>>
30
  setBankIndex(const size_t bank) = 0;
31
32
33
34
35

  virtual void readEventID(int32_t *event_id, size_t start,
                           size_t count) const = 0;
  virtual void readEventTimeOffset(TimeOffsetType *event_time_offset,
                                   size_t start, size_t count) const = 0;
36
  virtual std::string readEventTimeOffsetUnit() const = 0;
37
38
39
40
41
};

} // namespace IO
} // namespace Parallel
} // namespace Mantid