7 vector<DetGroup>&&
one, vector<DetGroup>&&
two, std::vector<DetGroup>&
result,
int firstIndex,
int firstCrossed) {
8 if (
one.empty() &&
two.empty())
14 incrementAndDoubleSize(
result);
17 }
else if (
two.empty()) {
22 incrementAndDoubleSize(
result);
34 int indSize1 =
one.front().indexSize();
35 int indSize2 =
two.front().indexSize();
37 for (
auto&& dg :
one) {
39 result.back().setIndexSize(indSize1 + indSize2);
41 for (
auto&& dg :
two) {
43 result.back().incrementIndex(indSize1);
48 for (
auto&& ig : gvec) {
49 int gSize = ig.indexSize();
50 int index = ig.index();
52 for (vector<DetGroup>::iterator ires =
result.begin(); ires !=
result.end(); ires++) {
53 int resSize = ires->indexSize();
54 if (gSize != resSize) {
55 LogDebug(
"TkDetLayers") <<
"DetGroupMerger::addSameLevel called with groups of different index sizes";
59 int resIndex = ires->index();
60 if (
index == resIndex) {
61 ires->insert(ires->end(), ig.begin(), ig.end());
64 }
else if (
index < resIndex) {
77 int indSize = vec.front().indexSize();
78 for (vector<DetGroup>::iterator
i = vec.begin();
i != vec.end();
i++) {
79 i->setIndexSize(2 * indSize);
84 int indSize = vec.front().indexSize();
85 for (vector<DetGroup>::iterator
i = vec.begin();
i != vec.end();
i++) {
86 i->incrementIndex(indSize);
static void incrementAndDoubleSize(std::vector< DetGroup > &vec)
static void mergeTwoLevels(std::vector< DetGroup > &&one, std::vector< DetGroup > &&two, std::vector< DetGroup > &result)
static void addSameLevel(std::vector< DetGroup > &&gvec, std::vector< DetGroup > &result)
static void doubleIndexSize(std::vector< DetGroup > &vec)
static void orderAndMergeTwoLevels(std::vector< DetGroup > &&one, std::vector< DetGroup > &&two, std::vector< DetGroup > &result, int firstIndex, int firstCrossed)