QDianaDb.hh

00001 /* Cuore Reconstruction program
00002  *
00003  * Author: MP 19/04/06
00004  * $Id: QDianaDb.hh 511 2006-12-01 12:09:32Z didomiz $
00005  *
00006  * Class QDianaDb: interface to data base for Diana [Cuore]
00007  *                 use QiDianaDb for Cuoricino!
00008  *
00009 */
00010 
00011 #ifndef __QDIANA_DB_HH_
00012 #define __QDIANA_DB_HH_
00013 
00014 #include <string>
00015 #include <list>
00016 #include <map>
00017 #include <vector>
00018 
00019 #include "QDb.hh"
00020 
00021 
00022 
00023 class QDianaDb : public QDb {
00024 public:
00025   
00026   // singleton
00027   static QDianaDb *Get();
00028   
00029   // close connection and reset singleton
00030   void Reset();          
00031   
00032   // clear all cached tables
00033   void Clear();
00034   
00035   // select run number
00036   void SelectRun(int n) {if (n!=fRun) {fRun=n; Clear();} }
00037    
00038   bool GetAllowGlobalRW() const { return fAllowGRW; }
00039 
00040   virtual ~QDianaDb();
00041   
00042 private:
00043   
00044  // Set DB only or not 
00045   void SetAllowGlobalRW(bool allowGRW) {fAllowGRW = allowGRW;}
00046 
00047   static QDianaDb *me;
00048   QDianaDb( const std::string&, const std::string&, 
00049             const std::string&, const std::string&, 
00050             const std::string&); 
00051   
00052   // current run number
00053   int fRun;
00054 
00055   //Set wheter use only db or use also Global Reader/Writer
00056   bool fAllowGRW;
00057 };
00058 
00059 #endif
00060 

Generated on Tue Nov 16 10:49:56 2010 for CUORE Software by  doxygen 1.5.6