Belle II Software  release-08-01-10
EventTimeFinder.cc
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 //-----------------------------------------------------------------------------
10 // Description : A class to find an event timing
11 //-----------------------------------------------------------------------------
12 
13 #define TRG_SHORT_NAMES
14 #define TRGCDC_SHORT_NAMES
15 
16 #include "trg/trg/Debug.h"
17 #include "trg/trg/Channel.h"
18 #include "trg/trg/Utilities.h"
19 #include "trg/cdc/TRGCDC.h"
20 #include "trg/cdc/Cell.h"
21 #include "trg/cdc/Wire.h"
22 #include "trg/cdc/WireHit.h"
23 #include "trg/cdc/Segment.h"
24 #include "trg/cdc/SegmentHit.h"
25 #include "trg/cdc/EventTimeFinder.h"
26 #include "trg/cdc/FrontEnd.h"
27 #include "trg/cdc/Merger.h"
28 
29 using namespace std;
30 
31 namespace Belle2 {
37 //...For debug : yi...
38 // vector<TRGSignalVector * > dbgIn;
39 // vector<TRGSignalVector * > dbgOut;
40 
41  TRGCDCEventTimeFinder::TRGCDCEventTimeFinder(const std::string& name,
42  const TRGClock& systemClock,
43  const TRGClock& dataClock,
44  const TRGClock& userClockInput,
45  const TRGClock& userClockOutput)
46  : TRGBoard(name, systemClock, dataClock, userClockInput, userClockOutput)
47  {
48  // _tisb(0),
49  // _tosbE(0),
50  // _tosbT(0) {
51  }
52 
54  {
55  }
56 
57  void
59  {
60  std::vector<const TRGCDCTrackSegmentFinder*>::push_back(a);
61  }
62 
63  void
65  {
66 
67  const string sn = "ETF::simulate : " + name();
69 
70  //...Delete old objects...
71  for (unsigned i = 0; i < nOutput(); i++) {
72  if (output(i))
73  if (output(i)->signal())
74  delete output(i)->signal();
75  }
77  }
78 
80 } // namespace Belle2
A class to represent a trigger board.
Definition: Board.h:25
a class of TrackSegmentFinder in TRGCDC
A class to represent a digitized signal. Unit is nano second.
Definition: Clock.h:38
void push_back(const TRGCDCTrackSegmentFinder *)
push back the TRGCDCTrackSegmentFinder pointer
const std::string & name(void) const
returns name.
Definition: Board.h:109
static void enterStage(const std::string &stageName)
Declare that you enter new stage.
Definition: Debug.cc:24
TRGSignalBundle * signal(void) const
returns signal.
Definition: Channel.h:93
static void leaveStage(const std::string &stageName)
Declare that you leave a stage.
Definition: Debug.cc:34
void simulate(void)
Firmware simulation. yi.
unsigned nOutput(void) const
returns output channels.
Definition: Board.h:180
TRGChannel * output(unsigned i) const
returns output channel i.
Definition: Board.h:165
Abstract base class for different kinds of events.