Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Gaudi
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
Gaudi
Gaudi
Commits
68ecbfc0
Commit
68ecbfc0
authored
7 years ago
by
Gerhard Raven
Browse files
Options
Downloads
Patches
Plain Diff
inline one-line member functions
parent
1a6e3832
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!510
Implement EventIDBase ordering in a generic way by specifying projections
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
GaudiKernel/GaudiKernel/EventIDBase.h
+15
-19
15 additions, 19 deletions
GaudiKernel/GaudiKernel/EventIDBase.h
GaudiKernel/src/Lib/EventIDBase.cpp
+4
-24
4 additions, 24 deletions
GaudiKernel/src/Lib/EventIDBase.cpp
with
19 additions
and
43 deletions
GaudiKernel/GaudiKernel/EventIDBase.h
+
15
−
19
View file @
68ecbfc0
...
...
@@ -74,7 +74,7 @@ public:
number_type
time_stamp_ns_offset
=
0
,
number_type
lumi_block
=
UNDEFNUM
,
number_type
bunch_crossing_id
=
0
);
// Use default copy constructor.
virtual
~
EventIDBase
();
virtual
~
EventIDBase
()
=
default
;
//@}
/// run number - 32 bit unsigned
...
...
@@ -133,18 +133,18 @@ public:
void
set_bunch_crossing_id
(
number_type
bcid
)
{
m_bunch_crossing_id
=
bcid
;
}
/// Comparison operators
friend
bool
operator
<
(
const
EventIDBase
&
lhs
,
const
EventIDBase
&
rhs
);
friend
bool
operator
>
(
const
EventIDBase
&
lhs
,
const
EventIDBase
&
rhs
);
friend
bool
operator
==
(
const
EventIDBase
&
lhs
,
const
EventIDBase
&
rhs
);
friend
bool
operator
!=
(
const
EventIDBase
&
lhs
,
const
EventIDBase
&
rhs
);
friend
bool
operator
<=
(
const
EventIDBase
&
lhs
,
const
EventIDBase
&
rhs
);
friend
bool
operator
>=
(
const
EventIDBase
&
lhs
,
const
EventIDBase
&
rhs
);
friend
bool
operator
<
(
const
EventIDBase
&
lhs
,
const
EventIDBase
&
rhs
);
friend
bool
operator
>
(
const
EventIDBase
&
lhs
,
const
EventIDBase
&
rhs
)
{
return
rhs
<
lhs
;
}
friend
bool
operator
!=
(
const
EventIDBase
&
lhs
,
const
EventIDBase
&
rhs
)
{
return
!
(
lhs
==
rhs
);
}
friend
bool
operator
<=
(
const
EventIDBase
&
lhs
,
const
EventIDBase
&
rhs
)
{
return
!
(
lhs
>
rhs
);
}
friend
bool
operator
>=
(
const
EventIDBase
&
lhs
,
const
EventIDBase
&
rhs
)
{
return
!
(
lhs
<
rhs
);
}
bool
isRunEvent
()
const
;
bool
isTimeStamp
()
const
;
bool
isLumiEvent
()
const
;
bool
isRunLumi
()
const
;
bool
isValid
()
const
;
bool
isRunEvent
()
const
{
return
m_type
&
RunEvent
;
}
bool
isTimeStamp
()
const
{
return
m_type
&
TimeStamp
;
}
bool
isLumiEvent
()
const
{
return
m_type
&
LumiEvent
;
}
bool
isRunLumi
()
const
{
return
m_type
&
RunLumi
;
}
bool
isValid
()
const
{
return
m_type
!=
Invalid
;
}
/// Extraction operators
friend
std
::
ostream
&
operator
<<
(
std
::
ostream
&
os
,
const
EventIDBase
&
rhs
);
...
...
@@ -178,10 +178,10 @@ private:
unsigned
m_type
{
Invalid
};
void
setRE
()
{
m_type
=
m_type
|
RunEvent
;
}
void
setTS
()
{
m_type
=
m_type
|
TimeStamp
;
}
void
setLE
()
{
m_type
=
m_type
|
LumiEvent
;
}
void
setRL
()
{
m_type
=
m_type
|
RunLumi
;
}
void
setRE
()
{
m_type
|
=
RunEvent
;
}
void
setTS
()
{
m_type
|
=
TimeStamp
;
}
void
setLE
()
{
m_type
|
=
LumiEvent
;
}
void
setRL
()
{
m_type
|
=
RunLumi
;
}
/// run number
number_type
m_run_number
{
UNDEFNUM
};
...
...
@@ -223,10 +223,6 @@ inline bool operator==( const EventIDBase& lhs, const EventIDBase& rhs )
return
(
lhs
.
m_run_number
==
rhs
.
m_run_number
&&
lhs
.
m_event_number
==
rhs
.
m_event_number
&&
lhs
.
m_lumi_block
==
rhs
.
m_lumi_block
);
}
inline
bool
operator
>
(
const
EventIDBase
&
lhs
,
const
EventIDBase
&
rhs
)
{
return
rhs
<
lhs
;
}
inline
bool
operator
!=
(
const
EventIDBase
&
lhs
,
const
EventIDBase
&
rhs
)
{
return
!
(
lhs
==
rhs
);
}
inline
bool
operator
<=
(
const
EventIDBase
&
lhs
,
const
EventIDBase
&
rhs
)
{
return
!
(
lhs
>
rhs
);
}
inline
bool
operator
>=
(
const
EventIDBase
&
lhs
,
const
EventIDBase
&
rhs
)
{
return
!
(
lhs
<
rhs
);
}
inline
std
::
ostream
&
operator
<<
(
std
::
ostream
&
os
,
const
EventIDBase
&
rhs
)
{
...
...
This diff is collapsed.
Click to expand it.
GaudiKernel/src/Lib/EventIDBase.cpp
+
4
−
24
View file @
68ecbfc0
...
...
@@ -23,34 +23,14 @@ EventIDBase::EventIDBase( number_type run_number, event_number_t event_number, n
,
m_lumi_block
(
lumi_block
)
,
m_bunch_crossing_id
(
bunch_crossing_id
)
{
if
(
m_run_number
!=
UNDEFNUM
&&
m_event_number
!=
UNDEFEVT
)
{
setRE
();
}
if
(
m_run_number
!=
UNDEFNUM
&&
m_event_number
!=
UNDEFEVT
)
setRE
();
if
(
m_time_stamp
!=
UNDEFNUM
)
{
setTS
();
if
(
m_time_stamp_ns_offset
==
UNDEFNUM
)
{
m_time_stamp_ns_offset
=
0
;
}
if
(
m_time_stamp_ns_offset
==
UNDEFNUM
)
m_time_stamp_ns_offset
=
0
;
}
if
(
m_lumi_block
!=
UNDEFNUM
&&
m_event_number
!=
UNDEFEVT
)
{
setLE
();
}
if
(
m_lumi_block
!=
UNDEFNUM
&&
m_event_number
!=
UNDEFEVT
)
setLE
();
if
(
m_run_number
!=
UNDEFNUM
&&
m_lumi_block
!=
UNDEFNUM
)
{
setRL
();
}
if
(
m_run_number
!=
UNDEFNUM
&&
m_lumi_block
!=
UNDEFNUM
)
setRL
();
}
EventIDBase
::~
EventIDBase
()
{}
bool
EventIDBase
::
isRunEvent
()
const
{
return
(
m_type
&
RunEvent
);
}
bool
EventIDBase
::
isTimeStamp
()
const
{
return
(
m_type
&
TimeStamp
);
}
bool
EventIDBase
::
isLumiEvent
()
const
{
return
(
m_type
&
LumiEvent
);
}
bool
EventIDBase
::
isRunLumi
()
const
{
return
(
m_type
&
RunLumi
);
}
bool
EventIDBase
::
isValid
()
const
{
return
(
m_type
!=
Invalid
);
}
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