-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ntuple] split RNTupleOptions header
Split RNTupleOptions header in RNTupleReadOptions, RNTupleWriteOptions, and RNTupleWriteOptionsDaos.
- Loading branch information
Showing
23 changed files
with
159 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
/// \file ROOT/RNTupleReadOptions.hxx | ||
/// \ingroup NTuple ROOT7 | ||
/// \author Jakob Blomer <jblomer@cern.ch> | ||
/// \date 2024-02-22 | ||
/// \warning This is part of the ROOT 7 prototype! It will change without notice. It might trigger earthquakes. Feedback | ||
/// is welcome! | ||
|
||
/************************************************************************* | ||
* Copyright (C) 1995-2024, Rene Brun and Fons Rademakers. * | ||
* All rights reserved. * | ||
* * | ||
* For the licensing terms see $ROOTSYS/LICENSE. * | ||
* For the list of contributors see $ROOTSYS/README/CREDITS. * | ||
*************************************************************************/ | ||
|
||
#ifndef ROOT7_RNTupleReadOptions | ||
#define ROOT7_RNTupleReadOptions | ||
|
||
namespace ROOT { | ||
namespace Experimental { | ||
|
||
// clang-format off | ||
/** | ||
\class ROOT::Experimental::RNTupleReadOptions | ||
\ingroup NTuple | ||
\brief Common user-tunable settings for reading ntuples | ||
All page source classes need to support the common options. | ||
*/ | ||
// clang-format on | ||
class RNTupleReadOptions { | ||
public: | ||
enum EClusterCache { | ||
kOff, | ||
kOn, | ||
kDefault = kOn, | ||
}; | ||
|
||
private: | ||
EClusterCache fClusterCache = EClusterCache::kDefault; | ||
unsigned int fClusterBunchSize = 1; | ||
|
||
public: | ||
EClusterCache GetClusterCache() const { return fClusterCache; } | ||
void SetClusterCache(EClusterCache val) { fClusterCache = val; } | ||
unsigned int GetClusterBunchSize() const { return fClusterBunchSize; } | ||
void SetClusterBunchSize(unsigned int val) { fClusterBunchSize = val; } | ||
}; | ||
|
||
} // namespace Experimental | ||
} // namespace ROOT | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
/// \file ROOT/RNTupleWriteOptionsDaos.hxx | ||
/// \ingroup NTuple ROOT7 | ||
/// \author Jakob Blomer <jblomer@cern.ch> | ||
/// \date 2024-02-22 | ||
/// \warning This is part of the ROOT 7 prototype! It will change without notice. It might trigger earthquakes. Feedback | ||
/// is welcome! | ||
|
||
/************************************************************************* | ||
* Copyright (C) 1995-2019, Rene Brun and Fons Rademakers. * | ||
* All rights reserved. * | ||
* * | ||
* For the licensing terms see $ROOTSYS/LICENSE. * | ||
* For the list of contributors see $ROOTSYS/README/CREDITS. * | ||
*************************************************************************/ | ||
|
||
#ifndef ROOT7_RNTupleWriteOptionsDaos | ||
#define ROOT7_RNTupleWriteOptionsDaos | ||
|
||
#include <ROOT/RNTupleWriteOptions.hxx> | ||
|
||
#include <cstdint> | ||
#include <memory> | ||
#include <string> | ||
#include <utility> | ||
|
||
namespace ROOT { | ||
namespace Experimental { | ||
|
||
// clang-format off | ||
/** | ||
\class ROOT::Experimental::RNTupleWriteOptionsDaos | ||
\ingroup NTuple | ||
\brief DAOS-specific user-tunable settings for storing ntuples | ||
*/ | ||
// clang-format on | ||
class RNTupleWriteOptionsDaos : public RNTupleWriteOptions { | ||
std::string fObjectClass{"SX"}; | ||
/// The maximum cage size is set to the equivalent of 16 uncompressed pages - 1MiB by default. Empirically, such a | ||
/// cage size yields acceptable results in throughput and page granularity for most use cases. A `fMaxCageSize` of 0 | ||
/// disables the caging mechanism. | ||
uint32_t fMaxCageSize = 16 * RNTupleWriteOptions::fApproxUnzippedPageSize; | ||
|
||
public: | ||
~RNTupleWriteOptionsDaos() override = default; | ||
std::unique_ptr<RNTupleWriteOptions> Clone() const override | ||
{ | ||
return std::make_unique<RNTupleWriteOptionsDaos>(*this); | ||
} | ||
|
||
const std::string &GetObjectClass() const { return fObjectClass; } | ||
/// Set the object class used to generate OIDs that relate to user data. Any | ||
/// `OC_xxx` constant defined in `daos_obj_class.h` may be used here without | ||
/// the OC_ prefix. | ||
void SetObjectClass(const std::string &val) { fObjectClass = val; } | ||
|
||
uint32_t GetMaxCageSize() const { return fMaxCageSize; } | ||
/// Set the upper bound for page concatenation into cages, in bytes. It is assumed | ||
/// that cage size will be no smaller than the approximate uncompressed page size. | ||
/// To disable page concatenation, set this value to 0. | ||
void SetMaxCageSize(uint32_t cageSz) { fMaxCageSize = cageSz; } | ||
}; | ||
|
||
} // namespace Experimental | ||
} // namespace ROOT | ||
|
||
#endif // ROOT7_RNTupleWriteOptionsDaos |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.