ComPWA
Common Partial-Wave-Analysis Framework
RootDataIO.hpp
Go to the documentation of this file.
1 // Copyright (c) 2013, 2017 The ComPWA Team.
2 // This file is part of the ComPWA framework, check
3 // https://github.com/ComPWA/ComPWA/license.txt for details.
4 
5 #ifndef COMPWA_DATA_ROOTDATAIO_HPP_
6 #define COMPWA_DATA_ROOTDATAIO_HPP_
7 
8 #include <memory>
9 #include <string>
10 
11 #include "Core/Event.hpp"
12 
13 class TTree;
14 
15 namespace ComPWA {
16 namespace Data {
19 namespace Root {
20 
36 ComPWA::EventCollection readData(const std::string &InputFileName,
37  const std::string &TreeName,
38  long long NumberEventsToRead = -1);
39 
47 void writeData(const EventCollection &OutputSample,
48  const std::string &OutputFilePath, const std::string &TreeName,
49  bool OverwriteFile = true);
50 
51 } // namespace Root
52 } // namespace Data
53 } // namespace ComPWA
54 
55 #endif
void writeData(const EventCollection &OutputSample, const std::string &OutputFileName, const std::string &TreeName, bool OverwriteFile)
Write a vector of Events to a ROOT file.
Definition: RootDataIO.cpp:145
ComPWA::EventCollection readData(const std::string &InputFilePath, const std::string &TreeName, long long NumberOfEventsToRead)
Create a vector of Events from a ROOT file.
Definition: RootDataIO.cpp:60