Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:14:22

0001 """
0002 _Utils_
0003 
0004 Tools to customise the PCL workflow which computes beamspot from a dedicated express-like stream
0005 
0006 """
0007 
0008 def customise_HPbeamspot(process):
0009 
0010     # write to sqlite the HP tag and use the HP medatata for uploading it  to the dropbox
0011     # ByLumi
0012     if ( hasattr(process,'PoolDBOutputService')   and
0013          hasattr(process,'pclMetadataWriter')     and
0014          hasattr(process,'ALCAHARVESTBeamSpotByLumi')  ):
0015         for onePset in process.PoolDBOutputService.toPut:
0016             if onePset.record == 'BeamSpotObjectsRcdByLumi':
0017                 onePset.record = 'BeamSpotObjectsRcdHPByLumi'
0018                 onePset.tag    = 'BeamSpotObjectHP_ByLumi'
0019         for onePset in process.pclMetadataWriter.recordsToMap:
0020             if onePset.record == 'BeamSpotObjectsRcdByLumi':
0021                 onePset.record = 'BeamSpotObjectsRcdHPByLumi'
0022         if process.ALCAHARVESTBeamSpotByLumi.AlcaBeamSpotHarvesterParameters.outputRecordName == 'BeamSpotObjectsRcdByLumi':
0023             process.ALCAHARVESTBeamSpotByLumi.AlcaBeamSpotHarvesterParameters.outputRecordName = 'BeamSpotObjectsRcdHPByLumi'
0024             process.ALCAHARVESTBeamSpotByLumi.AlcaBeamSpotHarvesterParameters.DumpTxt = True
0025     # ByRun
0026     if ( hasattr(process,'PoolDBOutputService')   and
0027          hasattr(process,'pclMetadataWriter')     and
0028          hasattr(process,'ALCAHARVESTBeamSpotByRun')  ):
0029         for onePset in process.PoolDBOutputService.toPut:
0030             if onePset.record == 'BeamSpotObjectsRcdByRun':
0031                 onePset.record = 'BeamSpotObjectsRcdHPByRun'
0032                 onePset.tag    = 'BeamSpotObjectHP_ByRun'
0033         for onePset in process.pclMetadataWriter.recordsToMap:
0034             if onePset.record == 'BeamSpotObjectsRcdByRun':
0035                 onePset.record = 'BeamSpotObjectsRcdHPByRun'
0036         if process.ALCAHARVESTBeamSpotByRun.AlcaBeamSpotHarvesterParameters.outputRecordName == 'BeamSpotObjectsRcdByRun':
0037             process.ALCAHARVESTBeamSpotByRun.AlcaBeamSpotHarvesterParameters.outputRecordName = 'BeamSpotObjectsRcdHPByRun'
0038 
0039     # ALCARECOTkAlMinBiasTkAlDQM is part of the ALCARECO sequence we want and needs caloJets
0040     # which are not available when running tracking only reco => remove it from the sequence
0041     if hasattr(process,'ALCARECOTkAlMinBiasDQM') and 'ALCARECOTkAlMinBiasTkAlDQM' in process.ALCARECOTkAlMinBiasDQM.moduleNames() :
0042         process.ALCARECOTkAlMinBiasDQM.remove(process.ALCARECOTkAlMinBiasTkAlDQM)
0043 
0044     return process