Hall-D Software  alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DTSGBORConfig.h
Go to the documentation of this file.
1 // $Id$
2 //
3 // File: DTSGBORConfig.h
4 // Created: Tue Nov 20 07:47:02 EST 2018
5 // Creator: davidl (on gluon114)
6 //
7 
8 #ifndef _DTSGBORConfig_
9 #define _DTSGBORConfig_
10 
11 #include <JANA/JObject.h>
12 
13 #include<string>
14 
15 // This class holds data inserted via the CDAQ system
16 // into the BOR. CDAQ creates the BOR internally rather
17 // than via the hdBOR program inserting the event externally
18 // as is done with CODA. As such, it may add data such as
19 // this that is not reflected in the DAQ/bor_roc.h file
20 // like for the digitization modules.
21 
22 
23 
24 class DTSGBORConfig:public jana::JObject{
25  public:
27 
29  virtual ~DTSGBORConfig(){}
30 
31  uint32_t rocid; // always 81. Needed for SortByModule in LinAssociations.h
32  uint32_t slot; // always 1
33  uint32_t run_number;
34  uint32_t unix_time;
35  vector<uint32_t> misc_words; // extra words that may be added later
36 
37  // This method is used primarily for pretty printing
38  // the second argument to AddString is printf style format
39  void toStrings(vector<pair<string,string> > &items)const{
40 
41  AddString(items, "run_number" , "%d" , run_number);
42  AddString(items, "unix_time" , "%d" , unix_time);
43  AddString(items, "Nwords" , "%d" , misc_words.size());
44  }
45 
46 };
47 
48 #endif // _DTSGBORConfig_
49 
uint32_t rocid
Definition: DTSGBORConfig.h:31
void toStrings(vector< pair< string, string > > &items) const
Definition: DTSGBORConfig.h:39
uint32_t unix_time
Definition: DTSGBORConfig.h:34
vector< uint32_t > misc_words
Definition: DTSGBORConfig.h:35
uint32_t slot
Definition: DTSGBORConfig.h:32
JOBJECT_PUBLIC(DTSGBORConfig)
virtual ~DTSGBORConfig()
Definition: DTSGBORConfig.h:29
uint32_t run_number
Definition: DTSGBORConfig.h:33