Commit in slic/src on MAIN
StdHepLoader.cc+15-261.14 -> 1.15
Removed unused skipEvents function.

slic/src
StdHepLoader.cc 1.14 -> 1.15
diff -u -r1.14 -r1.15
--- StdHepLoader.cc	17 May 2005 21:46:42 -0000	1.14
+++ StdHepLoader.cc	3 Aug 2005 23:15:18 -0000	1.15
@@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/slic/src/StdHepLoader.cc,v 1.14 2005/05/17 21:46:42 jeremy Exp $
+// $Header: /cvs/lcd/slic/src/StdHepLoader.cc,v 1.15 2005/08/03 23:15:18 jeremy Exp $
 
 #include "StdHepLoader.hh"
 
@@ -24,9 +24,9 @@
     openStdHepFile( filename );
   }
 
-  StdHepLoader::StdHepLoader(const char* filename)   
+  StdHepLoader::StdHepLoader(const char* filename)
   {
-    openStdHepFile( filename );    
+    openStdHepFile( filename );
   }
 
   void StdHepLoader::openStdHepFile(const std::string& filename)
@@ -35,7 +35,7 @@
   }
 
   void StdHepLoader::openStdHepFile(const char* filename)
-  {    
+  {
     // set filename
     m_filename = filename;
 
@@ -45,16 +45,16 @@
     // new lStdHep interface
     m_reader = new lStdHep( filename );
 
-    // if error, assume fatal 
+    // if error, assume fatal
     if ( m_reader->getError() ) {
       G4Exception( "StdHepLoader::openStdHepFile() - error opening input file." );
     }
 
     // print open message
-    std::cout << "StdHep file <" 
-	      << filename 
-	      << "> opened with <" 
-	      << m_reader->numEvents() 
+    std::cout << "StdHep file <"
+	      << filename
+	      << "> opened with <"
+	      << m_reader->numEvents()
 	      << "> events."
 	      << std::endl;
   }
@@ -68,21 +68,20 @@
   }
 
   void StdHepLoader::readNextEvent()
-  {    
-    // read and check error code
+  {
+    /* Read the next event and check the error code. */
     if ( m_reader->readEvent() != LSH_SUCCESS ) {
- 
-      // got something other than EOF, which we assume is fatal
+
+      /* The error code was not EOF.  Assume this means a fatal error occurred. */
       if ( m_reader->getError() != LSH_ENDOFFILE ) {
 	G4cout << "ERROR: StdHep errorcode <" << m_reader->getError() << ">." << G4endl;
 	G4Exception("FATAL ERROR: lStdHep reported an unrecoverable error.");
       }
-      // EOF 
+      /* EOF */
       else {
 	m_isEndOfInput = true;
-	//std::cout << "StdHepLoader: End of StdHep input file." << std::endl;
       }
-    }  
+    }
   }
 
   void StdHepLoader::dumpCurrentEvent()
@@ -96,14 +95,4 @@
       std::cerr << "StdHepLoader::dumpCurrentEvent() - StdHep reader was not initialized." << std::endl;
     }
   }
-
-  void StdHepLoader::skipEvents( unsigned int s )
-  {
-    G4int nskipped = 0;
-    for (unsigned int i = 0; i < s; i++ ) {
-      readNextEvent();
-      ++nskipped;
-    }
-    G4cout << "skipped events <" << nskipped << ">" << G4endl;
-  }
 };
CVSspam 0.2.8