Logo coherent WaveBurst  
Library Reference Guide
Logo
TestGetTreeDetector.C
Go to the documentation of this file.
1 //
2 // Test get detector info to/from tree
3 // Author : Gabriele Vedovato
4 
5 {
6  #define IFILE_NAME "../../cwbpipe/tutorials/S6A_R4_SIM_BRST_L1H1V1/data/wave_931081200_600_S6A_R4_SIM_BRST_L1H1V1_4.8_job8.root"
7 
8  TFile ifile(IFILE_NAME);
10  TTree* itree = (TTree *) gROOT->FindObject("waveburst");
11  TList* list = itree->GetUserInfo();
12  for (int n=0;n<list->GetSize();n++) {
13  detector* pDetector = (detector*)list->At(n);
14  detectorParams dParams = pDetector->getDetectorParams();
15  if(n==0) pDetector->print();
16  //cout << dParams.name << endl;
17  //cout << pDetector->Name << endl;
18  }
19  ifile.Close();
20 
21  exit(0);
22 }
23 
detectorParams getDetectorParams()
Definition: detector.cc:218
exit(0)
int n
Definition: cwb_net.C:28
static bool checkFile(TString fName, bool question=false, TString message="")
Definition: Toolbox.cc:4670
TTree * itree
#define IFILE_NAME
TList * list
TFile * ifile
void print()
Definition: detector.cc:1797