Project
Loading...
Searching...
No Matches
ValueMonitor.cxx
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11
13#include "TFile.h"
14#include <fairlogger/Logger.h>
15#include <memory>
16
17using namespace o2::utils;
18
19ValueMonitor::ValueMonitor(std::string filename) : mFileName(filename) {}
20
22{
23 if (mHistos.size() > 0) {
24 auto outfile = std::make_unique<TFile>(mFileName.c_str(), "RECREATE");
25 // write all histos
26 for (auto& h : mHistos) {
27 LOG(info) << "ValueMonitor: WRITING HISTO " << h.second->GetName();
28 h.second->Write();
29 }
30 outfile->Close();
31 }
32}
Class for time synchronization of RawReader instances.
ValueMonitor(std::string filename)
std::string filename()
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"