Skip to content
Snippets Groups Projects
Commit 85d5b1ae authored by Frank Gaede's avatar Frank Gaede
Browse files

- fixed logic for displaying multiple events...

parent 6ef494a4
No related branches found
No related tags found
No related merge requests found
...@@ -42,40 +42,38 @@ public: ...@@ -42,40 +42,38 @@ public:
void next_event(){ void next_event(){
static int count = 1 ; static int count = 1 ;
static LCReader* rdr = 0 ; static LCReader* rdr = 0 ;
std::string lcioFileName = "teve_infile.slcio" ; std::string lcioFileName = "teve_infile.slcio" ;
std::cout << " next_event_lcio called ..." << std::endl ; std::cout << " next_event_lcio called ..." << std::endl ;
if( rdr == 0 && count==1 ){ if( count==1 ){
rdr = LCFactory::getInstance()->createLCReader() ; rdr = LCFactory::getInstance()->createLCReader() ;
try{ try{
rdr->open( lcioFileName ) ; rdr->open( lcioFileName ) ;
}catch(lcio::IOException& e) { }catch(lcio::IOException& e) {
std::cout << " ------------------------------------------------------------------------------------------------ " << std::endl std::cout << " ------------------------------------------------------------------------------------------------ " << std::endl
<< "*** file " << lcioFileName << " does not exist - can't read LCIO events ! " << std::endl << "*** file " << lcioFileName << " does not exist - can't read LCIO events ! " << std::endl
<< " will display detector geometry only. Link LCIO file to " << lcioFileName << " to display events ! "<< std::endl << " will display detector geometry only. Link LCIO file to " << lcioFileName << " to display events ! "<< std::endl
<< " -------------------------------------------------------------------------------------------------" << " -------------------------------------------------------------------------------------------------"
<< std::endl ; << std::endl ;
++count ;
return ; return ;
} }
} else {
// nothing to do as inoutfile does not exist:
return ;
} }
if( rdr == 0 )
// nothing to do as inputfile does not exist:
return ;
TEveElementList* tevent = (TEveElementList* ) gEve->GetCurrentEvent() ; TEveElementList* tevent = (TEveElementList* ) gEve->GetCurrentEvent() ;
if( tevent ) if( tevent )
...@@ -121,7 +119,8 @@ void next_event(){ ...@@ -121,7 +119,8 @@ void next_event(){
gEve->Redraw3D(); gEve->Redraw3D();
count += 3 ; ++count ;
//count += 3 ;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment