ATLAS Offline Software
IdDictMgr.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 // $Header: /DetectorDescription/IdDict/src/IdDictMgr.cxx,v 1.43 2008-12-09 09:49:43 dquarrie Exp $
6 
7 #include "IdDict/IdDictDefs.h"
9 #include <fstream>
10 #include <iostream>
11 
12 #include <stdio.h>
13 #include <cstdlib>
14 #include <atomic>
15 
16 
17 
18 class Debugger
19 {
20 public:
21  static bool get_debug_state()
22  {
23  if (::getenv ("IDDEBUG") != 0) {
24  return true;
25  }
26  return false;
27  }
28  static bool debug ()
29  {
30  static const bool debug_state = get_debug_state();
31  return debug_state;
32  }
33 };
34 
35 static bool isNumber(const std::string& str)
36 {
37  bool result = true;
38  for (unsigned int i=0; i<str.size(); ++i) {
39  if(!isdigit(str[i])) return (false);
40  }
41  if (0 == str.size()) return (false);
42 
43  return (result);
44 }
45 
46 
47 
52 {
53 public:
54  static int build_id ();
55 
56 };
57 
58 template <class T>
59 class TypeId
60 {
61 public:
62  operator int ()
63  {
64  static const int i = TypeIdBuilder::build_id ();
65  return (i);
66  }
67 };
68 
70 {
71  static std::atomic<int> i = 0;
72  i++;
73  return (i);
74 }
75 
76 
81  :
82  m_resolved_references(false),
83  m_generated_implementation(false),
84  m_do_checks(false),
85  m_do_neighbours(true)
86 {
87 }
88 
90 {
91  clear();
92 }
93 
94 const std::string& IdDictMgr::tag() const
95 {
96  return m_tag;
97 }
98 
99 const std::string& IdDictMgr::DTD_version() const
100 {
101  return m_DTD_version;
102 }
103 
104 bool IdDictMgr::do_checks () const
105 {
106  return m_do_checks;
107 }
108 
109 void
110 IdDictMgr::set_do_checks (bool do_checks)
111 {
113  for (const auto& p : m_dictionaries) {
114  IdDictDictionary* d = p.second;
115  d->set_do_checks(do_checks);
116  }
117 }
118 
120 {
121  return m_do_neighbours;
122 }
123 
124 void
125 IdDictMgr::set_do_neighbours (bool do_neighbours)
126 {
128  for (const auto& p : m_dictionaries) {
129  IdDictDictionary* d = p.second;
130  d->set_do_neighbours(do_neighbours);
131  }
132 }
133 
134 const std::string&
135 IdDictMgr::find_metadata (const std::string& name) const
136 {
137  metadata_map::const_iterator it = m_metadata.find(name);
138  static const std::string empty;
139  if (it != m_metadata.end()) return (it->second);
140  else return empty;
141 }
142 
143 void
144 IdDictMgr::add_metadata (const std::string& name, const std::string& value)
145 {
146  if(!m_metadata.insert(metadata_map::value_type(name, value)).second) {
147  std::cout << "IdDictMgr::add_metadata> unable to add name/value " << name << "/" << value << std::endl;
148  }
149 }
150 
151 void
152 IdDictMgr::set_DTD_version(const std::string& DTD_version)
153 {
155 }
156 
157 
159 {
160  return (m_dictionaries);
161 }
162 
164 {
165  dictionary_map::const_iterator it;
166 
167  it = m_dictionaries.find (name);
168 
169  if (it == m_dictionaries.end ()) return (0);
170 
171  return ((*it).second);
172 }
173 
175 {
176  if (dictionary == 0) return;
177 
178  std::string& name = dictionary->m_name;
179 
180  // Delete entry if already there
182  if (it != m_dictionaries.end()) delete (*it).second;
183 
185 
186  if (Debugger::debug ())
187  {
189 
190  for (it = m_dictionaries.begin (); it != m_dictionaries.end (); ++it)
191  {
192  std::string s = (*it).first;
193  IdDictDictionary* d = (*it).second;
194 
195  std::cout << "IdDictMgr::add_dictionary> d[" << s << "]=" << d << std::endl;
196  }
197  }
198 }
199 
200 void IdDictMgr::add_subdictionary_name (const std::string& name)
201 {
202  m_subdictionary_names.insert(name);
203 }
204 
205 
207 {
209 
210  for (it = m_dictionaries.begin (); it != m_dictionaries.end (); ++it)
211  {
212  // From mgr, only resolve refs for top-level dictionaries
213  IdDictDictionary* dictionary = (*it).second;
214  if (m_subdictionary_names.find(dictionary->m_name) != m_subdictionary_names.end()) continue;
215  dictionary->resolve_references (*this);
216  }
217 }
218 
219 void IdDictMgr::generate_implementation (const std::string& tag)
220 {
221 
222  if (Debugger::debug ())
223  {
224  std::cout << "IdDictMgr::generate_implementation>" << std::endl;
225  }
226 
227  // Must reset the implementation for multiple passes, this resets
228  // the generated flags
230 
232 
233  m_tag = tag;
235  for (it = m_dictionaries.begin (); it != m_dictionaries.end (); ++it) {
236  // From mgr, only generate impl for top-level dictionaries
237  IdDictDictionary* dictionary = (*it).second;
238  if (m_subdictionary_names.find(dictionary->m_name) != m_subdictionary_names.end()) continue;
239  dictionary->generate_implementation (*this, tag);
240  }
242  }
243 }
244 
246 {
247 
248  std::cout << "IdDictMgr::reset_implementation" << std::endl;
249 
250 
252 
254  for (it = m_dictionaries.begin (); it != m_dictionaries.end (); ++it) {
255  // From mgr, only generate impl for top-level dictionaries
256  IdDictDictionary* dictionary = (*it).second;
257  if (m_subdictionary_names.find(dictionary->m_name) != m_subdictionary_names.end()) continue;
258  dictionary->reset_implementation ();
259  }
261  }
262 }
263 
264 
265 bool IdDictMgr::verify () const
266 {
267  dictionary_map::const_iterator it;
268 
269  for (it = m_dictionaries.begin (); it != m_dictionaries.end (); ++it)
270  {
271  const IdDictDictionary* dictionary = (*it).second;
272  if (!dictionary->verify ()) return (false);
273  }
274 
275  return (true);
276 }
277 
279 {
281 
282  for (it = m_dictionaries.begin (); it != m_dictionaries.end (); ++it)
283  {
284  IdDictDictionary* dictionary = (*it).second;
285  dictionary->clear ();
286  delete dictionary;
287  }
288 
289  m_dictionaries.clear ();
290  m_resolved_references = false;
292 
293 }
294 
299  :
300  m_parent_dict(0),
301  //m_resolved_references(false),
302  m_generated_implementation(false),
303  m_do_checks(false),
304  m_do_neighbours(true)
305 {}
306 
308 {
309 }
310 
311 IdDictField* IdDictDictionary::find_field (const std::string& name) const
312 {
313  std::map <std::string, IdDictField*>::const_iterator it;
314 
315  it = m_fields.find (name);
316 
317  if (it == m_fields.end ()) {
318  // If parent exists, look for field there
319  if(m_parent_dict) {
320  it = m_parent_dict->m_fields.find (name);
321  if (it == m_parent_dict->m_fields.end ()) {
322  return (0);
323  }
324  }
325  else {
326  return (0);
327  }
328  }
329 
330  return ((*it).second);
331 }
332 
333 IdDictLabel* IdDictDictionary::find_label (const std::string& field, const std::string& label) const
334 {
335  IdDictField* idField = find_field(field);
336  if (!idField) return nullptr;
337  return (idField->find_label(label));
338 }
339 
340 int IdDictDictionary::get_label_value (const std::string& field, const std::string& label, int& value) const
341 {
342  IdDictLabel* idLabel = find_label(field, label);
343  if (!idLabel || !idLabel->m_valued) return (1);
344  value = idLabel->m_value;
345  return (0);
346 }
347 
349 {
350  if (field == 0) return;
351 
352  std::string& name = field->m_name;
353 
354  m_fields[name] = field;
355 }
356 
358 {
359  std::map <std::string, IdDictSubRegion*>::const_iterator it;
360 
361  it = m_subregions.find (name);
362 
363  if (it == m_subregions.end ()) return (0);
364 
365  return ((*it).second);
366 }
367 
368 IdDictRegion* IdDictDictionary::find_region (const std::string& region_name) const
369 {
370  return find_region (region_name, "");
371 }
372 
373 IdDictRegion* IdDictDictionary::find_region (const std::string& region_name, const std::string& group_name) const
374 {
375  for (size_t i = 0; i < m_regions.size (); ++i)
376  {
377  IdDictRegion* region = m_regions[i];
378  if ( (group_name!= "") && (region->group_name() != group_name) ) continue;
379  if ((region != 0) && (region_name == region->m_name)) return (region);
380  }
381 
382  return (0);
383 }
384 
386 {
387  for (size_t i = 0; i < m_groups.size (); ++i)
388  {
390  if ((group != 0) && (group->name() == group_name)) return (group);
391  }
392 
393  return (0);
394 }
395 
397 {
398  if (subregion == 0) return;
399 
400  std::string& name = subregion->m_name;
401 
402  m_subregions[name] = subregion;
403 }
404 
406 {
407  m_subdictionary_names.push_back(name);
408 }
409 
410 
411 
413 {
414  // Add region to corresponding group
415  IdDictGroup* group = find_group(region->group_name());
416  if (0 == group) {
417  group = new IdDictGroup(region->group_name());
418  m_groups.push_back(group);
419  }
420  group->add_dictentry (region);
421 }
422 
424 {
425  {
427 
428  for (it = m_fields.begin (); it != m_fields.end (); ++it)
429  {
430  IdDictField* field = (*it).second;
431  field->resolve_references (idd);
432  }
433  }
434  {
436 
437  for (it = m_subregions.begin (); it != m_subregions.end (); ++it)
438  {
439  IdDictSubRegion* subregion = (*it).second;
440  subregion->resolve_references (idd, *this);
441  }
442  }
443  {
444  size_t index = 0;
445 
447  for (it = m_groups.begin (); it != m_groups.end (); ++it)
448  {
449  (*it)->resolve_references (idd, *this, index);
450  }
451  }
452 }
453 
454 typedef std::vector <IdDictRegion*> RV;
455 
456 static void compute_bits (const RV& regions, size_t level, const std::string& group)
457 {
458  //
459  // Compute the OR of all fields at <level>, for the
460  // subset of overlapping regions
461  //
462  Range::field ored_field;
463  unsigned int k;
464  for (k = 0; k < regions.size (); ++k) {
465  IdDictRegion* region = regions[k];
466  if (region->m_implementation.size () <= level) continue;
468  const Range::field thisField = f.field();
469  //on first time, set the original field
470  if (k == 0) ored_field = thisField;
471  //on subsequent iterations, 'or' the new fields with the original
472  else ored_field |= thisField;
473  }
474  //
475  // Now that we have the ored width of all first fields of
476  // all regions, we upgrade the bit width in the corresponding
477  // field implementations.
478  //
479  for (k = 0; k < regions.size (); ++k) {
480  IdDictRegion* region = regions[k];
481  if (region->m_implementation.size () <= level) continue;
482  // Don't set ored bits for regions outside of group - ok to
483  // calculate with them only
484  if (group != region->m_group) continue;
486  f.set_ored_field(ored_field);
487  }
488 }
489 
490 static void get_bits (const RV& regions, size_t level, const std::string& group)
491 {
492 
493  // This function is recusively called for each level to get the
494  // number of bits. By "definition" we require regions in the same
495  // group to overlap to have a uniform bit-allocation for a group.
496  //
497  // For each call, the first region within the specified "group"
498  // which has a (non-empty) field value at the current level is
499  // used as reference. According to this reference, the regions are
500  // divided into two sets: a set overlapping with the reference and
501  // a non-overlapping set. For the overlapping set, get_bits is
502  // called again, but for the next level. When control comes back,
503  // then a reference is chosen from the non-overlapping set and the
504  // procedure continues.
505  //
506  // The calculation of bits needed for a particular level is done
507  // in compute_bits before the overlapping is check for this level.
508  //
509 
510 
511  // Invalid call - return
512  if (regions.size () == 0) return;
513 
514  if (regions.size () == 1) {
515  /*
516  There is only one region (ie one range)
517  therefore the bitsets are unambiguous
518 
519  The bit width of each field implementation is
520  simply the bit width of the corresponding field.
521  */
522 
523  IdDictRegion* region = regions[0];
524 
525  for (size_t k = level; k < region->m_implementation.size (); ++k) {
527 
528  f.set_ored_field(f.field());
529 
530 
531  }
532 
533 
534 
535  return;
536  }
537 
538  size_t k;
539 
540  // Copy the regions provided in the arguments to a local clone.
541 
542  RV mr = regions;
543 
544  // Compute the number of bits needed at this level
545  compute_bits (mr, level, group);
546 
547 
555  RV overlapping;
556  RV orig;
557  RV temp;
558  overlapping.reserve(mr.size());
559  orig.reserve(mr.size());
560  temp.reserve(mr.size());
561 
562  for (;;) {
563  if (mr.size () == 0) {
564  break;
565  }
566  overlapping.clear ();
567  temp.clear ();
568  // Find the first non empty Region within the specified group
569  IdDictRegion* reference_region = 0;
570  for (k = 0; k < mr.size (); ++k) {
571  reference_region = mr[k];
572  if (reference_region->m_implementation.size () > level) {
573  if (group == reference_region->m_group) {
574  overlapping.push_back (reference_region);
575  break;
576  } else {
577  temp.push_back(reference_region);
578  }
579  }
580  }
581 
582  // Should be redundant with the mr.size() test above, but put here
583  // to try to avoid coverity warnings that reference_region may be null.
584  if (reference_region == 0) break;
585 
586  if (overlapping.size () == 0) {
587  break;
588  }
589 
590  // Now really split mr into the two subsets
591 
592  ++k;
593  const IdDictFieldImplementation& f1 = reference_region->m_implementation[level];
594 
595  Range::field ored_field = f1.field();
596  // copy into original test sample, some may have already been
597  // added to temp above.
598  for (; k < mr.size (); ++k) {
599  IdDictRegion* region = mr[k];
600  temp.push_back (region);
601  }
602  bool found_overlap = false;
603 
604  // Compare the reference field at this level to those in the
605  // remaining regions and check for overlap.
606  //
607  // The comparison must be done repeatedly because the overlap
608  // field gets larger and may overlap with previously checked
609  // field of a region.
610  //
611  // By "definition" we require regions in the same group to
612  // overlap to have a uniform bit-allocation for a group.
613  //
614  // For regions outside the current group, the overlap is
615  // allowed for the top level fields with the same names. As
616  // soon as one finds a field with a different name which is in
617  // a region outside the group, this and subsequent fields are
618  // ignored.
619  //
620  do {
621  // copy temp into orig, set overlap to false for this loop over regions
622  orig.clear();
623  orig = temp;
624  temp.clear();
625  found_overlap = false;
626  for (size_t i = 0; i < orig.size (); ++i) {
627  IdDictRegion* region = orig[i];
628  if (region->m_implementation.size () <= level) continue;
629  bool overlap = false;
631 
632  const Range::field& thisField = f.field();
633 
634  // Now expand bits by or'ing them with other regions
635  // at this level, requiring the name to be the same.
636  if (f1.range()->m_field_name == f.range()->m_field_name)
637  overlap = ored_field.overlaps_with (thisField);
638  // Check for either an overlap or force overlap for
639  // regions in the same group
640  if (overlap || (region->m_group == group)) {
641  overlapping.push_back (region);
642  ored_field |= thisField;
643  found_overlap = true;
644  } else {
645  temp.push_back (region);
646  }
647  }
648  } while(found_overlap);
649 
650  // Check overlapping collection - if there are only regions from
651  // the same group, we can safely throw away "temp" the other
652  // collection
653  bool all_within_group = true;
654  bool none_within_group = true;
655  for (size_t i = 0; i < overlapping.size (); ++i) {
656  IdDictRegion* region = overlapping[i];
657  if (group == region->m_group) {
658  none_within_group = false;
659  }else {
660  all_within_group = false;
661  }
662  }
663  // Remove temp is no longer needed
664  if (all_within_group) temp.clear();
665 
666  // Recurse on the remaining fields of the overlapping regions
667  //
668  // Continue only if there are regions still within the current
669  // group
670  if(!none_within_group) {
671  get_bits (overlapping, level + 1, group);
672  }
673 
674  // Continue for the other not-yet-overlapping regions.
675 
676  mr = temp;
677  }
678 }
679 
681  const std::string& tag)
682 {
683 
684  if (Debugger::debug ())
685  {
686  std::cout << "IdDictDictionary::generate_implementation>" << std::endl;
687  }
688 
690 
691  // Propagate to each region and copy their generation into the
692  // dict's vector.
694  for (it = m_groups.begin (); it != m_groups.end (); ++it) {
695  (*it)->generate_implementation (idd, *this, tag);
696  // Get regions from group and save in m_regions
697  const regions_type& regions = (*it)->regions();
699  for (it1 = regions.begin(); it1 != regions.end(); ++it1) {
700  m_regions.push_back(*it1);
701  }
702  }
703 
704  // Loop again over groups and set the bit-packing - starting at
705  // level 0
706  for (it = m_groups.begin (); it != m_groups.end (); ++it) {
707  // Copy to temporary vector all regions in the group. And
708  // look for regions in local m_regions vector for any
709  // regions "dummy", which come from reference
710  // dictionaries.
711  // Skip special group
712  if ("dummy" == (*it)->name()) continue;
713 
714  get_bits (m_regions, 0, (*it)->name());
715 // get_bits (regions, 0, (*it)->name());
716  }
717 
718  // Set integral over the number of bits
719  integrate_bits ();
720 
721  // Set neighbours for regions
723  for (itr = m_regions.begin (); itr != m_regions.end (); ++itr) {
724  (*itr)->find_neighbours(*this);
725  }
726 
728  }
729 }
730 
732 {
734  m_regions.clear();
736  for (it = m_groups.begin (); it != m_groups.end (); ++it) {
737  (*it)->reset_implementation();
738  }
740  }
741 }
742 
743 int
745 {
746 
747  // Find first region that matches id
748 
750 
751  size_type i = 0;
752  for (it = m_regions.begin (); it != m_regions.end (); ++it, ++i) {
753  const IdDictRegion& region = *(*it);
754 
755  Range range = region.build_range();
756 
757  if (range.match(id) && range.fields() >= id.fields()) {
758  index = i;
759  return (0);
760  }
761  }
762 
763  return (1);
764 }
765 
766 
768 {
769  return find_region (id, "");
770 }
771 
773 {
774  // Find first region that matches id
775 
776  IdDictRegion* pRegion = 0;
778 
779  for (it = m_regions.begin (); it != m_regions.end (); ++it) {
780  IdDictRegion& region = *(*it);
781  if ( (group_name!= "") && (region.group_name() != group_name) ) continue;
782 
783  Range range = region.build_range();
784 
785  if (range.match(id) && range.fields() >= id.fields()) {
786  pRegion = &region;
787  }
788  }
789 
790  return (pRegion);
791 }
792 
793 void
795 {
796  // For each region, loop over its levels and set the bit offset
797  // for each FieldImplementation
798 
799  for (IdDictRegion* region : m_regions) {
800  size_t bits_offset = 0;
801 
803  impl.optimize(); // optimize for decoding
804  impl.set_bits_offset(bits_offset);
805  bits_offset += impl.bits();
806 
807  // Set whether or not to decode index
808  Range::field field = impl.ored_field();
809  if (Range::field::both_bounded != field.get_mode() ||
810  0 != field.get_minimum())
811  {
812  impl.set_decode_index(true);
813  }
814  }
815  }
816 }
817 
818 
844 {
845  // check #1
846 
848  if (mr.has_overlap ()) return (false);
849 
850 
851  return (true);
852 }
853 
865 {
866  // verify
867  if (verify()) {
868 
869  std::map< ExpandedIdentifier, IdDictDictEntry* > regions;
870 
872 
873  for (it = m_groups.begin (); it != m_groups.end (); ++it) {
874 
875  (*it)->sort();
876  }
877  }
878  else {
879  std::cout << "IdDictDictionary::sort - WARNING verify is FALSE - cannot sort "
880  << std::endl;
881  }
882 }
883 
885 {
886  {
888 
889  for (it = m_subregions.begin (); it != m_subregions.end (); ++it)
890  {
891  IdDictSubRegion* subregion = (*it).second;
892  subregion->clear ();
893  delete subregion;
894  }
895 
896  m_subregions.clear ();
897  }
898 
899  {
901 
902  for (it = m_fields.begin (); it != m_fields.end (); ++it)
903  {
904  IdDictField* field = (*it).second;
905  field->clear ();
906  delete field;
907  }
908 
909  m_fields.clear ();
910  }
911 
912  {
914 
915  for (it = m_groups.begin (); it != m_groups.end (); ++it) {
916 
917  IdDictGroup* group = *it;
918  group->clear ();
919  delete group;
920  }
921 
922  m_groups.clear ();
923  }
924 }
925 
927 {
929 
931 
932  for (it = m_groups.begin (); it != m_groups.end (); ++it)
933  {
934  const IdDictGroup& group = *(*it);
935 
936  MultiRange group_mr = group.build_multirange();
937 
938  for (unsigned int i = 0; i < group_mr.size(); ++i) {
939  const Range& range = group_mr[i];
940  result.add (range);
941  }
942  }
943 
944 // IdDictDictionary::regions_const_it it;
945 
946 // for (it = m_regions.begin (); it != m_regions.end (); ++it)
947 // {
948 // const IdDictRegion& region = *(*it);
949 
950 // // skip regions created from parents
951 // if("dummy" == region.m_name) continue;
952 
953 // // skip empty regions - may arise from alternate_regions
954 // // where a tag selects an empty region
955 // if(region.m_is_empty) continue;
956 
957 // result.add (region.build_range ());
958 
959 // }
960 
961  return (result);
962 }
963 
965  const Range& prefix,
966  const std::string& last_field) const
967 {
969 
971  if ("" == last_field) {
972  // Take all fields
973  for (it = m_regions.begin (); it != m_regions.end (); ++it) {
974 
975  const IdDictRegion& region = *(*it);
976 
977  // skip regions created from parents
978  if("dummy" == region.m_name) continue;
979 
980  // skip empty regions - may arise from alternate_regions
981  // where a tag selects an empty region
982  if(region.m_is_empty) continue;
983 
984  Range range(region.build_range ());
985  // Check region selection
986  if (range.match(region_id))result.add (std::move(range));
987  }
988  }
989  else {
990  // Not all fields required
991  for (it = m_regions.begin (); it != m_regions.end (); ++it) {
992  const IdDictRegion& region = *(*it);
993 
994  // skip regions created from parents
995  if("dummy" == region.m_name) continue;
996 
997  // skip empty regions - may arise from alternate_regions
998  // where a tag selects an empty region
999  if(region.m_is_empty) continue;
1000 
1001  Range range(region.build_range ());
1002  // Check region selection
1003  if (range.match(region_id)) {
1004  // Build new range up to last_field and add it to result -
1005  // remove duplicate ranges with addRangeToMR
1006  Range new_range(prefix); // Prepend with prefix
1007 
1008  std::vector <IdDictFieldImplementation>::const_iterator fit;
1009  for (fit = region.m_implementation.begin ();
1010  fit != region.m_implementation.end ();
1011  ++fit) {
1012  const IdDictFieldImplementation& impl = *fit;
1013 
1014 // new_range.add(impl.m_field);
1015  new_range.add(impl.range()->build_range());
1016 
1017  if (last_field == impl.range()->m_field->m_name) {
1018  break;
1019  }
1020  }
1021  result.add(std::move(new_range));
1022  }
1023  }
1024  }
1025 
1026  return (result);
1027 }
1028 
1029 
1031  const std::string& group_name,
1032  const Range& prefix,
1033  const std::string& last_field) const
1034 {
1035  MultiRange result;
1036 
1038  if ("" == last_field) {
1039  // Take all fields
1040  for (it = m_regions.begin (); it != m_regions.end (); ++it) {
1041 
1042  const IdDictRegion& region = *(*it);
1043 
1044  // skip regions created from parents
1045  if("dummy" == region.m_name) continue;
1046 
1047  // skip empty regions - may arise from alternate_regions
1048  // where a tag selects an empty region
1049  if(region.m_is_empty) continue;
1050 
1051  Range range(region.build_range ());
1052  // Check region selection
1053  if (range.match(region_id) && region.group_name() == group_name)result.add (std::move(range));
1054  }
1055  }
1056  else {
1057  // Not all fields required
1058  for (it = m_regions.begin (); it != m_regions.end (); ++it) {
1059  const IdDictRegion& region = *(*it);
1060 
1061  // skip regions created from parents
1062  if("dummy" == region.m_name) continue;
1063 
1064  // skip empty regions - may arise from alternate_regions
1065  // where a tag selects an empty region
1066  if(region.m_is_empty) continue;
1067 
1068  Range range(region.build_range ());
1069  // Check region selection
1070  if (range.match(region_id) && region.group_name() == group_name) {
1071  // Build new range up to last_field and add it to result -
1072  // remove duplicate ranges with addRangeToMR
1073  Range new_range(prefix); // Prepend with prefix
1074 
1075  std::vector <IdDictFieldImplementation>::const_iterator fit;
1076  for (fit = region.m_implementation.begin ();
1077  fit != region.m_implementation.end ();
1078  ++fit) {
1079  const IdDictFieldImplementation& impl = *fit;
1080 
1081 // new_range.add(impl.m_field);
1082  new_range.add(impl.range()->build_range());
1083 
1084  if (last_field == impl.range()->m_field->m_name) {
1085  break;
1086  }
1087  }
1088  result.add(std::move(new_range));
1089  }
1090  }
1091  }
1092 
1093  return (result);
1094 }
1095 
1096 
1097 
1111 int
1113  size_t index1,
1114  size_t index2,
1115  Identifier& packedId) const
1116 {
1117  packedId = 0;
1118 
1119 // std::cout << "IdDictDictionary::pack32: index1,2, fields "
1120 // << index1 << " " << index2 << " " << id.fields()
1121 // << " " << (std::string)id << std::endl;
1122 
1123  // Preconditions...
1124 
1125  if (index2 < index1) {
1126  // bad parameters.
1127  return (1);
1128  }
1129 
1130  if (index1 >= id.fields ()) {
1131  // nothing very useful !!
1132  return (1);
1133  }
1134 
1135  if (index2 >= id.fields ()) {
1136  // bad parameter...
1137  return (1);
1138  }
1139 
1149  for (size_t k = 0; k < m_regions.size (); ++k) {
1150  bool selected = true;
1151 
1152  const IdDictRegion& region = *m_regions[k];
1153 
1154  // Must skip empty regions - can arise when a tag selects an
1155  // empty region
1156  if (region.m_is_empty) continue;
1157 
1158  for (size_t i = 0; i < region.m_implementation.size (); ++i) {
1159  if (i >= id.fields ()) break;
1160 
1162 
1163  if (!impl.field().match (id[i])) {
1164 // std::cout << "Region #" << region.m_index <<
1165 // " field " << impl.range()->m_field_name <<
1166 // " #" << i << " (" << (std::string) impl.field() << ") does not match " <<
1167 // id[i] << std::endl;
1168 
1169  selected = false;
1170  break;
1171  }
1172  }
1173 
1174  if (selected) {
1175  size_t position = Identifier::NBITS;
1176 
1177 // std::cout << "Region #" << region.m_index << " selected" << std::endl;
1178 
1179  // We have the proper region.
1180  for (size_t i = index1; i <= index2; ++i) {
1182 
1183  Identifier::value_type index = impl.ored_field().get_value_index (id[i]);
1184 
1185  if (0 == position && impl.bits() > 0) {
1186  return(1);
1187  }
1188 
1189  position -= impl.bits();
1190  packedId |= (index << position);
1191  }
1192  break;
1193  }
1194  }
1195 
1196 
1197  return (0);
1198 }
1199 
1200 
1201 
1202 int
1204  size_t index1,
1205  size_t index2,
1206  size_t region_index,
1207  Identifier& packedId,
1208  size_t first_field_index) const
1209 {
1210 
1211  // Preconditions...
1212 
1213  if (m_do_checks) {
1214 
1215  if (index2 < index1) {
1216  // bad parameters.
1217  std::cout << "IdDictDictionary::pack32 - index2 < index1 - 1,2"
1218  << index1 << " " << index2 << std::endl;
1219  return (1);
1220  }
1221 
1222  if (region_index >= m_regions.size()) {
1223  // bad parameters.
1224  std::cout << "IdDictDictionary::pack32 - region index incorrect - index,size"
1225  << region_index << " " << m_regions.size() << std::endl;
1226  return (1);
1227  }
1228  }
1229 
1230 
1231  // Get the region
1232  const IdDictRegion& region = *m_regions[region_index];
1233 
1234  if (m_do_checks) {
1235  if (region.m_is_empty) {
1236  std::cout << "IdDictDictionary::pack32 - region id empty" << std::endl;
1237  // bad parameters.
1238  return (1);
1239  }
1240  if(index1 < first_field_index) {
1241  std::cout << "IdDictDictionary::pack32 - first_field_index > index1 "
1242  << first_field_index << " " << index1 << std::endl;
1243  return (1);
1244  }
1245  }
1246 
1247  // Set the starting position
1248  size_t position = Identifier::NBITS;
1249  if(!first_field_index) {
1251  position -= impl.bits_offset();
1252  }
1253 
1254  size_t field_index = 0;
1255  for (size_t i = index1; i <= index2; ++i, ++field_index) {
1256 
1258 
1259  if (m_do_checks) {
1260 
1261  // Field should be within allowed range
1262  if (!impl.ored_field().match(fields[field_index])) {
1263  std::cout << "IdDictDictionary::pack32 - field does NOT match: value, allowed values "
1264  << fields[field_index] << " " << (std::string)impl.ored_field()
1265  << std::endl;
1266  // bad parameters.
1267  return (1);
1268  }
1269 
1270  // Check that we don't try to go below 0
1271  if (0 == position && impl.bits() > 0) {
1272  std::cout << "IdDictDictionary::pack32 - going past 0" << std::endl;
1273  return(1);
1274  }
1275  }
1276 
1278  if (impl.decode_index()) {
1279  index = impl.ored_field().get_value_index (fields[field_index]);
1280  }
1281  else {
1282  index = (Identifier::value_type)fields[field_index];
1283  }
1284 
1285  position -= impl.bits();
1286  packedId |= (index << position);
1287 
1288  }
1289 
1290 
1291  return (0);
1292 }
1293 
1298  size_t index2,
1299  size_t region_index,
1300  Identifier& packedId) const
1301 {
1302 
1303  // Preconditions...
1304 
1305  if (m_do_checks) {
1306 
1307  if (index2 < index1) {
1308  // bad parameters.
1309  std::cout << "IdDictDictionary::pack32 - index2 < index1 - 1,2"
1310  << index1 << " " << index2 << std::endl;
1311  return (1);
1312  }
1313 
1314  if (region_index >= m_regions.size()) {
1315  // bad parameters.
1316  std::cout << "IdDictDictionary::pack32 - region index incorrect - index,size"
1317  << region_index << " " << m_regions.size() << std::endl;
1318  return (1);
1319  }
1320  }
1321 
1322 
1323  // Get the region
1324  const IdDictRegion& region = *m_regions[region_index];
1325 
1326  if (m_do_checks) {
1327  if (region.m_is_empty) {
1328  std::cout << "IdDictDictionary::pack32 - region id empty" << std::endl;
1329  // bad parameters.
1330  return (1);
1331  }
1332  }
1333 
1334  size_t field_index = 0;
1335  for (size_t i = index1; i <= index2; ++i, ++field_index) {
1336 
1338 
1339  size_t position = Identifier::NBITS - impl.bits_offset() - impl.bits();
1340 
1341  Identifier::value_type mask = (((Identifier::value_type)1 << impl.bits()) - 1) << position;
1342 
1344 
1345  packedId &= (mask);
1346 
1347  }
1348  return (0);
1349 }
1350 
1351 
1352 
1357 #if defined(FLATTEN) && defined(__GNUC__)
1358 // We compile this package with optimization, even in debug builds; otherwise,
1359 // the heavy use of Eigen makes it too slow. However, from here we may call
1360 // to out-of-line Eigen code that is linked from other DSOs; in that case,
1361 // it would not be optimized. Avoid this by forcing all Eigen code
1362 // to be inlined here if possible.
1363 __attribute__ ((flatten))
1364 #endif
1365 int
1367  const ExpandedIdentifier& prefix,
1368  size_t index2,
1369  ExpandedIdentifier& unpackedId) const
1370 {
1371 
1372  ExpandedIdentifier localPrefix (prefix);
1373  unpackedId.clear ();
1374  if (0 < localPrefix.fields ()) unpackedId = localPrefix;
1375 
1381  size_t index1 = 0; // field index
1382  size_t position = Identifier::NBITS; // overall bit position - used for debugging only
1383 
1384  for (size_t k = 0; k < m_regions.size (); ++k)
1385  {
1386  bool selected = false;
1387 
1388  const IdDictRegion& region = *m_regions[k];
1389 
1390  // Must skip empty regions - can arise when a tag selects an
1391  // empty region
1392  if (region.m_is_empty) continue;
1393 
1394 // for (size_t i = index1; i < region.m_implementation.size (); ++i)
1395  for (size_t i = 0; i < region.m_implementation.size (); ++i)
1396  {
1397  if (i >= localPrefix.fields ())
1398  {
1403  selected = true;
1404  index1 = i;
1405  break;
1406  }
1407 
1409 
1410  if (!impl.field().match (localPrefix[i]))
1411  {
1412 
1413  break;
1414  }
1415  }
1416 
1417  if (selected)
1418  {
1427  for (size_t i = index1; i < region.m_implementation.size (); ++i)
1428  {
1430 
1431  if (impl.bits() == 0) continue;
1432 
1433  Identifier::value_type mask = (static_cast<Identifier::value_type>(1) << impl.bits()) - 1;
1434 
1435  if (position < impl.bits()) break; // Nothing more to get
1436  size_t index = id.extract(position - impl.bits(), mask);
1437 
1438  if (index >= impl.ored_field().get_indices ())
1439  {
1446  selected = false;
1447  break;
1448  }
1449 
1450  ExpandedIdentifier::element_type value = impl.ored_field().get_value_at (index);
1451 
1458  if (!impl.field().match (value))
1459  {
1460 
1461  selected = false;
1462  break;
1463  }
1464 
1465 
1466 
1467  // Found value
1468 
1469  unpackedId.add (value);
1470  localPrefix.add (value);
1471 
1472  position -= impl.bits(); // overall bit position
1473 
1474 
1475 
1476  index1++; // next field
1477 
1478  if (index1 > index2) break; // quit at index2
1479  }
1480 
1481  if (selected) break;
1482  }
1483  }
1484 
1485  return (0);
1486 }
1487 
1493 int
1495  const ExpandedIdentifier& prefix,
1496  size_t index2,
1497  const std::string& sep,
1498  std::string& unpackedId) const
1499 {
1500 
1501  ExpandedIdentifier localPrefix (prefix);
1502 
1503 
1509  size_t index1 = 0; // field index
1510  size_t position = Identifier::NBITS; // overall bit position - used for debugging only
1511 
1512  for (size_t k = 0; k < m_regions.size (); ++k) {
1513  bool selected = false;
1514 
1515  const IdDictRegion& region = *m_regions[k];
1516 
1517  // Must skip empty regions - can arise when a tag selects an
1518  // empty region
1519  if (region.m_is_empty) continue;
1520 
1521 // for (size_t i = index1; i < region.m_implementation.size (); ++i)
1522  for (size_t i = 0; i < region.m_implementation.size (); ++i) {
1523  if (i >= localPrefix.fields ()) {
1528  selected = true;
1529  index1 = i;
1530  break;
1531  }
1532 
1534 
1535  if (!impl.field().match (localPrefix[i])) {
1536 
1537  break;
1538  }
1539  }
1540 
1541  if (selected) {
1548 // bits32 temp = id;
1549 
1550 // std::cout << "Region #" << region.m_index << " selected" << std::endl;
1551 
1552  for (size_t i = index1; i < region.m_implementation.size (); ++i) {
1554 
1555  if (impl.bits() == 0) continue;
1556 
1557  Identifier::value_type mask = (static_cast<Identifier::value_type>(1) << impl.bits()) - 1;
1558 
1559  if (position < impl.bits()) break; // Nothing more to get
1560  size_t index = id.extract(position - impl.bits(), mask);
1561 
1562  if (index >= impl.ored_field().get_indices ()) {
1563 
1564  selected = false;
1565  break;
1566  }
1567 
1568  ExpandedIdentifier::element_type value = impl.ored_field().get_value_at (index);
1569 
1576  if (!impl.field().match (value)) {
1577 
1578  selected = false;
1579  break;
1580  }
1581 
1582 
1583  // Add value to string
1584 
1585  std::string str_value("nil");
1586  char temp[20];
1587 
1588  // The policy below is:
1589  // - if a value is a character string or name, just add this name
1590  // - if a value is a number, then prefix it with the
1591  // name of the field
1592  //
1593  // NOTE: min/max is a number, but for value/label we
1594  // distinguish between number and name by looking for an IdDictLabel
1595  const IdDictRange* range = impl.range();
1596  IdDictLabel* label = range->m_field->find_label(range->m_label);
1597  switch (range->m_specification) {
1600  case IdDictRange::by_minmax:
1601  // For a range of values (numbers), add in the field name
1602  str_value = range->m_field->m_name + ' ';
1603  sprintf (temp, "%d", value);
1604  str_value += temp;
1605  break;
1606  case IdDictRange::by_value:
1607  case IdDictRange::by_label:
1608  str_value = "";
1609  if (!label) {
1610  // Is a number, add in field name
1611  str_value += range->m_field->m_name + ' ';
1612  }
1613  str_value += range->m_label;
1614  break;
1615  case IdDictRange::by_values:
1616  case IdDictRange::by_labels:
1617  str_value = "";
1618  // Is a name
1619  if (label) {
1620  // Found label with "find_label" on the field
1621  if (label->m_valued) {
1622  str_value += range->m_label;
1623  }
1624  }
1625  else {
1626  // If not found with the "find" above, we must
1627  // get the value and name from the range
1628  // itself.
1629 
1630  unsigned int index1 = 0;
1631  for (; index1 < range->m_values.size(); ++index1) {
1632  if (value == range->m_values[index1]) {
1633  break;
1634  }
1635  }
1636 
1637  // In some cases we
1638  if (index1 < range->m_labels.size()) {
1639  if (isNumber(range->m_labels[index1])) {
1640  str_value += range->m_field->m_name + ' ';
1641  }
1642  str_value += range->m_labels[index1];
1643  }
1644  else {
1645  std::cout << "IdDictDictionary::unpack - Could not find value." << std::endl;
1646  std::cout << "value " << value << std::endl;
1647  std::cout << "field values " << std::endl;
1648  for (unsigned int i=0; i < range->m_values.size(); ++i) {
1649  std::cout << range->m_values[i] << " ";
1650  }
1651  std::cout << std::endl;
1652  }
1653  }
1654  break;
1655  case IdDictRange::unknown:
1656 
1657  std::cout << "unknown" << std::endl;
1658 
1659  break;
1660  }
1661 
1662 
1663  if (index1)unpackedId += sep;
1664  unpackedId += str_value;
1665  localPrefix.add (value);
1666 
1667  position -= impl.bits(); // overall bit position
1668 
1669 
1670 
1671  index1++; // next field
1672 
1673  if (index1 > index2) break; // quit at index2
1674  }
1675  if (selected) break;
1676  }
1677  }
1678 
1679  return (0);
1680 }
1681 
1682 
1691 int
1693  size_t first_field_index,
1694  size_t field_index,
1695  size_t region_index,
1696  int& field) const
1697 {
1698  field = 0;
1699 
1700  if (m_do_checks) {
1701 
1702  // Check regions
1703  if (region_index >= m_regions.size()) {
1704  std::cout << "IdDictDictionary::unpack - region index too large. Index, nregions "
1705  << region_index << " " << m_regions.size() << std::endl;
1706  return (1);
1707  }
1708  }
1709 
1710  const IdDictRegion& region = *m_regions.at(region_index);
1711 
1712  if (m_do_checks) {
1713 
1714  // check number of fields
1715  if (field_index >= region.m_implementation.size()) {
1716  std::cout << "IdDictDictionary::unpack - field index too large. Index, nfields "
1717  << field_index << " " << region.m_implementation.size()
1718  << std::endl;
1719  return (1);
1720  }
1721 
1722  }
1723 
1724  const IdDictFieldImplementation& impl = region.m_implementation.at(field_index);
1725  size_t prefix_offset = 0;
1726 
1727  size_t position = Identifier::NBITS; // overall bit position
1728 
1729  // One or more fields missing from prefix, get the offset
1730  if (first_field_index) {
1731  if (m_do_checks) {
1732  if (first_field_index >= region.m_implementation.size()) {
1733  std::cout << "IdDictDictionary::unpack - first_field_index too large. Index, nfields "
1734  << first_field_index << " " << region.m_implementation.size()
1735  << std::endl;
1736  return (1);
1737  }
1738  }
1739 
1740  // One or more fields missing from prefix, get the offset
1741  prefix_offset = region.m_implementation[first_field_index].bits_offset();
1742 
1743  if (m_do_checks) {
1744  // Should have a non-zero number of bits
1745  if (impl.bits() == 0) {
1746  std::cout << "IdDictDictionary::unpack - no bits for this field. Region, field indexes "
1747  << region_index << " " << field_index << std::endl;
1748  return (1);
1749  }
1750 
1751  // Check the shift value
1752  if (impl.bits() + impl.bits_offset() - prefix_offset > position) {
1753  std::cout << "IdDictDictionary::unpack - bits + offset too large. Region, field indexes, bits, offset "
1754  << region_index << " " << field_index << " "
1755  << impl.bits() << " " << impl.bits_offset() << " " << prefix_offset
1756  << std::endl;
1757  return (1);
1758  }
1759  }
1760  }
1761 
1762  Identifier::value_type mask = (static_cast<Identifier::value_type>(1) << impl.bits()) - 1;
1763 
1764  size_t index = id.extract(position -= impl.bits() + impl.bits_offset() - prefix_offset, mask);
1765 
1766  field = index;
1767  if (impl.decode_index()) field = impl.ored_field().get_value_at (index);
1768 
1769 
1770  return (0);
1771 }
1772 
1782 int
1784  size_t first_field_index,
1785  size_t begin_field_index,
1786  size_t end_field_index,
1787  size_t region_index,
1788  Identifier& idout) const
1789 {
1790 
1791  idout = Identifier();
1792  if (region_index >= m_regions.size()) {
1793  std::cout << "IdDictDictionary::copy - region index too large. Index, nregions "
1794  << region_index << " " << m_regions.size() << std::endl;
1795  return (1);
1796  }
1797 
1798  const IdDictRegion& region = *m_regions[region_index];
1799 
1800  if (first_field_index >= region.m_implementation.size() ||
1801  begin_field_index >= region.m_implementation.size() ||
1802  end_field_index >= region.m_implementation.size()) {
1803  std::cout << "IdDictDictionary::copy - field index too large. Indexes first, begin, end, nfields "
1804  << first_field_index << " "
1805  << begin_field_index << " "
1806  << end_field_index << " "
1807  << region.m_implementation.size()
1808  << std::endl;
1809  return (1);
1810  }
1811 
1812  size_t missing_offset = 0;
1813  if (first_field_index) {
1814  if (first_field_index > begin_field_index) {
1815  std::cout << "IdDictDictionary::copy - first_field_index > begin_field_index. Indexes "
1816  << first_field_index << " " << begin_field_index << std::endl;
1817  return (1);
1818  }
1819  // One or more fields missing from prefix, get the offset
1820  missing_offset = region.m_implementation[first_field_index].bits_offset();
1821  }
1822 
1823  size_t prefix_offset = 0;
1824  if (begin_field_index) {
1825  if (begin_field_index > end_field_index) {
1826  std::cout << "IdDictDictionary::copy - begin_field_index > end_field_index. Indexes "
1827  << begin_field_index << " " << end_field_index << std::endl;
1828  return (1);
1829  }
1830  // One or more fields missing from prefix, get the offset
1831  prefix_offset = region.m_implementation[begin_field_index].bits_offset();
1832  }
1833 
1834  const IdDictFieldImplementation& impl = region.m_implementation[end_field_index];
1835  size_t suffix_offset = impl.bits() + impl.bits_offset();
1836 
1837  size_t position = Identifier::NBITS; // overall bit position
1838 
1839  if (position < prefix_offset - missing_offset) {
1840  std::cout << "IdDictDictionary::copy - position < prefix + missing. "
1841  << prefix_offset << " " << missing_offset << std::endl;
1842  return (1);
1843  }
1844 
1845 
1846  if (position < suffix_offset + missing_offset) {
1847  std::cout << "IdDictDictionary::copy - position < suffix + missing. "
1848  << suffix_offset << " " << missing_offset << std::endl;
1849  return (1);
1850  }
1851 
1852 
1853  // prepare the mask for copying
1854 
1856 
1857  Identifier::value_type prefix_mask = prefix_offset ? (static_cast<Identifier::value_type>(1) << (position - prefix_offset + missing_offset)) - 1 : 0;
1858 
1859  Identifier::value_type suffix_mask = (static_cast<Identifier::value_type>(1) << (position - suffix_offset + missing_offset)) - 1;
1860 
1861  mask -= prefix_mask + suffix_mask;
1862 
1863  idout = idin.mask_shift(mask, missing_offset);
1864 
1865 
1866  return (0);
1867 }
1868 
1869 
1870 
1871 bool
1873 {
1874  return (m_do_checks);
1875 }
1876 
1877 void
1879 {
1881 }
1882 
1883 bool
1885 {
1886  return (m_do_neighbours);
1887 }
1888 
1889 void
1891 {
1893 }
1894 
1895 
1897 {
1898 }
1899 
1901  const std::string& /*tag*/)
1902 {
1903 }
1904 
1906 {
1907 }
1908 
1909 bool IdDictField::verify () const
1910 {
1911  return (true);
1912 }
1913 
1914 IdDictLabel* IdDictField::find_label (const std::string& name) const
1915 {
1916  for (size_t i = 0; i < m_labels.size (); ++i)
1917  {
1918  IdDictLabel* label = m_labels[i];
1919  if ((label != 0) && (label->m_name == name)) return (label);
1920  }
1921 
1922  return (0);
1923 }
1924 
1925 void
1927  m_labels.push_back (label);
1928 }
1929 
1930 size_t
1932  return m_labels.size ();
1933 }
1934 
1935 const std::string&
1937  return m_labels.at(index)->m_name;
1938 }
1939 
1941 IdDictField::get_label_value (const std::string& name) const {
1943  try{
1944  value = std::stoi(name);
1945  return value;
1946  } catch (std::invalid_argument & e){
1947  for (const auto *label:m_labels) {
1948  if (label == nullptr) continue;
1949  if (label->m_valued) value = label->m_value;
1950  if (label->m_name == name) {
1951  return (value);
1952  }
1953  value++;
1954  }
1955  }
1956  std::cerr << "Warning : label " << name << " not found" << std::endl;
1957  return (0);
1958 }
1959 
1961  for (size_t i = 0; i < m_labels.size (); ++i) {
1962  IdDictLabel* label = m_labels[i];
1963  delete label;
1964  }
1965  m_labels.clear ();
1966 }
1967 
1968 
1973  :
1974  m_generated_implementation(false)
1975 {
1976 }
1977 
1978 IdDictGroup::IdDictGroup (const std::string& name)
1979  :
1980  m_name(name),
1981  m_generated_implementation(false)
1982 {
1983 }
1984 
1986 {
1987 }
1988 
1989 const std::string& IdDictGroup::name()
1990 {
1991  return (m_name);
1992 }
1993 
1994 const std::vector<IdDictDictEntry*>&
1996 {
1997  return (m_entries);
1998 }
1999 
2000 const std::vector<IdDictRegion*>&
2002 {
2003  return (m_regions);
2004 }
2005 
2006 
2007 MultiRange
2009 {
2010  MultiRange result;
2011 
2013 
2014  for (it = m_regions.begin (); it != m_regions.end (); ++it)
2015  {
2016  const IdDictRegion& region = *(*it);
2017 
2018  // skip regions created from parents
2019  if("dummy" == region.m_name) continue;
2020 
2021  // skip empty regions - may arise from alternate_regions
2022  // where a tag selects an empty region
2023  if(region.m_is_empty) continue;
2024 
2025  Range r = region.build_range();
2026  result.add (std::move(r));
2027 
2028  }
2029 
2030  return (result);
2031 }
2032 
2033 void
2035 {
2036  m_entries.push_back (region);
2037 }
2038 
2039 void
2042  size_t& index)
2043 {
2045  for (it = m_entries.begin (); it != m_entries.end (); ++it) {
2046  (*it)->set_index(index);
2047  index++;
2048 
2049  (*it)->resolve_references (idd, dictionary);
2050  }
2051 }
2052 
2053 void
2056  const std::string& tag)
2057 {
2058  if (Debugger::debug ())
2059  {
2060  std::cout << "IdDictGroup::generate_implementation>" << std::endl;
2061  }
2062 
2064 
2065  // Loop over entries and fill regions vec with selected region
2066  // (AltRegions have a selection)
2068  for (it = m_entries.begin (); it != m_entries.end (); ++it) {
2069  (*it)->generate_implementation (idd, dictionary, tag);
2070  // Get region and save in m_regions
2071  IdDictRegion* region = dynamic_cast<IdDictRegion*> (*it);
2072  if(region) {
2073  m_regions.push_back(region);
2074  }
2075  else {
2076  IdDictAltRegions* altregions = dynamic_cast<IdDictAltRegions*> (*it);
2077  if(altregions) {
2078  m_regions.push_back(altregions->m_selected_region);
2079  }
2080  }
2081  }
2082 
2083  if (m_regions.size() != m_entries.size()) {
2084  std::cout << "IdDictGroup::generate_implementation - mismatch of sizes: regions/entries "
2085  << m_regions.size() << " " << m_entries.size()
2086  << std::endl;
2087  }
2088 
2090  }
2091 }
2092 
2093 void
2095 {
2097 
2098  m_regions.clear();
2100  for (it = m_entries.begin (); it != m_entries.end (); ++it) {
2101  (*it)->reset_implementation();
2102  }
2104  }
2105 }
2106 
2107 
2108 bool
2110 {
2111  // Should check that all regions have the same number of levels,
2112  // which is part of the definition of a group
2113  return (true);
2114 }
2115 
2125 {
2126 
2127  std::map< ExpandedIdentifier, IdDictDictEntry* > regions;
2128 
2130 
2131  for (it = m_regions.begin (); it != m_regions.end (); ++it) {
2132 
2133  const IdDictRegion& region = *(*it);
2134  Range range = region.build_range ();
2135  RangeIterator itr(range);
2136  auto first = itr.begin();
2137  auto last = itr.end();
2138  if (first != last) {
2139  regions[*first] = *it;
2140  } else {
2141  std::cout << "IdDictDictionary::sort - WARNING empty region cannot sort "
2142  << std::endl;
2143  }
2144  }
2145  if (regions.size() == m_regions.size()) {
2146  // Reorder the regions
2148  std::vector<IdDictRegion*>::size_type vecIt = 0;
2149  for (; mapIt != regions.end (); ++mapIt, ++vecIt) {
2150  m_entries[vecIt] = (*mapIt).second;
2151  }
2152  }
2153  else {
2154  std::cout << "IdDictGroup::sort - WARNING region map size is NOT the same as the vector size. Map size "
2155  << regions.size() << " vector size " << m_regions.size()
2156  << std::endl;
2157  }
2158 }
2159 
2160 void
2162 {
2164 
2165  for (it = m_entries.begin (); it != m_entries.end (); ++it) {
2166 
2167  IdDictDictEntry* region = *it;
2168  region->clear ();
2169  delete region;
2170  }
2171 
2172  m_entries.clear ();
2173 }
2174 
2175 
2180 {
2181 }
2182 
2184 {
2185 }
2186 
2191  :
2192  m_selected_region(0)
2193 {
2194 }
2195 
2197 {
2200  for (; first != last; ++first) {
2201  delete (*first).second;
2202  }
2203 }
2204 
2205 std::string
2207 {
2208  std::string result;
2209  if (1 <= m_regions.size()) result = (*m_regions.begin()).second->group_name();
2210  return (result);
2211 }
2212 
2213 
2214 void
2216 {
2217  map_iterator first = m_regions.begin();
2218  map_iterator last = m_regions.end();
2219  for (; first != last; ++first) {
2220  (*first).second->set_index (index);
2221  }
2222 }
2223 
2224 
2225 void
2228 {
2229  // We assume that it is not necessary to select only those with
2230  // the correct tag -> send to all in map
2231  map_iterator first = m_regions.begin();
2232  map_iterator last = m_regions.end();
2233  for (; first != last; ++first) {
2234  (*first).second->resolve_references (idd, dictionary);
2235  }
2236 }
2237 
2238 void
2241  const std::string& tag)
2242 {
2243  // Find the region given by the tag
2244  map_iterator region_it = m_regions.find(tag);
2245  if(region_it == m_regions.end()) {
2246  std::cout << "IdDictAltRegions::generate_implementation could not find region for tag "
2247  << tag << " Keys in map " << std::endl;
2248  map_iterator first = m_regions.begin();
2249  map_iterator last = m_regions.end();
2250  int i = 0;
2251  for (; first != last; ++first, ++i) {
2252  std::cout << " i " << i << " key " << (*first).first;
2253  }
2254  std::cout << std::endl;
2255  return;
2256  }
2257  m_selected_region = (*region_it).second;
2258 
2259 
2261 
2262 }
2263 
2264 void
2266 {
2268 }
2269 
2270 
2271 bool
2273 {
2274  return (true);
2275 }
2276 
2277 void
2279 {
2280  map_iterator first = m_regions.begin();
2281  map_iterator last = m_regions.end();
2282  for (; first != last; ++first) {
2283  (*first).second->clear();
2284  delete (*first).second;
2285  }
2286  m_regions.clear();
2287 }
2288 
2289 Range
2291  Range result;
2292 
2294  return (result);
2295 }
2296 
2297 
2298 std::string
2300  return (m_group);
2301 }
2302 
2303 void
2305  m_index = index;
2306 }
2307 
2308 void
2310  m_entries.push_back (entry);
2311 }
2312 
2313 void
2316  for (it = m_entries.begin (); it != m_entries.end (); ++it) {
2317  IdDictRegionEntry* entry = *it;
2318  entry->resolve_references (idd, dictionary, *this);
2319  }
2320 }
2321 
2322 void
2325  const std::string& tag){
2326 
2327  if (Debugger::debug ()) {
2328  std::cout << "IdDictRegion::generate_implementation>" << std::endl;
2329  }
2332  for (it = m_entries.begin (); it != m_entries.end (); ++it) {
2333  IdDictRegionEntry* entry = *it;
2334  entry->generate_implementation (idd, dictionary, *this, tag);
2335  }
2337  }
2338 }
2339 
2340 void
2342  // Find the neighbours
2343  IdDictRegion* region = 0;
2344  if ("" != m_next_abs_eta_name) {
2345  region = dictionary.find_region(m_next_abs_eta_name,m_group );
2346  if (region) {
2347  region->m_prev_abs_eta = this;
2348  m_next_abs_eta = region;
2349  }
2350  }
2351  for (unsigned int i = 0; i < m_prev_samp_names.size(); ++i) {
2352  if ("" != m_prev_samp_names[i]) {
2353  region = dictionary.find_region(m_prev_samp_names[i],m_group );
2354  if (region) {
2355  m_prev_samp.push_back(region);
2356  }
2357  }
2358  }
2359  for (unsigned int i = 0; i < m_next_samp_names.size(); ++i) {
2360  if ("" != m_next_samp_names[i]) {
2361  region = dictionary.find_region(m_next_samp_names[i],m_group );
2362  if (region) {
2363  m_next_samp.push_back(region);
2364  }
2365  }
2366  }
2367 
2368  for (unsigned int i = 0; i < m_prev_subdet_names.size(); ++i) {
2369  if ("" != m_prev_subdet_names[i]) {
2370  region = dictionary.find_region(m_prev_subdet_names[i],m_group );
2371  if (region) {
2372  m_prev_subdet.push_back(region);
2373  }
2374  }
2375  }
2376  for (unsigned int i = 0; i < m_next_subdet_names.size(); ++i) {
2377  if ("" != m_next_subdet_names[i]) {
2378  region = dictionary.find_region(m_next_subdet_names[i],m_group );
2379  if (region) {
2380  m_next_subdet.push_back(region);
2381  }
2382 
2383  }
2384  }
2385 }
2386 
2387 
2388 void
2391  m_implementation.clear(); // remove implementation
2393  for (it = m_entries.begin (); it != m_entries.end (); ++it) {
2394  IdDictRegionEntry* entry = *it;
2395  entry->reset_implementation ();
2396  }
2397  // reset neighbours
2398  m_prev_abs_eta = 0;
2399  m_next_abs_eta = 0;
2400  m_prev_samp.clear();
2401  m_next_samp.clear();
2402  m_prev_subdet.clear();
2403  m_next_subdet.clear();
2404 
2406  }
2407 }
2408 
2409 bool IdDictRegion::verify () const {
2410  return (true);
2411 }
2412 
2413 void
2416  for (it = m_entries.begin (); it != m_entries.end (); ++it){
2417  IdDictRegionEntry* entry = *it;
2418  entry->clear ();
2419  delete entry;
2420  }
2421  m_entries.clear ();
2422 }
2423 
2424 Range
2426  Range result;
2427  std::vector <IdDictRegionEntry*>::const_iterator it;
2428  for (it = m_entries.begin (); it != m_entries.end (); ++it){
2429  const IdDictRegionEntry& entry = *(*it);
2430  Range r = entry.build_range ();
2431  result.add (std::move(r));
2432  }
2433  return (result);
2434 }
2435 
2436 
2441 {
2442 }
2443 
2445 {
2446 }
2447 
2448 void
2450  IdDictDictionary& /*dictionary*/,
2451  const std::string& /*tag*/)
2452 {
2453  std::cout << "IdDictSubRegion::generate_implementation - SHOULD NEVER BE CALLED " << std::endl;
2454 }
2455 
2456 
2457 void
2460  IdDictRegion& region,
2461  const std::string& tag)
2462 {
2463 
2464  if (Debugger::debug ())
2465  {
2466  std::cout << "IdDictSubRegion::generate_implementation>" << std::endl;
2467  }
2468 
2469  // NOTE: we DO NOT protect this method with
2470  // m_generated_implementation because a subregion is a "reference"
2471  // and must be looped over to fully implement a region.
2472 
2474 
2475  for (it = m_entries.begin (); it != m_entries.end (); ++it) {
2476  IdDictRegionEntry* entry = *it;
2477  entry->generate_implementation (idd, dictionary, region, tag);
2478  }
2479 }
2480 
2481 void
2483  for (auto * entry:m_entries) {
2484  entry->reset_implementation ();
2485  }
2486 }
2487 
2488 
2489 
2490 void
2492  IdDictDictionary& dictionary, IdDictRegion& /*region*/) {
2493  if(!m_resolved_references) {
2494  m_field = dictionary.find_field (m_field_name);
2495  if (m_field == nullptr) {
2496  m_field = new IdDictField;
2498  dictionary.add_field (m_field);
2499  }
2500 
2501  if (m_specification == unknown) {
2511  unsigned int labels = m_field->get_label_number ();
2512  if (labels == 1) {
2514  m_label = m_field->get_label (0);
2515  } else if (labels > 1) {
2517  for (size_t i = 0; i < labels; ++i) {
2518  m_labels.push_back (m_field->get_label (i));
2519  }
2520  }
2521  }
2522 
2523  if (m_specification == by_label) {
2525  } else if (m_specification == by_labels) {
2526  m_values.clear ();
2527  for (size_t i = 0; i < m_labels.size (); ++i) {
2528  const std::string& label = m_labels[i];
2529  int value = m_field->get_label_value (label);
2530  m_values.push_back (value);
2531  }
2532  }
2533  m_resolved_references = true;
2534  }
2535 }
2536 
2537 void
2539  IdDictDictionary& dictionary, IdDictRegion& region,const std::string& /*tag*/) {
2540 
2541  // Add IdDictFieldImplementation to this region
2542 
2543  // NOTE: we DO NOT protect this method with
2544  // m_generated_implementation because the same object may be
2545  // called more than once because there are IdDictRangeRef's which
2546  // point to the same IdDictRange's.
2547 
2548  if (Debugger::debug ()) {
2549  std::cout << "IdDictRange::generate_implementation>" << std::endl;
2550  }
2551 
2552  region.m_implementation.resize (region.m_implementation.size () + 1);
2553  IdDictFieldImplementation& impl = region.m_implementation.back ();
2554  impl.set_range(this);
2555  if (m_field->m_index == 0) {
2556  m_field->m_index = region.m_implementation.size () - 1;
2557 
2558  } else if (m_field->m_index != (region.m_implementation.size () - 1)) {
2559  std::cout << "Bad field index for " << m_field_name
2560  << " index " << m_field->m_index
2561  << " in dictionary " << dictionary.m_name
2562  << " region #" << region.m_index
2563  << " size " << (region.m_implementation.size () - 1)
2564  << std::endl;
2565  }
2566 
2567  size_t index = region.m_implementation.size () - 1;
2568  if (region.m_implementation.size () <= index) {
2569  std::cout << "IdDictRange::generate_implementation: index >= impl size - "
2570  << index << " " << region.m_implementation.size ()
2571  << std::endl;
2572  return;
2573  }
2574 
2576  switch (m_specification) {
2577  case by_value:
2578  case by_label: {
2579  impl.set_field(Range::field(m_value, m_value));
2580  break;
2581  }
2582  case by_values:
2583  case by_labels: {
2585  v.insert(v.end(), m_values.begin(), m_values.end());
2586  field.set(v);
2587  impl.set_field(field);
2588  }
2589  break;
2590  case by_minvalue:
2591  field.set_minimum (m_minvalue);
2592  impl.set_field(field);
2593  break;
2594  case by_maxvalue:
2595  field.set_maximum (m_maxvalue);
2596  impl.set_field(field);
2597  break;
2598  case by_minmax:
2599  field.set (m_minvalue, m_maxvalue);
2600  impl.set_field(field);
2601  break;
2602  case unknown:
2603  break;
2604  }
2605 }
2606 
2607 
2608 Range
2610  Range result;
2612  switch (m_specification) {
2613  case by_value:
2614  case by_label:{
2615  field.set (m_value, m_value);
2616  break;
2617  }
2618  case by_values:
2619  case by_labels:{
2621  v.insert(v.end(), m_values.begin(), m_values.end());
2622  field.set (v);
2623  break;
2624  }
2625  case by_minvalue:{
2626  field.set_minimum (m_minvalue);
2627  break;
2628  }
2629  case by_maxvalue:{
2630  field.set_maximum (m_maxvalue);
2631  break;
2632  }
2633  case by_minmax:{
2634  field.set (m_minvalue, m_maxvalue);
2635  break;
2636  }
2637  case unknown:{
2638  break;
2639  }
2640  }
2642  field.set(true);
2643  } else if (has_previous == m_continuation_mode) {
2644  field.set_previous(m_prev_value);
2645  } else if (has_next == m_continuation_mode) {
2646  field.set_next(m_next_value);
2647  } else if (has_both == m_continuation_mode) {
2648  field.set_previous(m_prev_value);
2649  field.set_next(m_next_value);
2650  }
2651  result.add (std::move(field));
2652  return (result);
2653 }
2654 
2655 
2656 
2657 void
2660  IdDictRegion& region) {
2661  if (m_range) m_range->resolve_references (idd, dictionary, region);
2662 }
2663 
2664 void
2667  IdDictRegion& region,
2668  const std::string& tag) {
2669  if (m_range) m_range->generate_implementation (idd, dictionary, region, tag);
2670 }
2671 
2672 void
2675 }
2676 
2677 bool
2679  if (m_range) return (m_range->verify());
2680  return (true);
2681 }
2682 
2683 Range
2685  Range result;
2686  if (m_range) result = m_range->build_range();
2687  return (result);
2688 }
2689 
2690 
2691 
2692 
2697  :
2698  m_subregion(0),
2699  m_resolved_references(false)
2700  //m_generated_implementation(false)
2701 {
2702 }
2703 
2705 {
2706 }
2707 
2710  IdDictRegion& /*region*/)
2711 {
2712  if(!m_resolved_references) {
2713  m_subregion = dictionary.find_subregion (m_subregion_name);
2714  m_resolved_references = true;
2715  }
2716 }
2717 
2720  IdDictRegion& region,
2721  const std::string& tag)
2722 {
2723 
2724  if (Debugger::debug ())
2725  {
2726  std::cout << "IdDictReference::generate_implementation>" << std::endl;
2727  }
2728 
2729  if (m_subregion != 0) m_subregion->generate_implementation (idd, dictionary, region, tag);
2730 }
2731 
2733 {
2735 }
2736 
2738 {
2739  return (true);
2740 }
2741 
2743 {
2744  Range result;
2745 
2747 
2748 
2749  return (result);
2750 }
2751 
2752 
2753 
2754 
2755 
2756 
2761  :
2762  m_dictionary (0),
2763  m_resolved_references(false),
2764  m_generated_implementation(false),
2765  m_propagated_information(false)
2766 {
2767 }
2768 
2770 {
2771 }
2772 
2775  IdDictRegion& /*region*/)
2776 {
2777  if(!m_resolved_references) {
2779  if(m_dictionary) {
2782  }
2783  m_resolved_references = true;
2784  }
2785 }
2786 
2789  IdDictRegion& region,
2790  const std::string& tag)
2791 {
2793  if(m_dictionary) {
2794  if (!m_propagated_information) {
2795 
2796  // Propagate information to referenced dictionary:
2797  //
2798  // 1) Loop over ranges in this region and add them to the
2799  // referenced dictionary, then propagate the generate
2800  // implementation
2801 
2802  // 2) Duplicate the regions of the current dictionary in
2803  // referenced dictionary. Only the top level range(s) need
2804  // to be propagated to correctly calculate the bits of the
2805  // upper levels.
2806 
2807  // Save a vector of entries to prepend, inverting their order
2808  std::vector<IdDictRegionEntry*> prepend_entries;
2810  for (it = region.m_entries.begin (); it != region.m_entries.end (); ++it) {
2811  IdDictRegionEntry* entry = *it;
2812  if(this == entry) break; // end when we get to the dictionary (this)
2813  // If this is a range entry, add a duplicate to all
2814  // regions in the subdictionary
2815  IdDictRange* range = dynamic_cast<IdDictRange*> (entry);
2816  if(range) {
2817  prepend_entries.insert(prepend_entries.begin(), entry);
2818  }
2819  }
2820 
2821 
2822 
2823 
2824  // Now prepend list to each region and generate each region
2826  for (it2 = m_dictionary->m_all_regions.begin (); it2 != m_dictionary->m_all_regions.end (); ++it2) {
2827  IdDictRegion& region2 = *(*it2);
2828  for (it = prepend_entries.begin(); it != prepend_entries.end(); ++it) {
2829  IdDictRegionEntry* entry = *it;
2830  IdDictRange* range = dynamic_cast<IdDictRange*> (entry);
2831  if(range) {
2832  IdDictRangeRef* new_range = new IdDictRangeRef;
2833  new_range->m_range = range;
2834  region2.m_entries.insert(region2.m_entries.begin(), new_range);
2835  }
2836  }
2837  }
2838 
2839  // Now copy all prefixes into new regions in the
2840  // referenced dictionary
2841  if (prepend_entries.size() > 0) {
2842 
2843  // Save region number
2844  const IdDictRegion& region2 = *m_dictionary->m_all_regions.back();
2845  size_t region_number = region2.m_index + 1;
2846 
2848 
2849  // Loop over all regions of current dict, add to ref dict (m_dictionary)
2850  for (it = dictionary.m_all_regions.begin (); it != dictionary.m_all_regions.end (); ++it, ++region_number) {
2851  IdDictRegion& region3 = *(*it);
2852  IdDictRegion* new_region = new IdDictRegion;
2853  new_region->m_name = "dummy";
2854  new_region->m_group = "dummy";
2855  new_region->m_index = region_number;
2856 
2857  // to all region vectors
2858  m_dictionary->m_all_regions.push_back(new_region);
2859  // to the entries of the dictionary
2860  m_dictionary->add_dictentry(new_region);
2861 
2862  // Now add in only the ranges
2864  size_t i = 0;
2865  for (it = region3.m_entries.begin (); it != region3.m_entries.end (); ++it, ++i) {
2866  if (i >= prepend_entries.size()) continue;
2867 
2868  IdDictRegionEntry* entry = *it;
2869  IdDictRange* range = dynamic_cast<IdDictRange*> (entry);
2870  if(range) {
2871  IdDictRangeRef* new_range = new IdDictRangeRef;
2872  new_range->m_range = range;
2873  new_region->m_entries.push_back(new_range);
2874  }
2875  }
2876  }
2877  }
2878  m_propagated_information = true;
2879  }
2882  }
2883  else {
2884  std::cout << "IdDictDictionaryRef::generate_implementation: - WARNING no dictionary found, cannot generate implementation "
2885  << std::endl;
2886  }
2887  }
2888 }
2889 
2891 {
2895  }
2896 }
2897 
2899 {
2900  return (true);
2901 }
2902 
2904  Range result;
2905  return (result);
2906 }
2907 
2908 
2909 
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
IdDictDictionary::find_region
IdDictRegion * find_region(const std::string &region_name) const
Definition: IdDictMgr.cxx:368
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
Debugger
Definition: IdDictMgr.cxx:19
IdDictField::m_index
size_t m_index
Definition: IdDictDefs.h:331
beamspotman.r
def r
Definition: beamspotman.py:676
IdDictMgr::dictionary_map
std::map< std::string, IdDictDictionary * > dictionary_map
Definition: IdDictDefs.h:34
IdDictSubRegion::generate_implementation
void generate_implementation(const IdDictMgr &idd, IdDictDictionary &dictionary, const std::string &tag="")
Definition: IdDictMgr.cxx:2449
IdDictRangeRef
Definition: IdDictDefs.h:577
python.SystemOfUnits.second
int second
Definition: SystemOfUnits.py:120
IdDictDictEntry::~IdDictDictEntry
virtual ~IdDictDictEntry()
Definition: IdDictMgr.cxx:2183
IdDictRegion::m_next_samp
std::vector< IdDictRegion * > m_next_samp
Definition: IdDictDefs.h:473
IdDictDictionary::build_multirange
MultiRange build_multirange() const
Get MultiRange for full dictionary.
Definition: IdDictMgr.cxx:926
python.CaloRecoConfig.f
f
Definition: CaloRecoConfig.py:128
IdDictGroup::m_name
std::string m_name
Definition: IdDictDefs.h:371
IdDictMgr::resolve_references
void resolve_references()
Construct dictionary after parsing.
Definition: IdDictMgr.cxx:206
IdDictMgr::verify
bool verify() const
Definition: IdDictMgr.cxx:265
IdDictAltRegions::resolve_references
void resolve_references(const IdDictMgr &idd, IdDictDictionary &dictionary)
Definition: IdDictMgr.cxx:2226
Debugger::get_debug_state
static bool get_debug_state()
Definition: IdDictMgr.cxx:21
IdDictDictionary::unpack
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 incl...
Definition: IdDictMgr.cxx:1366
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
IdDictField::get_label
const std::string & get_label(size_t index) const
Definition: IdDictMgr.cxx:1936
IdDictRegion::resolve_references
void resolve_references(const IdDictMgr &idd, IdDictDictionary &dictionary)
Definition: IdDictMgr.cxx:2314
IdDictDictionary::reset
int reset(size_t index1, size_t index2, size_t region_index, Identifier &packedId) const
Reset fields from index1 to index2.
Definition: IdDictMgr.cxx:1297
get_generator_info.result
result
Definition: get_generator_info.py:21
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
IdDictGroup
Definition: IdDictDefs.h:341
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: IdDictMgr.cxx:1884
IdDictMgr::m_metadata
metadata_map m_metadata
Definition: IdDictDefs.h:88
IdDictDictionary::generate_implementation
void generate_implementation(const IdDictMgr &idd, const std::string &tag="")
Definition: IdDictMgr.cxx:680
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
IdDictField::add_label
void add_label(IdDictLabel *label)
Definition: IdDictMgr.cxx:1926
IdDictRange::by_minmax
@ by_minmax
Definition: IdDictDefs.h:548
IdDictLabel::m_value
int m_value
Definition: IdDictDefs.h:337
IdDictDictionary::m_groups
std::vector< IdDictGroup * > m_groups
Definition: IdDictDefs.h:304
IdDictReference::~IdDictReference
~IdDictReference()
Definition: IdDictMgr.cxx:2704
IdDictDictionary::do_checks
bool do_checks(void) const
Checks are performed by default in debug compilation and NOT in optimized compilation.
Definition: IdDictMgr.cxx:1872
IdentifierField::overlaps_with
bool overlaps_with(const IdentifierField &other) const
Check whether two IdentifierFields overlap.
Definition: IdentifierField.cxx:226
index
Definition: index.py:1
hist_file_dump.d
d
Definition: hist_file_dump.py:137
PlotCalibFromCool.label
label
Definition: PlotCalibFromCool.py:78
IdDictRangeRef::verify
bool verify() const
Definition: IdDictMgr.cxx:2678
IdDictGroup::sort
void sort()
Sort:
Definition: IdDictMgr.cxx:2124
IdDictAltRegions::m_selected_region
IdDictRegion * m_selected_region
Definition: IdDictDefs.h:427
IdDictRange::by_label
@ by_label
Definition: IdDictDefs.h:544
IdDictDictionary::find_label
IdDictLabel * find_label(const std::string &field, const std::string &label) const
Definition: IdDictMgr.cxx:333
IdDictGroup::m_regions
std::vector< IdDictRegion * > m_regions
Definition: IdDictDefs.h:373
IdDictDictionaryRef::build_range
Range build_range() const
Definition: IdDictMgr.cxx:2903
Identifier::mask_shift
value_type mask_shift(value_type mask, size_type shift) const
extract field(s) by masking first, then shifting
IdDictReference::m_resolved_references
bool m_resolved_references
Definition: IdDictDefs.h:620
IdDictMgr::set_do_checks
void set_do_checks(bool do_checks)
Definition: IdDictMgr.cxx:110
IdDictField::clear
void clear()
Definition: IdDictMgr.cxx:1960
IdDictRange::m_field_name
std::string m_field_name
Definition: IdDictDefs.h:537
IdDictRegion::m_prev_abs_eta
IdDictRegion * m_prev_abs_eta
Definition: IdDictDefs.h:470
IdDictDictionaryRef::resolve_references
void resolve_references(const IdDictMgr &idd, IdDictDictionary &dictionary, IdDictRegion &region)
Definition: IdDictMgr.cxx:2773
IdDictGroup::verify
bool verify() const
Definition: IdDictMgr.cxx:2109
IdDictDictionary::groups_const_it
groups_type::const_iterator groups_const_it
Definition: IdDictDefs.h:298
IdDictRegion::find_neighbours
void find_neighbours(const IdDictDictionary &dictionary)
Definition: IdDictMgr.cxx:2341
IdDictRangeRef::m_range
IdDictRange * m_range
Definition: IdDictDefs.h:594
ExpandedIdentifier::add
void add(element_type value)
Append a value into a new field.
skel.it
it
Definition: skel.GENtoEVGEN.py:423
IdDictRange::by_labels
@ by_labels
Definition: IdDictDefs.h:545
RangeIterator
This iterator is able to generate all possible identifiers, from a fully bounded Range.
Definition: RangeIterator.h:19
IdDictDictionary::regions_type
std::vector< IdDictRegion * > regions_type
Definition: IdDictDefs.h:292
IdDictMgr::get_dictionary_map
const dictionary_map & get_dictionary_map() const
Access to all dictionaries.
Definition: IdDictMgr.cxx:158
ExpandedIdentifier
Definition: DetectorDescription/Identifier/Identifier/ExpandedIdentifier.h:102
IdDictReference::m_subregion
IdDictSubRegion * m_subregion
Definition: IdDictDefs.h:617
IdDictDictionary::m_do_checks
bool m_do_checks
Definition: IdDictDefs.h:312
IdDictDictionaryRef::~IdDictDictionaryRef
~IdDictDictionaryRef()
Definition: IdDictMgr.cxx:2769
IdDictField::find_label
IdDictLabel * find_label(const std::string &name) const
Definition: IdDictMgr.cxx:1914
IdDictField::generate_implementation
void generate_implementation(const IdDictMgr &idd, const std::string &tag="")
Definition: IdDictMgr.cxx:1900
athena.value
value
Definition: athena.py:124
ExpandedIdentifier::fields
size_type fields() const
IdDictMgr::find_metadata
const std::string & find_metadata(const std::string &name) const
Access to meta data, name/value pairs.
Definition: IdDictMgr.cxx:135
IdDictReference::generate_implementation
void generate_implementation(const IdDictMgr &idd, IdDictDictionary &dictionary, IdDictRegion &region, const std::string &tag="")
Definition: IdDictMgr.cxx:2718
IdDictAltRegions::generate_implementation
void generate_implementation(const IdDictMgr &idd, IdDictDictionary &dictionary, const std::string &tag="")
Definition: IdDictMgr.cxx:2239
IdDictMgr::m_dictionaries
dictionary_map m_dictionaries
Definition: IdDictDefs.h:87
IdDictDictionary::~IdDictDictionary
~IdDictDictionary()
Definition: IdDictMgr.cxx:307
ReadOfcFromCool.field
field
Definition: ReadOfcFromCool.py:48
IdDictDictEntry::clear
virtual void clear()=0
IdDictAltRegions::reset_implementation
void reset_implementation()
Definition: IdDictMgr.cxx:2265
IdDictReference::verify
bool verify() const
Definition: IdDictMgr.cxx:2737
IdDictRange::m_specification
specification_type m_specification
Definition: IdDictDefs.h:559
IdDictRegion::m_prev_samp
std::vector< IdDictRegion * > m_prev_samp
Definition: IdDictDefs.h:472
IdDictRegion::clear
void clear()
Definition: IdDictMgr.cxx:2414
IdDictReference::IdDictReference
IdDictReference()
Definition: IdDictMgr.cxx:2696
IdDictRangeRef::resolve_references
void resolve_references(const IdDictMgr &idd, IdDictDictionary &dictionary, IdDictRegion &region)
Definition: IdDictMgr.cxx:2658
IdDictDictEntry
Definition: IdDictDefs.h:378
IdDictRegion::verify
bool verify() const
Definition: IdDictMgr.cxx:2409
empty
bool empty(TH1 *h)
Definition: computils.cxx:294
IdDictAltRegions
Definition: IdDictDefs.h:402
IdDictRegion::m_prev_subdet
std::vector< IdDictRegion * > m_prev_subdet
Definition: IdDictDefs.h:474
IdDictDictionary::pack32
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,...
Definition: IdDictMgr.cxx:1112
IdDictMgr::m_DTD_version
std::string m_DTD_version
Definition: IdDictDefs.h:85
TypeIdBuilder
Definition: IdDictMgr.cxx:52
IdDictDictionary::find_field
IdDictField * find_field(const std::string &name) const
Definition: IdDictMgr.cxx:311
IdDictSubRegion::reset_implementation
void reset_implementation()
Definition: IdDictMgr.cxx:2482
CalibDbCompareRT.region_id
region_id
Definition: CalibDbCompareRT.py:68
IdDictRegion
Definition: IdDictDefs.h:433
IdDictGroup::generate_implementation
void generate_implementation(const IdDictMgr &idd, IdDictDictionary &dictionary, const std::string &tag="")
Definition: IdDictMgr.cxx:2054
IdDictRegion::m_next_subdet
std::vector< IdDictRegion * > m_next_subdet
Definition: IdDictDefs.h:475
IdDictDictionary::resolve_references
void resolve_references(const IdDictMgr &idd)
Definition: IdDictMgr.cxx:423
python.utils.AtlRunQueryLookup.mask
string mask
Definition: AtlRunQueryLookup.py:460
IdDictRegion::m_name
std::string m_name
Definition: IdDictDefs.h:461
IdDictDictionary::verify
bool verify() const
Here, we verify global constraints : (this must only be applied after the resolve_references and ge...
Definition: IdDictMgr.cxx:843
RangeIterator::begin
RangeIterator begin() const
Definition: RangeIterator.cxx:12
python.iconfTool.models.loaders.level
level
Definition: loaders.py:20
IdDictDictionaryRef::m_dictionary_name
std::string m_dictionary_name
Definition: IdDictDefs.h:641
IdDictRange::m_field
IdDictField * m_field
Definition: IdDictDefs.h:538
IdDictRange::generate_implementation
void generate_implementation(const IdDictMgr &idd, IdDictDictionary &dictionary, IdDictRegion &region, const std::string &tag="")
Definition: IdDictMgr.cxx:2538
IdDictRange::has_previous
@ has_previous
Definition: IdDictDefs.h:554
IdDictLabel::m_valued
bool m_valued
Definition: IdDictDefs.h:336
IdDictDefs.h
IdDictRange::by_minvalue
@ by_minvalue
Definition: IdDictDefs.h:546
IdDictDictionary::reset_implementation
void reset_implementation()
Definition: IdDictMgr.cxx:731
IdDictGroup::m_entries
std::vector< IdDictDictEntry * > m_entries
Definition: IdDictDefs.h:372
IdDictDictionary::m_parent_dict
IdDictDictionary * m_parent_dict
Definition: IdDictDefs.h:306
IdDictMgr::IdDictMgr
IdDictMgr()
Definition: IdDictMgr.cxx:80
IdDictGroup::resolve_references
void resolve_references(const IdDictMgr &idd, IdDictDictionary &dictionary, size_t &index)
Definition: IdDictMgr.cxx:2040
IdDictDictionary::size_type
Identifier::size_type size_type
Definition: IdDictDefs.h:100
IdDictMgr
Definition: IdDictDefs.h:32
IdDictDictionary::groups_it
groups_type::iterator groups_it
Definition: IdDictDefs.h:297
IdDictRegion::m_next_abs_eta
IdDictRegion * m_next_abs_eta
Definition: IdDictDefs.h:471
TypeIdBuilder::build_id
static int build_id()
Definition: IdDictMgr.cxx:69
IdDictMgr::set_do_neighbours
void set_do_neighbours(bool do_neighbours)
Definition: IdDictMgr.cxx:125
IdDictDictionary::m_fields
std::map< std::string, IdDictField * > m_fields
Definition: IdDictDefs.h:300
beamspotnt.labels
list labels
Definition: bin/beamspotnt.py:1447
IdDictDictionary::IdDictDictionary
IdDictDictionary()
Definition: IdDictMgr.cxx:298
IdDictDictionary::find_group
IdDictGroup * find_group(const std::string &group_name) const
Definition: IdDictMgr.cxx:385
IdDictAltRegions::IdDictAltRegions
IdDictAltRegions()
Definition: IdDictMgr.cxx:2190
IdDictMgr::find_dictionary
IdDictDictionary * find_dictionary(const std::string &name) const
Access dictionary by name.
Definition: IdDictMgr.cxx:163
IdDictRegion::build_range
Range build_range() const
Definition: IdDictMgr.cxx:2425
IdDictRegion::m_index
size_t m_index
Definition: IdDictDefs.h:460
IdDictMgr::add_subdictionary_name
void add_subdictionary_name(const std::string &name)
Definition: IdDictMgr.cxx:200
IdDictRegion::reset_implementation
void reset_implementation()
Definition: IdDictMgr.cxx:2389
Trk::index1
@ index1
Definition: BoundarySurfaceFace.h:48
IdDictRange::m_maxvalue
int m_maxvalue
Definition: IdDictDefs.h:565
IdDictField::m_name
std::string m_name
Definition: IdDictDefs.h:329
lumiFormat.i
int i
Definition: lumiFormat.py:85
IdDictRange::has_both
@ has_both
Definition: IdDictDefs.h:555
IdDictGroup::IdDictGroup
IdDictGroup()
Definition: IdDictMgr.cxx:1972
IdDictRange::m_prev_value
int m_prev_value
Definition: IdDictDefs.h:566
IdDictField::get_label_number
size_t get_label_number() const
Definition: IdDictMgr.cxx:1931
IdDictAltRegions::group_name
std::string group_name() const
Definition: IdDictMgr.cxx:2206
DetDescrDictionaryDict::it1
std::vector< HWIdentifier >::iterator it1
Definition: DetDescrDictionaryDict.h:17
IdDictAltRegions::map_iterator
map_type::iterator map_iterator
Definition: IdDictDefs.h:424
IdDictField::verify
bool verify() const
Definition: IdDictMgr.cxx:1909
IdDictDictionary::m_generated_implementation
bool m_generated_implementation
Definition: IdDictDefs.h:311
IdDictRegion::m_is_empty
bool m_is_empty
Definition: IdDictDefs.h:464
IdDictGroup::build_multirange
MultiRange build_multirange() const
Get MultiRange for this group.
Definition: IdDictMgr.cxx:2008
IdDictRange::by_maxvalue
@ by_maxvalue
Definition: IdDictDefs.h:547
IdDictDictEntry::IdDictDictEntry
IdDictDictEntry()
Definition: IdDictMgr.cxx:2179
IdDictRegion::add_entry
void add_entry(IdDictRegionEntry *entry)
Definition: IdDictMgr.cxx:2309
IdDictDictionary::m_regions
std::vector< IdDictRegion * > m_regions
Definition: IdDictDefs.h:302
plotBeamSpotVxVal.range
range
Definition: plotBeamSpotVxVal.py:195
checkCorrelInHIST.prefix
dictionary prefix
Definition: checkCorrelInHIST.py:391
IdDictGroup::clear
void clear()
Definition: IdDictMgr.cxx:2161
IdDictGroup::add_dictentry
void add_dictentry(IdDictDictEntry *entry)
Definition: IdDictMgr.cxx:2034
mc.group_name
group_name
Definition: mc.PhPy8EG_A14NNPDF23_NNLOPS_example.py:33
IdDictRegion::group_name
std::string group_name() const
Definition: IdDictMgr.cxx:2299
IdDictRange::unknown
@ unknown
Definition: IdDictDefs.h:541
IdDictRange::m_value
int m_value
Definition: IdDictDefs.h:563
IdDictDictionaryRef::m_propagated_information
bool m_propagated_information
Definition: IdDictDefs.h:649
IdDictDictionary::add_subdictionary_name
void add_subdictionary_name(const std::string &name)
Definition: IdDictMgr.cxx:405
IdDictDictionary::regions_it
regions_type::iterator regions_it
Definition: IdDictDefs.h:293
IdDictLabel
Definition: IdDictDefs.h:334
IdDictMgr::m_resolved_references
bool m_resolved_references
Definition: IdDictDefs.h:90
Debugger::debug
static bool debug()
Definition: IdDictMgr.cxx:28
IdDictRegion::m_next_abs_eta_name
std::string m_next_abs_eta_name
Definition: IdDictDefs.h:465
IdDictGroup::regions
const std::vector< IdDictRegion * > & regions()
Definition: IdDictMgr.cxx:2001
IdDictMgr::do_neighbours
bool do_neighbours() const
Check whether or not to init neighbours.
Definition: IdDictMgr.cxx:119
IdDictMgr::m_do_checks
bool m_do_checks
Definition: IdDictDefs.h:92
IdDictRegion::generate_implementation
void generate_implementation(const IdDictMgr &idd, IdDictDictionary &dictionary, const std::string &tag="")
Definition: IdDictMgr.cxx:2323
MuonValidation_CreateResolutionProfiles.fit
def fit(h, emin, emax)
Definition: MuonValidation_CreateResolutionProfiles.py:69
IdDictField::get_label_value
ExpandedIdentifier::element_type get_label_value(const std::string &name) const
Definition: IdDictMgr.cxx:1941
IdentifierField::element_vector
std::vector< element_type > element_vector
Definition: IdentifierField.h:23
Identifier::ALL_BITS
@ ALL_BITS
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:34
IdDictRegion::m_entries
std::vector< IdDictRegionEntry * > m_entries
Definition: IdDictDefs.h:458
IdDictDictionary::regions_const_it
regions_type::const_iterator regions_const_it
Definition: IdDictDefs.h:294
IdDictMgr::reset_implementation
void reset_implementation()
Reset of implementation.
Definition: IdDictMgr.cxx:245
IdDictField::m_labels
std::vector< IdDictLabel * > m_labels
Definition: IdDictDefs.h:330
IdDictDictionary::get_label_value
int get_label_value(const std::string &field, const std::string &label, int &value) const
Definition: IdDictMgr.cxx:340
IdDictMgr::add_dictionary
void add_dictionary(IdDictDictionary *dictionary)
Fillers:
Definition: IdDictMgr.cxx:174
python.update_ci_reference_files.mr
mr
Definition: update_ci_reference_files.py:415
GetAllXsec.entry
list entry
Definition: GetAllXsec.py:132
grepfile.sep
sep
Definition: grepfile.py:38
IdDictRegion::m_group
std::string m_group
Definition: IdDictDefs.h:462
IdDictMgr::~IdDictMgr
~IdDictMgr()
Definition: IdDictMgr.cxx:89
IdDictRegion::m_prev_samp_names
std::vector< std::string > m_prev_samp_names
Definition: IdDictDefs.h:466
IdDictDictionary::sort
void sort()
Sort:
Definition: IdDictMgr.cxx:864
MultiRange
A MultiRange combines several Ranges.
Definition: MultiRange.h:17
master.dictionary
dictionary
Definition: master.py:47
Trk::index2
@ index2
Definition: BoundarySurfaceFace.h:49
IdDictSubRegion::~IdDictSubRegion
~IdDictSubRegion()
Definition: IdDictMgr.cxx:2444
IdDictAltRegions::m_regions
map_type m_regions
Definition: IdDictDefs.h:426
IdDictAltRegions::build_range
Range build_range() const
Definition: IdDictMgr.cxx:2290
IdDictDictionary::clear
void clear()
Definition: IdDictMgr.cxx:884
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
IdDictAltRegions::clear
void clear()
Definition: IdDictMgr.cxx:2278
IdDictRegionEntry::verify
virtual bool verify() const
Definition: IdDictDefs.h:518
IdDictDictionary::entries_it
entries_type::iterator entries_it
Definition: IdDictDefs.h:289
IdDictDictionary::add_field
void add_field(IdDictField *field)
Definition: IdDictMgr.cxx:348
Identifier::NBITS
@ NBITS
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
RangeIterator.h
IdDictRange::m_labels
std::vector< std::string > m_labels
Definition: IdDictDefs.h:569
IdDictDictionary::m_do_neighbours
bool m_do_neighbours
Definition: IdDictDefs.h:313
IdDictRange::has_next
@ has_next
Definition: IdDictDefs.h:553
IdDictRangeRef::build_range
Range build_range() const
Definition: IdDictMgr.cxx:2684
IdDictDictEntry::group_name
virtual std::string group_name() const =0
IdDictDictionaryRef::reset_implementation
void reset_implementation()
Definition: IdDictMgr.cxx:2890
Range
A Range describes the possible ranges for the field values of an ExpandedIdentifier.
Definition: DetectorDescription/Identifier/Identifier/Range.h:29
IdDictRegion::set_index
void set_index(size_t index)
Definition: IdDictMgr.cxx:2304
IdDictRegion::m_next_samp_names
std::vector< std::string > m_next_samp_names
Definition: IdDictDefs.h:467
IdDictRange::m_continuation_mode
continuation_mode m_continuation_mode
Definition: IdDictDefs.h:568
IdDictDictionary
Definition: IdDictDefs.h:97
Range::add
void add()
Add a wild card field.
Definition: DetectorDescription/Identifier/src/Range.cxx:75
IdDictSubRegion::IdDictSubRegion
IdDictSubRegion()
Definition: IdDictMgr.cxx:2440
IdDictRegionEntry
Definition: IdDictDefs.h:507
IdDictDictionary::find_subregion
IdDictSubRegion * find_subregion(const std::string &subregion_name) const
Definition: IdDictMgr.cxx:357
IdDictRange
Definition: IdDictDefs.h:523
RangeIterator::end
RangeIterator end() const
Definition: RangeIterator.cxx:24
python.PyAthena.v
v
Definition: PyAthena.py:154
IdDictRegion::m_prev_subdet_names
std::vector< std::string > m_prev_subdet_names
Definition: IdDictDefs.h:468
impl
Definition: CaloGPUClusterAndCellDataMonitorOptions.h:46
IdDictRegion::m_generated_implementation
bool m_generated_implementation
Definition: IdDictDefs.h:484
IdDictGroup::name
const std::string & name()
Definition: IdDictMgr.cxx:1989
DeMoScan.index
string index
Definition: DeMoScan.py:364
__attribute__
__attribute__((always_inline)) inline uint16_t TileCalibDrawerBase
Definition: TileCalibDrawerBase.h:190
IdDictGroup::reset_implementation
void reset_implementation()
Definition: IdDictMgr.cxx:2094
IdDictDictionary::m_subdictionary_names
std::vector< std::string > m_subdictionary_names
Definition: IdDictDefs.h:305
IdDictRange::build_range
Range build_range() const
Definition: IdDictMgr.cxx:2609
IdDictField::reset_implementation
void reset_implementation()
Definition: IdDictMgr.cxx:1905
CaloLCW_tf.group
group
Definition: CaloLCW_tf.py:28
IdDictReference::reset_implementation
void reset_implementation()
Definition: IdDictMgr.cxx:2732
SCT_ConditionsAlgorithms::CoveritySafe::getenv
std::string getenv(const std::string &variableName)
get an environment variable
Definition: SCT_ConditionsUtilities.cxx:17
IdDictDictionaryRef::verify
bool verify() const
Definition: IdDictMgr.cxx:2898
IdDictDictionary::m_subregions
std::map< std::string, IdDictSubRegion * > m_subregions
Definition: IdDictDefs.h:301
IdDictGroup::m_generated_implementation
bool m_generated_implementation
Definition: IdDictDefs.h:374
IdDictDictionary::add_dictentry
void add_dictentry(IdDictDictEntry *entry)
Definition: IdDictMgr.cxx:412
IdDictRegionEntry::reset_implementation
virtual void reset_implementation()
Definition: IdDictDefs.h:517
MultiRange::size
size_type size() const
Definition: MultiRange.cxx:70
DeMoScan.first
bool first
Definition: DeMoScan.py:536
IdDictReference::resolve_references
void resolve_references(const IdDictMgr &idd, IdDictDictionary &dictionary, IdDictRegion &region)
Definition: IdDictMgr.cxx:2708
IdDictRange::m_resolved_references
bool m_resolved_references
Definition: IdDictDefs.h:573
IdDictDictionaryRef::generate_implementation
void generate_implementation(const IdDictMgr &idd, IdDictDictionary &dictionary, IdDictRegion &region, const std::string &tag="")
Definition: IdDictMgr.cxx:2787
IdentifierField
This is the individual specification for the range of one ExpandedIdentifier IdentifierField.
Definition: IdentifierField.h:19
IdDictMgr::m_do_neighbours
bool m_do_neighbours
Definition: IdDictDefs.h:93
IdDictRange::by_values
@ by_values
Definition: IdDictDefs.h:543
IdDictMgr::set_DTD_version
void set_DTD_version(const std::string &DTD_version)
Definition: IdDictMgr.cxx:152
ExpandedIdentifier::clear
void clear()
Erase all fields.
IdDictMgr::clear
void clear()
Definition: IdDictMgr.cxx:278
TypeId
Definition: IdDictMgr.cxx:60
IdDictMgr::do_checks
bool do_checks() const
Check whether or not to do checks for ids.
Definition: IdDictMgr.cxx:104
IdDictAltRegions::set_index
void set_index(size_t index)
Definition: IdDictMgr.cxx:2215
IdDictRangeRef::generate_implementation
void generate_implementation(const IdDictMgr &idd, IdDictDictionary &dictionary, IdDictRegion &region, const std::string &tag="")
Definition: IdDictMgr.cxx:2665
IdDictMgr::DTD_version
const std::string & DTD_version() const
DTD version.
Definition: IdDictMgr.cxx:99
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
IdDictDictionaryRef::m_dictionary
IdDictDictionary * m_dictionary
Definition: IdDictDefs.h:642
IdDictGroup::entries
const std::vector< IdDictDictEntry * > & entries()
Definition: IdDictMgr.cxx:1995
str
Definition: BTagTrackIpAccessor.cxx:11
IdentifierField::both_bounded
@ both_bounded
Definition: IdentifierField.h:34
IdDictDictionaryRef::m_generated_implementation
bool m_generated_implementation
Definition: IdDictDefs.h:648
IdDictRange::m_label
std::string m_label
Definition: IdDictDefs.h:562
IdDictSubRegion
Definition: IdDictDefs.h:488
IdDictRange::by_value
@ by_value
Definition: IdDictDefs.h:542
CaloCondBlobAlgs_fillNoiseFromASCII.tag
string tag
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:24
IdDictDictionaryRef::m_resolved_references
bool m_resolved_references
Definition: IdDictDefs.h:647
IdDictDictionary::set_do_neighbours
void set_do_neighbours(bool do_neighbours)
Definition: IdDictMgr.cxx:1890
CaloCondBlobAlgs_fillNoiseFromASCII.fields
fields
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:106
IdDictDictionaryRef::IdDictDictionaryRef
IdDictDictionaryRef()
Definition: IdDictMgr.cxx:2760
IdDictField
Definition: IdDictDefs.h:316
IdDictRange::wrap_around
@ wrap_around
Definition: IdDictDefs.h:556
IdDictFieldImplementation
IdDictFieldImplementation is used to capture the specification of a single field of an Identifier.
Definition: IdDictFieldImplementation.h:58
IdDictGroup::~IdDictGroup
virtual ~IdDictGroup()
Definition: IdDictMgr.cxx:1985
IdDictRange::resolve_references
void resolve_references(const IdDictMgr &idd, IdDictDictionary &dictionary, IdDictRegion &region)
Definition: IdDictMgr.cxx:2491
IdDictDictionary::integrate_bits
void integrate_bits()
Set up integral of bits for efficient unpacking.
Definition: IdDictMgr.cxx:794
ExpandedIdentifier::element_type
int element_type
Definition: DetectorDescription/Identifier/Identifier/ExpandedIdentifier.h:106
IdDictAltRegions::~IdDictAltRegions
~IdDictAltRegions()
Definition: IdDictMgr.cxx:2196
IdDictMgr::tag
const std::string & tag() const
Version tag.
Definition: IdDictMgr.cxx:94
IdDictRegion::m_implementation
std::vector< IdDictFieldImplementation > m_implementation
Definition: IdDictDefs.h:459
IdDictAltRegions::verify
bool verify() const
Definition: IdDictMgr.cxx:2272
IdDictRangeRef::reset_implementation
void reset_implementation()
Definition: IdDictMgr.cxx:2673
IdDictReference::m_subregion_name
std::string m_subregion_name
Definition: IdDictDefs.h:616
IdDictMgr::m_generated_implementation
bool m_generated_implementation
Definition: IdDictDefs.h:91
IdDictDictionary::copy
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.
Definition: IdDictMgr.cxx:1783
IdDictDictionary::add_subregion
void add_subregion(IdDictSubRegion *subregion)
Definition: IdDictMgr.cxx:396
RV
std::vector< IdDictRegion * > RV
Definition: IdDictMgr.cxx:454
IdDictField::resolve_references
void resolve_references(const IdDictMgr &idd)
Definition: IdDictMgr.cxx:1896
IdDictRange::m_minvalue
int m_minvalue
Definition: IdDictDefs.h:564
fitman.k
k
Definition: fitman.py:528
IdDictMgr::m_subdictionary_names
std::set< std::string > m_subdictionary_names
Definition: IdDictDefs.h:89
IdDictMgr::m_tag
std::string m_tag
Definition: IdDictDefs.h:86
IdDictReference::build_range
Range build_range() const
Definition: IdDictMgr.cxx:2742
IdDictDictionary::m_all_regions
std::vector< IdDictRegion * > m_all_regions
Definition: IdDictDefs.h:303
read_hist_ntuple.f1
f1
Definition: read_hist_ntuple.py:4
IdDictRange::m_next_value
int m_next_value
Definition: IdDictDefs.h:567
IdDictMgr::add_metadata
void add_metadata(const std::string &name, const std::string &value)
Definition: IdDictMgr.cxx:144
IdDictMgr::generate_implementation
void generate_implementation(const std::string &tag="")
Definition: IdDictMgr.cxx:219
IdDictRegion::m_next_subdet_names
std::vector< std::string > m_next_subdet_names
Definition: IdDictDefs.h:469
IdDictRange::m_values
std::vector< int > m_values
Definition: IdDictDefs.h:570
Identifier
Definition: IdentifierFieldParser.cxx:14
IdDictDictionary::set_do_checks
void set_do_checks(bool do_checks)
Definition: IdDictMgr.cxx:1878