/search.css" rel="stylesheet" type="text/css"/> /search.js">
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

DbiConfigSet.h
Go to the documentation of this file.
00001 #ifndef DBICONFIGSET_H
00002 #define DBICONFIGSET_H
00003 
00024 #include <string>
00025 using std::string;
00026 
00027 #include <vector>
00028 using std::vector;
00029 
00030 #include "DatabaseInterface/DbiTableRow.h"
00031 #include "DatabaseInterface/DbiFieldType.h"
00032 
00033 #include <iosfwd>
00034 
00035 class DbiConfigSet;
00036 class DbiValidityRec;
00037 
00038 std::ostream& operator<<(std::ostream& s, const DbiConfigSet& cfSet);    
00039 
00040 class DbiConfigSet : public DbiTableRow
00041 {
00042 
00043 public:
00044 
00045 // Constructors and destructors.
00046   DbiConfigSet() : fAggregateNo(-2) { };
00047   virtual ~DbiConfigSet();
00048 
00049 // State testing member functions
00050  
00051   virtual DbiTableRow* CreateTableRow() const { 
00052                                               return new DbiConfigSet; }
00053         Int_t GetAggregateNo() const { return fAggregateNo; }
00054        UInt_t GetNumParams() const { return fParams.size(); }
00055        string GetParamName(UInt_t parNo) const;
00056  DbiFieldType GetParamType(UInt_t parNo) const;
00057        string GetParamValue(UInt_t parNo) const;
00058        
00059 // User functions. Replaces functionality of Registry, if not very well.
00060  DbiFieldType GetParamType(const std::string& name) const;  // lookup from name
00061        string GetParamValue(const std::string& name) const; // lookup from name
00062 
00063 // State changing member functions
00064          void Clear(const Option_t* = "") { fParams.clear(); }
00065          void PushBack(const string& name,
00066                        const string& value,
00067                        const DbiFieldType& type);
00068          void SetAggregateNo(Int_t aggNo) { fAggregateNo = aggNo; }
00069 
00070 // I/O  member functions
00071   virtual void Fill(DbiResultSet& rs,
00072                     const DbiValidityRec* vrec);
00073   virtual void Store(DbiOutRowStream& ors,
00074                     const DbiValidityRec* vrec) const;
00075 
00076 private:  
00077 // Constructors and destructors.
00078   DbiConfigSet(const DbiConfigSet& from); // No! 
00079 
00080   
00081 // Internal structures.
00082 
00083   struct Param {
00084     Param() { };
00085     Param(const Param& that) {*this = that;}
00086     Param(const string& name,
00087           const string& value,
00088           const DbiFieldType& type) : Name(name), Value(value), Type(type) {};
00089                                   
00090     ~Param() { };
00091 
00092     string Name;
00093     string Value;
00094     DbiFieldType Type;
00095   };
00096 
00097 // Data members
00098 
00099 // Set of parameter, one per column.
00100   std::vector<Param*> fParams; // owns
00101   std::map<std::string,Param*> fParamMap; // does not own.
00102 
00106    Int_t fAggregateNo;
00107 
00108 // Removed: ClassDef(DbiConfigSet,0)    // Configuration data. 
00109 
00110 };
00111 
00112 
00113 #endif  // DBICONFIGSET_H
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Fri May 16 2014 09:56:45 for DatabaseInterface by doxygen 1.7.4