|
//____________________________________________________________________ // // // // $Id: BrDbConditionsData.cxx,v 1.1.1.1 2001/06/21 14:55:17 hagel Exp $ // $Author: hagel $ // $Date: 2001/06/21 14:55:17 $ // $Copyright: 2000 Brahms Collaboration // #include <BrDbConditionsData.h> #ifndef BRAT_BrException #include "BrException.h" #endif #ifndef WIN32 #include <cstdlib> #include <iostream> #else #include <stdlib.h> #include <iostream.h> #endif ClassImp(BrDbConditionsData); //____________________________________________________________________ const Char_t* BrDbConditionsData::kTableName = "ConditionsData"; //____________________________________________________________________ BrDbConditionsData::BrDbConditionsData(void) { // Empty default constructor. } //____________________________________________________________________ BrDbConditionsData::BrDbConditionsData(Int_t time, Int_t varId, Float_t value) { // Constructor. fTime = time; fVarId = varId; fValue = value; SetDBID(time); } //____________________________________________________________________ BrDbQuery* BrDbConditionsData::Create(void) { // Returns a SQL query string suitable for creation of this table in // a database. cerr << "BrDbConditionsData::Create not implemented for this table" << endl; return new BrDbQuery(); } //____________________________________________________________________ BrDbConditionsData* BrDbConditionsData::SingleInstance(TSQLRow* row) { // Returns an instance of a BrDbConditionsData. User needs to store this // object imidiatly. BrDbConditionsData* data = new BrDbConditionsData(strtol(row->GetField(0),NULL,0), // Time strtol(row->GetField(1),NULL,0), // varId strtod(row->GetField(2),NULL)); // value return data; } //____________________________________________________________________ TObjArray* BrDbConditionsData::MultipleInstance(TSQLResult* res) { // Returns an (1D) array of BrDbConditionsData's matching Query that made // the TSQLResult. User need to store this immediately. if (!res) return 0; Int_t count = (res) ? res->GetRowCount() : 0; TObjArray* table = new TObjArray(count); for (Int_t i = 0; i < count; i++) table->Add(BrDbConditionsData::SingleInstance(res->Next())); return table; } //____________________________________________________________________ BrDbQuery* BrDbConditionsData::Insert(void) { cerr << "BrDbConditionsData::Insert not implemented for this table" << endl; return new BrDbQuery(); } //____________________________________________________________________ // // $Log: BrDbConditionsData.cxx,v $ // Revision 1.1.1.1 2001/06/21 14:55:17 hagel // Initial revision of brat2 // // Revision 1.3 2001/06/05 18:40:16 cholm // Removed BrDbInc.h an all references to it // // Revision 1.2 2001/03/22 20:44:13 cholm // Added protection for NULL TSqlRow in SingleInstance methods, and cleaned // up a bit of the stuff. // // Revision 1.1 2001/01/19 16:30:46 cholm // Revisited the Run database classes. Deleted old implemtation via BrRun, // and put in BrDbRun, BrDbFile, BrDbMagnet, BrDbConditions*, and // BrDbShiftReport. A description will be posted to brahms-dev-l soon. // // |
||||||
This page automatically generated by script docBrat by Christian Holm |
Copyright ; 2002 BRAHMS Collaboration
<brahmlib@rcf.rhic.bnl.gov>
|