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

Public Member Functions | |
| UgliDbiScintMdl () | |
| UgliDbiScintMdl (PlexScintMdlId scintmdl, Float_t width, Float_t tpos, Float_t lpos, Float_t zrot, Float_t clear_east, Float_t clear_west, Float_t wls_east=0, Float_t wls_west=0) | |
| virtual | ~UgliDbiScintMdl () |
| virtual Int_t | GetAggregateNo () const |
| UInt_t | GetIndex (UInt_t defIndex) const |
| Detector::Detector_t | GetDetector () const |
| PlaneView::PlaneView_t | GetView () const |
| PlaneCoverage::PlaneCoverage_t | GetCoverage () const |
| PlexScintMdlId | GetScintMdlId () const |
| Int_t | GetPlane () const |
| Int_t | GetModule () const |
| Float_t | GetWidth () const |
| Float_t | GetTPosRelPln () const |
| Float_t | GetLPosRelPln () const |
| Float_t | GetZRotRelPlnRad () const |
| Float_t | GetZRotRelPlnDeg () const |
| Float_t | GetClearLenEast () const |
| Float_t | GetClearLenWest () const |
| Float_t | GetWlsLenEast () const |
| Float_t | GetWlsLenWest () 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 | |
| UInt_t | HashToIndex (const PlexScintMdlId scintmdl) |
| const char * | GetTableDescr () |
| void | SetDefensiveUnpkg (Bool_t defensive) |
| Bool_t | GetDefensiveUnpkg () |
Private Member Functions | |
| UgliDbiScintMdl (const UgliDbiScintMdl &from) | |
Private Attributes | |
| PlexScintMdlId | fModuleId |
| Float_t | fWidth |
| Float_t | fTPosRelPln |
| Float_t | fLPosRelPln |
| Float_t | fZRotRelPlnRad |
| Float_t | fClearLenEast |
| Float_t | fClearLenWest |
| Float_t | fWlsLenEast |
| Float_t | fWlsLenWest |
Static Private Attributes | |
| Bool_t | fgDefensiveUnpkg = kFALSE |
|
|
Definition at line 37 of file UgliDbiScintMdl.h. References fClearLenEast, fClearLenWest, fLPosRelPln, fModuleId, fTPosRelPln, fWidth, fWlsLenEast, fWlsLenWest, and fZRotRelPlnRad. 00038 : fModuleId(), fWidth(-1), fTPosRelPln(0), fLPosRelPln(0), 00039 fZRotRelPlnRad(0), fClearLenEast(-1), fClearLenWest(-1), 00040 fWlsLenEast(0), fWlsLenWest(0) { LEA_CTOR; };
|
|
||||||||||||||||||||||||||||||||||||||||
|
Definition at line 42 of file UgliDbiScintMdl.h. References fClearLenEast, fClearLenWest, fLPosRelPln, fModuleId, fTPosRelPln, fWidth, fWlsLenEast, fWlsLenWest, and fZRotRelPlnRad. 00046 : fModuleId(scintmdl), fWidth(width), 00047 fTPosRelPln(tpos), fLPosRelPln(lpos), fZRotRelPlnRad(zrot), 00048 fClearLenEast(clear_east), fClearLenWest(clear_west), 00049 fWlsLenEast(wls_east), fWlsLenWest(wls_west) 00050 { LEA_CTOR; }
|
|
|
Definition at line 52 of file UgliDbiScintMdl.h. 00052 { LEA_DTOR; };
|
|
|
Definition at line 102 of file UgliDbiScintMdl.h. 00103 : DbiTableRow(from) { LEA_CTOR; *this = from; }
|
|
|
Implements DbiTableRow. Definition at line 79 of file UgliDbiScintMdl.h. 00079 { return new UgliDbiScintMdl; }
|
|
||||||||||||
|
Implements DbiTableRow. Definition at line 90 of file UgliDbiScintMdl.cxx. References DbiRowStream::CurColName(), DbiRowStream::CurColNum(), det, fClearLenEast, fClearLenWest, fLPosRelPln, fModuleId, fTPosRelPln, fWidth, fWlsLenEast, fZRotRelPlnRad, VldRange::GetDetectorMask(), DbiValidityRec::GetVldRange(), DbiRowStream::HasRowCounter(), DbiRowStream::IncrementCurCol(), MSG, and DbiRowStream::NumCols(). 00091 {
00092 //
00093 //
00094 // Purpose: Fill object from Result Set
00095 //
00096 // Arguments:
00097 // rs in Result Set used to fill object
00098 // vrec in Associated validity record (or 0 if filling
00099 // DbiValidityRec)
00100 //
00101 // Return:
00102 //
00103 // Contact: R. Hatcher
00104 //
00105 // Specification:-
00106 // =============
00107 //
00108 // o Fill object from current row of Result Set.
00109
00110 // Program Notes:-
00111 // =============
00112
00113 // None.
00114
00115 Detector::Detector_t det =
00116 (Detector::Detector_t)
00117 ((vrec) ? vrec->GetVldRange().GetDetectorMask() : 0);
00118
00119 Int_t plane = -1;
00120 Int_t module = -1;
00121 PlaneView::PlaneView_t view = PlaneView::kUnknown;
00122 PlaneCoverage::PlaneCoverage_t coverage = PlaneCoverage::kUnknown;
00123 Int_t tmp;
00124
00125 if (fgDefensiveUnpkg) {
00126
00127 // unpack allowing for various column names and ordering
00128
00129 Int_t numCol = rs.NumCols();
00130 // The first column (SeqNo) has already been processed.
00131 for (Int_t curCol = rs.HasRowCounter() ? 3 : 2; curCol <= numCol; ++curCol) {
00132 string colName = rs.CurColName();
00133 if ( colName == "HASHVAL" ) rs.IncrementCurCol();
00134 // "HASH" is obsolete
00135 else if ( colName == "HASH" ) rs.IncrementCurCol();
00136 else if ( colName == "DETECTOR" ) {
00137 rs >> tmp; det = (Detector::Detector_t)tmp;
00138 }
00139 else if ( colName == "PLANE" ) rs >> plane;
00140 else if ( colName == "PLNVIEW" ) {
00141 rs >> tmp; view = (PlaneView::PlaneView_t)tmp;
00142 }
00143 // "VIEW" is obsolete
00144 else if ( colName == "VIEW" ) {
00145 rs >> tmp; view = (PlaneView::PlaneView_t)tmp;
00146 }
00147 else if ( colName == "COVERAGE" ) {
00148 rs >> tmp; coverage = (PlaneCoverage::PlaneCoverage_t)tmp;
00149 }
00150 else if ( colName == "MDLINPLANE" ) rs >> module;
00151 // "MODULE" is obsolete
00152 else if ( colName == "MODULE" ) rs >> module;
00153 else if ( colName == "WIDTH" ) rs >> fWidth;
00154 else if ( colName == "TPOSRELPLN" ) rs >> fTPosRelPln;
00155 else if ( colName == "LPOSRELPLN" ) rs >> fLPosRelPln;
00156 else if ( colName == "ZROTRELPLNRAD" ) rs >> fZRotRelPlnRad;
00157 else if ( colName == "CLEARLENEAST" ) rs >> fClearLenEast;
00158 else if ( colName == "CLEARLENWEST" ) rs >> fClearLenWest;
00159 else if ( colName == "WLSLENEAST" ) rs >> fWlsLenEast;
00160 else if ( colName == "WLSLENWEST" ) rs >> fWlsLenWest;
00161 else {
00162 static int nmsg = 25;
00163 if (nmsg-- > 0) MSG("Ugli",Msg::kWarning)
00164 << "Ignoring column " << rs.CurColNum()
00165 << " (of " << rs.NumCols() << ")"
00166 << " \""<< colName << "\"; not part of "
00167 << ClassName() << endl;
00168 rs.IncrementCurCol();
00169 }
00170 }
00171 } // end defensive unpacking
00172 else {
00173 Int_t hashv;
00174 rs >> hashv
00175 >> plane
00176 >> module
00177 >> fWidth
00178 >> fTPosRelPln
00179 >> fLPosRelPln
00180 >> fZRotRelPlnRad
00181 >> fClearLenEast
00182 >> fClearLenWest
00183 >> fWlsLenEast
00184 >> fWlsLenWest;
00185
00186 }
00187
00188 fModuleId = PlexScintMdlId(det,plane,module,view,coverage);
00189
00190 }
|
|
||||||||||||||||
|
Definition at line 271 of file UgliDbiScintMdl.cxx. References fClearLenEast, fClearLenWest, fLPosRelPln, fTPosRelPln, fWidth, fWlsLenEast, fWlsLenWest, fZRotRelPlnRad, GetModule(), GetPlane(), DbiValidityRec::GetSeqNo(), GetTableDescr(), UgliDbiTableDescr::ParseTableDescr(), and UgliDbiTableDescr::TextTableDescrLine(). Referenced by Print(). 00274 {
00275 //
00276 //
00277 // Purpose: Print the current row
00278 //
00279 // Return: nothing
00280 //
00281 // Contact: R. Hatcher
00282 //
00283 // Specification:-
00284 // =============
00285 //
00286
00287 // Program Notes:-
00288 // =============
00289
00290 // None.
00291
00292 string opt = option;
00293
00294 if ( opt.find("H") != string::npos ) {
00295 string tabledescr = GetTableDescr();
00296 tabledescr = UgliDbiTableDescr::TextTableDescrLine(tabledescr);
00297 os << tabledescr << endl;
00298 }
00299 else if ( opt.find("h") != string::npos ) {
00300 string tabledescr = GetTableDescr();
00301 vector< pair<string,string> > components =
00302 UgliDbiTableDescr::ParseTableDescr(tabledescr);
00303 for (unsigned int ic = 0; ic < components.size(); ++ic)
00304 os << components[ic].first << '\t';
00305 os << endl;
00306 }
00307
00308 char sep = '\t';
00309 if ( opt.find(",") != string::npos ) sep = ',';
00310
00311 if ( ! dvr ) {
00312 os << "SeqNo" << sep; // no way of knowing the SEQNO?
00313 }
00314 else {
00315 os << dvr->GetSeqNo() << sep;
00316 }
00317
00318 os << GetModule() << sep // within aggregate(=plane) module => row_counter
00319 << -1 << sep // Hashval is obsolete
00320 << GetPlane() << sep
00321 << GetModule() << sep
00322 << fWidth << sep
00323 << fTPosRelPln << sep
00324 << fLPosRelPln << sep
00325 << fZRotRelPlnRad << sep
00326 << fClearLenEast << sep
00327 << fClearLenWest << sep
00328 << fWlsLenEast << sep
00329 << fWlsLenWest << endl;
00330
00331 return os;
00332 }
|
|
|
Reimplemented from DbiTableRow. Definition at line 56 of file UgliDbiScintMdl.h. References fModuleId, and PlexPlaneId::GetPlane().
|
|
|
Definition at line 74 of file UgliDbiScintMdl.h. Referenced by GeoGeometry::BuildModules(), UgliStripNode::ClearFiber(), and UgliScintMdlNode::UgliScintMdlNode(). 00074 { return fClearLenEast; }
|
|
|
Definition at line 75 of file UgliDbiScintMdl.h. Referenced by GeoGeometry::BuildModules(), UgliStripNode::ClearFiber(), and UgliScintMdlNode::UgliScintMdlNode(). 00075 { return fClearLenWest; }
|
|
|
Definition at line 132 of file UgliDbiScintMdl.h. References fModuleId, and PlexPlaneId::GetPlaneCoverage(). 00133 { return fModuleId.GetPlaneCoverage(); }
|
|
|
Definition at line 96 of file UgliDbiScintMdl.h. 00096 { return fgDefensiveUnpkg; }
|
|
|
Definition at line 126 of file UgliDbiScintMdl.h. References fModuleId, and PlexPlaneId::GetDetector(). 00127 { return fModuleId.GetDetector(); }
|
|
|
Reimplemented from DbiTableRow. Definition at line 135 of file UgliDbiScintMdl.h. References fModuleId, and HashToIndex(). Referenced by Store(). 00136 { return HashToIndex(fModuleId); }
|
|
|
Definition at line 71 of file UgliDbiScintMdl.h. Referenced by UgliScintMdlNode::UgliScintMdlNode(). 00071 { return fLPosRelPln; }
|
|
|
Definition at line 67 of file UgliDbiScintMdl.h. References fModuleId, and PlexScintMdlId::GetModule(). Referenced by FormatToOStream(), and UgliStripNode::UgliStripNode().
|
|
|
Definition at line 66 of file UgliDbiScintMdl.h. References fModuleId, and PlexPlaneId::GetPlane(). Referenced by FormatToOStream().
|
|
|
Definition at line 65 of file UgliDbiScintMdl.h. Referenced by UgliStripNode::UgliStripNode(). 00065 { return fModuleId; }
|
|
|
Definition at line 336 of file UgliDbiScintMdl.cxx. Referenced by FormatToOStream(), UgliGeometryReroot::MakeTempDbiPosInfo(), and Store(). 00337 {
00338 //
00339 //
00340 // Purpose: Return a string describing rows in the table
00341 // Used in creating temporary tables
00342 //
00343 // Return: const char* to parenthesized comma separated list
00344 // of column name and type pairs
00345 //
00346 // Contact: R. Hatcher
00347 //
00348 // Specification:-
00349 // =============
00350 //
00351
00352 // Program Notes:-
00353 // =============
00354
00355 // None.
00356
00357 const char* const_tabledescr = "(\
00358 SEQNO int, \
00359 ROW_COUNTER int, \
00360 HASHVAL int, \
00361 PLANE smallint, \
00362 MDLINPLANE smallint, \
00363 WIDTH float, \
00364 TPOSRELPLN float, \
00365 LPOSRELPLN float, \
00366 ZROTRELPLNRAD float, \
00367 CLEARLENEAST float, \
00368 CLEARLENWEST float, \
00369 WLSLENEAST float, \
00370 WLSLENWEST float, \
00371 primary key (SEQNO,ROW_COUNTER) \
00372 )";
00373
00374 return const_tabledescr;
00375 }
|
|
|
Definition at line 70 of file UgliDbiScintMdl.h. Referenced by UgliScintMdlNode::UgliScintMdlNode(), and UgliStripNode::UgliStripNode(). 00070 { return fTPosRelPln; }
|
|
|
Definition at line 129 of file UgliDbiScintMdl.h. References fModuleId, and PlexPlaneId::GetPlaneView(). 00130 { return fModuleId.GetPlaneView(); }
|
|
|
Definition at line 69 of file UgliDbiScintMdl.h. Referenced by UgliScintMdlNode::UgliScintMdlNode(). 00069 { return fWidth; }
|
|
|
Definition at line 76 of file UgliDbiScintMdl.h. Referenced by GeoGeometry::BuildModules(), UgliScintMdlNode::UgliScintMdlNode(), and UgliStripNode::WlsPigtail(). 00076 { return fWlsLenEast; }
|
|
|
Definition at line 77 of file UgliDbiScintMdl.h. Referenced by GeoGeometry::BuildModules(), UgliScintMdlNode::UgliScintMdlNode(), and UgliStripNode::WlsPigtail(). 00077 { return fWlsLenWest; }
|
|
|
Definition at line 138 of file UgliDbiScintMdl.h. References fZRotRelPlnRad. Referenced by UgliScintMdlNode::UgliScintMdlNode(), and UgliStripNode::UgliStripNode(). 00139 { return fZRotRelPlnRad * Ugli::rad2deg; }
|
|
|
Definition at line 72 of file UgliDbiScintMdl.h. 00072 { return fZRotRelPlnRad; }
|
|
|
Definition at line 54 of file UgliDbiScintMdl.cxx. References PlexScintMdlId::AsString(), PlexScintMdlId::GetModule(), PlexPlaneId::GetPlane(), and MSG. Referenced by UgliStripNode::ClearFiber(), UgliDbiTables::GetDbiScintMdlById(), GetIndex(), and UgliStripNode::WlsPigtail(). 00055 {
00056 // make a natural index
00057
00058 UInt_t hvalue;
00059 int ierr = 0;
00060
00061 // VERY WASTEFUL
00062 // assume 8 modules/plane independent of detector
00063
00064 int module = scintmdlid.GetModule();
00065 int plane = scintmdlid.GetPlane();
00066
00067 hvalue = (plane << 3) + module;
00068 if ( module > 7 ) ierr += BIT(0);
00069 // breaks under compressed far geometry
00070 // if ( hvalue > 3896-1 ) ierr += BIT(1);
00071 const int mxplns = 768; // 323*2; // 243*2;
00072 if ( hvalue > (mxplns<<3)-1 ) ierr += BIT(1);
00073
00074 if (ierr) {
00075 MSG("Ugli",Msg::kWarning)
00076 << " module " << scintmdlid.AsString()
00077 << " breaks hashing assumptions "
00078 << " err 0x" << hex << ierr << dec
00079 << " : scintmdlid " << scintmdlid
00080 << " = hash " << hvalue
00081 << endl;
00082 }
00083
00084 return hvalue;
00085
00086 }
|
|
|
Definition at line 264 of file UgliDbiScintMdl.cxx. References FormatToOStream(), and option. 00265 {
00266 FormatToOStream(cout,option);
00267 }
|
|
|
Definition at line 94 of file UgliDbiScintMdl.h. References fgDefensiveUnpkg. 00095 { fgDefensiveUnpkg = defensive; }
|
|
||||||||||||
|
Reimplemented from DbiTableRow. Definition at line 194 of file UgliDbiScintMdl.cxx. References fModuleId, PlexPlaneId::GetDetector(), GetIndex(), PlexScintMdlId::GetModule(), PlexPlaneId::GetPlane(), PlexPlaneId::GetPlaneCoverage(), PlexPlaneId::GetPlaneView(), GetTableDescr(), MSG, and UgliDbiTableDescr::ParseTableDescr(). 00195 {
00196 //
00197 //
00198 // Purpose: Stream object to output row stream
00199 //
00200 // Arguments:
00201 // ors in Output row stream.
00202 // vrec in Associated validity record (or 0 if filling
00203 // DbiValidityRec)
00204 //
00205 // Return:
00206 //
00207 // Contact: R. Hatcher
00208 //
00209 // Specification:-
00210 // =============
00211 //
00212 // o Stream object to output row stream.
00213
00214 // Program Notes:-
00215 // =============
00216
00217 // None.
00218
00219 const char* tabledescr = GetTableDescr();
00220 vector< pair<string,string> > components =
00221 UgliDbiTableDescr::ParseTableDescr(tabledescr);
00222 int n = components.size();
00223
00224 for (int i=0; i<n; i++) {
00225 pair<string,string> colPair = components[i];
00226 string colName = colPair.first;
00227 if ( colName == "HASHVAL" ) ors << (int)GetIndex(0);
00228 // "HASH" is obsolete
00229 else if ( colName == "HASH" ) ors << (int)GetIndex(0);
00230 else if ( colName == "DETECTOR" )
00231 ors << (int)fModuleId.GetDetector();
00232 else if ( colName == "PLANE" ) ors << fModuleId.GetPlane();
00233 else if ( colName == "PLNVIEW" )
00234 ors << (int)fModuleId.GetPlaneView();
00235 // "VIEW" is obsolete
00236 else if ( colName == "VIEW" )
00237 ors << (int)fModuleId.GetPlaneView();
00238 else if ( colName == "COVERAGE" )
00239 ors << (int)fModuleId.GetPlaneCoverage();
00240 else if ( colName == "MDLINPLANE" ) ors << fModuleId.GetModule();
00241 // "MODULE" is obsolete
00242 else if ( colName == "MODULE" ) ors << fModuleId.GetModule();
00243 else if ( colName == "WIDTH" ) ors << fWidth;
00244 else if ( colName == "TPOSRELPLN" ) ors << fTPosRelPln;
00245 else if ( colName == "LPOSRELPLN" ) ors << fLPosRelPln;
00246 else if ( colName == "ZROTRELPLNRAD" ) ors << fZRotRelPlnRad;
00247 else if ( colName == "CLEARLENEAST" ) ors << fClearLenEast;
00248 else if ( colName == "CLEARLENWEST" ) ors << fClearLenWest;
00249 else if ( colName == "WLSLENEAST" ) ors << fWlsLenEast;
00250 else if ( colName == "WLSLENWEST" ) ors << fWlsLenWest;
00251
00252 else if ( colName == "ROW_COUNTER" ) {;}
00253 else if ( colName == "SEQNO" ) {;}
00254 else {
00255 MSG("Ugli",Msg::kFatal)
00256 << "Column name '" << colName << "' not correctly handled" << endl;
00257 assert(0);
00258 }
00259 }
00260 }
|
|
|
Definition at line 113 of file UgliDbiScintMdl.h. Referenced by Fill(), FormatToOStream(), and UgliDbiScintMdl(). |
|
|
Definition at line 114 of file UgliDbiScintMdl.h. Referenced by Fill(), FormatToOStream(), and UgliDbiScintMdl(). |
|
|
Definition at line 32 of file UgliDbiScintMdl.cxx. Referenced by SetDefensiveUnpkg(). |
|
|
Definition at line 111 of file UgliDbiScintMdl.h. Referenced by Fill(), FormatToOStream(), and UgliDbiScintMdl(). |
|
|
Definition at line 108 of file UgliDbiScintMdl.h. Referenced by Fill(), GetAggregateNo(), GetCoverage(), GetDetector(), GetIndex(), GetModule(), GetPlane(), GetView(), Store(), and UgliDbiScintMdl(). |
|
|
Definition at line 110 of file UgliDbiScintMdl.h. Referenced by Fill(), FormatToOStream(), and UgliDbiScintMdl(). |
|
|
Definition at line 109 of file UgliDbiScintMdl.h. Referenced by Fill(), FormatToOStream(), and UgliDbiScintMdl(). |
|
|
Definition at line 115 of file UgliDbiScintMdl.h. Referenced by Fill(), FormatToOStream(), and UgliDbiScintMdl(). |
|
|
Definition at line 116 of file UgliDbiScintMdl.h. Referenced by FormatToOStream(), and UgliDbiScintMdl(). |
|
|
Definition at line 112 of file UgliDbiScintMdl.h. Referenced by Fill(), FormatToOStream(), GetZRotRelPlnDeg(), and UgliDbiScintMdl(). |
1.3.9.1