Skip to content
Snippets Groups Projects
Commit 40129c7d authored by Michael Reuter's avatar Michael Reuter
Browse files

Merge remote-tracking branch 'origin/bugfix/7992_lattice_constants'

parents 8e685647 71497eed
No related merge requests found
...@@ -78,6 +78,8 @@ namespace API ...@@ -78,6 +78,8 @@ namespace API
virtual double & operator [](const size_t & index) = 0; virtual double & operator [](const size_t & index) = 0;
virtual void setCoordinateSystem(const Mantid::API::SpecialCoordinateSystem coordinateSystem) = 0; virtual void setCoordinateSystem(const Mantid::API::SpecialCoordinateSystem coordinateSystem) = 0;
protected:
virtual const std::string toString() const;
}; };
/// Shared pointer to the IMDWorkspace base class /// Shared pointer to the IMDWorkspace base class
......
...@@ -138,6 +138,8 @@ namespace API ...@@ -138,6 +138,8 @@ namespace API
virtual Mantid::API::SpecialCoordinateSystem getSpecialCoordinateSystem() const = 0; virtual Mantid::API::SpecialCoordinateSystem getSpecialCoordinateSystem() const = 0;
virtual std::vector<std::pair<std::string,std::string> > peakInfo(Kernel::V3D QFrame , bool labCoords) const = 0; virtual std::vector<std::pair<std::string,std::string> > peakInfo(Kernel::V3D QFrame , bool labCoords) const = 0;
virtual int peakInfoNumber(Kernel::V3D qLabFrame , bool labCoords) const =0; virtual int peakInfoNumber(Kernel::V3D qLabFrame , bool labCoords) const =0;
protected:
virtual const std::string toString() const;
}; };
......
...@@ -53,7 +53,9 @@ namespace API ...@@ -53,7 +53,9 @@ namespace API
uint16_t getNumExperimentInfo() const; uint16_t getNumExperimentInfo() const;
void copyExperimentInfos(const MultipleExperimentInfos & other); void copyExperimentInfos(const MultipleExperimentInfos & other);
protected:
/// Returns a string description of the object
const std::string toString() const;
private: private:
/// Vector for each ExperimentInfo class /// Vector for each ExperimentInfo class
std::vector<ExperimentInfo_sptr> m_expInfos; std::vector<ExperimentInfo_sptr> m_expInfos;
......
...@@ -72,6 +72,8 @@ namespace API ...@@ -72,6 +72,8 @@ namespace API
os << stats[i] << "\n"; os << stats[i] << "\n";
} }
os << MultipleExperimentInfos::toString() << "\n";
os << "Events: " << getNPoints() << "\n"; os << "Events: " << getNPoints() << "\n";
return os.str(); return os.str();
} }
......
...@@ -35,7 +35,15 @@ namespace API ...@@ -35,7 +35,15 @@ namespace API
{ {
} }
const std::string IMDHistoWorkspace::toString() const
{
std::ostringstream os;
os << IMDWorkspace::toString();
os << MultipleExperimentInfos::toString() << "\n";
return os.str();
}
} // namespace Mantid } // namespace Mantid
} // namespace API } // namespace API
......
...@@ -13,6 +13,14 @@ using namespace Kernel; ...@@ -13,6 +13,14 @@ using namespace Kernel;
IPeaksWorkspace::~IPeaksWorkspace() {} IPeaksWorkspace::~IPeaksWorkspace() {}
const std::string IPeaksWorkspace::toString() const
{
std::ostringstream os;
os << ITableWorkspace::toString() << "\n"
<< ExperimentInfo::toString();
return os.str();
}
} //API namespace } //API namespace
......
...@@ -111,6 +111,22 @@ namespace API ...@@ -111,6 +111,22 @@ namespace API
} }
} }
const std::string MultipleExperimentInfos::toString() const
{
// if (m_expInfos.size() == 1)
// return m_expInfos[0]->toString();
// mess with things in multiple case
std::ostringstream os;
for (std::size_t i = 0; i < m_expInfos.size(); ++i)
{
os << m_expInfos[i]->toString();
if (i+1 != m_expInfos.size())
os << "\n";
}
return os.str();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment