ATLAS Offline Software
Loading...
Searching...
No Matches
TriggerEDMDeserialiserAlg.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3*/
4#ifndef TRIGOUTPUTHANDLING_TRIGGEREDMDESERIALISERALG_H
5#define TRIGOUTPUTHANDLING_TRIGGEREDMDESERIALISERALG_H
6
7#include <string>
8
9#include "GaudiKernel/IClassIDSvc.h"
14
15#include "TList.h"
16
17
27
29public:
30 class WritableAuxStore;
31
32 using Payload = std::vector<uint32_t>;
33 using PayloadIterator = Payload::const_iterator;
34 static constexpr size_t CLIDOffset = 1;
35 static constexpr size_t NameLengthOffset = 2;
36 static constexpr size_t NameOffset = 3;
37 static std::unique_ptr<TList> s_streamerInfoList ATLAS_THREAD_SAFE;
38 static std::mutex s_mutex;
39
40 TriggerEDMDeserialiserAlg(const std::string& name, ISvcLocator* pSvcLocator);
41 virtual ~TriggerEDMDeserialiserAlg() override = default;
42
43 virtual StatusCode initialize() override;
44 virtual StatusCode execute(const EventContext& context) const override;
45 virtual StatusCode finalize() override;
46
47private:
48 friend StatusCode tester( TriggerEDMDeserialiserAlg* );
49
51
52 SG::ReadHandleKey<HLT::HLTResultMT> m_resultKey { this, "ResultKey", "HLTResultMT",
53 "Key of the HLT result object" };
54 Gaudi::Property<std::string> m_prefix{ this, "Prefix", "",
55 "Set for testing to avoid clash with the input collections" };
56 Gaudi::Property<int> m_moduleID{ this, "ModuleID", 0,
57 "Module ID of HLT result ROB, default 0 is the main HLT result, others are for TLA, calibration etc." };
58 Gaudi::Property<int> m_initialSerialisationBufferSize{ this, "InitialSerialisationBufferSize", 1024*1024,
59 "Initial serialisation buffer size in bytes, can be set large to avoid reallocations in every event" };
60 Gaudi::Property<bool> m_skipDuplicates{ this, "SkipDuplicateRecords", false,
61 "Silently ignore collections that ware already in StoreGate (when handling multiple HLT results)" };
62 Gaudi::Property<bool> m_permitMissingModule{ this, "PermitMissingModule", false,
63 "Silently ignore absent HLT results (when handling multiple HLT results)" };
64
65 ServiceHandle<IClassIDSvc> m_clidSvc{ this, "ClassIDSvc", "ClassIDSvc",
66 "Service to translate CLID to class name" };
67
68 ServiceHandle<IAthenaSerializeSvc> m_serializerSvc{ this, "Serializer", "AthenaRootSerializeSvc",
69 "Service that translates persistent to transient representation" };
70
71 ToolHandle<TrigSerTPTool> m_tpTool{ this, "TPTool", "TrigSerTPTool/TrigSerTPTool",
72 "Tool to do Transient/Persistent conversion (Old EDM)"};
73
77 StatusCode deserialise( const Payload* dataptr ) const;
78
82 StatusCode deserialiseDynAux( const std::string& transientTypeName, const std::string& persistentTypeName,
83 const std::string& decorationName, void* obj,
84 WritableAuxStore* currentAuxStore, SG::AuxVectorBase* interface ) const;
85
90 StatusCode checkSanity( const std::string& transientTypeName, bool isxAODInterfaceContainer,
91 bool isxAODAuxContainer, bool isDecoration, bool isTPContainer ) const;
92
93};
94
95#endif // TRIGOUTPUTHANDLING_TRIGGEREDMDESERIALISERALG_H
An algorithm that can be simultaneously executed in multiple threads.
Manage index tracking and synchronization of auxiliary data.
Property holding a SG store/key/clid from which a ReadHandle is made.
virtual StatusCode initialize() override
Gaudi::Property< int > m_initialSerialisationBufferSize
Gaudi::Property< bool > m_permitMissingModule
static constexpr size_t CLIDOffset
Payload::const_iterator PayloadIterator
static constexpr size_t NameLengthOffset
static constexpr size_t NameOffset
ServiceHandle< IAthenaSerializeSvc > m_serializerSvc
SG::ReadHandleKey< HLT::HLTResultMT > m_resultKey
virtual ~TriggerEDMDeserialiserAlg() override=default
virtual StatusCode finalize() override
ToolHandle< TrigSerTPTool > m_tpTool
Gaudi::Property< std::string > m_prefix
StatusCode deserialiseDynAux(const std::string &transientTypeName, const std::string &persistentTypeName, const std::string &decorationName, void *obj, WritableAuxStore *currentAuxStore, SG::AuxVectorBase *interface) const
Handle decoration.
static std::unique_ptr< TList > s_streamerInfoList ATLAS_THREAD_SAFE
TriggerEDMDeserialiserAlg(const std::string &name, ISvcLocator *pSvcLocator)
Gaudi::Property< bool > m_skipDuplicates
StatusCode checkSanity(const std::string &transientTypeName, bool isxAODInterfaceContainer, bool isxAODAuxContainer, bool isDecoration, bool isTPContainer) const
Checker for data integrity, one and only one of the passed booleans can be true, else FAILURE is retu...
StatusCode deserialise(const Payload *dataptr) const
Performs actual deserialisation loop.
ServiceHandle< IClassIDSvc > m_clidSvc
friend StatusCode tester(TriggerEDMDeserialiserAlg *)
virtual StatusCode execute(const EventContext &context) const override