ATLAS Offline Software
Public Types | Public Member Functions | Private Types | Private Attributes | List of all members
IdDictDictionary Class Reference

#include <IdDictDictionary.h>

Collaboration diagram for IdDictDictionary:

Public Types

using value_type = Identifier::value_type
 
using size_type = Identifier::size_type
 

Public Member Functions

 IdDictDictionary ()
 
 IdDictDictionary (const std::string &name, const std::string &version="", const std::string &date="", const std::string &author="")
 
 ~IdDictDictionary ()
 
const std::string & name () const
 Dictionary name. More...
 
const std::string & version () const
 Dictionary version. More...
 
size_t n_regions () const
 Number of contained regions. More...
 
const IdDictRegionregion (size_t i) const
 Region at index i. More...
 
const std::string & file_name () const
 Access to file name. More...
 
const std::string & dict_tag () const
 Access to the dictionary tag. More...
 
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
 
int find_region (const ExpandedIdentifier &id, size_type &index) const
 
IdDictRegionfind_region (const ExpandedIdentifier &id) const
 
IdDictRegionfind_region (const ExpandedIdentifier &id, const std::string &group_name) const
 
const std::vector< IdDictRegion * > & all_regions ()
 Non-const access to vector of all regions. More...
 
void add_field (IdDictField *field)
 
void add_subregion (IdDictSubRegion *subregion)
 
void add_dictentry (IdDictDictEntry *entry)
 
void add_region (IdDictRegion *region)
 
void add_subdictionary_name (const std::string &name)
 
void set_parent_dict (IdDictDictionary *parent_dict)
 
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...
 
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 ()
 
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 std::string &group, const Identifier &id, const ExpandedIdentifier &prefix, size_t index2, ExpandedIdentifier &unpackedId) const
 Unpack the value_type id to an expanded Identifier for a given group, 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 std::string &group, 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 for a given group, 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 () 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 () 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)
 
void dump () const
 Dump regions and trees for each group. More...
 

Private Types

using entries_type = std::vector< IdDictDictEntry * >
 
using entries_it = entries_type::iterator
 
using entries_const_it = entries_type::const_iterator
 
using regions_type = std::vector< IdDictRegion * >
 
using regions_it = regions_type::iterator
 
using regions_const_it = regions_type::const_iterator
 
using groups_type = std::vector< IdDictGroup * >
 
using groups_it = groups_type::iterator
 
using groups_const_it = groups_type::const_iterator
 

Private 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}
 
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

using IdDictDictionary::entries_const_it = entries_type::const_iterator
private

Definition at line 300 of file IdDictDictionary.h.

◆ entries_it

using IdDictDictionary::entries_it = entries_type::iterator
private

Definition at line 299 of file IdDictDictionary.h.

◆ entries_type

using IdDictDictionary::entries_type = std::vector<IdDictDictEntry*>
private

Definition at line 298 of file IdDictDictionary.h.

◆ groups_const_it

using IdDictDictionary::groups_const_it = groups_type::const_iterator
private

Definition at line 308 of file IdDictDictionary.h.

◆ groups_it

using IdDictDictionary::groups_it = groups_type::iterator
private

Definition at line 307 of file IdDictDictionary.h.

◆ groups_type

using IdDictDictionary::groups_type = std::vector<IdDictGroup*>
private

Definition at line 306 of file IdDictDictionary.h.

◆ regions_const_it

using IdDictDictionary::regions_const_it = regions_type::const_iterator
private

Definition at line 304 of file IdDictDictionary.h.

◆ regions_it

using IdDictDictionary::regions_it = regions_type::iterator
private

Definition at line 303 of file IdDictDictionary.h.

◆ regions_type

using IdDictDictionary::regions_type = std::vector<IdDictRegion*>
private

Definition at line 302 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() [1/2]

IdDictDictionary::IdDictDictionary ( )
default

◆ IdDictDictionary() [2/2]

IdDictDictionary::IdDictDictionary ( const std::string &  name,
const std::string &  version = "",
const std::string &  date = "",
const std::string &  author = "" 
)

Definition at line 36 of file IdDictDictionary.cxx.

40  : m_name (name),
42  m_date (date),
44 {
45 }

◆ ~IdDictDictionary()

IdDictDictionary::~IdDictDictionary ( )
default

Member Function Documentation

◆ add_dictentry()

void IdDictDictionary::add_dictentry ( IdDictDictEntry entry)

Definition at line 138 of file IdDictDictionary.cxx.

