Project
Loading...
Searching...
No Matches
ChannelCalibratorFinalizer.cxx
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
16
18
19#include <sstream>
24
25namespace o2
26{
27namespace mid
28{
29
30void ChannelCalibratorFinalizer::process(const gsl::span<const ColumnData> noise, const gsl::span<const ColumnData> dead)
31{
32 ColumnDataHandler colHandler;
33 colHandler.merge(noise);
34 colHandler.merge(dead);
35
36 // Keep track of last TimeFrame, since the masks will be valid from now on
37 mBadChannels = colHandler.getMerged();
38
39 // Get the masks for the electronics
40 // First convert the dead channels into masks
41 ChannelMasksHandler masksHandler;
42 masksHandler.switchOffChannels(mBadChannels);
43
44 // Complete with the expected masks from mapping
45 masksHandler.merge(mRefMasks);
46
47 // Convert column data masks to local board masks
48 ColumnDataToLocalBoard colToBoard;
49 colToBoard.process(masksHandler.getMasks(), true);
50
51 // Update local board configuration with the masks
52 ROBoardConfigHandler roBoardCfgHandler;
53 roBoardCfgHandler.updateMasks(colToBoard.getData());
54 std::stringstream ss;
55 roBoardCfgHandler.write(ss);
56
57 mMasksString = ss.str();
58}
59
60} // namespace mid
61} // namespace o2
MID noise and dead channels calibrator finalizer.
MID channels masks handler.
MID digits handler.
Converter from ColumnData to raw local boards.
void process(const gsl::span< const ColumnData > noise, const gsl::span< const ColumnData > dead)
std::vector< ColumnData > getMasks() const
Gets the masks.
void switchOffChannels(const ColumnData &badChannels)
void merge(const std::vector< ColumnData > &masks)
bool merge(const ColumnData &col, size_t idx=0)
Merges digit.
std::vector< ColumnData > getMerged() const
Returns the merged data.
std::vector< ROBoard > getData() const
Gets vector of ROBoard.
void process(gsl::span< const ColumnData > data, bool allowEmpty=false)
void write(const char *filename) const
void updateMasks(const std::vector< ROBoard > &masks)
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...