Skip to content

Commit

Permalink
Merge branch 'master' into naming-conventions-and-warnings2
Browse files Browse the repository at this point in the history
  • Loading branch information
Barthelemy authored Nov 8, 2024
2 parents 81a668d + 19f4155 commit 526a990
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 22 deletions.
2 changes: 1 addition & 1 deletion Framework/include/QualityControl/Quality.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class Quality
{
public:
/// Default constructor
Quality(unsigned int level = Quality::NullLevel, std::string name = "");
explicit Quality(unsigned int level = Quality::NullLevel, std::string name = "");

/// Destructor
virtual ~Quality() = default;
Expand Down
8 changes: 4 additions & 4 deletions Framework/script/RepoCleaner/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
certifi==2024.2.2
certifi==2024.7.4
chardet==5.2.0
charset-normalizer==3.3.2
dryable==1.2.0
idna==3.7
psutil==6.1.0
python-consul==1.1.0
PyYAML==6.0.1
requests==2.31.0
requests==2.32.2
responses==0.25.0
six==1.16.0
urllib3==2.2.1
urllib3==2.2.2
qcrepocleaner~=1.9
setuptools~=70.3.0
setuptools~=70.3.0
8 changes: 4 additions & 4 deletions Framework/test/testAggregatorInterface.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,10 @@ TEST_CASE("test_invoke_all_methods")
test::SimpleTestAggregator testAggregator;

// prepare data
std::shared_ptr<QualityObject> qo_null = make_shared<QualityObject>(0, "testCheckNull", "TST");
std::shared_ptr<QualityObject> qo_good = make_shared<QualityObject>(1, "testCheckGood", "TST");
std::shared_ptr<QualityObject> qo_medium = make_shared<QualityObject>(2, "testCheckMedium", "TST");
std::shared_ptr<QualityObject> qo_bad = make_shared<QualityObject>(3, "testCheckBad", "TST");
std::shared_ptr<QualityObject> qo_null = make_shared<QualityObject>(Quality::Null, "testCheckNull", "TST");
std::shared_ptr<QualityObject> qo_good = make_shared<QualityObject>(Quality::Good, "testCheckGood", "TST");
std::shared_ptr<QualityObject> qo_medium = make_shared<QualityObject>(Quality::Medium, "testCheckMedium", "TST");
std::shared_ptr<QualityObject> qo_bad = make_shared<QualityObject>(Quality::Bad, "testCheckBad", "TST");
QualityObjectsMapType input;

std::map<std::string, Quality> result1 = testAggregator.aggregate(input);
Expand Down
12 changes: 3 additions & 9 deletions Framework/test/testBookkeepingQualitySink.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,11 @@
///

#include <DataFormatsQualityControl/QualityControlFlag.h>
#include <DataSampling/DataSampling.h>
#include "QualityControl/BookkeepingQualitySink.h"
#include "QualityControl/InfrastructureGenerator.h"

using namespace o2;
using namespace o2::framework;
using namespace o2::utilities;

void customize(std::vector<CompletionPolicy>& policies)
{
Expand All @@ -30,12 +28,8 @@ void customize(std::vector<CompletionPolicy>& policies)

#include <Framework/runDataProcessing.h>
#include <Framework/ControlService.h>
#include <Configuration/ConfigurationFactory.h>
#include <Configuration/ConfigurationInterface.h>
#include <QualityControl/BookkeepingQualitySink.h>
#include <QualityControl/QualityObject.h>

using namespace o2::configuration;
#include "QualityControl/QualityObject.h"
#include "QualityControl/Quality.h"

void compareFatal(const quality_control::QualityControlFlag& got, const quality_control::QualityControlFlag& expected)
{
Expand All @@ -57,7 +51,7 @@ WorkflowSpec defineDataProcessing(ConfigContext const&)
Inputs{},
Outputs{ { { "tst-qo" }, "TST", "DATA" } },
AlgorithmSpec{ [](ProcessingContext& ctx) {
auto obj = std::make_unique<core::QualityObject>(0, "testCheckNull", "TST");
auto obj = std::make_unique<core::QualityObject>(core::Quality::Null, "testCheckNull", "TST");
obj->getActivity().mValidity = core::ValidityInterval{ 10, 500 };
obj->addFlag(FlagTypeFactory::Good(), "I am comment");
ctx.outputs().snapshot(Output{ "TST", "DATA", 0 }, *obj);
Expand Down
2 changes: 1 addition & 1 deletion Modules/CTP/src/RawDataReaderCheck.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ Quality RawDataReaderCheck::check(std::map<std::string, std::shared_ptr<MonitorO
if (mLHCBCs.count() == 0) {
continue;
}
float average = h->GetEntries() / mLHCBCs.count();
float average = h->Integral() / mLHCBCs.count();
mThreshold = average - mNSigBC * sqrt(average);
if (mThreshold < std::sqrt(average)) {
mThreshold = average / 2;
Expand Down
3 changes: 0 additions & 3 deletions Modules/TRD/src/PulsePositionCheck.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -229,9 +229,6 @@ void PulsePositionCheck::beautify(std::shared_ptr<MonitorObject> mo, Quality che
} else if (checkResult == Quality::Null) {
ILOG(Debug, Devel) << "Quality::Null, setting to Blue" << ENDM;
h->SetFillColor(kBlue);
} else if (checkResult == Quality::NullLevel) {
ILOG(Debug, Devel) << "Quality::Null, setting to Pink" << ENDM;
h->SetFillColor(kPink);
}
h->SetLineColor(kBlack);
h->Draw();
Expand Down

0 comments on commit 526a990

Please sign in to comment.