Loading [MathJax]/jax/output/SVG/config.js
|
ATLAS Offline Software
|
◆ RV
◆ compute_bits()
void IdDict::compute_bits |
( |
const RV & |
regions, |
|
|
size_t |
level, |
|
|
const std::string & |
group |
|
) |
| |
Compute the OR of all fields at <level>, for the subset of overlapping regions.
Definition at line 15 of file get_bits.cxx.
18 for (
k = 0;
k < regions.size(); ++
k) {
24 if (
k == 0) ored_field = thisField;
26 else ored_field |= thisField;
33 for (
k = 0;
k < regions.size(); ++
k) {
40 f.set_ored_field(ored_field);
◆ get_bits()
void IdDict::get_bits |
( |
const RV & |
regions, |
|
|
size_t |
level, |
|
|
const std::string & |
group |
|
) |
| |
Split mr into two RV :
overlapping contains all Regions that overlap with their field at <level> temp contains all other Regions
Definition at line 45 of file get_bits.cxx.
47 if (regions.empty())
return;
49 if (regions.size() == 1) {
59 f.set_ored_field(
f.field());
78 overlapping.reserve(
mr.size());
79 orig.reserve(
mr.size());
80 temp.reserve(
mr.size());
89 for (
k = 0;
k <
mr.size(); ++
k) {
90 reference_region =
mr[
k];
93 overlapping.push_back(reference_region);
96 temp.push_back(reference_region);
102 if (reference_region == 0)
break;
103 if (overlapping.empty()) {
112 for (;
k <
mr.size(); ++
k) {
114 temp.push_back(region);
116 bool found_overlap =
false;
138 found_overlap =
false;
139 for (
size_t i = 0;
i < orig.size(); ++
i) {
142 bool overlap =
false;
147 if (
f1.range()->m_field_name ==
f.range()->m_field_name) overlap = ored_field.
overlaps_with(thisField);
151 overlapping.push_back(region);
152 ored_field |= thisField;
153 found_overlap =
true;
155 temp.push_back(region);
158 }
while (found_overlap);
163 bool all_within_group =
true;
164 bool none_within_group =
true;
165 for (
size_t i = 0;
i < overlapping.size(); ++
i) {
168 none_within_group =
false;
170 all_within_group =
false;
174 if (all_within_group) temp.
clear();
179 if (!none_within_group) {
bool overlaps_with(const IdentifierField &other) const
Check whether two IdentifierFields overlap.
void get_bits(const RV ®ions, size_t level, const std::string &group)
std::vector< IdDictRegion * > RV
This is the individual specification for the range of one ExpandedIdentifier IdentifierField.
IdDictFieldImplementation is used to capture the specification of a single field of an Identifier.
std::vector< IdDictFieldImplementation > m_implementation
void compute_bits(const RV ®ions, size_t level, const std::string &group)
Compute the OR of all fields at <level>, for the subset of overlapping regions.