SND@LHC Software
Loading...
Searching...
No Matches
run_Monitoring Namespace Reference

Functions

 pyExit ()
 
 currentRun ()
 

Variables

 parser = ArgumentParser()
 
 dest
 
 help
 
 default
 
 False
 
 action
 
 type
 
 int
 
 required
 
 str
 
 None
 
 options = parser.parse_args()
 
 slowStream
 
 startTime
 
 dashboard
 
 monitorTag
 
 geoFile
 
 online
 
str curRun = ""
 
 runNumber
 
str lastRun = curRun
 
 partition
 
 rawDataPath = "/eos/experiment/sndlhc/raw_data/physics/2025/run_251"
 
str runDir = rawDataPath+"run_"+str(options.runNumber).zfill(6)
 
str jname = "run_timestamps.json"
 
 dirlist = str( subprocess.check_output("xrdfs "+os.environ['EOSSHIP']+" ls "+runDir,shell=True) )
 
 status
 
 jsonStr
 
list FairTasks = []
 
bool houghTransform = False
 
 muon_reco_task = SndlhcMuonReco.MuonReco()
 
 trackTask = SndlhcTracking.Tracking()
 
 M = Monitor.Monitoring(options,FairTasks)
 
 nEvents
 
 postScale
 
dict monitorTasks = {}
 
list process = []
 
int pid = 0
 
 nstart = i*dN
 
 nstop = nstart + dN
 
 dN = options.nEvents//options.parallel
 
dict Tcounter = {'Monitor':0}
 
 tic = time.perf_counter_ns()
 
 event = M.GetEvent(n)
 
 toc = time.perf_counter_ns()
 
str txt = ''
 
 exit_code
 
str tmp = 'tmp'+str(options.runNumber)+'p'+str(i)
 
str name = 'run'+self.runNr+'.root'
 
 presenterFile
 
int N0 = 0
 
 lastPart = tmp[len(tmp)-1]
 
 nLast = options.nEvents
 
 nStart = nLast-options.Nlast
 
 lastFile = M.converter.fiN.GetName()
 
 newEntries = M.GetEntries()
 
 fiN
 

Function Documentation

◆ currentRun()

run_Monitoring.currentRun ( )

Definition at line 104 of file run_Monitoring.py.

104def currentRun():
105 with client.File() as f:
106 f.open(options.server+options.dashboard)
107 status, L = f.read()
108 Lcrun = L.decode().split('\n')
109 f.close()
110 curRun,curPart,start ="","",""
111 X=eval(Lcrun[0])
112 if not (X['state']=='running'):
113 print("DAQ not running.",X)
114 else:
115 curRun = 'run_'+str(X['run_number']).zfill(6)
116 curFile = X['currently_written_file']
117 k = curFile.rfind('data_')+5
118 curPart = int(curFile[k:k+4])
119 start = X['start_time']
120 # assume monitor file always present on DAQ server
121 if options.slowStream: options.monitorTag = 'monitoring_'
122 else: options.monitorTag = ''
123 return curRun,curPart,start
124

◆ pyExit()

run_Monitoring.pyExit ( )

Definition at line 13 of file run_Monitoring.py.

13def pyExit():
14 print("Make suicide until solution found for freezing")
15 os.system('kill '+str(os.getpid()))

Variable Documentation

◆ action

run_Monitoring.action

Definition at line 25 of file run_Monitoring.py.

◆ curRun

str run_Monitoring.curRun = ""

Definition at line 129 of file run_Monitoring.py.

◆ dashboard

run_Monitoring.dashboard

Definition at line 74 of file run_Monitoring.py.

◆ default

run_Monitoring.default

Definition at line 25 of file run_Monitoring.py.

◆ dest

run_Monitoring.dest

Definition at line 25 of file run_Monitoring.py.

◆ dirlist

run_Monitoring.dirlist = str( subprocess.check_output("xrdfs "+os.environ['EOSSHIP']+" ls "+runDir,shell=True) )

Definition at line 160 of file run_Monitoring.py.

◆ dN

run_Monitoring.dN = options.nEvents//options.parallel

Definition at line 219 of file run_Monitoring.py.

◆ event

run_Monitoring.event = M.GetEvent(n)

Definition at line 233 of file run_Monitoring.py.

◆ exit_code

run_Monitoring.exit_code

Definition at line 256 of file run_Monitoring.py.

◆ FairTasks

list run_Monitoring.FairTasks = []

Definition at line 171 of file run_Monitoring.py.

◆ False

run_Monitoring.False

Definition at line 25 of file run_Monitoring.py.

◆ fiN

run_Monitoring.fiN

Definition at line 342 of file run_Monitoring.py.

◆ geoFile

run_Monitoring.geoFile

Definition at line 89 of file run_Monitoring.py.

◆ help

run_Monitoring.help

Definition at line 25 of file run_Monitoring.py.

◆ houghTransform

bool run_Monitoring.houghTransform = False

Definition at line 172 of file run_Monitoring.py.

◆ int

