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_MFT_TRACKREADER
15#define O2_MFT_TRACKREADER
16
17#include "TFile.h"
18#include "TTree.h"
19
21#include "Framework/Task.h"
22#include "Headers/DataHeader.h"
27
28namespace o2
29{
30namespace mft
31{
32
34{
35
36 public:
37 TrackReader(bool useMC = true);
38 ~TrackReader() override = default;
39 void init(o2::framework::InitContext& ic) final;
41
42 protected:
43 void connectTree(const std::string& filename);
44
45 std::vector<o2::itsmft::ROFRecord> mROFRec, *mROFRecInp = &mROFRec;
46 std::vector<o2::mft::TrackMFT> mTracks, *mTracksInp = &mTracks;
47 std::vector<int> mClusInd, *mClusIndInp = &mClusInd;
48 std::vector<o2::MCCompLabel> mMCTruth, *mMCTruthInp = &mMCTruth;
49
51
52 bool mUseMC = true; // use MC truth
53
54 std::unique_ptr<TFile> mFile;
55 std::unique_ptr<TTree> mTree;
56 std::string mInputFileName = "";
57 std::string mTrackTreeName = "o2sim";
58 std::string mROFBranchName = "MFTTracksROF";
59 std::string mTrackBranchName = "MFTTrack";
60 std::string mClusIdxBranchName = "MFTTrackClusIdx";
61 std::string mTrackMCTruthBranchName = "MFTTrackMCTruth";
62};
63
67
68} // namespace mft
69} // namespace o2
70
71#endif /* O2_MFT_TRACKREADER */
Definition of the ITSMFT ROFrame (trigger) record.
Definition of a container to keep Monte Carlo truth external to simulation objects.
std::vector< int > * mClusIndInp
std::string mTrackMCTruthBranchName
void init(o2::framework::InitContext &ic) final
std::vector< o2::itsmft::ROFRecord > mROFRec
std::vector< o2::mft::TrackMFT > mTracks
void run(o2::framework::ProcessingContext &pc) final
std::unique_ptr< TTree > mTree
std::vector< o2::MCCompLabel > mMCTruth
~TrackReader() override=default
std::string mTrackBranchName
std::vector< int > mClusInd
std::vector< o2::MCCompLabel > * mMCTruthInp
std::unique_ptr< TFile > mFile
std::string mClusIdxBranchName
std::vector< o2::itsmft::ROFRecord > * mROFRecInp
std::vector< o2::mft::TrackMFT > * mTracksInp
o2::header::DataOrigin mOrigin
void connectTree(const std::string &filename)
constexpr o2::header::DataOrigin gDataOriginMFT
Definition DataHeader.h:572
framework::DataProcessorSpec getMFTTrackReaderSpec(bool useMC=true)
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
std::string filename()