Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Public Types | Public Member Functions | Public Attributes | Private Attributes | List of all members
IdDictDictionary Class Reference

#include <IdDictDictionary.h>

Collaboration diagram for IdDictDictionary:

Public Types

typedef Identifier::value_type value_type
 
typedef Identifier::size_type size_type
 
typedef std::vector< IdDictDictEntry * > entries_type
 
typedef entries_type::iterator entries_it
 
typedef entries_type::const_iterator entries_const_it
 
typedef std::vector< IdDictRegion * > regions_type
 
typedef regions_type::iterator regions_it
 
typedef regions_type::const_iterator regions_const_it
 
typedef std::vector< IdDictGroup * > groups_type
 
typedef groups_type::iterator groups_it
 
typedef groups_type::const_iterator groups_const_it
 

Public Member Functions

 IdDictDictionary ()
 
 ~IdDictDictionary ()
 
IdDictFieldfind_field (const std::string &name) const
 
IdDictLabelfind_label (const std::string &field, const std::string &label) const
 
int get_label_value (const std::string &field, const std::string &label, int &value) const
 
IdDictSubRegionfind_subregion (const std::string &subregion_name) const
 
IdDictRegionfind_region (const std::string &region_name) const
 
IdDictRegionfind_region (const std::string &region_name, const std::string &group_name) const
 
IdDictGroupfind_group (const std::string &group_name) const
 
void add_field (IdDictField *field)
 
void add_subregion (IdDictSubRegion *subregion)
 
void add_dictentry (IdDictDictEntry *entry)
 
void add_subdictionary_name (const std::string &name)
 
void resolve_references (const IdDictMgr &idd)
 
void generate_implementation (const IdDictMgr &idd, const std::string &tag="")
 
void reset_implementation ()
 
bool verify () const
 Here, we verify global constraints : (this must only be applied after the resolve_references and generate_implementation operations) More...
 
void sort ()
 Sort: More...
 
void clear ()
 
int find_region (const ExpandedIdentifier &id, size_type &index) const
 Find first region that matches id. More...
 
IdDictRegionfind_region (const ExpandedIdentifier &id) const
 
IdDictRegionfind_region (const ExpandedIdentifier &id, const std::string &group_name) const
 
void integrate_bits ()
 Set up integral of bits for efficient unpacking. More...
 
MultiRange build_multirange () const
 Get MultiRange for full dictionary. More...
 
MultiRange build_multirange (const ExpandedIdentifier &region_id, const Range &prefix=Range(), const std::string &last_field="") const
 Get MultiRange for a specific region_id up to and including 'last_field' If last_field == "", all fields are taken. More...
 
MultiRange build_multirange (const ExpandedIdentifier &region_id, const std::string &group_name, const Range &prefix=Range(), const std::string &last_field="") const
 Get MultiRange for a specific region_id, constrained to be within a specific named group. More...
 
int pack32 (const ExpandedIdentifier &id, size_t index1, size_t index2, Identifier &packedId) const
 Pack to 32bits the subset of id between (inclusive) index1 and index2 - this is generic, i.e. More...
 
int pack32 (const int *fields, size_t index1, size_t index2, size_t region_index, Identifier &packedId, size_t first_field_index=0) const
 Pack to 32bits the subset of id between (inclusive) index1 and index2. More...
 
int reset (size_t index1, size_t index2, size_t region_index, Identifier &packedId) const
 Reset fields from index1 to index2. More...
 
