Belle II Software  release-05-02-19
SVDPackerModule.cc
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2015 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Jarek Wiechczynski *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #include <svd/modules/svdPacker/SVDPackerModule.h>
12 #include <svd/online/SVDOnlineToOfflineMap.h>
13 
14 #include <framework/datastore/DataStore.h>
15 #include <framework/datastore/StoreObjPtr.h>
16 #include <framework/datastore/RelationArray.h>
17 #include <framework/datastore/RelationIndex.h>
18 #include <framework/logging/Logger.h>
19 #include <framework/utilities/FileSystem.h>
20 
21 #include <arpa/inet.h>
22 #include <boost/crc.hpp>
23 
24 #include <cstring>
25 #include <iomanip>
26 #include <iostream>
27 #include <sstream>
28 #include <vector>
29 
30 
31 using namespace std;
32 using namespace Belle2;
33 using namespace Belle2::SVD;
34 //-----------------------------------------------------------------
35 // Register the Module
36 //-----------------------------------------------------------------
37 REG_MODULE(SVDPacker)
38 
39 //-----------------------------------------------------------------
40 // Implementation
41 //-----------------------------------------------------------------
42 
43 std::string Belle2::SVD::SVDPackerModule::m_xmlFileName = std::string("SVDChannelMapping.xml");
44 
45 SVDPackerModule::SVDPackerModule() : Module(),
46  m_mapping(m_xmlFileName),
47  m_FADCTriggerNumberOffset(0)
48 {
49  // Set module properties
50 
51 
52  // Parameter definitions
53  addParam("SVDEventInfo", m_svdEventInfoName, "Name of the SVDEventInfo object", string("SVDEventInfoSim"));
54  addParam("svdShaperDigitListName", m_svdShaperDigitListName, "Name of the SVD Shaper Digits List", string(""));
55  addParam("rawSVDListName", m_rawSVDListName, "Name of the raw SVD List", string(""));
56  //addParam("xmlMapFileName", m_xmlMapFileName, "path+name of the xml file", FileSystem::findFile("data/svd/svd_mapping.xml"));
57  addParam("NodeID", m_nodeid, "Node ID", 0);
58  addParam("FADCTriggerNumberOffset", m_FADCTriggerNumberOffset,
59  "number to be added to the FADC trigger number to match the main trigger number", 0);
60  addParam("binPrintout", m_binPrintout, "Print binary data created by the Packer", bool(false));
61  // initialize event #
62  n_basf2evt = 0;
63 
64 }
65 
66 
68 {
69 }
70 
71 
72 
74 {
75 
76  m_rawSVD.registerInDataStore(m_rawSVDListName);
78  m_eventMetaDataPtr.isRequired();
80 }
81 
82 
84 {
85  if (m_mapping.hasChanged()) { m_map = std::make_unique<SVDOnlineToOfflineMap>(m_mapping->getFileName()); }
86 
87  //number of FADC boards
88  nFADCboards = m_map->getFADCboardsNumber();
89 
90  // filling FADCnumberMap and FADCnumberMapRev
91  m_map->prepFADCmaps(FADCnumberMap, FADCnumberMapRev);
92 
93  // passing APV<->FADC mapping from SVDOnlineToOfflineMap object
94  APVmap = &(m_map->APVforFADCmap);
95 
96 }
97 
98 
99 #ifndef __clang__
100 #pragma GCC diagnostic push
101 #pragma GCC diagnostic ignored "-Wstack-usage="
102 #endif
104 {
105 
106  if (!m_eventMetaDataPtr.isValid()) { // give up...
107  B2ERROR("Missing valid EventMetaData.");
108  return;
109  }
110 
111  if (!m_svdEventInfoPtr.isValid()) {
112  B2ERROR("Missing valid SVDEventInfo.");
113  return;
114  }
115 
116  // retrieve the information from SVDEventInfo to store it in the FADCHeaders for this event
117  SVDModeByte modeByte = m_svdEventInfoPtr->getModeByte();
118 
119  uint8_t triggerBin = modeByte.getTriggerBin();
120  uint8_t runType = modeByte.getRunType();
121  uint8_t daqMode = modeByte.getDAQMode();
122  uint8_t daqType = 0;
123  if (daqMode == 3) daqType = 1;
124 
125  uint8_t xTalk = m_svdEventInfoPtr->isCrossTalkEvent();
126  uint8_t triggerType = (m_svdEventInfoPtr->getTriggerType()).getType();
127 
128 
129  m_rawSVD.clear();
130 
131  if (! m_map) {
132  B2ERROR("xml map not loaded, going to the next module");
133  return;
134  }
135 
136 
137  RawCOPPERPackerInfo rawcprpacker_info;
138  rawcprpacker_info.exp_num = 0;
139  rawcprpacker_info.run_subrun_num = 1; // run number : 14bits, subrun # : 8bits
140  rawcprpacker_info.eve_num = n_basf2evt;
141  rawcprpacker_info.node_id = m_nodeid;
142  rawcprpacker_info.tt_ctime = 0x7123456;
143  rawcprpacker_info.tt_utime = 0xF1234567;
144  rawcprpacker_info.b2l_ctime = 0x7654321;
145 
146 
147  unsigned int nEntries_SVDShaperDigits = m_svdShaperDigit.getEntries();
148 
149  // DataInfo contains info on 6 samples and strip number
150  vector<DataInfo> (*fadc_apv_matrix)[48] = new
151  vector<DataInfo>[nFADCboards][48]; // for all layers, nFADCboards FADCs and at most 48 APV25 for each
152 
153  for (unsigned int i = 0; i < nEntries_SVDShaperDigits; i++) {
154 
155  const SVDShaperDigit* hit = m_svdShaperDigit[i];
156 
157  short int cellID = hit->getCellID();
158  VxdID sensID = hit->getSensorID();
159  bool isU = hit->isUStrip();
160 
161  int sensor = sensID.getSensorNumber();
162  int ladder = sensID.getLadderNumber();
163  int layer = sensID.getLayerNumber();
164 
165  // find FADC/APV for given DSSD sensor
166  const SVDOnlineToOfflineMap::ChipInfo& CHIP_info = m_map->getChipInfo(layer, ladder, sensor, isU, cellID);
167  unsigned short fadc = CHIP_info.fadc;
168  unsigned short apv = CHIP_info.apv;
169  unsigned short apvChannel = CHIP_info.apvChannel;
170 
171  //do not create data words for APV missing in the hardware mapping
172  if (fadc == 0) continue;
173 
174  // return 0-47 for given FADC number
175  auto fadcIter = FADCnumberMap.find(fadc);
176 
177  //getting charge samples from SVDShaperDigit object
178  SVDShaperDigit::APVFloatSamples samples = hit->getSamples();
179 
180  // fill DataInfo
181  for (unsigned short j = 0; j < 6; j++) {
182  dataInfo.data[j] = samples[j];
183  }
184  dataInfo.channel = apvChannel;
185 
186  //fill fadc_apv_matrix[fadc][apv] with DataInfo object
187  fadc_apv_matrix[fadcIter->second][apv].push_back(dataInfo);
188 
189  }// end of the loop that fills fadc_apv_matrix !!!!
190 
191 
192  for (unsigned int iFADC = 0; iFADC < nFADCboards; iFADC++) {
193 
194  //get original FADC number
195  unsigned short FADCorg = FADCnumberMapRev[iFADC];
196 
197  //new RawSVD entry --> moved inside FADC loop
198  RawSVD* raw_svd = m_rawSVD.appendNew();
199  data_words.clear();
200 
201 
202  //--------------- start creating Raw Data words
203 
204  // here goes FTB header
205  data32 = 0xffaa0000;
206 
207  //adds data32 to data vector
208  addData32(data32);
209 
210  m_FTBHeader.errorsField = 0xf0;
211  m_FTBHeader.eventNumber = (m_eventMetaDataPtr->getEvent() & 0xFFFFFF);
212 
213  addData32(data32);
214 
215  // here goes FADC header
217  m_MainHeader.trgType = triggerType;
218  m_MainHeader.trgTiming = triggerBin;
219  m_MainHeader.xTalk = xTalk;
220  m_MainHeader.FADCnum = FADCorg; // write original FADC number
221  m_MainHeader.DAQType = daqType;
222  m_MainHeader.DAQMode = daqMode;
223 
224  m_MainHeader.runType = runType; //zero-suppressed mode
225  m_MainHeader.check = 6; // 110
226 
227  addData32(data32);
228 
229  // getting a set of APV numbers for current FADC
230  auto apv_range = APVmap->equal_range(FADCorg);
231 
232  for (auto& it = apv_range.first; it != apv_range.second; ++it) {
233  unsigned short iAPV = it->second;
234 
235  // here goes APV header
236  m_APVHeader.CMC1 = 0;
237  m_APVHeader.CMC2 = 0;
238 
239  m_APVHeader.fifoErr = 0;
240  m_APVHeader.frameErr = 0;
242  m_APVHeader.apvErr = 0;
243 
245  m_APVHeader.APVnum = iAPV;
246  m_APVHeader.check = 2;
247 
248  addData32(data32);
249 
250  // alias for table element (DataInfo object)
251  vector<DataInfo>& apv_data_vec = fadc_apv_matrix[iFADC][iAPV];
252 
253  if (apv_data_vec.size() > 0) { // if any data for given FADC/APV
254  for (std::vector<DataInfo>::iterator apv_data = apv_data_vec.begin(); apv_data != apv_data_vec.end(); ++apv_data) {
255 
256  // here go DATA words
257 
258  //skip 1st data frame if simulate 3-sample data
259  if (m_svdEventInfoPtr->getNSamples() == 6) {
260  m_data_A.sample1 = apv_data->data[0];
261  m_data_A.sample2 = apv_data->data[1];
262  m_data_A.sample3 = apv_data->data[2];
263  m_data_A.stripNum = apv_data->channel;
264  m_data_A.check = 0;
265 
266  addData32(data32);
267  }
268 
269  m_data_B.sample4 = apv_data->data[3];
270  m_data_B.sample5 = apv_data->data[4];
271  m_data_B.sample6 = apv_data->data[5];
272  m_data_B.stripNum = apv_data->channel;
273  m_data_B.check = 0;
274 
275  addData32(data32);
276 
277  }
278  }
279 
280  } // end APV loop
281 
282  // here goes FADC trailer
290  m_FADCTrailer.check = 14;
291 
292  addData32(data32);
293 
294 
295  // crc16 calculation
296  //first swap all 32-bits word -> big endian
297  unsigned short nCRC = data_words.size();
298  uint32_t tmpBuffer[nCRC];
299 
300  for (unsigned short i = 0; i < nCRC; i++)
301  tmpBuffer[i] = htonl(data_words[i]);
302 
303  //compute crc16
304  boost::crc_basic<16> bcrc(0x8005, 0xffff, 0, false, false);
305  bcrc.process_block(tmpBuffer, tmpBuffer + nCRC);
306  unsigned int crc = bcrc.checksum();
307 
308 
309  // here goes FTB trailer
310  m_FTBTrailer.crc16 = crc;
311  m_FTBTrailer.controlWord = 0xff55;
312 
313  addData32(data32);
314 
315 
316  // ******* modified and moved inside FADC loop **********
317 
318  unsigned int nwords_1st = data_words.size();
319  unsigned int nwords_2nd = 0;
320  unsigned int nwords_3rd = 0;
321  unsigned int nwords_4th = 0;
322 
323  int* buf1 = new int[nwords_1st];
324  int* buf2 = NULL;
325  int* buf3 = NULL;
326  int* buf4 = NULL;
327 
328  // filling buffers
329  for (unsigned int j = 0; j < nwords_1st; j++) {
330  buf1[j] = data_words[j];
331  }
332 
333  raw_svd->PackDetectorBuf(buf1, nwords_1st,
334  buf2, nwords_2nd,
335  buf3, nwords_3rd,
336  buf4, nwords_4th,
337  rawcprpacker_info);
338 
339  delete [] buf1;
340 
341  // ********************************************************
342 
343  } // end FADC loop
344 
345 
346  if (m_binPrintout) binPrintout(data_words.size());
347 
348  delete [] fadc_apv_matrix;
349 
350  n_basf2evt++;
351 
352 } // end event function
353 #ifndef __clang__
354 #pragma GCC diagnostic pop
355 #endif
356 
357 
359 {
360 }
361 
362 
364 {
365 }
366 
367 
368 
369 // function for printing 32-bit frames in binary mode
370 void SVDPackerModule::binPrintout(unsigned int nwords)
371 {
372 
373  B2INFO("\nbinary printout:");
374  for (unsigned int j = 0; j < nwords; j++) {
375 
376  uint32_t ulFlag = 1 << (sizeof(data_words[j]) * 8 - 1);
377  for (; ulFlag > 0; ulFlag >>= 1)
378  printf("%d", (data_words[j] & ulFlag) ? 1 : 0);
379 
380  cout << endl;
381  }
382 
383 }
384 
Belle2::RawCOPPERPackerInfo::tt_utime
unsigned int tt_utime
27bit clock ticks at trigger timing distributed by FTSW. For details, see Nakao-san's belle2link user...
Definition: RawCOPPERPackerInfo.h:28
Belle2::RawCOPPERPackerInfo
struct to contain header information used by RawCOPPERFormat::Packer()
Definition: RawCOPPERPackerInfo.h:12
Belle2::SVD::SVDPackerModule::APVHeader::fifoErr
unsigned int fifoErr
FIFO full Error.
Definition: SVDPackerModule.h:140
Belle2::DBAccessorBase::hasChanged
bool hasChanged()
Check whether the object has changed since the last call to hasChanged of the accessor).
Definition: DBAccessorBase.h:92
Belle2::SVD::SVDPackerModule::m_map
std::unique_ptr< SVDOnlineToOfflineMap > m_map
Pointer to online-to-offline map.
Definition: SVDPackerModule.h:92
Belle2::SVD::SVDPackerModule::m_binPrintout
bool m_binPrintout
if true, print data created by the Packer
Definition: SVDPackerModule.h:73
Belle2::RawCOPPERPackerInfo::exp_num
unsigned int exp_num
Experiment number (10bit)
Definition: RawCOPPERPackerInfo.h:16
Belle2::VxdID
Class to uniquely identify a any structure of the PXD and SVD.
Definition: VxdID.h:43
Belle2::SVD::SVDPackerModule::APVHeader::CMC2
unsigned int CMC2
Common Mode Noise after masking out particle signals.
Definition: SVDPackerModule.h:139
Belle2::RawCOPPERPackerInfo::node_id
unsigned int node_id
Event Number (32bit)
Definition: RawCOPPERPackerInfo.h:22
Belle2::SVD::SVDPackerModule::FADCTrailer::frameErrOR
unsigned int frameErrOR
Frame Error OR.
Definition: SVDPackerModule.h:173
Belle2::SVD::SVDPackerModule::data_B::sample4
unsigned int sample4
4th data sample
Definition: SVDPackerModule.h:160
Belle2::SVD::SVDPackerModule::APVHeader::check
unsigned int check
MSB "10" - for APV Header identification.
Definition: SVDPackerModule.h:146
Belle2::SVDModeByte::getTriggerBin
baseType getTriggerBin() const
Get the triggerBin id.
Definition: SVDModeByte.h:150
Belle2::SVD::SVDPackerModule::MainHeader::DAQType
unsigned int DAQType
(from 2020c) Event type(0): "0"…3 or …6 acquisition mode, "1"…3-mixed-6 acquisition mode
Definition: SVDPackerModule.h:130
Belle2::RawCOPPERPackerInfo::b2l_ctime
unsigned int b2l_ctime
32bit unitx time at trigger timing distributed by FTSW. For details, see Nakao-san's belle2link user ...
Definition: RawCOPPERPackerInfo.h:31
Belle2::SVD::SVDPackerModule::APVHeader::apvErr
unsigned int apvErr
APV Error.
Definition: SVDPackerModule.h:143
Belle2::SVD::SVDPackerModule::m_nodeid
int m_nodeid
Node ID.
Definition: SVDPackerModule.h:87
Belle2::SVD::SVDPackerModule::m_svdEventInfoName
std::string m_svdEventInfoName
SVDEventInfo name.
Definition: SVDPackerModule.h:71
Belle2::SVD::SVDPackerModule::data_A::sample2
unsigned int sample2
2nd data sample
Definition: SVDPackerModule.h:152
Belle2::SVD::SVDPackerModule::m_FADCTrailer
FADCTrailer m_FADCTrailer
Implementation of FADC Trailer.
Definition: SVDPackerModule.h:193
REG_MODULE
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Definition: Module.h:652
Belle2::SVD::SVDPackerModule::event
virtual void event() override
event
Definition: SVDPackerModule.cc:103
Belle2::SVD::SVDPackerModule::beginRun
virtual void beginRun() override
begin run
Definition: SVDPackerModule.cc:83
Belle2::SVD::SVDPackerModule::APVmap
std::unordered_multimap< unsigned char, unsigned char > * APVmap
pointer to APVforFADCmap filled by mapping procedure
Definition: SVDPackerModule.h:84
Belle2::RawSVD
The Raw SVD class Class for RawCOPPER class data taken by SVD Currently, this class is almost same as...
Definition: RawSVD.h:26
Belle2::SVD::SVDPackerModule::m_FADCTriggerNumberOffset
int m_FADCTriggerNumberOffset
FADC trigger numnber offset.
Definition: SVDPackerModule.h:201
Belle2::VxdID::getLadderNumber
baseType getLadderNumber() const
Get the ladder id.
Definition: VxdID.h:108
Belle2::SVDOnlineToOfflineMap::ChipInfo
Struct to hold data about an APV25 chip.
Definition: SVDOnlineToOfflineMap.h:155
Belle2::SVD::SVDPackerModule::m_svdShaperDigitListName
std::string m_svdShaperDigitListName
SVDShaperDigit StoreArray name.
Definition: SVDPackerModule.h:70
Belle2::SVD::SVDPackerModule::MainHeader::runType
unsigned int runType
Run Type.
Definition: SVDPackerModule.h:132
Belle2::SVD::SVDPackerModule::APVHeader::APVnum
unsigned int APVnum
APV chip number.
Definition: SVDPackerModule.h:145
Belle2::SVD::SVDPackerModule::FADCnumberMap
FADCmap FADCnumberMap
maps containing assignment (0,1,2,3,4,..,nFADCboards-1) <-> FADC numbers
Definition: SVDPackerModule.h:95
Belle2::SVD::SVDPackerModule::m_APVHeader
APVHeader m_APVHeader
Implementation of APV Header.
Definition: SVDPackerModule.h:190
Belle2::SVD::SVDPackerModule::addData32
void addData32(uint32_t adata32)
adds packed 32-bit data word to the raw data vector
Definition: SVDPackerModule.h:102
Belle2::SVD::SVDPackerModule::m_FTBTrailer
FTBTrailer m_FTBTrailer
Implementation of FTB Trailer.
Definition: SVDPackerModule.h:194
Belle2::SVDModeByte
Class to store SVD mode information.
Definition: SVDModeByte.h:79
Belle2::RawCOPPERPackerInfo::eve_num
unsigned int eve_num
Run # and subrun # ( 22bit )
Definition: RawCOPPERPackerInfo.h:20
Belle2::SVD::SVDPackerModule::APVHeader::CMC1
unsigned int CMC1
Common Mode Noise w/o masking out particle signals.
Definition: SVDPackerModule.h:138
Belle2::SVD::SVDPackerModule::FTBHeader::eventNumber
unsigned int eventNumber
FTB event number.
Definition: SVDPackerModule.h:120
Belle2::Module::getType
const std::string & getType() const
Returns the type of the module (i.e.
Definition: Module.cc:43
Belle2::SVDModeByte::getDAQMode
baseType getDAQMode() const
Get the daqMode id.
Definition: SVDModeByte.h:152
Belle2::SVD::SVDPackerModule::m_eventMetaDataPtr
StoreObjPtr< EventMetaData > m_eventMetaDataPtr
Required input for EventMetaData.
Definition: SVDPackerModule.h:197
Belle2::SVD::SVDPackerModule::data_B::sample6
unsigned int sample6
6th data sample
Definition: SVDPackerModule.h:162
Belle2::SVD::SVDPackerModule::m_data_A
data_A m_data_A
Implementation of 1st data word.
Definition: SVDPackerModule.h:191
Belle2::SVD::SVDPackerModule::data_A::sample3
unsigned int sample3
3rd data sample
Definition: SVDPackerModule.h:153
Belle2::SVD::SVDPackerModule::FADCTrailer::apvErrOR
unsigned int apvErrOR
APV chip number OR.
Definition: SVDPackerModule.h:175
Belle2::SVD::SVDPackerModule::~SVDPackerModule
virtual ~SVDPackerModule()
default destructor
Definition: SVDPackerModule.cc:67
Belle2::RawCOPPERPackerInfo::tt_ctime
unsigned int tt_ctime
Node ID (32bit)
Definition: RawCOPPERPackerInfo.h:25
Belle2::SVD::SVDPackerModule::data_A::check
unsigned int check
MSB "1" - for Data word identification.
Definition: SVDPackerModule.h:155
Belle2::SVD::SVDPackerModule::MainHeader::DAQMode
unsigned int DAQMode
Event type(2:1): "00"…1-sample, "01"…3-sample, "10"…6-sample.
Definition: SVDPackerModule.h:131
Belle2::SVDShaperDigit
The SVD ShaperDigit class.
Definition: SVDShaperDigit.h:46
Belle2::Module
Base class for Modules.
Definition: Module.h:74
Belle2::SVD::SVDPackerModule::data_A::stripNum
unsigned int stripNum
Strip number.
Definition: SVDPackerModule.h:154
Belle2::SVD::SVDPackerModule::data_B::check
unsigned int check
MSB "1" - for Data word identification.
Definition: SVDPackerModule.h:164
Belle2::SVDShaperDigit::APVFloatSamples
std::array< APVFloatSampleType, c_nAPVSamples > APVFloatSamples
array of APVFloatSampleType objects
Definition: SVDShaperDigit.h:63
Belle2::SVD::SVDPackerModule::n_basf2evt
int n_basf2evt
event number
Definition: SVDPackerModule.h:86
Belle2::SVD::SVDPackerModule::FADCTrailer::nullDigits
unsigned int nullDigits
"0000000"
Definition: SVDPackerModule.h:171
Belle2::SVD::SVDPackerModule::MainHeader::trgType
unsigned int trgType
Trigger Type.
Definition: SVDPackerModule.h:126
Belle2::SVD::SVDPackerModule::FADCTrailer::check
unsigned int check
MSB "1110" - for FADC Trailer identification.
Definition: SVDPackerModule.h:176
Belle2::SVD::SVDPackerModule::MainHeader::trgNumber
unsigned int trgNumber
Trigger Number.
Definition: SVDPackerModule.h:125
Belle2::SVD::SVDPackerModule::initialize
virtual void initialize() override
initialize
Definition: SVDPackerModule.cc:73
Belle2::SVD::SVDPackerModule::data_words
std::vector< uint32_t > data_words
vector of raw data words
Definition: SVDPackerModule.h:99
Belle2::SVD::SVDPackerModule::FADCTrailer::dataSizeCut
unsigned int dataSizeCut
APV data-size cut flag
Definition: SVDPackerModule.h:170
Belle2::SVD::SVDPackerModule::FTBTrailer::crc16
unsigned int crc16
FTB CRC16 Checksum
Definition: SVDPackerModule.h:181
Belle2::SVD::SVDPackerModule::APVHeader::detectErr
unsigned int detectErr
Detection Error.
Definition: SVDPackerModule.h:142
Belle2::SVD::SVDPackerModule::DataInfo::channel
unsigned short channel
APV channel number.
Definition: SVDPackerModule.h:112
Belle2::SVD::SVDPackerModule::APVHeader::frameErr
unsigned int frameErr
Frame Error.
Definition: SVDPackerModule.h:141
Belle2::SVD::SVDPackerModule::FADCTrailer::fifoErrOR
unsigned int fifoErrOR
FIFO full Error OR.
Definition: SVDPackerModule.h:172
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::RawCOPPERPackerInfo::run_subrun_num
unsigned int run_subrun_num
Experiment number (10bit)
Definition: RawCOPPERPackerInfo.h:18
Belle2::SVD::SVDPackerModule::binPrintout
void binPrintout(unsigned int nwords)
tool: print out N words
Definition: SVDPackerModule.cc:370
Belle2::SVD::SVDPackerModule::MainHeader::trgTiming
unsigned int trgTiming
Trigger Timing.
Definition: SVDPackerModule.h:127
Belle2::SVD::SVDPackerModule::MainHeader::FADCnum
unsigned int FADCnum
FADC number.
Definition: SVDPackerModule.h:129
Belle2::SVD::SVDPackerModule::FADCTrailer::FTBFlags
unsigned int FTBFlags
FTB Flags Field.
Definition: SVDPackerModule.h:169
Belle2::SVD
Namespace to encapsulate code needed for simulation and reconstrucion of the SVD.
Definition: GeoSVDCreator.h:35
Belle2::SVD::SVDPackerModule::MainHeader::xTalk
unsigned int xTalk
cross talk tag
Definition: SVDPackerModule.h:128
Belle2::SVD::SVDPackerModule::data_B::sample5
unsigned int sample5
5th data sample
Definition: SVDPackerModule.h:161
Belle2::SVDOnlineToOfflineMap::ChipInfo::fadc
unsigned short fadc
fadc number
Definition: SVDOnlineToOfflineMap.h:156
Belle2::SVD::SVDPackerModule::data_A::sample1
unsigned int sample1
1st data sample
Definition: SVDPackerModule.h:151
Belle2::SVD::SVDPackerModule::terminate
virtual void terminate() override
terminate
Definition: SVDPackerModule.cc:358
Belle2::VxdID::getSensorNumber
baseType getSensorNumber() const
Get the sensor id.
Definition: VxdID.h:110
Belle2::SVDModeByte::getRunType
baseType getRunType() const
Get the runMode id.
Definition: SVDModeByte.h:156
Belle2::SVD::SVDPackerModule::FADCTrailer::detectErrOR
unsigned int detectErrOR
Detection Error OR.
Definition: SVDPackerModule.h:174
Belle2::SVD::SVDPackerModule::nFADCboards
unsigned short nFADCboards
how many FADCs we have
Definition: SVDPackerModule.h:81
Belle2::SVDOnlineToOfflineMap::ChipInfo::apvChannel
unsigned char apvChannel
apv channel
Definition: SVDOnlineToOfflineMap.h:160
Belle2::SVD::SVDPackerModule::FTBTrailer::controlWord
unsigned int controlWord
MSB "ff55" - FADC Trailer ID.
Definition: SVDPackerModule.h:182
Belle2::SVD::SVDPackerModule::endRun
virtual void endRun() override
end run
Definition: SVDPackerModule.cc:363
Belle2::Module::addParam
void addParam(const std::string &name, T &paramVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module.
Definition: Module.h:562
Belle2::SVD::SVDPackerModule::m_MainHeader
MainHeader m_MainHeader
Implementation of FADC Header.
Definition: SVDPackerModule.h:189
Belle2::SVD::SVDPackerModule::FTBHeader::errorsField
unsigned int errorsField
FTB error fields.
Definition: SVDPackerModule.h:119
Belle2::SVD::SVDPackerModule::m_data_B
data_B m_data_B
Implementation of 2nd data word.
Definition: SVDPackerModule.h:192
Belle2::SVD::SVDPackerModule::m_mapping
DBObjPtr< PayloadFile > m_mapping
channel map payload
Definition: SVDPackerModule.h:90
Belle2::SVDOnlineToOfflineMap::ChipInfo::apv
unsigned char apv
apv number
Definition: SVDOnlineToOfflineMap.h:157
Belle2::SVD::SVDPackerModule::APVHeader::pipelineAddr
unsigned int pipelineAddr
Pipeline Address.
Definition: SVDPackerModule.h:144
Belle2::RawCOPPER::PackDetectorBuf
void PackDetectorBuf(int *detector_buf_1st, int nwords_1st, int *detector_buf_2nd, int nwords_2nd, int *detector_buf_3rd, int nwords_3rd, int *detector_buf_4th, int nwords_4th, RawCOPPERPackerInfo rawcprpacker_info)
Packer for RawCOPPER class Pack data (format ver.
Definition: RawCOPPER.cc:183
Belle2::SVD::SVDPackerModule::m_svdShaperDigit
StoreArray< SVDShaperDigit > m_svdShaperDigit
Required input for SVDShaperDigit.
Definition: SVDPackerModule.h:200
Belle2::SVD::SVDPackerModule::FADCnumberMapRev
FADCmap FADCnumberMapRev
maps containing assignment (0,1,2,3,4,..,nFADCboards-1) <-> FADC numbers
Definition: SVDPackerModule.h:97
Belle2::SVD::SVDPackerModule::DataInfo::data
short data[6]
6 samples
Definition: SVDPackerModule.h:111
Belle2::VxdID::getLayerNumber
baseType getLayerNumber() const
Get the layer id.
Definition: VxdID.h:106
Belle2::SVD::SVDPackerModule::data_B::stripNum
unsigned int stripNum
Strip number.
Definition: SVDPackerModule.h:163
Belle2::SVD::SVDPackerModule::m_FTBHeader
FTBHeader m_FTBHeader
Implementation of FTB Header.
Definition: SVDPackerModule.h:188
Belle2::SVD::SVDPackerModule::m_xmlFileName
static std::string m_xmlFileName
< xml filename
Definition: SVDPackerModule.h:89
Belle2::SVD::SVDPackerModule::m_rawSVD
StoreArray< RawSVD > m_rawSVD
output for RawSVD
Definition: SVDPackerModule.h:199
Belle2::SVD::SVDPackerModule::data32
uint32_t data32
Output 32-bit data word.
Definition: SVDPackerModule.h:187
Belle2::SVD::SVDPackerModule::m_rawSVDListName
std::string m_rawSVDListName
RawSVD StoreArray name.
Definition: SVDPackerModule.h:69
Belle2::SVD::SVDPackerModule::MainHeader::check
unsigned int check
MSB "110" - for FADC Header identification.
Definition: SVDPackerModule.h:133
Belle2::SVD::SVDPackerModule::m_svdEventInfoPtr
StoreObjPtr< SVDEventInfo > m_svdEventInfoPtr
SVDEventInfo from simulation.
Definition: SVDPackerModule.h:198