Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Phys
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
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
LHCb
Phys
Commits
447e7e5f
Commit
447e7e5f
authored
8 years ago
by
philten
Browse files
Options
Downloads
Patches
Plain Diff
LBHLT-76
naive method for adding extra info for the topo
parent
99e018a3
Branches
TopoExtraInfo
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Phys/LoKiPhys/LoKi/Particles44.h
+3
-2
3 additions, 2 deletions
Phys/LoKiPhys/LoKi/Particles44.h
Phys/LoKiPhys/src/Particles44.cpp
+9
-5
9 additions, 5 deletions
Phys/LoKiPhys/src/Particles44.cpp
with
12 additions
and
7 deletions
Phys/LoKiPhys/LoKi/Particles44.h
+
3
−
2
View file @
447e7e5f
...
...
@@ -50,9 +50,9 @@ namespace LoKi
public:
// ======================================================================
/// constructor from the tool name
Value
(
const
std
::
string
&
tool
)
;
Value
(
const
std
::
string
&
tool
,
int
key
=
-
1
)
;
/// constructor from the tool
Value
(
const
IParticleValue
*
tool
)
;
Value
(
const
IParticleValue
*
tool
,
int
key
=
-
1
)
;
/// copy constructor
Value
(
const
Value
&
right
)
=
default
;
/// MANDATORY: virtual destructor
...
...
@@ -68,6 +68,7 @@ namespace LoKi
// ======================================================================
/// the tool itself
LoKi
::
Interface
<
IParticleValue
>
m_function
;
// the tool itself
int
m_key
;
// optionally write value to extra info with this key
// ======================================================================
}
;
// ========================================================================
...
...
This diff is collapsed.
Click to expand it.
Phys/LoKiPhys/src/Particles44.cpp
+
9
−
5
View file @
447e7e5f
...
...
@@ -18,6 +18,7 @@
// ============================================================================
// LoKiPhys
// ============================================================================
#include
"LoKi/ExtraInfo.h"
#include
"LoKi/Particles44.h"
// ============================================================================
/** @file
...
...
@@ -39,8 +40,8 @@
// constructor from the tool name
// ============================================================================
LoKi
::
Particles
::
Value
::
Value
(
const
std
::
string
&
function
)
:
LoKi
::
AuxFunBase
(
std
::
tie
(
function
)
)
(
const
std
::
string
&
function
,
int
key
)
:
LoKi
::
AuxFunBase
(
std
::
tie
(
function
)
)
,
m_key
(
key
)
{
// 1. get from the context
LoKi
::
ILoKiSvc
*
loki
=
lokiSvc
()
;
...
...
@@ -67,9 +68,9 @@ LoKi::Particles::Value::Value
// constructor from the function
// ============================================================================
LoKi
::
Particles
::
Value
::
Value
(
const
IParticleValue
*
function
)
(
const
IParticleValue
*
function
,
int
key
)
:
LoKi
::
AuxFunBase
{
std
::
tie
()
}
,
m_function
(
function
)
,
m_function
(
function
)
,
m_key
(
key
)
{}
// ============================================================================
// MANDATORY: virtual destructor
...
...
@@ -103,7 +104,10 @@ LoKi::Particles::Value::operator()
return
false
;
// RETURN
}
// use tool
return
m_function
->
operator
()(
p
)
;
auto
v
=
m_function
->
operator
()(
p
)
;
if
(
m_key
>=
0
&&
!
LoKi
::
ExtraInfo
::
hasInfo
(
p
,
m_key
))
LoKi
::
ExtraInfo
::
addInfo
(
p
,
m_key
,
v
);
return
v
;
}
// ============================================================================
// OPTIONAL: the specific printout
...
...
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