#include <UgliDbiSteelPln.h>
Inheritance diagram for UgliDbiSteelPln:

Public Member Functions | |
| UgliDbiSteelPln () | |
| UgliDbiSteelPln (PlexPlaneId plnid, Int_t melt, Float_t thick, Float_t totalz, Float_t x0, Float_t y0, Float_t zback, Float_t theta_x, Float_t phi_x, Float_t theta_y, Float_t phi_y, Float_t theta_z, Float_t phi_z) | |
| virtual | ~UgliDbiSteelPln () |
| virtual Int_t | GetAggregateNo () const |
| virtual UInt_t | GetIndex (UInt_t) const |
| PlexPlaneId | GetPlaneId () const |
| Int_t | GetPlane () const |
| Int_t | GetMeltCode () const |
| Float_t | GetThickness () const |
| Float_t | GetTotalZ () const |
| Float_t | GetX0 () const |
| Float_t | GetY0 () const |
| Float_t | GetZBack () const |
| Float_t | GetThetaRad (Int_t indx) const |
| Float_t | GetPhiRad (Int_t indx) const |
| Float_t | GetThetaDeg (Int_t indx) const |
| Float_t | GetPhiDeg (Int_t indx) const |
| virtual DbiTableRow * | CreateTableRow () const |
| virtual void | Fill (DbiResultSet &rs, const DbiValidityRec *vrec) |
| virtual void | Store (DbiOutRowStream &ors, const DbiValidityRec *vrec) const |
| virtual std::ostream & | FormatToOStream (std::ostream &os, Option_t *option="", const DbiValidityRec *vrec=0) const |
| virtual void | Print (Option_t *option="") const |
Static Public Member Functions | |
| const char * | GetTableDescr () |
| void | SetDefensiveUnpkg (Bool_t defensive) |
| Bool_t | GetDefensiveUnpkg () |
Private Member Functions | |
| UgliDbiSteelPln (const UgliDbiSteelPln &from) | |
Private Attributes | |
| PlexPlaneId | fPlaneId |
| Int_t | fMeltCode |
| Float_t | fThickness |
| Float_t | fTotalZ |
| Float_t | fX0 |
| Float_t | fY0 |
| Float_t | fZBack |
| Float_t | fThetaXYZRad [3] |
| Float_t | fPhiXYZRad [3] |
Static Private Attributes | |
| Bool_t | fgDefensiveUnpkg = kFALSE |
|
|
Definition at line 37 of file UgliDbiSteelPln.h. References fMeltCode, fPhiXYZRad, fPlaneId, fThetaXYZRad, fThickness, fTotalZ, fX0, fY0, and fZBack. 00038 : fPlaneId(), fMeltCode(-1), fThickness(-1), fTotalZ(-1), 00039 fX0(0), fY0(0), fZBack(0) 00040 { LEA_CTOR; 00041 for (int i=0; i<3; i++) { 00042 fThetaXYZRad[i] = 0; 00043 fPhiXYZRad[i] = 0; 00044 } 00045 }
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Definition at line 47 of file UgliDbiSteelPln.h. References fMeltCode, fPhiXYZRad, fPlaneId, fThetaXYZRad, fThickness, fTotalZ, fX0, fY0, and fZBack. 00051 : fPlaneId(plnid), fMeltCode(melt), fThickness(thick), fTotalZ(totalz), 00052 fX0(x0), fY0(y0), fZBack(zback) 00053 { LEA_CTOR; 00054 fThetaXYZRad[0] = theta_x; fPhiXYZRad[0] = phi_x; 00055 fThetaXYZRad[1] = theta_y; fPhiXYZRad[1] = phi_y; 00056 fThetaXYZRad[2] = theta_z; fPhiXYZRad[2] = phi_z; 00057 }
|
|
|
Definition at line 59 of file UgliDbiSteelPln.h. 00059 { LEA_DTOR; };
|
|
|
Definition at line 104 of file UgliDbiSteelPln.h. 00105 : DbiTableRow(from) { LEA_CTOR; *this = from; }
|
|
|
Implements DbiTableRow. Definition at line 81 of file UgliDbiSteelPln.h. 00081 { return new UgliDbiSteelPln; }
|
|
||||||||||||
|
Implements DbiTableRow. Definition at line 56 of file UgliDbiSteelPln.cxx. References DbiRowStream::CurColName(), DbiRowStream::CurColNum(), det, fMeltCode, fPhiXYZRad, fPlaneId, fThetaXYZRad, fThickness, fTotalZ, fX0, fY0, fZBack, VldRange::GetDetectorMask(), DbiValidityRec::GetVldRange(), DbiRowStream::HasRowCounter(), DbiRowStream::IncrementCurCol(), MSG, and DbiRowStream::NumCols(). 00057 {
00058 //
00059 //
00060 // Purpose: Fill object from Result Set
00061 //
00062 // Arguments:
00063 // rs in Result Set used to fill object
00064 // vrec in Associated validity record (or 0 if filling
00065 // DbiValidityRec)
00066 //
00067 // Return:
00068 //
00069 // Contact: R. Hatcher
00070 //
00071 // Specification:-
00072 // =============
00073 //
00074 // o Fill object from current row of Result Set.
00075
00076 // Program Notes:-
00077 // =============
00078
00079 // None.
00080
00081 Detector::Detector_t det =
00082 (Detector::Detector_t)
00083 ((vrec) ? vrec->GetVldRange().GetDetectorMask() : 0);
00084
00085 Int_t plane = -1;
00086 PlaneView::PlaneView_t view = PlaneView::kUnknown;
00087 PlaneCoverage::PlaneCoverage_t coverage = PlaneCoverage::kUnknown;
00088 Int_t tmp;
00089
00090 if (fgDefensiveUnpkg) {
00091
00092 // unpack allowing for various column names and ordering
00093
00094 Int_t numCol = rs.NumCols();
00095 // The first column (SeqNo) has already been processed.
00096 for (Int_t curCol = rs.HasRowCounter() ? 3 : 2; curCol <= numCol; ++curCol) {
00097 string colName = rs.CurColName();
00098 if ( colName == "HASHVAL" ) rs.IncrementCurCol();
00099 // "HASH" is obsolete
00100 else if ( colName == "HASH" ) rs.IncrementCurCol();
00101 else if ( colName == "PLANE" ) rs >> plane;
00102 else if ( colName == "PLNVIEW" ) {
00103 rs >> tmp; view = (PlaneView::PlaneView_t)tmp;
00104 }
00105 // "VIEW" is obsolete
00106 else if ( colName == "VIEW" ) {
00107 rs >> tmp; view = (PlaneView::PlaneView_t)tmp;
00108 }
00109 else if ( colName == "COVERAGE" ) {
00110 rs >> tmp; coverage = (PlaneCoverage::PlaneCoverage_t)tmp;
00111 }
00112 else if ( colName == "MELTCODE" ) rs >> fMeltCode;
00113 else if ( colName == "THICKNESS" ) rs >> fThickness;
00114 else if ( colName == "TOTALZ" ) rs >> fTotalZ;
00115 else if ( colName == "X0" ) rs >> fX0;
00116 else if ( colName == "Y0" ) rs >> fY0;
00117 else if ( colName == "ZBACK" ) rs >> fZBack;
00118 else if ( colName == "THETAXRAD" ) rs >> fThetaXYZRad[0];
00119 else if ( colName == "THETAYRAD" ) rs >> fThetaXYZRad[1];
00120 else if ( colName == "THETAZRAD" ) rs >> fThetaXYZRad[2];
00121 else if ( colName == "PHIYRAD" ) rs >> fPhiXYZRad[1];
00122 else if ( colName == "PHIXRAD" ) rs >> fPhiXYZRad[0];
00123 else if ( colName == "PHIZRAD" ) rs >> fPhiXYZRad[2];
00124 else {
00125 static int nmsg = 25;
00126 if (nmsg-- > 0) MSG("Ugli",Msg::kWarning)
00127 << "Ignoring column " << rs.CurColNum()
00128 << " (of " << rs.NumCols() << ")"
00129 << " \""<< colName << "\"; not part of "
00130 << ClassName() << endl;
00131 rs.IncrementCurCol();
00132 }
00133 }
00134 } // end defensive unpacking
00135 else {
00136 Int_t hashv, tmpview, tmpcoverage;
00137 rs >> hashv
00138 >> plane
00139 >> tmpview
00140 >> tmpcoverage
00141 >> fMeltCode
00142 >> fThickness
00143 >> fTotalZ
00144 >> fX0
00145 >> fY0
00146 >> fZBack
00147 >> fThetaXYZRad[0]
00148 >> fPhiXYZRad[0]
00149 >> fThetaXYZRad[1]
00150 >> fPhiXYZRad[1]
00151 >> fThetaXYZRad[2]
00152 >> fPhiXYZRad[2];
00153
00154 view = (PlaneView::PlaneView_t)tmpview;
00155 coverage = (PlaneCoverage::PlaneCoverage_t)tmpcoverage;
00156
00157 }
00158 fPlaneId = PlexPlaneId(det,plane,kTRUE,view,coverage);
00159
00160 }
|
|
||||||||||||||||
|
Definition at line 237 of file UgliDbiSteelPln.cxx. References fMeltCode, fPhiXYZRad, fPlaneId, fThetaXYZRad, fThickness, fTotalZ, fX0, fY0, fZBack, GetPlane(), PlexPlaneId::GetPlaneCoverage(), PlexPlaneId::GetPlaneView(), DbiValidityRec::GetSeqNo(), GetTableDescr(), UgliDbiTableDescr::ParseTableDescr(), and UgliDbiTableDescr::TextTableDescrLine(). Referenced by Print(). 00240 {
00241 //
00242 //
00243 // Purpose: Print the current row to an ostream
00244 //
00245 // Return: nothing
00246 //
00247 // Contact: R. Hatcher
00248 //
00249 // Specification:-
00250 // =============
00251 //
00252
00253 // Program Notes:-
00254 // =============
00255
00256 // None.
00257
00258 string opt = option;
00259
00260 if ( opt.find("H") != string::npos ) {
00261 string tabledescr = GetTableDescr();
00262 tabledescr = UgliDbiTableDescr::TextTableDescrLine(tabledescr);
00263 os << tabledescr << endl;
00264 }
00265 else if ( opt.find("h") != string::npos ) {
00266 string tabledescr = GetTableDescr();
00267 vector< pair<string,string> > components =
00268 UgliDbiTableDescr::ParseTableDescr(tabledescr);
00269 for (unsigned int ic = 0; ic < components.size(); ++ic)
00270 os << components[ic].first << '\t';
00271 os << endl;
00272 }
00273
00274 char sep = '\t';
00275 if ( opt.find(",") != string::npos ) sep = ',';
00276
00277 if ( ! dvr ) {
00278 os << "SeqNo" << sep; // no way of knowing the SEQNO?
00279 }
00280 else {
00281 os << dvr->GetSeqNo() << sep;
00282 }
00283
00284 os << 0 << sep // only ever one row for an agg (AggregateNo=plane#)
00285 << -1 << sep // Hashval is obsolete
00286 << GetPlane() << sep
00287 << (int)fPlaneId.GetPlaneView() << sep
00288 << (int)fPlaneId.GetPlaneCoverage() << sep
00289 << fMeltCode << sep
00290 << fThickness << sep
00291 << fTotalZ << sep
00292 << fX0 << sep
00293 << fY0 << sep
00294 << fZBack << sep
00295 << fThetaXYZRad[0] << sep
00296 << fPhiXYZRad[0] << sep
00297 << fThetaXYZRad[1] << sep
00298 << fPhiXYZRad[1] << sep
00299 << fThetaXYZRad[2] << sep
00300 << fPhiXYZRad[2] << endl;
00301
00302 return os;
00303 }
|
|
|
Reimplemented from DbiTableRow. Definition at line 63 of file UgliDbiSteelPln.h. References fPlaneId, and PlexPlaneId::GetPlane().
|
|
|
Definition at line 98 of file UgliDbiSteelPln.h. 00098 { return fgDefensiveUnpkg; }
|
|
|
Reimplemented from DbiTableRow. Definition at line 64 of file UgliDbiSteelPln.h. References fPlaneId, and PlexPlaneId::GetPlane(). Referenced by Store().
|
|
|
Definition at line 68 of file UgliDbiSteelPln.h. 00068 { return fMeltCode; }
|
|
|
Definition at line 78 of file UgliDbiSteelPln.h. References fPhiXYZRad. Referenced by GeoShieldGroup::AddVolume(), GeoGeometry::BuildDetector(), and UgliSteelPlnNode::UgliSteelPlnNode(). 00078 { return fPhiXYZRad[indx] * Ugli::rad2deg; }
|
|
|
Definition at line 75 of file UgliDbiSteelPln.h. References fPhiXYZRad. 00075 { return fPhiXYZRad[indx]; }
|
|
|
Definition at line 67 of file UgliDbiSteelPln.h. References fPlaneId, and PlexPlaneId::GetPlane(). Referenced by FormatToOStream().
|
|
|
Definition at line 66 of file UgliDbiSteelPln.h. Referenced by UgliGeometry::BuildNodes(). 00066 { return fPlaneId; }
|
|
|
Definition at line 307 of file UgliDbiSteelPln.cxx. Referenced by FormatToOStream(), UgliGeometryReroot::MakeTempDbiPosInfo(), and Store(). 00308 {
00309 //
00310 //
00311 // Purpose: Return a string describing rows in the table
00312 // Used in creating temporary tables
00313 //
00314 // Return: const char* to parenthesized comma separated list
00315 // of column name and type pairs
00316 //
00317 // Contact: R. Hatcher
00318 //
00319 // Specification:-
00320 // =============
00321 //
00322
00323 // Program Notes:-
00324 // =============
00325
00326 // None.
00327
00328 const char* const_tabledescr = "(\
00329 SEQNO int, \
00330 ROW_COUNTER int, \
00331 HASHVAL int, \
00332 PLANE smallint, \
00333 PLNVIEW tinyint, \
00334 COVERAGE tinyint, \
00335 MELTCODE int, \
00336 THICKNESS float, \
00337 TOTALZ float, \
00338 X0 float, \
00339 Y0 float, \
00340 ZBACK float, \
00341 THETAXRAD float, \
00342 PHIXRAD float, \
00343 THETAYRAD float, \
00344 PHIYRAD float, \
00345 THETAZRAD float, \
00346 PHIZRAD float, \
00347 primary key (SEQNO,ROW_COUNTER) \
00348 )";
00349
00350 return const_tabledescr;
00351 }
|
|
|
Definition at line 77 of file UgliDbiSteelPln.h. References fThetaXYZRad. Referenced by GeoShieldGroup::AddVolume(), GeoGeometry::BuildDetector(), and UgliSteelPlnNode::UgliSteelPlnNode(). 00077 { return fThetaXYZRad[indx] * Ugli::rad2deg; }
|
|
|
Definition at line 74 of file UgliDbiSteelPln.h. References fThetaXYZRad. 00074 { return fThetaXYZRad[indx]; }
|
|
|
Definition at line 69 of file UgliDbiSteelPln.h. Referenced by GeoGeometry::BuildDetector(), GeoGeometry::BuildPlanePairVolumes(), and UgliSteelPlnNode::UgliSteelPlnNode(). 00069 { return fThickness; }
|
|
|
Definition at line 70 of file UgliDbiSteelPln.h. Referenced by GeoShieldGroup::AddVolume(), GeoGeometry::BuildDetector(), GeoGeometry::BuildPlanePairVolumes(), and UgliSteelPlnNode::UgliSteelPlnNode(). 00070 { return fTotalZ; }
|
|
|
Definition at line 71 of file UgliDbiSteelPln.h. Referenced by GeoShieldGroup::AddVolume(), GeoShield::AddVolume(), GeoGeometry::BuildDetector(), GeoGeometry::BuildPlanePairVolumes(), and UgliSteelPlnNode::UgliSteelPlnNode(). 00071 { return fX0; }
|
|
|
Definition at line 72 of file UgliDbiSteelPln.h. Referenced by GeoShieldGroup::AddVolume(), GeoGeometry::BuildDetector(), and UgliSteelPlnNode::UgliSteelPlnNode(). 00072 { return fY0; }
|
|
|
Definition at line 73 of file UgliDbiSteelPln.h. Referenced by GeoShieldGroup::AddVolume(), GeoGeometry::BuildDetector(), GeoGeometry::BuildPlanePairVolumes(), and UgliSteelPlnNode::UgliSteelPlnNode(). 00073 { return fZBack; }
|
|
|
Definition at line 230 of file UgliDbiSteelPln.cxx. References FormatToOStream(), and option. 00231 {
00232 FormatToOStream(cout,option);
00233 }
|
|
|
Definition at line 96 of file UgliDbiSteelPln.h. References fgDefensiveUnpkg. 00097 { fgDefensiveUnpkg = defensive; }
|
|
||||||||||||
|
Reimplemented from DbiTableRow. Definition at line 164 of file UgliDbiSteelPln.cxx. References fPhiXYZRad, fPlaneId, fThetaXYZRad, GetIndex(), PlexPlaneId::GetPlane(), PlexPlaneId::GetPlaneCoverage(), PlexPlaneId::GetPlaneView(), GetTableDescr(), MSG, and UgliDbiTableDescr::ParseTableDescr(). 00165 {
00166 //
00167 //
00168 // Purpose: Stream object to output row stream
00169 //
00170 // Arguments:
00171 // ors in Output row stream.
00172 // vrec in Associated validity record (or 0 if filling
00173 // DbiValidityRec)
00174 //
00175 // Return:
00176 //
00177 // Contact: R. Hatcher
00178 //
00179 // Specification:-
00180 // =============
00181 //
00182 // o Stream object to output row stream.
00183
00184 // Program Notes:-
00185 // =============
00186
00187 // None.
00188
00189 const char* tabledescr = GetTableDescr();
00190 vector< pair<string,string> > components =
00191 UgliDbiTableDescr::ParseTableDescr(tabledescr);
00192 int n = components.size();
00193
00194 for (int i=0; i<n; i++) {
00195 pair<string,string> colPair = components[i];
00196 string colName = colPair.first;
00197 if ( colName == "HASHVAL" ) ors << (int)GetIndex(0);
00198 // "HASH" is obsolete
00199 else if ( colName == "HASH" ) ors << (int)GetIndex(0);
00200 else if ( colName == "PLANE" ) ors << fPlaneId.GetPlane();
00201 else if ( colName == "PLNVIEW" ) ors << (int)fPlaneId.GetPlaneView();
00202 // "VIEW" is obsolete
00203 else if ( colName == "VIEW" ) ors << (int)fPlaneId.GetPlaneView();
00204 else if ( colName == "COVERAGE" ) ors << (int)fPlaneId.GetPlaneCoverage();
00205 else if ( colName == "MELTCODE" ) ors << fMeltCode;
00206 else if ( colName == "THICKNESS" ) ors << fThickness;
00207 else if ( colName == "TOTALZ" ) ors << fTotalZ;
00208 else if ( colName == "X0" ) ors << fX0;
00209 else if ( colName == "Y0" ) ors << fY0;
00210 else if ( colName == "ZBACK" ) ors << fZBack;
00211 else if ( colName == "THETAXRAD" ) ors << fThetaXYZRad[0];
00212 else if ( colName == "THETAYRAD" ) ors << fThetaXYZRad[1];
00213 else if ( colName == "THETAZRAD" ) ors << fThetaXYZRad[2];
00214 else if ( colName == "PHIYRAD" ) ors << fPhiXYZRad[1];
00215 else if ( colName == "PHIXRAD" ) ors << fPhiXYZRad[0];
00216 else if ( colName == "PHIZRAD" ) ors << fPhiXYZRad[2];
00217
00218 else if ( colName == "ROW_COUNTER" ) {;}
00219 else if ( colName == "SEQNO" ) {;}
00220 else {
00221 MSG("Ugli",Msg::kFatal)
00222 << "Column name '" << colName << "' not correctly handled" << endl;
00223 assert(0);
00224 }
00225 }
00226 }
|
|
|
Definition at line 34 of file UgliDbiSteelPln.cxx. Referenced by SetDefensiveUnpkg(). |
|
|
Definition at line 110 of file UgliDbiSteelPln.h. Referenced by Fill(), FormatToOStream(), and UgliDbiSteelPln(). |
|
|
Definition at line 116 of file UgliDbiSteelPln.h. Referenced by Fill(), FormatToOStream(), GetPhiDeg(), GetPhiRad(), Store(), and UgliDbiSteelPln(). |
|
|
Definition at line 109 of file UgliDbiSteelPln.h. Referenced by Fill(), FormatToOStream(), GetAggregateNo(), GetIndex(), GetPlane(), Store(), and UgliDbiSteelPln(). |
|
|
Definition at line 115 of file UgliDbiSteelPln.h. Referenced by Fill(), FormatToOStream(), GetThetaDeg(), GetThetaRad(), Store(), and UgliDbiSteelPln(). |
|
|
Definition at line 111 of file UgliDbiSteelPln.h. Referenced by Fill(), FormatToOStream(), and UgliDbiSteelPln(). |
|
|
Definition at line 112 of file UgliDbiSteelPln.h. Referenced by Fill(), FormatToOStream(), and UgliDbiSteelPln(). |
|
|
Definition at line 113 of file UgliDbiSteelPln.h. Referenced by Fill(), FormatToOStream(), and UgliDbiSteelPln(). |
|
|
Definition at line 113 of file UgliDbiSteelPln.h. Referenced by Fill(), FormatToOStream(), and UgliDbiSteelPln(). |
|
|
Definition at line 114 of file UgliDbiSteelPln.h. Referenced by Fill(), FormatToOStream(), and UgliDbiSteelPln(). |
1.3.9.1