SND@LHC Software
Loading...
Searching...
No Matches
DAQ_monitoring.DAQ_boards Class Reference
Inheritance diagram for DAQ_monitoring.DAQ_boards:
Collaboration diagram for DAQ_monitoring.DAQ_boards:

Public Member Functions

 Init (self, options, monitor)
 
 ExecuteEvent (self, event)
 
 Plot (self)
 

Public Attributes

 M
 
 R
 

Detailed Description

Definition at line 6 of file DAQ_monitoring.py.

Member Function Documentation

◆ ExecuteEvent()

DAQ_monitoring.DAQ_boards.ExecuteEvent (   self,
  event 
)

Definition at line 23 of file DAQ_monitoring.py.

23 def ExecuteEvent(self,event):
24 h = self.M.h
25 W = self.M.Weight
26 mult = {'scifi': [0]*100,'mufi': [0]*100}
27 for aHit in event.Digi_ScifiHits:
28 daq = self.R.daqChannel(aHit)
29 boardN = int(daq["board"].split('_')[1])
30 mult['scifi'][boardN] += 1
31 for aHit in event.Digi_MuFilterHits:
32 allChannels = self.M.map2Dict(aHit,'GetAllSignals')
33 for c in allChannels:
34 daq = self.R.daqChannel(aHit,c)
35 boardN = int(daq["board"][0].split('_')[1])
36 mult['mufi'][boardN] += 1
37 # check for a scifi board with more than 10hits to have unbiased info for others
38 bTriggered = []
39 for b in range(len(mult['scifi'])):
40 if mult['scifi'][b]>10:
41 bTriggered.append(b)
42 trigger = -1
43 if len(bTriggered)>0:
44 trigger = bTriggered[int(ROOT.gRandom.Rndm()*len(bTriggered))]
45 for x in mult:
46 for b in range(len(mult[x])):
47 rc = h[x+'board'].Fill(b,mult[x][b])
48 if trigger >0 and not b==trigger: rc = h[x+'board0'].Fill(b,mult[x][b],W)
49

◆ Init()

DAQ_monitoring.DAQ_boards.Init (   self,
  options,
  monitor 
)

Definition at line 8 of file DAQ_monitoring.py.

8 def Init(self,options,monitor):
9 self.M = monitor
10 h = self.M.h
11 ut.bookHist(h,'scifiboard','scifi hits per board; board id',100,-0.5,99.5,100,0.5,500.)
12 ut.bookHist(h,'mufiboard','mufi hits per board; board id',100,-0.5,99.5,100,0.5,500.)
13 ut.bookHist(h,'scifiboard0','scifi hits per board, unbiased; board id',100,-0.5,99.5,100,0.5,500.)
14 ut.bookHist(h,'mufiboard0','mufi hits per board, unbiased; board id',100,-0.5,99.5,100,0.5,500.)
16 runNr = str(options.runNumber).zfill(6)
17 if options.online:
18 self.R.Init(options.server+options.path+'run_'+ runNr+'/')
19 else:
20 if options.rawDataPath: self.R.Init(options.server+options.rawDataPath+"run_"+runNr+'/')
21 elif options.path.find('commissioning')>0 and options.path.find('test')<0: self.R.Init(options.server+options.path.replace("convertedData","raw_data")+"/data/run_"+runNr+'/')
22 else: self.R.Init(options.server+options.path.replace("convertedData","raw_data")+"/run_"+runNr+'/')

◆ Plot()

DAQ_monitoring.DAQ_boards.Plot (   self)

Definition at line 50 of file DAQ_monitoring.py.

50 def Plot(self):
51 h = self.M.h
52 ut.bookCanvas(h,'boardmaps',' ',1024,768,2,3)
53 h['boardmaps'].cd(1)
54 h['scifiboard'].Draw('colz')
55 h['boardmaps'].cd(2)
56 h['mufiboard'].Draw('colz')
57 h['boardmaps'].cd(3)
58 h['scifiboard0'].Draw('colz')
59 h['boardmaps'].cd(4)
60 h['mufiboard0'].Draw('colz')
61 h['boardmaps'].cd(5)
62 h['scifiboard0'].ProfileX().Draw()
63 h['boardmaps'].cd(6)
64 h['mufiboard0'].ProfileX().Draw()
65 self.M.myPrint(h['boardmaps'],'boardmaps',subdir='daq/expert')
66

Member Data Documentation

◆ M

DAQ_monitoring.DAQ_boards.M

Definition at line 9 of file DAQ_monitoring.py.

◆ R

DAQ_monitoring.DAQ_boards.R

Definition at line 15 of file DAQ_monitoring.py.


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