int unpack (const Identifier &id, const ExpandedIdentifier &prefix, size_t index2, ExpandedIdentifier &unpackedId) const
 Unpack the value_type id to an expanded Identifier, considering the provided prefix (result will include the prefix) and up to index2 - (index1 is assumed to be 0, i.e. More...
 
int unpack (const Identifier &id, const ExpandedIdentifier &prefix, size_t index2, const std::string &sep, std::string &unpackedId) const
 Unpack the value_type id to a string, considering the provided prefix (result will include the prefix) and up to index2 - (index1 is assumed to be 0, i.e. More...
 
int unpack (const Identifier &id, size_t first_field_index, size_t field_index, size_t region_index, int &field) const
 Unpack a single field of the value_type id. More...
 
int copy (const Identifier &idin, size_t first_field_index, size_t begin_field_index, size_t end_field_index, size_t region_index, Identifier &idout) const
 Copy a number of fields of the value_type id into another value_type id. More...
 
bool do_checks (void) const
 Checks are performed by default in debug compilation and NOT in optimized compilation. More...
 
void set_do_checks (bool do_checks)
 
bool do_neighbours (void) const
 Neighbour initialization is performed by default One can switch or query this mode for any idHelper with the following methods: More...
 
void set_do_neighbours (bool do_neighbours)
 
const std::string & file_name (void) const
 Access to file name. More...
 
const std::string & dict_tag (void) const
 Access to the dictionary tag. More...
 
void set_file_name (const std::string &name)
 Set file name. More...
 
void set_dict_tag (const std::string &tag)
 Set the dictionary tag. More...
 

Public Attributes

std::string m_name {}
 
std::string m_version {}
 
std::string m_date {}
 
std::string m_author {}
 
std::map< std::string, IdDictField * > m_fields
 
std::map< std::string, IdDictSubRegion * > m_subregions
 
std::vector< IdDictRegion * > m_regions
 
std::vector< IdDictRegion * > m_all_regions
 
std::vector< IdDictGroup * > m_groups
 
std::vector< std::string > m_subdictionary_names
 
IdDictDictionarym_parent_dict {nullptr}
 

Private Attributes

std::string m_file_name {}
 
std::string m_dict_tag {}
 
bool m_generated_implementation {false}
 
bool m_do_checks {false}
 
bool m_do_neighbours {true}
 

Detailed Description

Definition at line 30 of file IdDictDictionary.h.

Member Typedef Documentation

◆ entries_const_it

typedef entries_type::const_iterator IdDictDictionary::entries_const_it

Definition at line 223 of file IdDictDictionary.h.

◆ entries_it

typedef entries_type::iterator IdDictDictionary::entries_it

Definition at line 222 of file IdDictDictionary.h.

◆ entries_type

Definition at line 221 of file IdDictDictionary.h.

◆ groups_const_it

typedef groups_type::const_iterator IdDictDictionary::groups_const_it

Definition at line 231 of file IdDictDictionary.h.

◆ groups_it

typedef groups_type::iterator IdDictDictionary::groups_it

Definition at line 230 of file IdDictDictionary.h.

◆ groups_type

Definition at line 229 of file IdDictDictionary.h.

◆ regions_const_it

typedef regions_type::const_iterator IdDictDictionary::regions_const_it

Definition at line 227 of file IdDictDictionary.h.

◆ regions_it

typedef regions_type::iterator IdDictDictionary::regions_it

Definition at line 226 of file IdDictDictionary.h.

◆ regions_type

Definition at line 225 of file IdDictDictionary.h.

◆ size_type

Definition at line 33 of file IdDictDictionary.h.

◆ value_type

Definition at line 32 of file IdDictDictionary.h.

Constructor & Destructor Documentation

◆ IdDictDictionary()

IdDictDictionary::IdDictDictionary ( )
default

◆ ~IdDictDictionary()

IdDictDictionary::~IdDictDictionary ( )
default

Member Function Documentation

◆ add_dictentry()

void IdDictDictionary::add_dictentry ( IdDictDictEntry entry)

Definition at line 127 of file IdDictDictionary.cxx.

127  {
128  // Add region to corresponding group
129  IdDictGroup* group = find_group(region->group_name());
130 
131  if (0 == group) {
132  group = new IdDictGroup(region->group_name());
133  m_groups.push_back(group);
134  }
135  group->add_dictentry(region);
136 }

◆ add_field()

void IdDictDictionary::add_field ( IdDictField field)

Definition at line 73 of file IdDictDictionary.cxx.

73  {
74  if (field == 0) return;
75 
76  std::string& name = field->m_name;
77 
78  m_fields[name] = field;
79 }

◆ add_subdictionary_name()

void IdDictDictionary::add_subdictionary_name ( const std::string &  name)

Definition at line 123 of file IdDictDictionary.cxx.

123  {
124  m_subdictionary_names.push_back(name);
125 }

◆ add_subregion()

void IdDictDictionary::add_subregion ( IdDictSubRegion subregion)

Definition at line 115 of file IdDictDictionary.cxx.

115  {
116  if (subregion == 0) return;
117 
118  std::string& name = subregion->m_name;
119 
120  m_subregions[name] = subregion;
121 }

◆ build_multirange() [1/3]

MultiRange IdDictDictionary::build_multirange ( ) const

Get MultiRange for full dictionary.

Definition at line 290 of file IdDictDictionary.cxx.

290  {
292 
294 
295  for (it = m_groups.begin(); it != m_groups.end(); ++it) {
296  const IdDictGroup& group = *(*it);
297 
298  MultiRange group_mr = group.build_multirange();
299 
300  for (unsigned int i = 0; i < group_mr.size(); ++i) {
301  const Range& range = group_mr[i];
302  result.add(range);
303  }
304  }
305 
306  return(result);
307 }

◆ build_multirange() [2/3]

MultiRange IdDictDictionary::build_multirange ( const ExpandedIdentifier region_id,
const Range prefix = Range(),
const std::string &  last_field = "" 
) const

Get MultiRange for a specific region_id up to and including 'last_field' If last_field == "", all fields are taken.

Prepend prefix if provided.

Definition at line 309 of file IdDictDictionary.cxx.

311  {
313 
315  if ("" == last_field) {
316  // Take all fields
317  for (it = m_regions.begin(); it != m_regions.end(); ++it) {
318  const IdDictRegion& region = *(*it);
319 
320  // skip regions created from parents
321  if ("dummy" == region.m_name) continue;
322 
323  // skip empty regions - may arise from alternate_regions
324  // where a tag selects an empty region
325  if (region.m_is_empty) continue;
326 
327  Range range(region.build_range());
328  // Check region selection
329  if (range.match(region_id)) result.add(std::move(range));
330  }
331  } else {
332  // Not all fields required
333  for (it = m_regions.begin(); it != m_regions.end(); ++it) {
334  const IdDictRegion& region = *(*it);
335 
336  // skip regions created from parents
337  if ("dummy" == region.m_name) continue;
338 
339  // skip empty regions - may arise from alternate_regions
340  // where a tag selects an empty region
341  if (region.m_is_empty) continue;
342 
343  Range range(region.build_range());
344  // Check region selection
345  if (range.match(region_id)) {
346  // Build new range up to last_field and add it to result -
347  // remove duplicate ranges with addRangeToMR
348  Range new_range(prefix); // Prepend with prefix
349 
350  std::vector <IdDictFieldImplementation>::const_iterator fit;
351  for (fit = region.m_implementation.begin();
352  fit != region.m_implementation.end();
353  ++fit) {
355 
356 // new_range.add(impl.m_field);
357  new_range.add(impl.range()->build_range());
358 
359  if (last_field == impl.range()->m_field->m_name) {
360  break;
361  }
362  }
363  result.add(std::move(new_range));
364  }
365  }
366  }
367 
368  return(result);
369 }

◆ build_multirange() [3/3]

MultiRange IdDictDictionary::build_multirange ( const ExpandedIdentifier region_id,
const std::string &  group_name,
const Range prefix = Range(),
const std::string &  last_field = "" 
) const

Get MultiRange for a specific region_id, constrained to be within a specific named group.

The depth of the multirange is up to and including 'last_field' If last_field == "", all fields are taken. Prepend prefix if provided.

Definition at line 371 of file IdDictDictionary.cxx.

374  {
376 
378  if ("" == last_field) {
379  // Take all fields
380  for (it = m_regions.begin(); it != m_regions.end(); ++it) {
381  const IdDictRegion& region = *(*it);
382 
383  // skip regions created from parents
384  if ("dummy" == region.m_name) continue;
385 
386  // skip empty regions - may arise from alternate_regions
387  // where a tag selects an empty region
388  if (region.m_is_empty) continue;
389 
390  Range range(region.build_range());
391  // Check region selection
392  if (range.match(region_id) && region.group_name() == group_name) result.add(std::move(range));
393  }
394  } else {
395  // Not all fields required
396  for (it = m_regions.begin(); it != m_regions.end(); ++it) {
397  const IdDictRegion& region = *(*it);
398 
399  // skip regions created from parents
400  if ("dummy" == region.m_name) continue;
401 
402  // skip empty regions - may arise from alternate_regions
403  // where a tag selects an empty region
404  if (region.m_is_empty) continue;
405 
406  Range range(region.build_range());
407  // Check region selection
408  if (range.match(region_id) && region.group_name() == group_name) {
409  // Build new range up to last_field and add it to result -
410  // remove duplicate ranges with addRangeToMR
411  Range new_range(prefix); // Prepend with prefix
412 
413  std::vector <IdDictFieldImplementation>::const_iterator fit;
414  for (fit = region.m_implementation.begin();
415  fit != region.m_implementation.end();
416  ++fit) {
418 
419 // new_range.add(impl.m_field);
420  new_range.add(impl.range()->build_range());
421 
422  if (last_field == impl.range()->m_field->m_name) {
423  break;
424  }
425  }
426  result.add(std::move(new_range));
427  }
428  }
429  }
430 
431  return(result);
432 }

◆ clear()

void IdDictDictionary::clear ( )

Definition at line 1231 of file IdDictDictionary.cxx.

1231  {
1232  {
1234 
1235  for (it = m_subregions.begin(); it != m_subregions.end(); ++it) {
1236  IdDictSubRegion* subregion = (*it).second;
1237  subregion->clear();
1238  delete subregion;
1239  }
1240 
1241  m_subregions.clear();
1242  }
1243 
1244  {
1246 
1247  for (it = m_fields.begin(); it != m_fields.end(); ++it) {
1248  IdDictField* field = (*it).second;
1249  field->clear();
1250  delete field;
1251  }
1252 
1253  m_fields.clear();
1254  }
1255 
1256  {
1258 
1259  for (it = m_groups.begin(); it != m_groups.end(); ++it) {
1260  IdDictGroup* group = *it;
1261  group->clear();
1262  delete group;
1263  }
1264 
1265  m_groups.clear();
1266  }
1267 }

◆ copy()

int IdDictDictionary::copy ( const Identifier idin,
size_t  first_field_index,
size_t  begin_field_index,
size_t  end_field_index,
size_t  region_index,
Identifier idout 
) const

Copy a number of fields of the value_type id into another value_type id.

Copy a number of fields of the bits32 id into another bits32 id.

One specifies the begin and end (inclusive) field indexes desired and passes in the region index to be used for decoding. The region index is obtained from find_region. The first_field_index is normally 0. It is non-zero when fields 0 to first_field_index -1 are missing from the compact

One specifies the begin and end (inclusive) field indexes desired and passes in the region index to be used for decoding. The region index is obtained from find_region. The first_field_index is normally 0. It is non-zero when fields 0 to first_field_index -1 are missing from the compact. In this case, idout is shift by the number of missing bits, if possible.

Definition at line 1064 of file IdDictDictionary.cxx.

1069  {
1070  idout = Identifier();
1071  if (region_index >= m_regions.size()) {
1072  std::cout << "IdDictDictionary::copy - region index too large. Index, nregions "
1073  << region_index << " " << m_regions.size() << std::endl;
1074  return(1);
1075  }
1076 
1077  const IdDictRegion& region = *m_regions[region_index];
1078 
1079  if (first_field_index >= region.m_implementation.size() ||
1080  begin_field_index >= region.m_implementation.size() ||
1081  end_field_index >= region.m_implementation.size()) {
1082  std::cout << "IdDictDictionary::copy - field index too large. Indexes first, begin, end, nfields "
1083  << first_field_index << " "
1084  << begin_field_index << " "
1085  << end_field_index << " "
1086  << region.m_implementation.size()
1087  << std::endl;
1088  return(1);
1089  }
1090 
1091  size_t missing_offset = 0;
1092  if (first_field_index) {
1093  if (first_field_index > begin_field_index) {
1094  std::cout << "IdDictDictionary::copy - first_field_index > begin_field_index. Indexes "
1095  << first_field_index << " " << begin_field_index << std::endl;
1096  return(1);
1097  }
1098  // One or more fields missing from prefix, get the offset
1099  missing_offset = region.m_implementation[first_field_index].bits_offset();
1100  }
1101 
1102  size_t prefix_offset = 0;
1103  if (begin_field_index) {
1104  if (begin_field_index > end_field_index) {
1105  std::cout << "IdDictDictionary::copy - begin_field_index > end_field_index. Indexes "
1106  << begin_field_index << " " << end_field_index << std::endl;
1107  return(1);
1108  }
1109  // One or more fields missing from prefix, get the offset
1110  prefix_offset = region.m_implementation[begin_field_index].bits_offset();
1111  }
1112 
1113  const IdDictFieldImplementation& impl = region.m_implementation[end_field_index];
1114  size_t suffix_offset = impl.bits() + impl.bits_offset();
1115 
1116  size_t position = Identifier::NBITS; // overall bit position
1117 
1118  if (position < prefix_offset - missing_offset) {
1119  std::cout << "IdDictDictionary::copy - position < prefix + missing. "
1120  << prefix_offset << " " << missing_offset << std::endl;
1121  return(1);
1122  }
1123 
1124 
1125  if (position < suffix_offset + missing_offset) {
1126  std::cout << "IdDictDictionary::copy - position < suffix + missing. "
1127  << suffix_offset << " " << missing_offset << std::endl;
1128  return(1);
1129  }
1130 
1131 
1132  // prepare the mask for copying
1133 
1135 
1136  Identifier::value_type prefix_mask =
1137  prefix_offset ? (static_cast<Identifier::value_type>(1) << (position - prefix_offset + missing_offset)) - 1 : 0;
1138 
1139  Identifier::value_type suffix_mask =
1140  (static_cast<Identifier::value_type>(1) << (position - suffix_offset + missing_offset)) - 1;
1141 
1142  mask -= prefix_mask + suffix_mask;
1143 
1144  idout = idin.mask_shift(mask, missing_offset);
1145 
1146 
1147  return(0);
1148 }

◆ dict_tag()

const std::string & IdDictDictionary::dict_tag ( void  ) const
inline

Access to the dictionary tag.

Definition at line 262 of file IdDictDictionary.h.

262  {
263  return (m_dict_tag);
264 }

◆ do_checks()

bool IdDictDictionary::do_checks ( void  ) const

Checks are performed by default in debug compilation and NOT in optimized compilation.

One can switch or query this mode for any idHelper with the following methods:

Definition at line 1151 of file IdDictDictionary.cxx.

1151  {
1152  return(m_do_checks);
1153 }

◆ do_neighbours()

bool IdDictDictionary::do_neighbours ( void  ) const

Neighbour initialization is performed by default One can switch or query this mode for any idHelper with the following methods:

Definition at line 1161 of file IdDictDictionary.cxx.

1161  {
1162  return(m_do_neighbours);
1163 }

◆ file_name()

const std::string & IdDictDictionary::file_name ( void  ) const
inline

Access to file name.

Definition at line 255 of file IdDictDictionary.h.

255  {
256  return (m_file_name);
257 }

◆ find_field()

IdDictField * IdDictDictionary::find_field ( const std::string &  name) const

Definition at line 36 of file IdDictDictionary.cxx.

36  {
37  std::map <std::string, IdDictField*>::const_iterator it;
38 
39  it = m_fields.find(name);
40 
41  if (it == m_fields.end()) {
42  // If parent exists, look for field there
43  if (m_parent_dict) {
44  it = m_parent_dict->m_fields.find(name);
45  if (it == m_parent_dict->m_fields.end()) {
46  return(0);
47  }
48  } else {
49  return(0);
50  }
51  }
52 
53  return((*it).second);
54 }

◆ find_group()

IdDictGroup * IdDictDictionary::find_group ( const std::string &  group_name) const

Definition at line 106 of file IdDictDictionary.cxx.

106  {
107  for (size_t i = 0; i < m_groups.size(); ++i) {
109  if ((group != 0) && (group->name() == group_name)) return(group);
110  }
111 
112  return(0);
113 }

◆ find_label()

IdDictLabel * IdDictDictionary::find_label ( const std::string &  field,
const std::string &  label 
) const

Definition at line 56 of file IdDictDictionary.cxx.

56  {
57  IdDictField* idField = find_field(field);
58 
59  if (!idField) return nullptr;
60 
61  return(idField->find_label(label));
62 }

◆ find_region() [1/5]

IdDictRegion * IdDictDictionary::find_region ( const ExpandedIdentifier id) const

Definition at line 244 of file IdDictDictionary.cxx.

244  {
245  return find_region(id, "");
246 }

◆ find_region() [2/5]

IdDictRegion * IdDictDictionary::find_region ( const ExpandedIdentifier id,
const std::string &  group_name 
) const

Definition at line 248 of file IdDictDictionary.cxx.

248  {
249  // Find first region that matches id
250 
251  IdDictRegion* pRegion = 0;
252 
254 
255  for (it = m_regions.begin(); it != m_regions.end(); ++it) {
256  IdDictRegion& region = *(*it);
257  if ((group_name != "") && (region.group_name() != group_name)) continue;
258 
259  Range range = region.build_range();
260 
261  if (range.match(id) && range.fields() >= id.fields()) {
262  pRegion = &region;
263  }
264  }
265 
266  return(pRegion);
267 }

◆ find_region() [3/5]

int IdDictDictionary::find_region ( const ExpandedIdentifier id,
size_type index 
) const

Find first region that matches id.

Definition at line 224 of file IdDictDictionary.cxx.

224  {
225  // Find first region that matches id
226 
228 
229  size_type i = 0;
230  for (it = m_regions.begin(); it != m_regions.end(); ++it, ++i) {
231  const IdDictRegion& region = *(*it);
232 
233  Range range = region.build_range();
234 
235  if (range.match(id) && range.fields() >= id.fields()) {
236  index = i;
237  return(0);
238  }
239  }
240 
241  return(1);
242 }

◆ find_region() [4/5]

IdDictRegion * IdDictDictionary::find_region ( const std::string &  region_name) const

Definition at line 92 of file IdDictDictionary.cxx.

92  {
93  return find_region(region_name, "");
94 }

◆ find_region() [5/5]

IdDictRegion * IdDictDictionary::find_region ( const std::string &  region_name,
const std::string &  group_name 
) const

Definition at line 96 of file IdDictDictionary.cxx.

96  {
97  for (size_t i = 0; i < m_regions.size(); ++i) {
98  IdDictRegion* region = m_regions[i];
99  if ((group_name != "") && (region->group_name() != group_name)) continue;
100  if ((region != 0) && (region_name == region->m_name)) return(region);
101  }
102 
103  return(0);
104 }

◆ find_subregion()

IdDictSubRegion * IdDictDictionary::find_subregion ( const std::string &  subregion_name) const

Definition at line 82 of file IdDictDictionary.cxx.

82  {
83  std::map <std::string, IdDictSubRegion*>::const_iterator it;
84 
85  it = m_subregions.find(name);
86 
87  if (it == m_subregions.end()) return(0);
88 
89  return((*it).second);
90 }

◆ generate_implementation()

void IdDictDictionary::generate_implementation ( const IdDictMgr idd,
const std::string &  tag = "" 
)

Definition at line 165 of file IdDictDictionary.cxx.

166  {
167  if (Debugger::debug()) {
168  std::cout << "IdDictDictionary::generate_implementation>" << std::endl;
169  }
170 
172  // Propagate to each region and copy their generation into the
173  // dict's vector.
175  for (it = m_groups.begin(); it != m_groups.end(); ++it) {
176  (*it)->generate_implementation(idd, *this, tag);
177  // Get regions from group and save in m_regions
178  const regions_type& regions = (*it)->regions();
180  for (it1 = regions.begin(); it1 != regions.end(); ++it1) {
181  m_regions.push_back(*it1);
182  }
183  }
184 
185  // Loop again over groups and set the bit-packing - starting at
186  // level 0
187  for (it = m_groups.begin(); it != m_groups.end(); ++it) {
188  // Copy to temporary vector all regions in the group. And
189  // look for regions in local m_regions vector for any
190  // regions "dummy", which come from reference
191  // dictionaries.
192  // Skip special group
193  if ("dummy" == (*it)->name()) continue;
194 
195  get_bits(m_regions, 0, (*it)->name());
196 // get_bits (regions, 0, (*it)->name());
197  }
198 
199  // Set integral over the number of bits
200  integrate_bits();
201 
202  // Set neighbours for regions
204  for (itr = m_regions.begin(); itr != m_regions.end(); ++itr) {
205  (*itr)->find_neighbours(*this);
206  }
207 
209  }
210 }

◆ get_label_value()

int IdDictDictionary::get_label_value ( const std::string &  field,
const std::string &  label,
int &  value 
) const

Definition at line 64 of file IdDictDictionary.cxx.

64  {
65  IdDictLabel* idLabel = find_label(field, label);
66 
67  if (!idLabel || !idLabel->m_valued) return(1);
68 
69  value = idLabel->m_value;
70  return(0);
71 }

◆ integrate_bits()

void IdDictDictionary::integrate_bits ( )

Set up integral of bits for efficient unpacking.

Definition at line 270 of file IdDictDictionary.cxx.

270  {
271  // For each region, loop over its levels and set the bit offset
272  // for each FieldImplementation
273 
274  for (IdDictRegion* region : m_regions) {
275  size_t bits_offset = 0;
276  for (IdDictFieldImplementation& impl : region->m_implementation) {
277  impl.optimize(); // optimize for decoding
278  impl.set_bits_offset(bits_offset);
279  bits_offset += impl.bits();
280 
281  // Set whether or not to decode index
282  Range::field field = impl.ored_field();
283  if ((not field.isBounded()) || (0 != field.get_minimum())) {
284  impl.set_decode_index(true);
285  }
286  }
287  }
288 }

◆ pack32() [1/2]

int IdDictDictionary::pack32 ( const ExpandedIdentifier id,
size_t  index1,
size_t  index2,
Identifier packedId 
) const

Pack to 32bits the subset of id between (inclusive) index1 and index2 - this is generic, i.e.

not the most efficient

Assumptions:

  • packedId is initialized to 0
  • the expanded id begins at index = 0
  • index1,2 correspond to the level/field number, this is thus the same as the index into the expanded id due to the previous assumption.

First we need to check whether the specified identifier really matches the Dictionary specifications.

However, we stop the search in the set of regions at the first matching region. Should we request that only one region matches ????

Definition at line 448 of file IdDictDictionary.cxx.

451  {
452  packedId = 0;
453 
454 
455  // Preconditions...
456 
457  if (index2 < index1) {
458  // bad parameters.
459  return(1);
460  }
461 
462  if (index1 >= id.fields()) {
463  // nothing very useful !!
464  return(1);
465  }
466 
467  if (index2 >= id.fields()) {
468  // bad parameter...
469  return(1);
470  }
471 
481  for (size_t k = 0; k < m_regions.size(); ++k) {
482  bool selected = true;
483 
484  const IdDictRegion& region = *m_regions[k];
485 
486  // Must skip empty regions - can arise when a tag selects an
487  // empty region
488  if (region.m_is_empty) continue;
489 
490  for (size_t i = 0; i < region.m_implementation.size(); ++i) {
491  if (i >= id.fields()) break;
492 
494 
495  if (!impl.field().match(id[i])) {
496  selected = false;
497  break;
498  }
499  }
500 
501  if (selected) {
502  size_t position = Identifier::NBITS;
503  // We have the proper region.
504  for (size_t i = index1; i <= index2; ++i) {
506 
507  Identifier::value_type index = impl.ored_field().get_value_index(id[i]);
508 
509  if (0 == position && impl.bits() > 0) {
510  return(1);
511  }
512 
513  position -= impl.bits();
514  packedId |= (index << position);
515  }
516  break;
517  }
518  }
519 
520 
521  return(0);
522 }

◆ pack32() [2/2]

int IdDictDictionary::pack32 ( const int *  fields,
size_t  index1,
size_t  index2,
size_t  region_index,
Identifier packedId,
size_t  first_field_index = 0 
) const

Pack to 32bits the subset of id between (inclusive) index1 and index2.

Here one must provide the region index, which can be found with find_region. This is more efficient than the above pack32.

Assumptions: (different than the previous pack32)

  • packedId is NOT initialized to 0 - allows to just overwrite the specified fields
  • the field array begins at index1, i.e. NOT the first field
  • the field array field array has a length of index2-index1+1
  • index1,2 correspond to the level/field number
  • first_field_index defines the offset for packing. Normally, this is this is 0. But this may be a field > 0, but of course <= index1

Definition at line 525 of file IdDictDictionary.cxx.

530  {
531  // Preconditions...
532 
533  if (m_do_checks) {
534  if (index2 < index1) {
535  // bad parameters.
536  std::cout << "IdDictDictionary::pack32 - index2 < index1 - 1,2"
537  << index1 << " " << index2 << std::endl;
538  return(1);
539  }
540 
541  if (region_index >= m_regions.size()) {
542  // bad parameters.
543  std::cout << "IdDictDictionary::pack32 - region index incorrect - index,size"
544  << region_index << " " << m_regions.size() << std::endl;
545  return(1);
546  }
547  }
548 
549 
550  // Get the region
551  const IdDictRegion& region = *m_regions[region_index];
552 
553  if (m_do_checks) {
554  if (region.m_is_empty) {
555  std::cout << "IdDictDictionary::pack32 - region id empty" << std::endl;
556  // bad parameters.
557  return(1);
558  }
559  if (index1 < first_field_index) {
560  std::cout << "IdDictDictionary::pack32 - first_field_index > index1 "
561  << first_field_index << " " << index1 << std::endl;
562  return(1);
563  }
564  }
565 
566  // Set the starting position
567  size_t position = Identifier::NBITS;
568  if (!first_field_index) {
570  position -= impl.bits_offset();
571  }
572 
573  size_t field_index = 0;
574  for (size_t i = index1; i <= index2; ++i, ++field_index) {
576 
577  if (m_do_checks) {
578  // Field should be within allowed range
579  if (!impl.ored_field().match(fields[field_index])) {
580  std::cout << "IdDictDictionary::pack32 - field does NOT match: value, allowed values "
581  << fields[field_index] << " " << (std::string) impl.ored_field()
582  << std::endl;
583  // bad parameters.
584  return(1);
585  }
586 
587  // Check that we don't try to go below 0
588  if (0 == position && impl.bits() > 0) {
589  std::cout << "IdDictDictionary::pack32 - going past 0" << std::endl;
590  return(1);
591  }
592  }
593 
595  if (impl.decode_index()) {
596  index = impl.ored_field().get_value_index(fields[field_index]);
597  } else {
598  index = (Identifier::value_type) fields[field_index];
599  }
600 
601  position -= impl.bits();
602  packedId |= (index << position);
603  }
604 
605 
606  return(0);
607 }

◆ reset()

int IdDictDictionary::reset ( size_t  index1,
size_t  index2,
size_t  region_index,
Identifier packedId 
) const

Reset fields from index1 to index2.

Definition at line 612 of file IdDictDictionary.cxx.

615  {
616  // Preconditions...
617 
618  if (m_do_checks) {
619  if (index2 < index1) {
620  // bad parameters.
621  std::cout << "IdDictDictionary::pack32 - index2 < index1 - 1,2"
622  << index1 << " " << index2 << std::endl;
623  return(1);
624  }
625 
626  if (region_index >= m_regions.size()) {
627  // bad parameters.
628  std::cout << "IdDictDictionary::pack32 - region index incorrect - index,size"
629  << region_index << " " << m_regions.size() << std::endl;
630  return(1);
631  }
632  }
633 
634 
635  // Get the region
636  const IdDictRegion& region = *m_regions[region_index];
637 
638  if (m_do_checks) {
639  if (region.m_is_empty) {
640  std::cout << "IdDictDictionary::pack32 - region id empty" << std::endl;
641  // bad parameters.
642  return(1);
643  }
644  }
645 
646  size_t field_index = 0;
647  for (size_t i = index1; i <= index2; ++i, ++field_index) {
649 
650  size_t position = Identifier::NBITS - impl.bits_offset() - impl.bits();
651 
652  Identifier::value_type mask = (((Identifier::value_type) 1 << impl.bits()) - 1) << position;
653 
655 
656  packedId &= (mask);
657  }
658  return(0);
659 }

◆ reset_implementation()

void IdDictDictionary::reset_implementation ( )

Definition at line 212 of file IdDictDictionary.cxx.

212  {
214  m_regions.clear();
216  for (it = m_groups.begin(); it != m_groups.end(); ++it) {
217  (*it)->reset_implementation();
218  }
220  }
221 }

