Project
Loading...
Searching...
No Matches
PadPedestalCalibDevice.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#ifndef ALICEO2_FOCAL_PADPEDESTALCALIBDEVICE_H
12#define ALICEO2_FOCAL_PADPEDESTALCALIBDEVICE_H
13
14#include <array>
15#include <memory>
16#include <string>
17#include <string_view>
18#include <gsl/span>
19#include <TH2.h>
22#include "Framework/Task.h"
25
26namespace o2::focal
27{
28
30{
31 public:
32 enum Method_t {
35 FIT
36 };
37 PadPedestalCalibDevice(bool updateCCDB, const std::string& path, bool debugMode);
38 ~PadPedestalCalibDevice() final = default;
39
40 void init(framework::InitContext& ctx) final;
41 void run(framework::ProcessingContext& ctx) final;
43
44 private:
45 void sendData(o2::framework::DataAllocator& output);
46 void calculatePedestals();
47 double evaluatePedestal(TH1* channel);
48 void processRawData(const gsl::span<const char> padWords);
49
50 PadDecoder mDecoder;
51 std::unique_ptr<PadPedestal> mPedestalContainer;
52 bool mUpdateCCDB = true;
53 bool mDebug = false;
54 std::string mPath = "./";
55 Method_t mExtractionMethod = Method_t::MAX;
56 std::array<std::unique_ptr<TH2>, 18> mADCDistLayer;
57};
58
59o2::framework::DataProcessorSpec getPadPedestalCalibDevice(bool updateCCDB, const std::string& path, bool debug);
60
61} // namespace o2::focal
62
63#endif
void output(const std::map< std::string, ChannelStat > &channels)
Definition rawdump.cxx:197
std::ostringstream debug
~PadPedestalCalibDevice() final=default
void init(framework::InitContext &ctx) final
void endOfStream(o2::framework::EndOfStreamContext &ec) final
This is invoked whenever we have an EndOfStream event.
void run(framework::ProcessingContext &ctx) final
GLenum array
Definition glcorearb.h:4274
GLsizei const GLchar *const * path
Definition glcorearb.h:3591
o2::framework::DataProcessorSpec getPadPedestalCalibDevice(bool updateCCDB, const std::string &path, bool debug)
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
Defining DataPointCompositeObject explicitly as copiable.