Belle II Software  release-05-02-19
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 13 of file checkInterimFEData.py.

Member Function Documentation

◆ event()

def event (   self)
Event processor 

Definition at line 24 of file checkInterimFEData.py.

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

◆ swap32()

def swap32 (   self,
  x 
)
' Swap bytes 

Definition at line 16 of file checkInterimFEData.py.


The documentation for this class was generated from the following file:
ClusterEfficiency.ClusterEfficiency.event
def event(self)
Definition: ClusterEfficiency.py:146
Belle2::PyStoreArray
a (simplified) python wrapper for StoreArray.
Definition: PyStoreArray.h:58