Project
Loading...
Searching...
No Matches
DigitsReaderSpec.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
18
19#ifndef DETECTORS_HMPID_WORKFLOW_INCLUDE_HMPIDWORKFLOW_DIGITSREADERSPEC_H_
20#define DETECTORS_HMPID_WORKFLOW_INCLUDE_HMPIDWORKFLOW_DIGITSREADERSPEC_H_
21
22// ROOT
23#include <TFile.h>
24#include <TTree.h>
25
27#include "Framework/Task.h"
28
29#include "HMPIDBase/Common.h"
33
34namespace o2
35{
36namespace hmpid
37{
38
39class DigitReader : public framework::Task
40{
41 public:
42 DigitReader() = default;
43 // : mReadFile(readFile) {}
44 ~DigitReader() override = default;
45
47
49 // void endOfStream(framework::EndOfStreamContext& ec) override;
50
51 private:
52 bool mReadFile = false;
53 void initFileIn(const std::string& filename);
54
55 long mDigitsReceived;
56 ExecutionTimer mExTimer;
57
58 std::unique_ptr<TFile> mFile; // root file with digits
59 std::unique_ptr<TTree> mTree; // tree inside the file
60
61 unsigned long mNumberOfEntries = 0; // number of entries from TTree
62 unsigned long mCurrentEntry = 0; // index of current entry
63
64 // void strToFloatsSplit(std::string s, std::string delimiter, float* res, int maxElem = 7);
65};
66
68
69} // end namespace hmpid
70} // end namespace o2
71
72#endif
void init(framework::InitContext &ic) final
~DigitReader() override=default
void run(framework::ProcessingContext &pc) final
HMPID Derived class for the Time of Workflows.
Definition Common.h:34
o2::framework::DataProcessorSpec getDigitsReaderSpec()
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
std::string filename()