Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
Lbcom
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
Lbcom
Commits
2d286ed0
Commit
2d286ed0
authored
6 years ago
by
Marco Cattaneo
Browse files
Options
Downloads
Plain Diff
Merge branch 'sponce_useNewCounters' into 'master'
Use new counters See merge request
!284
parents
230e3b04
e00c687a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!284
Use new counters
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
ST/STAlgorithms/src/STClusterKiller.cpp
+12
-14
12 additions, 14 deletions
ST/STAlgorithms/src/STClusterKiller.cpp
ST/STAlgorithms/src/STClusterKiller.h
+6
-4
6 additions, 4 deletions
ST/STAlgorithms/src/STClusterKiller.h
with
18 additions
and
18 deletions
ST/STAlgorithms/src/STClusterKiller.cpp
+
12
−
14
View file @
2d286ed0
...
...
@@ -15,7 +15,7 @@ STClusterKiller::STClusterKiller( const std::string& name,
{
declareProperty
(
"SelectorType"
,
m_selectorType
=
"STSelectClustersByChannel"
);
declareSTConfigProperty
(
"InputLocation"
,
m_inputLocation
,
STClusterLocation
::
TTClusters
);
declareSTConfigProperty
(
"InputLocation"
,
m_inputLocation
,
STClusterLocation
::
TTClusters
);
declareSTConfigProperty
(
"SelectorName"
,
m_selectorName
,
detType
()
+
"Killer"
);
}
...
...
@@ -33,16 +33,16 @@ StatusCode STClusterKiller::initialize()
StatusCode
STClusterKiller
::
execute
()
{
STClusters
*
clusterCont
=
get
<
STClusters
>
(
m_inputLocation
);
// make list of clusters to remove
std
::
vector
<
STChannelID
>
chanList
;
chanList
.
reserve
(
100
);
removedClusters
(
clusterCont
,
chanList
);
// remove from the container
std
::
vector
<
STChannelID
>::
reverse_iterator
iterVec
=
chanList
.
rbegin
();
std
::
vector
<
STChannelID
>::
reverse_iterator
iterVec
=
chanList
.
rbegin
();
for
(;
iterVec
!=
chanList
.
rend
();
++
iterVec
){
clusterCont
->
erase
(
*
iterVec
);
}
// iterVec
...
...
@@ -61,25 +61,23 @@ void STClusterKiller::removedClusters(const LHCb::STClusters* clusterCont,
const
bool
select
=
(
*
m_clusterSelector
)(
*
iterC
);
if
(
select
==
true
){;
deadClusters
.
push_back
((
*
iterC
)
->
key
());
++
counter
(
"Dead"
)
;
++
m_deadCnt
;
}
++
counter
(
"P
rocessed
"
)
;
++
m_p
rocessed
Cnt
;
}
// iterC
}
StatusCode
STClusterKiller
::
finalize
()
{
const
double
dead
=
counter
(
"Dead"
).
flag
();
const
double
processed
=
counter
(
"Processed"
).
flag
();
const
double
dead
=
m_deadCnt
.
nEntries
();
const
double
processed
=
m_processedCnt
.
nEntries
();
double
killed
=
0.0
;
if
(
!
LHCb
::
Math
::
Equal_To
<
double
>
()(
processed
,
0.0
)){
killed
=
dead
/
processed
;
double
killed
=
0.0
;
if
(
!
LHCb
::
Math
::
Equal_To
<
double
>
()(
processed
,
0.0
)){
killed
=
dead
/
processed
;
}
info
()
<<
"Fraction of clusters killed "
<<
100
*
killed
<<
" %"
<<
endmsg
;
return
ST
::
AlgBase
::
finalize
();
}
This diff is collapsed.
Click to expand it.
ST/STAlgorithms/src/STClusterKiller.h
+
6
−
4
View file @
2d286ed0
...
...
@@ -8,7 +8,7 @@
/** @class STClusterKiller STClusterKiller.h
*
* Class for killing clusters
* Class for killing clusters
*
* @author M.Needham
* @date 06/10/2007
...
...
@@ -23,9 +23,9 @@ namespace LHCb{
class
STClusterKiller
:
public
ST
::
AlgBase
{
public:
// Constructor
STClusterKiller
(
const
std
::
string
&
name
,
ISvcLocator
*
pSvcLocator
);
STClusterKiller
(
const
std
::
string
&
name
,
ISvcLocator
*
pSvcLocator
);
// IAlgorithm members
StatusCode
initialize
()
override
;
...
...
@@ -33,7 +33,7 @@ public:
StatusCode
finalize
()
override
;
private:
void
removedClusters
(
const
LHCb
::
STClusters
*
clusterCont
,
std
::
vector
<
LHCb
::
STChannelID
>&
deadClusters
)
const
;
...
...
@@ -45,6 +45,8 @@ private:
std
::
string
m_inputLocation
;
mutable
Gaudi
::
Accumulators
::
Counter
<>
m_deadCnt
{
this
,
"Dead"
};
mutable
Gaudi
::
Accumulators
::
Counter
<>
m_processedCnt
{
this
,
"Processed"
};
};
#endif // STCLUSTERKILLER_H
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