138  {
139  // Add region to corresponding group
141 
142  if (0 == group) {
144  m_groups.push_back(group);
145  }
146  group->add_dictentry(region);
147 }

◆ add_field()

void IdDictDictionary::add_field ( IdDictField field)

Definition at line 84 of file IdDictDictionary.cxx.

84  {
85  if (field == 0) return;
86 
87  m_fields[field->name()] = field;
88 }

◆ add_region()

void IdDictDictionary::add_region ( IdDictRegion region)

Definition at line 149 of file IdDictDictionary.cxx.

149  {
150  m_all_regions.push_back(region);
151 }

◆ add_subdictionary_name()

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

Definition at line 129 of file IdDictDictionary.cxx.

129  {
130  m_subdictionary_names.push_back(name);
131 }

◆ add_subregion()

void IdDictDictionary::add_subregion ( IdDictSubRegion subregion)

Definition at line 124 of file IdDictDictionary.cxx.

124  {
125  if (subregion == 0) return;
126  m_subregions[subregion->name()] = subregion;
127 }

◆ all_regions()

const std::vector< IdDictRegion * > & IdDictDictionary::all_regions ( )
inline

Non-const access to vector of all regions.

Definition at line 395 of file IdDictDictionary.h.

396 {
397  return m_all_regions;
398 }

◆ 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.name()) continue;
322 
323  // skip empty regions - may arise from alternate_regions
324  // where a tag selects an empty region
325  if (region.is_empty()) continue;
326 
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.name()) continue;
338 
339  // skip empty regions - may arise from alternate_regions
340  // where a tag selects an empty region
341  if (region.is_empty()) continue;
342 
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  size_t nimpl = region.n_implementation();
351  for (size_t i = 0; i < nimpl; ++i) {
353 
354 // new_range.add(impl.m_field);
355  new_range.add(impl.range()->build_range());
356 
357  if (last_field == impl.range()->field()->name()) {
358  break;
359  }
360  }
361  result.add(std::move(new_range));
362  }
363  }
364  }
365 
366  return(result);
367 }

◆ 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 369 of file IdDictDictionary.cxx.

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

◆ clear()

void IdDictDictionary::clear ( )

Definition at line 1049 of file IdDictDictionary.cxx.

1049  {
1050  {
1052 
1053  for (it = m_subregions.begin(); it != m_subregions.end(); ++it) {
1054  IdDictSubRegion* subregion = (*it).second;
1055  subregion->clear();
1056  delete subregion;
1057  }
1058 
1059  m_subregions.clear();
1060  }
1061 
1062  {
1064 
1065  for (it = m_fields.begin(); it != m_fields.end(); ++it) {
1066  IdDictField* field = (*it).second;
1067  field->clear();
1068  delete field;
1069  }
1070 
1071  m_fields.clear();
1072  }
1073 
1074  {
1076 
1077  for (it = m_groups.begin(); it != m_groups.end(); ++it) {
1078  IdDictGroup* group = *it;
1079  group->clear();
1080  delete group;
1081  }
1082 
1083  m_groups.clear();
1084  }
1085 }

◆ 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 882 of file IdDictDictionary.cxx.

