20 static std::string
msgctg =
"DetectorHolderService";
26 : categoryMap_(), worldPV_(nullptr)
48 throw cet::exception(
"DetectorHolderService") <<
"No world volume " 63 <<
"category " << (entry.second)->category();
65 (entry.second)->buildLVs();
74 mf::LogDebug(
msgctg) <<
"Initializing detector with category " << (entry.second)->category();
87 <<
"category " << (entry.second)->category();
102 return categoryDB->second;
105 <<
"No detector found for category " << category <<
".LO";
121 mf::LogDebug(
msgctg) <<
"Calling art produces for category " << (entry.second)->category();
132 mf::LogDebug(
msgctg) <<
"Converting hits for category " << (entry.second)->category();
146 <<
"Duplicate detector found. " 147 <<
"There is already one detector with the category " << db->
category() <<
".\n";
170 <<
"No mother volume found for detector with category " << db->
category()
172 <<
". This probably means you are missing a " 173 <<
"detector class (derived from DetectorBase).\n";
177 db->
placeToPVs(motherCategoryDB->second->lvs());
G4VPhysicalVolume * worldPhysicalVolume()
DetectorHolderService(fhicl::ParameterSet const &)
decltype(auto) constexpr cend(T &&obj)
ADL-aware version of std::cend.
fhicl::ParameterSet const & parameters() const
fhicl::ParameterSet const getParametersForCategory(std::string category)
std::map< std::string, DetectorBase * > categoryMap_
G4VPhysicalVolume * worldPV_
static std::string msgctg
void placeDetector(DetectorBase *const db)
void addDBtoCategoryMap(DetectorBase *const db)
void registerDetector(DetectorBase *const db)
std::string const & myName() const
std::vector< G4VPhysicalVolume * > placeToPVs(std::vector< G4LogicalVolume * > motherLVs)
DetectorBase * getDetectorForCategory(std::string category) const
std::string const & motherCategory() const
std::string const & category() const
MaybeLogger_< ELseverityLevel::ELsev_success, false > LogDebug
void callArtProduces(art::ProducesCollector &)
void fillEventWithArtHits(G4HCofThisEvent *hc)
cet::coded_exception< error, detail::translate > exception