40 throw std::invalid_argument(
"MDWorkspace::getExperimentInfo(): expInfoIndex is out of range.");
52 throw std::invalid_argument(
"MDWorkspace::getExperimentInfo() const: expInfoIndex is out of range.");
65 if (
m_expInfos.size() >=
static_cast<size_t>(std::numeric_limits<uint16_t>::max()))
66 throw std::runtime_error(
"MDWorkspace: Reached the capacity for the number "
67 "of ExperimentInfos of 65536.");
79 throw std::invalid_argument(
"MDEventWorkspace::setExperimentInfo(): expInfoIndex is out of range.");
94 for (
const auto &expInfo : other.m_expInfos) {
95 auto copy(std::make_shared<ExperimentInfo>(*expInfo));
118 std::ostringstream os;
119 for (std::size_t i = 0; i <
m_expInfos.size(); ++i) {
Small class that allows a MDEventWorkspace or a MDHistoWorkspace to hold several ExperimentInfo class...
uint16_t getNumExperimentInfo() const
std::vector< ExperimentInfo_sptr > m_expInfos
Vector for each ExperimentInfo class.
bool hasOrientedLattice() const
void copyExperimentInfos(const MultipleExperimentInfos &other)
Copy the experiment infos from another.
ExperimentInfo_sptr getExperimentInfo(const uint16_t expInfoIndex)
Get the ExperimentInfo for the given Experiment-Info Index.
MultipleExperimentInfos & operator=(const MultipleExperimentInfos &other)
const std::string toString() const
Returns a string description of the object.
MultipleExperimentInfos()=default
uint16_t addExperimentInfo(const ExperimentInfo_sptr &ei)
Add a new ExperimentInfo to this MDEventWorkspace.
void setExperimentInfo(const uint16_t expInfoIndex, ExperimentInfo_sptr ei)
Replace the ExperimentInfo entry at a given place.
std::shared_ptr< const ExperimentInfo > ExperimentInfo_const_sptr
Shared pointer to const ExperimentInfo.
std::shared_ptr< ExperimentInfo > ExperimentInfo_sptr
Shared pointer to ExperimentInfo.