Skip to content

Commit ee84b67

Browse files
committed
fix(sim): Change and move log level for multiple sensitive volumes with same name
Both the transport engines and FairRoot allow registering of multiple nodes with the same volume/same volume name (copy mechanism). However currently such workflow logs errors from `FairVolumeList::addVolume()`, which in turn is called by `FairModule::AddSensitiveVolume()`. Since the `FairVolumeList::addVolume()` returns nullpointer in such cases, the commit moves `LOG` and changes it severity from `LOG(error)` in `FairVolumeList::addVolume()` to `LOG(debug)` in `FairModule::AddSensitiveVolume()`. Fixes the issue #1595.
1 parent 23a39ba commit ee84b67

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

fairroot/base/sim/FairModule.cxx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,8 @@ void FairModule::AddSensitiveVolume(TGeoVolume* vol)
282282

283283
auto addedVol = vList->addVolume(std::make_unique<FairVolume>(volName, fNbOfVolumes));
284284
if (!addedVol) {
285+
LOG(debug) << "FairVolumeList element: " << vol->GetName() << " VolId : " << vol->getVolumeId()
286+
<< " already defined " << vol_found->getVolumeId() << "// vol = " << vol;
285287
return;
286288
}
287289
++fNbOfVolumes;

fairroot/base/sim/FairVolumeList.cxx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,6 @@ FairVolume* FairVolumeList::addVolume(std::unique_ptr<FairVolume> vol)
3535
auto vol_found = findObject(vol->GetName());
3636

3737
if (vol_found) {
38-
LOG(error) << "FairVolumeList element: " << vol->GetName() << " VolId : " << vol->getVolumeId()
39-
<< " already defined " << vol_found->getVolumeId();
4038
return nullptr;
4139
}
4240

0 commit comments

Comments
 (0)