00001 00005 #ifndef _QDBANALYSIS_HH 00006 #define _QDBANALYSIS_HH 00007 00008 00009 #include <vector> 00010 #include "QDbDetector.hh" 00011 #include "QVector.hh" 00012 #include "QTime.hh" 00013 #include "QCuore.hh" 00014 00015 00016 namespace QDbAnalysis{ 00017 00025 void FillAveragePulse(const char* ap_algo,int channel,time_t time_start, 00026 time_t time_stop, const Cuore::QVector& AvgPulse, const std::string& filename=Q_STRING_DEFAULT); 00027 Cuore::QVector GetAveragePulse(const char* ap_algo,int channel,const Cuore::QTime& evt_time,const std::string& filename=Q_STRING_DEFAULT); 00028 void FillNoisePowerSpectrum(int channel,time_t time_start, 00029 time_t time_stop, const Cuore::QVector& NPS, const std::string& filename=Q_STRING_DEFAULT); 00030 Cuore::QVector GetNoisePowerSpectrum(int channel,const Cuore::QTime& evt_time,const std::string& filename=Q_STRING_DEFAULT); 00031 00032 struct tm GetStartDateOfRun(int run); 00033 struct tm GetStopDateOfRun(int run); 00034 time_t GetTimeSec(struct tm& t); 00035 time_t GetDurationOfRunSec(int run); 00037 void InsertTimeInterval(const char* ap_algo, int ap_version, 00038 const char* stab_algo, int stab_version, int channel,time_t start, 00039 time_t stop, int nParameters, double* param_b, double* params_t); 00040 00046 int DataSet(int run, int which=0); 00047 00051 void FillCalibration(char* calib_algo, int calib_set, time_t time_ins, int bolo_id,const Cuore::QVector& constants,const Cuore::QVector& err_constants, float chi2_fit, char* status_fit); 00055 void FillUsedStabilizations(char* calib_algo, int calib_set, time_t calib_time_ins, char* stab_algo, int stab_version,time_t stab_time_start, time_t stab_time_stop, time_t stab_time_ins, int bolo_id); 00060 int DaysFromCalib(int run); 00061 00066 std::vector<int> GetRunsInDataset(const int dataset, 00067 const bool onlyGoodRuns = false); 00068 00073 std::vector<int> GetRunsBetweenDatasets(const int dataset_in, 00074 const int dataset_fin, 00075 const bool onlyGoodRuns = false); 00076 00082 std::vector<int> GetRunsInDataset(const int dataset, 00083 QDbDetector::RunType runType, 00084 const bool onlyGoodRuns = false); 00085 00091 std::vector<int> GetRunsBetweenDatasets(const int dataset_in, 00092 const int dataset_fin, 00093 QDbDetector::RunType runType, 00094 const bool onlyGoodRuns = false); 00095 00096 }; 00097 00098 #endif