◆ resolve_references()

void IdDictDictionary::resolve_references ( const IdDictMgr idd)

Definition at line 138 of file IdDictDictionary.cxx.

138  {
139  {
141 
142  for (it = m_fields.begin(); it != m_fields.end(); ++it) {
143  IdDictField* field = (*it).second;
144  field->resolve_references(idd);
145  }
146  }
147  {
149 
150  for (it = m_subregions.begin(); it != m_subregions.end(); ++it) {
151  IdDictSubRegion* subregion = (*it).second;
152  subregion->resolve_references(idd, *this);
153  }
154  }
155  {
156  size_t index = 0;
157 
159  for (it = m_groups.begin(); it != m_groups.end(); ++it) {
160  (*it)->resolve_references(idd, *this, index);
161  }
162  }
163 }

◆ set_dict_tag()

void IdDictDictionary::set_dict_tag ( const std::string &  tag)
inline

Set the dictionary tag.

Definition at line 276 of file IdDictDictionary.h.

276  {
277  m_dict_tag = tag;
278 }

◆ set_do_checks()

void IdDictDictionary::set_do_checks ( bool  do_checks)

Definition at line 1156 of file IdDictDictionary.cxx.

1156  {
1158 }

◆ set_do_neighbours()

void IdDictDictionary::set_do_neighbours ( bool  do_neighbours)