887  {
888  idout = Identifier();
889  if (region_index >= m_regions.size()) {
890  std::cout << "IdDictDictionary::copy - region index too large. Index, nregions "
891  << region_index << " " << m_regions.size() << std::endl;
892  return(1);
893  }
894 
895  const IdDictRegion& region = *m_regions[region_index];
896 
897  if (first_field_index >= region.n_implementation() ||
898  begin_field_index >= region.n_implementation() ||
899  end_field_index >= region.n_implementation()) {
900  std::cout << "IdDictDictionary::copy - field index too large. Indexes first, begin, end, nfields "
901  << first_field_index << " "
902  << begin_field_index << " "
903  << end_field_index << " "
905  << std::endl;
906  return(1);
907  }
908 
909  size_t missing_offset = 0;
910  if (first_field_index) {
911  if (first_field_index > begin_field_index) {
912  std::cout << "IdDictDictionary::copy - first_field_index > begin_field_index. Indexes "
913  << first_field_index << " " << begin_field_index << std::endl;
914  return(1);
915  }
916  // One or more fields missing from prefix, get the offset
917  missing_offset = region.implementation(first_field_index).bits_offset();
918  }
919 
920  size_t prefix_offset = 0;
921  if (begin_field_index) {
922  if (begin_field_index > end_field_index) {
923  std::cout << "IdDictDictionary::copy - begin_field_index > end_field_index. Indexes "
924  << begin_field_index << " " << end_field_index << std::endl;
925  return(1);
926  }
927  // One or more fields missing from prefix, get the offset
928  prefix_offset = region.implementation(begin_field_index).bits_offset();
929  }
930 
931  const IdDictFieldImplementation& impl = region.implementation(end_field_index);
932  size_t suffix_offset = impl.bits() + impl.bits_offset();
933 
934  size_t position = Identifier::NBITS; // overall bit position
935 
936  if (position < prefix_offset - missing_offset) {
937  std::cout << "IdDictDictionary::copy - position < prefix + missing. "
938  << prefix_offset << " " << missing_offset << std::endl;
939  return(1);
940  }
941 
942 
943  if (position < suffix_offset + missing_offset) {
944  std::cout << "IdDictDictionary::copy - position < suffix + missing. "
945  << suffix_offset << " " << missing_offset << std::endl;
946  return(1);
947  }
948 
949 
950  // prepare the mask for copying
951 
953 
954  Identifier::value_type prefix_mask =
955  prefix_offset ? (static_cast<Identifier::value_type>(1) << (position - prefix_offset + missing_offset)) - 1 : 0;
956 
957  Identifier::value_type suffix_mask =
958  (static_cast<Identifier::value_type>(1) << (position - suffix_offset + missing_offset)) - 1;
959 
960  mask -= prefix_mask + suffix_mask;
961 
962  idout = idin.mask_shift(mask, missing_offset);
963 
964 
965  return(0);
966 }

◆ dict_tag()

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

Access to the dictionary tag.

Definition at line 374 of file IdDictDictionary.h.

374  {
375  return m_dict_tag;
376 }

◆ do_checks()

bool IdDictDictionary::do_checks ( ) 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 969 of file IdDictDictionary.cxx.

969  {
970  return(m_do_checks);
971 }

◆ do_neighbours()

bool IdDictDictionary::do_neighbours ( ) const

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

Definition at line 979 of file IdDictDictionary.cxx.

979  {
980  return(m_do_neighbours);
981 }

◆ dump()

void IdDictDictionary::dump ( ) const

Dump regions and trees for each group.

Definition at line 1089 of file IdDictDictionary.cxx.

1090 {
1091  std::cout << "=== IdDictDictionary " << m_name << " " << m_version << " "
1092  << m_date << " " << m_author << "\n";
1093  for (const IdDictGroup* g : m_groups) {
1094  g->dump();
1095  }
1096  std::cout.flush();
1097 }

◆ file_name()

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

Access to file name.

Definition at line 367 of file IdDictDictionary.h.

367  {
368  return m_file_name;
369 }

◆ find_field()

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

Definition at line 47 of file IdDictDictionary.cxx.

47  {
48  std::map <std::string, IdDictField*>::const_iterator it;
49 
50  it = m_fields.find(name);
51 
52  if (it == m_fields.end()) {
53  // If parent exists, look for field there
54  if (m_parent_dict) {
55  it = m_parent_dict->m_fields.find(name);
56  if (it == m_parent_dict->m_fields.end()) {
57  return(0);
58  }
59  } else {
60  return(0);
61  }
62  }
63 
64  return((*it).second);
65 }

◆ find_group()

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

Definition at line 115 of file IdDictDictionary.cxx.

115  {
116  for (size_t i = 0; i < m_groups.size(); ++i) {
118  if ((group != 0) && (group->name() == group_name)) return(group);
119  }
120 
121  return(0);
122 }

◆ find_label()

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

Definition at line 67 of file IdDictDictionary.cxx.

67  {
68  IdDictField* idField = find_field(field);
69 
70  if (!idField) return nullptr;
71 
72  return(idField->find_label(label));
73 }

◆ find_region() [1/5]

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

Definition at line 255 of file IdDictDictionary.cxx.

255  {
256  return find_region(id, "");
257 }

◆ find_region() [2/5]

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

Definition at line 259 of file IdDictDictionary.cxx.

259  {
260  // Find first region that matches id
261 
262  IdDictRegion* pRegion = 0;
263 
265 
266  for (it = m_regions.begin(); it != m_regions.end(); ++it) {
267  IdDictRegion& region = *(*it);
268  if ((group_name != "") && (region.group_name() != group_name)) continue;
269 
271 
272  if (range.match(id) && range.fields() >= id.fields()) {
273  pRegion = &region;
274  }
275  }
276 
277  return(pRegion);
278 }

◆ find_region() [3/5]

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

Definition at line 235 of file IdDictDictionary.cxx.

