Project
Loading...
Searching...
No Matches
TOFMatchableWriterSpec.cxx
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
18#include "Headers/DataHeader.h"
19#include "TTree.h"
20#include "TBranch.h"
21#include "TFile.h"
23
24using namespace o2::framework;
25
26namespace o2
27{
28namespace tof
29{
30
31template <typename T>
33using MatchableType = std::vector<o2::dataformats::MatchInfoTOFReco>;
34
36{
37 // A spectator for logging
38 auto logger = [](MatchableType const& indata) {
39 LOG(debug) << "RECEIVED MATCHABLE SIZE " << indata.size();
40 };
41 o2::header::DataDescription ddMatchable0{"MATCHABLES_0"};
42 o2::header::DataDescription ddMatchable1{"MATCHABLES_1"};
43 o2::header::DataDescription ddMatchable2{"MATCHABLES_2"};
44 o2::header::DataDescription ddMatchable3{"MATCHABLES_3"};
45 o2::header::DataDescription ddMatchable4{"MATCHABLES_4"};
46 o2::header::DataDescription ddMatchable5{"MATCHABLES_5"};
47 o2::header::DataDescription ddMatchable6{"MATCHABLES_6"};
48 o2::header::DataDescription ddMatchable7{"MATCHABLES_7"};
49 o2::header::DataDescription ddMatchable8{"MATCHABLES_8"};
50 o2::header::DataDescription ddMatchable9{"MATCHABLES_9"};
51 o2::header::DataDescription ddMatchable10{"MATCHABLES_10"};
52 o2::header::DataDescription ddMatchable11{"MATCHABLES_11"};
53 o2::header::DataDescription ddMatchable12{"MATCHABLES_12"};
54 o2::header::DataDescription ddMatchable13{"MATCHABLES_13"};
55 o2::header::DataDescription ddMatchable14{"MATCHABLES_14"};
56 o2::header::DataDescription ddMatchable15{"MATCHABLES_15"};
57 o2::header::DataDescription ddMatchable16{"MATCHABLES_16"};
58 o2::header::DataDescription ddMatchable17{"MATCHABLES_17"};
59 return MakeRootTreeWriterSpec("TOFMatchableWriter",
60 outdef,
61 "matchableTOF",
62 BranchDefinition<MatchableType>{InputSpec{"input0", o2::header::gDataOriginTOF, ddMatchable0, 0}, "TOFMatchableInfo0", "matchableinfo0-branch-name", 1, logger},
63 BranchDefinition<MatchableType>{InputSpec{"input1", o2::header::gDataOriginTOF, ddMatchable1, 0}, "TOFMatchableInfo1", "matchableinfo1-branch-name", 1, logger},
64 BranchDefinition<MatchableType>{InputSpec{"input2", o2::header::gDataOriginTOF, ddMatchable2, 0}, "TOFMatchableInfo2", "matchableinfo2-branch-name", 1, logger},
65 BranchDefinition<MatchableType>{InputSpec{"input3", o2::header::gDataOriginTOF, ddMatchable3, 0}, "TOFMatchableInfo3", "matchableinfo3-branch-name", 1, logger},
66 BranchDefinition<MatchableType>{InputSpec{"input4", o2::header::gDataOriginTOF, ddMatchable4, 0}, "TOFMatchableInfo4", "matchableinfo4-branch-name", 1, logger},
67 BranchDefinition<MatchableType>{InputSpec{"input5", o2::header::gDataOriginTOF, ddMatchable5, 0}, "TOFMatchableInfo5", "matchableinfo5-branch-name", 1, logger},
68 BranchDefinition<MatchableType>{InputSpec{"input6", o2::header::gDataOriginTOF, ddMatchable6, 0}, "TOFMatchableInfo6", "matchableinfo6-branch-name", 1, logger},
69 BranchDefinition<MatchableType>{InputSpec{"input7", o2::header::gDataOriginTOF, ddMatchable7, 0}, "TOFMatchableInfo7", "matchableinfo7-branch-name", 1, logger},
70 BranchDefinition<MatchableType>{InputSpec{"input8", o2::header::gDataOriginTOF, ddMatchable8, 0}, "TOFMatchableInfo8", "matchableinfo8-branch-name", 1, logger},
71 BranchDefinition<MatchableType>{InputSpec{"input9", o2::header::gDataOriginTOF, ddMatchable9, 0}, "TOFMatchableInfo9", "matchableinfo9-branch-name", 1, logger},
72 BranchDefinition<MatchableType>{InputSpec{"input10", o2::header::gDataOriginTOF, ddMatchable10, 0}, "TOFMatchableInfo10", "matchableinfo10-branch-name", 1, logger},
73 BranchDefinition<MatchableType>{InputSpec{"input11", o2::header::gDataOriginTOF, ddMatchable11, 0}, "TOFMatchableInfo11", "matchableinfo11-branch-name", 1, logger},
74 BranchDefinition<MatchableType>{InputSpec{"input12", o2::header::gDataOriginTOF, ddMatchable12, 0}, "TOFMatchableInfo12", "matchableinfo12-branch-name", 1, logger},
75 BranchDefinition<MatchableType>{InputSpec{"input13", o2::header::gDataOriginTOF, ddMatchable13, 0}, "TOFMatchableInfo13", "matchableinfo13-branch-name", 1, logger},
76 BranchDefinition<MatchableType>{InputSpec{"input14", o2::header::gDataOriginTOF, ddMatchable14, 0}, "TOFMatchableInfo14", "matchableinfo14-branch-name", 1, logger},
77 BranchDefinition<MatchableType>{InputSpec{"input15", o2::header::gDataOriginTOF, ddMatchable15, 0}, "TOFMatchableInfo15", "matchableinfo15-branch-name", 1, logger},
78 BranchDefinition<MatchableType>{InputSpec{"input16", o2::header::gDataOriginTOF, ddMatchable16, 0}, "TOFMatchableInfo16", "matchableinfo16-branch-name", 1, logger},
79 BranchDefinition<MatchableType>{InputSpec{"input17", o2::header::gDataOriginTOF, ddMatchable17, 0}, "TOFMatchableInfo17", "matchableinfo17-branch-name", 1, logger})();
80}
81
82} // namespace tof
83} // namespace o2
Configurable generator for RootTreeWriter processor spec.
Class to temporary store the output of the matching to TOF in reconstruction.
std::ostringstream debug
Generate a processor spec for the RootTreeWriter utility.
constexpr o2::header::DataOrigin gDataOriginTOF
Definition DataHeader.h:575
Defining PrimaryVertex explicitly as messageable.
Definition TFIDInfo.h:20
o2::framework::DataProcessorSpec getTOFMatchableWriterSpec(const char *outdef="o2matchable_tof.root")
std::vector< o2::dataformats::MatchInfoTOFReco > MatchableType
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"