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

Public Member Functions | |
| UgliDbiScintPln () | |
| UgliDbiScintPln (PlexPlaneId plnid, Float_t thick, Float_t gap, Float_t x0rel, Float_t y0rel, Float_t zrot) | |
| virtual | ~UgliDbiScintPln () |
| virtual Int_t | GetAggregateNo () const |
| virtual UInt_t | GetIndex (UInt_t) const |
| PlexPlaneId | GetPlaneId () const |
| Int_t | GetPlane () const |
| Float_t | GetThickness () const |
| Float_t | GetGap () const |
| Float_t | GetX0RelSteel () const |
| Float_t | GetY0RelSteel () const |
| Float_t | GetZRotRelSteelRad () const |
| Float_t | GetZRotRelSteelDeg () 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 | |
| UgliDbiScintPln (const UgliDbiScintPln &from) | |
Private Attributes | |
| PlexPlaneId | fPlaneId |
| Float_t | fThickness |
| Float_t | fGap |
| Float_t | fX0RelSteel |
| Float_t | fY0RelSteel |
| Float_t | fZRotRelSteelRad |
Static Private Attributes | |
| Bool_t | fgDefensiveUnpkg = kFALSE |
|
|
Definition at line 37 of file UgliDbiScintPln.h. References fGap, fPlaneId, fThickness, fX0RelSteel, fY0RelSteel, and fZRotRelSteelRad. 00038 : fPlaneId(), fThickness(-1), fGap(-1), 00039 fX0RelSteel(0), fY0RelSteel(0), fZRotRelSteelRad(0) { LEA_CTOR; };
|
|
||||||||||||||||||||||||||||
|
Definition at line 41 of file UgliDbiScintPln.h. References fGap, fPlaneId, fThickness, fX0RelSteel, fY0RelSteel, and fZRotRelSteelRad. 00043 : fPlaneId(plnid), fThickness(thick), fGap(gap), 00044 fX0RelSteel(x0rel), fY0RelSteel(y0rel), fZRotRelSteelRad(zrot) 00045 { LEA_CTOR; };
|
|
|
Definition at line 47 of file UgliDbiScintPln.h. 00047 { LEA_DTOR; };
|
|
|
Definition at line 86 of file UgliDbiScintPln.h. 00087 : DbiTableRow(from) { LEA_CTOR; *this = from; }
|
|
|
Implements DbiTableRow. Definition at line 63 of file UgliDbiScintPln.h. 00063 { return new UgliDbiScintPln; }
|
|
||||||||||||
|
Implements DbiTableRow. Definition at line 54 of file UgliDbiScintPln.cxx. References DbiRowStream::CurColName(), DbiRowStream::CurColNum(), det, fGap, fPlaneId, fThickness, fX0RelSteel, fY0RelSteel, VldRange::GetDetectorMask(), DbiValidityRec::GetVldRange(), DbiRowStream::HasRowCounter(), DbiRowStream::IncrementCurCol(), MSG, and DbiRowStream::NumCols(). 00055 {
00056 //
00057 //
00058 // Purpose: Fill object from Result Set
00059 //
00060 // Arguments:
00061 // rs in Result Set used to fill object
00062 // vrec in Associated validity record (or 0 if filling
00063 // DbiValidityRec)
00064 //
00065 // Return:
00066 //
00067 // Contact: R. Hatcher
00068 //
00069 // Specification:-
00070 // =============
00071 //
00072 // o Fill object from current row of Result Set.
00073
00074 // Program Notes:-
00075 // =============
00076
00077 // None.
00078
00079 Detector::Detector_t det =
00080 (Detector::Detector_t)
00081 ((vrec) ? vrec->GetVldRange().GetDetectorMask() : 0);
00082
00083 Int_t plane = -1;
00084 PlaneView::PlaneView_t view = PlaneView::kUnknown;
00085 PlaneCoverage::PlaneCoverage_t coverage = PlaneCoverage::kUnknown;
00086
00087 if (fgDefensiveUnpkg) {
00088
00089 // unpack allowing for various column names and ordering
00090
00091 Int_t numCol = rs.NumCols();
00092 // The first column (SeqNo) has already been processed.
00093 for (Int_t curCol = rs.HasRowCounter() ? 3 : 2; curCol <= numCol; ++curCol) {
00094 string colName = rs.CurColName();
00095 if ( colName == "HASHVAL" ) rs.IncrementCurCol();
00096 // "HASH" is obsolete
00097 else if ( colName == "HASH" ) rs.IncrementCurCol();
00098 else if ( colName == "PLANE" ) rs >> plane;
00099 else if ( colName == "THICKNESS" ) rs >> fThickness;
00100 else if ( colName == "GAP" ) rs >> fGap;
00101 else if ( colName == "X0RELSTEEL" ) rs >> fX0RelSteel;
00102 else if ( colName == "Y0RELSTEEL" ) rs >> fY0RelSteel;
00103 else if ( colName == "ZROTRELSTEELRAD" ) rs >> fZRotRelSteelRad;
00104 else {
00105 static int nmsg = 25;
00106 if (nmsg-- > 0) MSG("Ugli",Msg::kWarning)
00107 << "Ignoring column " << rs.CurColNum()
00108 << " (of " << rs.NumCols() << ")"
00109 << " \""<< colName << "\"; not part of "
00110 << ClassName() << endl;
00111 rs.IncrementCurCol();
00112 }
00113 }
00114 } // end defensive unpacking
00115 else {
00116 Int_t hashv;
00117 rs >> hashv
00118 >> plane
00119 >> fThickness
00120 >> fGap
00121 >> fX0RelSteel
00122 >> fY0RelSteel
00123 >> fZRotRelSteelRad;
00124 }
00125 fPlaneId = PlexPlaneId(det,plane,kFALSE,view,coverage);
00126 }
|
|
||||||||||||||||
|
Definition at line 192 of file UgliDbiScintPln.cxx. References fGap, fThickness, fX0RelSteel, fY0RelSteel, fZRotRelSteelRad, GetPlane(), DbiValidityRec::GetSeqNo(), GetTableDescr(), UgliDbiTableDescr::ParseTableDescr(), and UgliDbiTableDescr::TextTableDescrLine(). Referenced by Print(). 00195 {
00196 //
00197 //
00198 // Purpose: Print the current row
00199 //
00200 // Return: nothing
00201 //
00202 // Contact: R. Hatcher
00203 //
00204 // Specification:-
00205 // =============
00206 //
00207
00208 // Program Notes:-
00209 // =============
00210
00211 // None.
00212
00213 string opt = option;
00214
00215 if ( opt.find("H") != string::npos ) {
00216 string tabledescr = GetTableDescr();
00217 tabledescr = UgliDbiTableDescr::TextTableDescrLine(tabledescr);
00218 os << tabledescr << endl;
00219 }
00220 else if ( opt.find("h") != string::npos ) {
00221 string tabledescr = GetTableDescr();
00222 vector< pair<string,string> > components =
00223 UgliDbiTableDescr::ParseTableDescr(tabledescr);
00224 for (unsigned int ic = 0; ic < components.size(); ++ic)
00225 os << components[ic].first << '\t';
00226 os << endl;
00227 }
00228
00229 char sep = '\t';
00230 if ( opt.find(",") != string::npos ) sep = ',';
00231
00232 if ( ! dvr ) {
00233 os << "SeqNo" << sep; // no way of knowing the SEQNO?
00234 }
00235 else {
00236 os << dvr->GetSeqNo() << sep;
00237 }
00238
00239 os << 0 << sep // only ever one row for an agg (AggregateNo=plane#)
00240 << -1 << sep // Hashval is obsolete
00241 << GetPlane() << sep
00242 << fThickness << sep
00243 << fGap << sep
00244 << fX0RelSteel << sep
00245 << fY0RelSteel << sep
00246 << fZRotRelSteelRad << endl;
00247
00248 return os;
00249 }
|
|
|
Reimplemented from DbiTableRow. Definition at line 51 of file UgliDbiScintPln.h. References fPlaneId, and PlexPlaneId::GetPlane().
|
|
|
Definition at line 80 of file UgliDbiScintPln.h. 00080 { return fgDefensiveUnpkg; }
|
|
|
Definition at line 57 of file UgliDbiScintPln.h. 00057 { return fGap; }
|
|
|
Reimplemented from DbiTableRow. Definition at line 52 of file UgliDbiScintPln.h. References fPlaneId, and PlexPlaneId::GetPlane(). Referenced by Store().
|
|
|
Definition at line 55 of file UgliDbiScintPln.h. References fPlaneId, and PlexPlaneId::GetPlane(). Referenced by FormatToOStream().
|
|
|
Definition at line 54 of file UgliDbiScintPln.h. 00054 { return fPlaneId; }
|
|
|
Definition at line 253 of file UgliDbiScintPln.cxx. Referenced by FormatToOStream(), UgliGeometryReroot::MakeTempDbiPosInfo(), and Store(). 00254 {
00255 //
00256 //
00257 // Purpose: Return a string describing rows in the table
00258 // Used in creating temporary tables
00259 //
00260 // Return: const char* to parenthesized comma separated list
00261 // of column name and type pairs
00262 //
00263 // Contact: R. Hatcher
00264 //
00265 // Specification:-
00266 // =============
00267 //
00268
00269 // Program Notes:-
00270 // =============
00271
00272 // None.
00273
00274 const char* const_tabledescr = "(\
00275 SEQNO int, \
00276 ROW_COUNTER int, \
00277 HASHVAL int, \
00278 PLANE smallint, \
00279 THICKNESS float, \
00280 GAP float, \
00281 X0RELSTEEL float, \
00282 Y0RELSTEEL float, \
00283 ZROTRELSTEELRAD float, \
00284 primary key (SEQNO,ROW_COUNTER) \
00285 )";
00286
00287 return const_tabledescr;
00288 }
|
|
|
Definition at line 56 of file UgliDbiScintPln.h. Referenced by GeoGeometry::BuildPlanePairVolumes(), and UgliScintPlnNode::UgliScintPlnNode(). 00056 { return fThickness; }
|
|
|
Definition at line 58 of file UgliDbiScintPln.h. Referenced by GeoGeometry::BuildPlanePairVolumes(), and UgliScintPlnNode::UgliScintPlnNode(). 00058 { return fX0RelSteel; }
|
|
|
Definition at line 59 of file UgliDbiScintPln.h. Referenced by GeoGeometry::BuildPlanePairVolumes(), and UgliScintPlnNode::UgliScintPlnNode(). 00059 { return fY0RelSteel; }
|
|
|
Definition at line 61 of file UgliDbiScintPln.h. References fZRotRelSteelRad. Referenced by GeoGeometry::BuildPlanePairVolumes(), and UgliScintPlnNode::UgliScintPlnNode(). 00061 { return fZRotRelSteelRad * Ugli::rad2deg; }
|
|
|
Definition at line 60 of file UgliDbiScintPln.h. 00060 { return fZRotRelSteelRad; }
|
|
|
Definition at line 185 of file UgliDbiScintPln.cxx. References FormatToOStream(), and option. 00186 {
00187 FormatToOStream(cout,option);
00188 }
|
|
|
Definition at line 78 of file UgliDbiScintPln.h. References fgDefensiveUnpkg. 00079 { fgDefensiveUnpkg = defensive; }
|
|
||||||||||||
|
Reimplemented from DbiTableRow. Definition at line 130 of file UgliDbiScintPln.cxx. References fPlaneId, GetIndex(), PlexPlaneId::GetPlane(), GetTableDescr(), MSG, and UgliDbiTableDescr::ParseTableDescr(). 00131 {
00132 //
00133 //
00134 // Purpose: Stream object to output row stream
00135 //
00136 // Arguments:
00137 // ors in Output row stream.
00138 // vrec in Associated validity record (or 0 if filling
00139 // DbiValidityRec)
00140 //
00141 // Return:
00142 //
00143 // Contact: R. Hatcher
00144 //
00145 // Specification:-
00146 // =============
00147 //
00148 // o Stream object to output row stream.
00149
00150 // Program Notes:-
00151 // =============
00152
00153 // None.
00154
00155 const char* tabledescr = GetTableDescr();
00156 vector< pair<string,string> > components =
00157 UgliDbiTableDescr::ParseTableDescr(tabledescr);
00158 int n = components.size();
00159
00160 for (int i=0; i<n; i++) {
00161 pair<string,string> colPair = components[i];
00162 string colName = colPair.first;
00163 if ( colName == "HASHVAL" ) ors << (int)GetIndex(0);
00164 // "HASH" is obsolete
00165 else if ( colName == "HASH" ) ors << (int)GetIndex(0);
00166 else if ( colName == "PLANE" ) ors << fPlaneId.GetPlane();
00167 else if ( colName == "THICKNESS" ) ors << fThickness;
00168 else if ( colName == "GAP" ) ors << fGap;
00169 else if ( colName == "X0RELSTEEL" ) ors << fX0RelSteel;
00170 else if ( colName == "Y0RELSTEEL" ) ors << fY0RelSteel;
00171 else if ( colName == "ZROTRELSTEELRAD" ) ors << fZRotRelSteelRad;
00172
00173 else if ( colName == "ROW_COUNTER" ) {;}
00174 else if ( colName == "SEQNO" ) {;}
00175 else {
00176 MSG("Ugli",Msg::kFatal)
00177 << "Column name '" << colName << "' not correctly handled" << endl;
00178 assert(0);
00179 }
00180 }
00181 }
|
|
|
Definition at line 94 of file UgliDbiScintPln.h. Referenced by Fill(), FormatToOStream(), and UgliDbiScintPln(). |
|
|
Definition at line 32 of file UgliDbiScintPln.cxx. Referenced by SetDefensiveUnpkg(). |
|
|
Definition at line 91 of file UgliDbiScintPln.h. Referenced by Fill(), GetAggregateNo(), GetIndex(), GetPlane(), Store(), and UgliDbiScintPln(). |
|
|
Definition at line 93 of file UgliDbiScintPln.h. Referenced by Fill(), FormatToOStream(), and UgliDbiScintPln(). |
|
|
Definition at line 95 of file UgliDbiScintPln.h. Referenced by Fill(), FormatToOStream(), and UgliDbiScintPln(). |
|
|
Definition at line 96 of file UgliDbiScintPln.h. Referenced by Fill(), FormatToOStream(), and UgliDbiScintPln(). |
|
|
Definition at line 97 of file UgliDbiScintPln.h. Referenced by FormatToOStream(), GetZRotRelSteelDeg(), and UgliDbiScintPln(). |
1.3.9.1