Project
Loading...
Searching...
No Matches
TrackReaderSpec.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_TPC_TRACKREADER
15#define O2_TPC_TRACKREADER
16
17#include "TFile.h"
18#include "TTree.h"
19
21#include "Framework/Task.h"
22#include "Headers/DataHeader.h"
26
27using namespace o2::framework;
28
29namespace o2
30{
31namespace tpc
32{
34
35class TrackReader : public Task
36{
37 public:
38 TrackReader(bool useMC = true);
39 ~TrackReader() override { delete mCluRefVecInp; }
40 void init(InitContext& ic) final;
41 void run(ProcessingContext& pc) final;
42
43 private:
44 void accumulate(int from, int n);
45 void connectTree(const std::string& filename);
46
47 std::vector<o2::tpc::TrackTPC>*mTracksInp = nullptr, mTracksOut;
48 std::vector<o2::tpc::TPCClRefElem>*mCluRefVecInp = nullptr, mCluRefVecOut;
49 std::vector<o2::MCCompLabel>*mMCTruthInp = nullptr, mMCTruthOut;
50
51 std::unique_ptr<TFile> mFile;
52 std::unique_ptr<TTree> mTree;
53
54 bool mUseMC = true;
55 bool mSkipClusRefs = false;
56
57 std::string mInputFileName = "tpctracks.root";
58 std::string mTrackTreeName = "tpcrec";
59 std::string mTrackBranchName = "TPCTracks";
60 std::string mClusRefBranchName = "ClusRefs";
61 std::string mTrackMCTruthBranchName = "TPCTracksMCTruth";
62};
63
67
68} // namespace tpc
69} // namespace o2
70
71#endif /* O2_TPC_TRACKREADER */
Definition of a container to keep Monte Carlo truth external to simulation objects.
< DPL device to read and send the TPC tracks (+MC) info
void init(InitContext &ic) final
void run(ProcessingContext &pc) final
GLdouble n
Definition glcorearb.h:1982
Defining PrimaryVertex explicitly as messageable.
Definition TFIDInfo.h:20
framework::DataProcessorSpec getTPCTrackReaderSpec(bool useMC=true)
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
std::string filename()