Project
Loading...
Searching...
No Matches
T0FitHistos.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
14
16#include <fairlogger/Logger.h>
17#include <algorithm>
18
19using namespace o2::trd;
20using namespace o2::trd::constants;
21
22void T0FitHistos::fill(const std::vector<o2::trd::PHData>& data)
23{
24 for (const auto& ph : data) {
25 int det = ph.getDetector();
26 int tb = ph.getTimebin();
27 int adc = ph.getADC();
28
29 if (ph.getNneighbours() != 2) {
30 continue;
31 }
32
33 mDet.push_back(det);
34 mTB.push_back(tb);
35 mADC.push_back(adc);
36 ++mNEntriesTot;
37 }
38}
39
41{
42 auto sizePrev = (int)prev->getNEntries();
43
44 for (int i = 0; i < sizePrev; ++i) {
45 mDet.push_back(prev->getDetector(i));
46 mTB.push_back(prev->getTimeBin(i));
47 mADC.push_back(prev->getADC(i));
48 }
49}
50
52{
53 LOG(info) << "There are " << mNEntriesTot << " entries in the container";
54}
int32_t i
Class to store the TRD PH values for each TRD chamber.
void fill(const std::vector< o2::trd::PHData > &data)
void merge(const T0FitHistos *prev)
auto getADC(int index) const
Definition T0FitHistos.h:37
auto getTimeBin(int index) const
Definition T0FitHistos.h:36
auto getDetector(int index) const
Definition T0FitHistos.h:35
auto getNEntries() const
Definition T0FitHistos.h:38
GLboolean * data
Definition glcorearb.h:298
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"
ArrayADC adc