FACT++  1.0
tcp_connection::tcp_connection ( ba::io_service &  ioservice)
inlineprivate

Definition at line 63 of file ftm.cc.

References fDAC, fDelimiter, fEnable, i, kDelimiterEnd, kDelimiterStart, FTM::kFtmIdle, FTM::kFtmLocked, FTM::StaticData::kLPext, FTM::StaticData::kPedestal, and FTM::StaticData::kTrigger.

63  : ba::ip::tcp::socket(ioservice),
64  fTriggerDynData(ioservice), fTriggerSendData(ioservice)
65  {
66  //deadline_.expires_at(boost::posix_time::pos_infin);
67 
68  fHeader.fDelimiter=kDelimiterStart;
70  fHeader.fBoardId=0xaffe;
71  fHeader.fFirmwareId=0x42;
72 
73  fDelimiter = htons(kDelimiterEnd);
74 
76 
84 
93 
94  fStaticData.fTriggerSequence = 1 | (2<<5) | (3<<10);
95 
100 
101  fStaticData.fActiveFTU[0] = 0x3ff;
102  fStaticData.fActiveFTU[3] = 0x3ff;
103 
104  for (int i=0; i<40; i++)
105  {
106  for (int p=0; p<4; p++)
107  fStaticData[i].fEnable[p] = 0x1ff;
108 
109  for (int p=0; p<5; p++)
110  fStaticData[i].fDAC[p] = (p+1)*10;
111 
112  fStaticData[i].fPrescaling = 42;
113  }
114 
115  for (unsigned long long i=0; i<40; i++)
116  {
117  fFtuList[i].fDNA = (i<<48)|(i<<32)|(i<<16)|i;
118  fFtuList[i].fPingAddr = (1<<8) | i;
119  }
120 
121  fFtuList[1].fPingAddr = (1<<9) | 1;
122  fFtuList[0].fPingAddr = 0;
123 
124  fFtuList.fNumBoards = 19;
125  fFtuList.fNumBoardsCrate[0] = 9;
126  fFtuList.fNumBoardsCrate[1] = 0;
127  fFtuList.fNumBoardsCrate[2] = 0;
128  fFtuList.fNumBoardsCrate[3] = 10;
129  }
uint16_t fWindowCalib
(4ns * x + 8ns) At least N (multiplicity) rising edges (trigger signal) within this window ...
Definition: HeadersFTM.h:233
uint16_t fTriggerSequence
[ms] Interval between two artificial triggers (no matter which type) minimum 1ms, 10 bit ...
Definition: HeadersFTM.h:220
ba::deadline_timer fTriggerSendData
Definition: fad.cc:123
int i
Definition: db_dim_client.c:21
uint16_t fMultiplicityPhysics
Definition: HeadersFTM.h:226
uint16_t fActiveFTU[4]
Definition: HeadersFTM.h:238
uint16_t fEnable[4]
Definition: HeadersFTM.h:186
uint16_t fGeneralSettings
Definition: HeadersFTM.h:217
uint16_t fDeadTime
(4ns * x + 8ns) FTM internal programmable delay between trigger descision and time marker output ...
Definition: HeadersFTM.h:230
FTM::StaticData fStaticData
Definition: ftm.cc:146
uint32_t fClockConditioner[8]
(4ns * x + 8ns) FTM internal programmable dead time after trigger decision
Definition: HeadersFTM.h:231
uint16_t fDelimiter
Definition: ftm.cc:151
uint16_t fNumBoardsCrate[4]
Total number of boards responded.
Definition: HeadersFTM.h:637
ba::deadline_timer fTriggerDynData
Definition: ftm.cc:60
Enable trigger decision after light pulse (CalibrationTrigger, LP1)
Definition: HeadersFTM.h:204
Pedestal trigger (artifical)
Definition: HeadersFTM.h:202
uint16_t fWindowPhysics
R0, R1, R8, R9, R11, R13, R14, R15.
Definition: HeadersFTM.h:232
uint16_t fMultiplicityCalib
Required trigger multiplicity for physcis triggers (0-40)
Definition: HeadersFTM.h:227
FAD::EventHeader fHeader
Definition: fad.cc:117
Trigger output disabled, configuration possible.
Definition: HeadersFTM.h:21
uint16_t fDelayTimeMarker
(4ns * x + 8ns) FTM internal programmable delay between trigger decision and output ...
Definition: HeadersFTM.h:229
uint16_t fDelayTrigger
Required trigger multiplicity calibration (LPext) triggers (0-40)
Definition: HeadersFTM.h:228
FTM::FtuList fFtuList
Definition: ftm.cc:145
Physics trigger decision (PhysicTrigger)
Definition: HeadersFTM.h:201
uint16_t fNumBoards
Definition: HeadersFTM.h:636
uint16_t fDAC[5]
enable of 4x9 pixels coded as 4x9bits
Definition: HeadersFTM.h:187