Project
Loading...
Searching...
No Matches
WaveformCalibEPN.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#include <memory>
13#include "ZDCBase/Constants.h"
21#ifndef ALICEO2_ZDC_WAVEFORMCALIBEPN_H
22#define ALICEO2_ZDC_WAVEFORMCALIBEPN_H
23namespace o2
24{
25namespace zdc
26{
28{
29 public:
30 WaveformCalibEPN() = default;
31 int init();
32 void clear();
33 int process(const gsl::span<const o2::zdc::BCRecData>& bcrec,
34 const gsl::span<const o2::zdc::ZDCEnergy>& energy,
35 const gsl::span<const o2::zdc::ZDCTDCData>& tdc,
36 const gsl::span<const uint16_t>& info,
37 const gsl::span<const o2::zdc::ZDCWaveform>& wave);
38 int endOfRun();
39 int saveDebugHistos(const std::string fn = "ZDCWaveformCalibEPN.root");
40 int dumpCalib(const std::string fn = "ZDCWaveformCalibEPNDump.root");
41 void setConfig(const WaveformCalibConfig* param) { mConfig = param; };
42 const WaveformCalibConfig* getConfig() const { return mConfig; };
43 void setSaveDebugHistos() { mSaveDebugHistos = true; }
44 void setDumpCalib() { mDumpCalib = true; }
45 void setDontSaveDebugHistos() { mSaveDebugHistos = false; }
46 void setVerbosity(int val) { mVerbosity = val; }
49
50 private:
51 bool mInitDone = false;
52 bool mSaveDebugHistos = false;
53 bool mDumpCalib = false;
54 int32_t mNBin = 0;
55 int32_t mVerbosity = DbgMinimal;
56 const WaveformCalibConfig* mConfig = nullptr;
57
58 int mFirst = 0;
59 int mLast = 0;
60 int mN = 10;
61
62 void configure(int ifirst, int ilast)
63 {
64 if (ifirst > 0 || ilast < 0 || ilast < ifirst) {
65 LOGF(fatal, "WaveformCalibEPN configure error with ifirst=%d ilast=%d", ifirst, ilast);
66 }
67 mFirst = ifirst;
68 mLast = ilast;
69 mN = ilast - ifirst + 1;
70 LOG(info) << "WaveformCalibEPN::" << __func__ << " mN=" << mN << "[" << mFirst << ":" << mLast << "]";
71 }
72
73 WaveformCalibQueue mQueue;
74};
75} // namespace zdc
76} // namespace o2
77
78#endif
Class to describe reconstructed ZDC event (single BC with signal in one of detectors)
Configuration of ZDC Tower intercalibration procedure.
Waveform calibration intermediate data.
Waveform calibration intermediate data queue.
ZDC Energy calibration.
ZDC Tower calibration.
Container class to store the interpolated waveform of the ZDC.
void setConfig(const WaveformCalibConfig *param)
int dumpCalib(const std::string fn="ZDCWaveformCalibEPNDump.root")
int saveDebugHistos(const std::string fn="ZDCWaveformCalibEPN.root")
WaveformCalibData & getData()
const WaveformCalibConfig * getConfig() const
GLuint GLfloat * val
Definition glcorearb.h:1582
GLenum GLfloat param
Definition glcorearb.h:271
struct o2::upgrades_utils::@463 zdc
structure to keep FT0 information
constexpr int DbgMinimal
Definition Constants.h:208
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"