CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Functions
PCLHPbeamspot_custom Namespace Reference

Functions

def customise_HPbeamspot
 

Detailed Description

_Utils_

Tools to customise the PCL workflow which computes beamspot from a dedicated express-like stream

Function Documentation

def PCLHPbeamspot_custom.customise_HPbeamspot (   process)

Definition at line 8 of file PCLHPbeamspot_custom.py.

8 
9 def customise_HPbeamspot(process):
10 
11  # write to sqlite the HP tag and use the HP medatata for uploading it to the dropbox
12  # ByLumi
13  if ( hasattr(process,'PoolDBOutputService') and
14  hasattr(process,'pclMetadataWriter') and
15  hasattr(process,'ALCAHARVESTBeamSpotByLumi') ):
16  for onePset in process.PoolDBOutputService.toPut:
17  if onePset.record == 'BeamSpotObjectsRcdByLumi':
18  onePset.record = 'BeamSpotObjectsRcdHPByLumi'
19  onePset.tag = 'BeamSpotObjectHP_ByLumi'
20  for onePset in process.pclMetadataWriter.recordsToMap:
21  if onePset.record == 'BeamSpotObjectsRcdByLumi':
22  onePset.record = 'BeamSpotObjectsRcdHPByLumi'
23  if process.ALCAHARVESTBeamSpotByLumi.AlcaBeamSpotHarvesterParameters.outputRecordName == 'BeamSpotObjectsRcdByLumi':
24  process.ALCAHARVESTBeamSpotByLumi.AlcaBeamSpotHarvesterParameters.outputRecordName = 'BeamSpotObjectsRcdHPByLumi'
25  process.ALCAHARVESTBeamSpotByLumi.AlcaBeamSpotHarvesterParameters.DumpTxt = True
26  # ByRun
27  if ( hasattr(process,'PoolDBOutputService') and
28  hasattr(process,'pclMetadataWriter') and
29  hasattr(process,'ALCAHARVESTBeamSpotByRun') ):
30  for onePset in process.PoolDBOutputService.toPut:
31  if onePset.record == 'BeamSpotObjectsRcdByRun':
32  onePset.record = 'BeamSpotObjectsRcdHPByRun'
33  onePset.tag = 'BeamSpotObjectHP_ByRun'
34  for onePset in process.pclMetadataWriter.recordsToMap:
35  if onePset.record == 'BeamSpotObjectsRcdByRun':
36  onePset.record = 'BeamSpotObjectsRcdHPByRun'
37  if process.ALCAHARVESTBeamSpotByRun.AlcaBeamSpotHarvesterParameters.outputRecordName == 'BeamSpotObjectsRcdByRun':
38  process.ALCAHARVESTBeamSpotByRun.AlcaBeamSpotHarvesterParameters.outputRecordName = 'BeamSpotObjectsRcdHPByRun'
39 
40  # ALCARECOTkAlMinBiasTkAlDQM is part of the ALCARECO sequence we want and needs caloJets
41  # which are not available when running tracking only reco => remove it from the sequence
42  if hasattr(process,'ALCARECOTkAlMinBiasDQM') and 'ALCARECOTkAlMinBiasTkAlDQM' in process.ALCARECOTkAlMinBiasDQM.moduleNames() :
43  process.ALCARECOTkAlMinBiasDQM.remove(process.ALCARECOTkAlMinBiasTkAlDQM)
44 
45  return process