Definition at line 1166 of file IdDictDictionary.cxx.

1166  {
1168 }

◆ set_file_name()

void IdDictDictionary::set_file_name ( const std::string &  name)
inline

Set file name.

Definition at line 269 of file IdDictDictionary.h.

269  {
270  m_file_name = name;
271 }

◆ sort()

void IdDictDictionary::sort ( )

Sort:

Prerequisite: first verify the dictionary - no overlaps

Then loop over regions and sort according to their first identifier

Definition at line 1215 of file IdDictDictionary.cxx.

1215  {
1216  // verify
1217  if (verify()) {
1218  std::map< ExpandedIdentifier, IdDictDictEntry* > regions;
1219 
1221 
1222  for (it = m_groups.begin(); it != m_groups.end(); ++it) {
1223  (*it)->sort();
1224  }
1225  } else {
1226  std::cout << "IdDictDictionary::sort - WARNING verify is FALSE - cannot sort "
1227  << std::endl;
1228  }
1229 }

◆ unpack() [1/3]

int IdDictDictionary::unpack ( const Identifier id,
const ExpandedIdentifier prefix,
size_t  index2,
const std::string &  sep,
std::string &  unpackedId 
) const

Unpack the value_type id to a string, considering the provided prefix (result will include the prefix) and up to index2 - (index1 is assumed to be 0, i.e.

Unpack the bits32 id to a string, considering the provided prefix (result will include the prefix) and up to index2 - (index1 is assumed to be 0, i.e.

part of prefix).

First we need to check whether the specified identifier prefix really matches the Dictionary specifications.

ok we require that the region is at least as large as the prefix.

We have one region that matches the prefix. Let's now try to expand the bits32 from the fields of the region that are beyond the prefix.

this index extracted from the bits32 does not match this field in the region... Let's try another region

Definition at line 786 of file IdDictDictionary.cxx.

790  {
791  ExpandedIdentifier localPrefix(prefix);
792 
793 
799  size_t index1 = 0; // field index
800  size_t position = Identifier::NBITS; // overall bit position - used for debugging only
801 
802  for (size_t k = 0; k < m_regions.size(); ++k) {
803  bool selected = false;
804 
805  const IdDictRegion& region = *m_regions[k];
806 
807  // Must skip empty regions - can arise when a tag selects an
808  // empty region
809  if (region.m_is_empty) continue;
810 
811 // for (size_t i = index1; i < region.m_implementation.size (); ++i)
812  for (size_t i = 0; i < region.m_implementation.size(); ++i) {
813  if (i >= localPrefix.fields()) {
818  selected = true;
819  index1 = i;
820  break;
821  }
822 
824 
825  if (!impl.field().match(localPrefix[i])) {
826  break;
827  }
828  }
829 
830  if (selected) {
837 // bits32 temp = id;
838 
839 // std::cout << "Region #" << region.m_index << " selected" << std::endl;
840 
841  for (size_t i = index1; i < region.m_implementation.size(); ++i) {
843 
844  if (impl.bits() == 0) continue;
845 
846  Identifier::value_type mask = (static_cast<Identifier::value_type>(1) << impl.bits()) - 1;
847 
848  if (position < impl.bits()) break; // Nothing more to get
849  size_t index = id.extract(position - impl.bits(), mask);
850 
851  if (index >= impl.ored_field().get_indices()) {
852  selected = false;
853  break;
854  }
855 
856  ExpandedIdentifier::element_type value = impl.ored_field().get_value_at(index);
857 
864  if (!impl.field().match(value)) {
865  selected = false;
866  break;
867  }
868 
869 
870  // Add value to string
871 
872  std::string str_value("nil");
873  char temp[20];
874 
875  // The policy below is:
876  // - if a value is a character string or name, just add this name
877  // - if a value is a number, then prefix it with the
878  // name of the field
879  //
880  // NOTE: min/max is a number, but for value/label we
881  // distinguish between number and name by looking for an IdDictLabel
882  const IdDictRange* range = impl.range();
883  IdDictLabel* label = range->m_field->find_label(range->m_label);
884  switch (range->m_specification) {
886  // For a range of values (numbers), add in the field name
887  str_value = range->m_field->m_name + ' ';
888  sprintf(temp, "%d", value);
889  str_value += temp;
890  break;
891 
894  str_value = "";
895  if (!label) {
896  // Is a number, add in field name
897  str_value += range->m_field->m_name + ' ';
898  }
899  str_value += range->m_label;
900  break;
901 
904  str_value = "";
905  // Is a name
906  if (label) {
907  // Found label with "find_label" on the field
908  if (label->m_valued) {
909  str_value += range->m_label;
910  }
911  } else {
912  // If not found with the "find" above, we must
913  // get the value and name from the range
914  // itself.
915 
916  unsigned int index1 = 0;
917  for (; index1 < range->m_values.size(); ++index1) {
918  if (value == range->m_values[index1]) {
919  break;
920  }
921  }
922 
923  // In some cases we
924  if (index1 < range->m_labels.size()) {
925  if (isNumber(range->m_labels[index1])) {
926  str_value += range->m_field->m_name + ' ';
927  }
928  str_value += range->m_labels[index1];
929  } else {
930  std::cout << "IdDictDictionary::unpack - Could not find value." << std::endl;
931  std::cout << "value " << value << std::endl;
932  std::cout << "field values " << std::endl;
933  for (unsigned int i = 0; i < range->m_values.size(); ++i) {
934  std::cout << range->m_values[i] << " ";
935  }
936  std::cout << std::endl;
937  }
938  }
939  break;
940 
942 
943  std::cout << "unknown" << std::endl;
944 
945  break;
946  }
947 
948 
949  if (index1) unpackedId += sep;
950  unpackedId += str_value;
951  localPrefix.add(value);
952 
953  position -= impl.bits(); // overall bit position
954 
955 
956 
957  index1++; // next field
958 
959  if (index1 > index2) break; // quit at index2
960  }
961  if (selected) break;
962  }
963  }
964 
965  return(0);
966 }

◆ unpack() [2/3]

int IdDictDictionary::unpack ( const Identifier id,
const ExpandedIdentifier prefix,
size_t  index2,
ExpandedIdentifier unpackedId 
) const

Unpack the value_type id to an expanded Identifier, considering the provided prefix (result will include the prefix) and up to index2 - (index1 is assumed to be 0, i.e.

Unpack the bits32 id to an expanded Identifier, considering the provided prefix (result will include the prefix)

part of prefix).

First we need to check whether the specified identifier prefix really matches the Dictionary specifications.

ok we require that the region is at least as large as the prefix.

We have one region that matches the prefix. Let's now try to expand the bits32 from the fields of the region that are beyond the prefix.

this index extracted from the bits32 does not seem to match this field in the region... Let's try another region

this index extracted from the bits32 does not match this field in the region... Let's try another region

Definition at line 674 of file IdDictDictionary.cxx.

677  {
678  ExpandedIdentifier localPrefix(prefix);
679 
680  unpackedId.clear();
681  if (localPrefix.isValid()) unpackedId = localPrefix;
682 
688  size_t index1 = 0; // field index
689  size_t position = Identifier::NBITS; // overall bit position - used for debugging only
690 
691  for (size_t k = 0; k < m_regions.size(); ++k) {
692  bool selected = false;
693 
694  const IdDictRegion& region = *m_regions[k];
695 
696  // Must skip empty regions - can arise when a tag selects an
697  // empty region
698  if (region.m_is_empty) continue;
699 
700  for (size_t i = 0; i < region.m_implementation.size(); ++i) {
701  if (i >= localPrefix.fields()) {
706  selected = true;
707  index1 = i;
708  break;
709  }
710 
712 
713  if (!impl.field().match(localPrefix[i])) {
714  break;
715  }
716  }
717  if (!selected) {
718  continue;
719  }
720 
726  for (size_t i = index1; i < region.m_implementation.size(); ++i) {
728 
729  if (impl.bits() == 0) continue;
730  Identifier::value_type mask = (static_cast<Identifier::value_type>(1) << impl.bits()) - 1;
731  if (position < impl.bits()) break; // Nothing more to get
732  size_t index = id.extract(position - impl.bits(), mask);
733 
734  if (index >= impl.ored_field().get_indices()) {
741  selected = false;
742  break;
743  }
744 
745  ExpandedIdentifier::element_type value = impl.ored_field().get_value_at(index);
746 
753  if (!impl.field().match(value)) {
754  selected = false;
755  break;
756  }
757 
758 
759 
760  // Found value
761 
762  unpackedId.add(value);
763  localPrefix.add(value);
764 
765  position -= impl.bits(); // overall bit position
766 
767 
768 
769  index1++; // next field
770 
771  if (index1 > index2) break; // quit at index2
772  }
773 
774  if (selected) break;
775  }
776 
777  return(0);
778 }

◆ unpack() [3/3]

int IdDictDictionary::unpack ( const Identifier id,
size_t  first_field_index,
size_t  field_index,
size_t  region_index,
int &  field 
) const

Unpack a single field of the value_type id.

Unpack a single field of the bits32 id.

One specifies the field index desired and passes in the region index to be used for decoding. The region index is obtained from find_region. The first_field_index is normally 0. It is non-zero when fields 0 to first_field_index -1 are missing from the compact

Definition at line 977 of file IdDictDictionary.cxx.

981  {
982  field = 0;
983 
984  if (m_do_checks) {
985  // Check regions
986  if (region_index >= m_regions.size()) {
987  std::cout << "IdDictDictionary::unpack - region index too large. Index, nregions "
988  << region_index << " " << m_regions.size() << std::endl;
989  return(1);
990  }
991  }
992 
993  const IdDictRegion& region = *m_regions.at(region_index);
994 
995  if (m_do_checks) {
996  // check number of fields
997  if (field_index >= region.m_implementation.size()) {
998  std::cout << "IdDictDictionary::unpack - field index too large. Index, nfields "
999  << field_index << " " << region.m_implementation.size()
1000  << std::endl;
1001  return(1);
1002  }
1003  }
1004 
1005  const IdDictFieldImplementation& impl = region.m_implementation.at(field_index);
1006  size_t prefix_offset = 0;
1007 
1008  size_t position = Identifier::NBITS; // overall bit position
1009 
1010  // One or more fields missing from prefix, get the offset
1011  if (first_field_index) {
1012  if (m_do_checks) {
1013  if (first_field_index >= region.m_implementation.size()) {
1014  std::cout << "IdDictDictionary::unpack - first_field_index too large. Index, nfields "
1015  << first_field_index << " " << region.m_implementation.size()
1016  << std::endl;
1017  return(1);
1018  }
1019  }
1020 
1021  // One or more fields missing from prefix, get the offset
1022  prefix_offset = region.m_implementation[first_field_index].bits_offset();
1023 
1024  if (m_do_checks) {
1025  // Should have a non-zero number of bits
1026  if (impl.bits() == 0) {
1027  std::cout << "IdDictDictionary::unpack - no bits for this field. Region, field indexes "
1028  << region_index << " " << field_index << std::endl;
1029  return(1);
1030  }
1031 
1032  // Check the shift value
1033  if (impl.bits() + impl.bits_offset() - prefix_offset > position) {
1034  std::cout << "IdDictDictionary::unpack - bits + offset too large. Region, field indexes, bits, offset "
1035  << region_index << " " << field_index << " "
1036  << impl.bits() << " " << impl.bits_offset() << " " << prefix_offset
1037  << std::endl;
1038  return(1);
1039  }
1040  }
1041  }
1042 
1043  Identifier::value_type mask = (static_cast<Identifier::value_type>(1) << impl.bits()) - 1;
1044 
1045  size_t index = id.extract(position -= impl.bits() + impl.bits_offset() - prefix_offset, mask);
1046 
1047  field = index;
1048  if (impl.decode_index()) field = impl.ored_field().get_value_at(index);
1049 
1050 
1051  return(0);
1052 }

◆ verify()

bool IdDictDictionary::verify ( ) const

Here, we verify global constraints : (this must only be applied after the resolve_references and generate_implementation operations)

a) There should be no overlap between any region duet.

