Project
Loading...
Searching...
No Matches
DigitWriterSpec.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
17#include "Framework/InputSpec.h"
20
21namespace o2
22{
23namespace ctp
24{
25template <typename T>
27
29{
32 // Spectators for logging
33 auto logger = [](std::vector<o2::ctp::CTPDigit> const& vecDigits) {
34 LOG(info) << "CTPDigitWriter pulled " << vecDigits.size() << " digits";
35 };
36 if (raw) {
37 return MakeRootTreeWriterSpec("ctp-digit-writer-dec", "ctpdigits.root",
38 MakeRootTreeWriterSpec::TreeAttributes{"o2sim", "Tree with CTP digits/Lumi"},
39 BranchDefinition<std::vector<o2::ctp::CTPDigit>>{InputSpec{"digit", "CTP", "DIGITS", 0}, "CTPDigits", logger},
40 BranchDefinition<o2::ctp::LumiInfo>{InputSpec{"CTPLumi", "CTP", "LUMI", 0}, "CTPLumi"})();
41 }
42 // MC digits case, no lumi available
43 return MakeRootTreeWriterSpec("ctp-digit-writer", "ctpdigits.root",
44 MakeRootTreeWriterSpec::TreeAttributes{"o2sim", "Tree with CTP digits"},
45 BranchDefinition<std::vector<o2::ctp::CTPDigit>>{InputSpec{"digit", "CTP", "DIGITS", 0}, "CTPDigits", logger})();
46}
47
48} // namespace ctp
49} // namespace o2
definition of CTPDigit, CTPInputDigit
Configurable generator for RootTreeWriter processor spec.
Generate a processor spec for the RootTreeWriter utility.
framework::DataProcessorSpec getDigitWriterSpec(bool raw=true)
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"