Project
Loading...
Searching...
No Matches
TOFMatchedReaderSpec.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_MATCHINFOREADER
15#define O2_TOF_MATCHINFOREADER
16
17#include "TFile.h"
18#include "TTree.h"
19
21#include "Framework/Task.h"
25
26namespace o2
27{
28namespace tof
29{
30
32{
33 public:
34 TOFMatchedReader(bool useMC, int mode, bool readTracks, bool subSpecStrict = false) : mUseMC(useMC), mMode(mode), mReadTracks(readTracks), mSubSpecStrict(subSpecStrict) {}
35 ~TOFMatchedReader() override = default;
36 void init(o2::framework::InitContext& ic) final;
38
39 private:
40 void connectTree(const std::string& filename);
41
42 bool mUseMC = false;
43 int mMode = 1;
44 bool mReadTracks = false;
45 bool mSubSpecStrict = false;
46
47 std::string mInFileName{"o2match_tof.root"};
48 std::string mInTreeName{"matchTOF"};
49 std::unique_ptr<TFile> mFile = nullptr;
50 std::unique_ptr<TTree> mTree = nullptr;
51 std::vector<o2::dataformats::MatchInfoTOF> mMatches, *mMatchesPtr = &mMatches;
52 std::vector<o2::dataformats::TrackTPCTOF> mTracks, *mTracksPtr = &mTracks;
53 std::vector<o2::MCCompLabel> mLabelTOF, *mLabelTOFPtr = &mLabelTOF;
54};
55
58framework::DataProcessorSpec getTOFMatchedReaderSpec(bool useMC, int mode = 1, bool readTracks = false, bool subSpecStrict = false);
59
60} // namespace tof
61} // namespace o2
62
63#endif /* O2_TOF_MATCHINFOREADER */
Class to store the output of the matching to TOF.
Result of refitting TPC with TOF match constraint.
void run(o2::framework::ProcessingContext &pc) final
void init(o2::framework::InitContext &ic) final
TOFMatchedReader(bool useMC, int mode, bool readTracks, bool subSpecStrict=false)
~TOFMatchedReader() override=default
GLenum mode
Definition glcorearb.h:266
framework::DataProcessorSpec getTOFMatchedReaderSpec(bool useMC, int mode=1, bool readTracks=false, bool subSpecStrict=false)
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
std::string filename()