Skip to content

Forward declares of NexusClasses inside DataHandling files #38999

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Mar 3, 2025
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion Framework/DataHandling/inc/MantidDataHandling/DataBlock.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,12 @@
// SPDX - License - Identifier: GPL - 3.0 +
#pragma once

#include <memory>
#include <vector>

#include "MantidDataHandling/DllConfig.h"
#include "MantidGeometry/IDTypes.h"
#include "MantidNexus/NexusClasses.h"
#include "MantidNexus/NexusClasses_fwd.h"

namespace Mantid {
namespace DataHandling {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

#include "MantidDataHandling/DataBlock.h"
#include "MantidDataHandling/DllConfig.h"
#include <algorithm>

namespace Mantid {
namespace DataHandling {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include "MantidAPI/IFileLoader.h"
#include "MantidDataObjects/EventWorkspace.h"
#include "MantidGeometry/Instrument.h"
#include "MantidNexus/NexusClasses.h"
#include "MantidNexus/NexusClasses_fwd.h"
#include <regex>

#define TarTypeFlag_NormalFile '0'
Expand Down
2 changes: 1 addition & 1 deletion Framework/DataHandling/inc/MantidDataHandling/LoadBBY.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include "MantidDataObjects/EventWorkspace.h"
#include "MantidGeometry/Instrument.h"
#include "MantidKernel/FileDescriptor.h"
#include "MantidNexus/NexusClasses.h"
#include "MantidNexus/NexusClasses_fwd.h"

namespace Mantid {
namespace DataHandling {
Expand Down
1 change: 0 additions & 1 deletion Framework/DataHandling/inc/MantidDataHandling/LoadEMU.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#include "MantidGeometry/Instrument.h"
#include "MantidKernel/FileDescriptor.h"
#include "MantidKernel/NexusDescriptor.h"
#include "MantidNexus/NexusClasses.h"

namespace Mantid {
namespace DataHandling {
Expand Down
4 changes: 2 additions & 2 deletions Framework/DataHandling/inc/MantidDataHandling/LoadHelper.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
#include "MantidAPI/Run.h"
#include "MantidDataHandling/DllConfig.h"
#include "MantidKernel/Quat.h"
#include "MantidNexus/NeXusFile.hpp"
#include "MantidNexus/NexusClasses.h"
#include "MantidNexus/NeXusFile_fwd.h"
#include "MantidNexus/NexusClasses_fwd.h"

namespace Mantid {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include "MantidKernel/DateAndTime.h"
#include "MantidKernel/NexusDescriptor.h"
#include "MantidKernel/V3D.h"
#include "MantidNexus/NexusClasses.h"
#include "MantidNexus/NexusClasses_fwd.h"

namespace Mantid {
namespace DataHandling {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include "MantidAPI/IFileLoader.h"
#include "MantidDataHandling/DllConfig.h"
#include "MantidKernel/NexusDescriptor.h"
#include "MantidNexus/NexusClasses.h"
#include "MantidNexus/NexusClasses_fwd.h"

namespace Mantid {
namespace DataHandling {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#include "MantidAPI/IFileLoader.h"
#include "MantidDataHandling/DllConfig.h"
#include "MantidKernel/NexusDescriptor.h"
#include "MantidNexus/NexusClasses.h"

#include <H5Cpp.h>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include "MantidDataHandling/DllConfig.h"
#include "MantidKernel/DateAndTime.h"
#include "MantidKernel/NexusDescriptor.h"
#include "MantidNexus/NexusClasses.h"
#include "MantidNexus/NexusClasses_fwd.h"

#include <utility>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include "MantidAPI/MatrixWorkspace_fwd.h"
#include "MantidDataHandling/DllConfig.h"
#include "MantidKernel/NexusDescriptor.h"
#include "MantidNexus/NexusClasses.h"
#include "MantidNexus/NexusClasses_fwd.h"
#include "MantidTypes/Core/DateAndTime.h"

namespace Mantid {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include "MantidAPI/IFileLoader.h"
#include "MantidDataHandling/DllConfig.h"
#include "MantidKernel/NexusDescriptor.h"
#include "MantidNexus/NexusClasses.h"
#include "MantidNexus/NexusClasses_fwd.h"

#include <H5Cpp.h>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include "MantidDataHandling/DllConfig.h"
#include "MantidGeometry/IDTypes.h"
#include "MantidKernel/NexusDescriptor.h"
#include "MantidNexus/NexusClasses.h"
#include "MantidNexus/NexusClasses_fwd.h"

namespace Mantid {
namespace DataHandling {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#include "MantidHistogramData/HistogramX.h"
#include "MantidKernel/NexusDescriptor.h"
#include "MantidNexus/NeXusFile.hpp"
#include "MantidNexus/NexusClasses.h"
#include "MantidNexus/NexusClasses_fwd.h"

#include <boost/scoped_ptr.hpp>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#define MANTID_DATAHANDLING_LOADISISNEXUSHELPER_H_

#include "MantidDataObjects/Workspace2D.h"
#include "MantidNexus/NexusClasses.h"
#include "MantidNexus/NexusClasses_fwd.h"

namespace Mantid {

Expand Down
2 changes: 1 addition & 1 deletion Framework/DataHandling/inc/MantidDataHandling/LoadMLZ.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include "MantidAPI/IFileLoader.h"
#include "MantidDataHandling/DllConfig.h"
#include "MantidKernel/NexusDescriptor.h"
#include "MantidNexus/NexusClasses.h"
#include "MantidNexus/NexusClasses_fwd.h"

namespace Mantid {
namespace DataHandling {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#include "MantidDataHandling/LoadMuonNexusV2NexusHelper.h"
#include "MantidDataHandling/LoadMuonStrategy.h"
#include "MantidGeometry/IDTypes.h"
#include "MantidNexus/NexusClasses.h"

namespace Mantid {
namespace DataHandling {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include "MantidAPI/Workspace_fwd.h"
#include "MantidDataObjects/Workspace2D_fwd.h"
#include "MantidGeometry/IDTypes.h"
#include "MantidNexus/NexusClasses.h"
#include "MantidNexus/NexusClasses_fwd.h"

#include <optional>
#include <vector>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#include "MantidDataHandling/DllConfig.h"
#include "MantidHistogramData/BinEdges.h"
#include "MantidKernel/cow_ptr.h"
#include "MantidNexus/NexusClasses.h"
#include "MantidNexus/NexusClasses_fwd.h"
#include <map>
#include <vector>

Expand Down
1 change: 0 additions & 1 deletion Framework/DataHandling/inc/MantidDataHandling/LoadPLN.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
#include "MantidDataObjects/EventWorkspace.h"
#include "MantidGeometry/Instrument.h"
#include "MantidKernel/NexusDescriptor.h"
#include "MantidNexus/NexusClasses.h"

namespace Mantid {
namespace DataHandling {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include "MantidAPI/IFileLoader.h"
#include "MantidDataHandling/DllConfig.h"
#include "MantidKernel/NexusDescriptor.h"
#include "MantidNexus/NexusClasses.h"
#include "MantidNexus/NexusClasses_fwd.h"

namespace Mantid {
namespace DataHandling {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include "MantidDataObjects/Workspace2D.h"
#include "MantidKernel/DateAndTime.h"
#include "MantidKernel/NexusDescriptor.h"
#include "MantidNexus/NexusClasses.h"
#include "MantidNexus/NexusClasses_fwd.h"

#include <mutex>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
#pragma once
#include "MantidAPI/WorkspaceGroup_fwd.h"
#include "MantidDataHandling/LoadMuonStrategy.h"
#include "MantidNexus/NexusClasses.h"

namespace Mantid {
namespace DataHandling {
Expand Down
1 change: 0 additions & 1 deletion Framework/DataHandling/inc/MantidDataHandling/PatchBBY.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#include "MantidDataHandling/DllConfig.h"
#include "MantidDataObjects/EventWorkspace.h"
#include "MantidGeometry/Instrument.h"
#include "MantidNexus/NexusClasses.h"

namespace Mantid {
namespace DataHandling {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
#pragma once
#include "MantidDataHandling/LoadMuonStrategy.h"
#include "MantidDataObjects/Workspace2D_fwd.h"
#include "MantidNexus/NexusClasses.h"

namespace Mantid {
namespace DataHandling {
Expand Down
1 change: 1 addition & 0 deletions Framework/DataHandling/src/DataBlock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
// SPDX - License - Identifier: GPL - 3.0 +
#include "MantidDataHandling/DataBlock.h"
#include "MantidDataHandling/DataBlockGenerator.h"
#include "MantidNexus/NexusClasses.h"

#include <limits>
#include <vector>
Expand Down
1 change: 1 addition & 0 deletions Framework/DataHandling/src/DataBlockGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

#include "MantidDataHandling/DataBlock.h"
#include "MantidDataHandling/DataBlockGenerator.h"
#include <algorithm>

namespace Mantid::DataHandling {

Expand Down
1 change: 1 addition & 0 deletions Framework/DataHandling/src/LoadHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include "MantidKernel/PhysicalConstants.h"
#include "MantidNexus/NeXusException.hpp"
#include "MantidNexus/NeXusFile.hpp"
#include "MantidNexus/NexusClasses.h"
#include <strstream>

namespace Mantid {
Expand Down
1 change: 1 addition & 0 deletions Framework/DataHandling/src/LoadILLDiffraction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include "MantidNexus/H5Util.h"
#include "MantidNexus/NeXusException.hpp"
#include "MantidNexus/NeXusFile.hpp"
#include "MantidNexus/NexusClasses.h"

#include <H5Cpp.h>
#include <Poco/Path.h>
Expand Down
1 change: 1 addition & 0 deletions Framework/DataHandling/src/LoadILLIndirect2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include "MantidKernel/UnitFactory.h"
#include "MantidNexus/NeXusException.hpp"
#include "MantidNexus/NeXusFile.hpp"
#include "MantidNexus/NexusClasses.h"

#include <Poco/Path.h>
#include <algorithm>
Expand Down
1 change: 1 addition & 0 deletions Framework/DataHandling/src/LoadILLLagrange.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include "MantidNexus/H5Util.h"
#include "MantidNexus/NeXusException.hpp"
#include "MantidNexus/NeXusFile.hpp"
#include "MantidNexus/NexusClasses.h"

#include <Poco/Path.h>

Expand Down
1 change: 1 addition & 0 deletions Framework/DataHandling/src/LoadILLPolarizedDiffraction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include "MantidKernel/VisibleWhenProperty.h"
#include "MantidNexus/NeXusException.hpp"
#include "MantidNexus/NeXusFile.hpp"
#include "MantidNexus/NexusClasses.h"

#include <Poco/Path.h>

Expand Down
1 change: 1 addition & 0 deletions Framework/DataHandling/src/LoadILLReflectometry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#include "MantidKernel/V3D.h"
#include "MantidNexus/NeXusException.hpp"
#include "MantidNexus/NeXusFile.hpp"
#include "MantidNexus/NexusClasses.h"

namespace {

Expand Down
1 change: 1 addition & 0 deletions Framework/DataHandling/src/LoadILLSALSA.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include "MantidHistogramData/Points.h"
#include "MantidKernel/BoundedValidator.h"
#include "MantidNexus/H5Util.h"
#include "MantidNexus/NeXusFile.hpp"

#include <iterator>
#include <sstream>
Expand Down
1 change: 1 addition & 0 deletions Framework/DataHandling/src/LoadILLSANS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include "MantidNexus/H5Util.h"
#include "MantidNexus/NeXusException.hpp"
#include "MantidNexus/NeXusFile.hpp"
#include "MantidNexus/NexusClasses.h"

#include <Poco/Path.h>

Expand Down
1 change: 1 addition & 0 deletions Framework/DataHandling/src/LoadILLTOF2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include "MantidKernel/UnitFactory.h"
#include "MantidNexus/NeXusException.hpp"
#include "MantidNexus/NeXusFile.hpp"
#include "MantidNexus/NexusClasses.h"

namespace {
/// An array containing the supported instrument names
Expand Down
1 change: 1 addition & 0 deletions Framework/DataHandling/src/LoadISISNexus2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include "MantidKernel/TimeSeriesProperty.h"
#include "MantidKernel/UnitFactory.h"
#include "MantidNexus/NeXusFile.hpp"
#include "MantidNexus/NexusClasses.h"

#include <algorithm>
#include <cctype>
Expand Down
1 change: 1 addition & 0 deletions Framework/DataHandling/src/LoadISISNexusHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include "MantidDataHandling/LoadISISNexusHelper.h"
#include "MantidAPI/Run.h"
#include "MantidAPI/Sample.h"
#include "MantidNexus/NexusClasses.h"
namespace {
static constexpr std::size_t RUN_TIME_STRING_LENGTH = 19;
} // namespace
Expand Down
1 change: 1 addition & 0 deletions Framework/DataHandling/src/LoadMLZ.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include "MantidKernel/Exception.h"
#include "MantidKernel/OptionalBool.h"
#include "MantidKernel/UnitFactory.h"
#include "MantidNexus/NexusClasses.h"

#include <algorithm>
#include <cmath>
Expand Down
1 change: 1 addition & 0 deletions Framework/DataHandling/src/LoadMuonNexusV2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include "MantidKernel/Unit.h"
#include "MantidKernel/UnitFactory.h"
#include "MantidKernel/UnitLabelTypes.h"
#include "MantidNexus/NexusClasses.h"

#include <vector>

Expand Down
1 change: 1 addition & 0 deletions Framework/DataHandling/src/LoadMuonNexusV2NexusHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include "MantidAPI/WorkspaceFactory.h"
#include "MantidDataObjects/TableWorkspace.h"
#include "MantidDataObjects/Workspace2D.h"
#include "MantidNexus/NexusClasses.h"

#include <algorithm>
#include <cctype>
Expand Down
1 change: 1 addition & 0 deletions Framework/DataHandling/src/LoadSINQFocus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include "MantidGeometry/Instrument.h"
#include "MantidKernel/OptionalBool.h"
#include "MantidKernel/UnitFactory.h"
#include "MantidNexus/NexusClasses.h"

#include <algorithm>
#include <cmath>
Expand Down
1 change: 1 addition & 0 deletions Framework/DataHandling/src/MultiPeriodLoadMuonStrategy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include "MantidDataHandling/LoadMuonNexusV2NexusHelper.h"
#include "MantidDataObjects/TableWorkspace.h"
#include "MantidDataObjects/Workspace2D.h"
#include "MantidNexus/NexusClasses.h"

namespace Mantid::DataHandling {

Expand Down
1 change: 1 addition & 0 deletions Framework/DataHandling/src/PatchBBY.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include "MantidAPI/FileProperty.h"
#include "MantidKernel/ListValidator.h"
#include "MantidKernel/PropertyWithValue.h"
#include "MantidNexus/NexusClasses.h"

#include <Poco/String.h>
#include <Poco/TemporaryFile.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include "MantidDataHandling/LoadMuonNexusV2NexusHelper.h"
#include "MantidDataObjects/TableWorkspace.h"
#include "MantidDataObjects/Workspace2D.h"
#include "MantidNexus/NexusClasses.h"

namespace Mantid::DataHandling {

Expand Down
4 changes: 0 additions & 4 deletions Framework/DataObjects/src/BoxControllerNeXusIO.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -257,10 +257,6 @@ void BoxControllerNeXusIO::prepareNxSToWrite_CurVersion() {
void BoxControllerNeXusIO::prepareNxSdata_CurVersion() {
// Open the data
m_File->openData("event_data");
// There are rummors that this is faster. Not sure if it is important
// int type = NXnumtype::FLOAT32;
// int rank = 0;
// NXgetinfo(file->getHandle(), &rank, dims, &type);

NeXus::Info info = m_File->getInfo();
NXnumtype Type = info.type;
Expand Down
Loading