APPLICATIONS/FinudaEventDisplay.cxx

00001 // @(#)fROOT/APPLICATIONS:$Name:  $:$Id: FinudaEventDisplay.cxx,v 1.5 2007/09/06 16:21:56 Diego_Faso Exp $
00002 // Author: Diego Faso <mailto:faso@to.infn.it>, 2006/09/25
00003 
00004 #include <TRint.h>
00005 
00006 #include "TThread.h"
00007 #include "TFndEvd.h"
00008 
00009 void FinudaEventDisplay(const Int_t &dtak,const Int_t verb_lev){
00010   
00011   TFndEvd *myevd = new TFndEvd();
00012   gFndGeom->SetVerboseLevel(verb_lev);
00013   
00014   if( myevd->Open(dtak) < 0 ) return;
00015   myevd->SetFndGlViewer();
00016   myevd->MakeConnections();
00017   
00018 }
00019 
00020 int main(int argc, char **argv) {
00021 
00022   Int_t Dtak_num = 2; // (default) number of the selected data-taking
00023   Int_t verb_lev = 0;
00024   if(argc > 3){
00025     cout << "Two arguments only is accepted (data-taking number; verbose level)" << endl;
00026     return 0;
00027   }
00028   if(argc >= 2) Dtak_num = atoi(argv[1]);
00029   if(Dtak_num == 0){
00030     cout << "Data-taking number must be a positive integer." << endl;
00031     return(0);
00032   }
00033   if(argc == 3) verb_lev = atoi(argv[2]);
00034 
00035   //  TApplication *theApp = new TApplication("finuda_event_display", &argc,argv,0,1);
00036   TRint *theApp = new TRint("finuda_event_display",&argc,argv,NULL,0,1);
00037   theApp->ProcessFile(FROOT::ExpandPathName("$FROOTSYS/mcr_called/frootlogon.C"));
00038   theApp->SetPrompt("# froot > ");
00039   FinudaEventDisplay(Dtak_num,verb_lev);
00040   
00041   theApp->Run();
00042   theApp->Terminate(0);
00043   delete theApp;
00044   return(0);
00045 }
00046   
00047  

Generated on Tue Oct 16 15:40:46 2007 by  doxygen 1.5.2