Project
Loading...
Searching...
No Matches
DigitReaderSpec.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
13
14#ifndef O2_TOF_DIGITREADER
15#define O2_TOF_DIGITREADER
16
17#include "TFile.h"
18
20#include "Framework/Task.h"
21#include "TOFBase/Digit.h"
26
27using namespace o2::framework;
28
29namespace o2
30{
31namespace tof
32{
33
34class DigitReader : public Task
35{
36 public:
37 DigitReader(bool useMC) : mUseMC(useMC) {}
38 ~DigitReader() override = default;
39 void init(InitContext& ic) final;
40 void run(ProcessingContext& pc) final;
41
42 private:
43 int mState = 0;
44 int mCurrentEntry = 0;
45 bool mUseMC = true;
46 int mDelayInMuSec1TF = 0;
47 WindowFiller mFiller;
48 std::unique_ptr<TFile> mFile = nullptr;
49 std::vector<o2::tof::Digit> mDigits, *mPdigits = &mDigits;
50 std::vector<o2::tof::ReadoutWindowData> mRow, *mProw = &mRow;
51 std::vector<o2::dataformats::MCTruthContainer<o2::MCCompLabel>> mLabels, *mPlabels = &mLabels;
52 std::vector<uint8_t> mPatterns, *mPpatterns = &mPatterns;
53 Diagnostic mDiagnostic;
54};
55
59
60} // namespace tof
61} // namespace o2
62
63#endif /* O2_TOF_DIGITREADER */
Definition of the TOF cluster.
Definition of a container to keep Monte Carlo truth external to simulation objects.
Diagnostic class for TOF.
Definition Diagnostic.h:32
void run(ProcessingContext &pc) final
void init(InitContext &ic) final
~DigitReader() override=default
Defining PrimaryVertex explicitly as messageable.
Definition TFIDInfo.h:20
framework::DataProcessorSpec getDigitReaderSpec(bool useMC)
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...