#include <Blob2ToolConstants.h>
Definition at line 22 of file Blob2ToolConstants.h.
◆ StoreGateSvc_t
◆ Blob2ToolConstants()
| Blob2ToolConstants::Blob2ToolConstants |
( |
const std::string & | type, |
|
|
const std::string & | name, |
|
|
const IInterface * | parent ) |
◆ AttrListToToolConstants()
| StatusCode Blob2ToolConstants::AttrListToToolConstants |
( |
const coral::AttributeList & | attrList, |
|
|
CaloRec::ToolConstants & | tc ) const |
Method convert AttributeList->ToolConstants (reading)
- Parameters
-
| attrList | Reference to coral::AttributeList (source) |
| [out] | tc | Reference to ToolConstants object (destination) |
| mLog | MessageStream for logging |
- Returns
- True if successful, False otherwise
Uses a ROOT streamer to serialize the underlying Array class
Definition at line 78 of file Blob2ToolConstants.cxx.
78 {
79
81 std::unique_ptr<T> map;
82
83 try {
86 const unsigned blobVersion=attrList[
"blobVersion"].data<
unsigned int>();
87 const coral::Blob&
blob = attrList[
"Constants"].data<coral::Blob>();
88
89 if (blobVersion!=0) {
91 return StatusCode::FAILURE;
92 }
93
94 TClass*
klass = TClass::GetClass (
"std::map<std::string, CaloRec::Arrayrep>");
95 if (klass==nullptr) {
96 msg(MSG::ERROR) <<
"Can't find TClass std::map<std::string, CaloRec::Arrayrep>" <<
endmsg;
97 return StatusCode::FAILURE;
98 }
99 else
100 msg(MSG::DEBUG) <<
"Got TClass std::map<std::string, CaloRec::Arrayrep>" <<
endmsg;
101
102
104 TBufferFile
buf (TBuffer::kRead,
blob.size(), blob_start,
false);
105 map.reset( (T*)
buf.ReadObjectAny (klass) );
106 }catch (coral::AttributeListException &e) {
108 return StatusCode::FAILURE;
109 }
110
111 T::const_iterator
it=map->begin();
112 T::const_iterator it_e=map->end();
113 for (;
it!=it_e;++
it) {
114 tc.setrep(
it->first,
it->second);
115 }
116 return StatusCode::SUCCESS;
117}
char data[hepevt_bytes_allocation_ATLAS]
#define ATLAS_THREAD_SAFE
◆ declareGaudiProperty()
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
158 {
161 hndl.documentation());
162
163 }
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
◆ declareProperty()
Definition at line 145 of file AthCommonDataStore.h.
145 {
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
◆ detStore()
◆ evtStore()
◆ extraDeps_update_handler()
Add StoreName to extra input/output deps as needed.
use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given
◆ initialize()
| StatusCode Blob2ToolConstants::initialize |
( |
| ) |
|
|
virtual |
◆ inputHandles()
Return this algorithm's input handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ interfaceID()
| const InterfaceID & Blob2ToolConstants::interfaceID |
( |
| ) |
|
|
static |
◆ msg()
◆ msgLvl()
| bool AthCommonMsg< AlgTool >::msgLvl |
( |
const MSG::Level | lvl | ) |
const |
|
inlineinherited |
◆ nameToChannelNumber()
| uint32_t Blob2ToolConstants::nameToChannelNumber |
( |
const std::string & | name | ) |
|
|
static |
Method to create a channel number (hash)
- Parameters
-
| name | of the channel (usually the Tool name) |
- Returns
- channel number
Uses SG::crc64 method as hash-function (only lower 32bits uses)
Definition at line 119 of file Blob2ToolConstants.cxx.
119 {
122
123 return hash32;
124 }
uint64_t crc64(const CRCTable &table, const char *data, size_t data_len)
Find the CRC-64 of a string,.
std::uint64_t hash64(const void *data, std::size_t size)
Passthrough to XXH3_64bits.
◆ outputHandles()
Return this algorithm's output handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ renounce()
Definition at line 380 of file AthCommonDataStore.h.
381 {
384 }
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)
◆ renounceArray()
◆ sysInitialize()
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ ToolConstantsToAttrList()
Method convert ToolConstants -> AttributeList (writing)
- Parameters
-
| tc | Pointer to ToolConstants object |
| mLog | MessageStream for logging |
- Returns
- Pointer to AttributeList (owned by client)
Uses a ROOT streamer to serialize the underlying Array class
Definition at line 34 of file Blob2ToolConstants.cxx.
34 {
35
36 coral::AttributeListSpecification*
spec =
new coral::AttributeListSpecification();
37
38 spec->extend(
"clsname",
"string");
39 spec->extend(
"version",
"unsigned int");
40 spec->extend(
"blobVersion",
"unsigned int");
41 spec->extend(
"Constants",
"blob");
42
43
44 auto attrList = std::make_unique<coral::AttributeList>(*spec);
45
47
49
50 (*attrList)[
"clsname"].data<std::string>()=
tc->clsname();
51 (*attrList)[
"version"].data<
unsigned int>()=(
unsigned int)
tc->version();
52 (*attrList)["blobVersion"].data<unsigned int>()=(unsigned int)0;
53
54 coral::Blob&
blob=(*attrList)[
"Constants"].data<coral::Blob>();
55
56
57 TClass*
klass = TClass::GetClass (
"std::map<std::string, CaloRec::Arrayrep>");
58 if (klass==nullptr) {
59 msg( MSG::ERROR) <<
"Can't find TClass std::map<std::string, CaloRec::Arrayrep>" <<
endmsg;
60 return nullptr;
61 }
62 else
63 msg(MSG::DEBUG) <<
"Got TClass std::map<std::string, CaloRec::Arrayrep>" <<
endmsg;
64
65 TBufferFile
buf (TBuffer::kWrite);
66
67 if (
buf.WriteObjectAny (&
tc->map(), klass) != 1) {
68 msg(MSG::ERROR) <<
"Failed to stream CaloRec::ToolConstants::Maptype " <<
endmsg;
69 return nullptr;
70 }
71
73 void* adr =
blob.startingAddress();
74 memcpy(adr,
buf.Buffer(),
buf.Length());
75 return attrList.release();
76 }
◆ updateVHKA()
Definition at line 308 of file AthCommonDataStore.h.
308 {
309
310
313 for (
auto k :
keys) {
315 }
316 }
317 }
std::vector< SG::VarHandleKeyArray * > m_vhka
◆ m_detStore
◆ m_evtStore
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files: