ATLAS Offline Software
xAODTrigNavigationAuxInfoCnv.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 // $Id: xAODTrigNavigationAuxInfoCnv.cxx 710840 2015-11-26 08:45:42Z will $
6 
7 // System include(s):
8 #include <stdexcept>
9 
10 #ifndef XAOD_ANALYSIS
11 #include "AthenaKernel/ITrigNavigationThinningSvc.h" //thinning only possible in full athena
14 #include "GaudiKernel/ThreadLocalContext.h"
15 #endif
16 
17 // EDM include(s):
19 
20 
21 
22 // Local include(s):
25 
27 xAODTrigNavigationAuxInfoCnv( ISvcLocator* svcLoc )
29 
30 }
31 
35  const std::string& /*key*/) {
36 
38 #ifndef XAOD_ANALYSIS
39  const ITrigNavigationThinningSvc* thinningSvc = nullptr;
40  // Try to find the thinning service.
41  if (const SG::ThinningCache* cache = SG::getThinningCache()) {
42  thinningSvc = cache->trigNavigationThinningSvc();
43  }
44  if ( thinningSvc ) {
45  ATH_MSG_DEBUG("Doing TrigNavigation slimming");
46  xAOD::TrigNavigation wrapper;
47  wrapper.setStore(result);
48  std::vector< unsigned int > temp;
49  const EventContext& ctx = Gaudi::Hive::currentContext();
50  if ( thinningSvc->doSlimming(ctx, temp).isFailure() ) {
51  ATH_MSG_WARNING("Failed to slim and store Trigger Navigation data in the output xAODTrigNavigation object");
52  }
53  wrapper.setSerialized(temp);
54  wrapper.setStore((const SG::IConstAuxStore*)nullptr);
55  } else {
56  ATH_MSG_DEBUG("No TrigNavigation slimming");
57  *result = *trans;
58  }
59 #else
60  //no navigation thinning in analysis releases
61  *result = *trans;
62 #endif
63 
64  return result;
65 }
66 
get_generator_info.result
result
Definition: get_generator_info.py:21
xAODTrigNavigationAuxInfoCnv::xAODTrigNavigationAuxInfoCnv
xAODTrigNavigationAuxInfoCnv(ISvcLocator *svcLoc)
Converter constructor.
Definition: xAODTrigNavigationAuxInfoCnv.cxx:27
xAOD::TrigNavigationAuxInfo
TrigNavigationAuxInfo_v1 TrigNavigationAuxInfo
Define the latest version of the trigger navigation auxiliary information class.
Definition: TrigNavigationAuxInfo.h:17
T_AthenaPoolAuxContainerCnv
Athena pool converter for aux store classes.
Definition: T_AthenaPoolAuxContainerCnv.h:39
ITrigNavigationThinningSvc.h
Define interface for doing TrigNavigation thinning.
xAOD::TrigNavigation_v1::setSerialized
void setSerialized(const std::vector< unsigned int > &value)
sets the serialized form of the navigation from the argument
xAODTrigNavigationAuxInfoCnv::createPersistentWithKey
virtual xAOD::TrigNavigationAuxInfo * createPersistentWithKey(xAOD::TrigNavigationAuxInfo *trans, const std::string &key) override
Function preparing the container to be written out.
Definition: xAODTrigNavigationAuxInfoCnv.cxx:34
TrigNavigation.h
copyAuxStoreThinned.h
Helper to copy an aux store while applying thinning.
SG::AuxElement::setStore
void setStore(const SG::IConstAuxStore *store)
Set the store associated with this object.
Definition: AuxElement.cxx:221
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
getThinningCache.h
Helpers to retrieve the current thinning cache from the event context.
ITrigNavigationThinningSvc
Define interface for doing TrigNavigation thinning.
Definition: ITrigNavigationThinningSvc.h:31
SG::getThinningCache
const SG::ThinningCache * getThinningCache(const EventContext &ctx)
Retrieve the current thinning cache from the event context.
Definition: getThinningCache.cxx:28
ITrigNavigationThinningSvc::doSlimming
virtual StatusCode doSlimming(const EventContext &ctx, std::vector< uint32_t > &slimmed_and_serialized) const =0
Return slimmed data for TrigNavigation.
xAODTrigNavigationAuxInfoCnv.h
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
xAOD::TrigNavigationAuxInfo_v1
Class holding the data handled by TrigNavigation_v1 (bsaed on the TrigDecision_v1) This is the auxili...
Definition: TrigNavigationAuxInfo_v1.h:32
xAOD::TrigNavigation_v1
Interface to the raw trigger navigation information of the event.
Definition: TrigNavigation_v1.h:34
SG::IConstAuxStore
Interface for const operations on an auxiliary store.
Definition: IConstAuxStore.h:64
SG::ThinningCache
Cache thinning decisions for converters.
Definition: ThinningCache.h:48
ThinningCache.h