DriftCache.h
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 /// \brief Hold drift constants from current run
3 /// \author bckhouse@caltech.edu
4 /// \date
5 ////////////////////////////////////////////////////////////////////////
6 #ifndef CALIB_DRIFTCACHE_H
7 #define CALIB_DRIFTCACHE_H
8 
9 //#include <map>
10 
11 #include <string>
12 #include <ctime>
13 
14 #include "NovaDAQConventions/DAQConventions.h"
16 
17 namespace nova{namespace dbi{class Table;}}
18 
19 namespace calib
20 {
21  class DriftCache
22  {
23  public:
24 
25  DriftCache();
26  virtual ~DriftCache();
27 
28  double GetFactor(int plane, int cell);
29 
30  void SetRun(int detector, int run);
31  void SetCSVFile(std::string f) { fCSVFile = f;}
32 
33  void SetTag(const std::string& tag) { fTag = tag; }
34  std::string GetTag() { return fTag; }
35 
36  void SetUseEpochs(bool b) { fUseEpochs = b; }
37  bool UseEpochs() { return fUseEpochs; }
38 
39  void SetEpoch(const std::string& epoch) { fEpoch = epoch; }
40  std::string Epoch() { return fEpoch; }
41 
42  void SetEpochTag(const std::string& tag) { fEpochTag = tag; }
43  std::string EpochTag() { return fEpochTag; }
44 
45  void GetEpochFromDB();
46 
47  void UseCSVsFromUPS(bool use = true) {fUseCSVsFromUPS = use;}
48  void SetCSVSource(const std::string& path){ fCSVSourceDir = path; }
49 
50  protected:
51  void Load();
52  std::string GetCSVPath();
53 
55  bool fUseEpochs;
57 
58  int fDet;
60  int fRun;
61 
67 
69  };
70 
71 } // end namespace calib
72 
73 #endif
74 ////////////////////////////////////////////////////////////////////////
void UseCSVsFromUPS(bool use=true)
Definition: DriftCache.h:47
void SetEpochTag(const std::string &tag)
Definition: DriftCache.h:42
void SetCSVSource(const std::string &path)
Definition: DriftCache.h:48
nova::dbi::Table * fTbl
Definition: DriftCache.h:68
void SetTag(const std::string &tag)
Definition: DriftCache.h:33
CDPStorage service.
void SetUseEpochs(bool b)
Definition: DriftCache.h:36
std::string fCSVSourceDir
Definition: DriftCache.h:63
std::string fEpoch
Definition: DriftCache.h:66
std::string fTag
Definition: DriftCache.h:64
std::string Epoch()
Definition: DriftCache.h:40
std::string fEpochTag
Definition: DriftCache.h:65
Hold drift constants from current run.
Definition: DriftCache.h:17
void SetCSVFile(std::string f)
Definition: DriftCache.h:31
Definition: run.py:1
const std::string path
Definition: plot_BEN.C:43
void SetEpoch(const std::string &epoch)
Definition: DriftCache.h:39
::xsd::cxx::tree::string< char, simple_type > string
Definition: Database.h:154
std::string EpochTag()
Definition: DriftCache.h:43
std::string GetTag()
Definition: DriftCache.h:34
std::string fCSVFile
Definition: DriftCache.h:62
const hit & b
Definition: hits.cxx:21
gSystem Load("$SRT_PUBLIC_CONTEXT/lib/Linux2.6-GCC-debug/libStandardRecord_dict.so")
Simple object representing a (plane, cell) pair.