Project
Loading...
Searching...
No Matches
TOFCalClusInfoWriterSpec.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
19using namespace o2::framework;
20
21namespace o2
22{
23namespace tof
24{
25template <typename T>
27using OutputType = std::vector<o2::tof::CalibInfoCluster>;
28using OutputCosmicType = std::vector<o2::tof::CosmicInfo>;
29using OutputTrackType = std::vector<o2::tof::CalibInfoTrackCl>;
30using OutputTrackSizeType = std::vector<int>;
31using namespace o2::header;
32
34{
35 // Spectators for logging
36 auto logger = [](OutputType const& indata) {
37 LOG(debug) << "RECEIVED CLUS CAL INFO SIZE " << indata.size();
38 };
39 auto loggerCosmics = [](OutputCosmicType const& indata) {
40 LOG(debug) << "RECEIVED COSMICS INFO SIZE " << indata.size();
41 };
42 auto loggerTracks = [](OutputTrackType const& indata) {
43 LOG(debug) << "RECEIVED COSMICS TRACK CLUSTERS INFO SIZE " << indata.size();
44 };
45 auto loggerTracksSize = [](OutputTrackSizeType const& indata) {
46 LOG(debug) << "RECEIVED COSMICS TRACK INFO SIZE " << indata.size();
47 };
48
49 return MakeRootTreeWriterSpec("TOFCalClusInfoWriter",
50 "tofclusCalInfo.root",
51 "o2sim",
52 BranchDefinition<OutputType>{InputSpec{"clusters", gDataOriginTOF, "INFOCALCLUS", 0},
53 "TOFClusterCalInfo",
54 "tofclusters-branch-name",
55 1,
56 logger},
58 "TOFCosmics",
59 "tofcosmics-branch-name",
60 (isCosmics ? 1 : 0),
61 loggerCosmics},
63 "TOFTracks",
64 "toftracks-branch-name",
65 (isCosmics ? 1 : 0),
66 loggerTracks},
67 BranchDefinition<OutputTrackSizeType>{InputSpec{"tracksize", gDataOriginTOF, "INFOTRACKSIZE", 0},
68 "TOFTracksSize",
69 "toftrackssize-branch-name",
70 (isCosmics ? 1 : 0),
71 loggerTracksSize})();
72}
73} // namespace tof
74} // namespace o2
Info from cosmic.
Configurable generator for RootTreeWriter processor spec.
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 data header classes and API, v0.1.
Definition DetID.h:49
std::vector< o2::tof::CalibInfoCluster > OutputType
std::vector< int > OutputTrackSizeType
std::vector< o2::tof::CalibInfoTrackCl > OutputTrackType
std::vector< o2::tof::CosmicInfo > OutputCosmicType
o2::framework::DataProcessorSpec getTOFCalClusInfoWriterSpec(bool isCosmics=0)
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"