RunHistoryStandard.h
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 // RunHistoryStandard.h
3 //
4 // Detector info class for run history
5 //
6 // jpaley@fnal.gov
7 //
8 ////////////////////////////////////////////////////////////////////////
9 #ifndef DETINFO_RUNHISTORY_H
10 #define DETINFO_RUNHISTORY_H
11 
12 #include <string>
13 #include <vector>
14 #include <map>
15 
16 #include "fhiclcpp/ParameterSet.h"
17 #include "DetectorInfo/RunHistory.h"
18 
19 ///General GArSoft Utilities
20 namespace gar {
21  namespace detinfo {
22 
23  class SubRunStandard : public SubRun {
24  public:
26  SubRunStandard(SubRunStandard const&) = delete;
27  virtual ~SubRunStandard() {};
28 
29  virtual uint64_t TStart() const override { return fTStart; }
30  void SetTStart(uint64_t t) { fTStart = t; }
31 
32  private:
33  uint64_t fTStart;
34  };
35 
36  class RunHistoryStandard : public RunHistory {
37  public:
39  RunHistoryStandard(int runnum);
40  RunHistoryStandard(RunHistoryStandard const&) = delete;
41  virtual ~RunHistoryStandard();
42 
43  virtual bool Update(uint64_t ts=0) override;
44 
45  virtual int RunNumber() const override{ return fRun; }
46  virtual int NSubruns() const override{ return fNSubruns; }
47  virtual int RunType() const override{ return fRunType; }
48  virtual std::string RunTypeAsString() const override;
49  virtual uint64_t TStart() const override { return fTStart; }
50  virtual uint64_t TStop() const override { return fTStop; }
51  virtual uint64_t Duration() const override { return fTStop-fTStart; }
52 
53  std::vector<std::string> Shifters() { return fShifter; }
54 
55  void SetNSubruns(int nsr) { fNSubruns = nsr;}
56  void SetRunType(int rt) { fRunType = rt; }
57  void SetDetId(int id) { fDetId = id; }
58  void SetTStart(uint64_t t) { fTStart = t; }
59  void SetTStop(uint64_t t) { fTStop = t; }
60  void AddShifter(std::string sh) { fShifter.push_back(sh); }
61  void SetShifters(std::vector<std::string> sh) { fShifter = sh; }
62  void SetDetName(std::string dn) { fDetName = dn; }
63 
64  private:
65  protected:
66  int fRun;
67  int fNSubruns;
68  int fRunType;
69  int fDetId;
70 
71  uint64_t fTStart;
72  uint64_t fTStop;
73 
74  std::vector<std::string> fShifter;
76 
77  std::vector<SubRunStandard> fSubrun;
78 
79  }; // class RunHistoryStandard
80  } //namespace detinfo
81 } // gar
82 
83 #endif // DETINFO_RUNHISTORY_H
std::vector< SubRunStandard > fSubrun
std::string string
Definition: nybbler.cc:12
void SetShifters(std::vector< std::string > sh)
std::vector< std::string > Shifters()
virtual int RunNumber() const override
virtual int NSubruns() const override
std::vector< std::string > fShifter
General LArSoft Utilities.
virtual int RunType() const override
General GArSoft Utilities.
virtual uint64_t Duration() const override
virtual uint64_t TStop() const override
bool Update(detinfo::DetectorClocksData const &clockData, detinfo::DetectorPropertiesData const &detProp, const TCSlice &slc, PFPStruct &pfp, bool prt)
Definition: PFPUtils.cxx:1056
virtual uint64_t TStart() const override
virtual uint64_t TStart() const override