ATLAS Offline Software
Loading...
Searching...
No Matches
TriggerEDMDeserialiserAlg.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
10#include "CxxUtils/hexdump.h"
12#include "SGTools/DataProxy.h"
14#include "BareDataBucket.h"
15#include "TBufferFile.h"
16#include "TVirtualCollectionProxy.h"
17#include "TClass.h"
23#include "RootUtils/Type.h"
24
26#include "TriggerEDMCLIDs.h"
27
28#include "TFile.h"
29#include "TStreamerInfo.h"
31
32#include <sys/resource.h>
33#include <cstring>
34#include <regex>
35
36namespace {
37const SG::BaseInfoBase* getBaseInfo(CLID clid) {
39 if (bi){
40 return bi;
41 }
42 // Try to force a dictionary load to get it defined.
43 ServiceHandle<IClassIDSvc> clidsvc("ClassIDSvc", "ProxyProviderSvc");
44 if (!clidsvc.retrieve()){
45 return nullptr;
46 }
47 std::string name;
48 if (!clidsvc->getTypeNameOfID(clid, name).isSuccess()) {
49 return nullptr;
50 }
51 (void)TClass::GetClass(name.c_str());
52 return SG::BaseInfoBase::find(clid);
53}
54} // anonymous namespace
55
61
62
63namespace {
71 const std::type_info* getElementType ( const std::string& tname,
72 std::string& elementTypeName ) {
73 TClass* cls = TClass::GetClass( tname.c_str() );
74 if ( cls == nullptr ) return nullptr;
75 TVirtualCollectionProxy* prox = cls->GetCollectionProxy();
76 if ( prox == nullptr ) return nullptr;
77 if ( prox->GetValueClass() != nullptr ) {
78 elementTypeName = prox->GetValueClass()->GetName();
79 return prox->GetValueClass()->GetTypeInfo();
80 }
81 RootUtils::Type type ( prox->GetType() );
82 elementTypeName = type.getTypeName();
83 return type.getTypeInfo();
84 }
85
89 std::string stripStdVec (const std::string& s_in) {
90 std::string s = s_in;
91 std::string::size_type pos{0};
92 while ((pos = s.find ("std::vector<")) != std::string::npos) {
93 s.erase (pos, 5);
94 }
95 return s;
96 }
97
105 bool versionChange(const std::string& type1, const std::string& type2) {
106 static const std::regex re(".+(_v[0-9]+).*"); // find last _v in string
107 std::smatch m1, m2;
108 return ( std::regex_match(type1, m1, re) and
109 std::regex_match(type2, m2, re) and
110 m1.str(1) != m2.str(1) ); // number 0 is full match
111 }
112
116 struct handleError
117 {
118 using Payload = std::vector<uint32_t>;
119
120 bool operator()(int level, bool /*abort*/, const char* location, const char* /*msg*/) {
121 if ( level >= kError && location && strstr(location, "TBufferFile::ReadClass")) {
122 // Raise soft core dump size limit to hard limit
123 struct rlimit core_limit;
124 getrlimit(RLIMIT_CORE, &core_limit);
125 core_limit.rlim_cur = core_limit.rlim_max;
126 setrlimit(RLIMIT_CORE, &core_limit);
127
128 std::cout << "TriggerEDMDeserialiserAlg: Raising core dump soft size limit to " << core_limit.rlim_cur
129 << " and trying to dump core file..." << std::endl;
130 Athena::DebugAids::coredump(SIGSEGV); // this is non-fatal, job continues
131 }
132
133 if ( level >= kError && location && strstr(location, "TClass::Load")) {
134 std::cout << "TriggerEDMDeserialiserAlg: buff dump; start " << m_start << "\n";
135 CxxUtils::hexdump (std::cout, m_buf, m_bufsize);
136 std::cout << "TriggerEDMDeserialiserAlg: payload dump\n";
137 CxxUtils::hexdump (std::cout, m_payload->data(), m_payload->size() * sizeof(Payload::value_type));
138 }
139
140 return true; // call default handlers
141 }
142
143 handleError (const char* buf, size_t bufsize, const Payload* payload,
144 const void* start)
145 : m_buf (buf), m_bufsize (bufsize), m_payload (payload), m_start(start)
146 {
147 }
148
149 const char* m_buf;
150 size_t m_bufsize;
151 const Payload* m_payload;
152 const void* m_start;
153 };
154
155}
156
165namespace PayloadHelpers {
167
170 return *( start + TDA::CLIDOffset );
171 }
172
174 constexpr size_t nameLength(TDA::PayloadIterator start) {
175 return *( start + TDA::NameLengthOffset );
176 }
177
179 constexpr size_t dataSize(TDA::PayloadIterator start) {
180 return *( start + TDA::NameOffset + nameLength(start) );
181 }
182
189 return start + (*start); // point ahead by the number of words pointed to by start iterator
190 }
191
193 std::vector<std::string> collectionDescription(TDA::PayloadIterator start) {
195 std::vector<std::string> labels;
196 ss.deserialize( start + TDA::NameOffset, start + TDA::NameOffset + nameLength(start), labels );
197 return labels;
198 }
199
201 void toBuffer(TDA::PayloadIterator start, char* buffer) {
202 // move to the beginning of the buffer memory
203 TDA::PayloadIterator dataStart = start + TDA::NameOffset + nameLength(start) + 1 /*skip size*/;
204 // we rely on continuous memory layout of std::vector ...
205 std::memcpy( buffer, &(*dataStart), dataSize(start) );
206 }
207}
208
209std::unique_ptr<TList> TriggerEDMDeserialiserAlg::s_streamerInfoList{};
211
212TriggerEDMDeserialiserAlg::TriggerEDMDeserialiserAlg(const std::string& name, ISvcLocator* pSvcLocator) :
213 AthReentrantAlgorithm(name, pSvcLocator) {}
214
216 ATH_CHECK( m_resultKey.initialize() );
217 ATH_CHECK( m_clidSvc.retrieve() );
218 ATH_CHECK( m_serializerSvc.retrieve() );
219 ATH_CHECK( m_tpTool.retrieve() );
221 return StatusCode::SUCCESS;
222}
223
224
226 s_streamerInfoList.reset();
227 return StatusCode::SUCCESS;
228}
229
230
231StatusCode TriggerEDMDeserialiserAlg::execute(const EventContext& context) const {
232
233 auto resultHandle = SG::makeHandle( m_resultKey, context );
234 if ( not resultHandle.isValid() ) {
235 ATH_MSG_ERROR("Failed to obtain HLTResultMT with key " << m_resultKey.key());
236 return StatusCode::FAILURE;
237 }
238 ATH_MSG_DEBUG("Obtained HLTResultMT with key " << m_resultKey.key());
239
240 const Payload* dataptr = nullptr;
241 if ( resultHandle->getSerialisedData( m_moduleID, dataptr ).isFailure() ) {
242 if ( m_permitMissingModule ) {
243 ATH_MSG_DEBUG("No payload available with moduleId " << m_moduleID << " in this event, ignored");
244 return StatusCode::SUCCESS;
245 } else {
246 ATH_MSG_ERROR("No payload available with moduleId " << m_moduleID << " in this event");
247 return StatusCode::FAILURE;
248 }
249 }
250 ATH_CHECK( deserialise( dataptr ) );
251 return StatusCode::SUCCESS;
252}
253
254StatusCode TriggerEDMDeserialiserAlg::deserialise( const Payload* dataptr ) const {
255
256 size_t buffSize = m_initialSerialisationBufferSize;
257 std::unique_ptr<char[]> buff = std::make_unique<char[]>(buffSize);
258
259 // returns a char* buffer that is at minimum as large as specified in the argument
260 auto resize = [&buffSize, &buff]( const size_t neededSize ) -> void {
261 if ( neededSize > buffSize ) {
262 buffSize = neededSize;
263 buff = std::make_unique<char[]>(buffSize);
264 }
265 };
266
267 // the pointers defined below need to be used in decoding consecutive fragments of xAOD containers:
268 // 1) xAOD interface, 2) Aux store, 3) decorations
269 // invalid conditions are: invalid interface pointer when decoding Aux store
270 // invalid aux store and interface when decoding the decoration
271 // these pointer should be invalidated when: decoding TP containers, aux store when decoding the xAOD interface
272 WritableAuxStore* currentAuxStore = nullptr; // set when decoding Aux
273 SG::AuxVectorBase* xAODInterfaceContainer = nullptr; // set when decoding xAOD interface
274
275 size_t fragmentCount = 0;
276 PayloadIterator start = dataptr->begin();
277 std::string previousKey;
278 while ( start != dataptr->end() ) {
280 const CLID clid{ PayloadHelpers::collectionCLID( start ) };
281 std::string transientTypeName, transientTypeInfoName;
282 ATH_CHECK( m_clidSvc->getTypeNameOfID( clid, transientTypeName ) );
283 ATH_CHECK( m_clidSvc->getTypeInfoNameOfID( clid, transientTypeInfoName ) ); // version
284
285 const std::vector<std::string> descr( PayloadHelpers::collectionDescription( start ) );
286 ATH_CHECK( descr.size() == 2 );
287 std::string persistentTypeName{ descr[0] };
288 const std::string key{ descr[1] };
289 const size_t bsize{ PayloadHelpers::dataSize( start ) };
290
291 if( m_skipDuplicates && evtStore()->contains(clid,m_prefix+key) ) {
292 ATH_MSG_DEBUG("Skipping duplicate record " << m_prefix+key);
293 // Advance
294 start = PayloadHelpers::toNextFragment( start );
295 continue;
296 }
297
298 ATH_MSG_DEBUG( "fragment #" << fragmentCount <<
299 " type: "<< transientTypeName << " (" << transientTypeInfoName << ")" <<
300 " persistent type: " << persistentTypeName << " key: " << key << " size: " << bsize );
301 resize( bsize );
302 PayloadHelpers::toBuffer( start, buff.get() );
303
304 // point the start to the next chunk, irrespectively of what happens in deserialisation below
305 start = PayloadHelpers::toNextFragment( start );
306
307 RootType classDesc = RootType::ByNameNoQuiet( persistentTypeName );
308 ATH_CHECK( classDesc.IsComplete() );
309
310 // Many variables in this class were changed from double to float.
311 // However, we wrote data in the past which contained values
312 // that were valid doubles but which were out of range for floats.
313 // So we can get FPEs when we read them.
314 // Disable FPEs when we're reading an instance of this class.
315 CxxUtils::FPControl fpcontrol;
316 if (persistentTypeName == "xAOD::BTaggingTrigAuxContainer_v1") {
317 fpcontrol.holdExceptions();
318 }
319
320 size_t usedBytes{ bsize };
321 void* obj{ nullptr };
322 {
323 // Temporary error handler to debug ATR-25049
324 RootUtils::WithRootErrorHandler hand( handleError(buff.get(), usedBytes, dataptr, &*start) );
325 obj = m_serializerSvc->deserialize( buff.get(), usedBytes, classDesc );
326 }
327
328 ATH_MSG_DEBUG( "Deserialised object of ptr: " << obj << " which used: " << usedBytes <<
329 " bytes from available: " << bsize );
330 if ( obj == nullptr ) {
331 ATH_MSG_ERROR( "Deserialisation of object of CLID " << clid << " and transientTypeName " <<
332 transientTypeName << " # " << key << " failed" );
333 return StatusCode::FAILURE;
334 }
335 const bool isxAODInterfaceContainer = (transientTypeName.rfind("xAOD", 0) != std::string::npos and
336 transientTypeName.find("Aux") == std::string::npos and
337 transientTypeName.find("ElementLink") == std::string::npos);
338 const bool isxAODAuxContainer = (transientTypeName.rfind("xAOD", 0) != std::string::npos and
339 transientTypeName.find("Aux") != std::string::npos);
340 const bool isxAODDecoration = transientTypeName.find("vector") != std::string::npos;
341 const bool isTPContainer = persistentTypeName.find("_p") != std::string::npos;
342 const bool isVersionChange = versionChange(persistentTypeName, transientTypeInfoName);
343
344 ATH_CHECK( checkSanity( transientTypeName, isxAODInterfaceContainer,
345 isxAODAuxContainer, isxAODDecoration, isTPContainer ) );
346
347 if ( isTPContainer or isVersionChange ) {
348 if ( isVersionChange ) ATH_MSG_DEBUG( "Version change detected from " << persistentTypeName << " to "
349 << transientTypeInfoName << ". Will invoke PT converter." );
350
351 std::string decodedTransientName;
352 void * converted = m_tpTool->convertPT( persistentTypeName, obj, decodedTransientName );
353 ATH_CHECK( converted != nullptr );
354 classDesc.Destruct( obj );
355
356 // from now on in case of T/P class we deal with a new class, the transient one
357 classDesc = RootType::ByNameNoQuiet( transientTypeName );
358 ATH_CHECK( classDesc.IsComplete() );
359 obj = converted;
360 }
361
362 if ( isxAODInterfaceContainer or isxAODAuxContainer or isTPContainer ) {
363 BareDataBucket* dataBucket = new BareDataBucket( obj, clid, classDesc );
364 const std::string outputName = m_prefix + key;
365 auto proxyPtr = evtStore()->recordObject( SG::DataObjectSharedPtr<BareDataBucket>( dataBucket ),
366 outputName, false, false );
367 if ( proxyPtr == nullptr ) {
368 ATH_MSG_WARNING( "Recording of object of CLID " << clid << " and name " << outputName << " failed" );
369 }
370
371 if ( isxAODInterfaceContainer ) {
372 // If the container of the previous iteration was supposed to have an Aux store (trackIndices)
373 // but we didn't find one, then create at least a DataLink with the correct key name.
374 // The EDMCreatorAlg will take care of creating an empty Aux store with the correct type.
375 if (xAODInterfaceContainer!=nullptr &&
376 xAODInterfaceContainer->trackIndices() && currentAuxStore==nullptr) {
377 ATH_MSG_DEBUG("Container with key " << previousKey << " is missing its Aux store");
378 xAODInterfaceContainer->setStore( DataLink<SG::IConstAuxStore>(previousKey+"Aux.") );
379 }
380 currentAuxStore = nullptr; // the store will be following, setting it to nullptr assure we catch issue with of missing Aux
381 const SG::BaseInfoBase* bib = getBaseInfo(clid);
382 if(!bib){
383 ATH_MSG_WARNING("No BaseInfoBase for CLID "<< clid << " and name " << outputName);
384 }
385 xAODInterfaceContainer =
386 bib ? reinterpret_cast<SG::AuxVectorBase*>(
387 bib->cast(dataBucket->object(),
389 : nullptr;
390 } else if (isxAODAuxContainer) {
391 // key contains exactly one '.' at the end
392 ATH_CHECK( key.find('.') == key.size()-1 );
393 ATH_CHECK( currentAuxStore == nullptr and xAODInterfaceContainer != nullptr );
394 const SG::BaseInfoBase* bib = getBaseInfo(clid);
395 SG::IAuxStore* auxHolder =
396 reinterpret_cast<SG::IAuxStore*>(
397 bib->cast(dataBucket->object(), ClassID_traits<SG::IAuxStore>::ID()));
398 ATH_CHECK(auxHolder != nullptr);
399 xAODInterfaceContainer->setStore(auxHolder);
400 currentAuxStore = new WritableAuxStore();
401 dynamic_cast<SG::IAuxStoreHolder*>(auxHolder)->setStore( currentAuxStore );
402 } else {
403 currentAuxStore = nullptr;
404 xAODInterfaceContainer = nullptr; // invalidate xAOD related pointers
405 }
406
407 } else if ( isxAODDecoration ) {
408 if(m_skipDuplicates and (currentAuxStore == nullptr || xAODInterfaceContainer == nullptr)) {
409 ATH_MSG_DEBUG("Decoration " << key << " encountered with no active container. Assume this was already handled.");
410 } else {
411 ATH_CHECK( currentAuxStore != nullptr and xAODInterfaceContainer != nullptr );
412 ATH_CHECK( deserialiseDynAux( transientTypeName, persistentTypeName, key, obj,
413 currentAuxStore, xAODInterfaceContainer ) );
414 }
415 }
416 previousKey = key;
417 }
418 return StatusCode::SUCCESS;
419}
420
421
422
423StatusCode TriggerEDMDeserialiserAlg::deserialiseDynAux( const std::string& transientTypeName, const std::string& persistentTypeName, const std::string& decorationName,
424 void* obj, WritableAuxStore* currentAuxStore, SG::AuxVectorBase* interfaceContainer ) const {
425 const bool isPacked = persistentTypeName.find("SG::PackedContainer") != std::string::npos;
426
428 SG::auxid_t id = registry.findAuxID ( decorationName );
429 if (id != SG::null_auxid ) {
430 std::string regTypeName = stripStdVec( registry.getVecTypeName(id) );
431 if ( regTypeName != stripStdVec(transientTypeName) and transientTypeName.find("ElementLink") == std::string::npos )
432 {
433 // Before giving up, also translate any typedefs in the transient name.
434 RootUtils::Type tname (transientTypeName);
435 if ( regTypeName != stripStdVec(tname.getTypeName()) ) {
436 ATH_MSG_INFO( "Schema evolution required for decoration \"" << decorationName << "\" from " << transientTypeName << " to " << registry.getVecTypeName( id ) << " not handled yet");
437 return StatusCode::SUCCESS;
438 }
439 }
440 } else {
441 std::string elementTypeName;
442 const std::type_info* elt_tinfo = getElementType( transientTypeName, elementTypeName );
443 ATH_CHECK( elt_tinfo != nullptr );
444 ATH_MSG_DEBUG( "Dynamic decoration: \"" << decorationName << "\" of type " << transientTypeName << " will create a dynamic ID, stored type" << elementTypeName );
445 id = SG::getDynamicAuxID ( *elt_tinfo, decorationName, elementTypeName, transientTypeName, false, SG::null_auxid );
446 }
447 ATH_MSG_DEBUG( "Unstreaming decoration \"" << decorationName << "\" of type " << transientTypeName << " aux ID " << id << " class " << persistentTypeName << " packed " << isPacked );
448 std::unique_ptr<SG::IAuxTypeVector> vec( registry.makeVectorFromData (id, obj, nullptr, isPacked, true) );
449 ATH_CHECK( vec.get() != nullptr );
450 ATH_MSG_DEBUG("Size for \"" << decorationName << "\" " << vec->size() << " interface " << interfaceContainer->size_v() );
451 ATH_CHECK( vec->size() == interfaceContainer->size_v() );
452 if ( vec->size() != 0 ) {
453 ATH_CHECK( currentAuxStore != nullptr );
454 currentAuxStore->addVector(std::move(vec), false);
455 // trigger loading of the dynamic variables
456 SG::AuxElement::TypelessConstAccessor accessor( decorationName );
457 accessor.getDataArray( *interfaceContainer );
458 }
459 return StatusCode::SUCCESS;
460}
461
462StatusCode TriggerEDMDeserialiserAlg::checkSanity( const std::string& transientTypeName, bool isxAODInterfaceContainer, bool isxAODAuxContainer, bool isDecoration, bool isTPContainer ) const {
463 ATH_MSG_DEBUG( "Recognised type " << transientTypeName <<" as: "
464 << (isxAODInterfaceContainer ? "xAOD Interface Container":"" )
465 << (isxAODAuxContainer ? "xAOD Aux Container ":"" )
466 << ( isDecoration ? "xAOD Decoration" : "")
467 << ( isTPContainer ? "T/P Container " : "") );
468
469 const std::vector<bool> typeOfContainer( { isxAODInterfaceContainer, isxAODAuxContainer, isDecoration, isTPContainer } );
470 const size_t count = std::count( typeOfContainer.begin(), typeOfContainer.end(), true );
471 if ( count == 0 ) {
472 ATH_MSG_ERROR( "Could not recognise the kind of container " << transientTypeName );
473 return StatusCode::FAILURE;
474 }
475 if (count > 1 ) {
476 ATH_MSG_ERROR( "Ambiguous container kind deduced from the transient type name " << transientTypeName );
477 ATH_MSG_ERROR( "Recognised type as: "
478 << (isxAODInterfaceContainer ? "xAOD Interface Context":"" )
479 << (isxAODAuxContainer ? " xAOD Aux Container ":"" )
480 << ( isDecoration ? "xAOD Decoration" : "")
481 << ( isTPContainer ? "T/P Container " : "") );
482 return StatusCode::FAILURE;
483 }
484 return StatusCode::SUCCESS;
485}
486
487
489 std::lock_guard<std::mutex> lock(s_mutex);
490
491 if (s_streamerInfoList) {
492 return;
493 }
494
495 std::string extStreamerInfos = "bs-streamerinfos.root";
496 std::string extFilePath = PathResolver::find_file(extStreamerInfos, "DATAPATH");
497 ATH_MSG_DEBUG( "Using " << extFilePath );
498 TFile extFile(extFilePath.c_str());
499
500 s_streamerInfoList = std::unique_ptr<TList>(extFile.GetStreamerInfoList());
501 for(const auto&& infObj: *s_streamerInfoList) {
502 TString t_name=infObj->GetName();
503 if (t_name.BeginsWith("listOfRules")){
504 ATH_MSG_WARNING( "Could not re-load class " << t_name );
505 continue;
506 }
507
508 TStreamerInfo* inf = dynamic_cast<TStreamerInfo*>(infObj);
509 inf->BuildCheck();
510 TClass *cl = inf->GetClass();
511 if (cl != nullptr) {
512 ATH_MSG_DEBUG( "external TStreamerInfo for " << cl->GetName() <<
513 " checksum: " << std::hex << inf->GetCheckSum() << std::dec );
514 }
515 }
516}
const boost::regex re(r_e)
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x)
#define ATH_MSG_INFO(x)
#define ATH_MSG_WARNING(x)
#define ATH_MSG_DEBUG(x)
An auxiliary data store that holds data internally.
Handle mappings between names and auxid_t.
Basic definitions for auxiliary types.
std::vector< size_t > vec
uint32_t CLID
The Class ID type.
Helper to control FP exceptions.
static Double_t ss
TTypeAdapter RootType
Definition RootType.h:211
This are the SEAL debug aids, adapted to build in Atlas, after the drop of that project.
This is the signal handler from SEAL, adapted to build in Atlas, after the drop of that project.
convert to and from a SG storable
int fragmentCount(uint32_t data, int id)
Wrapper for ROOT types.
Run a MT piece of code with an alternate root error handler.
An algorithm that can be simultaneously executed in multiple threads.
static void coredump(int sig,...)
Drop a core dump and continue.
Allows to insert void* returned from serialisation into the store.
virtual void * object() override
static std::string find_file(const std::string &logical_file_name, const std::string &search_path)
Wrapper for ROOT types.
Definition Type.h:40
std::string getTypeName() const
Return the name of this type.
Definition Type.cxx:329
Run a MT piece of code with an alternate root error handler.
ConstAuxElement::TypelessConstAccessor TypelessConstAccessor
Definition AuxElement.h:567
An auxiliary data store that holds data internally.
void addVector(std::unique_ptr< IAuxTypeVector > vec, bool isDecoration)
Explicitly add a vector to the store.
Handle mappings between names and auxid_t.
SG::auxid_t findAuxID(const std::string &name, const std::string &clsname="") const
Look up a name -> auxid_t mapping.
std::unique_ptr< IAuxTypeVector > makeVectorFromData(SG::auxid_t auxid, void *data, IAuxTypeVector *linkedVector, bool isPacked, bool ownFlag) const
Construct an IAuxTypeVector object from a vector.
std::string getVecTypeName(SG::auxid_t auxid) const
Return the type of the STL vector used to hold an aux data item.
static AuxTypeRegistry & instance()
Return the singleton registry instance.
Manage index tracking and synchronization of auxiliary data.
void setStore(SG::IAuxStore *store)
Set the store associated with this object.
bool trackIndices() const
Return true if index tracking is enabled for this container.
virtual size_t size_v() const =0
Return the size of the container.
The non-template portion of the BaseInfo implementation.
static const BaseInfoBase * find(CLID clid)
Find the BaseInfoBase instance for clid.
Definition BaseInfo.cxx:570
void * cast(void *p, CLID clid) const
Cast to a base pointer.
Definition BaseInfo.cxx:166
Interface for objects taking part in direct ROOT I/O.
Interface for non-const operations on an auxiliary store.
Definition IAuxStore.h:48
Utility class (not a tool or so) to serialize strings into stream of 32bit integers.
static TScopeAdapter ByNameNoQuiet(const std::string &name, Bool_t load=kTRUE)
Definition RootType.cxx:586
void Destruct(void *place) const
Definition RootType.cxx:677
Bool_t IsComplete() const
Definition RootType.cxx:895
void addVector(std::unique_ptr< IAuxTypeVector > vec, bool isDecoration)
Explicitly add a vector to the store.
from the HLTResultMT Each serialised collection is a chunk of words with the content as described bel...
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 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.
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
virtual StatusCode execute(const EventContext &context) const override
Find the auxid for a dynamic branch.
bool contains(const std::string &s, const std::string &regx)
does a string contain the substring
Definition hcg.cxx:114
int count(std::string s, const std::string &regx)
count how many occurances of a regx are in a string
Definition hcg.cxx:146
Helpers to make a nice dump of a region of memory.
TStreamerInfo * inf
void hexdump(std::ostream &s, const void *addr, size_t n, size_t offset=0)
Make a hex dump of memory.
Definition hexdump.cxx:37
Collection of helper functions for raw pointer operations on the bytestream payload.
constexpr TDA::PayloadIterator toNextFragment(TDA::PayloadIterator start)
Returns starting point of the next fragment, can be == end()
constexpr size_t dataSize(TDA::PayloadIterator start)
Size in bytes of the buffer that is needed to decode next fragment data content.
std::vector< std::string > collectionDescription(TDA::PayloadIterator start)
String description of the collection stored in the next fragment, returns persistent type name and th...
TriggerEDMDeserialiserAlg TDA
constexpr CLID collectionCLID(TDA::PayloadIterator start)
CLID of the collection stored in the next fragment.
constexpr size_t nameLength(TDA::PayloadIterator start)
Length of the serialised name payload.
void toBuffer(TDA::PayloadIterator start, char *buffer)
Copies fragment to the buffer, no size checking, use dataSize to do so.
static const auxid_t null_auxid
To signal no aux data item.
Definition AuxTypes.h:30
CxxUtils::RefCountedPtr< T > DataObjectSharedPtr
SG::auxid_t getDynamicAuxID(const std::type_info &ti, const std::string &name, const std::string &elementTypeName, const std::string &branch_type_name, bool standalone, SG::auxid_t linked_auxid)
Find the auxid for a dynamic branch.
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
size_t auxid_t
Identifier for a particular aux data item.
Definition AuxTypes.h:27