Hall-D Software  alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DDAQConfig.h
Go to the documentation of this file.
1 // $Id$
2 // $HeadURL$
3 //
4 // File: DDAQConfig.h
5 // Created: Mon Sep 8 03:26:42 EDT 2014
6 // Creator: davidl (on Darwin harriet.local 13.3.0 i386)
7 //
8 
9 #ifndef _DDAQConfig_
10 #define _DDAQConfig_
11 
12 #include <JANA/JObject.h>
13 #include <JANA/JFactory.h>
14 
15 /// This class is a base class used for classes that hold
16 /// DAQ module configuration parameters. A subclass for each
17 /// type of digitization module exists that has the attributes
18 /// appropriate for that type of module. (See Df250Config,
19 /// DF1TDCConfig, ...) This class only holds the rocid and
20 /// slot_mask fields which are common to all configurations.
21 /// One of the main purposes of this base class is to allow
22 /// configuration objects for all module types to be stored
23 /// in a single container used internally by the DAQ plugin.
24 
25 class DDAQConfig:public jana::JObject{
26  public:
28 
29  DDAQConfig(uint32_t rocid, uint32_t slot_mask):rocid(rocid),slot_mask(slot_mask){}
30 
31  uint32_t rocid; // crate
32  uint32_t slot_mask; // slots
33 
34  // This method is used primarily for pretty printing
35  // the second argument to AddString is printf style format
36  void toStrings(vector<pair<string,string> > &items)const{
37  AddString(items, "rocid" , "%d", rocid);
38  AddString(items, "slot_mask" , "0x%06x", slot_mask);
39  }
40 
41 };
42 
43 #endif // _DDAQConfig_
44 
void toStrings(vector< pair< string, string > > &items) const
Definition: DDAQConfig.h:36
This class is a base class used for classes that hold DAQ module configuration parameters. A subclass for each type of digitization module exists that has the attributes appropriate for that type of module. (See Df250Config, DF1TDCConfig, ...) This class only holds the rocid and slot_mask fields which are common to all configurations. One of the main purposes of this base class is to allow configuration objects for all module types to be stored in a single container used internally by the DAQ plugin.
Definition: DDAQConfig.h:25
DDAQConfig(uint32_t rocid, uint32_t slot_mask)
Definition: DDAQConfig.h:29
JOBJECT_PUBLIC(DDAQConfig)
uint32_t slot_mask
Definition: DDAQConfig.h:32
uint32_t rocid
Definition: DDAQConfig.h:31