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

Public Member Functions | |
| UgliDbiStripStruct () | |
| UgliDbiStripStruct (PlexStripEndId strip, UShort_t inmodule, Float_t totlen, Float_t wls_east, Float_t wls_west, Float_t len_east, Float_t len_west, Float_t len_bypass) | |
| UgliDbiStripStruct (Detector::Detector_t detector, PlaneView::PlaneView_t view, PlaneCoverage::PlaneCoverage_t coverage, UShort_t strip, UShort_t inmodule, Float_t totlen, Float_t wls_east, Float_t wls_west, Float_t len_east, Float_t len_west, Float_t len_bypass) | |
| virtual | ~UgliDbiStripStruct () |
| UInt_t | GetIndex (UInt_t defIndex) const |
| Detector::Detector_t | GetDetector () const |
| PlaneView::PlaneView_t | GetPlaneView () const |
| PlaneCoverage::PlaneCoverage_t | GetPlaneCoverage () const |
| UShort_t | GetStrip () const |
| Short_t | GetInModule () const |
| Float_t | GetTotalLen () const |
| Float_t | GetWlsLenEast () const |
| Float_t | GetWlsLenWest () const |
| Float_t | GetLenEastPart () const |
| Float_t | GetLenWestPart () const |
| Float_t | GetWlsLenBypass () const |
| std::string | GetShapeName () 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 | |
| UgliDbiStripStruct (const UgliDbiStripStruct &from) | |
Private Attributes | |
| UgliDbiStructHash | fDetViewCoverStrip |
| UShort_t | fInModule |
| Float_t | fTotalLen |
| Float_t | fWlsLenEast |
| Float_t | fWlsLenWest |
| Float_t | fLenEastPart |
| Float_t | fLenWestPart |
| Float_t | fWlsLenBypass |
Static Private Attributes | |
| Bool_t | fgDefensiveUnpkg = kFALSE |
|
|
Definition at line 35 of file UgliDbiStripStruct.h. References fDetViewCoverStrip, fLenEastPart, fLenWestPart, fTotalLen, fWlsLenBypass, fWlsLenEast, and fWlsLenWest. 00036 : fDetViewCoverStrip(), 00037 fTotalLen(-1), fWlsLenEast(-1), fWlsLenWest(-1), 00038 fLenEastPart(-1), fLenWestPart(-1), fWlsLenBypass(-1) 00039 { LEA_CTOR; };
|
|
||||||||||||||||||||||||||||||||||||
|
Definition at line 42 of file UgliDbiStripStruct.h. References fDetViewCoverStrip, fInModule, fLenEastPart, fLenWestPart, fTotalLen, fWlsLenBypass, fWlsLenEast, and fWlsLenWest. 00045 : fDetViewCoverStrip(strip), fInModule(inmodule), fTotalLen(totlen), 00046 fWlsLenEast(wls_east), fWlsLenWest(wls_west), 00047 fLenEastPart(len_east), fLenWestPart(len_west), 00048 fWlsLenBypass(len_bypass) 00049 { LEA_CTOR; };
|
|
||||||||||||||||||||||||||||||||||||||||||||||||
|
Definition at line 51 of file UgliDbiStripStruct.h. References fDetViewCoverStrip, fInModule, fLenEastPart, fLenWestPart, fTotalLen, fWlsLenBypass, fWlsLenEast, and fWlsLenWest. 00057 : fDetViewCoverStrip(detector,view,coverage,strip), 00058 fInModule(inmodule), fTotalLen(totlen), 00059 fWlsLenEast(wls_east), fWlsLenWest(wls_west), 00060 fLenEastPart(len_east), fLenWestPart(len_west), 00061 fWlsLenBypass(len_bypass) 00062 { LEA_CTOR; }
|
|
|
Definition at line 64 of file UgliDbiStripStruct.h. 00064 { LEA_DTOR; };
|
|
|
Definition at line 110 of file UgliDbiStripStruct.h. 00111 : DbiTableRow(from) { LEA_CTOR; *this = from; }
|
|
|
Implements DbiTableRow. Definition at line 87 of file UgliDbiStripStruct.h. 00087 { return new UgliDbiStripStruct; }
|
|
||||||||||||
|
Implements DbiTableRow. Definition at line 85 of file UgliDbiStripStruct.cxx. References DbiRowStream::CurColName(), DbiRowStream::CurColNum(), det, fDetViewCoverStrip, fInModule, fLenEastPart, fLenWestPart, fTotalLen, fWlsLenEast, fWlsLenWest, VldRange::GetDetectorMask(), DbiValidityRec::GetVldRange(), DbiRowStream::HasRowCounter(), DbiRowStream::IncrementCurCol(), MSG, and DbiRowStream::NumCols(). 00086 {
00087 //
00088 //
00089 // Purpose: Fill object from Result Set
00090 //
00091 // Arguments:
00092 // rs in Result Set used to fill object
00093 // vrec in Associated validity record (or 0 if filling
00094 // DbiValidityRec)
00095 //
00096 // Return:
00097 //
00098 // Contact: R. Hatcher
00099 //
00100 // Specification:-
00101 // =============
00102 //
00103 // o Fill object from current row of Result Set.
00104
00105 // Program Notes:-
00106 // =============
00107
00108 // None.
00109
00110 Detector::Detector_t det =
00111 (Detector::Detector_t)
00112 ((vrec) ? vrec->GetVldRange().GetDetectorMask() : 0);
00113
00114 UInt_t hashv = 0;
00115 UInt_t tmpdet = det;
00116 UInt_t tmpview = PlaneView::kUnknown;
00117 Int_t tmpcoverage = PlaneCoverage::kUnknown;
00118 UShort_t stripinpln = 0xffff;
00119
00120 if (fgDefensiveUnpkg) {
00121
00122 // unpack allowing for various column names and ordering
00123
00124 Int_t numCol = rs.NumCols();
00125 // The first column (SeqNo) has already been processed.
00126 for (Int_t curCol = rs.HasRowCounter() ? 3 : 2; curCol <= numCol; ++curCol) {
00127 string colName = rs.CurColName();
00128 if ( colName == "HASHVAL" ) rs.IncrementCurCol();
00129 else if ( colName == "DETECTOR" ) rs >> tmpdet;
00130 else if ( colName == "PLNVIEW" ) rs >> tmpview;
00131 else if ( colName == "COVERAGE" ) rs >> tmpcoverage;
00132 else if ( colName == "STRIP" ) rs >> stripinpln;
00133 else if ( colName == "INMODULE" ) rs >> fInModule;
00134 else if ( colName == "TOTALLEN" ) rs >> fTotalLen;
00135 else if ( colName == "WLSLENEAST" ) rs >> fWlsLenEast;
00136 else if ( colName == "WLSLENWEST" ) rs >> fWlsLenWest;
00137 else if ( colName == "LENEASTPART" ) rs >> fLenEastPart;
00138 else if ( colName == "LENWESTPART" ) rs >> fLenWestPart;
00139 else if ( colName == "WLSLENBYPASS") rs >> fWlsLenBypass;
00140 else {
00141 static int nmsg = 25;
00142 if (nmsg-- > 0) MSG("Ugli",Msg::kWarning)
00143 << "Ignoring column " << rs.CurColNum()
00144 << " (of " << rs.NumCols() << ")"
00145 << " \""<< colName << "\"; not part of "
00146 << ClassName() << endl;
00147 rs.IncrementCurCol();
00148 }
00149 }
00150 } // end defensive unpacking
00151 else {
00152 rs >> hashv
00153 >> tmpdet
00154 >> tmpview
00155 >> tmpcoverage
00156 >> fInModule
00157 >> stripinpln
00158 >> fTotalLen
00159 >> fWlsLenEast
00160 >> fWlsLenWest
00161 >> fLenEastPart
00162 >> fLenWestPart
00163 >> fWlsLenBypass;
00164 }
00165
00166 fDetViewCoverStrip =
00167 UgliDbiStructHash( (Detector::Detector_t)tmpdet,
00168 (PlaneView::PlaneView_t)tmpview,
00169 (PlaneCoverage::PlaneCoverage_t)tmpcoverage,
00170 stripinpln );
00171 }
|
|
||||||||||||||||
|
Definition at line 243 of file UgliDbiStripStruct.cxx. References fInModule, fLenEastPart, fLenWestPart, fTotalLen, fWlsLenBypass, fWlsLenEast, fWlsLenWest, GetDetector(), GetPlaneCoverage(), GetPlaneView(), DbiValidityRec::GetSeqNo(), GetStrip(), GetTableDescr(), UgliDbiTableDescr::ParseTableDescr(), and UgliDbiTableDescr::TextTableDescrLine(). Referenced by Print(). 00246 {
00247 //
00248 //
00249 // Purpose: Print the current row
00250 //
00251 // Return: nothing
00252 //
00253 // Contact: R. Hatcher
00254 //
00255 // Specification:-
00256 // =============
00257 //
00258
00259 // Program Notes:-
00260 // =============
00261
00262 // None.
00263
00264 string opt = option;
00265
00266 if ( opt.find("H") != string::npos ) {
00267 string tabledescr = GetTableDescr();
00268 tabledescr = UgliDbiTableDescr::TextTableDescrLine(tabledescr);
00269 os << tabledescr << endl;
00270 }
00271 else if ( opt.find("h") != string::npos ) {
00272 string tabledescr = GetTableDescr();
00273 vector< pair<string,string> > components =
00274 UgliDbiTableDescr::ParseTableDescr(tabledescr);
00275 for (unsigned int ic = 0; ic < components.size(); ++ic)
00276 os << components[ic].first << '\t';
00277 os << endl;
00278 }
00279
00280 char sep = '\t';
00281 if ( opt.find(",") != string::npos ) sep = ',';
00282
00283 if ( ! dvr ) {
00284 os << "SeqNo" << sep; // no way of knowing the SEQNO?
00285 }
00286 else {
00287 os << dvr->GetSeqNo() << sep;
00288 }
00289
00290 os << GetStrip() << sep // within aggregate(=plane) strip => row_counter
00291 << -1 << sep // Hashval is obsolete
00292 << (int)GetDetector() << sep
00293 << (int)GetPlaneView() << sep
00294 << (int)GetPlaneCoverage() << sep
00295 << fInModule << sep
00296 << GetStrip() << sep
00297 << fTotalLen << sep
00298 << fWlsLenEast << sep
00299 << fWlsLenWest << sep
00300 << fLenEastPart << sep
00301 << fLenWestPart << sep
00302 << fWlsLenBypass << endl;
00303
00304 return os;
00305 }
|
|
|
Definition at line 104 of file UgliDbiStripStruct.h. 00104 { return fgDefensiveUnpkg; }
|
|
|
Definition at line 132 of file UgliDbiStripStruct.h. References fDetViewCoverStrip, and UgliDbiStructHash::GetDetector(). Referenced by FormatToOStream(), GetShapeName(), and Store(). 00133 { return fDetViewCoverStrip.GetDetector(); }
|
|
|
Reimplemented from DbiTableRow. Definition at line 144 of file UgliDbiStripStruct.h. References fDetViewCoverStrip, and UgliDbiStructHash::HashAsStrip(). Referenced by UgliGeometryReroot::MakeTempDbiScintStruct(), and Store(). 00145 { return fDetViewCoverStrip.HashAsStrip(); }
|
|
|
Definition at line 78 of file UgliDbiStripStruct.h. Referenced by UgliStripNode::ClearFiber(), UgliStripNode::UgliStripNode(), and UgliStripNode::WlsPigtail(). 00078 { return fInModule; }
|
|
|
Definition at line 82 of file UgliDbiStripStruct.h. Referenced by UgliGeometry::BuildStripShapes(), GeoGeometry::BuildStripVolumes(), and UgliStripNode::PartialLength(). 00082 { return fLenEastPart; }
|
|
|
Definition at line 83 of file UgliDbiStripStruct.h. Referenced by UgliGeometry::BuildStripShapes(), GeoGeometry::BuildStripVolumes(), and UgliStripNode::PartialLength(). 00083 { return fLenWestPart; }
|
|
|
Definition at line 138 of file UgliDbiStripStruct.h. References fDetViewCoverStrip, and UgliDbiStructHash::GetPlaneCoverage(). Referenced by FormatToOStream(), GetShapeName(), and Store(). 00139 { return fDetViewCoverStrip.GetPlaneCoverage(); }
|
|
|
Definition at line 135 of file UgliDbiStripStruct.h. References fDetViewCoverStrip, and UgliDbiStructHash::GetPlaneView(). Referenced by GeoGeometry::BuildStripVolumes(), FormatToOStream(), GetShapeName(), and Store(). 00136 { return fDetViewCoverStrip.GetPlaneView(); }
|
|
|
Definition at line 62 of file UgliDbiStripStruct.cxx. References PlexStripEndId::AsString(), GetDetector(), GetPlaneCoverage(), GetPlaneView(), GetStrip(), PlexPlaneId::SetPlaneCoverage(), and PlexPlaneId::SetPlaneView(). Referenced by UgliGeometry::BuildStripShapes(). 00063 {
00064 // make a name for this configuration
00065
00066 // no meaningful plane #, but we don't care
00067 // except for veto configurations
00068 UInt_t apln = 0;
00069 // use an arbitrary plane ... execpt in case of veto stuff
00070 if (Detector::kFar == GetDetector()) {
00071 // more work if far
00072 if (GetPlaneView() >= PlaneView::kVSTopFlat ||
00073 GetPlaneCoverage() >= PlaneCoverage::kVScN ) apln = 512;
00074 }
00075
00076 PlexStripEndId seid(GetDetector(),apln,GetStrip());
00077 seid.SetPlaneView(GetPlaneView());
00078 seid.SetPlaneCoverage(GetPlaneCoverage());
00079
00080 return seid.AsString("s");
00081 }
|
|
|
Definition at line 141 of file UgliDbiStripStruct.h. References fDetViewCoverStrip, and UgliDbiStructHash::GetPart(). Referenced by FormatToOStream(), GetShapeName(), and Store(). 00142 { return fDetViewCoverStrip.GetPart(); }
|
|
|
Definition at line 309 of file UgliDbiStripStruct.cxx. Referenced by FormatToOStream(), UgliGeometryReroot::MakeTempDbiScintStruct(), and Store(). 00310 {
00311 //
00312 //
00313 // Purpose: Return a string describing rows in the table
00314 // Used in creating temporary tables
00315 //
00316 // Return: const char* to parenthesized comma separated list
00317 // of column name and type pairs
00318 //
00319 // Contact: R. Hatcher
00320 //
00321 // Specification:-
00322 // =============
00323 //
00324
00325 // Program Notes:-
00326 // =============
00327
00328 // None.
00329
00330 const char* const_tabledescr = "(\
00331 SEQNO int, \
00332 ROW_COUNTER int, \
00333 HASHVAL int, \
00334 DETECTOR tinyint, \
00335 PLNVIEW tinyint, \
00336 COVERAGE tinyint, \
00337 INMODULE tinyint, \
00338 STRIP smallint, \
00339 TOTALLEN float, \
00340 WLSLENEAST float, \
00341 WLSLENWEST float, \
00342 LENEASTPART float, \
00343 LENWESTPART float, \
00344 WLSLENBYPASS float, \
00345 primary key (SEQNO,ROW_COUNTER) \
00346 )";
00347
00348 return const_tabledescr;
00349 }
|
|
|
Definition at line 79 of file UgliDbiStripStruct.h. Referenced by UgliGeometry::BuildStripShapes(), and GeoGeometry::BuildStripVolumes(). 00079 { return fTotalLen; }
|
|
|
Definition at line 84 of file UgliDbiStripStruct.h. Referenced by UgliGeometry::BuildStripShapes(), GeoGeometry::BuildStripVolumes(), and UgliStripNode::WlsBypass(). 00084 { return fWlsLenBypass; }
|
|
|
Definition at line 80 of file UgliDbiStripStruct.h. Referenced by UgliGeometry::BuildStripShapes(), GeoGeometry::BuildStripVolumes(), and UgliStripNode::WlsPigtail(). 00080 { return fWlsLenEast; }
|
|
|
Definition at line 81 of file UgliDbiStripStruct.h. Referenced by UgliGeometry::BuildStripShapes(), GeoGeometry::BuildStripVolumes(), and UgliStripNode::WlsPigtail(). 00081 { return fWlsLenWest; }
|
|
|
Definition at line 236 of file UgliDbiStripStruct.cxx. References FormatToOStream(), and option. 00237 {
00238 FormatToOStream(cout,option);
00239 }
|
|
|
Definition at line 102 of file UgliDbiStripStruct.h. References fgDefensiveUnpkg. 00103 { fgDefensiveUnpkg = defensive; }
|
|
||||||||||||
|
Reimplemented from DbiTableRow. Definition at line 175 of file UgliDbiStripStruct.cxx. References GetDetector(), GetIndex(), GetPlaneCoverage(), GetPlaneView(), GetStrip(), GetTableDescr(), MSG, and UgliDbiTableDescr::ParseTableDescr(). 00176 {
00177 //
00178 //
00179 // Purpose: Stream object to output row stream
00180 //
00181 // Arguments:
00182 // ors in Output row stream.
00183 // vrec in Associated validity record (or 0 if filling
00184 // DbiValidityRec)
00185 //
00186 // Return:
00187 //
00188 // Contact: R. Hatcher
00189 //
00190 // Specification:-
00191 // =============
00192 //
00193 // o Stream object to output row stream.
00194
00195 // Program Notes:-
00196 // =============
00197
00198 // None.
00199
00200 const char* tabledescr = GetTableDescr();
00201 vector< pair<string,string> > components =
00202 UgliDbiTableDescr::ParseTableDescr(tabledescr);
00203 int n = components.size();
00204
00205 for (int i=0; i<n; i++) {
00206 pair<string,string> colPair = components[i];
00207 string colName = colPair.first;
00208 if ( colName == "HASHVAL" ) ors << (int)GetIndex(0);
00209 else if ( colName == "DETECTOR" )
00210 ors << (int)GetDetector();
00211 else if ( colName == "PLNVIEW" )
00212 ors << (int)GetPlaneView();
00213 else if ( colName == "COVERAGE" )
00214 ors << (int)GetPlaneCoverage();
00215 else if ( colName == "INMODULE" ) ors << fInModule;
00216 else if ( colName == "STRIP" ) ors << GetStrip();
00217 else if ( colName == "TOTALLEN" ) ors << fTotalLen;
00218 else if ( colName == "WLSLENEAST" ) ors << fWlsLenEast;
00219 else if ( colName == "WLSLENWEST" ) ors << fWlsLenWest;
00220 else if ( colName == "LENEASTPART" ) ors << fLenEastPart;
00221 else if ( colName == "LENWESTPART" ) ors << fLenWestPart;
00222 else if ( colName == "WLSLENBYPASS" ) ors << fWlsLenBypass;
00223
00224 else if ( colName == "ROW_COUNTER" ) {;}
00225 else if ( colName == "SEQNO" ) {;}
00226 else {
00227 MSG("Ugli",Msg::kFatal)
00228 << "Column name '" << colName << "' not correctly handled" << endl;
00229 assert(0);
00230 }
00231 }
00232 }
|
|
|
Definition at line 115 of file UgliDbiStripStruct.h. Referenced by Fill(), GetDetector(), GetIndex(), GetPlaneCoverage(), GetPlaneView(), GetStrip(), and UgliDbiStripStruct(). |
|
|
Definition at line 34 of file UgliDbiStripStruct.cxx. Referenced by SetDefensiveUnpkg(). |
|
|
Definition at line 116 of file UgliDbiStripStruct.h. Referenced by Fill(), FormatToOStream(), and UgliDbiStripStruct(). |
|
|
Definition at line 120 of file UgliDbiStripStruct.h. Referenced by Fill(), FormatToOStream(), and UgliDbiStripStruct(). |
|
|
Definition at line 121 of file UgliDbiStripStruct.h. Referenced by Fill(), FormatToOStream(), and UgliDbiStripStruct(). |
|
|
Definition at line 117 of file UgliDbiStripStruct.h. Referenced by Fill(), FormatToOStream(), and UgliDbiStripStruct(). |
|
|
Definition at line 122 of file UgliDbiStripStruct.h. Referenced by FormatToOStream(), and UgliDbiStripStruct(). |
|
|
Definition at line 118 of file UgliDbiStripStruct.h. Referenced by Fill(), FormatToOStream(), and UgliDbiStripStruct(). |
|
|
Definition at line 119 of file UgliDbiStripStruct.h. Referenced by Fill(), FormatToOStream(), and UgliDbiStripStruct(). |
1.3.9.1