Project
Loading...
Searching...
No Matches
StrangenessTrackingWriterSpec.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
14
15#include <vector>
17
24
25using namespace o2::framework;
26
27namespace o2
28{
29namespace strangeness_tracking
30{
32
33template <typename T>
35using LabelsType = std::vector<o2::MCCompLabel>;
36using namespace o2::header;
37
39{
40 auto loggerV = [](std::vector<StrangeTrack> const& v) {
41 LOG(info) << "StrangenessTracker writer pulled " << v.size() << " strange tracks";
42 };
43
44 auto inpStTrkID = InputSpec{"strangetracks", "GLO", "STRANGETRACKS", 0};
45 auto inpClusAtt = InputSpec{"clusupdates", "GLO", "CLUSUPDATES", 0};
46 auto inpMCLab = InputSpec{"stkmclabels", "GLO", "STRANGETRACKS_MC", 0};
47
48 return MakeRootTreeWriterSpec("strangenesstracking-writer",
49 "o2_strange_tracks.root",
50 MakeRootTreeWriterSpec::TreeAttributes{"o2sim", "Tree with Strange Tracks"},
51 BranchDefinition<std::vector<StrangeTrack>>{inpStTrkID, "StrangeTracks", loggerV},
53 BranchDefinition<LabelsType>{inpMCLab, "StrangeTrackMCLab", (useMC ? 1 : 0), ""} // one branch if mc labels enabled
54 )();
55}
56
57} // namespace strangeness_tracking
58} // namespace o2
Configurable generator for RootTreeWriter processor spec.
Class to refer to the 1st entry and N elements of some group in the continuous container.
Generate a processor spec for the RootTreeWriter utility.
const GLdouble * v
Definition glcorearb.h:832
Defining PrimaryVertex explicitly as messageable.
Definition TFIDInfo.h:20
O2 data header classes and API, v0.1.
Definition DetID.h:49
std::vector< o2::MCCompLabel > LabelsType
o2::dataformats::StrangeTrack StrangeTrack
o2::framework::DataProcessorSpec getStrangenessTrackingWriterSpec(bool useMC)
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"