BeamInfo.h
Go to the documentation of this file.
1 /////////////////////////////////////////////////////////////////////
2 // $Id: BeamInfo.h,v 1.3 2010/03/26 19:36:42 brebel Exp $
3 // information about the neutrino beam
4 // kinga.partyka@yale.edu
5 ////////////////////////////////////////////////////////////////////
6 #ifndef RAWDATA_BEAMINFO_H
7 #define RAWDATA_BEAMINFO_H
8 
9 #include <iostream>
10 #include <map>
11 #include <string>
12 #include <vector>
13 
14 namespace gar{
15  namespace raw {
16 
17 
18  class BeamInfo {
19 
20  public:
21  BeamInfo();
22  ~BeamInfo();
23 
24  private:
25 
26  double tor101;
27  double tortgt;
28  double trtgtd;
29  long long int t_ms;
30  uint8_t fRecordType;
31  uint32_t fSeconds; // GPS clock. Since Jan 1, 2012.
32  uint16_t fMilliSeconds;
33  uint16_t fNumberOfDevices;
34  std::map<std::string, std::vector<double> > fDataMap;
35 
36 #ifndef __GCCXML__
37 
38  public:
39 
40  BeamInfo(double tor101,double tortgt, double trtgtd,long long int t_ms);
41 
42  double get_tor101() const;
43  double get_tortgt() const;
44  double get_trtgtd() const;
45  long long int get_t_ms() const;
46 
47  void SetTOR101(double val);
48  void SetTORTGT(double val);
49  void SetTRTGTD(double val);
50  void SetT_MS( long long int val);
51 
52  void SetRecordType(uint8_t val) {fRecordType=val;};
53  void SetSeconds(uint32_t val) {fSeconds=val;};
54  void SetMilliSeconds(uint16_t val) {fMilliSeconds=val;};
55  void SetNumberOfDevices(uint16_t val) {fNumberOfDevices=val;};
56 
57  void Set(std::string device_name, double val);
58  void Set(std::string device_name, std::vector<double> val);
59 
60  uint8_t GetRecordType() const {return fRecordType;};
61  uint32_t GetSeconds() const {return fSeconds;};
62  uint16_t GetMilliSeconds() const {return fMilliSeconds;};
63  uint16_t GetNumberOfDevices() const {return fNumberOfDevices;};
64 
65  std::vector<double> Get(std::string device_name);
66  std::map<std::string, std::vector<double> > GetDataMap() const {return fDataMap;};
67 
68  friend std::ostream& operator<<(std::ostream& , const BeamInfo& );
69 
70 #endif
71  };
72 
73 
74  }
75 } // gar
76 
77 ////////////////////////////////////////////////////////////////////////
78 #endif // RAWDATA_BEAMINFO_H
double get_tor101() const
Definition: BeamInfo.cxx:51
uint32_t GetSeconds() const
Definition: BeamInfo.h:61
uint8_t GetRecordType() const
Definition: BeamInfo.h:60
void SetMilliSeconds(uint16_t val)
Definition: BeamInfo.h:54
uint32_t fSeconds
Definition: BeamInfo.h:31
void SetTORTGT(double val)
Definition: BeamInfo.cxx:82
std::string string
Definition: nybbler.cc:12
void Set(std::string device_name, double val)
Definition: BeamInfo.cxx:102
void SetRecordType(uint8_t val)
Definition: BeamInfo.h:52
long long int t_ms
Definition: BeamInfo.h:29
Raw data description.
uint16_t fMilliSeconds
Definition: BeamInfo.h:32
uint16_t GetMilliSeconds() const
Definition: BeamInfo.h:62
uint16_t GetNumberOfDevices() const
Definition: BeamInfo.h:63
friend std::ostream & operator<<(std::ostream &, const BeamInfo &)
Definition: BeamInfo.cxx:122
void SetSeconds(uint32_t val)
Definition: BeamInfo.h:53
void SetTRTGTD(double val)
Definition: BeamInfo.cxx:89
std::vector< double > Get(std::string device_name)
long long int get_t_ms() const
Definition: BeamInfo.cxx:69
void SetT_MS(long long int val)
Definition: BeamInfo.cxx:96
std::map< std::string, std::vector< double > > GetDataMap() const
Definition: BeamInfo.h:66
uint16_t fNumberOfDevices
Definition: BeamInfo.h:33
General GArSoft Utilities.
double get_trtgtd() const
Definition: BeamInfo.cxx:63
std::map< std::string, std::vector< double > > fDataMap
Definition: BeamInfo.h:34
uint8_t fRecordType
Definition: BeamInfo.h:30
void SetTOR101(double val)
Definition: BeamInfo.cxx:75
void SetNumberOfDevices(uint16_t val)
Definition: BeamInfo.h:55
double get_tortgt() const
Definition: BeamInfo.cxx:57