00001 #include "BfieldMapData.h" 00002 #include "MessageService/MsgService.h" 00003 #include "DatabaseInterface/DbiOutRowStream.h" 00004 #include "DatabaseInterface/DbiResultSet.h" 00005 #include "DatabaseInterface/DbiValidityRec.h" 00006 00007 ClassImp(BfieldMapData) 00008 00009 CVSID("$Id: BfieldMapData.cxx,v 1.3 2005/03/11 16:17:47 west Exp $\n CVSID_DBIRESULTPTR "); 00010 00011 #include "DatabaseInterface/DbiResultPtr.tpl" 00012 template class DbiResultPtr<BfieldMapData>; 00013 00014 #include "DatabaseInterface/DbiWriter.tpl" 00015 template class DbiWriter<BfieldMapData>; 00016 00017 void BfieldMapData::Fill(DbiResultSet& rs, const DbiValidityRec* /* vrec */) { 00018 if ( rs.TableName() != "BfieldMapData" 00019 && rs.TableName() != "BFIELDMAPDATA" ) { 00020 rs >> poshash >> xbfld >> ybfld; 00021 } 00022 else { 00023 Int_t numCol = rs.NumCols(); 00024 for (Int_t curCol = rs.HasRowCounter() ? 3 : 2; curCol <= numCol; ++curCol) { 00025 string colName = rs.CurColName(); 00026 if ( colName == "XBFIELD_KGAUSS" ) rs >> xbfld; 00027 else if ( colName == "YBFIELD_KGAUSS" ) rs >> ybfld; 00028 else if ( colName == "POSITION_HASH" ) rs >> poshash; 00029 else { 00030 MSG("Dbi",Msg::kDebug) << "Ignoring column " << curCol 00031 << "(" << colName << ")" 00032 << "; not part of BfieldMapData" << endl; 00033 rs.IncrementCurCol(); 00034 } 00035 } 00036 } 00037 } 00038 00039 void BfieldMapData::Store(DbiOutRowStream& ors, const DbiValidityRec* /* vrec */) const { 00040 ors << poshash << xbfld << ybfld; 00041 } 00042 00043
1.3.9.1