ATLAS Offline Software
Loading...
Searching...
No Matches
TrigTSerializer.h
Go to the documentation of this file.
1// -*- C++ -*-
2
3/*
4 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
5*/
6
7
12
13
14#ifndef TRIGTSERIALIZER_H
15#define TRIGTSERIALIZER_H
16
17#include "Gaudi/Property.h"
21#include "RVersion.h"
22#include "Rtypes.h"
23#include "TError.h"
24#include <string>
25#include <map>
26
27//forward decl
28class TBuffer;
29class TList;
30class MsgStream;
31
33typedef RootType Type;
35
36
38public:
39 TrigTSerializer(const std::string& name, const std::string& type,
40 const IInterface* parent);
41 virtual ~TrigTSerializer();
42
43 StatusCode initialize();
44 StatusCode finalize();
45
46 std::vector<uint32_t> serialize(const std::string &nameOfClass, const void* instance);
47
48 void serialize(const std::string &nameOfClass, const void* instance, std::vector<uint32_t> &v);
49
50 void* deserialize(const std::string &nameOfClass, const std::vector<uint32_t>& v);
51
52 StatusCode initClass(const std::string &nameOfClass) const;
53
54 //reset Serializer internal data between running serialize methods with unrelated data
55 void reset();
56
57 StatusCode peekCLID(const std::vector<uint32_t>& v, uint32_t *guid) const;
58
59 void setCLID(const uint32_t *guid);
60
61private:
62 void do_persistify(const std::string& nameOfClass, void* instance);
63 void do_persistify_obj(const std::string& nameOfClass, void* instance);
64 void do_follow_ptr(const std::string& nameOfClass, void* instance);
66
67 static bool streamerErrorHandler(Int_t level, Bool_t abort_bool,
68 const char* location, const char *msg);
69 static bool bsDictWarningFilter(Int_t level, Bool_t abort_bool,
70 const char* location, const char *msg);
71
72 void prepareForTBuffer(const std::string &nameOfClass);
73 void restoreAfterTBuffer(const std::string &nameOfClass);
74
76 uint32_t m_guid[4];
77
78 // for error handling
79 static bool s_decodingError;
80 uint32_t m_IgnoreErrLvl{};
81 std::map<std::string, uint32_t> m_errCount;
82
84 StringArrayProperty m_ignoreMissingDicts {
85 this, "IgnoreMissingDicts", {},
86 "Suppress warining about missing dictionaries", "OrderedSet<std::string>" };
87
88 static std::vector<std::string> s_dictsToIgnore;
89
92};
93
94#undef REFLEX_NS
95
96
97#endif
TMemberAdapter RootDataMember
Definition RootType.h:208
TTypeAdapter RootType
Definition RootType.h:211
std::map< std::string, double > instance
RootDataMember Member
Define macros for attributes used to control the static checker.
#define ATLAS_NOT_THREAD_SAFE
getNoisyStrip() Find noisy strips from hitmaps and write out into xml/db formats
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
MsgStream & msg() const
AlgTool interface of a serializer implementation.
virtual StatusCode initClass(const std::string &nameOfClass) const =0
initialize framework to be ready to serialize a given class method to be called to prevent delayed in...
virtual StatusCode peekCLID(const std::vector< uint32_t > &v, uint32_t *guid) const =0
access clid of the payload (stored in BS)
virtual void reset()=0
clean internal serializer state.
virtual void serialize(const std::string &nameOfClass, const void *instance, std::vector< uint32_t > &v)=0
serializes an object of a class nameOfClass pointed to by instance and recursively also other objects...
virtual void * deserialize(const std::string &nameOfClass, const std::vector< uint32_t > &v)=0
deserializes an object of a class nameOfClass (and recursively other objects) found in std::vector<ui...
virtual void setCLID(const uint32_t *guid)=0
access clid of the payload virtual CLID getCLID() const = 0;
uint32_t m_IgnoreErrLvl
StatusCode finalize()
TList * m_streamersList
Remember streamer info list for cleaning up later.
StringArrayProperty m_ignoreMissingDicts
IgnoreMissingDicts.
static bool s_decodingError
void add_previous_streamerinfos()
static bool bsDictWarningFilter(Int_t level, Bool_t abort_bool, const char *location, const char *msg)
std::map< std::string, uint32_t > m_errCount
void restoreAfterTBuffer(const std::string &nameOfClass)
void prepareForTBuffer(const std::string &nameOfClass)
void do_persistify(const std::string &nameOfClass, void *instance)
void do_persistify_obj(const std::string &nameOfClass, void *instance)
uint32_t m_guid[4]
static bool streamerErrorHandler(Int_t level, Bool_t abort_bool, const char *location, const char *msg)
TrigTSerializer(const std::string &name, const std::string &type, const IInterface *parent)
void do_follow_ptr(const std::string &nameOfClass, void *instance)
void initialize()