ATLAS Offline Software
Loading...
Searching...
No Matches
AGDDDetectorStore Class Reference

#include <AGDDDetectorStore.h>

Collaboration diagram for AGDDDetectorStore:

Public Member Functions

 AGDDDetectorStore ()
AGDDDetectorGetDetector (const std::string &s)
AGDDTechnologyGetTechnology (const std::string &s)
void RegisterDetector (AGDDDetector *)
void RegisterTechnology (AGDDTechnology *)
void PrintAllDetectors ()
detectorListGetDetectorList ()
const detectorListGetDetectorList () const
std::vector< AGDDDetector * > GetDetectorsByType (const std::string &) const
AGDDDetectorGetDetectorByID (const std::string &) const
template<class T>
std::vector< T * > GetDetectorsByType () const
template<class T>
T * GetDetectorByID (const std::string &) const

Private Attributes

detectorList m_the_detectors
technologyList m_the_technologies

Detailed Description

Definition at line 18 of file AGDDDetectorStore.h.

Constructor & Destructor Documentation

◆ AGDDDetectorStore()

AGDDDetectorStore::AGDDDetectorStore ( )

Definition at line 14 of file AGDDDetectorStore.cxx.

15{
16}

Member Function Documentation

◆ GetDetector()

AGDDDetector * AGDDDetectorStore::GetDetector ( const std::string & s)
inline

Definition at line 21 of file AGDDDetectorStore.h.

◆ GetDetectorByID() [1/2]

AGDDDetector * AGDDDetectorStore::GetDetectorByID ( const std::string & dt) const

Definition at line 67 of file AGDDDetectorStore.cxx.

68{
69 const detectorList& theDetectors=GetDetectorList();
70 detectorList::const_iterator it=theDetectors.begin();
71 for (;it!=theDetectors.end();++it)
72 {
73 AGDDDetector* det=(*it).second;
74 if (dt==det->DetectorID()) return det;
75 }
76 return 0;
77}
std::map< std::string, AGDDDetector * > detectorList
detectorList & GetDetectorList()

◆ GetDetectorByID() [2/2]

template<class T>
T * AGDDDetectorStore::GetDetectorByID ( const std::string & id) const

Definition at line 91 of file AGDDDetectorStore.cxx.

92{
93 const detectorList& theDetectors=GetDetectorList();
94 detectorList::const_iterator it=theDetectors.begin();
95 for (;it!=theDetectors.end();++it)
96 {
97 if (id==(*it).second->DetectorID())
98 {
99 T* det=dynamic_cast<T*>((*it).second);
100 if (det) return det;
101 }
102 }
103 return 0;
104}
unsigned long long T

◆ GetDetectorList() [1/2]

detectorList & AGDDDetectorStore::GetDetectorList ( )
inline

Definition at line 26 of file AGDDDetectorStore.h.

26{return m_the_detectors;}

◆ GetDetectorList() [2/2]

const detectorList & AGDDDetectorStore::GetDetectorList ( ) const

Definition at line 49 of file AGDDDetectorStore.cxx.

50{
51 return m_the_detectors;
52}

◆ GetDetectorsByType() [1/2]

template<class T>
std::vector< T * > AGDDDetectorStore::GetDetectorsByType ( ) const

Definition at line 79 of file AGDDDetectorStore.cxx.

80{
81 std::vector<T*> detectors;
82 const detectorList& theDetectors=GetDetectorList();
83 detectorList::const_iterator it=theDetectors.begin();
84 for (;it!=theDetectors.end();++it)
85 {
86 T* det=dynamic_cast<T*>((*it).second);
87 if (det) detectors.push_back(det);
88 }
89 return detectors;
90}

◆ GetDetectorsByType() [2/2]

std::vector< AGDDDetector * > AGDDDetectorStore::GetDetectorsByType ( const std::string & dt) const

Definition at line 54 of file AGDDDetectorStore.cxx.

55{
56 std::vector<AGDDDetector*> detectors;
57 const detectorList& theDetectors=GetDetectorList();
58 detectorList::const_iterator it=theDetectors.begin();
59 for (;it!=theDetectors.end();++it)
60 {
61 AGDDDetector* det=(*it).second;
62 if (dt==det->DetectorType()) detectors.push_back(det);
63 }
64 return detectors;
65}

◆ GetTechnology()

AGDDTechnology * AGDDDetectorStore::GetTechnology ( const std::string & s)
inline

Definition at line 22 of file AGDDDetectorStore.h.

22{return m_the_technologies[s];}
technologyList m_the_technologies

◆ PrintAllDetectors()

void AGDDDetectorStore::PrintAllDetectors ( )

Definition at line 34 of file AGDDDetectorStore.cxx.

35{
36 detectorList::const_iterator it = m_the_detectors.begin();
37 detectorList::const_iterator end = m_the_detectors.end();
38 std::cout<<"AGDDDetectorStore::PrintAllDetector"<<std::endl
39 <<"[key] \t name \t subType \t tech"<<std::endl;
40 for( ; it!=end; ++it) {
41 std::cout<<"["<<it->first<<"] :"
42 <<" "<<it->second->GetName()
43 <<" "<<it->second->subType()
44 <<" "<<it->second->tech
45 <<std::endl;
46 }
47}

◆ RegisterDetector()

void AGDDDetectorStore::RegisterDetector ( AGDDDetector * s)

Definition at line 17 of file AGDDDetectorStore.cxx.

18{
19 std::string n=s->GetName();
20 if (m_the_detectors.find(n) != m_the_detectors.end())
21 std::cout<<" Detector "<<n<<" already in store "<<std::endl;
22 else
24}

◆ RegisterTechnology()

void AGDDDetectorStore::RegisterTechnology ( AGDDTechnology * s)

Definition at line 26 of file AGDDDetectorStore.cxx.

27{
28 std::string n=s->GetName();
29 if (m_the_technologies.find(n) != m_the_technologies.end())
30 std::cout<<" Technology "<<n<<" already in store "<<std::endl;
31 else
33}

Member Data Documentation

◆ m_the_detectors

detectorList AGDDDetectorStore::m_the_detectors
private

Definition at line 34 of file AGDDDetectorStore.h.

◆ m_the_technologies

technologyList AGDDDetectorStore::m_the_technologies
private

Definition at line 35 of file AGDDDetectorStore.h.


The documentation for this class was generated from the following files: