groups

name language licence
Untitled Snippet
.rootrc C++ Other
.rootlogon.C Other Other
Reading and writing TEvent's C++ Other
Maximum for a histogram when plotting C++ Other
Version number C++ Other
To find out the version number C++ Other
Turn off log scale C++ Other

< 1 2 3 4 5 >



language: C++
licence: Other

Reading and writing TEvent's

options: view full snippetsend to code collector
#include "TFile.h"
#include "TTree.h"
#include "TBrowser.h"
#include "TH2.h"
#include "TRandom.h"
#include "TClassTable.h"
#include "TSystem.h"
#include "TROOT.h"

void tree4w() {

  TFile f("tree4.root","RECREATE");
  TTree t4("t4","A Tree with Events");
  SEvent *event = new SEvent();
  t4.Branch("event_split", &event,16000,99);
	
(Continues...)