001 #include "MuonGeoModel/StandardComponent.h"
002 #include "MuonGeoModel/MYSQL.h"
003 #include "MuonGeoModel/Technology.h"
004 #include "MuonGeoModel/CHV_Technology.h"
005 #include "MuonGeoModel/CMI_Technology.h"
006 #include "MuonGeoModel/CRO_Technology.h"
007 #include "MuonGeoModel/LBI_Technology.h"
008
009 namespace MuonGM {
010
011 StandardComponent::StandardComponent():Component()
012 {
013 posx =0.;
014 posy =0.;
015 posz =0.;
016 deadx = 0.;
017 deady = 0.;
018 excent = 0.;
019 iswap = 0;
020 index = 0;
021 }
022
023 StandardComponent::StandardComponent(const StandardComponent& c):Component(c)
024 {
025 posx=c.posx;
026 posy=c.posy;
027 posz=c.posz;
028 deadx=c.deadx;
029 deady=c.deady;
030 excent=c.excent;
031 iswap=c.iswap;
032 index=c.index;
033 }
034
035 std::ostream& operator<<(std::ostream& os,const StandardComponent& c)
036 {
037 os << "Component " << c.name << std::endl;
038 os << c.posx << " " << c.posy << " " << c.posz << " " << c.index << " " << c.name;
039 os << " " << c.iswap << " " << c.dx1 << " " << c.dx2 << " " << c.dy << " ";
040 os << c.excent << " " << c.deadx << " " << c.deady << std::endl;
041 return os;
042 }
043
044 double StandardComponent::GetThickness() const
045 {
046 MYSQL *mysql=MYSQL::GetPointer();
047 Technology* tec = mysql->GetTechnology(name);
048
049
050 if (name.substr(0,3) == "CHV")
051 {
052 CHV* chv = (CHV*)tec;
053
054
055 return chv->height;
056 }
057 else if (name.substr(0,3) == "CRO")
058 {
059 CRO* chv = (CRO*)tec;
060 return chv->height;
061 }
062 else if (name.substr(0,3) == "CMI")
063 {
064 CMI* chv = (CMI*)tec;
065 return chv->height;
066 }
067 else if (name.substr(0,3) == "LBI" || name.substr(0,2) == "LB")
068 {
069 LBI* chv = (LBI*)tec;
070 return chv->height;
071 }
072 return mysql->GetTechnology(name)->thickness;
073 }
074 }
075
| Due to the LXR bug, the updates fail sometimes to remove references to deleted files. The Saturday's full rebuilds fix these problems |
|
This page was automatically generated by the
LXR engine.
|
|