Project
Loading...
Searching...
No Matches
Helpers.h
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
16
17#ifndef AliceO2_TPC_HELPERS_H
18#define AliceO2_TPC_HELPERS_H
19
20// root includes
21#include "TH1F.h"
22#include "TH2F.h"
23
24#include <vector>
25#include <string>
26#include "TPCBase/CalDet.h"
27
28namespace o2
29{
30namespace tpc
31{
32namespace qc
33{
34namespace helpers
35{
36
39
41std::vector<double> makeLogBinning(const int nbins, const double min, const double max);
42
44void setStyleHistogram1D(TH1& histo);
45
47void setStyleHistogram1D(std::vector<TH1F>& histos);
48
50void setStyleHistogram2D(TH2& histo);
51
53void setStyleHistogram2D(std::vector<TH2F>& histos);
54
56void setStyleHistogram(TH1& histo);
57
58// set nice style of histograms in a map of vectors
59void setStyleHistogramsInMap(std::unordered_map<std::string_view, std::vector<std::unique_ptr<TH1>>>& mapOfvectors);
60// set nice style of histograms in a map
61void setStyleHistogramsInMap(std::unordered_map<std::string_view, std::unique_ptr<TH1>>& mapOfHisto);
62// set nice style of histograms in a map of vectors
63void setStyleHistogramsInMap(std::unordered_map<std::string, std::vector<std::unique_ptr<TH1>>>& mapOfvectors);
64// set nice style of histograms in a map
65void setStyleHistogramsInMap(std::unordered_map<std::string, std::unique_ptr<TH1>>& mapOfHisto);
71bool newZSCalib(const o2::tpc::CalDet<float>& refPedestal, const o2::tpc::CalDet<float>& refNoise, const o2::tpc::CalDet<float>& pedestal);
72
73} // namespace helpers
74} // namespace qc
75} // namespace tpc
76} // namespace o2
77
78#endif
std::vector< double > makeLogBinning(const int nbins, const double min, const double max)
get a vector containing binning info for constant sized bins on a log axis
Definition Helpers.cxx:22
void setStyleHistogram2D(TH2 &histo)
Set nice style for 2D histograms.
Definition Helpers.cxx:57
void setStyleHistogram(TH1 &histo)
set nice style for 1D histograms ptr
Definition Helpers.cxx:73
void setStyleHistogram1D(TH1 &histo)
Set nice style for single 1D histograms.
Definition Helpers.cxx:43
bool newZSCalib(const o2::tpc::CalDet< float > &refPedestal, const o2::tpc::CalDet< float > &refNoise, const o2::tpc::CalDet< float > &pedestal)
Definition Helpers.cxx:122
void setStyleHistogramsInMap(std::unordered_map< std::string_view, std::vector< std::unique_ptr< TH1 > > > &mapOfvectors)
Definition Helpers.cxx:86
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
constexpr size_t min
constexpr size_t max