Skip to content
Snippets Groups Projects
Commit ad0d1034 authored by Shaun Roe's avatar Shaun Roe Committed by Frank Winklmeier
Browse files

main-coverity-JetToolHelpers

main-coverity-JetToolHelpers
parent 834f773b
No related branches found
No related tags found
28 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,!71823main-coverity-JetToolHelpers
......@@ -5,16 +5,17 @@
#ifndef JETTOOLHELPERS_INPUTVARIABLE_H
#define JETTOOLHELPERS_INPUTVARIABLE_H
#include <cmath>
#include <memory>
#include <functional>
#include "JetToolHelpers/JetContext.h" //used here
#include "xAODJet/Jet.h" //used here
#include "AthContainers/AuxElement.h" //member variable
#include "JetAnalysisInterfaces/IInputVariable.h"//inheritance
#include <memory> //std::unique_ptr
#include <functional> //std::function
#include <string>
#include <optional>
#include <stdexcept> //std::runtime_error
#include "JetToolHelpers/JetContext.h"
#include "xAODJet/Jet.h"
#include "AthContainers/AuxElement.h"
#include "JetAnalysisInterfaces/IInputVariable.h"
namespace JetHelper {
......
......@@ -5,19 +5,18 @@
#ifndef JETTOOLHELPERS_VARTOOL_H
#define JETTOOLHELPERS_VARTOOL_H
#include <cmath>
#include <memory>
#include <functional>
#include <string>
#include "JetToolHelpers/JetContext.h"
#include "JetToolHelpers/InputVariable.h"
#include "xAODJet/Jet.h"
#include "AthContainers/AuxElement.h"
#include "AsgTools/AsgTool.h"
#include "JetAnalysisInterfaces/IVarTool.h"
#include "AsgTools/AsgTool.h" //inheritance
#include "JetAnalysisInterfaces/IVarTool.h" //inheritance
#include "AsgTools/PropertyWrapper.h"
#include <memory> //unique_ptr
#include <string>
namespace JetHelper {
/// Class VarTool
......
......@@ -7,15 +7,16 @@
*
*/
#include <iostream>
#include "JetToolHelpers/InputVariable.h"
#include <cmath> //std::abs
#include <iostream> //std::cerr
namespace JetHelper{
InputVariable::InputVariable(const std::string& name, std::function<float(const xAOD::Jet& jet, const JetContext& jc)> func):
InputVariable(name)
{
m_customFunction = func;
m_customFunction = std::move(func);
}
std::unique_ptr<InputVariable> InputVariable::createVariable(const std::string& name, const std::string& type, const bool isJetVar) {
......
......@@ -2,30 +2,24 @@
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
*/
#include <iostream>
#include <fstream>
#include <stdio.h>
#include "JetToolHelpers/VarTool.h"
namespace JetHelper {
VarTool::VarTool(const std::string& name)
: asg::AsgTool(name)
{
}
StatusCode VarTool::initialize()
{
m_v = InputVariable::createVariable(m_name,m_type,m_isJetVar);
m_v->setScale(m_scale);
if (! bool(m_v) ) {
ATH_MSG_ERROR(" could not create Jet Variable "<< m_name << " type: "<< m_type );
return StatusCode::FAILURE;
VarTool::VarTool(const std::string& name)
: asg::AsgTool(name)
{
}
StatusCode VarTool::initialize()
{
m_v = InputVariable::createVariable(m_name,m_type,m_isJetVar);
if (not m_v ) {
ATH_MSG_ERROR(" could not create Jet Variable "<< m_name << " type: "<< m_type );
return StatusCode::FAILURE;
}
m_v->setScale(m_scale);
return StatusCode::SUCCESS;
}
return StatusCode::SUCCESS;
}
} //namespace JetHelper
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