Belle II Software development
OpticalLink.h
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8
9#ifndef TRGOpticalLink_FLAG_
10#define TRGOpticalLink_FLAG_
11
12#include <string>
13#include <vector>
14
15namespace Belle2 {
21 class TRGSignal;
22 class TRGClock;
23
26
27 public:
29 TRGOpticalLink(const std::string& name, const TRGClock&);
30
32 virtual ~TRGOpticalLink();
33
34 public:// Selectors.
35
37 const std::string& name(void) const;
38
40 const TRGClock& clock(void) const;
41
44 void dump(const std::string& message = "",
45 const std::string& pre = "") const;
46
47 public:// Modifiers.
48
50 void appendHeader(const TRGSignal*);
51
53 void appendTrailer(const TRGSignal*);
54
56 void append(const TRGSignal*);
57
58 private:
59
61 const std::string _name;
62
65
67 std::vector<const TRGSignal*> _head;
68
70 std::vector<const TRGSignal*> _trail;
71
73 std::vector<const TRGSignal*> _data;
74 };
75
76//-----------------------------------------------------------------------------
77
78 inline
79 const std::string&
81 {
82 return _name;
83 }
84
85 inline
86 const TRGClock&
88 {
89 return * _clock;
90 }
91
92 inline
93 void
95 {
96 _head.push_back(a);
97 }
98
99 inline
100 void
102 {
103 _trail.push_back(a);
104 }
105
106 inline
107 void
109 {
110 _data.push_back(a);
111 }
112
114} // namespace Belle2
115
116#endif /* TRGOpticalLink_FLAG_ */
A class to represent a digitized signal. Unit is nano second.
Definition: Clock.h:38
A class to represent a digitized signal. Unit is nano second.
Definition: Signal.h:23
void appendHeader(const TRGSignal *)
appends a signal to header data.
Definition: OpticalLink.h:94
void appendTrailer(const TRGSignal *)
appends a signal to trailer data.
Definition: OpticalLink.h:101
const TRGClock & clock(void) const
returns clock.
Definition: OpticalLink.h:87
const std::string & name(void) const
returns name.
Definition: OpticalLink.h:80
virtual ~TRGOpticalLink()
Destructor.
Definition: OpticalLink.cc:28
void append(const TRGSignal *)
appends a signal to data.
Definition: OpticalLink.h:108
Abstract base class for different kinds of events.