/data3/calcul/jacquem/working_dir/Micromegas/micromegasFrameWork/src/analyse/root/Test_time.C

Go to the documentation of this file.
00001 {
00002   gROOT->Reset();
00003   
00004   gSystem->Load("libMicro.so");
00005   
00006 
00007 
00008   /*Total number of events is 62046*/
00009   /*Number of event with Nchannel != 672 is 17888*/
00010   /*Number of good event (Nch=672) with one single hit (ADC>35) per chamber is 3570*/
00011 
00012 
00013 
00014   bool display = 0;
00015 
00016   
00017   TString path = "/lapp_data/LC/Detecteurs/MicroMegas/data/TB2009/May/Rootfiles/dev/temp/";
00018   //TString path = "/home1/chefdevi/micromegasFrameWork/trunk/src/analyse/Gassiplex/Beam_profile/";
00019   //TString fileName= "beam_profile_alice_pm.root";
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   //for( int i=0;i<nEvent;i++){
00036     
00037     if (display){cout<<"Event # "<<i<<endl;}
00038 
00039     tree.GetEntry(0);
00040     NC = evt->GetNchannel();
00041 
00042 //    Int_t nchannel = evt->GetChannels()->GetEntries();
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 //       histo->Fill(t3);
00059     }
00060 
00061 
00062 
00063     //histo->Draw();
00064 
00065 
00066 }

Generated on Mon Jan 7 13:15:21 2013 for MicromegasFramework by  doxygen 1.4.7