ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
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
}
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition
AthMsgStreamMacros.h:33
IDCCacheCreatorBase.h
View.h
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition
AthReentrantAlgorithm.h:74
IDCCacheCreatorBase::IDCCacheCreatorBase
IDCCacheCreatorBase(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
Definition
IDCCacheCreatorBase.cxx:15
IDCCacheCreatorBase::checkInsideViewOnce
StatusCode checkInsideViewOnce(const EventContext &) const
Definition
IDCCacheCreatorBase.cxx:21
IDCCacheCreatorBase::isInsideView
bool isInsideView(const EventContext &) const
Definition
IDCCacheCreatorBase.cxx:8
IProxyDict
A proxy dictionary.
Definition
AthenaKernel/AthenaKernel/IProxyDict.h:47
SG::View
A "view" of the event store (IProxyDict).
Definition
View.h:46
Atlas::getExtendedEventContext
const ExtendedEventContext & getExtendedEventContext(const EventContext &ctx)
Retrieve an extended context from a context object.
Definition
ExtendedEventContext.cxx:32
Generated on
for ATLAS Offline Software by
1.17.0