NSCL DDAS  1.0
Support for XIA DDAS at the NSCL
 All Classes Namespaces Files Functions Variables Macros Pages
MyParameters.h
1 
2 #ifndef MYPARAMETERS_H
3 #define MYPARAMETERS_H
4 
5 #include <config.h>
6 #include <TreeParameter.h>
7 #include <string>
8 
9 
10 // The tree-like structure of data will be :
11 //
12 // MyParameters
13 // |
14 // +-- multiplicity
15 // |
16 // +-- ChannelData (chan[0])
17 // | +-- energy
18 // | \-- timestamp
19 // |
20 // +-- ChannelData (chan[1])
21 // | +-- energy
22 // | \-- timestamp
23 // |
24 // ... (45 more channel data objects)
25 // |
26 // \-- ChannelData (chan[47])
27 // +-- energy
28 // \-- timestamp
29 //
30 //
31 struct ChannelData {
32 
33  CTreeParameter energy;
34  CTreeParameter timestamp;
35 
36  // Initialize the TreeParameters
37  //
38  // We will create TreeParameters with names associated with
39  // the name passed in. For example, if name = "rawdata", then
40  // we will create TreeParameters with names rawdata.energy and
41  // rawdata.timestamp.
42  //
43  // \param name name of parent in tree structure
44  void Initialize(std::string name);
45 };
46 
47 //____________________________________________________________
48 // Struct for top-level events
49 //
50 // This contains 48 channels of data because we have 3 modules
51 // in our system, each with 16 channels a piece.
52 //
53 // We also want to keep some information for the number of ddas hits
54 // per event (i.e. the multiplicity)
55 struct MyParameters {
56 
57  ChannelData chan[48];
58  CTreeParameter multiplicity;
59 
60  // Constructor
61  //
62  // This is the root of the tree structure. The name of this
63  // will be used to name the branches of the tree.
64  //
65  // \param name name of root
66  MyParameters(std::string name);
67 };
68 
69 #endif
Definition: MyParameters.h:55
Definition: MyParameters.h:31