Project
Loading...
Searching...
No Matches
EventsPerBc.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
12#ifndef _FT0_EVENTS_PER_BC_CALIB_OBJECT
13#define _FT0_EVENTS_PER_BC_CALIB_OBJECT
14
16#include <Rtypes.h>
17#include <TH1F.h>
18#include <memory>
19
20namespace o2::ft0
21{
23 std::array<double, o2::constants::lhc::LHCMaxBunches> histogram;
24
25 std::unique_ptr<TH1F> toTH1F(const char* name = "eventsPerBc") const
26 {
27 constexpr int N = o2::constants::lhc::LHCMaxBunches;
28 auto h = std::make_unique<TH1F>(name, name, N, 0, N);
29 for (int i = 0; i < N; ++i) {
30 h->SetBinContent(i + 1, histogram[i]);
31 }
32 return h;
33 }
34
36};
37} // namespace o2::ft0
38#endif
int32_t i
Header to collect LHC related constants.
Class for time synchronization of RawReader instances.
GLuint const GLchar * name
Definition glcorearb.h:781
constexpr int LHCMaxBunches
std::unique_ptr< TH1F > toTH1F(const char *name="eventsPerBc") const
Definition EventsPerBc.h:25
ClassDefNV(EventsPerBc, 1)
std::array< double, o2::constants::lhc::LHCMaxBunches > histogram
Definition EventsPerBc.h:23