Belle II Software  release-06-01-15
InspectRawTOP Class Reference
Inheritance diagram for InspectRawTOP:
Collaboration diagram for InspectRawTOP:

Public Member Functions

def swap32 (self, x)
 
def event (self)
 

Detailed Description

 Print summary of raw data given in Interim FE format 

Definition at line 21 of file checkInterimFEData.py.

Member Function Documentation

◆ event()

def event (   self)
 Event processor 

Definition at line 32 of file checkInterimFEData.py.

32  def event(self):
33  ''' Event processor '''
34 
35  rawTOPs = Belle2.PyStoreArray('RawTOPs')
36  if rawTOPs.getEntries() == 0:
37  print('RawTOP is empty - maybe component ID was not set properly at DAQ')
38  indx = 0
39  for raw in rawTOPs:
40  expno = raw.GetExpNo(0)
41  runno = raw.GetRunNo(0)
42  subno = raw.GetSubRunNo(0)
43  eveno = raw.GetEveNo(0)
44  copper = raw.GetNodeID(0) & 0x00FFFFFF
45  print('RawTOP[' + str(indx) + ']:',
46  'COPPER=' + str(copper),
47  'EXP=' + str(expno),
48  'RUN=' + str(runno),
49  'SUBRUN=' + str(subno),
50  'EVENT=' + str(eveno))
51  indx = indx + 1
52  for finesse in range(4):
53  size = raw.GetDetectorNwords(0, finesse)
54  if size == 0:
55  print(' HLSB', str(finesse),
56  ': size =', str(size), 'words')
57  continue
58  data = raw.GetDetectorBuffer(0, finesse)
59  scrod = self.swap32(data[0]) & 0x0FFF
60  numFE = 0
61  numWF = 0
62  numPoz = 0
63  numNeg = 0
64  for i in range(size):
65  word = self.swap32(data[i])
66  k = 0
67  if word == 0xaaaa0100:
68  numFE = numFE + 1
69  k = i + 4
70  elif word == 0xaaaa0103:
71  numFE = numFE + 1
72  numWF = numWF + 1
73  k = i + 4
74  if k > 0 and k < size - 6:
75  if self.swap32(data[k]) != 0xd8f1ffff:
76  numPoz = numPoz + 1
77  if self.swap32(data[k + 6]) != 0x270fffff:
78  numNeg = numNeg + 1
79  print(' HLSB', str(finesse),
80  ': size =', str(size), 'words,',
81  'SCROD', str(scrod) + ',',
82  'FE headers=' + str(numFE),
83  'signalsPoz=' + str(numPoz),
84  'signalsNeg=' + str(numNeg),
85  'Waveforms=' + str(numWF))
86  print()
87 
88 
89 # Create path
a (simplified) python wrapper for StoreArray.
Definition: PyStoreArray.h:56

◆ swap32()

def swap32 (   self,
  x 
)
' Swap bytes 

Definition at line 24 of file checkInterimFEData.py.


The documentation for this class was generated from the following file: