CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Private Attributes
SensitiveDetectorCatalog Class Reference

#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
 

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 groupFilesInBlocks::temp, and theClassNameMap.

Referenced by AttachSD::create(), logicalNamesFromClassName(), and readoutNames().

49  {
50  for (MapType::const_iterator it = theClassNameMap.begin();
51  it != theClassNameMap.end(); it++) {
52  std::vector<std::string> temp = (*it).second;
53  for (std::vector<std::string>::const_iterator it2 = temp.begin();
54  it2!=temp.end(); it2++) {
55  if (*it2 == readoutName ) return (*it).first;
56  }
57  }
58  return "NotFound";
59 }
std::vector< std::string > SensitiveDetectorCatalog::classNames ( )

Definition at line 61 of file SensitiveDetectorCatalog.cc.

References groupFilesInBlocks::temp, and theClassNameMap.

Referenced by insert().

61  {
62  std::vector<std::string> temp;
63  for (MapType::const_iterator it = theClassNameMap.begin();
64  it != theClassNameMap.end(); it++)
65  temp.push_back(it->first);
66  return temp;
67 }
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 BeautifulSoup.PageElement::_invert(), and DDG4SensitiveConverter::upDate().

9  {
10  theClassNameMap[cN].push_back(rN);
11  theROUNameMap[rN].push_back(lvN);
12 #ifdef DEBUG
13  LogDebug("SimG4CoreGeometry") << "SenstiveDetectorCatalog: insert (" << cN
14  << "," << rN << "," << lvN << ")\n"
15  << " has "
16  << readoutNames().size() << " ROUs "
17  << readoutNames().front() << "\n"
18  << " has "
19  << classNames().size() << " classes "
20  << classNames().front();
21 #endif
22 }
#define LogDebug(id)
std::vector< std::string > readoutNames()
std::vector< std::string > classNames()
std::vector< std::string > SensitiveDetectorCatalog::logicalNames ( std::string &  readoutName)
std::vector< std::string > SensitiveDetectorCatalog::logicalNamesFromClassName ( std::string &  className)

Definition at line 40 of file SensitiveDetectorCatalog.cc.

References className(), groupFilesInBlocks::temp, and theClassNameMap.

40  {
41  std::vector<std::string> temp;
42  std::vector<std::string> rous = theClassNameMap[className];
43  for (std::vector<std::string>::const_iterator it = rous.begin();
44  it!= rous.end(); it++)
45  temp.push_back(*it);
46  return temp;
47 }
std::string className(std::string &readoutName)
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().

32  {
33  return theClassNameMap[className];
34 }
std::string className(std::string &readoutName)
std::vector< std::string > SensitiveDetectorCatalog::readoutNames ( )

Definition at line 24 of file SensitiveDetectorCatalog.cc.

References groupFilesInBlocks::temp, and theROUNameMap.

Referenced by insert().

24  {
25  std::vector<std::string> temp;
26  for (MapType::const_iterator it = theROUNameMap.begin();
27  it != theROUNameMap.end(); it++)
28  temp.push_back(it->first);
29  return temp;
30 }

Member Data Documentation

MapType SensitiveDetectorCatalog::theClassNameMap
private
MapType SensitiveDetectorCatalog::theROUNameMap
private

Definition at line 22 of file SensitiveDetectorCatalog.h.

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