25 for (
unsigned int i = 0;
i <
size(); ++
i)
26 (*
this)[
i]->set_geometry(
geo);
35 ATH_MSG_ERROR(
"now in TFCSParametrizationBase::simulate(). This should "
36 "normally not happen");
54 bool shortprint =
opt.Index(
"short") >= 0;
56 TString optprint =
opt;
57 optprint.ReplaceAll(
"short",
"");
93 for (
unsigned int i = 0;
i <
size(); ++
i)
98 auto checkexist = dup.find(param);
99 if (checkexist != dup.end()) {
101 "DUPLICATE POINTER DETECTED");
110 if (checkexist->second.replace) {
113 << refparam <<
"=" << refparam->GetName()
114 <<
", duplicate is " << param <<
"=" << param->GetName()
115 <<
" index " <<
i <<
" of " <<
this);
116 dup[refparam].mother.push_back(
this);
117 dup[refparam].index.push_back(
i);
123 for (
auto &
ref : dup) {
126 if (param == refparam)
129 if (refparam ==
nullptr)
132 if (
ref.second.replace)
135 if (*param == *refparam) {
137 << refparam <<
"=" << refparam->GetName()
138 <<
", duplicate is " << param <<
"=" << param->GetName()
139 <<
" index " <<
i <<
" of " <<
this);
141 dup[param].replace = refparam;
142 dup[refparam].mother.push_back(
this);
143 dup[refparam].index.push_back(
i);
156 std::set<TFCSParametrizationBase *> dellist;
157 for (
auto &dupiter : dupclasses) {
159 for (
auto onedup : dup) {
160 if (onedup.second.mother.empty())
164 for (
unsigned int i = 0;
i < onedup.second.mother.size(); ++
i) {
165 int index = onedup.second.index[
i];
168 unsigned int delcount = dup[delparam].mother.
size();
171 << delparam <<
"=" << delparam->GetName() <<
" index "
172 <<
index <<
" of " << mother <<
", has " << delcount
173 <<
" other replacements attached. Deleting");
175 dellist.insert(delparam);
178 << delparam <<
"=" << delparam->GetName() <<
" index "
179 <<
index <<
" of " << mother <<
", has " << delcount
180 <<
" other replacements attached. Skipping");
190 std::map<std::string, int> ndel;
191 for (
auto *delparam : dellist) {
193 bool present = dup2.find(delparam) != dup2.end();
196 << delparam->GetName()
197 <<
" still referenced somewhere!");
200 << delparam->GetName());
201 ++ndel[delparam->ClassName()];
205 for (
auto &del : ndel)
206 ATH_MSG_INFO(
"Deleted " << del.second <<
" duplicate objects of class "
211 for (
unsigned int i = 0;
i <
size(); ++
i)
223 void TFCSParametrizationBase::Copy2GPU() {
224 for (
unsigned int i = 0;
i <
size(); ++
i) {
228 TString
name = param->ClassName();
229 if (
name.EqualTo(
"TFCSLateralShapeParametrizationHitChain")) {
231 for (
size_t ichain = 0; ichain <
size; ++ichain) {
234 TString hitsimname = hitsim->ClassName();
235 if (hitsimname.EqualTo(
"TFCSHistoLateralShapeParametrization")) {
237 }
else if (hitsimname.EqualTo(
"TFCSHitCellMappingWiggle")) {
239 }
else if (hitsimname.EqualTo(
"TFCSHistoLateralShapeGausLogWeight")) {