ATLAS Offline Software
Classes | Functions | Variables
doL1CaloHVCorrections Namespace Reference

Classes

class  HVCorrectionCalculator
 
class  HVCorrectionCOOLReader
 

Functions

def writeHVToSqlite (name, input_dict)
 

Variables

 parser
 configure options More...
 
 add_help_option
 
 action
 
 type
 
 dest
 
 default
 
 options
 
 args
 
 c1
 
 h_corrEmb_em
 
 h_corrFcalLowEta_had
 
 h_corrEmec_em
 
 h_corrFcalHighEta_had
 
 h_RefcorrEmb_em
 
 h_RefcorrFcalLowEta_had
 
 h_RefcorrEmec_em
 
 h_RefcorrFcalHighEta_had
 
 h_DiffcorrEmb_em
 
 h_DiffcorrFcalLowEta_had
 
 h_DiffcorrEmec_em
 
 h_DiffcorrFcalHighEta_had
 
 hv_input
 
 referenceCorrectionReader
 
 geometry_convertor
 
 correctionCalculator
 
 output_text
 initialise output .txt file More...
 
 channel_list
 
 receiver_list
 
 parts
 
 calculatedCorrections
 check if channel list is empty More...
 
 coolid
 
 eta_bin
 
 phi_bin
 
 num_layers
 retrieve num layers and layer names (from new or ref hv input) More...
 
 layer_names
 
 layer_corr
 retrieve hv corrections from new hv input More...
 
 predictedCorrection
 check if the channel has overall HV correction larger than the threshold More...
 
 referenceCorrection
 
 correctionDifference
 
 file
 

Function Documentation

◆ writeHVToSqlite()

def doL1CaloHVCorrections.writeHVToSqlite (   name,
  input_dict 
)

Definition at line 184 of file doL1CaloHVCorrections.py.

184 def writeHVToSqlite(name,input_dict):
185 
186  UNIX2COOL = 1000000000
187 
188  dbSvc = cool.DatabaseSvcFactory.databaseService()
189  connectString = 'sqlite://;schema='+name+';dbname=L1CALO'
190 
191  print ('\nrecreating database file:',name)
192  dbSvc.dropDatabase( connectString )
193  db = dbSvc.createDatabase( connectString )
194 
195  spec = cool.RecordSpecification()
196  spec.extend("factor", cool.StorageType.Float)
197  spec.extend("status", cool.StorageType.UInt32 )
198  folderSpec = cool.FolderSpecification(cool.FolderVersioning.SINGLE_VERSION, spec)
199 
200  now = int(time.time())
201 
202  since = now*UNIX2COOL
203 # since = 0
204 # until = sys.maxint
205  until = cool.ValidityKeyMax
206  db.createFolderSet('/TRIGGER')
207  db.createFolderSet('/TRIGGER/Receivers')
208  db.createFolderSet('/TRIGGER/Receivers/Factors')
209 
210  folder_description = '<timeStamp>time</timeStamp><addrHeader><address_header service_type="71" clid="1238547719"/></addrHeader><typeName>CondAttrListCollection</typeName>'
211  f = db.createFolder( "/TRIGGER/Receivers/Factors/HVCorrections", folderSpec, folder_description)
212 
213  print (" Now creating sqlite file for ", len(list(input_dict.keys())), " channels")
214  for i in list(input_dict.keys()):
215  data = cool.Record( spec )
216  data['factor'] = input_dict[i][0]
217  data['status'] = input_dict[i][1]
218  f.storeObject(since,until, data, int(i,16) )
219 
220  db.closeDatabase()
221 
222 

Variable Documentation

◆ action

doL1CaloHVCorrections.action

Definition at line 231 of file doL1CaloHVCorrections.py.

◆ add_help_option

doL1CaloHVCorrections.add_help_option

Definition at line 229 of file doL1CaloHVCorrections.py.

◆ args

doL1CaloHVCorrections.args

Definition at line 241 of file doL1CaloHVCorrections.py.

◆ c1

doL1CaloHVCorrections.c1

Definition at line 278 of file doL1CaloHVCorrections.py.

◆ calculatedCorrections

doL1CaloHVCorrections.calculatedCorrections

check if channel list is empty

loop over receivers

Definition at line 357 of file doL1CaloHVCorrections.py.

◆ channel_list

doL1CaloHVCorrections.channel_list

Definition at line 320 of file doL1CaloHVCorrections.py.

◆ coolid

doL1CaloHVCorrections.coolid

Definition at line 366 of file doL1CaloHVCorrections.py.

◆ correctionCalculator

doL1CaloHVCorrections.correctionCalculator

Definition at line 306 of file doL1CaloHVCorrections.py.

◆ correctionDifference

doL1CaloHVCorrections.correctionDifference

Definition at line 412 of file doL1CaloHVCorrections.py.

◆ default

doL1CaloHVCorrections.default

Definition at line 231 of file doL1CaloHVCorrections.py.