235  {
236  // Find first region that matches id
237 
239 
240  size_type i = 0;
241  for (it = m_regions.begin(); it != m_regions.end(); ++it, ++i) {
242  const IdDictRegion& region = *(*it);
243 
245 
246  if (range.match(id) && range.fields() >= id.fields()) {
247  index = i;
248  return(0);
249  }
250  }
251 
252  return(1);
253 }

◆ find_region() [4/5]

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

Definition at line 101 of file IdDictDictionary.cxx.

101  {
102  return find_region(region_name, "");
103 }

◆ find_region() [5/5]

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

Definition at line 105 of file IdDictDictionary.cxx.

105  {
106  for (IdDictRegion* region : m_regions) {
107  if (!region) continue;
108  if ((group_name != "") && (region->group_name() != group_name)) continue;
109  if ((region_name != "") && (region->name() != region_name)) continue;
110  return region;
111  }
112  return nullptr;
113 }

◆ find_subregion()

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

Definition at line 91 of file IdDictDictionary.cxx.

91  {
92  std::map <std::string, IdDictSubRegion*>::const_iterator it;
93 
94  it = m_subregions.find(name);
95 
96  if (it == m_subregions.end()) return(0);
97 
98  return((*it).second);
99 }

◆ generate_implementation()

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

Definition at line 172 of file IdDictDictionary.cxx.

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

◆ get_label_value()

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

Definition at line 75 of file IdDictDictionary.cxx.

75  {
76  IdDictLabel* idLabel = find_label(field, label);
77 
78  if (!idLabel || !idLabel->valued()) return(1);
79 
80  value = idLabel->value();
81  return(0);
82 }

◆ integrate_bits()

void IdDictDictionary::integrate_bits ( )

Set up integral of bits for efficient unpacking.

Definition at line 281 of file IdDictDictionary.cxx.

281  {
282  // For each region, loop over its levels and set the bit offset
283  // for each FieldImplementation
284 
285  for (IdDictRegion* region : m_regions) {
287  }
288 }

◆ n_regions()

size_t IdDictDictionary::n_regions ( ) const
inline

Number of contained regions.

Definition at line 359 of file IdDictDictionary.h.

360 {
361  return m_regions.size();
362 }

◆ name()

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

Dictionary name.

Definition at line 332 of file IdDictDictionary.h.

333 {
334  return m_name;
335 }

◆ 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 444 of file IdDictDictionary.cxx.

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

◆ 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 521 of file IdDictDictionary.cxx.

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

◆ region()

const IdDictRegion & IdDictDictionary::region ( size_t  i) const
inline

Region at index i.

Definition at line 350 of file IdDictDictionary.h.

351 {
352  return *m_regions.at(i);
353 }

◆ 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 608 of file IdDictDictionary.cxx.

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

◆ reset_implementation()

void IdDictDictionary::reset_implementation ( )

Definition at line 223 of file IdDictDictionary.cxx.

223  {
225  m_regions.clear();
227  for (it = m_groups.begin(); it != m_groups.end(); ++it) {
228  (*it)->reset_implementation();
229  }
231  }
232 }

◆ resolve_references()

void IdDictDictionary::resolve_references ( const IdDictMgr idd)

Definition at line 153 of file IdDictDictionary.cxx.

153  {
154  {
156 
157  for (it = m_subregions.begin(); it != m_subregions.end(); ++it) {
158  IdDictSubRegion* subregion = (*it).second;
159  subregion->resolve_references(idd, *this);
160  }
161  }
162  {
163  size_t index = 0;
164 
166  for (it = m_groups.begin(); it != m_groups.end(); ++it) {
167  (*it)->resolve_references(idd, *this, index);
168  }
169  }
170 }

◆ set_dict_tag()

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

Set the dictionary tag.

Definition at line 388 of file IdDictDictionary.h.

388  {
389  m_dict_tag = tag;
390 }

◆ set_do_checks()

void IdDictDictionary::set_do_checks ( bool  do_checks)

Definition at line 974 of file IdDictDictionary.cxx.

974  {
976 }

◆ set_do_neighbours()

void IdDictDictionary::set_do_neighbours ( bool  do_neighbours)

Definition at line 984 of file IdDictDictionary.cxx.

984  {
986 }

◆ set_file_name()

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

Set file name.

Definition at line 381 of file IdDictDictionary.h.

381  {
382  m_file_name = name;
383 }

◆ set_parent_dict()

void IdDictDictionary::set_parent_dict ( IdDictDictionary parent_dict)

Definition at line 133 of file IdDictDictionary.cxx.

