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

DataQualityUtils: Fix cppcheck warnings.

Pass strings by const reference, not by value.
parent d88835f0
No related branches found
No related tags found
No related merge requests found
/*
Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
*/
#ifndef dqutilsStatusFlagCOOL_h
......@@ -53,8 +53,8 @@ namespace dqutils {
virtual ~StatusFlagCOOL () {};
// Methods of "interest". To insert a status flag you can use either ChannelId or ChannelName.
void insert(cool::ChannelId channelId, int code, float dfrac, float thrust, std::string tag_name);
void insert(std::string channelName, int code, float dfrac, float thrust, std::string tag_name);
void insert(cool::ChannelId channelId, int code, float dfrac, float thrust, const std::string& tag_name);
void insert(std::string channelName, int code, float dfrac, float thrust, const std::string& tag_name);
// Needed for the ROOT interface.
ClassDef(StatusFlagCOOL, 0) // A class for modifying DQ info in the COOL database
......
/*
Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
*/
// **********************************************************************
......@@ -69,7 +69,7 @@ namespace dqutils {
void
StatusFlagCOOL::
insert(cool::ChannelId channelId, int code, float dfrac, float thrust, std::string tag_name) {
insert(cool::ChannelId channelId, int code, float dfrac, float thrust, const std::string& tag_name) {
try {
cool::RecordSpecification spec = this->createSpec();
coral::AttributeList payload = this->createPayload(code, dfrac, thrust, spec);
......@@ -84,7 +84,7 @@ namespace dqutils {
void
StatusFlagCOOL::
insert(std::string channelName, int code, float dfrac, float thrust, std::string tag_name) {
insert(std::string channelName, int code, float dfrac, float thrust, const std::string& tag_name) {
try {
this->insert(this->getCoolFolder()->channelId(channelName), code, dfrac, thrust, tag_name);
}
......
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