Jpp  18.2.1-ARCA-DF-PATCH
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
JModuleHeader.hh
Go to the documentation of this file.
1 #ifndef __JTRIGGER__JMODULEHEADER__
2 #define __JTRIGGER__JMODULEHEADER__
3 
7 
8 
9 /**
10  * \author mdejong
11  */
12 
13 namespace JTRIGGER {}
14 namespace JPP { using namespace JTRIGGER; }
15 
16 namespace JTRIGGER {
17 
21 
22 
23  /**
24  * Header for Module.
25  */
26  struct JModuleHeader :
27  public JDAQChronometer,
28  public JDAQModuleIdentifier,
29  public JPosition3D
30  {
31  /**
32  * Default constructor.
33  */
35  JDAQChronometer (),
37  JPosition3D ()
38  {}
39 
40 
41  /**
42  * Constructor.
43  *
44  * \param chronometer DAQ chronometer
45  * \param id module identifier
46  * \param pos module position
47  */
48  JModuleHeader(const JDAQChronometer& chronometer,
49  const JDAQModuleIdentifier& id,
50  const JPosition3D& pos) :
51  JDAQChronometer (chronometer),
53  JPosition3D (pos)
54  {}
55 
56 
57  /**
58  * Get module header.
59  *
60  * \return module header
61  */
63  {
64  return static_cast<const JModuleHeader&>(*this);
65  }
66 
67 
68  /**
69  * Set module header.
70  *
71  * \param header module header
72  */
73  void setModuleHeader(const JModuleHeader& header)
74  {
75  static_cast<JModuleHeader&>(*this) = header;
76  }
77  };
78 }
79 
80 #endif
JModuleHeader(const JDAQChronometer &chronometer, const JDAQModuleIdentifier &id, const JPosition3D &pos)
Constructor.
void setModuleHeader(const JModuleHeader &header)
Set module header.
const JModuleHeader & getModuleHeader() const
Get module header.
Header for Module.
JModuleHeader()
Default constructor.
Data structure for position in three dimensions.
Definition: JPosition3D.hh:36