Commit 11ee6526 authored by Michael Reuter's avatar Michael Reuter
Browse files

Refs #6485. Fixing DataHandling errors.

parent 10c4bede
......@@ -66,7 +66,7 @@ namespace DataHandling
/// Check whether a string starts from a specified sub-string
bool startsWith(std::string s, std::string header);
/// Parse column name line staring with #L
/// Parse column name line staring with \#L
void parseColumnNameLine(std::string line);
/// Parse data line
......
......@@ -24,7 +24,6 @@ class Logger;
/**
This class is for searching the SNS data archive
@author Shelly Ren, ORNL
@date 02/22/2012
Copyright © 2010 ISIS Rutherford Appleton Laboratory & NScD Oak Ridge National Laboratory
......@@ -51,8 +50,8 @@ class Logger;
class DLLExport SNSDataArchive: public API::IArchiveSearch
{
public:
//std::string getPath(const std::string& fName) const;
std::string getArchivePath(const std::set<std::string>& filenames, const std::vector<std::string>& exts) const;
/// Find the archive location of a set of files.
std::string getArchivePath(const std::set<std::string>& filenames, const std::vector<std::string>& exts) const;
private:
// static reference to the logger class
static Mantid::Kernel::Logger & g_log;
......
......@@ -19,12 +19,11 @@ namespace Kernel
class Logger;
}
namespace DataHandling
{
/**
namespace DataHandling
{
/**
This class is for searching the SNS data archive
@author Shelly Ren, ORNL
@date 02/22/2012
Copyright &copy; 2010 ISIS Rutherford Appleton Laboratory & NScD Oak Ridge National Laboratory
......@@ -48,17 +47,19 @@ class Logger;
Code Documentation is available at: <http://doxygen.mantidproject.org>
*/
class DLLExport SNSDataArchiveICAT2: public API::IArchiveSearch
{
public:
std::string getArchivePath(const std::set<std::string>& filenames, const std::vector<std::string>& exts) const;
private:
// static reference to the logger class
std::string getPath(const std::string& fName) const;
static Mantid::Kernel::Logger & g_log;
};
}
class DLLExport SNSDataArchiveICAT2: public API::IArchiveSearch
{
public:
/// Find the archive location of a set of files.
std::string getArchivePath(const std::set<std::string>& filenames, const std::vector<std::string>& exts) const;
private:
/// Call web service to get full path.
std::string getPath(const std::string& fName) const;
/// static reference to the logger class
static Mantid::Kernel::Logger & g_log;
};
}
}
#endif /* MANTID_DATAHANDLING_SNSDATAARCHIVEICAT2_H_ */
......@@ -348,7 +348,7 @@ namespace DataHandling
/** Get the instrument name from the input NeXus file.
*
* @param nxfilename :: Input NeXus file.
* @param the instrument name, empty string if failed.
* @return the instrument name, empty string if failed.
*/
std::string AppendGeometryToSNSNexus::getInstrumentName(const std::string &nxfilename)
{
......
......@@ -657,8 +657,8 @@ void GroupDetectors2::readSpectraIndexes(std::string line, spec2index_map &specs
* @param numInHists :: the total number of histograms in the input workspace
* @return estimate of the amount of algorithm progress obtained by reading from the file
*/
double GroupDetectors2::fileReadProg(Mantid::DataHandling::GroupDetectors2::storage_map::size_type numGroupsRead,
Mantid::DataHandling::GroupDetectors2::storage_map::size_type numInHists)
double GroupDetectors2::fileReadProg(DataHandling::GroupDetectors2::storage_map::size_type numGroupsRead,
DataHandling::GroupDetectors2::storage_map::size_type numInHists)
{
// I'm going to guess that there are half as many groups as spectra
double progEstim = 2.*static_cast<double>(numGroupsRead)/static_cast<double>(numInHists);
......
......@@ -339,9 +339,11 @@ namespace DataHandling
/**
* Read spectra from the DAE
* @param period :: Current period index
* @param index :: First spectrum index
* @param count :: Number of spectra to read
* @param workspace :: Workspace to store the data
* @param workspaceIndex :: index in workspace to store data
*/
void ISISHistoDataListener::getData(int period, int index, int count, API::MatrixWorkspace_sptr workspace, size_t workspaceIndex)
{
......@@ -373,7 +375,6 @@ namespace DataHandling
}
/** Populate spectra-detector map
@param dae_handle :: The internal DAE identifier
@param localWorkspace :: The workspace
*/
void ISISHistoDataListener::loadSpectraMap(MatrixWorkspace_sptr localWorkspace)
......
......@@ -449,6 +449,7 @@ public:
* @param entry_name :: The pathname of the bank to load
* @param entry_type :: The classtype of the entry to load
* @param numEvents :: The number of events in the bank.
* @param oldNeXusFileNames :: Identify if file is of old variety.
* @param prog :: an optional Progress object
* @param ioMutex :: a mutex shared for all Disk I-O tasks
* @param scheduler :: the ThreadScheduler that runs this task.
......@@ -513,6 +514,7 @@ public:
/** Load the event_index field
(a list of size of # of pulses giving the index in the event list for that pulse)
* @param file :: File handle for the NeXus file
* @param event_index :: ref to the vector
*/
void loadEventIndex(::NeXus::File & file, std::vector<uint64_t> & event_index)
......@@ -545,6 +547,7 @@ public:
//---------------------------------------------------------------------------------------------------
/** Open the event_id field and validate the contents
*
* @param file :: File handle for the NeXus file
* @param start_event :: set to the index of the first event
* @param stop_event :: set to the index of the last event + 1
* @param event_index :: (a list of size of # of pulses giving the index in the event list for that pulse)
......@@ -1863,7 +1866,6 @@ bool LoadEventNexus::runLoadInstrument(const std::string &nexusfilename, MatrixW
*
* @param nexusfilename :: Used to pick the instrument.
* @param localWorkspace :: MatrixWorkspace in which to put the logs
* @param pulseTimes [out] :: vector of pulse times to fill
* @param alg :: Handle of an algorithm for logging access
* @return the BankPulseTimes object created, NULL if it failed.
*/
......
......@@ -88,7 +88,7 @@ static const string PARALLEL_PARAM("UseParallelProcessing");
static const string BLOCK_SIZE_PARAM("LoadingBlockSize");
static const string OUT_PARAM("OutputWorkspace");
/// Default number of items to read in from any of the files.
static const size_t DEFAULT_BLOCK_SIZE = 1000000; // 100,000
static const size_t DEFAULT_BLOCK_SIZE = 1000000;
/// All pixel ids with matching this mask are errors.
static const PixelType ERROR_PID = 0x80000000;
/// The maximum possible tof as native type
......
......@@ -36,6 +36,11 @@ Mantid::Kernel::Logger & SNSDataArchive::g_log = Mantid::Kernel::Logger::get("SN
DECLARE_ARCHIVESEARCH(SNSDataArchive,SNSDataSearch);
/**
* @param filenames : List of files to search
* @param exts : List of extensions to check against
* @return list of archive locations
*/
std::string SNSDataArchive::getArchivePath(const std::set<std::string>& filenames, const std::vector<std::string>& exts) const
{
std::set<std::string>::const_iterator iter = filenames.begin();
......
......@@ -40,10 +40,10 @@ Mantid::Kernel::Logger & SNSDataArchiveICAT2::g_log = Mantid::Kernel::Logger::ge
DECLARE_ARCHIVESEARCH(SNSDataArchiveICAT2,SNSDataSearchICAT2);
/**
* Calls a web service to get a full path to a file
* @param fName :: The file name.
* @return The path to the file or empty string in case of error.
*/
* Calls a web service to get a full path to a file
* @param fName :: The file name.
* @return The path to the file or empty string in case of error.
*/
std::string SNSDataArchiveICAT2::getPath(const std::string& fName) const
{
std::string baseURL(
......@@ -96,6 +96,11 @@ std::string SNSDataArchiveICAT2::getPath(const std::string& fName) const
return wsResult;
}
/**
* @param filenames : List of files to search
* @param exts : List of extensions to check against
* @return list of archive locations
*/
std::string SNSDataArchiveICAT2::getArchivePath(const std::set<std::string>& filenames, const std::vector<std::string>& exts) const
{
std::vector<std::string>::const_iterator ext = exts.begin();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment