Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
mantidproject
mantid
Commits
f37303b1
Commit
f37303b1
authored
Jun 03, 2014
by
Ricardo Ferraz Leal
Browse files
Re #9336 Added new doc format.
parent
bf9c5f0d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/LoadILL.h
View file @
f37303b1
...
...
@@ -39,83 +39,89 @@ namespace DataHandling {
File change history is stored at: <https://github.com/mantidproject/mantid>
Code Documentation is available at: <http://doxygen.mantidproject.org>
*/
class
DLLExport
LoadILL
:
public
API
::
IFileLoader
<
Kernel
::
NexusDescriptor
>
{
public:
/// Constructor
LoadILL
();
/// Virtual destructor
virtual
~
LoadILL
()
{
}
/// Algorithm's name
virtual
const
std
::
string
name
()
const
{
return
"LoadILL"
;
}
/// Algorithm's version
virtual
int
version
()
const
{
return
(
1
);
}
/// Algorithm's category for identification
virtual
const
std
::
string
category
()
const
{
return
"DataHandling"
;
}
/// Returns a confidence value that this algorithm can load a file
int
confidence
(
Kernel
::
NexusDescriptor
&
descriptor
)
const
;
class
DLLExport
LoadILL
:
public
API
::
IFileLoader
<
Kernel
::
NexusDescriptor
>
{
public:
/// Constructor
LoadILL
();
/// Virtual destructor
virtual
~
LoadILL
()
{
}
/// Algorithm's name
virtual
const
std
::
string
name
()
const
{
return
"LoadILL"
;
}
///Summary of algorithms purpose
virtual
const
std
::
string
summary
()
const
{
return
"Loads a ILL nexus file."
;
}
/// Algorithm's version
virtual
int
version
()
const
{
return
(
1
);
}
/// Algorithm's category for identification
virtual
const
std
::
string
category
()
const
{
return
"DataHandling"
;
}
/// Returns a confidence value that this algorithm can load a file
int
confidence
(
Kernel
::
NexusDescriptor
&
descriptor
)
const
;
private:
/// Sets documentation strings for this algorithm
virtual
void
initDocs
();
// Initialisation code
void
init
();
// Execution code
void
exec
();
int
getEPPFromVanadium
(
const
std
::
string
&
,
Mantid
::
API
::
MatrixWorkspace_sptr
);
void
loadInstrumentDetails
(
NeXus
::
NXEntry
&
);
std
::
vector
<
std
::
vector
<
int
>
>
getMonitorInfo
(
NeXus
::
NXEntry
&
firstEntry
);
void
initWorkSpace
(
NeXus
::
NXEntry
&
entry
,
const
std
::
vector
<
std
::
vector
<
int
>
>&
);
void
initInstrumentSpecific
();
void
addAllNexusFieldsAsProperties
(
std
::
string
filename
);
void
addEnergyToRun
();
void
loadExperimentDetails
(
NeXus
::
NXEntry
&
entry
);
int
getDetectorElasticPeakPosition
(
const
NeXus
::
NXInt
&
data
);
void
loadTimeDetails
(
NeXus
::
NXEntry
&
entry
);
NeXus
::
NXData
loadNexusFileData
(
NeXus
::
NXEntry
&
entry
);
void
loadDataIntoTheWorkSpace
(
NeXus
::
NXEntry
&
entry
,
const
std
::
vector
<
std
::
vector
<
int
>
>&
,
int
vanaCalculatedDetectorElasticPeakPosition
=
-
1
);
void
runLoadInstrument
();
/// Calculate error for y
static
double
calculateError
(
double
in
)
{
return
sqrt
(
in
);
}
int
validateVanadium
(
const
std
::
string
&
);
API
::
MatrixWorkspace_sptr
m_localWorkspace
;
// Initialisation code
void
init
();
// Execution code
void
exec
();
int
getEPPFromVanadium
(
const
std
::
string
&
,
Mantid
::
API
::
MatrixWorkspace_sptr
);
void
loadInstrumentDetails
(
NeXus
::
NXEntry
&
);
std
::
vector
<
std
::
vector
<
int
>
>
getMonitorInfo
(
NeXus
::
NXEntry
&
firstEntry
);
void
initWorkSpace
(
NeXus
::
NXEntry
&
entry
,
const
std
::
vector
<
std
::
vector
<
int
>
>&
);
void
initInstrumentSpecific
();
void
addAllNexusFieldsAsProperties
(
std
::
string
filename
);
void
addEnergyToRun
();
void
loadExperimentDetails
(
NeXus
::
NXEntry
&
entry
);
int
getDetectorElasticPeakPosition
(
const
NeXus
::
NXInt
&
data
);
void
loadTimeDetails
(
NeXus
::
NXEntry
&
entry
);
NeXus
::
NXData
loadNexusFileData
(
NeXus
::
NXEntry
&
entry
);
void
loadDataIntoTheWorkSpace
(
NeXus
::
NXEntry
&
entry
,
const
std
::
vector
<
std
::
vector
<
int
>
>&
,
int
vanaCalculatedDetectorElasticPeakPosition
=
-
1
);
void
runLoadInstrument
();
/// Calculate error for y
static
double
calculateError
(
double
in
)
{
return
sqrt
(
in
);
}
int
validateVanadium
(
const
std
::
string
&
);
API
::
MatrixWorkspace_sptr
m_localWorkspace
;
// NeXus::NXRoot m_dataRoot;
// NeXus::NXRoot m_vanaRoot;
std
::
string
m_instrumentName
;
///< Name of the instrument
std
::
string
m_instrumentPath
;
///< Name of the instrument path
std
::
string
m_instrumentName
;
///< Name of the instrument
std
::
string
m_instrumentPath
;
///< Name of the instrument path
// Variables describing the data in the detector
size_t
m_numberOfTubes
;
// number of tubes - X
size_t
m_numberOfPixelsPerTube
;
//number of pixels per tube - Y
size_t
m_numberOfChannels
;
// time channels - Z
size_t
m_numberOfHistograms
;
// Variables describing the data in the detector
size_t
m_numberOfTubes
;
// number of tubes - X
size_t
m_numberOfPixelsPerTube
;
//number of pixels per tube - Y
size_t
m_numberOfChannels
;
// time channels - Z
size_t
m_numberOfHistograms
;
/* Values parsed from the nexus file */
int
m_monitorElasticPeakPosition
;
double
m_wavelength
;
double
m_channelWidth
;
/* Values parsed from the nexus file */
int
m_monitorElasticPeakPosition
;
double
m_wavelength
;
double
m_channelWidth
;
double
m_l1
;
//=2.0;
double
m_l2
;
//=4.0;
double
m_l1
;
//=2.0;
double
m_l2
;
//=4.0;
std
::
vector
<
std
::
string
>
m_supportedInstruments
;
LoadHelper
m_loader
;
std
::
vector
<
std
::
string
>
m_supportedInstruments
;
LoadHelper
m_loader
;
};
...
...
Code/Mantid/Framework/DataHandling/src/LoadILL.cpp
View file @
f37303b1
...
...
@@ -50,12 +50,6 @@ std::ostream& operator<<(std::ostream &strm, const NXClassInfo &c) {
<<
c
.
nxclass
;
}
/// Sets documentation strings for this algorithm
void
LoadILL
::
initDocs
()
{
this
->
setWikiSummary
(
"Loads a ILL nexus file. "
);
this
->
setOptionalMessage
(
"Loads a ILL nexus file."
);
}
//---------------------------------------------------
// Private member functions
//---------------------------------------------------
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment