Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Joshua Falco Beirer
athena
Commits
8df5c144
Commit
8df5c144
authored
Oct 22, 2021
by
Vakhtang Tsulaia
Browse files
Merge branch 'master-aligncondalgs' into 'master'
Fixes in alignment condition algorithms See merge request
atlas/athena!47509
parents
f8fae691
34c20bee
Changes
7
Hide whitespace changes
Inline
Side-by-side
Calorimeter/CaloAlignment/CaloAlignmentAlgs/src/CaloAlignCondAlg.cxx
View file @
8df5c144
...
...
@@ -30,8 +30,9 @@ StatusCode CaloAlignCondAlg::initialize()
StatusCode
CaloAlignCondAlg
::
execute
()
{
const
EventContext
&
ctx
=
Gaudi
::
Hive
::
currentContext
();
// ____________ Construct Write Cond Handle and check its validity ____________
SG
::
WriteCondHandle
<
CaloDetDescrManager
>
writeCaloMgrHandle
{
m_writeCaloMgrKey
};
SG
::
WriteCondHandle
<
CaloDetDescrManager
>
writeCaloMgrHandle
{
m_writeCaloMgrKey
,
ctx
};
if
(
writeCaloMgrHandle
.
isValid
())
{
ATH_MSG_DEBUG
(
"Found valid write handle"
);
return
StatusCode
::
SUCCESS
;
...
...
@@ -41,7 +42,7 @@ StatusCode CaloAlignCondAlg::execute()
// 1. GeoAlignmentStore
const
GeoAlignmentStore
*
geoAlign
{
nullptr
};
if
(
!
m_readKeyGeoAlign
.
empty
())
{
SG
::
ReadCondHandle
<
GeoAlignmentStore
>
readHandleGeoAlign
{
m_readKeyGeoAlign
};
SG
::
ReadCondHandle
<
GeoAlignmentStore
>
readHandleGeoAlign
{
m_readKeyGeoAlign
,
ctx
};
ATH_CHECK
(
readHandleGeoAlign
.
isValid
());
ATH_MSG_DEBUG
(
"Retrieved GeoAlignmentStore object form the Condition Store"
);
writeCaloMgrHandle
.
addDependency
(
readHandleGeoAlign
);
...
...
@@ -51,7 +52,7 @@ StatusCode CaloAlignCondAlg::execute()
// 2. CaloCellPositionShift
const
CaloRec
::
CaloCellPositionShift
*
cellPosShift
{
nullptr
};
if
(
!
m_readKeyCellPosShift
.
empty
())
{
SG
::
ReadCondHandle
<
CaloRec
::
CaloCellPositionShift
>
readHandleCellPosShift
{
m_readKeyCellPosShift
};
SG
::
ReadCondHandle
<
CaloRec
::
CaloCellPositionShift
>
readHandleCellPosShift
{
m_readKeyCellPosShift
,
ctx
};
ATH_CHECK
(
readHandleCellPosShift
.
isValid
());
ATH_MSG_DEBUG
(
"Retrieved CaloRec::CaloCellPositionShift object form the Condition Store"
);
writeCaloMgrHandle
.
addDependency
(
readHandleCellPosShift
);
...
...
InnerDetector/InDetConditions/PixelConditionsAlgorithms/src/PixelAlignCondAlg.cxx
View file @
8df5c144
...
...
@@ -10,7 +10,7 @@
#include
<memory>
PixelAlignCondAlg
::
PixelAlignCondAlg
(
const
std
::
string
&
name
,
ISvcLocator
*
pSvcLocator
)
:
::
Ath
Reentrant
Algorithm
(
name
,
pSvcLocator
)
:
::
AthAlgorithm
(
name
,
pSvcLocator
)
{
}
...
...
@@ -41,10 +41,11 @@ StatusCode PixelAlignCondAlg::initialize()
return
StatusCode
::
SUCCESS
;
}
StatusCode
PixelAlignCondAlg
::
execute
(
const
EventContext
&
ctx
)
const
StatusCode
PixelAlignCondAlg
::
execute
(
)
{
ATH_MSG_DEBUG
(
"execute "
<<
name
());
const
EventContext
&
ctx
=
Gaudi
::
Hive
::
currentContext
();
// ____________ Construct Write Cond Handle and check its validity ____________
SG
::
WriteCondHandle
<
GeoAlignmentStore
>
writeHandle
{
m_writeKey
,
ctx
};
...
...
InnerDetector/InDetConditions/PixelConditionsAlgorithms/src/PixelAlignCondAlg.h
View file @
8df5c144
...
...
@@ -7,7 +7,7 @@
#ifndef PIXELCONDITIONSALGORITHMS_PIXELALIGNCONDALG_H
#define PIXELCONDITIONSALGORITHMS_PIXELALIGNCONDALG_H
#include
"AthenaBaseComps/Ath
Reentrant
Algorithm.h"
#include
"AthenaBaseComps/AthAlgorithm.h"
#include
"StoreGate/ReadCondHandleKey.h"
#include
"StoreGate/WriteCondHandleKey.h"
...
...
@@ -21,14 +21,14 @@ namespace InDetDD {
class
PixelDetectorManager
;
}
class
PixelAlignCondAlg
:
public
Ath
Reentrant
Algorithm
class
PixelAlignCondAlg
:
public
AthAlgorithm
{
public:
PixelAlignCondAlg
(
const
std
::
string
&
name
,
ISvcLocator
*
pSvcLocator
);
virtual
~
PixelAlignCondAlg
()
override
=
default
;
virtual
StatusCode
initialize
()
override
;
virtual
StatusCode
execute
(
const
EventContext
&
ctx
)
const
override
;
virtual
StatusCode
execute
(
)
override
;
private:
BooleanProperty
m_useDynamicAlignFolders
{
...
...
InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_AlignCondAlg.cxx
View file @
8df5c144
/*
Copyright (C) 2002-202
0
CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-202
1
CERN for the benefit of the ATLAS collaboration
*/
#include
"SCT_AlignCondAlg.h"
...
...
@@ -10,7 +10,7 @@
#include
<memory>
SCT_AlignCondAlg
::
SCT_AlignCondAlg
(
const
std
::
string
&
name
,
ISvcLocator
*
pSvcLocator
)
:
::
Ath
Reentrant
Algorithm
(
name
,
pSvcLocator
)
:
::
AthAlgorithm
(
name
,
pSvcLocator
)
,
m_writeKey
{
"SCTAlignmentStore"
,
"SCTAlignmentStore"
}
,
m_DetManagerName
(
"SCT"
)
{
...
...
@@ -44,10 +44,11 @@ StatusCode SCT_AlignCondAlg::initialize()
return
StatusCode
::
SUCCESS
;
}
StatusCode
SCT_AlignCondAlg
::
execute
(
const
EventContext
&
ctx
)
const
StatusCode
SCT_AlignCondAlg
::
execute
(
)
{
ATH_MSG_DEBUG
(
"execute "
<<
name
());
const
EventContext
&
ctx
=
Gaudi
::
Hive
::
currentContext
();
// ____________ Construct Write Cond Handle and check its validity ____________
SG
::
WriteCondHandle
<
GeoAlignmentStore
>
writeHandle
{
m_writeKey
,
ctx
};
...
...
InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_AlignCondAlg.h
View file @
8df5c144
// -*- C++ -*-
/*
Copyright (C) 2002-201
9
CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-20
2
1 CERN for the benefit of the ATLAS collaboration
*/
#ifndef SCT_CONDITIONSALGORITHMS_SCT_ALIGNCONDALG_H
#define SCT_CONDITIONSALGORITHMS_SCT_ALIGNCONDALG_H
#include
"AthenaBaseComps/Ath
Reentrant
Algorithm.h"
#include
"AthenaBaseComps/AthAlgorithm.h"
#include
"StoreGate/ReadCondHandleKey.h"
#include
"StoreGate/WriteCondHandleKey.h"
...
...
@@ -36,14 +36,14 @@ namespace InDetDD {
// However, we cannot give non-const pointer for SiDetectorElement
// in SCT_DetectorManager in the above chain.
class
SCT_AlignCondAlg
:
public
Ath
Reentrant
Algorithm
class
SCT_AlignCondAlg
:
public
AthAlgorithm
{
public:
SCT_AlignCondAlg
(
const
std
::
string
&
name
,
ISvcLocator
*
pSvcLocator
);
virtual
~
SCT_AlignCondAlg
()
override
=
default
;
virtual
StatusCode
initialize
()
override
;
virtual
StatusCode
execute
(
const
EventContext
&
ctx
)
const
override
;
virtual
StatusCode
execute
(
)
override
;
virtual
StatusCode
finalize
()
override
;
private:
...
...
InnerDetector/InDetConditions/TRT_ConditionsAlgs/src/TRTAlignCondAlg.cxx
View file @
8df5c144
/*
Copyright (C) 2002-202
0
CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-202
1
CERN for the benefit of the ATLAS collaboration
*/
...
...
@@ -58,9 +58,10 @@ StatusCode TRTAlignCondAlg::execute()
{
ATH_MSG_DEBUG
(
"execute "
<<
name
());
const
EventContext
&
ctx
=
Gaudi
::
Hive
::
currentContext
();
// ____________ Construct Write Cond Handles and check their validity ____________
SG
::
WriteCondHandle
<
GeoAlignmentStore
>
writeHandle
{
m_writeKeyAlignStore
};
SG
::
WriteCondHandle
<
InDetDD
::
TRT_DetElementContainer
>
writeHandleDetElCont
{
m_writeKeyDetElCont
};
SG
::
WriteCondHandle
<
GeoAlignmentStore
>
writeHandle
{
m_writeKeyAlignStore
,
ctx
};
SG
::
WriteCondHandle
<
InDetDD
::
TRT_DetElementContainer
>
writeHandleDetElCont
{
m_writeKeyDetElCont
,
ctx
};
if
(
writeHandleDetElCont
.
isValid
())
{
ATH_MSG_DEBUG
(
"CondHandle "
<<
writeHandleDetElCont
.
fullKey
()
<<
" is already valid."
...
...
@@ -95,7 +96,7 @@ StatusCode TRTAlignCondAlg::execute()
// 1. Dynamic folders
// ** Global
SG
::
ReadCondHandle
<
CondAttrListCollection
>
readHandleDynamicGlobal
{
m_readKeyDynamicGlobal
};
SG
::
ReadCondHandle
<
CondAttrListCollection
>
readHandleDynamicGlobal
{
m_readKeyDynamicGlobal
,
ctx
};
// Get CDO and store it into container
const
CondAttrListCollection
*
readCdoDynamicGlobal
{
*
readHandleDynamicGlobal
};
if
(
readCdoDynamicGlobal
==
nullptr
)
{
...
...
@@ -111,7 +112,7 @@ StatusCode TRTAlignCondAlg::execute()
}
// ** Regular
SG
::
ReadCondHandle
<
AlignableTransformContainer
>
readHandleDynamicRegular
{
m_readKeyDynamicRegular
};
SG
::
ReadCondHandle
<
AlignableTransformContainer
>
readHandleDynamicRegular
{
m_readKeyDynamicRegular
,
ctx
};
// Get CDO and store it into container
const
AlignableTransformContainer
*
readCdoDynamicRegular
{
*
readHandleDynamicRegular
};
if
(
readCdoDynamicRegular
==
nullptr
)
{
...
...
@@ -131,7 +132,7 @@ StatusCode TRTAlignCondAlg::execute()
}
else
{
// 2. Regular folder
SG
::
ReadCondHandle
<
AlignableTransformContainer
>
readHandleRegular
{
m_readKeyRegular
};
SG
::
ReadCondHandle
<
AlignableTransformContainer
>
readHandleRegular
{
m_readKeyRegular
,
ctx
};
// Get CDO and store it into container
const
AlignableTransformContainer
*
readCdoRegular
{
*
readHandleRegular
};
if
(
readCdoRegular
==
nullptr
)
{
...
...
LArCalorimeter/LArAlignment/LArAlignmentAlgs/src/LArAlignCondAlg.cxx
View file @
8df5c144
...
...
@@ -28,15 +28,16 @@ StatusCode LArAlignCondAlg::initialize()
StatusCode
LArAlignCondAlg
::
execute
()
{
const
EventContext
&
ctx
=
Gaudi
::
Hive
::
currentContext
();
// ____________ Construct Write Cond Handle and check its validity ____________
SG
::
WriteCondHandle
<
GeoAlignmentStore
>
writeGeoAlignHandle
{
m_writeGeoAlignKey
};
SG
::
WriteCondHandle
<
GeoAlignmentStore
>
writeGeoAlignHandle
{
m_writeGeoAlignKey
,
ctx
};
if
(
writeGeoAlignHandle
.
isValid
())
{
ATH_MSG_DEBUG
(
"Found valid write handle"
);
return
StatusCode
::
SUCCESS
;
}
// ____________ Get Read Cond Object ____________
SG
::
ReadCondHandle
<
DetCondKeyTrans
>
readLArAlignHandle
{
m_readLArAlignKey
};
SG
::
ReadCondHandle
<
DetCondKeyTrans
>
readLArAlignHandle
{
m_readLArAlignKey
,
ctx
};
ATH_CHECK
(
readLArAlignHandle
.
isValid
());
ATH_MSG_DEBUG
(
"Retrieved DetCondKeyTrans object form the Condition Store"
);
writeGeoAlignHandle
.
addDependency
(
readLArAlignHandle
);
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment