LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
BeamInfo.h
Go to the documentation of this file.
1 // information about the neutrino beam
3 // kinga.partyka@yale.edu
5 #ifndef RAWDATA_BEAMINFO_H
6 #define RAWDATA_BEAMINFO_H
7 
8 #include <cstdint>
9 #include <iosfwd>
10 #include <map>
11 #include <string>
12 #include <vector>
13 
14 namespace raw {
15 
16  class BeamInfo {
17 
18  public:
19  BeamInfo();
20  ~BeamInfo();
21 
22  private:
23  double tor101;
24  double tortgt;
25  double trtgtd;
26  long long int t_ms;
27  uint8_t fRecordType;
28  uint32_t fSeconds; // GPS clock. Since Jan 1, 2012.
29  uint16_t fMilliSeconds;
30  uint16_t fNumberOfDevices;
31  std::map<std::string, std::vector<double>> fDataMap;
32 
33  public:
34  BeamInfo(double tor101, double tortgt, double trtgtd, long long int t_ms);
35 
36  double get_tor101() const;
37  double get_tortgt() const;
38  double get_trtgtd() const;
39  long long int get_t_ms() const;
40 
41  void SetTOR101(double val);
42  void SetTORTGT(double val);
43  void SetTRTGTD(double val);
44  void SetT_MS(long long int val);
45 
46  void SetRecordType(uint8_t val) { fRecordType = val; };
47  void SetSeconds(uint32_t val) { fSeconds = val; };
48  void SetMilliSeconds(uint16_t val) { fMilliSeconds = val; };
49  void SetNumberOfDevices(uint16_t val) { fNumberOfDevices = val; };
50 
51  void Set(std::string device_name, double val);
52  void Set(std::string device_name, std::vector<double> val);
53 
54  uint8_t GetRecordType() const { return fRecordType; };
55  uint32_t GetSeconds() const { return fSeconds; };
56  uint16_t GetMilliSeconds() const { return fMilliSeconds; };
57  uint16_t GetNumberOfDevices() const { return fNumberOfDevices; };
58 
59  std::vector<double> Get(std::string device_name);
60  std::map<std::string, std::vector<double>> GetDataMap() const { return fDataMap; };
61 
62  friend std::ostream& operator<<(std::ostream&, const BeamInfo&);
63  };
64 
65 }
66 
68 #endif // RAWDATA_BEAMINFO_H
long long int get_t_ms() const
Definition: BeamInfo.cxx:59
long long int t_ms
Definition: BeamInfo.h:26
std::map< std::string, std::vector< double > > fDataMap
Definition: BeamInfo.h:31
void SetTOR101(double val)
Definition: BeamInfo.cxx:65
uint8_t GetRecordType() const
Definition: BeamInfo.h:54
void SetRecordType(uint8_t val)
Definition: BeamInfo.h:46
double trtgtd
Definition: BeamInfo.h:25
double tortgt
Definition: BeamInfo.h:24
uint32_t fSeconds
Definition: BeamInfo.h:28
Raw data description.
Definition: RawTypes.h:6
uint16_t GetNumberOfDevices() const
Definition: BeamInfo.h:57
void SetMilliSeconds(uint16_t val)
Definition: BeamInfo.h:48
uint16_t GetMilliSeconds() const
Definition: BeamInfo.h:56
void SetT_MS(long long int val)
Definition: BeamInfo.cxx:86
double get_tor101() const
Definition: BeamInfo.cxx:41
uint16_t fMilliSeconds
Definition: BeamInfo.h:29
std::map< std::string, std::vector< double > > GetDataMap() const
Definition: BeamInfo.h:60
friend std::ostream & operator<<(std::ostream &, const BeamInfo &)
Definition: BeamInfo.cxx:110
void SetNumberOfDevices(uint16_t val)
Definition: BeamInfo.h:49
uint32_t GetSeconds() const
Definition: BeamInfo.h:55
std::vector< double > Get(std::string device_name)
void SetTORTGT(double val)
Definition: BeamInfo.cxx:72
void SetSeconds(uint32_t val)
Definition: BeamInfo.h:47
uint16_t fNumberOfDevices
Definition: BeamInfo.h:30
double tor101
Definition: BeamInfo.h:23
void SetTRTGTD(double val)
Definition: BeamInfo.cxx:79
void Set(std::string device_name, double val)
Definition: BeamInfo.cxx:91
double get_trtgtd() const
Definition: BeamInfo.cxx:53
double get_tortgt() const
Definition: BeamInfo.cxx:47
uint8_t fRecordType
Definition: BeamInfo.h:27