#include <SensitiveDetectorCatalog.h>
Public Types | |
typedef std::map< std::string, std::vector< std::string > > | MapType |
Public Member Functions | |
std::string | className (std::string &readoutName) |
std::vector< std::string > | classNames () |
void | insert (std::string &, std::string &, std::string &) |
std::vector< std::string > | logicalNames (std::string &readoutName) |
std::vector< std::string > | logicalNamesFromClassName (std::string &className) |
std::vector< std::string > | readoutNames (std::string &className) |
std::vector< std::string > | readoutNames () |
Private Attributes | |
MapType | theClassNameMap |
MapType | theROUNameMap |
Definition at line 8 of file SensitiveDetectorCatalog.h.
typedef std::map<std::string,std::vector<std::string> > SensitiveDetectorCatalog::MapType |
Definition at line 11 of file SensitiveDetectorCatalog.h.
std::string SensitiveDetectorCatalog::className | ( | std::string & | readoutName | ) |
Definition at line 49 of file SensitiveDetectorCatalog.cc.
References cond::rpcobtemp::temp, and theClassNameMap.
Referenced by AttachSD::create(), logicalNamesFromClassName(), and readoutNames().
{ for (MapType::const_iterator it = theClassNameMap.begin(); it != theClassNameMap.end(); it++) { std::vector<std::string> temp = (*it).second; for (std::vector<std::string>::const_iterator it2 = temp.begin(); it2!=temp.end(); it2++) { if (*it2 == readoutName ) return (*it).first; } } return "NotFound"; }
std::vector< std::string > SensitiveDetectorCatalog::classNames | ( | ) |
Definition at line 61 of file SensitiveDetectorCatalog.cc.
References cond::rpcobtemp::temp, and theClassNameMap.
Referenced by insert().
{ std::vector<std::string> temp; for (MapType::const_iterator it = theClassNameMap.begin(); it != theClassNameMap.end(); it++) temp.push_back(it->first); return temp; }
void SensitiveDetectorCatalog::insert | ( | std::string & | cN, |
std::string & | rN, | ||
std::string & | lvN | ||
) |
Definition at line 8 of file SensitiveDetectorCatalog.cc.
References classNames(), LogDebug, readoutNames(), theClassNameMap, and theROUNameMap.
Referenced by DDG4SensitiveConverter::upDate().
{ theClassNameMap[cN].push_back(rN); theROUNameMap[rN].push_back(lvN); #ifdef DEBUG LogDebug("SimG4CoreGeometry") << "SenstiveDetectorCatalog: insert (" << cN << "," << rN << "," << lvN << ")\n" << " has " << readoutNames().size() << " ROUs " << readoutNames().front() << "\n" << " has " << classNames().size() << " classes " << classNames().front(); #endif }
std::vector< std::string > SensitiveDetectorCatalog::logicalNames | ( | std::string & | readoutName | ) |
Definition at line 36 of file SensitiveDetectorCatalog.cc.
References theROUNameMap.
Referenced by BscSD::BscSD(), CaloSD::CaloSD(), FiberSD::FiberSD(), FP420SD::FP420SD(), HFChamberSD::HFChamberSD(), HFWedgeSD::HFWedgeSD(), MuonSensitiveDetector::MuonSensitiveDetector(), PLTSensitiveDetector::PLTSensitiveDetector(), TkAccumulatingSensitiveDetector::TkAccumulatingSensitiveDetector(), and TotemSD::TotemSD().
{ return theROUNameMap[readoutName]; }
std::vector< std::string > SensitiveDetectorCatalog::logicalNamesFromClassName | ( | std::string & | className | ) |
Definition at line 40 of file SensitiveDetectorCatalog.cc.
References className(), cond::rpcobtemp::temp, and theClassNameMap.
{ std::vector<std::string> temp; std::vector<std::string> rous = theClassNameMap[className]; for (std::vector<std::string>::const_iterator it = rous.begin(); it!= rous.end(); it++) temp.push_back(*it); return temp; }
std::vector< std::string > SensitiveDetectorCatalog::readoutNames | ( | std::string & | className | ) |
Definition at line 32 of file SensitiveDetectorCatalog.cc.
References className(), and theClassNameMap.
Referenced by AttachSD::create().
{ return theClassNameMap[className]; }
std::vector< std::string > SensitiveDetectorCatalog::readoutNames | ( | ) |
Definition at line 24 of file SensitiveDetectorCatalog.cc.
References cond::rpcobtemp::temp, and theROUNameMap.
Referenced by insert().
{ std::vector<std::string> temp; for (MapType::const_iterator it = theROUNameMap.begin(); it != theROUNameMap.end(); it++) temp.push_back(it->first); return temp; }
Definition at line 21 of file SensitiveDetectorCatalog.h.
Referenced by className(), classNames(), insert(), logicalNamesFromClassName(), and readoutNames().
Definition at line 22 of file SensitiveDetectorCatalog.h.
Referenced by insert(), logicalNames(), and readoutNames().