diff --git a/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecPreProcessing.py b/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecPreProcessing.py index 6129e4206c120fccbe1e3f885e3f68052843fbe3..fa9eed27346b6ba5a25f78eba546695f7b1ea841 100755 --- a/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecPreProcessing.py +++ b/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecPreProcessing.py @@ -14,9 +14,15 @@ #EF_SCTRDOKey="SCT_RDOs" #EF_TRTRDOKey="TRT_RDOs" + EF_PixRDOKey="PixelRDOs_EF" EF_SCTRDOKey="SCT_RDOs_EF" EF_TRTRDOKey="TRT_RDOs_EF" +from TriggerJobOpts.TriggerFlags import TriggerFlags +if not TriggerFlags.doTransientByteStream(): + EF_PixRDOKey="PixelRDOs" + + from AthenaCommon.Logging import logging log = logging.getLogger("EFID") @@ -45,6 +51,7 @@ class PixelClustering_EF( InDet__Pixel_TrgClusterization ): Decoder = InDetTrigPixelRodDecoder) ToolSvc += InDetTrigPixelRawDataProviderTool + from InDetTrigRawDataProvider.InDetTrigRawDataProviderConf import InDet__TrigPixRawDataProvider InDetTrigPixRawDataProvider = \ @@ -82,7 +89,8 @@ class PixelClustering_EF( InDet__Pixel_TrgClusterization ): self.clusteringTool = InDetTrigMergedPixelsTool self.gangedAmbiguitiesFinder = InDetTrigPixelGangedAmbiguitiesFinder self.Pixel_RDOContainerName = EF_PixRDOKey - + self.skipBSDecoding = not TriggerFlags.doTransientByteStream() + from InDetTrigRecExample.InDetTrigSliceSettings import InDetTrigSliceSettings self.EtaHalfWidth = InDetTrigSliceSettings[('etaHalfWidth',type)] self.PhiHalfWidth = InDetTrigSliceSettings[('phiHalfWidth',type)] diff --git a/InnerDetector/InDetTrigRecAlgs/InDetTrigPrepRawDataFormat/InDetTrigPrepRawDataFormat/Pixel_TrgClusterization.h b/InnerDetector/InDetTrigRecAlgs/InDetTrigPrepRawDataFormat/InDetTrigPrepRawDataFormat/Pixel_TrgClusterization.h index edc513dc45becb1b0998f33965c2aae2beec3435..4a63e5e44d38a969d10864fe07d6423d3fc5c83a 100755 --- a/InnerDetector/InDetTrigRecAlgs/InDetTrigPrepRawDataFormat/InDetTrigPrepRawDataFormat/Pixel_TrgClusterization.h +++ b/InnerDetector/InDetTrigRecAlgs/InDetTrigPrepRawDataFormat/InDetTrigPrepRawDataFormat/Pixel_TrgClusterization.h @@ -133,7 +133,7 @@ namespace InDet { ServiceHandle m_bsErrorSvc; ServiceHandle m_robDataProvider; //!< ROB Data Provide Service bool m_doTimeOutChecks; //check global timer - + bool m_skipBSDecoding; //option to skip BS decoding in MC // Timing TrigTimer *m_timerRegSel; diff --git a/InnerDetector/InDetTrigRecAlgs/InDetTrigPrepRawDataFormat/src/Pixel_TrgClusterization.cxx b/InnerDetector/InDetTrigRecAlgs/InDetTrigPrepRawDataFormat/src/Pixel_TrgClusterization.cxx index f02ac46123a8b9a2b072c00f008c0bbaa0ac6fc2..a4c1c3b9a7c810ae9361a8ca8f228792a237df10 100755 --- a/InnerDetector/InDetTrigRecAlgs/InDetTrigPrepRawDataFormat/src/Pixel_TrgClusterization.cxx +++ b/InnerDetector/InDetTrigRecAlgs/InDetTrigPrepRawDataFormat/src/Pixel_TrgClusterization.cxx @@ -69,7 +69,8 @@ namespace InDet{ m_phiHalfWidth(0.1), m_bsErrorSvc("PixelByteStreamErrorsSvc",name), m_robDataProvider("ROBDataProviderSvc", name), - m_doTimeOutChecks(true) + m_doTimeOutChecks(true), + m_skipBSDecoding(false) { // Get parameter values from jobOptions file declareProperty("DetectorManagerName", m_managerName); @@ -85,6 +86,7 @@ namespace InDet{ declareProperty("Pixel_RDOContainerName", m_pixelRDOContainerName); declareProperty("RawDataProvider", m_rawDataProvider); declareProperty("doTimeOutChecks", m_doTimeOutChecks); + declareProperty("skipBSDecoding", m_skipBSDecoding); declareMonitoredVariable("numPixClusters", m_numPixClusters ); declareMonitoredVariable("numPixIds", m_numPixIds ); @@ -348,7 +350,6 @@ namespace InDet{ //------------------------------------------------------------------------- //handling of decoding problems - StatusCode scdec = StatusCode::SUCCESS; m_bsErrorSvc->resetCounts(); @@ -390,21 +391,6 @@ namespace InDet{ ATH_MSG_DEBUG( "REGTEST:" << *roi ); - - if(doTiming()) m_timerDecoder->start(); - scdec = m_rawDataProvider->decode(roi); - if(doTiming()) m_timerDecoder->stop(); - - - // Get the Pixel RDO's: - // - First get the Pixel ID's using the RegionSelector - // - Retrieve from SG the RDOContainer: - // Identifiable Container that contains pointers to all the RDO - // collections (one collection per detector) - // - Retrieve from StoreGate the RDO collections. - // (the ByteStreamConvertors are called here). - - if (!(roi->isFullscan())){ if(doTiming()) m_timerRegSel->start(); m_regionSelector->DetHashIDList( PIXEL, *roi, m_listOfPixIds); @@ -414,42 +400,55 @@ namespace InDet{ if(doTiming()) m_timerRegSel->stop(); } - - - if (scdec.isSuccess()){ - //check for recoverable errors - - int n_err_total = 0; - - int bsErrors[IPixelByteStreamErrorsSvc::lastErrType+1]; + + if (!m_skipBSDecoding){ + StatusCode scdec = StatusCode::SUCCESS; + if(doTiming()) m_timerDecoder->start(); + scdec = m_rawDataProvider->decode(roi); + if(doTiming()) m_timerDecoder->stop(); + + // Get the Pixel RDO's: + // - First get the Pixel ID's using the RegionSelector + // - Retrieve from SG the RDOContainer: + // Identifiable Container that contains pointers to all the RDO + // collections (one collection per detector) + // - Retrieve from StoreGate the RDO collections. + // (the ByteStreamConvertors are called here). - for (size_t idx = 0; idx<=size_t(IPixelByteStreamErrorsSvc::lastErrType); idx++){ - int n_errors = m_bsErrorSvc->getNumberOfErrors(idx); - n_err_total += n_errors; - bsErrors[idx] = n_errors; - } - - - ATH_MSG_DEBUG( "decoding errors: " << n_err_total ); - - if (n_err_total){ - for (size_t idx = 0; idx<=size_t(IPixelByteStreamErrorsSvc::lastErrType); idx++){ - // m_PixBSErr.push_back(bsErrors[idx]); - if (bsErrors[idx]) - m_PixBSErr.push_back(idx); - if(msgLvl(MSG::DEBUG)) - msg(MSG::DEBUG) << " " << bsErrors[idx]; + + if (scdec.isSuccess()){ + //check for recoverable errors + + int n_err_total = 0; + + int bsErrors[IPixelByteStreamErrorsSvc::lastErrType+1]; + + for (const auto idx : { IPixelByteStreamErrorsSvc::firstErrType , IPixelByteStreamErrorsSvc::lastErrType } ){ + int n_errors = m_bsErrorSvc->getNumberOfErrors(idx); + n_err_total += n_errors; + bsErrors[idx] = n_errors; } - } - ATH_MSG_DEBUG( "" ); - - } else { - ATH_MSG_DEBUG( " m_rawDataProvider->decode failed" ); + + ATH_MSG_DEBUG( "decoding errors: " << n_err_total ); + + if (n_err_total){ + for (const auto idx : { IPixelByteStreamErrorsSvc::firstErrType , IPixelByteStreamErrorsSvc::lastErrType } ){ + if (bsErrors[idx]) + m_PixBSErr.push_back(idx); + if(msgLvl(MSG::DEBUG)) + msg(MSG::DEBUG) << " " << bsErrors[idx]; + } + } + ATH_MSG_DEBUG( "" ); + + } else { + ATH_MSG_DEBUG( " m_rawDataProvider->decode failed" ); + } } - + if(doTiming()) m_timerSGate->resume(); - PixelRDO_Container* p_pixelRDOContainer; + const PixelRDO_Container* p_pixelRDOContainer = nullptr; if (store()->retrieve(p_pixelRDOContainer, m_pixelRDOContainerName).isFailure() ) { ATH_MSG_WARNING( "Could not find the PixelRDO_Container " << m_pixelRDOContainerName ); @@ -466,6 +465,7 @@ namespace InDet{ } if(doTiming()) m_timerSGate->pause(); + ATH_MSG_VERBOSE("Size of " << m_pixelRDOContainerName << ":" << p_pixelRDOContainer->size()); if (!(roi->isFullscan())){ @@ -542,8 +542,6 @@ namespace InDet{ PixelRDO_Container::const_iterator rdoCollections = p_pixelRDOContainer->begin(); PixelRDO_Container::const_iterator rdoCollectionsEnd = p_pixelRDOContainer->end(); - AtlasDetectorID detType; - if(doTiming()) m_timerCluster->resume(); for(; rdoCollections!=rdoCollectionsEnd; ++rdoCollections){ diff --git a/Trigger/TrigAlgorithms/TrigL2SiTrackFinder/python/TrigL2SiTrackFinder_Config.py b/Trigger/TrigAlgorithms/TrigL2SiTrackFinder/python/TrigL2SiTrackFinder_Config.py index 78f12d07bd1f77afa0b2080215b66a0dc388b6b7..1faa8db8372fbab265922be250e54c21d8aa2e1a 100755 --- a/Trigger/TrigAlgorithms/TrigL2SiTrackFinder/python/TrigL2SiTrackFinder_Config.py +++ b/Trigger/TrigAlgorithms/TrigL2SiTrackFinder/python/TrigL2SiTrackFinder_Config.py @@ -10,12 +10,13 @@ from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig from TrigInDetTrackFitter.TrigInDetTrackFitterConf import TrigL2ResidualCalculator from TrigInDetRecoTools.TrigInDetRecoTools_Config import TrigL2PattRecoStrategyFactory +from TriggerJobOpts.TriggerFlags import TriggerFlags strFactory = TrigL2PattRecoStrategyFactory() from AthenaCommon.AppMgr import ToolSvc -ospTool = ConfiguredOnlineSpacePointProviderTool(doBS=True) +ospTool = ConfiguredOnlineSpacePointProviderTool(doBS=TriggerFlags.doTransientByteStream()) trtTool = TrigTRT_TrackExtensionTool(OfflineClusters=False, PtCut=2500.0) trackFitter = TrigInDetTrackFitter(OfflineClusters=False) resCalc = TrigL2ResidualCalculator(OfflineClusters=False) diff --git a/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerFlags.py b/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerFlags.py index 45bf97b427af17b9b92ba45e71d906d0cf9388d8..42b7d6d0fdb9f3b65c5ffcc90d8450dda6af3ac6 100644 --- a/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerFlags.py +++ b/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerFlags.py @@ -320,6 +320,16 @@ class useOfflineSpacePoints(JobProperty): _flags.append(useOfflineSpacePoints) +class doTransientByteStream(JobProperty): + """ switch off usage of the transient bytestream + and access RDO objects directly. Partial implementation. + """ + statusOn=True + allowedType=['bool'] + StoredValue=True + +_flags.append(doTransientByteStream) + class doNtuple(JobProperty): """ """ statusOn=True