Project
Loading...
Searching...
No Matches
RecEventReaderSpec.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_ZDC_RECEVENTREADER_SPEC
15#define O2_ZDC_RECEVENTREADER_SPEC
16
17#include "TFile.h"
18#include "TTree.h"
19
22#include "Framework/Task.h"
24
25using namespace o2::framework;
26
27namespace o2
28{
29namespace zdc
30{
31
32class RecEventReader : public Task
33{
34 public:
35 RecEventReader(bool useMC = true);
36 ~RecEventReader() override = default;
37 void init(InitContext& ic) final;
38 void run(ProcessingContext& pc) final;
39
40 private:
41 void connectTree(const std::string& filename);
42
43 std::unique_ptr<TFile> mFile;
44 std::unique_ptr<TTree> mTree;
45
46 bool mUseMC = true; // use MC truth
48
49 std::vector<o2::zdc::BCRecData>* mBCRecData = nullptr;
50 std::vector<o2::zdc::ZDCEnergy>* mZDCEnergy = nullptr;
51 std::vector<o2::zdc::ZDCTDCData>* mZDCTDCData = nullptr;
52 std::vector<uint16_t>* mZDCInfo = nullptr;
53
54 std::string mInputFileName = "zdcreco.root";
55 std::string mRecEventTreeName = "o2rec";
56 std::string mBCRecDataBranchName = "ZDCRecBC";
57 std::string mZDCEnergyBranchName = "ZDCRecE";
58 std::string mZDCTDCDataBranchName = "ZDCRecTDC";
59 std::string mZDCInfoBranchName = "ZDCRecInfo";
60};
61
65
66} // namespace zdc
67} // namespace o2
68
69#endif /* O2_ZDC_RECEVENTREADER_SPEC */
Class to describe reconstructed ZDC event (single BC with signal in one of detectors)
~RecEventReader() override=default
void run(ProcessingContext &pc) final
void init(InitContext &ic) final
constexpr o2::header::DataOrigin gDataOriginZDC
Definition DataHeader.h:578
Defining PrimaryVertex explicitly as messageable.
Definition TFIDInfo.h:20
struct o2::upgrades_utils::@463 zdc
structure to keep FT0 information
framework::DataProcessorSpec getRecEventReaderSpec(bool useMC)
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
std::string filename()