ATLAS Offline Software
Functions | Variables
python.slimHLTBSFile Namespace Reference

Functions

def hi16 (word)
 
def lo16 (word)
 
def reducedLARFEB (data)
 
def reducedTILE (data)
 
def modify (event)
 

Variables

 input_file
 
 output_file
 
 input
 
 dr
 
 output
 
 core_name
 
 run_number
 
 trigger_type
 
 detector_mask
 
 beam_type
 
 beam_energy
 
 tmp_file_name
 

Function Documentation

◆ hi16()

def python.slimHLTBSFile.hi16 (   word)

Definition at line 21 of file slimHLTBSFile.py.

21 def hi16(word):
22  return (word&0xffff0000)>>16
23 

◆ lo16()

def python.slimHLTBSFile.lo16 (   word)

Definition at line 24 of file slimHLTBSFile.py.

24 def lo16(word):
25  return word&0xffff
26 

◆ modify()

def python.slimHLTBSFile.modify (   event)

Definition at line 55 of file slimHLTBSFile.py.

55 def modify(event):
56  new_event=eformat.write.FullEventFragment()
57  new_event.copy_header(event)
58  for rob in event:
59  newrob=eformat.write.ROBFragment(rob)
60  if rob.source_id().human_detector()=='TDAQ_CALO_PREPROC':
61  continue
62  if rob.source_id().human_detector()=='TDAQ_LVL2':
63  continue
64  if rob.source_id().human_detector()=='TDAQ_EVENT_FILTER':
65  continue
66  if rob.source_id().human_group()=="TILECAL":
67  data = rob.rod_data()
68  newdata=reducedTILE(data)
69  newrob.rod_data(newdata)
70 
71  if rob.source_id().human_group()=="LAR" and rob.rod_minor_version()==11:
72  #should check that it really is physics format
73  data = rob.rod_data()
74  newdata=reducedLARFEB(data)
75  if len(data)>data[0]:
76  newdata+=[data[data[0]+ii] for ii in range(7)] #middle "ROD" header
77  data=data[data[0]+7:]
78  newdata+=reducedLARFEB(data)
79  newrob.rod_data(newdata)
80  new_event.append(newrob)
81  return new_event.readonly()
82 

◆ reducedLARFEB()

def python.slimHLTBSFile.reducedLARFEB (   data)

Definition at line 27 of file slimHLTBSFile.py.

27 def reducedLARFEB(data):
28  sizeenergy=lo16(data[3])
29  offenergy=hi16(data[3])
30  nsamples=lo16(data[7])
31  radd=(nsamples+1)//2
32  total=18-8+83+radd+3
33  if total>data[0] or sizeenergy==0:
34  return [data[ii] for ii in range(data[0])]
35  newdata=[data[ii] for ii in range(total-3)+range(data[0]-3,data[0])] #one should actually recalculate checksum
36  newdata[0]=total
37  newdata[3]=(18<<16)+83+radd
38  newdata[4]=0 #no quality
39  newdata[5]=0 #no samples
40  for ii in range(offenergy,offenergy+9):
41  newdata[ii]=0 #zero masks
42  return newdata
43 

◆ reducedTILE()

def python.slimHLTBSFile.reducedTILE (   data)

Definition at line 44 of file slimHLTBSFile.py.

44 def reducedTILE(data):
45  idx=0
46  newdata=[]
47  while idx<len(data):
48  size=data[idx+1]
49  type=data[idx+2]>>16&0xff
50  if type>1:
51  newdata+=[data[ii] for ii in range(idx,idx+size)]
52  idx+=size
53  return newdata
54 

Variable Documentation

◆ beam_energy

python.slimHLTBSFile.beam_energy

Definition at line 97 of file slimHLTBSFile.py.

◆ beam_type

python.slimHLTBSFile.beam_type

Definition at line 96 of file slimHLTBSFile.py.

◆ core_name

python.slimHLTBSFile.core_name

Definition at line 92 of file slimHLTBSFile.py.

◆ detector_mask

python.slimHLTBSFile.detector_mask

Definition at line 95 of file slimHLTBSFile.py.

◆ dr

python.slimHLTBSFile.dr

Definition at line 91 of file slimHLTBSFile.py.

◆ input

python.slimHLTBSFile.input

Definition at line 90 of file slimHLTBSFile.py.

◆ input_file

python.slimHLTBSFile.input_file

Definition at line 87 of file slimHLTBSFile.py.

◆ output

python.slimHLTBSFile.output

Definition at line 92 of file slimHLTBSFile.py.

◆ output_file

python.slimHLTBSFile.output_file

Definition at line 88 of file slimHLTBSFile.py.

◆ run_number

python.slimHLTBSFile.run_number

Definition at line 93 of file slimHLTBSFile.py.

◆ tmp_file_name

python.slimHLTBSFile.tmp_file_name

Definition at line 100 of file slimHLTBSFile.py.

◆ trigger_type

python.slimHLTBSFile.trigger_type

Definition at line 94 of file slimHLTBSFile.py.

python.slimHLTBSFile.reducedLARFEB
def reducedLARFEB(data)
Definition: slimHLTBSFile.py:27
python.slimHLTBSFile.hi16
def hi16(word)
Definition: slimHLTBSFile.py:21
plotBeamSpotVxVal.range
range
Definition: plotBeamSpotVxVal.py:195
python.slimHLTBSFile.reducedTILE
def reducedTILE(data)
Definition: slimHLTBSFile.py:44
python.slimHLTBSFile.lo16
def lo16(word)
Definition: slimHLTBSFile.py:24
python.slimHLTBSFile.modify
def modify(event)
Definition: slimHLTBSFile.py:55