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
void memory() | |
{ | |
ProcInfo_t info; | |
gSystem->GetProcInfo(&info); | |
printf(" res memory = %g Mbytes\n",info.fMemResident/1024.); | |
} | |
int repro3() { | |
auto infiles = { |
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
/** | |
Measured values on lxplus | |
source /cvmfs/sft.cern.ch/lcg/app/releases/ROOT/6.18.00/x86_64-centos7-gcc48-opt/bin/thisroot.sh | |
6.18 res memory = 1879.34 Mbytes | |
source /cvmfs/sft.cern.ch/lcg/app/releases/ROOT/6.20.00/x86_64-centos7-gcc48-opt/bin/thisroot.sh | |
6.20 res memory = 2951.23 Mbytes | |
source /cvmfs/sft.cern.ch/lcg/app/releases/ROOT/6.22.00/x86_64-centos7-gcc48-opt/bin/thisroot.sh |
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
#include <vector> | |
#include <iostream> | |
#include <TInterpreter.h> | |
#include <ROOT/RDataFrame.hxx> | |
// http://opendata.cern.ch/record/63 | |
auto filename = "D66F223A-6A9C-E111-AF57-003048F118D4.root"; | |
class FEDRawData | |
{ |
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
/** | |
The idea behind this code is to treat std::array as a C array also for top level | |
TTree branches. This is achieved with template code and works for nested | |
std::arrays too. | |
Only the types which can be put in a leaflist are supported, e.g. no std::array | |
of classes. | |
The idea is to intervene on two template methods of TTree: | |
- `Branch` for writing: when the user inputs the address of a std::array, the | |
code | |
automatically creates a branch for a C style array of the size of the array via |
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
void write() | |
{ | |
int n_muon; | |
float muon_pt[100]; | |
TFile f("f.root", "RECREATE"); | |
TTree t("t","t"); | |
t.Branch("n_muon", &n_muon, "n_muon/I"); | |
t.Branch("muon_pt", muon_pt, "muon_pt[n_muon]/F"); |
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
#include "TTreeReader.h" | |
#include "TTreeReaderArray.h" | |
#include "TTree.h" | |
#include "TLeafF.h" | |
#include "TStopwatch.h" | |
#include "TFile.h" | |
#include "ROOT/TSeq.hxx" | |
#include <ROOT/RDataFrame.hxx> | |
#include <ROOT/RVec.hxx> | |
#include <iostream> |
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 macro demonstrates how to dump columns of fundamental types and vectors | |
thereof into forest using rdf. | |
We achieve this using custom actions. | |
In order to run it: root -b -q rdf2forest.C | |
WARNING: enrich your LinkDef with these lines | |
#ifdef __CLING__ |
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
#include <TFile.h> | |
#include <TKey.h> | |
#include <iostream> | |
#include <string> | |
/* | |
To be ran with ACLIC: root writeSlice.C+ | |
This allows ROOT to build the dictionaries for persistifying the objects. In order |