run_Monitoring.int

Definition at line 34 of file run_Monitoring.py.

◆ jname

str run_Monitoring.jname = "run_timestamps.json"

Definition at line 159 of file run_Monitoring.py.

◆ jsonStr

run_Monitoring.jsonStr

Definition at line 164 of file run_Monitoring.py.

◆ lastFile

str run_Monitoring.lastFile = M.converter.fiN.GetName()

Definition at line 301 of file run_Monitoring.py.

◆ lastPart

str run_Monitoring.lastPart = tmp[len(tmp)-1]

Definition at line 297 of file run_Monitoring.py.

◆ lastRun

str run_Monitoring.lastRun = curRun

Definition at line 136 of file run_Monitoring.py.

◆ M

run_Monitoring.M = Monitor.Monitoring(options,FairTasks)

Definition at line 183 of file run_Monitoring.py.

◆ monitorTag

run_Monitoring.monitorTag

Definition at line 75 of file run_Monitoring.py.

◆ monitorTasks

dict run_Monitoring.monitorTasks = {}

Definition at line 188 of file run_Monitoring.py.

◆ muon_reco_task

run_Monitoring.muon_reco_task = SndlhcMuonReco.MuonReco()

Definition at line 174 of file run_Monitoring.py.

◆ N0

int run_Monitoring.N0 = 0

Definition at line 296 of file run_Monitoring.py.

◆ name

str run_Monitoring.name = 'run'+self.runNr+'.root'

Definition at line 267 of file run_Monitoring.py.

◆ nEvents

run_Monitoring.nEvents

Definition at line 184 of file run_Monitoring.py.

◆ newEntries

run_Monitoring.newEntries = M.GetEntries()

Definition at line 322 of file run_Monitoring.py.

◆ nLast

run_Monitoring.nLast = options.nEvents

Definition at line 298 of file run_Monitoring.py.

◆ None

run_Monitoring.None

Definition at line 42 of file run_Monitoring.py.

◆ nstart

run_Monitoring.nstart = i*dN

Definition at line 209 of file run_Monitoring.py.

◆ nStart

run_Monitoring.nStart = nLast-options.Nlast

Definition at line 299 of file run_Monitoring.py.

◆ nstop

run_Monitoring.nstop = nstart + dN

Definition at line 209 of file run_Monitoring.py.

◆ online

run_Monitoring.online

Definition at line 126 of file run_Monitoring.py.

◆ options

run_Monitoring.options = parser.parse_args()

Definition at line 70 of file run_Monitoring.py.

◆ parser

run_Monitoring.parser = ArgumentParser()

Definition at line 24 of file run_Monitoring.py.

◆ partition

run_Monitoring.partition

Definition at line 137 of file run_Monitoring.py.

◆ pid

run_Monitoring.pid = 0

Definition at line 206 of file run_Monitoring.py.

◆ postScale

run_Monitoring.postScale

Definition at line 185 of file run_Monitoring.py.

◆ presenterFile

run_Monitoring.presenterFile

Definition at line 270 of file run_Monitoring.py.

◆ process

list run_Monitoring.process = []

Definition at line 205 of file run_Monitoring.py.

◆ rawDataPath

str run_Monitoring.rawDataPath = "/eos/experiment/sndlhc/raw_data/physics/2025/run_251"

Definition at line 143 of file run_Monitoring.py.

◆ required

run_Monitoring.required

Definition at line 35 of file run_Monitoring.py.

◆ runDir

str run_Monitoring.runDir = rawDataPath+"run_"+str(options.runNumber).zfill(6)

Definition at line 158 of file run_Monitoring.py.

◆ runNumber

run_Monitoring.runNumber

Definition at line 135 of file run_Monitoring.py.

◆ slowStream

run_Monitoring.slowStream

Definition at line 71 of file run_Monitoring.py.

◆ startTime

run_Monitoring.startTime

Definition at line 73 of file run_Monitoring.py.

◆ status

run_Monitoring.status

Definition at line 164 of file run_Monitoring.py.

◆ str

run_Monitoring.str

Definition at line 42 of file run_Monitoring.py.

◆ Tcounter

dict run_Monitoring.Tcounter = {'Monitor':0}

Definition at line 225 of file run_Monitoring.py.

◆ tic

run_Monitoring.tic = time.perf_counter_ns()

Definition at line 232 of file run_Monitoring.py.

◆ tmp

run_Monitoring.tmp = 'tmp'+str(options.runNumber)+'p'+str(i)

Definition at line 262 of file run_Monitoring.py.

◆ toc

run_Monitoring.toc = time.perf_counter_ns()

Definition at line 234 of file run_Monitoring.py.

◆ trackTask

run_Monitoring.trackTask = SndlhcTracking.Tracking()

Definition at line 179 of file run_Monitoring.py.

◆ txt

str run_Monitoring.txt = ''

Definition at line 248 of file run_Monitoring.py.

◆ type

run_Monitoring.type

Definition at line 26 of file run_Monitoring.py.