Belle II Software  release-05-02-19
Channel.h
1 //-----------------------------------------------------------------------------
2 // $Id$
3 //-----------------------------------------------------------------------------
4 // Filename : TRGChannel.h
5 // Section : TRG
6 // Owner : Yoshihito Iwasaki
7 // Email : yoshihito.iwasaki@kek.jp
8 //-----------------------------------------------------------------------------
9 // Description : A class to represent a serial link between trigger
10 // hardware modules
11 //-----------------------------------------------------------------------------
12 // $Log$
13 //-----------------------------------------------------------------------------
14 
15 #ifndef TRGChannel_FLAG_
16 #define TRGChannel_FLAG_
17 
18 #include <string>
19 
20 namespace Belle2 {
26  class TRGSignalBundle;
27  class TRGBoard;
28 
30  class TRGChannel {
31 
32  public:
33 
35  TRGChannel(const std::string& name,
36  const TRGBoard& sender,
37  const TRGBoard& receiver);
38 
40  virtual ~TRGChannel();
41 
42  public:// Selectors.
43 
45  const std::string& name(void) const;
46 
48  // const TRGSignalBundle * signal(void) const;
49  TRGSignalBundle* signal(void) const;
50 
53  void dump(const std::string& message = "",
54  const std::string& pre = "") const;
55 
57  const TRGBoard& sender(void) const;
58 
59  public:// Modifiers.
60 
62  // const TRGSignalBundle * signal(const TRGSignalBundle *);
64 
65  private:
66 
68  const std::string _name;
69 
71  const TRGBoard& _sender;
72 
75 
78  };
79 
80 //-----------------------------------------------------------------------------
81 
82  inline
83  const std::string&
84  TRGChannel::name(void) const
85  {
86  return _name;
87  }
88 
89  inline
92  {
93  _data = a;
94  return _data;
95  }
96 
97  inline
99  TRGChannel::signal(void) const
100  {
101  return _data;
102  }
103 
104  inline
105  const TRGBoard&
106  TRGChannel::sender(void) const
107  {
108  return _sender;
109  }
110 
112 } // namespace Belle2
113 
114 #endif /* TRGChannel_FLAG_ */
Belle2::TRGChannel::sender
const TRGBoard & sender(void) const
sender TRG board
Definition: Channel.h:106
Belle2::TRGBoard
A class to represent a trigger board.
Definition: Board.h:30
Belle2::TRGChannel::_sender
const TRGBoard & _sender
Sender.
Definition: Channel.h:71
Belle2::TRGChannel
A class to represent a serial link between trigger hardware modules.
Definition: Channel.h:30
Belle2::TRGSignalBundle
A class to represent a bundle of SignalVectors.
Definition: SignalBundle.h:31
Belle2::TRGChannel::name
const std::string & name(void) const
returns name.
Definition: Channel.h:84
Belle2::TRGChannel::_data
TRGSignalBundle * _data
Input data.
Definition: Channel.h:77
Belle2::TRGChannel::signal
TRGSignalBundle * signal(void) const
returns signal.
Definition: Channel.h:99
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::TRGChannel::dump
void dump(const std::string &message="", const std::string &pre="") const
dumps contents.
Belle2::TRGChannel::_name
const std::string _name
Name of a channel.
Definition: Channel.h:68
Belle2::TRGChannel::~TRGChannel
virtual ~TRGChannel()
Destructor.
Definition: Channel.cc:36
Belle2::TRGChannel::_receiver
const TRGBoard & _receiver
Receiver.
Definition: Channel.h:74
Belle2::TRGChannel::TRGChannel
TRGChannel(const std::string &name, const TRGBoard &sender, const TRGBoard &receiver)
Constructor.
Definition: Channel.cc:26