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
15
#include "
CTPWorkflowIO/DigitWriterSpec.h
"
16
#include "
DPLUtils/MakeRootTreeWriterSpec.h
"
17
#include "
Framework/InputSpec.h
"
18
#include "
DataFormatsCTP/Digits.h
"
19
#include "
DataFormatsCTP/LumiInfo.h
"
20
21
namespace
o2
22
{
23
namespace
ctp
24
{
25
template
<
typename
T>
26
using
BranchDefinition
=
framework::MakeRootTreeWriterSpec::BranchDefinition<T>
;
27
28
framework::DataProcessorSpec
getDigitWriterSpec
(
bool
raw)
29
{
30
using
InputSpec
=
framework::InputSpec
;
31
using
MakeRootTreeWriterSpec
=
framework::MakeRootTreeWriterSpec
;
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
DigitWriterSpec.h
Digits.h
definition of CTPDigit, CTPInputDigit
InputSpec.h
LumiInfo.h
MakeRootTreeWriterSpec.h
Configurable generator for RootTreeWriter processor spec.
o2::framework::MakeRootTreeWriterSpec
Generate a processor spec for the RootTreeWriter utility.
Definition
MakeRootTreeWriterSpec.h:196
o2::ctp::getDigitWriterSpec
framework::DataProcessorSpec getDigitWriterSpec(bool raw=true)
Definition
DigitWriterSpec.cxx:28
o2
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
Definition
BitstreamReader.h:24
o2::framework::DataProcessorSpec
Definition
DataProcessorSpec.h:41
o2::framework::InputSpec
Definition
InputSpec.h:31
o2::framework::MakeRootTreeWriterSpec::BranchDefinition
Definition
MakeRootTreeWriterSpec.h:273
o2::framework::MakeRootTreeWriterSpec::TreeAttributes
Definition
MakeRootTreeWriterSpec.h:315
LOG
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"
Detectors
CTP
workflowIO
src
DigitWriterSpec.cxx
Generated on Tue Feb 25 2025 17:03:01 for Project by
1.9.8