Skip to content
Snippets Groups Projects
Commit c902ae9f authored by Frank Winklmeier's avatar Frank Winklmeier
Browse files

Merge branch 'AddMonitoring' into 'main'

Add CPU monitoring to new HGTD Clusterization Alg with new EDM

See merge request !71665
parents e8bfb59c 58629f49
No related branches found
No related tags found
29 merge requests!78241Draft: FPGATrackSim: GenScan code refactor,!78236Draft: Switching Streams https://its.cern.ch/jira/browse/ATR-27417,!78056AFP monitoring: new synchronization and cleaning,!78041AFP monitoring: new synchronization and cleaning,!77990Updating TRT chip masks for L1TRT trigger simulation - ATR-28372,!77733Draft: add new HLT NN JVT, augmented with additional tracking information,!77731Draft: Updates to ZDC reconstruction,!77728Draft: updates to ZDC reconstruction,!77522Draft: sTGC Pad Trigger Emulator,!76725ZdcNtuple: Fix cppcheck warning.,!76611L1CaloFEXByteStream: Fix out-of-bounds array accesses.,!76475Punchthrough AF3 implementation in FastG4,!76474Punchthrough AF3 implementation in FastG4,!76343Draft: MooTrackBuilder: Recalibrate NSW hits in refine method,!75729New implementation of ZDC nonlinear FADC correction.,!75703Draft: Update to HI han config for HLT jets,!75184Draft: Update file heavyions_run.config,!74430Draft: Fixing upper bound for Delayed Jet Triggers,!73963Changing the path of the histograms to "Expert" area,!73875updating ID ART reference plots,!73874AtlasCLHEP_RandomGenerators: Fix cppcheck warnings.,!73449Add muon detectors to DarkJetPEBTLA partial event building,!73343Draft: [TrigEgamma] Add photon ringer chains on bootstrap mechanism,!72336Fixed TRT calibration crash,!72176Draft: Improving L1TopoOnline chain that now gets no-empty plots. Activating it by default,!72012Draft: Separate JiveXMLConfig.py into Config files,!71876Fix MET trigger name in MissingETMonitoring,!71820Draft: Adding new TLA End-Of-Fill (EOF) chains and removing obsolete DIPZ chains,!71665Add CPU monitoring to new HGTD Clusterization Alg with new EDM
......@@ -23,10 +23,16 @@ def ActsHgtdClusterizationAlgCfg(flags,
from HGTD_GeoModel.HGTD_GeoModelConfig import HGTD_ReadoutGeometryCfg
acc.merge(HGTD_ReadoutGeometryCfg(flags))
kwargs.setdefault('RDOContainerName', 'HGTD_RDOs')
kwargs.setdefault('ClusterContainerName', 'HGTD_Clusters')
if 'ClusteringTool' not in kwargs:
kwargs.setdefault('ClusteringTool', acc.popToolsAndMerge(ActsHgtdClusteringToolCfg(flags)))
kwargs.setdefault('RDOContainerName', 'HGTD_RDOs')
kwargs.setdefault('ClusterContainerName', 'HGTD_Clusters')
if flags.Acts.doMonitoring and 'MonTool' not in kwargs:
from ActsConfig.ActsMonitoringConfig import ActsHgtdClusterizationMonitoringToolCfg
kwargs.setdefault('MonTool', acc.popToolsAndMerge(ActsHgtdClusterizationMonitoringToolCfg(flags)))
acc.addEventAlgo(CompFactory.ActsTrk.HgtdClusterizationAlg(name, **kwargs))
return acc
......
......@@ -4,6 +4,7 @@
#include "HgtdClusterizationAlg.h"
#include "HGTD_ReadoutGeometry/HGTD_DetectorElement.h"
#include "AthenaMonitoringKernel/Monitored.h"
namespace ActsTrk {
......@@ -16,6 +17,8 @@ namespace ActsTrk {
{
ATH_MSG_DEBUG("Initializing " << name() << " ...");
ATH_CHECK(m_clusteringTool.retrieve());
ATH_CHECK(m_monTool.retrieve(EnableTool{not m_monTool.empty()}));
ATH_CHECK(m_rdoContainerKey.initialize());
ATH_CHECK(m_clusterContainerKey.initialize());
......@@ -25,6 +28,10 @@ namespace ActsTrk {
StatusCode HgtdClusterizationAlg::execute(const EventContext& ctx) const
{
ATH_MSG_DEBUG("Executing " << name() << " ...");
auto timer = Monitored::Timer<std::chrono::milliseconds>( "TIME_execute" );
auto mon = Monitored::Group( m_monTool, timer );
SG::ReadHandle<HGTD_RDO_Container> rdoContainer = SG::makeHandle(m_rdoContainerKey, ctx);
if (!rdoContainer.isValid()) {
......@@ -33,7 +40,8 @@ namespace ActsTrk {
}
SG::WriteHandle<xAOD::HGTDClusterContainer> clusterContainer = SG::makeHandle(m_clusterContainerKey, ctx);
ATH_CHECK(clusterContainer.record(std::make_unique<xAOD::HGTDClusterContainer>(),std::make_unique<xAOD::HGTDClusterAuxContainer>()));
ATH_CHECK(clusterContainer.record(std::make_unique<xAOD::HGTDClusterContainer>(),
std::make_unique<xAOD::HGTDClusterAuxContainer>()));
for (const auto rdoCollection : *rdoContainer) {
if (rdoCollection->empty()) {
......@@ -43,9 +51,7 @@ namespace ActsTrk {
ATH_CHECK(m_clusteringTool->clusterize(*rdoCollection, ctx, *clusterContainer));
}
ATH_MSG_DEBUG("Executing HgtdClusterizationAlg...");
return StatusCode::SUCCESS;
}
......
......@@ -14,7 +14,7 @@
#include "StoreGate/ReadHandleKey.h"
#include "StoreGate/WriteHandleKey.h"
#include "xAODInDetMeasurement/HGTDClusterContainer.h"
#include "AthenaMonitoringKernel/GenericMonitoringTool.h"
namespace ActsTrk {
......@@ -29,18 +29,12 @@ public:
private:
ToolHandle< IHGTDClusteringTool > m_clusteringTool {this, "ClusteringTool", "", "The Clustering Tool"};
ToolHandle< GenericMonitoringTool > m_monTool {this, "MonTool", "", "Monitoring tool"};
SG::ReadHandleKey<HGTD_RDO_Container> m_rdoContainerKey{this, "RDOContainerName", "", "Name of the HGTD_RDO container"};
SG::WriteHandleKey<xAOD::HGTDClusterContainer> m_clusterContainerKey{this, "ClusterContainerName", "", "Name of the HGTD cluster container"};
SG::WriteHandleKey<xAOD::HGTDClusterContainer> m_clusterContainerKey{this, "ClusterContainerName", "", "Name of the HGTD cluster container"};
};
} // namespace ActsTrk
#endif
......
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