Commit bc42ca22 authored by Antti Soininen's avatar Antti Soininen
Browse files

Code beautification.

Re #18842
parent 28eebb41
......@@ -60,9 +60,9 @@ private:
void exec() override;
void loadInstrumentDetails(NeXus::NXEntry &);
std::vector<std::vector<int> > getMonitorInfo(NeXus::NXEntry &firstEntry);
std::vector<std::vector<int>> getMonitorInfo(NeXus::NXEntry &firstEntry);
void initWorkSpace(NeXus::NXEntry &entry,
const std::vector<std::vector<int> > &);
const std::vector<std::vector<int>> &);
void initInstrumentSpecific();
void addAllNexusFieldsAsProperties(const std::string &filename);
void addEnergyToRun();
......@@ -71,7 +71,7 @@ private:
void loadTimeDetails(NeXus::NXEntry &entry);
void loadDataIntoTheWorkSpace(NeXus::NXEntry &entry,
const std::vector<std::vector<int> > &);
const std::vector<std::vector<int>> &);
void loadSpectra(size_t &spec, const size_t numberOfTubes,
const std::vector<Mantid::detid_t> &detectorIDs,
NeXus::NXInt data, Mantid::API::Progress progress);
......
......@@ -21,9 +21,8 @@ using namespace HistogramData;
DECLARE_NEXUS_FILELOADER_ALGORITHM(LoadILLTOF2)
/// A vector containing the supported instrument names
const std::vector<std::string> LoadILLTOF2::SUPPORTED_INSTRUMENTS = { "IN4",
"IN5",
"IN6" };
const std::vector<std::string> LoadILLTOF2::SUPPORTED_INSTRUMENTS = {
"IN4", "IN5", "IN6"};
/**
* Return the confidence with with this algorithm can load the file
......@@ -41,9 +40,10 @@ int LoadILLTOF2::confidence(Kernel::NexusDescriptor &descriptor) const {
descriptor.pathExists("/entry0/mode") &&
!descriptor.pathExists("/entry0/dataSD") // This one is for
// LoadILLIndirect
&& !descriptor.pathExists(
"/entry0/instrument/VirtualChopper") // This one is for
// LoadILLReflectometry
&&
!descriptor.pathExists(
"/entry0/instrument/VirtualChopper") // This one is for
// LoadILLReflectometry
) {
return 80;
} else {
......@@ -61,8 +61,8 @@ void LoadILLTOF2::init() {
make_unique<FileProperty>("Filename", "", FileProperty::Load, ".nxs"),
"File path of the Data file to load");
declareProperty(make_unique<WorkspaceProperty<> >("OutputWorkspace", "",
Direction::Output),
declareProperty(make_unique<WorkspaceProperty<>>("OutputWorkspace", "",
Direction::Output),
"The name to use for the output workspace");
}
......@@ -108,10 +108,10 @@ void LoadILLTOF2::exec() {
*
* @return List of monitor data
*/
std::vector<std::vector<int> >
std::vector<std::vector<int>>
LoadILLTOF2::getMonitorInfo(NeXus::NXEntry &firstEntry) {
std::vector<std::vector<int> > monitorList;
std::vector<std::vector<int>> monitorList;
for (std::vector<NXClassInfo>::const_iterator it =
firstEntry.groups().begin();
......@@ -168,9 +168,8 @@ void LoadILLTOF2::loadInstrumentDetails(NeXus::NXEntry &firstEntry) {
* @param entry The NeXus entry
* @param monitors List of monitor data
*/
void
LoadILLTOF2::initWorkSpace(NeXus::NXEntry &entry,
const std::vector<std::vector<int> > &monitors) {
void LoadILLTOF2::initWorkSpace(NeXus::NXEntry &entry,
const std::vector<std::vector<int>> &monitors) {
// read in the data
NXData dataGroup = entry.openNXData("data");
......@@ -334,7 +333,7 @@ void LoadILLTOF2::addPulseInterval() {
* @param monitors List of monitor data
*/
void LoadILLTOF2::loadDataIntoTheWorkSpace(
NeXus::NXEntry &entry, const std::vector<std::vector<int> > &monitors) {
NeXus::NXEntry &entry, const std::vector<std::vector<int>> &monitors) {
g_log.debug() << "Loading data into the workspace...\n";
// read in the data
......@@ -434,8 +433,7 @@ void LoadILLTOF2::runLoadInstrument() {
loadInst->setProperty("RewriteSpectraMap",
Mantid::Kernel::OptionalBool(false));
loadInst->execute();
}
catch (...) {
} catch (...) {
g_log.information("Cannot load the instrument definition.");
}
}
......
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