Project
Loading...
Searching...
No Matches
EMCALPedestalHelper.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 EMCAL_PEDESTAL_HELPER_H_
13#define EMCAL_PEDESTAL_HELPER_H_
14
15#include "CCDB/CcdbApi.h"
19#include "EMCALBase/Geometry.h"
20#include "EMCALBase/Mapper.h"
21#include "EMCALCalib/CalibDB.h"
22#include "EMCALCalib/Pedestal.h"
23
24#include <algorithm>
25#include <fstream>
26#include <iostream>
27#include <sstream>
28#include <bitset>
29
30namespace o2::emcal
31{
32
34{
35
36 public:
39
43 std::vector<char> createPedestalInstruction(const Pedestal& obj, const int runNum = -1);
44
46 void dumpInstructions(const std::string_view filename, const gsl::span<char>& data);
47
48 private:
50 void setZero();
51
54 std::vector<char> createInstructionString(const int runNum = -1);
55
56 static constexpr short kNSM = 20;
57 static constexpr short kNRCU = 2;
58 static constexpr short kNDTC = 40;
59 static constexpr short kNBranch = 2;
60 static constexpr short kNFEC = 10;
61 static constexpr short kNChip = 5;
62 static constexpr short kNChan = 16;
63 short fMeanPed[kNSM][kNRCU][kNBranch][kNFEC][kNChip][kNChan];
64};
65
66} // namespace o2::emcal
67
68#endif
void dumpInstructions(const std::string_view filename, const gsl::span< char > &data)
print the vector produced by createInstructionString in a textfile
std::vector< char > createPedestalInstruction(const Pedestal &obj, const int runNum=-1)
Encodes the pedestal object into a string. This function fills fMeanPed which is then converted to a ...
CCDB container for pedestal values.
Definition Pedestal.h:48
GLboolean * data
Definition glcorearb.h:298
std::string filename()