00001 {
00002 gROOT->Reset();
00003
00004 gSystem->Load("libMicro.so");
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 bool display = 0;
00015
00016
00017 TString path = "/lapp_data/LC/Detecteurs/MicroMegas/data/TB2009/May/Rootfiles/dev/temp/";
00018
00019
00020 TString fileName= "bck_060609_064948_1.cfg.root";
00021
00022 TFile *f = new TFile(path+fileName);
00023 cout<<"reading File : "<<path<<fileName<<endl;
00024 TTree *tree;
00025 tree = (TTree*) f.Get("t1");cout<<"tree built\n";
00026 int nEvent = tree.GetEntries();
00027 MTEvent *evt = new MTEvent();
00028 TBranch *branch= tree->GetBranch("MTEvent");
00029 branch->SetAddress(&evt);
00030 cout <<"nEvent="<<nEvent<<endl;
00031
00032
00033 TH1F * histo = new TH1F("histo","",1e7,0,1e7);
00034
00035
00036
00037 if (display){cout<<"Event # "<<i<<endl;}
00038
00039 tree.GetEntry(0);
00040 NC = evt->GetNchannel();
00041
00042
00043 Int_t nchannel = evt->GetNchannel();
00044
00045 for (int j=0;j<nchannel;j++){
00046
00047 MTChannel* channel = (MTChannel*)evt->GetChannels()->UncheckedAt(j);
00048
00049 evt->SortChannel();
00050 UInt_t t1 = channel->GetBcId_Abs();
00051 UInt_t t2 = channel->GetBcId_Dif();
00052 UInt_t t3 = channel->GetBcId_Hit();
00053 UInt_t value = channel->GetValue();
00054
00055 cout << "t3:[" << t3 << "]" ;
00056 cout << "value:[" << value << "]" ;
00057 cout << "softId:[" << channel->GetSoftId() << "]" << endl;
00058
00059 }
00060
00061
00062
00063
00064
00065
00066 }