00001
00009 #ifndef _Q_DB_CORC_HH_
00010 #define _Q_DB_CORC_HH_
00011
00012 #include "QMatrix.hh"
00013 #include "QVector.hh"
00014 #include <map>
00015 #include <string>
00016 #include <vector>
00017
00018 namespace Cuore {class QIntervalSet;}
00019
00020 namespace QDbCorc {
00021
00028 class Reference {
00029 public:
00031 double GetAvg() const {return fAvg;}
00032
00034 double GetMax() const {return fMax;}
00035
00037 double GetMin() const {return fMin;}
00038
00043 void SetAvg(double avg) {fAvg = avg;}
00044
00049 void SetMax(double max) {fMax = max;}
00050
00055 void SetMin(double min) {fMin = min;}
00056
00057 private:
00058 double fAvg;
00059 double fMax;
00060 double fMin;
00061 };
00062
00064 struct TimeInterval {
00065 float fStart;
00066 float fEnd;
00067 };
00068
00070 void ClearSaturatedHigh(const int run, const int ch);
00071
00075 void ClearSaturatedHigh(
00076 const int run, const int ch,
00077 const std::string& dbOutputFile
00078 );
00079
00081 void ClearSaturatedLow(const int run, const int ch);
00082
00086 void ClearSaturatedLow(
00087 const int run, const int ch,
00088 const std::string& dbOutputFile
00089 );
00090
00095 std::map<int, Reference> GetBaselineFluctuationReference(int run);
00096
00101 std::map<int, Reference> GetBaselineReference(int run);
00102
00107 std::map<int, Reference> GetBaselineRMSReference(int run);
00108
00114 Reference GetBoloBaselineFluctuationReference(int run, int ch);
00115
00121 Reference GetBoloBaselineReference(int run, int ch);
00122
00129 Reference GetBoloBaselineRMSReference(int run, int ch);
00130
00137 Reference GetBoloNonStabHeaterReference(int run, int ch);
00138
00144 Reference GetBoloPowerSpectrumReference(int run, int ch);
00145
00151 Reference GetBoloRateReference(int run, int ch);
00152
00159 Reference GetBoloReference(int run, int ch, std::string variable);
00160
00166 Reference GetBoloStabHeaterReference(int run, int ch);
00167
00173 Reference GetBoloStabHeaterRMSReference(int run, int ch);
00174
00176 double GetBoloSummary(
00177 const int run, const int ch,
00178 const std::string variable
00179 );
00180
00186 int GetIsMasked(int run, int ch);
00187
00191 double GetLiveTime(const int run, const int ch);
00192 double GetLiveTime(const int run, const int ch, const std::vector<std::string> types);
00193
00198 std::map<int, int> GetMaskedMap(int run);
00199
00200 std::map<std::string, std::string> GetNameMap();
00201
00206 std::map<int, Reference> GetNonStabHeaterReference(int run);
00207
00212 std::map<int, Reference> GetPowerSpectrumReference(int run);
00213
00219 Cuore::QMatrix GetQMatrixMasked(int run);
00220
00227 Cuore::QMatrix GetQMatrixReference(int run, std::string variable);
00228
00233 std::map<int, Reference> GetRateReference(int run);
00234
00240 std::map<int, Reference> GetReference(int run, std::string variable);
00241
00243 std::vector<TimeInterval> GetRejectedIntervalsSeconds(int run, int channel);
00244
00246 const Cuore::QIntervalSet& GetRejectedIntervalSet(
00247 const int run, const int ch
00248 );
00249
00252 const Cuore::QIntervalSet& GetRejectedIntervalSetNotOfType(
00253 const int run, const int ch, const std::vector<std::string> types
00254 );
00255
00257 double GetRmsStabHeaterAmplitude(const int run, const int ch);
00258
00263 std::map<int, Reference> GetStabHeaterReference(int run);
00264
00269 std::map<int, Reference> GetStabHeaterRMSReference(int run);
00270
00272 void SetBadInterval(
00273 const int run, const int ch,
00274 const double startTime, const double stopTime,
00275 const std::string status
00276 );
00277
00285 void SetBoloSummary(
00286 const int run, const int ch,
00287 const std::string variable, double value
00288 );
00289
00291 void SetBoloSummary(
00292 const int run, const int ch,
00293 const std::string variable, double value,
00294 const std::string& dbOutputFile
00295 );
00296
00298 void SetSaturatedHigh(
00299 const int run, const int ch,
00300 const Cuore::QIntervalSet& intervalSet
00301 );
00302
00304 void SetSaturatedHigh(
00305 const int run, const int ch,
00306 const Cuore::QIntervalSet& intervalSet,
00307 const std::string& dbOutputFile
00308 );
00309
00311 void SetSaturatedLow(
00312 const int run, const int ch,
00313 const Cuore::QIntervalSet& intervalSet
00314 );
00315
00317 void SetSaturatedLow(
00318 const int run, const int ch,
00319 const Cuore::QIntervalSet& intervalSet,
00320 const std::string& dbOutputFile
00321 );
00322
00323 };
00324
00325 #endif