CMS 3D CMS Logo

SensitiveDetectorCatalog Class Reference

#include <SimG4Core/Geometry/interface/SensitiveDetectorCatalog.h>

List of all members.

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::vector< std::string > readoutNames (std::string &className)

Private Attributes

MapType theClassNameMap
MapType theROUNameMap


Detailed Description

Definition at line 8 of file SensitiveDetectorCatalog.h.


Member Typedef Documentation

typedef std::map<std::string,std::vector<std::string> > SensitiveDetectorCatalog::MapType

Definition at line 11 of file SensitiveDetectorCatalog.h.


Member Function Documentation

std::string SensitiveDetectorCatalog::className ( std::string &  readoutName  ) 

Definition at line 49 of file SensitiveDetectorCatalog.cc.

References it, pyDBSRunClass::temp, and theClassNameMap.

Referenced by AttachSD::create().

00049                                                                      {
00050   for (MapType::const_iterator it = theClassNameMap.begin();  
00051        it != theClassNameMap.end(); it++)  {
00052     std::vector<std::string> temp = (*it).second;
00053     for (std::vector<std::string>::const_iterator it2 = temp.begin();
00054          it2!=temp.end(); it2++) {
00055       if (*it2 == readoutName ) return (*it).first;
00056     }
00057   } 
00058   return "NotFound";
00059 }

std::vector< std::string > SensitiveDetectorCatalog::classNames (  ) 

Definition at line 61 of file SensitiveDetectorCatalog.cc.

References it, pyDBSRunClass::temp, and theClassNameMap.

Referenced by insert().

00061                                                           {
00062   std::vector<std::string> temp;
00063   for (MapType::const_iterator it = theClassNameMap.begin();  
00064        it != theClassNameMap.end(); it++)
00065     temp.push_back(it->first);
00066   return temp;
00067 }

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().

00009                                                        {
00010   theClassNameMap[cN].push_back(rN);
00011   theROUNameMap[rN].push_back(lvN);
00012 #ifdef DEBUG
00013   LogDebug("SimG4CoreGeometry") << "SenstiveDetectorCatalog: insert (" << cN
00014                                 << "," << rN << "," << lvN << ")\n"
00015                                 << "                         has     "
00016                                 << readoutNames().size() << " ROUs "
00017                                 << readoutNames().front() << "\n"
00018                                 << "                         has     "
00019                                 << classNames().size() << " classes "
00020                                 << classNames().front();
00021 #endif
00022 }

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(), FP420SD::FP420SD(), MuonSensitiveDetector::MuonSensitiveDetector(), and TotemSD::TotemSD().

00036                                                                                    { 
00037   return theROUNameMap[readoutName];
00038 }

std::vector< std::string > SensitiveDetectorCatalog::logicalNamesFromClassName ( std::string &  className  ) 

Definition at line 40 of file SensitiveDetectorCatalog.cc.

References it, pyDBSRunClass::temp, and theClassNameMap.

00040                                                                                               {
00041   std::vector<std::string> temp;
00042   std::vector<std::string> rous = theClassNameMap[className];
00043   for (std::vector<std::string>::const_iterator it = rous.begin(); 
00044        it!= rous.end(); it++)
00045     temp.push_back(*it);
00046   return temp;
00047 }

std::vector< std::string > SensitiveDetectorCatalog::readoutNames (  ) 

Definition at line 24 of file SensitiveDetectorCatalog.cc.

References it, pyDBSRunClass::temp, and theROUNameMap.

Referenced by insert().

00024                                                             {
00025   std::vector<std::string> temp;
00026   for (MapType::const_iterator it = theROUNameMap.begin();
00027        it != theROUNameMap.end(); it++)
00028     temp.push_back(it->first);
00029   return temp;
00030 }

std::vector< std::string > SensitiveDetectorCatalog::readoutNames ( std::string &  className  ) 

Definition at line 32 of file SensitiveDetectorCatalog.cc.

References theClassNameMap.

Referenced by AttachSD::create().

00032                                                                                  { 
00033   return theClassNameMap[className]; 
00034 }


Member Data Documentation

MapType SensitiveDetectorCatalog::theClassNameMap [private]

Definition at line 21 of file SensitiveDetectorCatalog.h.

Referenced by className(), classNames(), insert(), logicalNamesFromClassName(), and readoutNames().

MapType SensitiveDetectorCatalog::theROUNameMap [private]

Definition at line 22 of file SensitiveDetectorCatalog.h.

Referenced by insert(), logicalNames(), and readoutNames().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:31:31 2009 for CMSSW by  doxygen 1.5.4