Project
Loading...
Searching...
No Matches
PHOSDigitWriterSpec.h
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
12#ifndef STEER_DIGITIZERWORKFLOW_PHOSDIGITWRITER_H_
13#define STEER_DIGITIZERWORKFLOW_PHOSDIGITWRITER_H_
14
15#include <vector>
18#include "Framework/InputSpec.h"
23
24namespace o2
25{
26namespace phos
27{
28
29template <typename T>
30using BranchDefinition = framework::MakeRootTreeWriterSpec::BranchDefinition<T>;
31
33{
36 if (mctruth) {
37 return MakeRootTreeWriterSpec("PHOSDigitWriter",
38 "phosdigits.root",
39 "o2sim",
40 1,
41 BranchDefinition<std::vector<o2::phos::Digit>>{InputSpec{"phosdigits", "PHS", "DIGITS"}, "PHOSDigit"},
42 BranchDefinition<std::vector<o2::phos::TriggerRecord>>{InputSpec{"phosdigitstrigrec", "PHS", "DIGITTRIGREC"}, "PHOSDigitTrigRecords"},
43 BranchDefinition<o2::dataformats::MCTruthContainer<o2::phos::MCLabel>>{InputSpec{"phosdigitsmc", "PHS", "DIGITSMCTR"}, "PHOSDigitMCTruth"})();
44 } else {
45 return MakeRootTreeWriterSpec("PHOSDigitWriter",
46 "phosdigits.root",
47 "o2sim",
48 1,
49 BranchDefinition<std::vector<o2::phos::Digit>>{InputSpec{"phosdigits", "PHS", "DIGITS"}, "PHOSDigit"},
50 BranchDefinition<std::vector<o2::phos::TriggerRecord>>{InputSpec{"phosdigitstrigrec", "PHS", "DIGITTRIGREC"}, "PHOSDigitTrigRecords"})();
51 }
52}
53
54} // namespace phos
55} // namespace o2
56
57#endif /* STEER_DIGITIZERWORKFLOW_PHOSDIGITWRITERSPEC_H */
Definition of a container to keep Monte Carlo truth external to simulation objects.
Configurable generator for RootTreeWriter processor spec.
Generate a processor spec for the RootTreeWriter utility.
o2::framework::DataProcessorSpec getPHOSDigitWriterSpec(bool mctruth)
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...