Project
Loading...
Searching...
No Matches
FT0TimeOffsetSlotContainer.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 O2_FT0TIMEOFFSETSLOTCONTAINER_H
13#define O2_FT0TIMEOFFSETSLOTCONTAINER_H
14
15#include <bitset>
16#include <array>
17
22
23#include "TList.h"
24
25#include "Rtypes.h"
26namespace o2::ft0
27{
28
30{
31 static constexpr int sNCHANNELS = o2::ft0::Geometry::Nchannels;
34
35 public:
36 FT0TimeOffsetSlotContainer(std::size_t minEntries); // constructor is needed due to current version of FITCalibration library, should be removed
41 bool hasEnoughEntries() const;
42 void fill(const gsl::span<const float>& data);
43 SpectraInfoObject getSpectraInfoObject(std::size_t channelID, TList* listHists) const;
45 void print() const;
46 TimeSpectraInfoObject generateCalibrationObject(long tsStartMS, long tsEndMS, const std::string& pathToHists) const;
47 typedef float FlatHistoValue_t;
49 auto getHistogram() const { return mHistogram; }
50 auto isFirstTF() const { return mIsFirstTF; }
51
52 private:
53 // Slot number
54 uint8_t mCurrentSlot = 0;
55 // Status of channels, pending channels = !(good | bad)
56 std::bitset<sNCHANNELS> mBitsetBadChIDs;
57 std::bitset<sNCHANNELS> mBitsetGoodChIDs;
58 // For hist init, for making hist ranges dynamic
59 bool mIsFirstTF{true};
60 // For slot finalizing
61 bool mIsReady{false};
62 // Once it is upper than max entry threshold it stops increasing
63 std::array<std::size_t, sNCHANNELS> mArrEntries{};
64 // Total number of events
65 uint64_t mTotalNevents{0};
66 // Contains all information about time spectra
67 FlatHisto2D_t mHistogram;
68 ClassDefNV(FT0TimeOffsetSlotContainer, 1);
69};
70} // namespace o2::ft0
71
72#endif // O2_FT0TIMEOFFSETSLOTCONTAINER_H
uint8_t channelID
Definition RawEventData.h:8
2D messeageable histo class
FT0TimeOffsetSlotContainer & operator=(FT0TimeOffsetSlotContainer &)=default
void merge(FT0TimeOffsetSlotContainer *prev)
FT0TimeOffsetSlotContainer(FT0TimeOffsetSlotContainer &&)=default
SpectraInfoObject getSpectraInfoObject(std::size_t channelID, TList *listHists) const
o2::dataformats::FlatHisto2D< FlatHistoValue_t > FlatHisto2D_t
FT0TimeOffsetSlotContainer & operator=(FT0TimeOffsetSlotContainer &&)=default
FT0TimeOffsetSlotContainer(FT0TimeOffsetSlotContainer const &)=default
void fill(const gsl::span< const float > &data)
TimeSpectraInfoObject generateCalibrationObject(long tsStartMS, long tsEndMS, const std::string &pathToHists) const
static constexpr int Nchannels
Definition Geometry.h:50
GLboolean * data
Definition glcorearb.h:298