Skip to content

Commit

Permalink
Make sure all plots are reset
Browse files Browse the repository at this point in the history
  • Loading branch information
martenole committed Nov 17, 2023
1 parent 1c66277 commit 6d3d26d
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 21 deletions.
6 changes: 3 additions & 3 deletions Modules/TRD/include/TRD/DigitsTask.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,14 @@ class DigitsTask final : public TaskInterface
std::shared_ptr<TH1F> mClsChargeTb;
std::shared_ptr<TH1F> mClsNTb;

std::array<std::shared_ptr<TH2F>, 18> mHCMCM;
std::array<std::shared_ptr<TH2F>, o2::trd::constants::NSECTOR> mHCMCM;

std::shared_ptr<TH1F> mPulseHeight = nullptr;
std::shared_ptr<TH2F> mTotalPulseHeight2D = nullptr;
std::array<std::shared_ptr<TH1F>, 18> mPulseHeight2DperSM;
std::array<std::shared_ptr<TH1F>, o2::trd::constants::NSECTOR> mPulseHeight2DperSM;
std::shared_ptr<TProfile> mPulseHeightpro = nullptr;
std::shared_ptr<TProfile2D> mPulseHeightperchamber = nullptr;
std::vector<TH2F*> mLayers;
std::array<std::shared_ptr<TH2F>, o2::trd::constants::NLAYER> mLayers;

// CCDB objects
const o2::trd::NoiseStatusMCM* mNoiseMap = nullptr;
Expand Down
39 changes: 21 additions & 18 deletions Modules/TRD/src/DigitsTask.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@
#include <map>
#include <tuple>

#include "CCDB/BasicCCDBManager.h"

using namespace o2::quality_control_modules::common;
using namespace o2::trd::constants;
using Helper = o2::trd::HelperMethods;
Expand Down Expand Up @@ -221,7 +219,7 @@ void DigitsTask::buildHistograms()
mNCls.reset(new TH1F("Cluster/NCls", "Total number of clusters per sector", 18, -0.5, 17.5));
mNCls->SetTitle("Total number of clusters per sector;Sector;Counts");
getObjectsManager()->startPublishing(mNCls.get());
mClsTb.reset(new TH2F("ClusterChargeTB", "Cluster charge;time bin;cluster charge", 30, -0.5, 29.5, 200, 0, 2000));
mClsTb.reset(new TH2F("Cluster/ChargeTB", "Cluster charge;time bin;cluster charge", 30, -0.5, 29.5, 200, 0, 2000));
getObjectsManager()->startPublishing(mClsTb.get());
}

Expand Down Expand Up @@ -249,13 +247,13 @@ void DigitsTask::buildHistograms()
}

for (int iLayer = 0; iLayer < NLAYER; ++iLayer) {
mLayers.push_back(new TH2F(Form("DigitsPerLayer_%i", iLayer), Form("Digit count per pad in layer %i;glb pad row;glb pad col", iLayer), 76, -0.5, 75.5, 2592, -0.5, 2591.5));
mLayers.back()->SetStats(0);
drawTrdLayersGrid(mLayers.back());
mLayers[iLayer].reset(new TH2F(Form("DigitsPerLayer_%i", iLayer), Form("Digit count per pad in layer %i;glb pad row;glb pad col", iLayer), 76, -0.5, 75.5, 2592, -0.5, 2591.5));
mLayers[iLayer]->SetStats(0);
drawTrdLayersGrid(mLayers[iLayer]);
fillLinesOnHistsPerLayer(iLayer);
getObjectsManager()->startPublishing(mLayers.back());
getObjectsManager()->setDefaultDrawOptions(mLayers.back()->GetName(), "COLZ");
getObjectsManager()->setDisplayHint(mLayers.back(), "logz");
getObjectsManager()->startPublishing(mLayers[iLayer].get());
getObjectsManager()->setDefaultDrawOptions(mLayers[iLayer]->GetName(), "COLZ");
getObjectsManager()->setDisplayHint(mLayers[iLayer], "logz");
}
}

Expand Down Expand Up @@ -428,22 +426,27 @@ void DigitsTask::reset()
ILOG(Debug, Devel) << "Resetting the histogram" << ENDM;
mDigitsPerEvent->Reset();
mDigitHCID->Reset();
mADCvalue->Reset();
mDigitsSizevsTrackletSize->Reset();
mTotalPulseHeight2D->Reset();
mPulseHeight->Reset();
mADCvalue->Reset();
mPulseHeightpro->Reset();
mPulseHeightperchamber->Reset();
for (auto& h : mPulseHeight2DperSM) {
h->Reset();
}
for (auto& h : mHCMCM) {
h.get()->Reset();
h->Reset();
}
for (auto& h : mLayers) {
h->Reset();
}
if (mDoClusterize) {
mNCls->Reset();
mClsTb->Reset();
mClsChargeTb.get()->Reset();
mClsNTb.get()->Reset();
mClsAmp.get()->Reset();
mClsChargeTb->Reset();
mClsNTb->Reset();
mClsAmp->Reset();
}
mPulseHeight.get()->Reset();
mTotalPulseHeight2D.get()->Reset();
mPulseHeightpro.get()->Reset();
mPulseHeightperchamber.get()->Reset();
}
} // namespace o2::quality_control_modules::trd

0 comments on commit 6d3d26d

Please sign in to comment.