b) In a dictionary, a given field (ie. with a given name) must always be referenced at the same depth across all regions and subregions.

c) When a region specifies a reference to a sub-dictionary :

  • the reference must be the last entry in the region
  • the first region entries of all regions should not overlap (regardless of the definition of the sub-dictionary). IE the first fields in these regions must be sufficient to unambiguously select the sub-dictionary.

d) Within a dictionary, a given field must always be described either through an enumeration, or through its bounds. However, the various usages of a given field may specify different tag set (for enumerations) or bounds (for a bounded field).

Definition at line 1194 of file IdDictDictionary.cxx.

1194  {
1195  // check #1
1196 
1198 
1199  if (mr.has_overlap()) return(false);
1200 
1201 
1202  return(true);
1203 }

Member Data Documentation

◆ m_all_regions

std::vector<IdDictRegion*> IdDictDictionary::m_all_regions

Definition at line 236 of file IdDictDictionary.h.

◆ m_author

std::string IdDictDictionary::m_author {}

Definition at line 219 of file IdDictDictionary.h.

◆ m_date

std::string IdDictDictionary::m_date {}

Definition at line 218 of file IdDictDictionary.h.

◆ m_dict_tag

std::string IdDictDictionary::m_dict_tag {}
private

Definition at line 243 of file IdDictDictionary.h.

