Skip to content
Snippets Groups Projects
Commit 2cb6b60b authored by scott snyder's avatar scott snyder
Browse files

TileSimAlgs: Switch to using TileDQstatusAlg.

Change from (MT-unsafe) TileBeamInfoProvider to using TileDQstatusAlg
for TileDigitsMaker.
parent e436c112
9 merge requests!58791DataQualityConfigurations: Modify L1Calo config for web display,!46784MuonCondInterface: Enable thread-safety checking.,!46776Updated LArMonitoring config file for WD to match new files produced using MT,!45405updated ART test cron job,!42417Draft: DIRE and VINCIA Base Fragments for Pythia 8.3,!28528Revert 63f845ae,!27054Atr20369 210,!26342Monopole: Handle fractionally charged particles,!20167TileRecUtils, etc: Switch to using TileDQstatusAlg.
......@@ -34,6 +34,8 @@
#include "TileConditions/TileCondToolEmscale.h"
#include "TileConditions/TileCondToolNoiseSample.h"
#include "TileConditions/ITileBadChanTool.h"
#include "TileEvent/TileDQstatus.h"
#include "TileRecUtils/ITileDQstatusTool.h"
// Atlas includes
#include "AthenaBaseComps/AthAlgorithm.h"
......@@ -56,7 +58,6 @@ class TileHWID;
class TileInfo;
class HWIdentifier;
class TileCablingService;
class TileBeamInfoProvider;
class TileDQstatus;
#include <string>
......@@ -168,8 +169,11 @@ class TileDigitsMaker: public AthAlgorithm {
ToolHandle<ITileBadChanTool> m_tileBadChanTool{this,
"TileBadChanTool", "TileBadChanTool", "Tile bad channel tool"};
ToolHandle<TileBeamInfoProvider> m_beamInfo; //!< tool which provides DQstatus (for overlay)
ToolHandle<ITileDQstatusTool> m_DQstatusTool { this,
"TileDQstatusTool", "TileDQstatusTool", "Tool to create TileDQstatus" };
SG::WriteHandleKey<TileDQstatus> m_DQstatusKey {this,
"TileDQstatus", "TileDQstatus", "Output TileDQstatus key" };
};
#endif // TILESIMALGS_TILEDIGITSMAKER_H
......@@ -65,7 +65,6 @@ class TileInfo;
class TileCablingService;
class TileEvent;
class TileDQstatus;
class TileBeamInfoProvider;
class TileRawChannelBuilderMF;
#include <string>
......@@ -142,8 +141,6 @@ class TilePulseForTileMuonReceiver: public AthAlgorithm {
ToolHandle<ITileBadChanTool> m_tileBadChanTool{this,
"TileBadChanTool", "TileBadChanTool", "Tile bad channel tool"};
ToolHandle<TileBeamInfoProvider> m_beamInfo; //!< tool which provides DQstatus (for overlay)
ToolHandle<TileRawChannelBuilderMF> m_MuRcvBuildTool; //!< tool to set up the reconstruction algorithm
bool m_run2;
......
......@@ -195,6 +195,8 @@ if doTileDigitToRawChannel:
if jobproperties.TileRecFlags.doTileOpt2():
print TileRawChannelBuilderOpt2Filter
from TileRecUtils.TileDQstatusAlgDefault import TileDQstatusAlgDefault
dqstatus = TileDQstatusAlgDefault()
if not hasattr( ToolSvc, "TileBeamInfoProvider" ):
from TileRecUtils.TileRecUtilsConf import TileBeamInfoProvider
......@@ -206,6 +208,7 @@ ToolSvc.TileBeamInfoProvider.TileBeamElemContainer=""; # disable reading of trig
ToolSvc.TileBeamInfoProvider.TileDigitsContainer=""; # disable checking of Digits container size for bi-gain mode
ToolSvc.TileBeamInfoProvider.TileRawChannelContainer=""; # disable checking of DQstatus for simulated data
#
include( "TileSimAlgs/TileSamplingFraction_jobOptions.py" )
......
......@@ -122,5 +122,8 @@ ToolSvc.TileBeamInfoProvider.TileBeamElemContainer=""; # disable reading of trig
ToolSvc.TileBeamInfoProvider.TileDigitsContainer=""; # disable checking of Digits container size for bi-gain mode
ToolSvc.TileBeamInfoProvider.TileRawChannelContainer=""; # disable checking of DQstatus for simulated data
from TileRecUtils.TileDQstatusAlgDefault import TileDQstatusAlgDefault
dqstatus = TileDQstatusAlgDefault()
#
include( "TileSimAlgs/TileSamplingFraction_jobOptions.py" )
......@@ -128,5 +128,8 @@ ToolSvc.TileBeamInfoProvider.TileBeamElemContainer=""; # disable reading of trig
ToolSvc.TileBeamInfoProvider.TileDigitsContainer=""; # disable checking of Digits container size for bi-gain mode
ToolSvc.TileBeamInfoProvider.TileRawChannelContainer=""; # disable checking of DQstatus for simulated data
from TileRecUtils.TileDQstatusAlgDefault import TileDQstatusAlgDefault
dqstatus = TileDQstatusAlgDefault()
#
include( "TileSimAlgs/TileSamplingFraction_jobOptions.py" )
......@@ -25,7 +25,6 @@
#include "TileConditions/TileCablingService.h"
#include "TileConditions/TilePulseShapes.h"
#include "TileEvent/TileRawChannelContainer.h"
#include "TileRecUtils/TileBeamInfoProvider.h"
// Calo includes
#include "CaloIdentifier/TileID.h"
......@@ -38,6 +37,7 @@
#include "AthenaKernel/Units.h"
#include "StoreGate/ReadHandle.h"
#include "StoreGate/WriteHandle.h"
#include "GaudiKernel/ThreadLocalContext.h"
// Pile up
#include "PileUpTools/PileUpMergeSvc.h"
......@@ -88,8 +88,7 @@ TileDigitsMaker::TileDigitsMaker(std::string name, ISvcLocator* pSvcLocator)
m_binTime0Lo(0),
m_timeStepLo(0.0),
m_pHRengine(0),
m_rndmSvc ("AtRndmGenSvc", name),
m_beamInfo("TileBeamInfoProvider/TileBeamInfoProvider")
m_rndmSvc ("AtRndmGenSvc", name)
{
declareProperty("FilterThreshold", m_filterThreshold = 100.0 * MeV, "Threshold on filtered digits (default - 100 MeV)");
declareProperty("FilterThresholdMBTS", m_filterThresholdMBTS = 0.0 * MeV, "Threshold on filtered digits of MBTS (default - 0 MeV)");
......@@ -223,11 +222,13 @@ StatusCode TileDigitsMaker::initialize() {
ATH_MSG_INFO( "PileUpMergeSvc successfully initialized");
ATH_MSG_DEBUG( "Retrieving TileBeamInfoProvider in TileDigitsMaker");
ATH_CHECK( m_beamInfo.retrieve() );
ATH_CHECK( m_DQstatusTool.retrieve() );
ATH_CHECK( m_DQstatusKey.initialize() );
} else {
m_beamInfo.disable();
m_DQstatusTool.disable();
m_DQstatusKey = "";
if (m_allChannels<0) m_allChannels = 0; // do not create all channels by default
if (m_tileNoise || m_tileCoherNoise) m_allChannels = 2; // unless noise is set to True
if (msgLvl(MSG::INFO)) {
......@@ -357,6 +358,8 @@ StatusCode TileDigitsMaker::initialize() {
StatusCode TileDigitsMaker::execute() {
ATH_MSG_DEBUG( "Executing TileDigitsMaker");
const EventContext& ctx = Gaudi::Hive::currentContext();
static bool first = (msgLvl(MSG::VERBOSE) && !m_rndmEvtOverlay );
if (first) {
ATH_MSG_VERBOSE( "Dumping 2G noise parameters");
......@@ -518,10 +521,16 @@ StatusCode TileDigitsMaker::execute() {
rndm_rawchan_container = iTzeroRawChanCont->second;
}
ATH_MSG_DEBUG( "setContainer method being called in TileDigitsMaker");
m_beamInfo->setContainers(rndm_digit_container, rndm_rawchan_container);
ATH_MSG_DEBUG( "Containers successfully set in TileBeamInfoProvider");
m_DQstatus = m_beamInfo->getDQstatus();
auto dqStatus = std::make_unique<TileDQstatus>();
ATH_CHECK( m_DQstatusTool->makeStatus (ctx,
rndm_rawchan_container,
rndm_digit_container,
nullptr, // TileBeamElemContainer
*dqStatus) );
m_DQstatus = dqStatus.get();
ATH_CHECK( SG::makeHandle (m_DQstatusKey, ctx).record (std::move (dqStatus)) );
}
// iterate over all collections in a container
......
......@@ -38,7 +38,6 @@
#include "TileCalibBlobObjs/TileCalibUtils.h"
#include "TileRecUtils/TileRawChannelBuilder.h"
#include "TileRecUtils/TileRawChannelBuilderMF.h"
#include "TileRecUtils/TileBeamInfoProvider.h"
// Calo includes
#include "CaloIdentifier/TileID.h"
......@@ -77,7 +76,6 @@ TilePulseForTileMuonReceiver::TilePulseForTileMuonReceiver(std::string name, ISv
, m_timeStep(0.0)
, m_pHRengine(0)
, m_rndmSvc("AtRndmGenSvc", name)
, m_beamInfo("TileBeamInfoProvider/TileBeamInfoProvider")
, m_MuRcvBuildTool("TileRawChannelBuilderMF")
, m_run2(true)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment