#include #include #include #include #include "Rtypes.h" #include "TROOT.h" #include "TFile.h" #include "TObjArray.h" #include "TObject.h" #include "TKey.h" #include "TTree.h" #include "TBranch.h" #include "TMapFile.h" struct PPAC{ UShort_t left; UShort_t right; UShort_t up; UShort_t down; UShort_t PPAC_DSSD_TOF; UShort_t PPAC_RF_TOF; UShort_t de; UShort_t xsum; UShort_t ysum; UShort_t x; UShort_t y; }; TTree *data; PPAC ppac; TFile *hist; void tree_init() { data = new TTree("data", "data"); // data->SetAutoSave(savefrequency); data->Branch ("ppac", &ppac, "left/s:right:up:down:PPAC_DSSD_TOF:PPAC_RF_TOF:de:xsum:ysum:x:y"); } Int_t main (int argc, char **argv) { int iarg = 1; /* file sort -- work variables */ char single_file_name[256]; char root_file_name[256]; strcpy (single_file_name,argv[1]); strcpy (root_file_name, argv[2]); hist = new TFile (root_file_name, "RECREATE"); tree_init(); }//end of main