Skip to content
Snippets Groups Projects
Commit 971c5895 authored by Brian Bockelman's avatar Brian Bockelman Committed by Philippe Canal
Browse files

Fix name alignment in TTree.h.

parent 7bb42e7e
No related branches found
No related tags found
No related merge requests found
......@@ -22,6 +22,9 @@ class TList;
class TFile;
class TDirectory;
namespace ROOT {
class TIOFeatures;
} // namespace ROOT
class TFileMerger : public TObject {
private:
......@@ -39,6 +42,7 @@ protected:
Bool_t fCompressionChange;///< True if the output and input have different compression level (default kFALSE)
Int_t fPrintLevel; ///< How much information to print out at run time
TString fMergeOptions; ///< Options (in string format) to be passed down to the Merge functions
ROOT::TIOFeatures *fIOFeatures{nullptr}; ///< IO features to use in the output file.
TString fMsgPrefix; ///< Prefix to be used when printing informational message (default TFileMerger)
Int_t fMaxOpenedFiles; ///< Maximum number of files opened at the same time by the TFileMerger
......@@ -83,6 +87,7 @@ public:
const char *GetMergeOptions() { return fMergeOptions; }
void SetMergeOptions(const TString &options) { fMergeOptions = options; }
void SetMergeOptions(const std::string_view &options) { fMergeOptions = options; }
void SetIOFeatures(ROOT::TIOFeatures &features) { fIOFeatures = &features; }
void AddObjectNames(const char *name) {fObjectNames += name; fObjectNames += " ";}
const char *GetObjectNames() const {return fObjectNames.Data();}
void ClearObjectNames() {fObjectNames.Clear();}
......
......@@ -71,6 +71,7 @@
*/
#include "RConfig.h"
#include "ROOT/TIOFeatures.hxx"
#include <string>
#include "TFile.h"
#include "THashList.h"
......@@ -120,6 +121,8 @@ int main( int argc, char **argv )
" to request to use the system maximum." << std::endl;
std::cout << "If the option -cachesize is used, hadd will resize (or disable if 0) the\n"
" prefetching cache use to speed up I/O operations." << std::endl;
std::cout << "If the option -experimental-io-features is used (and an argument provided), then\n"
" the corresponding experimental feature will be enabled for output trees." << std::endl;
std::cout << "When -the -f option is specified, one can also specify the compression level of\n"
" the target file. By default the compression level is 1." <<std::endl;
std::cout << "If \"-fk\" is specified, the target file contain the baskets with the same\n"
......@@ -144,6 +147,7 @@ int main( int argc, char **argv )
return 1;
}
ROOT::TIOFeatures features;
Bool_t append = kFALSE;
Bool_t force = kFALSE;
Bool_t skip_errors = kFALSE;
......@@ -271,6 +275,20 @@ int main( int argc, char **argv )
}
}
++ffirst;
} else if (!strcmp(argv[a], "-experimental-io-features")) {
if (a+1 >= argc) {
std::cerr << "Error: no IO feature was specified after -experimental-io-features; ignoring\n";
} else {
std::stringstream ss;
ss.str(argv[++a]);
++ffirst;
std::string item;
while (std::getline(ss, item, ',')) {
if (!features.Set(item)) {
std::cerr << "Ignoring unknown feature request: " << item << std::endl;
}
}
}
} else if ( strcmp(argv[a],"-n") == 0 ) {
if (a+1 >= argc) {
std::cerr << "Error: no maximum number of opened was provided after -n.\n";
......@@ -455,6 +473,7 @@ int main( int argc, char **argv )
}
merger.SetNotrees(noTrees);
merger.SetMergeOptions(cacheSize);
merger.SetIOFeatures(features);
Bool_t status;
if (append)
status = merger.PartialMerge(TFileMerger::kIncremental | TFileMerger::kAll);
......
......@@ -69,6 +69,8 @@ class TVirtualPerfStats;
class TTree : public TNamed, public TAttLine, public TAttFill, public TAttMarker {
using TIOFeatures = ROOT::TIOFeatures;
protected:
Long64_t fEntries; ///< Number of entries
// NOTE: cannot use std::atomic for these counters as it cannot be serialized.
......@@ -100,7 +102,7 @@ protected:
Int_t fDebug; ///<! Debug level
Long64_t fDebugMin; ///<! First entry number to debug
Long64_t fDebugMax; ///<! Last entry number to debug
ROOT::TIOFeatures fIOFeatures{0}; ///<! IO features to define for newly-written baskets and branches.
TIOFeatures fIOFeatures{0}; ///<! IO features to define for newly-written baskets and branches.
Int_t fMakeClass; ///<! not zero when processing code generated by MakeClass
Int_t fFileNumber; ///<! current file number (if file extensions)
TObject *fNotify; ///<! Object to be notified when loading a Tree
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment