Skip to content
Snippets Groups Projects
Commit ea9eea71 authored by Shaun Roe's avatar Shaun Roe
Browse files

solve cppcheck warnings

parent c94191d6
No related branches found
No related tags found
No related merge requests found
Pipeline #3703810 passed
......@@ -12,7 +12,7 @@
#include "CLHEP/Random/RandGaussZiggurat.h"
#include "PathResolver/PathResolver.h"
#include "CLHEP/Units/SystemOfUnits.h"
#include "InDetIdentifier/PixelID.h"
#include <cmath>
#include <cstdint>
......@@ -78,14 +78,14 @@ StatusCode PixelDistortionAlg::execute() {
writeCdo -> setVersion(moduleData->getDistortionVersion());
std::string file_name = moduleData->getDistortionFileName();
if (file_name.empty()) {
ATH_MSG_ERROR("Distortion filename is empty not found! No pixel distortion will be applied.");
return StatusCode::FAILURE;
}
if (file_name[0] != '/') {
PathResolver::find_file(moduleData->getDistortionFileName(), "DATAPATH");
if (file_name.empty()) {
ATH_MSG_ERROR("Distortion file " << moduleData->getDistortionFileName() << " not found! No pixel distortion will be applied.");
return StatusCode::FAILURE;
}
}
std::ifstream input(file_name.c_str());
std::ifstream input(file_name);
if (!input.good()) {
ATH_MSG_ERROR("Cannot open " << file_name);
return StatusCode::FAILURE;
......
......@@ -20,11 +20,13 @@
#include "PixelConditionsData/PixelModuleData.h"
#include "PixelConditionsData/PixelDistortionData.h"
#include "InDetIdentifier/PixelID.h"
#include "AthenaKernel/IAthRNGSvc.h"
#include "Gaudi/Property.h"
class PixelID;
class PixelDistortionAlg : public AthAlgorithm {
public:
PixelDistortionAlg(const std::string& name, ISvcLocator* pSvcLocator);
......
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