Skip to content
Snippets Groups Projects
Commit c64120f2 authored by Shaun Roe's avatar Shaun Roe Committed by Walter Lampl
Browse files

main-cppcheck-ZdcRec

main-cppcheck-ZdcRec
parent 9e6539e8
No related branches found
No related tags found
No related merge requests found
/*
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
*/
/*
......@@ -13,18 +13,19 @@
#ifndef ZDCRECNOISETOOL_H_
#define ZDCRECNOISETOOL_H_
#include <string>
#include <map>
#include "AthenaBaseComps/AthAlgTool.h"
#include "GaudiKernel/ToolHandle.h"
#include "ZdcEvent/ZdcRawChannelCollection.h"
#include <string>
#include <memory>
class IInterface;
class InterfaceID;
class StatusCode;
//class Identifier;
class ZdcDigitsCollection;
......@@ -50,13 +51,10 @@ public:
private:
//ZdcRawChannelCollection m_ChannelCollection;
//unsigned int m_nsamples;
std::string m_pedestalDir;
std::string m_pedestalFile;
ZdcDigitsCollection* m_pedestalData{};
std::unique_ptr<ZdcDigitsCollection> m_pedestalData{};
};
......
/*
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
*/
/*
......@@ -21,12 +21,10 @@
#include <vector>
#include <map>
//#include "Identifier/HWIdentifier.h"
#include "GaudiKernel/IInterface.h"
#include "GaudiKernel/MsgStream.h"
//#include "ZdcIdentifier/ZdcID.h"
#include "ZdcEvent/ZdcDigits.h"
#include "ZdcEvent/ZdcDigitsCollection.h"
#include "ZdcRec/ZdcRecNoiseTool.h"
......@@ -70,7 +68,7 @@ ZdcRecNoiseTool::~ZdcRecNoiseTool()
//==================================================================================================
int ZdcRecNoiseTool::readPedestals()
{
m_pedestalData = new ZdcDigitsCollection;
m_pedestalData = std::make_unique<ZdcDigitsCollection>();
int nsamples = 0;
int i = 0;
......@@ -118,7 +116,7 @@ return i;
int ZdcRecNoiseTool::writePedestals()
{
//remove this
m_pedestalData = new ZdcDigitsCollection;
m_pedestalData = std::make_unique<ZdcDigitsCollection>();
int nsamples = 0;
int i = 0;
......
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