Project
Loading...
Searching...
No Matches
RawDecoderSpec.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_CTP_RAWDECODER_H
13#define O2_CTP_RAWDECODER_H
14
15#include <vector>
16#include <deque>
18#include "Framework/Task.h"
23
24namespace o2
25{
26namespace ctp
27{
28namespace reco_workflow
29{
30
36{
37 public:
40 RawDecoderSpec(bool digits, bool lumi) : mDoDigits(digits), mDoLumi(lumi) {}
42 ~RawDecoderSpec() override = default;
45 void init(framework::InitContext& ctx) final;
53 void run(framework::ProcessingContext& ctx) final;
55
56 protected:
57 private:
58 // for digits
59 bool mDoDigits = true;
60 o2::pmr::vector<CTPDigit> mOutputDigits;
61 int mMaxInputSize = 0;
62 bool mMaxInputSizeFatal = 0;
63 // for lumi
64 bool mDoLumi = true;
65 //
66 LumiInfo mOutputLumiInfo;
67 bool mVerbose = false;
68 uint64_t mCountsT = 0;
69 uint64_t mCountsV = 0;
70 uint32_t mNTFToIntegrate = 1;
71 uint32_t mNHBIntegratedT = 0;
72 uint32_t mNHBIntegratedV = 0;
73 bool mDecodeinputs = 0;
74 std::deque<size_t> mHistoryT;
75 std::deque<size_t> mHistoryV;
76 RawDataDecoder mDecoder;
77 // Errors
78 int mLostDueToShiftInps = 0;
79 int mErrorIR = 0;
80 int mErrorTCR = 0;
81 int mIRRejected = 0;
82 int mTCRRejected = 0;
83 std::array<uint64_t, o2::ctp::CTP_NCLASSES> mClsEA{};
84 std::array<uint64_t, o2::ctp::CTP_NCLASSES> mClsEB{}; // from inputs
85 std::array<uint64_t, o2::ctp::CTP_NCLASSES> mClsA{};
86 std::array<uint64_t, o2::ctp::CTP_NCLASSES> mClsB{}; // from inputs
87 bool mCheckConsistency = false;
88};
89
93
94} // namespace reco_workflow
95
96} // namespace ctp
97
98} // namespace o2
99
100#endif
definition of CTPDigit, CTPInputDigit
unsigned int uint32_t
Timeframe settings Average distance in cm of events merged into Randomize distance around average distance of merged events Simulate correct bunch interactions instead of placing only the average number of events A value[n] sets TFlen for[n] collisions in Number of bunches per trainsort Number of bunch trains Instantaneous interaction rate Do not simulate border Total number of collisions to be placed in the interior of all time Do not select random but walk over array of events in stride steps h Event generator settings h configStandalone Use CPU for GPU Force usage of the specified GPU device no CPU fallback Continue processing after an error First event to Number of events to Number of iterations to Number of iterations to Number of initial iterations excluded from const char Directory with events to Events directory is and not inside events Show standalone event Run event generator maximum time bin of continuous for triggered for automatic continuous for automatic continuous triggered uint64_t
Digits tw Raw translation.
Coverter task for Raw data to CTP digits.
void endOfStream(o2::framework::EndOfStreamContext &ec) final
This is invoked whenever we have an EndOfStream event.
void updateTimeDependentParams(framework::ProcessingContext &pc)
void init(framework::InitContext &ctx) final
Initializing the RawDecoderSpec.
~RawDecoderSpec() override=default
Destructor.
RawDecoderSpec(bool digits, bool lumi)
Constructor.
void run(framework::ProcessingContext &ctx) final
Run conversion of raw data to cells.
o2::framework::DataProcessorSpec getRawDecoderSpec(bool askSTFDist, bool digits, bool lumi)
Creating DataProcessorSpec for the CTP.
std::vector< T, fair::mq::pmr::polymorphic_allocator< T > > vector
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
LumiInfo lumi
std::vector< Digit > digits