◆ m_do_checks

bool IdDictDictionary::m_do_checks {false}
private

Definition at line 245 of file IdDictDictionary.h.

◆ m_do_neighbours

bool IdDictDictionary::m_do_neighbours {true}
private

Definition at line 246 of file IdDictDictionary.h.

◆ m_fields

std::map<std::string, IdDictField*> IdDictDictionary::m_fields

Definition at line 233 of file IdDictDictionary.h.

◆ m_file_name

std::string IdDictDictionary::m_file_name {}
private

Definition at line 242 of file IdDictDictionary.h.

◆ m_generated_implementation

bool IdDictDictionary::m_generated_implementation {false}
private

Definition at line 244 of file IdDictDictionary.h.

◆ m_groups

std::vector<IdDictGroup*> IdDictDictionary::m_groups

Definition at line 237 of file IdDictDictionary.h.

◆ m_name

std::string IdDictDictionary::m_name {}

Definition at line 216 of file IdDictDictionary.h.

◆ m_parent_dict

IdDictDictionary* IdDictDictionary::m_parent_dict {nullptr}

Definition at line 239 of file IdDictDictionary.h.

◆ m_regions

std::vector<IdDictRegion*> IdDictDictionary::m_regions

Definition at line 235 of file IdDictDictionary.h.

