ATLAS Offline Software
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 
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
28 class TBuffer;
29 class TList;
30 class MsgStream;
31 
32 #include "DataModelRoot/RootType.h"
33 typedef RootType Type;
35 
36 
38 public:
39  TrigTSerializer(const std::string& name, const std::string& type,
40  const IInterface* parent);
41  virtual ~TrigTSerializer();
42 
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 
61 private:
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);
65  void add_previous_streamerinfos();
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>" };
88  static std::vector<std::string> s_dictsToIgnore;
89 
92 };
93 
94 #undef REFLEX_NS
95 
96 
97 #endif
Member
RootDataMember Member
Definition: TrigTSerializer.h:34
TrigTSerializer::m_streamersList
TList * m_streamersList
Remember streamer info list for cleaning up later.
Definition: TrigTSerializer.h:91
python.tests.PyTestsLib.finalize
def finalize(self)
_info( "content of StoreGate..." ) self.sg.dump()
Definition: PyTestsLib.py:50
TrigTSerializer::m_errCount
std::map< std::string, uint32_t > m_errCount
Definition: TrigTSerializer.h:81
ATLAS_NOT_THREAD_SAFE
#define ATLAS_NOT_THREAD_SAFE
getNoisyStrip() Find noisy strips from hitmaps and write out into xml/db formats
Definition: checker_macros.h:212
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
initialize
void initialize()
Definition: run_EoverP.cxx:894
HLT::StringSerializer::serialize
void serialize(const std::vector< std::string > &strings, std::vector< uint32_t > &storage)
Definition: TrigEvent/TrigNavStructure/Root/StringSerializer.cxx:31
ITrigSerializerToolBase.h
TrigTSerializer::s_dictsToIgnore
static std::vector< std::string > s_dictsToIgnore
static copy of the IgnoreMissingDicts property for the static error handler
Definition: TrigTSerializer.h:88
python.iconfTool.models.loaders.level
level
Definition: loaders.py:20
TrigTSerializer::s_decodingError
static bool s_decodingError
Definition: TrigTSerializer.h:79
instance
std::map< std::string, double > instance
Definition: Run_To_Get_Tags.h:8
Type
RootType Type
Definition: TrigTSerializer.h:30
TMemberAdapter
Definition: RootType.h:60
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthAlgTool.h
test_pyathena.parent
parent
Definition: test_pyathena.py:15
pool_uuid.guid
guid
Definition: pool_uuid.py:112
ITrigSerializer::setCLID
virtual void setCLID(const uint32_t *guid)=0
access clid of the payload virtual CLID getCLID() const = 0;
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
HLT::StringSerializer::deserialize
std::size_t deserialize(std::vector< uint32_t >::const_iterator first, std::vector< uint32_t >::const_iterator last, std::vector< std::string > &strings)
Definition: TrigEvent/TrigNavStructure/Root/StringSerializer.cxx:66
TrigTSerializer::m_onlineMode
bool m_onlineMode
Definition: TrigTSerializer.h:75
python.PyAthena.v
v
Definition: PyAthena.py:154
ITrigSerializer::initClass
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...
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
CxxUtils::reset
constexpr std::enable_if_t< is_bitmask_v< E >, E & > reset(E &lhs, E rhs)
Convenience function to clear bits in a class enum bitmask.
Definition: bitmask.h:251
RootType.h
ITrigSerializerToolBase
Definition: ITrigSerializerToolBase.h:88
AthAlgTool
Definition: AthAlgTool.h:26
checker_macros.h
Define macros for attributes used to control the static checker.
ITrigSerializer::peekCLID
virtual StatusCode peekCLID(const std::vector< uint32_t > &v, uint32_t *guid) const =0
access clid of the payload (stored in BS)
python.AutoConfigFlags.msg
msg
Definition: AutoConfigFlags.py:7
TrigTSerializer
Definition: TrigTSerializer.h:37
TScopeAdapter
Definition: RootType.h:119