Project
Loading...
Searching...
No Matches
SimpleEventDisplay.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 ALICEO2_TPC_SIMPLEEVENTDISPLAY_H_
13#define ALICEO2_TPC_SIMPLEEVENTDISPLAY_H_
14
17
18#include "TH1.h"
19
20#include "TPCBase/CalDet.h"
21#include "TPCBase/CRU.h"
23
24class TH2D;
25class TH2Poly;
26
27namespace o2
28{
29namespace tpc
30{
31
32class Mapper;
41{
42 public:
44
45 ~SimpleEventDisplay() override = default;
46
47 Int_t updateROC(const Int_t roc, const Int_t row, const Int_t pad,
48 const Int_t timeBin, const Float_t signal) final;
49
51 Int_t updateCRU(const CRU& cru, const Int_t row, const Int_t pad,
52 const Int_t timeBin, const Float_t signal) final { return 0; }
53
54 void updateSectorHists();
55
56 CalPad* getCalPadMax() { return &mPadMax; }
57
58 CalPad* getCalPadOccupancy() { return &mPadOccupancy; }
59
61 void setSelectedSector(Int_t selectedSector) { mSelectedSector = selectedSector; }
62
64 void setLastSector(Int_t lastSector) { mLastSector = lastSector; }
65
67 void setLastSelSector(Int_t lastSelSector) { mLastSelSector = lastSelSector; }
68
69 void setPedstals(CalPad* pedestals) { mPedestals = pedestals; }
70
71 void setSignalThreshold(Int_t signalThreshold) { mSignalThreshold = signalThreshold; }
72
73 void setShowOccupancy(bool showOccupancy) { mShowOccupancy = showOccupancy; }
74
75 TH1D* makePadSignals(Int_t roc, Int_t row, Int_t pad);
76
77 TH2D* getSigIROC() const { return mHSigIROC; }
78 TH2D* getSigOROC() const { return mHSigOROC; }
79
80 void fillSectorHistSingleTimeBin(TH2Poly* h, Int_t timeBin);
81
83 void setTimeBinRange(int firstBin, int lastBin)
84 {
85 mFirstTimeBin = firstBin;
86 mLastTimeBin = lastBin;
87 initHistograms();
88 }
89
90 Int_t getFirstTimeBin() const { return mFirstTimeBin; }
91 Int_t getLastTimeBin() const { return mLastTimeBin; }
92
94 void endEvent() final {};
95
96 private:
97 CalPad mPadMax;
98 CalPad mPadOccupancy;
99 TH2D* mHSigIROC;
100 TH2D* mHSigOROC;
101 CalPad* mPedestals;
102
103 Int_t mCurrentChannel;
104 Int_t mCurrentROC;
105 Int_t mLastSector;
106 Int_t mSelectedSector;
107 Int_t mLastSelSector;
108 Int_t mCurrentRow;
109 Int_t mCurrentPad;
110 Float_t mMaxPadSignal;
111 Int_t mMaxTimeBin;
112 Bool_t mSectorLoop;
113 Int_t mFirstTimeBin;
114 Int_t mLastTimeBin;
115 Int_t mSignalThreshold;
116 Bool_t mShowOccupancy;
117
118 const Mapper& mTPCmapper;
119
120 void resetEvent() final;
121 void initHistograms();
122};
123
124} // namespace tpc
125
126} // namespace o2
127#endif
uint32_t roc
Definition RawData.h:3
Class for time synchronization of RawReader instances.
Base class for raw data calibrations.
Base of a simple event display for digits.
TH1D * makePadSignals(Int_t roc, Int_t row, Int_t pad)
void endEvent() final
Dummy end event.
void setSelectedSector(Int_t selectedSector)
Set currently selected sector.
void setTimeBinRange(int firstBin, int lastBin)
set time bin range
void setSignalThreshold(Int_t signalThreshold)
void setPedstals(CalPad *pedestals)
void fillSectorHistSingleTimeBin(TH2Poly *h, Int_t timeBin)
Int_t updateCRU(const CRU &cru, const Int_t row, const Int_t pad, const Int_t timeBin, const Float_t signal) final
not used
void setLastSector(Int_t lastSector)
Set last processed sector.
void setShowOccupancy(bool showOccupancy)
void setLastSelSector(Int_t lastSelSector)
Set last selected sector.
~SimpleEventDisplay() override=default
Int_t updateROC(const Int_t roc, const Int_t row, const Int_t pad, const Int_t timeBin, const Float_t signal) final
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
std::vector< int > row