◆ m_subdictionary_names

std::vector<std::string> IdDictDictionary::m_subdictionary_names

Definition at line 238 of file IdDictDictionary.h.

◆ m_subregions

std::map<std::string, IdDictSubRegion*> IdDictDictionary::m_subregions

Definition at line 234 of file IdDictDictionary.h.

◆ m_version

std::string IdDictDictionary::m_version {}

Definition at line 217 of file IdDictDictionary.h.


The documentation for this class was generated from the following files:
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
IdDictDictionary::find_region
IdDictRegion * find_region(const std::string &region_name) const
Definition: IdDictDictionary.cxx:92
IdDictDictionary::build_multirange
MultiRange build_multirange() const
Get MultiRange for full dictionary.
Definition: IdDictDictionary.cxx:290
IdDictRegion::resolve_references
void resolve_references(const IdDictMgr &idd, IdDictDictionary &dictionary)
Definition: IdDictRegion.cxx:28
get_generator_info.result
result
Definition: get_generator_info.py:21
IdDictGroup
Definition: IdDictGroup.h:19
IdDictDictionary::do_neighbours
bool do_neighbours(void) const
Neighbour initialization is performed by default One can switch or query this mode for any idHelper w...
Definition: IdDictDictionary.cxx:1161
IdDictDictionary::m_dict_tag
std::string m_dict_tag
Definition: IdDictDictionary.h:243
IdDictRange::by_minmax
@ by_minmax
Definition: IdDictRange.h:40
IdDictLabel::m_value
int m_value
Definition: IdDictLabel.h:13
IdDictDictionary::m_groups
std::vector< IdDictGroup * > m_groups
Definition: IdDictDictionary.h:237
IdDictDictionary::do_checks
bool do_checks(void) const
Checks are performed by default in debug compilation and NOT in optimized compilation.
Definition: IdDictDictionary.cxx:1151
IdDict::get_bits
void get_bits(const RV &regions, size_t level, const std::string &group)
Definition: get_bits.cxx:45
index
Definition: index.py:1
IdDictRange::by_label
@ by_label
Definition: IdDictRange.h:38
IdDictDictionary::find_label
IdDictLabel * find_label(const std::string &field, const std::string &label) const
Definition: IdDictDictionary.cxx:56
Identifier::mask_shift
value_type mask_shift(value_type mask, size_type shift) const
extract field(s) by masking first, then shifting
IdDictDictionary::groups_const_it
groups_type::const_iterator groups_const_it
Definition: IdDictDictionary.h:231
ExpandedIdentifier::add
void add(element_type value)
Append a value into a new field.
skel.it
it
Definition: skel.GENtoEVGEN.py:407
IdDictRange::by_labels
@ by_labels
Definition: IdDictRange.h:39
IdDictDictionary::regions_type
std::vector< IdDictRegion * > regions_type
Definition: IdDictDictionary.h:225
ExpandedIdentifier
Definition: DetectorDescription/Identifier/Identifier/ExpandedIdentifier.h:102
IdDictDictionary::m_do_checks
bool m_do_checks
Definition: IdDictDictionary.h:245
IdDictField::find_label
IdDictLabel * find_label(const std::string &name) const
Definition: IdDictField.cxx:26
athena.value
value
Definition: athena.py:124
ReadOfcFromCool.field
field
Definition: ReadOfcFromCool.py:48
IdDictRegion::clear
void clear()
Definition: IdDictRegion.cxx:126
IdDictDictionary::find_field
IdDictField * find_field(const std::string &name) const
Definition: IdDictDictionary.cxx:36
CalibDbCompareRT.region_id
region_id
Definition: CalibDbCompareRT.py:68
IdDictRegion
Definition: IdDictRegion.h:20
python.utils.AtlRunQueryLookup.mask
string mask
Definition: AtlRunQueryLookup.py:460
IdDictRegion::m_name
std::string m_name
Definition: IdDictRegion.h:44
IdDictDictionary::verify
bool verify() const
Here, we verify global constraints : (this must only be applied after the resolve_references and gene...
Definition: IdDictDictionary.cxx:1194
IdDictLabel::m_valued
bool m_valued
Definition: IdDictLabel.h:12
IdDictDictionary::m_parent_dict
IdDictDictionary * m_parent_dict
Definition: IdDictDictionary.h:239
IdDictDictionary::size_type
Identifier::size_type size_type
Definition: IdDictDictionary.h:33
IdDictDictionary::groups_it
groups_type::iterator groups_it
Definition: IdDictDictionary.h:230
IdDictDictionary::m_fields
std::map< std::string, IdDictField * > m_fields
Definition: IdDictDictionary.h:233
IdDictDictionary::find_group
IdDictGroup * find_group(const std::string &group_name) const
Definition: IdDictDictionary.cxx:106
Identifier::ALL_BITS
static constexpr value_type ALL_BITS
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:33
IdDictRegion::build_range
Range build_range() const
Definition: IdDictRegion.cxx:147
Trk::index1
@ index1
Definition: BoundarySurfaceFace.h:48
Identifier::NBITS
static constexpr unsigned int NBITS
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:31
lumiFormat.i
int i
Definition: lumiFormat.py:85
DetDescrDictionaryDict::it1
std::vector< HWIdentifier >::iterator it1
Definition: DetDescrDictionaryDict.h:17
IdDictDictionary::m_generated_implementation
bool m_generated_implementation
Definition: IdDictDictionary.h:244
IdDictRegion::m_is_empty
bool m_is_empty
Definition: IdDictRegion.h:47
add-xsec-uncert-quadrature-N.label
label
Definition: add-xsec-uncert-quadrature-N.py:104
IdDictDictionary::m_regions
std::vector< IdDictRegion * > m_regions
Definition: IdDictDictionary.h:235
plotBeamSpotVxVal.range
range
Definition: plotBeamSpotVxVal.py:195
checkCorrelInHIST.prefix
dictionary prefix
Definition: checkCorrelInHIST.py:391
mc.group_name
group_name
Definition: mc.PhPy8EG_A14NNPDF23_NNLOPS_example.py:33
IdDictRegion::group_name
std::string group_name() const
Definition: IdDictRegion.cxx:13
IdDictRange::unknown
@ unknown
Definition: IdDictRange.h:35
IdDictDictionary::regions_it
regions_type::iterator regions_it
Definition: IdDictDictionary.h:226
IdDictLabel
Definition: IdDictLabel.h:10
Debugger::debug
static bool debug()
Definition: Debugger.h:18
MuonValidation_CreateResolutionProfiles.fit
def fit(h, emin, emax)
Definition: MuonValidation_CreateResolutionProfiles.py:69
IdDictDictionary::regions_const_it
regions_type::const_iterator regions_const_it
Definition: IdDictDictionary.h:227
python.update_ci_reference_files.mr
mr
Definition: update_ci_reference_files.py:415
grepfile.sep
sep
Definition: grepfile.py:38
MultiRange
A MultiRange combines several Ranges.
Definition: MultiRange.h:17
Trk::index2
@ index2
Definition: BoundarySurfaceFace.h:49
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
IdDictDictionary::m_do_neighbours
bool m_do_neighbours
Definition: IdDictDictionary.h:246
Range
A Range describes the possible ranges for the field values of an ExpandedIdentifier.
Definition: DetectorDescription/Identifier/Identifier/Range.h:29
IdDictRange
Definition: IdDictRange.h:18
impl
Definition: CaloGPUClusterAndCellDataMonitorOptions.h:46
DeMoScan.index
string index
Definition: DeMoScan.py:364
IdDictDictionary::m_subdictionary_names
std::vector< std::string > m_subdictionary_names
Definition: IdDictDictionary.h:238
CaloLCW_tf.group
group
Definition: CaloLCW_tf.py:28
IdDictDictionary::m_subregions
std::map< std::string, IdDictSubRegion * > m_subregions
Definition: IdDictDictionary.h:234
MultiRange::size
size_type size() const
Definition: MultiRange.cxx:70
IdentifierField
This is the individual specification for the range of one ExpandedIdentifier IdentifierField.
Definition: IdentifierField.h:21
IdDictRange::by_values
@ by_values
Definition: IdDictRange.h:37
ExpandedIdentifier::clear
void clear()
Erase all fields.
Identifier::value_type
unsigned long long value_type
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:27
isNumber
bool isNumber(const std::string &s)
Definition: PoolSvc.cxx:52
IdDictSubRegion
Definition: IdDictSubRegion.h:13
IdDictRange::by_value
@ by_value
Definition: IdDictRange.h:36
CaloCondBlobAlgs_fillNoiseFromASCII.tag
string tag
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:24
CaloCondBlobAlgs_fillNoiseFromASCII.fields
fields
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:106
IdDictField
Definition: IdDictField.h:15
IdDictDictionary::m_file_name
std::string m_file_name
Definition: IdDictDictionary.h:242
IdDictFieldImplementation
IdDictFieldImplementation is used to capture the specification of a single field of an Identifier.
Definition: IdDictFieldImplementation.h:58
IdDictDictionary::integrate_bits
void integrate_bits()
Set up integral of bits for efficient unpacking.
Definition: IdDictDictionary.cxx:270
ExpandedIdentifier::element_type
int element_type
Definition: DetectorDescription/Identifier/Identifier/ExpandedIdentifier.h:106
IdDictRegion::m_implementation
std::vector< IdDictFieldImplementation > m_implementation
Definition: IdDictRegion.h:42
fitman.k
k
Definition: fitman.py:528
Identifier
Definition: IdentifierFieldParser.cxx:14