-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathcheckalg.C
More file actions
32 lines (25 loc) · 767 Bytes
/
checkalg.C
File metadata and controls
32 lines (25 loc) · 767 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
//
// Read a RAM file.
//
// Author: Fons Rademakers, 29/6/2017
//
#include <TFile.h>
#include <TTree.h>
#include <TRandom.h>
#include <iostream>
#include <Compression.h>
#include "ramrecord.C"
void checkalg(const char *file = "ramexample.root")
{
auto f = TFile::Open(file);
auto t = RAMRecord::GetTree(f);
RAMRecord *r = 0;
t->SetBranchAddress("RAMRecord.", &r);
// t->Print();
std::cout << "LZMA = " << ROOT::kLZMA << std::endl;
std::cout << "GZIP = " << ROOT::kZLIB << std::endl;
std::cout << "COMPALG = " << f->GetCompressionAlgorithm() << std::endl;
std::cout << "COMPLEV = " << f->GetCompressionLevel() << std::endl;
TBranch *b = t->GetBranch("RAMRecord.");
std::cout << "SPLIT = " << b->GetSplitLevel() << std::endl;
}