Commit 3ff1cfb7 authored by Simon Spannagel's avatar Simon Spannagel
Browse files

Merge branch 'fix_memory_leaks' into 'master'

fixing 2 memory leaks

See merge request !75
parents fab725d5 a563e024
Pipeline #632753 passed with stages
in 26 minutes and 38 seconds
......@@ -122,9 +122,7 @@ void EventLoaderATLASpix::initialise() {
m_detector->nPixels().Y(),
0,
m_detector->nPixels().Y());
// hPixelToT = new TH1F("pixelToT", "pixelToT", 100, 0, 100);
// std::string totTitle = "pixelToT;x ToT in " + string(m_clockCycle) + " ns units";
// hPixelToT = new TH1F("pixelToT", "pixelToT", 64, 0, ts2Range*m_clockCycle);
hPixelToT = new TH1F("pixelToT", "pixelToT", 64, 0, 64);
hPixelToT->GetXaxis()->SetTitle("ToT in TS2 clock cycles.");
hPixelToTCal = new TH1F("pixelToTCal", "pixelToT", 100, 0, 100);
......@@ -153,7 +151,7 @@ void EventLoaderATLASpix::initialise() {
LOG(INFO) << ts;
}
LOG(INFO) << "Using clock cycle length of " << m_clockCycle << std::endl;
LOG(INFO) << "Using clock cycle length of " << m_clockCycle << " ns." << std::endl;
m_oldtoa = 0;
m_overflowcounter = 0;
......@@ -187,7 +185,6 @@ StatusCode EventLoaderATLASpix::run(std::shared_ptr<Clipboard> clipboard) {
for(auto px : (*pixels)) {
hHitMap->Fill(px->column(), px->row());
// hPixelToT->Fill((px->tot())*m_clockCycle);
hPixelToT->Fill(px->tot());
hPixelToTCal->Fill(px->charge());
hPixelToA->Fill(px->timestamp());
......@@ -203,6 +200,7 @@ StatusCode EventLoaderATLASpix::run(std::shared_ptr<Clipboard> clipboard) {
if(!pixels->empty()) {
clipboard->put(m_detector->name(), "pixels", reinterpret_cast<Objects*>(pixels));
} else {
delete pixels;
LOG(DEBUG) << "Returning <NoData> status, no hits found.";
return StatusCode::NoData;
}
......
......@@ -242,6 +242,8 @@ StatusCode Tracking4D::run(std::shared_ptr<Clipboard> clipboard) {
if(tracks->size() > 0) {
clipboard->put("tracks", reinterpret_cast<Objects*>(tracks));
tracksPerEvent->Fill(static_cast<double>(tracks->size()));
} else {
delete tracks;
}
// Clean up tree objects
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment