Project
Loading...
Searching...
No Matches
TOFCalibWriterSpec.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"
21#include "TTree.h"
22#include "TBranch.h"
23#include "TFile.h"
28
29using namespace o2::framework;
30
31namespace o2
32{
33namespace tof
34{
35
36template <typename T>
38using CalibInfosType = std::vector<o2::dataformats::CalibInfoTOF>;
40DataProcessorSpec getTOFCalibWriterSpec(const char* outdef, bool toftpc, bool addDia, bool onlyDia)
41{
42 if (!addDia) {
43 onlyDia = false;
44 }
45 // A spectator for logging
46 auto logger = [](CalibInfosType const& indata) {
47 LOG(debug) << "RECEIVED MATCHED SIZE " << indata.size();
48 };
49 // A spectator for logging
50 auto loggerDia = [](CalibDiaType const& indata) {
51 LOG(debug) << "DIAGNOSTIC WORD SIZE " << indata.size();
52 };
54 o2::header::DataDescription ddCalibDia{"DIAFREQ"};
55 return MakeRootTreeWriterSpec("TOFCalibWriter",
56 outdef,
57 "calibTOF",
59 "TOFCalibInfo",
60 "calibinfo-branch-name",
61 !onlyDia,
62 logger},
64 "TOFDiaInfo",
65 "calibdia-branch-name",
66 addDia,
67 loggerDia})();
68}
69
70} // namespace tof
71} // namespace o2
Class to store the output of the matching to TOF for calibration.
Definition of the TOF cluster.
Definition of the TOF cluster.
Definition of a container to keep Monte Carlo truth external to simulation objects.
Configurable generator for RootTreeWriter processor spec.
Class to store the output of the matching to TOF.
std::ostringstream debug
Generate a processor spec for the RootTreeWriter utility.
Diagnostic class for TOF.
Definition Diagnostic.h:32
constexpr o2::header::DataOrigin gDataOriginTOF
Definition DataHeader.h:575
Defining PrimaryVertex explicitly as messageable.
Definition TFIDInfo.h:20
constexpr o2::header::DataDescription ddCalib
std::vector< o2::dataformats::CalibInfoTOF > CalibInfosType
o2::framework::DataProcessorSpec getTOFCalibWriterSpec(const char *outdef="o2calib_tof.root", bool toftpc=false, bool addDia=false, bool onlyDia=false)
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"