134 {
135  m_parent_dict = parent_dict;
136 }

◆ 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 1033 of file IdDictDictionary.cxx.

1033  {
1034  // verify
1035  if (verify()) {
1036  std::map< ExpandedIdentifier, IdDictDictEntry* > regions;
1037 
1039 
1040  for (it = m_groups.begin(); it != m_groups.end(); ++it) {
1041  (*it)->sort();
1042  }
1043  } else {
1044  std::cout << "IdDictDictionary::sort - WARNING verify is FALSE - cannot sort "
1045  << std::endl;
1046  }
1047 }

◆ unpack() [1/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 795 of file IdDictDictionary.cxx.

799  {
800  field = 0;
801 
802  if (m_do_checks) {
803  // Check regions
804  if (region_index >= m_regions.size()) {
805  std::cout << "IdDictDictionary::unpack - region index too large. Index, nregions "
806  << region_index << " " << m_regions.size() << std::endl;
807  return(1);
808  }
809  }
810 
811  const IdDictRegion& region = *m_regions.at(region_index);
812 
813  if (m_do_checks) {
814  // check number of fields
815  if (field_index >= region.n_implementation()) {
816  std::cout << "IdDictDictionary::unpack - field index too large. Index, nfields "
817  << field_index << " " << region.n_implementation()
818  << std::endl;
819  return(1);
820  }
821  }
822 
823  const IdDictFieldImplementation& impl = region.implementation(field_index);
824  size_t prefix_offset = 0;
825 
826  size_t position = Identifier::NBITS; // overall bit position
827 
828  // One or more fields missing from prefix, get the offset
829  if (first_field_index) {
830  if (m_do_checks) {
831  if (first_field_index >= region.n_implementation()) {
832  std::cout << "IdDictDictionary::unpack - first_field_index too large. Index, nfields "
833  << first_field_index << " " << region.n_implementation()
834  << std::endl;
835  return(1);
836  }
837  }
838 
839  // One or more fields missing from prefix, get the offset
840  prefix_offset = region.implementation(first_field_index).bits_offset();
841 
842  if (m_do_checks) {
843  // Should have a non-zero number of bits
844  if (impl.bits() == 0) {
845  std::cout << "IdDictDictionary::unpack - no bits for this field. Region, field indexes "
846  << region_index << " " << field_index << std::endl;
847  return(1);
848  }
849 
850  // Check the shift value
851  if (impl.bits() + impl.bits_offset() - prefix_offset > position) {
852  std::cout << "IdDictDictionary::unpack - bits + offset too large. Region, field indexes, bits, offset "
853  << region_index << " " << field_index << " "
854  << impl.bits() << " " << impl.bits_offset() << " " << prefix_offset
855  << std::endl;
856  return(1);
857  }
858  }
859  }
860 
861  Identifier::value_type mask = (static_cast<Identifier::value_type>(1) << impl.bits()) - 1;
862 
863  size_t index = id.extract(position -= impl.bits() + impl.bits_offset() - prefix_offset, mask);
864 
865  field = index;
866  if (impl.decode_index()) field = impl.ored_field().get_value_at(index);
867 
868 
869  return(0);
870 }

◆ unpack() [2/3]

int IdDictDictionary::unpack ( const std::string &  group,
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 for a given group, considering the provided prefix (result will include the prefix) and up to index2 - (index1 is assumed to be 0, i.e.

part of prefix).

Returns 0 on success, nonzero on error.

Definition at line 685 of file IdDictDictionary.cxx.

691 {
692  const IdDictGroup* g = find_group (group);
693  ExpandedIdentifier unpacked;
694  std::vector<const IdDictFieldImplementation*> impls;
695  int ret = 1;
696  if (g) {
697  ret = g->unpack (id, prefix, index2, unpacked, &impls);
698  }
699  if (ret == 0) {
700  assert (unpacked.fields() == impls.size());
701  for (size_t i = 0; i < unpacked.fields(); ++i) {
702  // Add value to string
703 
704  std::string str_value("nil");
705 
706  const IdDictFieldImplementation& impl = *impls[i];
708 
709  // The policy below is:
710  // - if a value is a character string or name, just add this name
711  // - if a value is a number, then prefix it with the
712  // name of the field
713  //
714  // NOTE: min/max is a number, but for value/label we
715  // distinguish between number and name by looking for an IdDictLabel
716  const IdDictRange* range = impl.range();
717  const IdDictLabel* label = range->field()->find_label(range->label());
718  switch (range->specification()) {
720  // For a range of values (numbers), add in the field name
721  str_value = range->field()->name() + ' '+std::to_string(value);
722  break;
723 
726  str_value = "";
727  if (!label) {
728  // Is a number, add in field name
729  str_value += range->field()->name() + ' ';
730  }
731  str_value += range->label();
732  break;
733 
736  str_value = "";
737  // Is a name
738  if (label) {
739  // Found label with "find_label" on the field
740  if (label->valued()) {
741  str_value += range->label();
742  }
743  } else {
744  // If not found with the "find" above, we must
745  // get the value and name from the range
746  // itself.
747 
748  unsigned int index1 = 0;
749  for (int v : range->values()) {
750  if (value == v) break;
751  ++index1;
752  }
753 
754  if (index1 < range->labels().size()) {
755  if (isNumber(range->labels()[index1])) {
756  str_value += range->field()->name() + ' ';
757  }
758  str_value += range->labels()[index1];
759  } else {
760  std::cout << "IdDictDictionary::unpack - Could not find value." << std::endl;
761  std::cout << "value " << value << std::endl;
762  std::cout << "field values " << std::endl;
763  for (int v : range->values()) {
764  std::cout << v << " ";
765  }
766  std::cout << std::endl;
767  }
768  }
769  break;
770 
772 
773  std::cout << "unknown" << std::endl;
774 
775  break;
776  }
777 
778  if (i > 0) unpackedId += sep;
779  unpackedId += str_value;
780  }
781  }
782 
783  return ret;
784 }

◆ unpack() [3/3]

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

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

part of prefix).

Returns 0 on success, nonzero on error.

Definition at line 664 of file IdDictDictionary.cxx.

669 {
670  const IdDictGroup* g = find_group (group);
671  int ret = 1;
672  if (g) {
673  ret = g->unpack (id, prefix, index2, unpackedId);
674  }
675  return ret;
676 }

◆ 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 1012 of file IdDictDictionary.cxx.

1012  {
1013  // check #1
1014 
1016 
1017  if (mr.has_overlap()) return(false);
1018 
1019 
1020  return(true);
1021 }

◆ version()

const std::string & IdDictDictionary::version ( ) const
inline

Dictionary version.

Definition at line 341 of file IdDictDictionary.h.

342 {
343  return m_version;
344 }

Member Data Documentation

◆ m_all_regions

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

Definition at line 313 of file IdDictDictionary.h.

◆ m_author

std::string IdDictDictionary::m_author {}
private

Definition at line 296 of file IdDictDictionary.h.

◆ m_date

std::string IdDictDictionary::m_date {}
private

Definition at line 295 of file IdDictDictionary.h.

◆ m_dict_tag

std::string IdDictDictionary::m_dict_tag {}
private

Definition at line 319 of file IdDictDictionary.h.

◆ m_do_checks

bool IdDictDictionary::m_do_checks {false}
private

Definition at line 321 of file IdDictDictionary.h.

◆ m_do_neighbours

bool IdDictDictionary::m_do_neighbours {true}
private

Definition at line 322 of file IdDictDictionary.h.

◆ m_fields

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

Definition at line 310 of file IdDictDictionary.h.

◆ m_file_name

std::string IdDictDictionary::m_file_name {}
private

Definition at line 318 of file IdDictDictionary.h.

◆ m_generated_implementation

bool IdDictDictionary::m_generated_implementation {false}
private

Definition at line 320 of file IdDictDictionary.h.

◆ m_groups

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

Definition at line 314 of file IdDictDictionary.h.

◆ m_name

std::string IdDictDictionary::m_name {}
private

Definition at line 293 of file IdDictDictionary.h.

◆ m_parent_dict

IdDictDictionary* IdDictDictionary::m_parent_dict {nullptr}
private

Definition at line 316 of file IdDictDictionary.h.

◆ m_regions

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

Definition at line 312 of file IdDictDictionary.h.

◆ m_subdictionary_names

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

Definition at line 315 of file IdDictDictionary.h.

◆ m_subregions

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

Definition at line 311 of file IdDictDictionary.h.

◆ m_version

std::string IdDictDictionary::m_version {}
private

Definition at line 294 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:101
IdDictLabel::value
int value() const
Definition: IdDictLabel.h:51
IdDictRegion::clear
virtual void clear() override
Definition: IdDictRegion.cxx:225
IdDictDictionary::build_multirange
MultiRange build_multirange() const
Get MultiRange for full dictionary.
Definition: IdDictDictionary.cxx:290
IdDictRegion::build_range
virtual Range build_range() const override
Definition: IdDictRegion.cxx:265
get_generator_info.result
result
Definition: get_generator_info.py:21
IdDictGroup
Definition: IdDictGroup.h:25
IdDictDictionary::m_dict_tag
std::string m_dict_tag
Definition: IdDictDictionary.h:319
IdDictDictionary::version
const std::string & version() const
Dictionary version.
Definition: IdDictDictionary.h:341
IdDictRange::by_minmax
@ by_minmax
Definition: IdDictRange.h:26
IdDictDictionary::m_groups
std::vector< IdDictGroup * > m_groups
Definition: IdDictDictionary.h:314
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
IdDictDictionary::region
const IdDictRegion & region(size_t i) const
Region at index i.
Definition: IdDictDictionary.h:350
IdDictRange::by_label
@ by_label
Definition: IdDictRange.h:24
IdDictDictionary::find_label
IdDictLabel * find_label(const std::string &field, const std::string &label) const
Definition: IdDictDictionary.cxx:67
Identifier::mask_shift
value_type mask_shift(value_type mask, size_type shift) const
extract field(s) by masking first, then shifting
skel.it
it
Definition: skel.GENtoEVGEN.py:407
IdDictRange::by_labels
@ by_labels
Definition: IdDictRange.h:25
ExpandedIdentifier
Definition: DetectorDescription/Identifier/Identifier/ExpandedIdentifier.h:102
IdDictDictionary::m_do_checks
bool m_do_checks
Definition: IdDictDictionary.h:321
IdDictField::find_label
IdDictLabel * find_label(const std::string &name) const
Definition: IdDictField.cxx:23
athena.value
value
Definition: athena.py:124
ExpandedIdentifier::fields
size_type fields() const
ReadOfcFromCool.field
field
Definition: ReadOfcFromCool.py:48
IdDictDictionary::name
const std::string & name() const
Dictionary name.
Definition: IdDictDictionary.h:332
IdDictLabel::valued
bool valued() const
Definition: IdDictLabel.h:58
IdDictDictionary::find_field
IdDictField * find_field(const std::string &name) const
Definition: IdDictDictionary.cxx:47
CalibDbCompareRT.region_id
region_id
Definition: CalibDbCompareRT.py:67
IdDictRegion
Definition: IdDictRegion.h:20
IdDictDictionary::m_version
std::string m_version
Definition: IdDictDictionary.h:294
python.utils.AtlRunQueryLookup.mask
string mask
Definition: AtlRunQueryLookup.py:459
IdDictDictionary::verify
bool verify() const
Here, we verify global constraints : (this must only be applied after the resolve_references and gene...
Definition: IdDictDictionary.cxx:1012
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
IdDictDictionary::m_parent_dict
IdDictDictionary * m_parent_dict
Definition: IdDictDictionary.h:316
IdDictLabel
Definition: IdDictLabel.h:10
IdDictRegion::implementation
const IdDictFieldImplementation & implementation(size_t i) const
Definition: IdDictRegion.cxx:34
IdDictDictionary::m_fields
std::map< std::string, IdDictField * > m_fields
Definition: IdDictDictionary.h:310
beamspotnt.labels
list labels
Definition: bin/beamspotnt.py:1446
IdDictDictionary::find_group
IdDictGroup * find_group(const std::string &group_name) const
Definition: IdDictDictionary.cxx:115
Identifier::ALL_BITS
static constexpr value_type ALL_BITS
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:33
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
IdDictDictionary::m_author
std::string m_author
Definition: IdDictDictionary.h:296
python.CaloCondTools.g
g
Definition: CaloCondTools.py:15
IdDictDictionary::m_generated_implementation
bool m_generated_implementation
Definition: IdDictDictionary.h:320
IdDictFieldImplementation::bits_offset
size_type bits_offset() const
Definition: IdDictFieldImplementation.h:208
add-xsec-uncert-quadrature-N.label
label
Definition: add-xsec-uncert-quadrature-N.py:104
IdDictDictionary::groups_it
groups_type::iterator groups_it
Definition: IdDictDictionary.h:307
IdDictDictionary::m_regions
std::vector< IdDictRegion * > m_regions
Definition: IdDictDictionary.h:312
IdDictDictionary::groups_const_it
groups_type::const_iterator groups_const_it
Definition: IdDictDictionary.h:308
plotBeamSpotVxVal.range
range
Definition: plotBeamSpotVxVal.py:194
checkCorrelInHIST.prefix
dictionary prefix
Definition: checkCorrelInHIST.py:391
mc.group_name
group_name
Definition: mc.PhPy8EG_A14NNPDF23_NNLOPS_example.py:33
IdDictRange::unknown
@ unknown
Definition: IdDictRange.h:21
IdDictDictionary::regions_const_it
regions_type::const_iterator regions_const_it
Definition: IdDictDictionary.h:304
IdDictDictionary::do_checks
bool do_checks() const
Checks are performed by default in debug compilation and NOT in optimized compilation.
Definition: IdDictDictionary.cxx:969
IdDictRegion::integrate_bits
void integrate_bits()
Definition: IdDictRegion.cxx:246
Debugger::debug
static bool debug()
Definition: Debugger.h:18
IdDictRegion::n_implementation
size_t n_implementation() const
Definition: IdDictRegion.cxx:28
IdDictDictionary::m_date
std::string m_date
Definition: IdDictDictionary.h:295
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
ActsTrk::to_string
std::string to_string(const DetectorType &type)
Definition: GeometryDefs.h:34
fillHVMap_fromASCII.date
string date
Definition: fillHVMap_fromASCII.py:8
IdDictDictionary::do_neighbours
bool do_neighbours() const
Neighbour initialization is performed by default One can switch or query this mode for any idHelper w...
Definition: IdDictDictionary.cxx:979
IdDictDictionary::m_do_neighbours
bool m_do_neighbours
Definition: IdDictDictionary.h:322
IdDictDictionary::regions_it
regions_type::iterator regions_it
Definition: IdDictDictionary.h:303
IdDictDictionary::regions_type
std::vector< IdDictRegion * > regions_type
Definition: IdDictDictionary.h:302
Range
A Range describes the possible ranges for the field values of an ExpandedIdentifier.
Definition: DetectorDescription/Identifier/Identifier/Range.h:29
IdDictDictionary::size_type
Identifier::size_type size_type
Definition: IdDictDictionary.h:33
IdDictRange
Definition: IdDictRange.h:18
python.PyAthena.v
v
Definition: PyAthena.py:154
impl
Definition: CaloGPUClusterAndCellDataMonitorOptions.h:46
DeMoScan.index
string index
Definition: DeMoScan.py:362
IdDictDictionary::m_subdictionary_names
std::vector< std::string > m_subdictionary_names
Definition: IdDictDictionary.h:315
CaloLCW_tf.group
group
Definition: CaloLCW_tf.py:28
IdDictDictionary::m_name
std::string m_name
Definition: IdDictDictionary.h:293
IdDictDictionary::m_subregions
std::map< std::string, IdDictSubRegion * > m_subregions
Definition: IdDictDictionary.h:311
MultiRange::size
size_type size() const
Definition: MultiRange.cxx:70
CaloCondBlobAlgs_fillNoiseFromASCII.author
string author
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:25
IdDictRange::by_values
@ by_values
Definition: IdDictRange.h:23
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:53
IdDictSubRegion
Definition: IdDictSubRegion.h:13
IdDictRange::by_value
@ by_value
Definition: IdDictRange.h:22
CaloCondBlobAlgs_fillNoiseFromASCII.tag
string tag
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:23
CaloCondBlobAlgs_fillNoiseFromASCII.fields
fields
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:105
IdDictField
Definition: IdDictField.h:15
IdDictDictionary::m_file_name
std::string m_file_name
Definition: IdDictDictionary.h:318
IdDictFieldImplementation
IdDictFieldImplementation is used to capture the specification of a single field of an Identifier.
Definition: IdDictFieldImplementation.h:58
IdDictRegion::is_empty
bool is_empty() const
Definition: IdDictRegion.h:287
IdDictDictionary::integrate_bits
void integrate_bits()
Set up integral of bits for efficient unpacking.
Definition: IdDictDictionary.cxx:281
ExpandedIdentifier::element_type
int element_type
Definition: DetectorDescription/Identifier/Identifier/ExpandedIdentifier.h:106
IdDictRegion::name
const std::string & name() const
Definition: IdDictRegion.h:154
fitman.k
k
Definition: fitman.py:528
IdDictRegion::group_name
virtual std::string group_name() const override
Definition: IdDictRegion.cxx:23
IdDictDictionary::m_all_regions
std::vector< IdDictRegion * > m_all_regions
Definition: IdDictDictionary.h:313
IdDictRegion::resolve_references
virtual void resolve_references(const IdDictMgr &idd, IdDictDictionary &dictionary) override
Definition: IdDictRegion.cxx:127
Identifier
Definition: IdentifierFieldParser.cxx:14