Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:10:48

0001 // Author: Guilherme Amadio, Enrico Guiraud, Danilo Piparo CERN  2/2018
0002 
0003 /*************************************************************************
0004  * Copyright (C) 1995-2018, Rene Brun and Fons Rademakers.               *
0005  * All rights reserved.                                                  *
0006  *                                                                       *
0007  * For the licensing terms see $ROOTSYS/LICENSE.                         *
0008  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
0009  *************************************************************************/
0010 
0011 #ifndef ROOT_RSNAPSHOTOPTIONS
0012 #define ROOT_RSNAPSHOTOPTIONS
0013 
0014 #include <Compression.h>
0015 #include <string_view>
0016 #include <string>
0017 
0018 namespace ROOT {
0019 
0020 namespace RDF {
0021 /// A collection of options to steer the creation of the dataset on file
0022 struct RSnapshotOptions {
0023    using ECAlgo = ROOT::ECompressionAlgorithm;
0024    RSnapshotOptions() = default;
0025    RSnapshotOptions(const RSnapshotOptions &) = default;
0026    RSnapshotOptions(RSnapshotOptions &&) = default;
0027    RSnapshotOptions(std::string_view mode, ECAlgo comprAlgo, int comprLevel, int autoFlush, int splitLevel, bool lazy,
0028                     bool overwriteIfExists = false)
0029       : fMode(mode),
0030         fCompressionAlgorithm(comprAlgo),
0031         fCompressionLevel{comprLevel},
0032         fAutoFlush(autoFlush),
0033         fSplitLevel(splitLevel),
0034         fLazy(lazy),
0035         fOverwriteIfExists(overwriteIfExists)
0036    {
0037    }
0038    std::string fMode = "RECREATE";             ///< Mode of creation of output file
0039    ECAlgo fCompressionAlgorithm = ROOT::kZLIB; ///< Compression algorithm of output file
0040    int fCompressionLevel = 1;                  ///< Compression level of output file
0041    int fAutoFlush = 0;                         ///< AutoFlush value for output tree
0042    int fSplitLevel = 99;                       ///< Split level of output tree
0043    bool fLazy = false;                         ///< Do not start the event loop when Snapshot is called
0044    bool fOverwriteIfExists = false; ///< If fMode is "UPDATE", overwrite object in output file if it already exists
0045 };
0046 } // namespace RDF
0047 } // namespace ROOT
0048 
0049 #endif