LArSoft  v06_85_00
Liquid Argon Software toolkit - http://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 <iostream>
9 #include <map>
10 #include <string>
11 #include <vector>
12 
13 namespace raw {
14 
15 
16  class BeamInfo {
17 
18  public:
19  BeamInfo();
20  ~BeamInfo();
21 
22  private:
23 
24  double tor101;
25  double tortgt;
26  double trtgtd;
27  long long int t_ms;
28  uint8_t fRecordType;
29  uint32_t fSeconds; // GPS clock. Since Jan 1, 2012.
30  uint16_t fMilliSeconds;
31  uint16_t fNumberOfDevices;
32  std::map<std::string, std::vector<double> > fDataMap;
33 
34 
35  public:
36 
37  BeamInfo(double tor101,double tortgt, double trtgtd,long long int t_ms);
38 
39  double get_tor101() const;
40  double get_tortgt() const;
41  double get_trtgtd() const;
42  long long int get_t_ms() const;
43 
44  void SetTOR101(double val);
45  void SetTORTGT(double val);
46  void SetTRTGTD(double val);
47  void SetT_MS( long long int val);
48 
49  void SetRecordType(uint8_t val) {fRecordType=val;};
50  void SetSeconds(uint32_t val) {fSeconds=val;};
51  void SetMilliSeconds(uint16_t val) {fMilliSeconds=val;};
52  void SetNumberOfDevices(uint16_t val) {fNumberOfDevices=val;};
53 
54  void Set(std::string device_name, double val);
55  void Set(std::string device_name, std::vector<double> val);
56 
57  uint8_t GetRecordType() const {return fRecordType;};
58  uint32_t GetSeconds() const {return fSeconds;};
59  uint16_t GetMilliSeconds() const {return fMilliSeconds;};
60  uint16_t GetNumberOfDevices() const {return fNumberOfDevices;};
61 
62  std::vector<double> Get(std::string device_name);
63  std::map<std::string, std::vector<double> > GetDataMap() const {return fDataMap;};
64 
65  friend std::ostream& operator<<(std::ostream& , const BeamInfo& );
66 
67  };
68 
69 
70 }
71 
73 #endif // RAWDATA_BEAMINFO_H
long long int get_t_ms() const
Definition: BeamInfo.cxx:69
long long int t_ms
Definition: BeamInfo.h:27
std::map< std::string, std::vector< double > > fDataMap
Definition: BeamInfo.h:32
void SetTOR101(double val)
Definition: BeamInfo.cxx:75
uint8_t GetRecordType() const
Definition: BeamInfo.h:57
void SetRecordType(uint8_t val)
Definition: BeamInfo.h:49
double trtgtd
Definition: BeamInfo.h:26
double tortgt
Definition: BeamInfo.h:25
uint32_t fSeconds
Definition: BeamInfo.h:29
Raw data description.
Definition: RawTypes.h:6
uint16_t GetNumberOfDevices() const
Definition: BeamInfo.h:60
void SetMilliSeconds(uint16_t val)
Definition: BeamInfo.h:51
uint16_t GetMilliSeconds() const
Definition: BeamInfo.h:59
void SetT_MS(long long int val)
Definition: BeamInfo.cxx:96
double get_tor101() const
Definition: BeamInfo.cxx:51
uint16_t fMilliSeconds
Definition: BeamInfo.h:30
std::map< std::string, std::vector< double > > GetDataMap() const
Definition: BeamInfo.h:63
friend std::ostream & operator<<(std::ostream &, const BeamInfo &)
Definition: BeamInfo.cxx:120
void SetNumberOfDevices(uint16_t val)
Definition: BeamInfo.h:52
uint32_t GetSeconds() const
Definition: BeamInfo.h:58
std::vector< double > Get(std::string device_name)
void SetTORTGT(double val)
Definition: BeamInfo.cxx:82
void SetSeconds(uint32_t val)
Definition: BeamInfo.h:50
uint16_t fNumberOfDevices
Definition: BeamInfo.h:31
double tor101
Definition: BeamInfo.h:24
void SetTRTGTD(double val)
Definition: BeamInfo.cxx:89
void Set(std::string device_name, double val)
Definition: BeamInfo.cxx:101
double get_trtgtd() const
Definition: BeamInfo.cxx:63
double get_tortgt() const
Definition: BeamInfo.cxx:57
uint8_t fRecordType
Definition: BeamInfo.h:28