Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
mantid
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mantidproject
mantid
Commits
8096cbe5
Commit
8096cbe5
authored
7 years ago
by
Simon Heybrock
Browse files
Options
Downloads
Patches
Plain Diff
Re #20887. Inline key methods of TofEvent for event loading speed.
parent
6dab89a0
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Framework/Types/inc/MantidTypes/Event/TofEvent.h
+15
-5
15 additions, 5 deletions
Framework/Types/inc/MantidTypes/Event/TofEvent.h
Framework/Types/src/Event/TofEvent.cpp
+1
-19
1 addition, 19 deletions
Framework/Types/src/Event/TofEvent.cpp
with
16 additions
and
24 deletions
Framework/Types/inc/MantidTypes/Event/TofEvent.h
+
15
−
5
View file @
8096cbe5
...
...
@@ -15,7 +15,6 @@ class LoadEventNexus;
}
namespace
Types
{
namespace
Event
{
//==========================================================================================
/** Info about a single neutron detection event:
*
* - the time of flight of the neutron (can be converted to other units)
...
...
@@ -82,9 +81,20 @@ public:
};
#pragma pack(pop)
//==========================================================================================
// TofEvent inlined member function definitions
//==========================================================================================
/** Constructor, specifying the time of flight only
* @param tof :: time of flight, in microseconds
*/
inline
TofEvent
::
TofEvent
(
const
double
tof
)
:
m_tof
(
tof
),
m_pulsetime
(
0
)
{}
/** Constructor, specifying the time of flight and the frame id
* @param tof :: time of flight, in microseconds
* @param pulsetime :: absolute pulse time of the neutron.
*/
inline
TofEvent
::
TofEvent
(
const
double
tof
,
const
Core
::
DateAndTime
pulsetime
)
:
m_tof
(
tof
),
m_pulsetime
(
pulsetime
)
{}
/// Empty constructor
inline
TofEvent
::
TofEvent
()
:
m_tof
(
0
),
m_pulsetime
(
0
)
{}
/** () operator: return the tof (X value) of the event.
* This is useful for std operations like comparisons and std::lower_bound
...
...
@@ -112,4 +122,4 @@ inline double TofEvent::errorSquared() const { return 1.0; }
}
// namespace Event
}
// namespace Types
}
// namespace Mantid
#endif // MANTID_TYPES_TOFEVENT_H
\ No newline at end of file
#endif // MANTID_TYPES_TOFEVENT_H
This diff is collapsed.
Click to expand it.
Framework/Types/src/Event/TofEvent.cpp
+
1
−
19
View file @
8096cbe5
...
...
@@ -6,24 +6,6 @@ namespace Mantid {
namespace
Types
{
using
Core
::
DateAndTime
;
namespace
Event
{
//==========================================================================
/// --------------------- TofEvent stuff ----------------------------------
//==========================================================================
/** Constructor, specifying the time of flight only
* @param tof :: time of flight, in microseconds
*/
TofEvent
::
TofEvent
(
const
double
tof
)
:
m_tof
(
tof
),
m_pulsetime
(
0
)
{}
/** Constructor, specifying the time of flight and the frame id
* @param tof :: time of flight, in microseconds
* @param pulsetime :: absolute pulse time of the neutron.
*/
TofEvent
::
TofEvent
(
const
double
tof
,
const
DateAndTime
pulsetime
)
:
m_tof
(
tof
),
m_pulsetime
(
pulsetime
)
{}
/// Empty constructor
TofEvent
::
TofEvent
()
:
m_tof
(
0
),
m_pulsetime
(
0
)
{}
/** Comparison operator.
* @param rhs: the other TofEvent to compare.
* @return true if the TofEvent's are identical.*/
...
...
@@ -81,4 +63,4 @@ ostream &operator<<(ostream &os, const TofEvent &event) {
}
}
// namespace Event
}
// namespace Types
}
// namespace Mantid
\ No newline at end of file
}
// namespace Mantid
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment