2121#include " DataFormatsTPC/ClusterNative.h"
2222#include " Framework/ProcessingContext.h"
2323
24- class TCanvas ;
24+ # include < TCanvas.h >
2525
2626namespace o2 ::quality_control_modules::tpc
2727{
@@ -32,34 +32,17 @@ namespace o2::quality_control_modules::tpc
3232// / \param canVec Vector which holds TCanvas pointers persisting for the entire runtime of the task
3333// / \param canvNames Names of the canvases
3434// / \param metaData Optional std::map to set meta data for the publishing
35- auto addAndPublish = [](std::shared_ptr<o2::quality_control::core::ObjectsManager> objectsManager, auto & canVec, std::vector<std::string_view> canvNames, const std::map<std::string, std::string>& metaData = std::map<std::string, std::string>()) {
36- for (const auto & canvName : canvNames) {
37- canVec.emplace_back (std::make_unique<TCanvas>(canvName.data ()));
38- auto canvas = canVec.back ().get ();
39- objectsManager->startPublishing (canvas);
40- if (metaData.size () != 0 ) {
41- for (const auto & [key, value] : metaData) {
42- objectsManager->addMetadata (canvas->GetName (), key, value);
43- }
44- }
45- }
46- };
35+ void addAndPublish (std::shared_ptr<o2::quality_control::core::ObjectsManager> objectsManager, std::vector<std::unique_ptr<TCanvas>>& canVec, std::vector<std::string_view> canvNames, const std::map<std::string, std::string>& metaData = std::map<std::string, std::string>());
4736
4837// / \brief Converts std::vector<std::unique_ptr<TCanvas>> to std::vector<TCanvas*>
4938// / \param input std::vector<std::unique_ptr<TCanvas>> to be converted to std::vector<TCanvas*>
5039// / \return std::vector<TCanvas*>
51- auto toVector = [](auto & input) {
52- std::vector<TCanvas*> output;
53- for (auto & in : input) {
54- output.emplace_back (in.get ());
55- }
56- return output;
57- };
40+ std::vector<TCanvas*> toVector (std::vector<std::unique_ptr<TCanvas>>& input);
5841
5942// / \brief Converts CLUSTERNATIVE from InputRecord to ClusterNativeAccess
6043// / Convenience funtion to make native clusters accessible when receiving them from the DPL
6144// / \param input InputReconrd from the ProcessingContext
6245// / \return ClusterNativeAccess object for easy cluster access
6346o2::tpc::ClusterNativeAccess clusterHandler (o2::framework::InputRecord& input);
6447} // namespace o2::quality_control_modules::tpc
65- #endif // QUALITYCONTROL_TPCUTILITY_H
48+ #endif // QUALITYCONTROL_TPCUTILITY_H
0 commit comments