ATLAS Offline Software
setConverterLibrary.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
13 #include "Gaudi/PluginService.h"
14 #include "TClass.h"
15 
16 
17 using namespace Gaudi::PluginService;
18 
19 
20 namespace DMTest {
21 
22 
23 void setPluginLibrary ATLAS_NOT_THREAD_SAFE (const std::string& name, const std::string& lib)
24 {
25  const Details::Registry& reg = Details::Registry::instance();
26  Details::Registry::FactoryMap& map =
27  const_cast<Details::Registry::FactoryMap&>(reg.factories());
29  if (i == map.end())
30  map.insert (std::make_pair (name, Details::Registry::FactoryInfo{lib}));
31  else
32  i->second = Details::Registry::FactoryInfo{lib};
33 }
34 
35 
36 void setConverterLibrary ATLAS_NOT_THREAD_SAFE (CLID clid, const std::string& lib)
37 {
38  std::string name = "CNV_256_" + std::to_string (clid);
39  setPluginLibrary (name, lib);
40 }
41 
42 
43 void setConverterLibrary ATLAS_NOT_THREAD_SAFE (const std::string& lib)
44 {
45  setConverterLibrary (9631, lib); // DMTest::BDer
46  setConverterLibrary (9632, lib); // DMTest::DDer
47  setConverterLibrary (9633, lib); // DataVector<DMTest::B>
48  setConverterLibrary (9634, lib); // DataVector<DMTest::D>
49  setConverterLibrary (9639, lib); // DMTest::ELVec
50  setConverterLibrary (9721, lib); // DMTest::CVec_v1
51  setConverterLibrary (9722, lib); // DMTest::CAuxContainer_v1
52  setConverterLibrary (9723, lib); // DMTest::CInfoAuxContainer_v1
53  setConverterLibrary (9724, lib); // DMTest::C_v1
54  setConverterLibrary (9725, lib); // DMTest::CTrigAuxContainer_v1
55  setConverterLibrary (9741, lib); // DMTest::GVec_v1
56  setConverterLibrary (9742, lib); // DMTest::GAuxContainer_v1
57  setConverterLibrary (9744, lib); // DMTest::G_v1
58  setConverterLibrary (9779, lib); // DMTest::CView_v1
59  setConverterLibrary (9841, lib); // DMTest::AllocTestContainer
60  setConverterLibrary (9842, lib); // DMTest::AllocTestAuxContainer
61  setConverterLibrary (9844, lib); // DMTest::AllocTest
62  setConverterLibrary (243020043, lib); // DMTest::S1
63  setConverterLibrary (243020042, lib); // DMTest::S2
64  setPluginLibrary ("_PERS_DMTest::HVec_v1", lib);
65  setPluginLibrary ("_PERS_DataVector<DMTest::H_v1>", lib);
66 }
67 
68 
69 void setTrigConverterLibrary ATLAS_NOT_THREAD_SAFE (CLID clid, const std::string& lib)
70 {
71  std::string name = "CNV_81_" + std::to_string (clid);
72  setPluginLibrary (name, lib);
73 }
74 
75 
76 void setTrigConverterLibrary ATLAS_NOT_THREAD_SAFE (const std::string& lib)
77 {
78  setTrigConverterLibrary (9781, lib); // DMTest::HVec
79  setTrigConverterLibrary (9782, lib); // DMTest::HAuxContainer
80  setTrigConverterLibrary (9787, lib); // DMTest::HView
81 }
82 
83 
84 } // namespace DMTest
85 
86 
87 TClass* xclass (const char* s)
88 {
89  return TClass::GetClass(s);
90 }
91 
92 
93 
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
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
instance
std::map< std::string, double > instance
Definition: Run_To_Get_Tags.h:8
xclass
TClass * xclass(const char *s)
Definition: setConverterLibrary.cxx:87
lumiFormat.i
int i
Definition: lumiFormat.py:85
CLID
uint32_t CLID
The Class ID type.
Definition: Event/xAOD/xAODCore/xAODCore/ClassID_traits.h:47
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
ActsTrk::to_string
std::string to_string(const DetectorType &type)
Definition: GeometryDefs.h:34
setConverterLibrary.h
Helper to explicitly set library for a converter.
DMTest
Definition: B.h:23