◆ dest

doL1CaloHVCorrections.dest

Definition at line 231 of file doL1CaloHVCorrections.py.

◆ eta_bin

doL1CaloHVCorrections.eta_bin

Definition at line 368 of file doL1CaloHVCorrections.py.

◆ file

doL1CaloHVCorrections.file

Definition at line 420 of file doL1CaloHVCorrections.py.

◆ geometry_convertor

doL1CaloHVCorrections.geometry_convertor

Definition at line 303 of file doL1CaloHVCorrections.py.

◆ h_corrEmb_em

doL1CaloHVCorrections.h_corrEmb_em

Definition at line 280 of file doL1CaloHVCorrections.py.

◆ h_corrEmec_em

doL1CaloHVCorrections.h_corrEmec_em

Definition at line 283 of file doL1CaloHVCorrections.py.

◆ h_corrFcalHighEta_had

doL1CaloHVCorrections.h_corrFcalHighEta_had

Definition at line 284 of file doL1CaloHVCorrections.py.

◆ h_corrFcalLowEta_had

doL1CaloHVCorrections.h_corrFcalLowEta_had

Definition at line 281 of file doL1CaloHVCorrections.py.

◆ h_DiffcorrEmb_em

doL1CaloHVCorrections.h_DiffcorrEmb_em

Definition at line 292 of file doL1CaloHVCorrections.py.

◆ h_DiffcorrEmec_em

doL1CaloHVCorrections.h_DiffcorrEmec_em

Definition at line 295 of file doL1CaloHVCorrections.py.

◆ h_DiffcorrFcalHighEta_had

doL1CaloHVCorrections.h_DiffcorrFcalHighEta_had

Definition at line 296 of file doL1CaloHVCorrections.py.

◆ h_DiffcorrFcalLowEta_had

doL1CaloHVCorrections.h_DiffcorrFcalLowEta_had

Definition at line 293 of file doL1CaloHVCorrections.py.

◆ h_RefcorrEmb_em

doL1CaloHVCorrections.h_RefcorrEmb_em

Definition at line 286 of file doL1CaloHVCorrections.py.

◆ h_RefcorrEmec_em

doL1CaloHVCorrections.h_RefcorrEmec_em

Definition at line 289 of file doL1CaloHVCorrections.py.

◆ h_RefcorrFcalHighEta_had

doL1CaloHVCorrections.h_RefcorrFcalHighEta_had

Definition at line 290 of file doL1CaloHVCorrections.py.

◆ h_RefcorrFcalLowEta_had

doL1CaloHVCorrections.h_RefcorrFcalLowEta_had

Definition at line 287 of file doL1CaloHVCorrections.py.

◆ hv_input

doL1CaloHVCorrections.hv_input

Definition at line 299 of file doL1CaloHVCorrections.py.

◆ layer_corr

doL1CaloHVCorrections.layer_corr

retrieve hv corrections from new hv input

Definition at line 394 of file doL1CaloHVCorrections.py.

◆ layer_names

doL1CaloHVCorrections.layer_names

Definition at line 381 of file doL1CaloHVCorrections.py.

◆ num_layers

doL1CaloHVCorrections.num_layers

retrieve num layers and layer names (from new or ref hv input)

Definition at line 379 of file doL1CaloHVCorrections.py.

◆ options

doL1CaloHVCorrections.options

Definition at line 241 of file doL1CaloHVCorrections.py.

◆ output_text

doL1CaloHVCorrections.output_text

initialise output .txt file

Definition at line 311 of file doL1CaloHVCorrections.py.

◆ parser

doL1CaloHVCorrections.parser

configure options

Definition at line 229 of file doL1CaloHVCorrections.py.

◆ parts

doL1CaloHVCorrections.parts

Definition at line 334 of file doL1CaloHVCorrections.py.

◆ phi_bin

doL1CaloHVCorrections.phi_bin

Definition at line 369 of file doL1CaloHVCorrections.py.

◆ predictedCorrection

doL1CaloHVCorrections.predictedCorrection

check if the channel has overall HV correction larger than the threshold

Definition at line 409 of file doL1CaloHVCorrections.py.

◆ receiver_list

doL1CaloHVCorrections.receiver_list

Definition at line 330 of file doL1CaloHVCorrections.py.

◆ referenceCorrection

doL1CaloHVCorrections.referenceCorrection

Definition at line 410 of file doL1CaloHVCorrections.py.

◆ referenceCorrectionReader

doL1CaloHVCorrections.referenceCorrectionReader

Definition at line 301 of file doL1CaloHVCorrections.py.

◆ type

doL1CaloHVCorrections.type

Definition at line 231 of file doL1CaloHVCorrections.py.

CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
doL1CaloHVCorrections.writeHVToSqlite
def writeHVToSqlite(name, input_dict)
Definition: doL1CaloHVCorrections.py:184
histSizes.list
def list(name, path='/')
Definition: histSizes.py:38