ATLAS Offline Software
Trigger
TrigSteer
ViewAlgs
src
lib
IDCCacheCreatorBase.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
ViewAlgs/IDCCacheCreatorBase.h
"
6
#include "
AthViews/View.h
"
7
8
bool
IDCCacheCreatorBase::isInsideView
(
const
EventContext& context)
const
9
{
10
const
IProxyDict
*
proxy
=
Atlas::getExtendedEventContext
(context).proxy();
11
const
SG::View
*
view
=
dynamic_cast<
const
SG::View
*
>
(
proxy
);
12
return
view
!=
nullptr
;
13
}
14
15
IDCCacheCreatorBase::IDCCacheCreatorBase
(
const
std::string &
name
,ISvcLocator *pSvcLocator) :
16
AthReentrantAlgorithm
(
name
,pSvcLocator)
17
{
18
19
}
20
21
StatusCode
IDCCacheCreatorBase::checkInsideViewOnce
(
const
EventContext& ctx)
const
22
{
23
if
(!m_disableWarningCheck.test_and_set(std::memory_order_relaxed)){
//Only check once
24
if
(
isInsideView
(ctx)){
25
ATH_MSG_ERROR
(
"CacheCreator is running inside a view, this is probably a misconfiguration"
);
26
return
StatusCode::FAILURE;
27
}
28
}
29
return
StatusCode::SUCCESS;
30
}
StateLessPT_NewConfig.proxy
proxy
Definition:
StateLessPT_NewConfig.py:392
IDCCacheCreatorBase::checkInsideViewOnce
StatusCode checkInsideViewOnce(const EventContext &) const
Definition:
IDCCacheCreatorBase.cxx:21
IProxyDict
A proxy dictionary.
Definition:
AthenaKernel/AthenaKernel/IProxyDict.h:51
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition:
AthReentrantAlgorithm.h:83
Atlas::getExtendedEventContext
const ExtendedEventContext & getExtendedEventContext(const EventContext &ctx)
Retrieve an extended context from a context object.
Definition:
ExtendedEventContext.cxx:32
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition:
AthMsgStreamMacros.h:33
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition:
PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
IDCCacheCreatorBase.h
name
std::string name
Definition:
Control/AthContainers/Root/debug.cxx:195
IDCCacheCreatorBase::IDCCacheCreatorBase
IDCCacheCreatorBase(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
Definition:
IDCCacheCreatorBase.cxx:15
View.h
SG::View
Definition:
View.h:25
IDCCacheCreatorBase::isInsideView
bool isInsideView(const EventContext &) const
Definition:
IDCCacheCreatorBase.cxx:8
drawFromPickle.view
view
Definition:
drawFromPickle.py:294
Generated on Thu Jul 4 2024 21:17:06 for ATLAS Offline Software by
1.8.18