Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
athena
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
Peter Sherwood
athena
Commits
c87f3beb
Commit
c87f3beb
authored
6 years ago
by
Siarhei Harkusha
Browse files
Options
Downloads
Patches
Plain Diff
TileRecAlgs: Make Tile digits filter algorithm reentrant
parent
b44657fb
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
TileCalorimeter/TileRecAlgs/src/TileDigitsFilter.cxx
+10
-9
10 additions, 9 deletions
TileCalorimeter/TileRecAlgs/src/TileDigitsFilter.cxx
TileCalorimeter/TileRecAlgs/src/TileDigitsFilter.h
+18
-20
18 additions, 20 deletions
TileCalorimeter/TileRecAlgs/src/TileDigitsFilter.h
with
28 additions
and
29 deletions
TileCalorimeter/TileRecAlgs/src/TileDigitsFilter.cxx
+
10
−
9
View file @
c87f3beb
/*
/*
Copyright (C) 2002-201
7
CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-201
9
CERN for the benefit of the ATLAS collaboration
*/
*/
//*****************************************************************************
//*****************************************************************************
...
@@ -35,11 +35,9 @@
...
@@ -35,11 +35,9 @@
// Constructor
// Constructor
//
//
TileDigitsFilter
::
TileDigitsFilter
(
std
::
string
name
,
ISvcLocator
*
pSvcLocator
)
TileDigitsFilter
::
TileDigitsFilter
(
std
::
string
name
,
ISvcLocator
*
pSvcLocator
)
:
AthAlgorithm
(
name
,
pSvcLocator
)
:
Ath
Reentrant
Algorithm
(
name
,
pSvcLocator
)
,
m_tileHWID
(
0
)
,
m_tileHWID
(
0
)
{
{
declareProperty
(
"LowGainThereshold"
,
m_threshold
[
0
]
=
0
);
// keep all LG except zeros
declareProperty
(
"HighGainThereshold"
,
m_threshold
[
1
]
=
10
);
// keep signals above ~128(106) MeV in A,BC(D) samplings
}
}
TileDigitsFilter
::~
TileDigitsFilter
()
{
TileDigitsFilter
::~
TileDigitsFilter
()
{
...
@@ -58,6 +56,9 @@ StatusCode TileDigitsFilter::initialize() {
...
@@ -58,6 +56,9 @@ StatusCode TileDigitsFilter::initialize() {
ATH_MSG_INFO
(
"Input raw channel container: '"
<<
m_inputRawChannelContainerKey
.
key
()
ATH_MSG_INFO
(
"Input raw channel container: '"
<<
m_inputRawChannelContainerKey
.
key
()
<<
"' output container: '"
<<
m_outputRawChannelContainerKey
.
key
()
<<
"'"
);
<<
"' output container: '"
<<
m_outputRawChannelContainerKey
.
key
()
<<
"'"
);
m_threshold
[
0
]
=
m_lowGainThreashold
;
m_threshold
[
1
]
=
m_highGainThreashold
;
ATH_MSG_INFO
(
"Threshold low gain: "
<<
m_threshold
[
0
]
ATH_MSG_INFO
(
"Threshold low gain: "
<<
m_threshold
[
0
]
<<
" counts, high gain: "
<<
m_threshold
[
1
]
<<
" counts"
);
<<
" counts, high gain: "
<<
m_threshold
[
1
]
<<
" counts"
);
...
@@ -87,7 +88,7 @@ StatusCode TileDigitsFilter::initialize() {
...
@@ -87,7 +88,7 @@ StatusCode TileDigitsFilter::initialize() {
//
//
// Begin Execution Phase.
// Begin Execution Phase.
//
//
StatusCode
TileDigitsFilter
::
execute
(
)
{
StatusCode
TileDigitsFilter
::
execute
(
const
EventContext
&
ctx
)
const
{
ATH_MSG_DEBUG
(
"in execute()"
);
ATH_MSG_DEBUG
(
"in execute()"
);
...
@@ -108,7 +109,7 @@ StatusCode TileDigitsFilter::execute() {
...
@@ -108,7 +109,7 @@ StatusCode TileDigitsFilter::execute() {
// Get digit container from TES
// Get digit container from TES
if
(
!
m_inputDigitsContainerKey
.
key
().
empty
())
{
if
(
!
m_inputDigitsContainerKey
.
key
().
empty
())
{
SG
::
ReadHandle
<
TileDigitsContainer
>
inputDigitsContainer
(
m_inputDigitsContainerKey
);
SG
::
ReadHandle
<
TileDigitsContainer
>
inputDigitsContainer
(
m_inputDigitsContainerKey
,
ctx
);
if
(
inputDigitsContainer
.
isValid
())
{
if
(
inputDigitsContainer
.
isValid
())
{
collItr
=
inputDigitsContainer
->
begin
();
collItr
=
inputDigitsContainer
->
begin
();
...
@@ -127,7 +128,7 @@ StatusCode TileDigitsFilter::execute() {
...
@@ -127,7 +128,7 @@ StatusCode TileDigitsFilter::execute() {
// Get rawChannel container from TES
// Get rawChannel container from TES
if
(
!
m_inputRawChannelContainerKey
.
key
().
empty
())
{
if
(
!
m_inputRawChannelContainerKey
.
key
().
empty
())
{
SG
::
ReadHandle
<
TileRawChannelContainer
>
inputRawChannelContainer
(
m_inputRawChannelContainerKey
);
SG
::
ReadHandle
<
TileRawChannelContainer
>
inputRawChannelContainer
(
m_inputRawChannelContainerKey
,
ctx
);
if
(
inputRawChannelContainer
.
isValid
())
{
if
(
inputRawChannelContainer
.
isValid
())
{
collRchItr
=
firstRchColl
=
inputRawChannelContainer
->
begin
();
collRchItr
=
firstRchColl
=
inputRawChannelContainer
->
begin
();
...
@@ -240,7 +241,7 @@ StatusCode TileDigitsFilter::execute() {
...
@@ -240,7 +241,7 @@ StatusCode TileDigitsFilter::execute() {
if
(
!
m_outputDigitsContainerKey
.
key
().
empty
())
{
if
(
!
m_outputDigitsContainerKey
.
key
().
empty
())
{
// register new container in the TES
// register new container in the TES
SG
::
WriteHandle
<
TileDigitsContainer
>
outputDigitsContainer
(
m_outputDigitsContainerKey
);
SG
::
WriteHandle
<
TileDigitsContainer
>
outputDigitsContainer
(
m_outputDigitsContainerKey
,
ctx
);
ATH_CHECK
(
outputDigitsContainer
.
record
(
std
::
move
(
outputCont
))
);
ATH_CHECK
(
outputDigitsContainer
.
record
(
std
::
move
(
outputCont
))
);
ATH_MSG_DEBUG
(
"TileDigitsContainer registered successfully ("
<<
m_outputDigitsContainerKey
.
key
()
<<
")"
);
ATH_MSG_DEBUG
(
"TileDigitsContainer registered successfully ("
<<
m_outputDigitsContainerKey
.
key
()
<<
")"
);
...
@@ -249,7 +250,7 @@ StatusCode TileDigitsFilter::execute() {
...
@@ -249,7 +250,7 @@ StatusCode TileDigitsFilter::execute() {
if
(
!
m_outputRawChannelContainerKey
.
key
().
empty
())
{
if
(
!
m_outputRawChannelContainerKey
.
key
().
empty
())
{
// register new container in the TES
// register new container in the TES
SG
::
WriteHandle
<
TileRawChannelContainer
>
outputRawChannelContainer
(
m_outputRawChannelContainerKey
);
SG
::
WriteHandle
<
TileRawChannelContainer
>
outputRawChannelContainer
(
m_outputRawChannelContainerKey
,
ctx
);
ATH_CHECK
(
outputRawChannelContainer
.
record
(
std
::
move
(
outRchCont
))
);
ATH_CHECK
(
outputRawChannelContainer
.
record
(
std
::
move
(
outRchCont
))
);
ATH_MSG_DEBUG
(
"TileRawChannelContainer registered successfully ("
ATH_MSG_DEBUG
(
"TileRawChannelContainer registered successfully ("
...
...
This diff is collapsed.
Click to expand it.
TileCalorimeter/TileRecAlgs/src/TileDigitsFilter.h
+
18
−
20
View file @
c87f3beb
/*
/*
Copyright (C) 2002-201
7
CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-201
9
CERN for the benefit of the ATLAS collaboration
*/
*/
//****************************************************************************
//****************************************************************************
...
@@ -37,7 +37,7 @@
...
@@ -37,7 +37,7 @@
#include
"TileEvent/TileRawChannelContainer.h"
#include
"TileEvent/TileRawChannelContainer.h"
// Atlas includes
// Atlas includes
#include
"AthenaBaseComps/AthAlgorithm.h"
#include
"AthenaBaseComps/Ath
Reentrant
Algorithm.h"
#include
"StoreGate/ReadHandleKey.h"
#include
"StoreGate/ReadHandleKey.h"
#include
"StoreGate/WriteHandleKey.h"
#include
"StoreGate/WriteHandleKey.h"
...
@@ -51,7 +51,7 @@ class TileHWID;
...
@@ -51,7 +51,7 @@ class TileHWID;
@brief This algorithm copies TileDigits from input container to output container
@brief This algorithm copies TileDigits from input container to output container
keeping only channels with (max-min) sample above threshold
keeping only channels with (max-min) sample above threshold
*/
*/
class
TileDigitsFilter
:
public
AthAlgorithm
{
class
TileDigitsFilter
:
public
Ath
Reentrant
Algorithm
{
public:
public:
// Constructor
// Constructor
TileDigitsFilter
(
std
::
string
name
,
ISvcLocator
*
pSvcLocator
);
TileDigitsFilter
(
std
::
string
name
,
ISvcLocator
*
pSvcLocator
);
...
@@ -60,31 +60,29 @@ class TileDigitsFilter: public AthAlgorithm {
...
@@ -60,31 +60,29 @@ class TileDigitsFilter: public AthAlgorithm {
virtual
~
TileDigitsFilter
();
virtual
~
TileDigitsFilter
();
//Gaudi Hooks
//Gaudi Hooks
StatusCode
initialize
();
//!< initialize method
virtual
StatusCode
initialize
()
override
;
//!< initialize method
StatusCode
execute
(
)
;
//!< execute method
virtual
StatusCode
execute
(
const
EventContext
&
ctx
)
const
override
;
//!< execute method
StatusCode
finalize
();
//!< finalize method
virtual
StatusCode
finalize
()
override
;
//!< finalize method
private:
private:
std
::
string
m_inputContainer
;
//!< Name of the input TileDigitsContainer
std
::
string
m_outputContainer
;
//!< Name of the output TileDigitsContainer
std
::
string
m_inRchContainer
;
//!< Name of the input TileRawChannelContainer
std
::
string
m_outRchContainer
;
//!< Name of the output TileRawChannelContainer
SG
::
ReadHandleKey
<
TileDigitsContainer
>
m_inputDigitsContainerKey
{
this
,
"InputDigitsContainer"
,
SG
::
ReadHandleKey
<
TileDigitsContainer
>
m_inputDigitsContainerKey
{
this
,
"TileDigitsCnt"
,
"Input Tile digits container key"
};
"InputDigitsContainer"
,
"TileDigitsCnt"
,
"Input Tile digits container key"
};
SG
::
WriteHandleKey
<
TileDigitsContainer
>
m_outputDigitsContainerKey
{
this
,
"OutputDigitsContainer"
,
SG
::
WriteHandleKey
<
TileDigitsContainer
>
m_outputDigitsContainerKey
{
this
,
"TileDigitsFlt"
,
"Output Tile digits container key"
};
"OutputDigitsContainer"
,
"TileDigitsFlt"
,
"Output Tile digits container key"
};
SG
::
ReadHandleKey
<
TileRawChannelContainer
>
m_inputRawChannelContainerKey
{
this
,
"InputRawChannelContainer"
,
"TileRawChannelCnt"
,
"Input Tile raw channels container key"
};
SG
::
ReadHandleKey
<
TileRawChannelContainer
>
m_inputRawChannelContainerKey
{
this
,
"InputRawChannelContainer"
,
SG
::
WriteHandleKey
<
TileRawChannelContainer
>
m_outputRawChannelContainerKey
{
this
,
"TileRawChannelCnt"
,
"OutputRawChannelContainer"
,
"TileRawChannelFlt"
,
"Output Tile digits container key"
};
"Input Tile raw channels container key"
};
SG
::
WriteHandleKey
<
TileRawChannelContainer
>
m_outputRawChannelContainerKey
{
this
,
"OutputRawChannelContainer"
,
Gaudi
::
Property
<
int
>
m_lowGainThreashold
{
this
,
"TileRawChannelFlt"
,
"LowGainThereshold"
,
0
,
"Low gain threshold to keep digits"
};
// keep all LG except zeros
"Output Tile digits container key"
};
Gaudi
::
Property
<
int
>
m_highGainThreashold
{
this
,
"HighGainThereshold"
,
10
,
"High gain threshold to keep digits"
};
// keep signals above ~128(106) MeV in A,BC(D) samplings
const
TileHWID
*
m_tileHWID
;
const
TileHWID
*
m_tileHWID
;
...
...
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