Project
Loading...
Searching...
No Matches
DigitIOBaseTask.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 O2_MCH_DEVIO_DIGITS_DIGIT_IO_BASE_TASK_H
13#define O2_MCH_DEVIO_DIGITS_DIGIT_IO_BASE_TASK_H
14
16#include <cstdint>
17#include <gsl/span>
18#include <numeric>
19#include <vector>
20
21namespace o2::framework
22{
23class InitContext;
24} // namespace o2::framework
25
26namespace o2::mch
27{
28class Digit;
29class ROFRecord;
30}; // namespace o2::mch
31
32namespace o2::mch::io
33{
34
41{
42 protected:
43 size_t mMaxNofTimeFrames{std::numeric_limits<size_t>::max()}; // max number of timeframes to process
44 size_t mNofProcessedTFs{0}; // actual number of timeframes processed so far
45 size_t mFirstTF{0}; // first timeframe to process
46 size_t mTFid{0}; // current timeframe index
47 bool mPrintDigits = false; // print digits
48 bool mPrintTFs = false; // print number of rofs and digits per tf
49
50 public:
55
59 void printFull(gsl::span<const Digit> digits,
60 gsl::span<const ROFRecord> rofs) const;
61
66 void printSummary(gsl::span<const Digit> digits,
67 gsl::span<const ROFRecord> rofs,
68 const char* suffix = "") const;
69
74 bool shouldProcess() const;
75
79 void incNofProcessedTFs();
80
84 void incTFid();
85};
86
90std::vector<o2::framework::ConfigParamSpec> getCommonOptions();
91
92} // namespace o2::mch::io
93#endif
void printFull(gsl::span< const Digit > digits, gsl::span< const ROFRecord > rofs) const
void printSummary(gsl::span< const Digit > digits, gsl::span< const ROFRecord > rofs, const char *suffix="") const
void init(o2::framework::InitContext &ic)
o2::cpv::Digit Digit
Defining PrimaryVertex explicitly as messageable.
Definition TFIDInfo.h:20
std::vector< ConfigParamSpec > getCommonOptions()
std::vector< Digit > digits