ATLAS Offline Software
Holder.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #include <sstream>
6 #include <boost/regex.hpp>
7 #include <tbb/concurrent_unordered_map.h>
8 
10 #include "TrigNavigation/Holder.h"
11 #include "TrigAuxStore.h"
18 
21 #include "SGTools/StlVectorClids.h"
22 #include "CxxUtils/ClassName.h"
23 #include "GaudiKernel/IConversionSvc.h"
24 #include "RootUtils/Type.h"
25 #include "TClass.h"
26 #include "TROOT.h"
27 #include "TVirtualCollectionProxy.h"
28 
29 
30 using namespace HLTNavDetails;
31 
32 
33 /*****************************************************************************
34  *
35  * INNER CLASS (fatures handling)
36  *
37  *****************************************************************************/
39  : m_serializer("TrigTSerializer/TrigTSerializer")
40 {}
41 
42 IHolder::IHolder(const std::string& prefix, const std::string& label, uint16_t idx )
43  : m_prefix(prefix),
44  m_label(label),
45  m_subTypeIndex(idx),
46  m_serializer("TrigTSerializer/TrigTSerializer")
47 {
48 }
49 
50 
52  if ( m_aux ) { delete m_aux; }
53 }
54 
55 void IHolder::prepare(const asg::AsgMessaging& logger, HLT::AccessProxy* sg, IConversionSvc* objSerializer, bool readonly) {
56  m_storeGate = sg;
57  m_logger = &logger;
58  m_objectserializerSvc = objSerializer;
59  m_readonly = readonly;
60 }
61 
62 bool IHolder::serialize(std::vector<uint32_t>& output) const {
63 
64  ATH_MSG_DEBUG("Holder<T> serialize, " << *this );
65  // if feature to be forgotten then indication of it is simply 0 size of serialized vector
66 
67  output.push_back( typeClid() );
68  output.push_back( m_subTypeIndex );
69 
70  // label
71  std::vector<uint32_t> serializedLabel;
72  StringSerializer ss;
73  ss.serialize( m_label, serializedLabel );
74  output.push_back( serializedLabel.size() );
75  output.insert(output.end(), serializedLabel.begin(), serializedLabel.end());
76  return true;
77 }
78 
80  std::vector<uint32_t>& output,
81  size_t& payloadsize) {
82  bool header_ser = serialize(output);
83  if(!header_ser){
84  ATH_MSG_ERROR(" header serialization failed ");
85  return false;
86  }
87  std::vector<uint32_t> payload;
88  bool payload_ser = serializePayload(payload, sel);
89  if(!payload_ser){
90  ATH_MSG_ERROR(" payload serialization failed ");
91  return false;
92  }
93  payloadsize = payload.size();
94  output.insert(output.end(), payload.begin(), payload.end());
95  return true;
96 }
97 
98 std::string IHolder::generateAliasKey(CLID c, uint16_t sti, const std::string& label, unsigned size) {
99  std::ostringstream ss;
100  ss << "HLTAutoKey_" << label << "_" << c << "_" << sti << "_" << (size == 0xffffffff ? "back" : "to") << "_" << m_uniqueCounter;
101  std::string st = ss.str();
102  ATH_MSG_DEBUG("IHolder::generateAliasKey generated key: " << st);
103  m_uniqueCounter++;
104  return st;
105 }
106 
107 void IHolder::print(MsgStream& m) const {
108  m << "type: " << typeName() << "(" << typeClid() << ")" << " container: " << collectionName() << "(" << containerClid() << ")"
109  << "label: \"" << label() << "\" subTypeIndex: " << subTypeIndex();
110 }
111 
112 MsgStream& HLTNavDetails::operator<< ( MsgStream& m, const HLTNavDetails::IHolder& h ) {
113  h.print (m);
114  return m;
115 }
116 
117 // only construct the regex once
118 namespace HLTNavDetails {
119  const boost::regex rx1("_v[0-9]+$");
120 }
121 
122 std::string HLTNavDetails::formatSGkey(const std::string& prefix, const std::string& containername, const std::string& label){
123  // Memoize already used keys
124  static tbb::concurrent_unordered_map<std::string,std::string> memo ATLAS_THREAD_SAFE;
125  const std::string key = prefix+containername+label;
126 
127  const auto itr = memo.find(key);
128  if (itr!=memo.end()) return itr->second;
129 
130  // Remove version
131  std::string ret = boost::regex_replace(containername,rx1,std::string(""));
132 
133  // Replace :: with __
134  size_t pos = ret.find("::");
135  if (pos!=std::string::npos) ret.replace(pos,2,"__");
136 
137  // Add prefix and label
138  ret = prefix + "_" + ret;
139  if (label == "Aux.")
140  ret += label;
141  else if (!label.empty())
142  ret += ("_" + label);
143 
144  memo.insert({key, ret});
145  return ret;
146 }
147 
148 bool HLTNavDetails::IHolder::deserializePayload(const std::vector<uint32_t>& dataBlob, int version){
149  const std::string sgkey = key();
150  ::HLT::class_id_type feature_clid = typeClid();
151  ::HLT::class_id_type container_clid = containerClid();
152  const std::string container_typename = collectionName();
153 
154  if ( m_storeGate->transientContains(container_clid, sgkey) ) {
155  ATH_MSG_VERBOSE("deserialize: while working on: " << container_typename << " and key: " << sgkey
156  << " from serialized form found it in SG already, sync with it");
157  syncWithSG();
158  }
159 
160  ATH_MSG_VERBOSE("deserializing a data blob of size " << dataBlob.size() << " navi version is " << version);
161  ATH_MSG_DEBUG("holder type clid " << feature_clid<< " collection clid: " << container_clid);
162 
163  if (container_clid<1){
164  ATH_MSG_WARNING("holder type clid " << feature_clid << " collection clid: " << container_clid);
165  }
166 
167  typedef std::vector<uint32_t>::const_iterator it_type;
168  it_type it = std::begin(dataBlob);
169 
170  if(!dataBlob.size()) return false;
171 
172  std::vector<uint32_t> first, second;
173 
174  if(version == 4){
175  auto firstsize = *(it++);
176  ATH_MSG_VERBOSE("first part has size: " << firstsize);
177 
178  first = std::vector<uint32_t>(it,it+firstsize);
179 
180  std::advance(it,firstsize);
181 
182  if(!(it!=dataBlob.end())){
183  ATH_MSG_VERBOSE("this datablob only has a first part (non xAOD case)");
184  }
185  else{
186  auto secondsize = *(it++);
187  ATH_MSG_VERBOSE("second part has size: " << secondsize);
188  second = std::vector<uint32_t>(it,it+secondsize);
189  std::advance(it,secondsize);
190  }
191  }
192  else{
193  first = std::vector<uint32_t>(dataBlob.begin(),dataBlob.end());
194  }
195 
196  TrigStreamAddress addr(container_clid, sgkey, "", 0, 0);
197  addr.add(first);
198  DataObject* dobj(0);
199 
200  if (m_objectserializerSvc->createObj((IOpaqueAddress*)&addr, dobj).isFailure() ){
201  ATH_MSG_WARNING("deserialize main: failed");
202  return false;
203  }
204 
205  bool setcontainer = setDataObject(dobj);
206  if (DataBucketBase* dbb = dynamic_cast<DataBucketBase*> (dobj)) {
207  dbb->relinquish();
208  delete dbb;
209  }
210  if(!setcontainer) return false;
211 
212  DataObject* dobjaux(0);
213  if(!second.empty()){
214  std::string sgkeyaux = sgkey+"Aux.";
215  ATH_MSG_VERBOSE("aux clid was deduced to be: " << auxClidOrZero());
216  TrigStreamAddress auxaddr(auxClidOrZero(), sgkeyaux, "", 0, 0);
217  auxaddr.add(second);
218 
219  if (m_objectserializerSvc->createObj((IOpaqueAddress*)&auxaddr, dobjaux).isFailure() ){
220  ATH_MSG_WARNING("Aux Store deserialization failed");
221  return false;
222  }
223 
224  // Handle dynamic variables.
225  if (it != dataBlob.end()) {
226  DataBucketBase* dobjBaseAux = static_cast<DataBucketBase*>(dobjaux);
227 
228  SG::IAuxStore* istore = nullptr;
229  if (xAOD::AuxContainerBase* auxstore =
230  dobjBaseAux->template cast<xAOD::AuxContainerBase> (nullptr, false))
231  {
232  istore = auxstore;
233  }
234 
235  if (!istore || !deserializeDynVars (dataBlob,
236  it - dataBlob.begin(),
237  *istore))
238  {
239  ATH_MSG_WARNING("Aux Store dynamic var deserialization failed");
240  return false;
241  }
242  }
243 
244  bool setaux = setAuxDataObject(dobjaux);
245  if (DataBucketBase* dbb = dynamic_cast<DataBucketBase*> (dobjaux)) {
246  dbb->relinquish();
247  delete dbb;
248  }
249  if(!setaux) return false;
250  }
251  return true;
252 }
253 
254 bool HLTNavDetails::IHolder::serializePayload(std::vector<uint32_t>& dataBlob,
255  const xAOD::AuxSelection& sel) {
256  DataObject* dobj = getDataObject();
257 
258  if(!dobj){
259  ATH_MSG_WARNING("data object points to null. can't serialize");
260  }
261 
262  ATH_MSG_VERBOSE("creating serialized representation for " << dobj);
263 
264 
265  TrigStreamAddress* addr(0);
266  if ( m_objectserializerSvc->createRep(dobj, *pp_cast<IOpaqueAddress>(&addr) ).isSuccess() ) {
267  ATH_MSG_VERBOSE("serialization of feature (object) successful, blob size: " << addr->get().size());
268  dataBlob.push_back(addr->get().size());
269  dataBlob.insert(dataBlob.end(), addr->get().begin(), addr->get().end());
270  // above should be optimized (need to know if in case of failed serialization addr->get() contains empty data vector)
271  }
272  else{
273  ATH_MSG_ERROR("Container serialization Failure");
274  return false;
275  }
276  DataBucketBase* dobjBase = static_cast<DataBucketBase*>(dobj);
277  if ( dobjBase ) {
278  dobjBase->relinquish();
279  ATH_MSG_VERBOSE("serialization giving up the ownership");
280  }
281  delete dobj;
282  delete addr;
283 
284  DataObject* dobjaux = getAuxDataObject();
285 
286  ATH_MSG_VERBOSE("aux object: " << dobjaux);
287 
288  TrigStreamAddress* auxaddr(0);
289  if(dobjaux){
290  ATH_MSG_VERBOSE("AuxStore serialization");
291  if(m_objectserializerSvc->createRep(dobjaux,*pp_cast<IOpaqueAddress>(&auxaddr) ).isSuccess() ){
292  ATH_MSG_VERBOSE("aux conversion success! aux blob has size: " << auxaddr->get().size());
293  dataBlob.push_back(auxaddr->get().size());
294  dataBlob.insert(dataBlob.end(), auxaddr->get().begin(), auxaddr->get().end());
295  }
296  else{
297  ATH_MSG_ERROR("AuxStore serialization Failure");
298  return false;
299  }
300  DataBucketBase* dobjBaseAux = static_cast<DataBucketBase*>(dobjaux);
301 
302  const SG::IAuxStoreIO* iio = nullptr;
303  if (const xAOD::AuxContainerBase* auxstore =
304  dobjBaseAux->template cast<xAOD::AuxContainerBase> (nullptr, true))
305  {
306  iio = auxstore;
307  }
308 
309  dobjBaseAux->relinquish();
310  ATH_MSG_VERBOSE("serialization giving up the ownership of Aux");
311  delete dobjaux;
312  delete auxaddr;
313 
314  // Handle dynamic variables.
315  if (iio) {
316  if (!serializeDynVars (*iio, sel, dataBlob)) {
317  ATH_MSG_ERROR("Serialization of dynamic aux variables failed.");
318  return false;
319  }
320  }
321  }
322  ATH_MSG_VERBOSE("finished serializing payload. size: " << dataBlob.size());
323 
324  return true;
325 }
326 
327 
346  const xAOD::AuxSelection& sel,
347  std::vector<uint32_t>& dataBlob)
348 {
349  // Loop over all selected variables.
351  SG::auxid_set_t auxids = sel.getSelectedAuxIDs (iio.getDynamicAuxIDs());
352  for (SG::auxid_t id : auxids) {
353  // Get the TClass of the object being saved.
354  const std::type_info* tinfo = iio.getIOType (id);
355  if (!tinfo) {
356  ATH_MSG_ERROR("serialize aux dyn vars failed: can't get type_info.");
357  return false;
358  }
359  TClass* cls = TClass::GetClass (*tinfo);
360  if (!cls) {
361  ATH_MSG_ERROR("serialize aux dyn vars failed: can't get TClass.");
362  return false;
363  }
364 
365  // Serialize the object data to a temp buffer.
366  std::vector<uint32_t> serialized =
367  m_serializer->serialize (cls->GetName(), iio.getIOData (id));
368 
369  // Concatenate header header information to the output buffer:
370  // attribute name and data type.
371  StringSerializer ss;
372  std::vector<uint32_t> serializedName;
373  ss.serialize (r.getName(id), serializedName); // FIXME: handle class part?
374  dataBlob.push_back (serializedName.size());
375  dataBlob.insert(dataBlob.end(), serializedName.begin(), serializedName.end());
376 
377  std::vector<uint32_t> serializedType;
378  ss.serialize (cls->GetName(), serializedType);
379  dataBlob.push_back (serializedType.size());
380  dataBlob.insert(dataBlob.end(), serializedType.begin(), serializedType.end());
381 
382  // Add the object data itself to the output buffer.
383  dataBlob.push_back (serialized.size());
384  dataBlob.insert(dataBlob.end(), serialized.begin(), serialized.end());
385  }
386 
387  return true;
388 }
389 
390 
405 bool IHolder::deserializeDynVars (const std::vector<uint32_t>& dataBlob,
406  size_t offs,
408 {
409  SG::IAuxStoreHolder* holder = dynamic_cast<SG::IAuxStoreHolder*> (&store);
410  if (!holder) {
411  ATH_MSG_ERROR("deserialize aux dyn vars failed: can't convert to IAuxStoreHolder.");
412  return false;
413  }
414 
415  std::unique_ptr<SG::IAuxStore> newstore = deserializeDynVars (dataBlob, offs);
416  if (!newstore) return false;
417  holder->setStore (newstore.release());
418  return true;
419 }
420 
421 
422 namespace {
423 
424 
425 // Change instances of std::vector<...> to vector<...> in the input string,
426 // for comparing class names.
427 std::string stripStdVec (const std::string& s_in)
428 {
429  std::string s = s_in;
430  std::string::size_type pos{0};
431  while ((pos = s.find ("std::vector<")) != std::string::npos) {
432  s.erase (pos, 5);
433  }
434  return s;
435 }
436 
437 
438 } // anonymous namespace
439 
440 
451 std::unique_ptr<SG::IAuxStore>
452 IHolder::deserializeDynVars (const std::vector<uint32_t>& dataBlob,
453  size_t offs)
454 {
455  StringSerializer ss;
457 
458  // New dynamic store.
459  auto store = std::make_unique<HLTNavDetails::TrigAuxStore>();
460 
461  // Read through the buffer starting at @c offs.
462  std::vector<uint32_t>::const_iterator it = dataBlob.begin() + offs;
463  while (it < dataBlob.end()) {
464  // Read the attribute and type names from the buffer.
465  size_t name_size = *it++;
466  std::string name;
467  ss.deserialize (it, it+name_size, name);
468  it += name_size;
469 
470  size_t tname_size = *it++;
471  std::string tname;
472  ss.deserialize (it, it+tname_size, tname);
473  it += tname_size;
474 
475  // Object size.
476  size_t var_size = *it++;
477 
478  const static char* const packed_pref = "SG::PackedContainer<";
479  const static unsigned int packed_preflen = strlen(packed_pref);
480  std::string vecname = tname;
481  if (strncmp (vecname.c_str(), packed_pref, packed_preflen) == 0) {
482  // Convert from SG::PackedContainer<T> to vector<T>.
483  // Also strip out a std::allocator<T> argument, but leave
484  // any other allocator.
485  auto makeRules = []() {
487  rules.add ("SG::PackedContainer<$T, std::allocator<$T> >",
488  "vector<$T>");
489  rules.add ("SG::PackedContainer<$T, allocator<$T> >",
490  "vector<$T>");
491  rules.add ("SG::PackedContainer<$T, $ALLOC>",
492  "vector<$T, $ALLOC>");
493  return rules;
494  };
495  const static CxxUtils::ClassName::Rules rules = makeRules();
496  vecname = rules.apply (vecname);
497  }
498 
499  // Handle schema evolution. If we're expecting a different
500  // type for the variable, then use that name instead.
501  SG::auxid_t id = r.findAuxID (name);
502  if (id != SG::null_auxid && stripStdVec(r.getVecTypeName(id)) != stripStdVec(vecname)) {
503  vecname = r.getVecTypeName (id);
504  tname = vecname;
505  }
506 
507  // Handle the case where we don't have a registered type for this
508  // auxiliary variable.
509  if (id == SG::null_auxid)
510  {
511  std::string elementTypeName;
512  const std::type_info* elt_tinfo = getElementType (vecname, elementTypeName);
513  if (elt_tinfo)
514  id = SG::getDynamicAuxID (*elt_tinfo, name, elementTypeName, tname, false);
515  if (id == SG::null_auxid) {
516  ATH_MSG_ERROR("deserialize aux dyn var failed; can't find auxid for:" << name);
517  return std::unique_ptr<SG::IAuxStore> (std::move(store));
518  }
519  }
520 
521  // Read the object from the buffer.
522  std::vector<uint32_t> buf (it, it+var_size);
523  void* obj = m_serializer->deserialize (tname, buf);
524  it += var_size;
525 
526  bool isPacked = (strncmp (tname.c_str(), packed_pref, packed_preflen) == 0);
527  std::unique_ptr<SG::IAuxTypeVector> vec
528  (r.makeVectorFromData (id, obj, nullptr, isPacked, true));
529  store->addVector (std::move(vec), false);
530  }
531 
532  return std::unique_ptr<SG::IAuxStore> (std::move(store));
533 }
534 
535 
543 const std::type_info*
544 IHolder::getElementType (const std::string& tname,
545  std::string& elementTypeName) const
546 {
547  TClass* cls = TClass::GetClass (tname.c_str());
548  if (!cls) return nullptr;
549  TVirtualCollectionProxy* prox = cls->GetCollectionProxy();
550  if (!prox) return nullptr;
551  if (prox->GetValueClass()) {
552  elementTypeName = prox->GetValueClass()->GetName();
553  return prox->GetValueClass()->GetTypeInfo();
554  }
555  RootUtils::Type typ (prox->GetType());
556  elementTypeName = typ.getTypeName();
557  return typ.getTypeInfo();
558 }
HLTNavDetails::IHolder::containerClid
virtual CLID containerClid() const =0
beamspotman.r
def r
Definition: beamspotman.py:676
store
StoreGateSvc * store
Definition: fbtTestBasics.cxx:69
common.sgkey
def sgkey(tool)
Definition: common.py:1028
python.SystemOfUnits.second
int second
Definition: SystemOfUnits.py:120
ClassName.h
Recursively separate out template arguments in a C++ class name.
TypeMaps.h
HLTNavDetails::IHolder::serialize
virtual bool serialize(std::vector< uint32_t > &output) const
serializes this Holder
Definition: Holder.cxx:62
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
HLTNavDetails::IHolder::deserializeDynVars
bool deserializeDynVars(const std::vector< uint32_t > &dataBlob, size_t offs, SG::IAuxStore &store)
Read dynamic auxiliary variables from a serialized buffer.
Definition: Holder.cxx:405
python.SystemOfUnits.m
int m
Definition: SystemOfUnits.py:91
HLTNavDetails
Definition: Holder.cxx:118
PowhegControl_ttHplus_NLO.ss
ss
Definition: PowhegControl_ttHplus_NLO.py:83
CxxUtils::ClassName::Rules::add
void add(const ClassName &pattern, const ClassName &replacement)
Add a new transformation rule.
Definition: ClassName.cxx:60
HLTNavDetails::IHolder::label
const std::string & label() const
returns the label of objects stores by this holder
Definition: Holder.h:85
AthMsgStreamMacros.h
DataBucketBase
A non-templated base class for DataBucket, allows to access the transient object address as a void*.
Definition: DataBucketBase.h:24
HLTNavDetails::IHolder::typeName
virtual const std::string & typeName() const =0
returns the object's name stored by this holder
SG::AuxTypeRegistry::instance
static AuxTypeRegistry & instance()
Return the singleton registry instance.
Definition: AuxTypeRegistry.cxx:49
PlotCalibFromCool.label
label
Definition: PlotCalibFromCool.py:78
RootUtils::Type::getTypeInfo
const std::type_info * getTypeInfo() const
Return the type_info for the described type.
Definition: Type.cxx:366
SG::getDynamicAuxID
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)
Find the auxid for a dynamic branch.
Definition: getDynamicAuxID.cxx:63
HLTNavDetails::IHolder::~IHolder
virtual ~IHolder()
Definition: Holder.cxx:51
PlotCalibFromCool.begin
begin
Definition: PlotCalibFromCool.py:94
AuxContainerBase.h
skel.it
it
Definition: skel.GENtoEVGEN.py:423
xAOD::AuxContainerBase
Common base class for the auxiliary containers.
Definition: AuxContainerBase.h:59
CaloClusterListBadChannel.cls
cls
Definition: CaloClusterListBadChannel.py:8
HLTNavDetails::IHolder::m_serializer
ToolHandle< ITrigSerializerToolBase > m_serializer
Serializer tool; used for dynamic variables.
Definition: Holder.h:247
HLTNavDetails::IHolder::m_label
std::string m_label
label given to the objects in this holder (labels given at attachFeature)
Definition: Holder.h:242
vec
std::vector< size_t > vec
Definition: CombinationsGeneratorTest.cxx:12
HLTNavDetails::formatSGkey
std::string formatSGkey(const std::string &prefix, const std::string &containername, const std::string &label)
declaration of formatting function.
Definition: Holder.cxx:122
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
SG::IAuxStoreIO::getIOType
virtual const std::type_info * getIOType(SG::auxid_t auxid) const =0
Return the type of the data to be stored for one aux data item.
HLTNavDetails::IHolder::m_storeGate
HLT::AccessProxy * m_storeGate
pointer to SG
Definition: Holder.h:163
HLTNavDetails::IHolder::m_aux
ITypeProxy * m_aux
Definition: Holder.h:166
SG::IAuxStoreIO
Interface providing I/O for a generic auxiliary store.
Definition: IAuxStoreIO.h:44
PrepareReferenceFile.regex
regex
Definition: PrepareReferenceFile.py:43
SG::AuxTypeRegistry
Handle mappings between names and auxid_t.
Definition: AuxTypeRegistry.h:62
TrigAuxStore.h
Aux store instance used to hold dynamic variables deserialized from the bytestream.
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
CxxUtils::vec
typename vecDetail::vec_typedef< T, N >::type vec
Define a nice alias for the vectorized type.
Definition: vec.h:207
HLTNavDetails::IHolder::print
virtual void print(MsgStream &m) const
Definition: Holder.cxx:107
SG::auxid_t
size_t auxid_t
Identifier for a particular aux data item.
Definition: AuxTypes.h:27
StoreGateSvc
The Athena Transient Store API.
Definition: StoreGateSvc.h:128
StlVectorClids.h
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
Type.h
Wrapper for ROOT types.
TrigStreamAddress.h
xAOD::uint16_t
setWord1 uint16_t
Definition: eFexEMRoI_v1.cxx:88
TrigStreamAddress::add
void add(const std::vector< uint32_t > &a)
Definition: TrigStreamAddress.cxx:27
HLTNavDetails::IHolder::m_objectserializerSvc
IConversionSvc * m_objectserializerSvc
pointer to object serializer
Definition: Holder.h:162
HLTNavDetails::IHolder::deserializePayload
bool deserializePayload(const std::vector< uint32_t > &dataBlob, int version)
deserialization of holder payload
Definition: Holder.cxx:148
h
ret
T ret(T t)
Definition: rootspy.cxx:260
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
Holder.h
sel
sel
Definition: SUSYToolsTester.cxx:92
HLTNavDetails::IHolder::IHolder
IHolder()
Definition: Holder.cxx:38
checkCorrelInHIST.prefix
dictionary prefix
Definition: checkCorrelInHIST.py:391
getDynamicAuxID.h
Find the auxid for a dynamic branch.
CxxUtils::ClassName::Rules::apply
std::string apply(const std::string &name) const
Apply transformations to a class name.
Definition: ClassName.cxx:127
HLT::class_id_type
uint32_t class_id_type
Definition: Trigger/TrigEvent/TrigNavStructure/Root/Types.h:11
HLTNavDetails::IHolder::m_readonly
bool m_readonly
Definition: Holder.h:165
CxxUtils::ClassName::Rules
A set of transformation rules to use with ClassName.
Definition: CxxUtils/CxxUtils/ClassName.h:130
CLID
uint32_t CLID
The Class ID type.
Definition: Event/xAOD/xAODCore/xAODCore/ClassID_traits.h:47
SG::IAuxStoreIO::getDynamicAuxIDs
virtual const SG::auxid_set_t & getDynamicAuxIDs() const =0
Get the list of all dynamically created variables.
HLTNavDetails::IHolder::m_logger
const asg::AsgMessaging * m_logger
Definition: Holder.h:161
TrigStreamAddress::get
const std::vector< uint32_t > & get() const
Definition: TrigStreamAddress.cxx:32
SG::IAuxStoreHolder::setStore
virtual void setStore(IAuxStore *store)=0
Give an auxiliary store object to the holder object.
merge.output
output
Definition: merge.py:17
xAOD::AuxSelection
Class helping in dealing with dynamic branch selection.
Definition: AuxSelection.h:31
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
asg::AsgMessaging
Class mimicking the AthMessaging class from the offline software.
Definition: AsgMessaging.h:40
SG::IAuxStoreIO::getIOData
virtual const void * getIOData(SG::auxid_t auxid) const =0
Return a pointer to the data to be stored for one aux data item.
HLTNavDetails::IHolder::serializePayload
bool serializePayload(std::vector< uint32_t > &dataBlob, const xAOD::AuxSelection &sel)
serializes the payload of this Holder
Definition: Holder.cxx:254
PixelModuleFeMask_create_db.payload
string payload
Definition: PixelModuleFeMask_create_db.py:69
HLTNavDetails::IHolder::collectionName
virtual const std::string & collectionName() const =0
returns the collection's name stored by this holder
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
HLTNavDetails::operator<<
MsgStream & operator<<(MsgStream &m, const HLTNavDetails::IHolder &nav)
Definition: Holder.cxx:112
SG::IAuxStore
Interface for non-const operations on an auxiliary store.
Definition: IAuxStore.h:48
CLIDRegistry.h
a static registry of CLID->typeName entries. NOT for general use. Use ClassIDSvc instead.
get_generator_info.version
version
Definition: get_generator_info.py:33
HLTNavDetails::IHolder::typeClid
virtual CLID typeClid() const =0
returns the CLID of objects stores by this holder
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
HLTNavDetails::IHolder
Definition: Holder.h:58
HLTNavDetails::IHolder::generateAliasKey
std::string generateAliasKey(CLID c, uint16_t sti, const std::string &label, unsigned size)
Definition: Holder.cxx:98
HLTNavDetails::IHolder::m_uniqueCounter
int m_uniqueCounter
Definition: Holder.h:244
HLTNavDetails::IHolder::prepare
virtual void prepare(const asg::AsgMessaging &logger, HLT::AccessProxy *sg, IConversionSvc *objSerializer, bool readonly)
prepares this holder by setting messaging, StoreGate access and providing serializer
Definition: Holder.cxx:55
DeMoScan.first
bool first
Definition: DeMoScan.py:534
HLTNavDetails::IHolder::subTypeIndex
uint16_t subTypeIndex() const
returns the index (short number used when linking object to the TE) of objects stores by this holder
Definition: Holder.h:111
TrigStreamAddress
IOpaqueAddress for TrigSerializenCnvSvc.
Definition: TrigStreamAddress.h:23
AuxTypeRegistry.h
Handle mappings between names and auxid_t.
LArNewCalib_DelayDump_OFC_Cali.idx
idx
Definition: LArNewCalib_DelayDump_OFC_Cali.py:69
RootUtils::Type
Wrapper for ROOT types.
Definition: Type.h:40
DataBucketBase::relinquish
virtual void relinquish()=0
Give up ownership of the DataBucket contents.
SG::auxid_set_t
A set of aux data identifiers.
Definition: AuxTypes.h:47
RootUtils::Type::getTypeName
std::string getTypeName() const
Return the name of this type.
Definition: Type.cxx:329
ATLAS_THREAD_SAFE
#define ATLAS_THREAD_SAFE
Definition: checker_macros.h:211
HLTNavDetails::IHolder::m_subTypeIndex
uint16_t m_subTypeIndex
index to notify how many objects of given type we have (we need to record it in case of slimming will...
Definition: Holder.h:243
python.PyAthena.obj
obj
Definition: PyAthena.py:135
AuxStoreInternal.h
An auxiliary data store that holds data internally.
SG::IAuxStoreHolder
Interface for objects taking part in direct ROOT I/O.
Definition: IAuxStoreHolder.h:36
HLTNavDetails::IHolder::serializeDynVars
bool serializeDynVars(const SG::IAuxStoreIO &iio, const xAOD::AuxSelection &sel, std::vector< uint32_t > &dataBlob)
Serialize all selected dynamic variables for an xAOD object.
Definition: Holder.cxx:345
python.compressB64.c
def c
Definition: compressB64.py:93
xAOD::containerClid
setPassBits containerClid
Definition: TrigPassBits_v1.cxx:119
python.iconfTool.gui.pad.logger
logger
Definition: pad.py:14
HLTNavDetails::IHolder::getElementType
const std::type_info * getElementType(const std::string &tname, std::string &elementTypeName) const
Find the type of an element of a vector.
Definition: Holder.cxx:544
HLTNavDetails::rx1
const boost::regex rx1("_v[0-9]+$")
HLTNavDetails::IHolder::serializeWithPayload
bool serializeWithPayload(const xAOD::AuxSelection &sel, std::vector< uint32_t > &output, size_t &payloadsize)
serializes this Holder including payload
Definition: Holder.cxx:79
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37
StringSerializer.h