Project
Loading...
Searching...
No Matches
TrackCosmicsWriterSpec.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
14#include <vector>
19
20using namespace o2::framework;
21
22namespace o2
23{
24namespace globaltracking
25{
26
27template <typename T>
29using TracksType = std::vector<o2::dataformats::TrackCosmics>;
30using LabelsType = std::vector<o2::MCCompLabel>;
31
33{
34 // A spectator for logging
35 auto logger = [](TracksType const& tracks) {
36 LOG(info) << "Writing " << tracks.size() << " Cosmics Tracks";
37 };
38 return MakeRootTreeWriterSpec("cosmic-track-writer",
39 "cosmics.root",
40 "cosmics",
41 -1, // do not limit number of events to store
42 100, // periodically autosave
43 BranchDefinition<TracksType>{InputSpec{"tracks", "GLO", "COSMICTRC", 0},
44 "tracks",
45 "tracks-branch-name",
46 1,
47 logger},
48 BranchDefinition<LabelsType>{InputSpec{"tracksMC", "GLO", "COSMICTRC_MC", 0},
49 "MCTruth",
50 (useMC ? 1 : 0), // one branch if mc labels enabled
51 ""})();
52}
53
54} // namespace globaltracking
55} // namespace o2
std::vector< o2::MCCompLabel > LabelsType
Configurable generator for RootTreeWriter processor spec.
Result of top-bottom cosmic tracks leg matching.
Generate a processor spec for the RootTreeWriter utility.
Defining PrimaryVertex explicitly as messageable.
Definition TFIDInfo.h:20
framework::DataProcessorSpec getTrackCosmicsWriterSpec(bool useMC)
std::vector< o2::dataformats::GlobalFwdTrack > TracksType
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"