Commit in slic on MAIN
include/LcioManager.hh+8-11.46 -> 1.47
       /LcioMcpManager.hh+21-71.40 -> 1.41
       /LcioMcpMessenger.hh+5-21.4 -> 1.5
       /LcioMcpPrinter.hh+15-101.13 -> 1.14
       /LcioMessenger.hh+11.15 -> 1.16
src/EventAction.cc+4-11.23 -> 1.24
   /LcioEventSource.cc+3-41.3 -> 1.4
   /LcioManager.cc+10-111.61 -> 1.62
   /LcioMcpManager.cc+59-201.53 -> 1.54
   /LcioMcpMessenger.cc+23-31.5 -> 1.6
   /LcioMcpPrinter.cc+46-201.15 -> 1.16
   /LcioMessenger.cc+10-11.24 -> 1.25
+205-80
12 modified files
Added geant4 commands for printing initial, final mcp collections and dumping event info.  Misc additional refactoring.

slic/include
LcioManager.hh 1.46 -> 1.47
diff -u -r1.46 -r1.47
--- LcioManager.hh	16 Sep 2005 23:04:35 -0000	1.46
+++ LcioManager.hh	20 Sep 2005 00:34:40 -0000	1.47
@@ -154,10 +154,15 @@
       m_useAutonaming = a;
     }
 
+    void enableDumpEvent(bool p = true)
+    {
+      m_enableDumpEvent = p;
+    }
+
   private:
 
     // add HCs using builder and current ptrs
-    void addHCs();
+    void createHitsCollections();
 
     // LCWriter
     void createWriter();
@@ -220,6 +225,8 @@
 
     // use autonaming?
     bool m_useAutonaming;
+
+    bool m_enableDumpEvent;
   };
 };
 

slic/include
LcioMcpManager.hh 1.40 -> 1.41
diff -u -r1.40 -r1.41
--- LcioMcpManager.hh	16 Sep 2005 23:04:35 -0000	1.40
+++ LcioMcpManager.hh	20 Sep 2005 00:34:40 -0000	1.41
@@ -3,7 +3,6 @@
 
 // slic
 #include "Module.hh"
-#include "LcioMcpPrinter.hh"
 #include "LcioMcpMaps.hh"
 #include "LcioPrimaryGenerator.hh"
 
@@ -17,6 +16,9 @@
 #include "globals.hh"
 #include "G4PrimaryParticle.hh"
 
+// std
+#include <string>
+
 class G4Event;
 class G4TrajectoryContainer;
 
@@ -25,6 +27,7 @@
 
   class LcioMcpMessenger;
   class LcioMcpFactory;
+  class LcioMcpPrinter;
   class Trajectory;
 
   /**
@@ -60,13 +63,13 @@
      * Get the MCP collection generated from StdHep.
      * Creates empty collection if doesn't exist.
      */
-    inline EVENT::LCCollection* getInitialMcpCollection();
+    EVENT::LCCollection* getInitialMcpCollection();
 
     /**
      * Get the MCP collection generated at EndOfEvent.
      * Creates empty collection if doesn't exist.
      */
-    inline EVENT::LCCollection* getFinalMcpCollection();
+    EVENT::LCCollection* getFinalMcpCollection();
 
     void setMinimumTrackingDistance(double minDist);
     double getMinimumTrackingDistance();
@@ -89,12 +92,20 @@
     /* Find a registered MCParticle coll. */
     EVENT::LCCollection* findMcpCollection(const std::string& collName);
 
-    // get the Mcp printer
-    LcioMcpPrinter* getPrinter();
+    /* Print utility functions, using the LcioMcpPrinter. */
+    //    void printMcpCollection(const char*);
+    void printMcpCollection(const std::string& collName);
+    //    void printMcpCollection(const char*, EVENT::LCCollection* coll);
+    void printMcpCollection(const std::string& collName, EVENT::LCCollection* coll);
 
     /* Get the MCParticle data maps. */
     LcioMcpMaps* getMaps();
 
+    void enablePrintFinal(bool p = true);
+    void enablePrintInitial(bool p = true);
+
+    void beginEvent(const G4Event* anEvent);
+
   private:
 
     // clear the maps
@@ -112,14 +123,14 @@
     IMPL::LCEventImpl* m_currentLCEvent;
 
     // printer for MCP debugging
-    LcioMcpPrinter* m_mcpPrinter;
+    LcioMcpPrinter* m_printer;
 
     // user settings
     double m_vertexIsNotEndpointOfParentTolerance;
     double m_minimumTrackingDistance;
 
     // G4 messenger for Mcp handling
-    LcioMcpMessenger* m_mcpMessenger;
+    LcioMcpMessenger* m_messenger;
 
     // map of Mcp colls being tracked by the manager
     McpCollectionMap m_mcpColls;
@@ -129,6 +140,9 @@
 
     /* Collection of maps with MCParticle information. */
     LcioMcpMaps* m_maps;
+
+    bool m_enablePrintFinal;
+    bool m_enablePrintInitial;
   };
 };
 

slic/include
LcioMcpMessenger.hh 1.4 -> 1.5
diff -u -r1.4 -r1.5
--- LcioMcpMessenger.hh	27 Jun 2005 19:17:37 -0000	1.4
+++ LcioMcpMessenger.hh	20 Sep 2005 00:34:40 -0000	1.5
@@ -1,9 +1,10 @@
-// $Header: /cvs/lcd/slic/include/LcioMcpMessenger.hh,v 1.4 2005/06/27 19:17:37 jeremy Exp $
+// $Header: /cvs/lcd/slic/include/LcioMcpMessenger.hh,v 1.5 2005/09/20 00:34:40 jeremy Exp $
 #ifndef slic_LcioMcpMessenger_hh
 #define slic_LcioMcpMessenger_hh 1
 
 #include "G4UIcommand.hh"
 #include "G4UIcmdWithADoubleAndUnit.hh"
+#include "G4UIcmdWithABool.hh"
 #include "G4UIdirectory.hh"
 #include "G4UImessenger.hh"
 
@@ -28,9 +29,11 @@
 
   private:
     G4UIdirectory* m_mcpDir;
-   
+
     G4UIcmdWithADoubleAndUnit* m_minTrackingDistanceCmd;
     G4UIcommand* m_verboseCmd;
+    G4UIcmdWithABool* m_printFinalCollection;
+    G4UIcmdWithABool* m_printInitialCollection;
   };
 };
 

slic/include
LcioMcpPrinter.hh 1.13 -> 1.14
diff -u -r1.13 -r1.14
--- LcioMcpPrinter.hh	27 Jun 2005 19:17:37 -0000	1.13
+++ LcioMcpPrinter.hh	20 Sep 2005 00:34:40 -0000	1.14
@@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/slic/include/LcioMcpPrinter.hh,v 1.13 2005/06/27 19:17:37 jeremy Exp $
+// $Header: /cvs/lcd/slic/include/LcioMcpPrinter.hh,v 1.14 2005/09/20 00:34:40 jeremy Exp $
 #ifndef slic_LcioMcpPrinter_hh
 #define slic_LcioMcpPrinter_hh 1
 
@@ -9,6 +9,9 @@
 #include "EVENT/LCCollection.h"
 #include "EVENT/MCParticle.h"
 
+// SLIC
+#include "LcioMcpManager.hh"
+
 // std
 #include <iostream>
 #include <map>
@@ -30,16 +33,19 @@
   public:
 
     LcioMcpPrinter(std::ostream& os = std::cout);
-
     virtual ~LcioMcpPrinter();
 
   public:
 
-    void printMcpCollection(EVENT::LCCollection* mcpColl);
+    void printMcpCollection(const std::string& collName, EVENT::LCCollection* coll);
 
-    void printMcp(EVENT::MCParticle* mcp);
+  protected:
 
-  private:
+    /* Print from member vars */
+    void printMcpCollection();
+
+    /* Print a single MCParticle line */
+    void printMcp(EVENT::MCParticle* mcp);
 
     // str conv
     static std::string makeDoubleArray3String(const double*);
@@ -53,8 +59,6 @@
     // index of a particle (-1 for not found)
     int findMcpIndex(EVENT::MCParticle* mcp);
 
-    void setMcpColl(EVENT::LCCollection* mcpColl);
-
     // formatting chunks
     inline void sep();
     inline void line();
@@ -82,12 +86,13 @@
     static const int chrg_width;
     static const int e_width;
     static const int stat_width;
-    static const int flags_width; 
-    
+    static const int flags_width;
+
   private:
 
-    EVENT::LCCollection* m_mcpColl;
     std::ostream& m_os;
+    EVENT::LCCollection* m_coll;
+    std::string m_collName;
   };
 };
 

slic/include
LcioMessenger.hh 1.15 -> 1.16
diff -u -r1.15 -r1.16
--- LcioMessenger.hh	27 Jun 2005 19:17:37 -0000	1.15
+++ LcioMessenger.hh	20 Sep 2005 00:34:40 -0000	1.16
@@ -46,6 +46,7 @@
     G4UIcmdWithAnInteger* m_setRunNumberCmd;
     G4UIcmdWithABool* m_storeMomentumCmd;
     G4UIcmdWithABool* m_autonameCmd;
+    G4UIcmdWithABool* m_dumpEventCmd;
   };
 };
 

slic/src
EventAction.cc 1.23 -> 1.24
diff -u -r1.23 -r1.24
--- EventAction.cc	31 Aug 2005 19:38:56 -0000	1.23
+++ EventAction.cc	20 Sep 2005 00:34:42 -0000	1.24
@@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/slic/src/EventAction.cc,v 1.23 2005/08/31 19:38:56 jeremy Exp $
+// $Header: /cvs/lcd/slic/src/EventAction.cc,v 1.24 2005/09/20 00:34:42 jeremy Exp $
 #include "EventAction.hh"
 
 // SLIC
@@ -35,6 +35,9 @@
 
       // trj mgr
       TrajectoryManager::instance()->beginEvent( anEvent );
+
+      /* MCP begin event */
+      LcioMcpManager::instance()->beginEvent(anEvent);
     }
     else {
       std::cout << "BeginOfEventAction - aborted" << std::endl;

slic/src
LcioEventSource.cc 1.3 -> 1.4
diff -u -r1.3 -r1.4
--- LcioEventSource.cc	16 Sep 2005 23:04:40 -0000	1.3
+++ LcioEventSource.cc	20 Sep 2005 00:34:42 -0000	1.4
@@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/slic/src/LcioEventSource.cc,v 1.3 2005/09/16 23:04:40 jeremy Exp $
+// $Header: /cvs/lcd/slic/src/LcioEventSource.cc,v 1.4 2005/09/20 00:34:42 jeremy Exp $
 #include "LcioEventSource.hh"
 
 // slic
@@ -58,11 +58,10 @@
     }
   }
 
-  // @todo Actually use the ostream arg.
   void LcioEventSource::dumpCurrentEvent(std::ostream&)
   {
-    std::cout << "LcioEventSource - Current Mcp Collection" << std::endl;
-    LcioMcpManager::instance()->getPrinter()->printMcpCollection( getCurrentMcpLCCollection() );
+    std::cout << "LcioEventSource - Initial MCParticle Collection" << std::endl;
+    LcioMcpManager::instance()->printMcpCollection("initial");
   }
 
   void LcioEventSource::generate(G4Event* anEvent)

slic/src
LcioManager.cc 1.61 -> 1.62
diff -u -r1.61 -r1.62
--- LcioManager.cc	16 Sep 2005 23:04:40 -0000	1.61
+++ LcioManager.cc	20 Sep 2005 00:34:42 -0000	1.62
@@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/slic/src/LcioManager.cc,v 1.61 2005/09/16 23:04:40 jeremy Exp $
+// $Header: /cvs/lcd/slic/src/LcioManager.cc,v 1.62 2005/09/20 00:34:42 jeremy Exp $
 #include "LcioManager.hh"
 
 // SLIC
@@ -58,7 +58,8 @@
       m_path("."),
       m_fileExistsAction( LcioManager::eFail ),
       m_runNumber(0),
-      m_useAutonaming(false)
+      m_useAutonaming(false),
+      m_enableDumpEvent(false)
   {
     // messenger
     m_messenger = new LcioMessenger(this);
@@ -349,18 +350,19 @@
     // create LCEvent
     createLCEvent();
 
+    // create Mcp coll in LcioMcpManager
+    m_mcpManager->endEvent( G4EventManager::GetEventManager()->GetNonconstCurrentEvent() );
+
     // create mcp collection from input event
     createFinalMcpCollection();
 
     // create HC in current LCEvent from current G4Event using builder
-    addHCs();
+    createHitsCollections();
 
-    // dump event to cout
-#ifdef SLIC_VERBOSE
-    if ( verbose() > 0 ) {
+    // dump event stats to cout
+    if ( m_enableDumpEvent ) {
       LCTOOLS::dumpEvent( m_currentLCEvent );
     }
-#endif
 
     // set timestamp
     setEventTimeStamp();
@@ -380,7 +382,7 @@
     getCurrentLCEvent()->setTimeStamp( TimeUtil::getTimeNS() );
   }
 
-  void LcioManager::addHCs()
+  void LcioManager::createHitsCollections()
   {
     m_HCBuilder->createHCsFromG4Event( G4EventManager::GetEventManager()->GetNonconstCurrentEvent(), m_currentLCEvent );
   }
@@ -397,9 +399,6 @@
 
   void LcioManager::createFinalMcpCollection()
   {
-    // create Mcp coll in LcioMcpManager
-    m_mcpManager->endEvent( G4EventManager::GetEventManager()->GetNonconstCurrentEvent() );
-
     // add Mcp coll to current event
     getCurrentLCEvent()->addCollection( m_mcpManager->getFinalMcpCollection(), "MCParticle" );
   }

slic/src
LcioMcpManager.cc 1.53 -> 1.54
diff -u -r1.53 -r1.54
--- LcioMcpManager.cc	16 Sep 2005 23:04:40 -0000	1.53
+++ LcioMcpManager.cc	20 Sep 2005 00:34:42 -0000	1.54
@@ -1,10 +1,11 @@
-// $Header: /cvs/lcd/slic/src/LcioMcpManager.cc,v 1.53 2005/09/16 23:04:40 jeremy Exp $
+// $Header: /cvs/lcd/slic/src/LcioMcpManager.cc,v 1.54 2005/09/20 00:34:42 jeremy Exp $
 #include "LcioMcpManager.hh"
 
 // SLIC
 #include "LcioMcpMessenger.hh"
 #include "LcioManager.hh"
 #include "LcioMcpFactory.hh"
+#include "LcioMcpPrinter.hh"
 #include "TrajectoryManager.hh"
 #include "PrimaryGeneratorAction.hh"
 #include "EventSourceManager.hh"
@@ -27,6 +28,10 @@
 using EVENT::LCIO;
 using IMPL::LCCollectionVec;
 
+using std::endl;
+using std::cout;
+using std::cerr;
+
 namespace slic
 {
 
@@ -45,13 +50,15 @@
   }
 
   LcioMcpManager::LcioMcpManager()
-    : Module("LcioMcpManager")
+    : Module("LcioMcpManager"),
+      m_enablePrintFinal(false),
+      m_enablePrintInitial(false)
   {
     // create new Mcp messenger instance
-    m_mcpMessenger = new LcioMcpMessenger();
+    m_messenger = new LcioMcpMessenger();
 
     // setup mcp printer
-    m_mcpPrinter = new LcioMcpPrinter();
+    m_printer = new LcioMcpPrinter();
 
     /* Setup the MCParticle factory. */
     m_factory = new LcioMcpFactory(this);
@@ -68,6 +75,10 @@
      */
     m_factory->createFinalMcpCollection();
 
+    if ( m_enablePrintFinal ) {
+      printMcpCollection("final");
+    }
+
 #ifdef SLIC_VERBOSE
     if ( verbose() > 2 ) {
       // print out Mcp processing maps
@@ -79,13 +90,11 @@
 
       // print input coll (if applicable)
       if ( getInitialMcpCollection() ) {
-	std::cout << "INITIAL Mcp Collection..." << std::endl;
-	m_mcpPrinter->printMcpCollection( getInitialMcpCollection() );
+	printMcpCollection("initial");
       }
 
       // always print final coll
-      std::cout << "FINAL Mcp Collection..." << std::endl;
-      m_mcpPrinter->printMcpCollection( getFinalMcpCollection() );
+      printMcpCollection("final");
     }
 #endif
   }
@@ -109,11 +118,12 @@
 
   EVENT::LCCollection* LcioMcpManager::findMcpCollection(const std::string& collName)
   {
-    EVENT::LCCollection* coll = 0;
-    if ( m_mcpColls[collName] ) {
-      coll = m_mcpColls[collName];
-    }
-    return coll;
+    return m_mcpColls[collName];
+//     EVENT::LCCollection* coll = 0;
+//     if ( m_mcpColls[collName] ) {
+//       coll = m_mcpColls[collName];
+//     }
+//     return coll;
   }
 
   void LcioMcpManager::setInitialMcpCollection(EVENT::LCCollection* mcpColl)
@@ -187,11 +197,11 @@
     Verbose::setVerbose(lt);
 
     // also set printer verbosity
-    m_mcpPrinter->setVerbose( lt );
+    m_printer->setVerbose( lt );
   }
 
   // get MCP collection generated at EndOfEvent
-  inline EVENT::LCCollection* LcioMcpManager::getFinalMcpCollection()
+  EVENT::LCCollection* LcioMcpManager::getFinalMcpCollection()
   {
     if ( !findMcpCollection("final") ) {
       createMcpCollection("final");
@@ -200,7 +210,7 @@
     return m_mcpColls["final"];
   }
 
-  inline EVENT::LCCollection* LcioMcpManager::getInitialMcpCollection()
+  EVENT::LCCollection* LcioMcpManager::getInitialMcpCollection()
   {
     if ( !findMcpCollection("initial") ) {
       createMcpCollection("initial");
@@ -219,13 +229,42 @@
     return m_minimumTrackingDistance;
   }
 
-  LcioMcpPrinter* LcioMcpManager::getPrinter()
+  LcioMcpMaps* LcioMcpManager::getMaps()
+  {
+    return m_maps;
+  }
+
+  void LcioMcpManager::enablePrintFinal(bool p)
   {
-    return m_mcpPrinter;
+    m_enablePrintFinal = p;
   }
 
-  LcioMcpMaps* LcioMcpManager::getMaps()
+  void LcioMcpManager::enablePrintInitial(bool p)
   {
-    return m_maps;
+    m_enablePrintInitial = p;
+  }
+
+  void LcioMcpManager::beginEvent(const G4Event*)
+  {
+    if ( m_enablePrintInitial ) {
+      printMcpCollection("initial");
+    }
+  }
+
+  void LcioMcpManager::printMcpCollection(const std::string& collName)
+  {
+    LCCollection* coll = findMcpCollection( collName );
+
+    if ( coll != 0 ) {
+      printMcpCollection(collName, coll);
+    }
+    else {
+      cerr << "LcioMcpManager::printMcpCollection - " + collName + " was not found" << endl;
+    }
+  }
+
+  void LcioMcpManager::printMcpCollection(const std::string& collName, EVENT::LCCollection* coll)
+  {
+    m_printer->printMcpCollection(collName, coll);
   }
 };

slic/src
LcioMcpMessenger.cc 1.5 -> 1.6
diff -u -r1.5 -r1.6
--- LcioMcpMessenger.cc	10 Sep 2005 00:24:29 -0000	1.5
+++ LcioMcpMessenger.cc	20 Sep 2005 00:34:43 -0000	1.6
@@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/slic/src/LcioMcpMessenger.cc,v 1.5 2005/09/10 00:24:29 jeremy Exp $
+// $Header: /cvs/lcd/slic/src/LcioMcpMessenger.cc,v 1.6 2005/09/20 00:34:43 jeremy Exp $
 #include "LcioMcpMessenger.hh"
 
 #include "LcioManager.hh"
@@ -25,9 +25,17 @@
     std::string s;
     is >> s;
 
+    LcioMcpManager* mgr = LcioMcpManager::instance();
+
     // set minimum tracking distance
     if ( cmd == m_minTrackingDistanceCmd ) {
-      LcioMcpManager::instance()->setMinimumTrackingDistance( m_minTrackingDistanceCmd->GetNewDoubleValue( newVals ) );
+      mgr->setMinimumTrackingDistance( m_minTrackingDistanceCmd->GetNewDoubleValue( newVals ) );
+    }
+    else if ( cmd == m_printFinalCollection ) {
+      mgr->enablePrintFinal( m_printFinalCollection->GetNewBoolValue( newVals.c_str() ) );
+    }
+    else if ( cmd == m_printInitialCollection ) {
+      mgr->enablePrintInitial( m_printInitialCollection->GetNewBoolValue( newVals.c_str() ) );
     }
     // set verbosity
     else if ( cmd == m_verboseCmd ) {
@@ -36,7 +44,7 @@
       unsigned int v = (unsigned int) ( StringUtil::toInt( s ) );
 
       // set LcioMcpManager's verbosity
-      LcioMcpManager::instance()->setVerbose( v );
+      mgr->setVerbose( v );
 
       // set TrajectoryManager's verbosity
       TrajectoryManager::instance()->setVerbose( v );
@@ -72,5 +80,17 @@
     m_verboseCmd->SetGuidance( "Set verbosity of LcioMcpManager and the TrajectoryManager. (0-4)" );
     p = new G4UIparameter( "verbose", 'i', false );
     m_verboseCmd->SetParameter( p );
+
+    /* Enable printing of MCParticle collections during the event. */
+    m_printInitialCollection = new G4UIcmdWithABool( "/mcp/printInitialCollection", this );
+    m_printInitialCollection->SetGuidance( "Enable printing of the initial MCParticle collection during event processing." );
+    m_printInitialCollection->SetParameterName("enable", true);
+    m_printInitialCollection->SetDefaultValue(true);
+
+    /* Enable printing of MCParticle collections during the event. */
+    m_printFinalCollection = new G4UIcmdWithABool( "/mcp/printFinalCollection", this );
+    m_printFinalCollection->SetGuidance( "Enable printing of the final MCParticle collection during event processing." );
+    m_printFinalCollection->SetParameterName("enable", true);
+    m_printFinalCollection->SetDefaultValue(true);
   }
 };

slic/src
LcioMcpPrinter.cc 1.15 -> 1.16
diff -u -r1.15 -r1.16
--- LcioMcpPrinter.cc	31 May 2005 19:05:19 -0000	1.15
+++ LcioMcpPrinter.cc	20 Sep 2005 00:34:43 -0000	1.16
@@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/slic/src/LcioMcpPrinter.cc,v 1.15 2005/05/31 19:05:19 jeremy Exp $
+// $Header: /cvs/lcd/slic/src/LcioMcpPrinter.cc,v 1.16 2005/09/20 00:34:43 jeremy Exp $
 
 #include "LcioMcpPrinter.hh"
 
@@ -13,6 +13,8 @@
 
 using namespace std;
 
+using std::cerr;
+using std::cout;
 using std::ios;
 using std::endl;
 
@@ -35,34 +37,58 @@
   const int LcioMcpPrinter::flags_width = 16;
 
   LcioMcpPrinter::LcioMcpPrinter(std::ostream& os)
-    : m_os( os )
+    : m_os(os),
+      m_coll(0),
+      m_collName("")
   {}
 
   LcioMcpPrinter::~LcioMcpPrinter()
   {}
 
-  void LcioMcpPrinter::printMcpCollection( EVENT::LCCollection* mcpColl)
+  void LcioMcpPrinter::printMcpCollection(const std::string& collName, EVENT::LCCollection* coll)
+  {
+    m_coll = coll;
+    m_collName = collName;
+    printMcpCollection();
+  }
+
+  void LcioMcpPrinter::printMcpCollection()
   {
     head();
 
-    colLabels();
+    if ( m_coll != 0 ) {
 
-    setMcpColl( mcpColl );
+      //      LCCollectionVec* mcpCollVec = static_cast<LCCollectionVec*> ( m_coll );
 
-    LCCollectionVec* mcpCollVec = static_cast<LCCollectionVec*> ( m_mcpColl );
+      if ( m_coll->getNumberOfElements() > 0 ) {
 
-    for ( LCCollectionVec::iterator iter = mcpCollVec->begin();
-	  iter != mcpCollVec->end();
-	  iter++ ) {
-      printMcp ( static_cast<EVENT::MCParticle*> (*iter) );
-    }
+	m_os << "Collection Name: " << m_collName << std::endl;
+	m_os << "# of Particles: " << m_coll->getNumberOfElements() << std::endl;
+
+	colLabels();
+
+	LCCollectionVec* vec = static_cast<LCCollectionVec*>(m_coll);
+	for ( LCCollectionVec::iterator iter = vec->begin();
+	      iter != vec->end();
+	      iter++ ) {
+	  printMcp ( static_cast<EVENT::MCParticle*> (*iter) );
+	}
 
 #ifdef SLIC_VERBOSE
-    if ( verbose() > 0 ) {
-      flagLabels();
-    }
+	if ( verbose() > 0 ) {
+	  flagLabels();
+	}
 #endif
 
+      }
+      else {
+	m_os << "COLLECTION IS EMPTY" << std::endl;
+      }
+    }
+    else {
+      m_os << "NO CURRENT MCPARTICLE COLLECTION" << std::endl;
+    }
+
     foot();
   }
 
@@ -239,7 +265,7 @@
   {
     int idx = 0;
     bool fnd = false;
-    LCCollectionVec* mcpCollVec = static_cast<LCCollectionVec*> ( m_mcpColl );
+    LCCollectionVec* mcpCollVec = static_cast<LCCollectionVec*> ( m_coll );
     for ( LCCollectionVec::iterator iter = mcpCollVec->begin();
 	  iter != mcpCollVec->end();
 	  iter++ ) {
@@ -258,11 +284,11 @@
     return idx;
   }
 
-  void LcioMcpPrinter::setMcpColl(EVENT::LCCollection* mcpColl)
-  {
-    assert( mcpColl );
-    m_mcpColl = mcpColl;
-  }
+//   void LcioMcpPrinter::setMcpColl(EVENT::LCCollection* mcpColl)
+//   {
+//     assert( mcpColl );
+//     m_coll = mcpColl;
+//   }
 
   inline void LcioMcpPrinter::sep()
   {

slic/src
LcioMessenger.cc 1.24 -> 1.25
diff -u -r1.24 -r1.25
--- LcioMessenger.cc	27 Jun 2005 18:51:29 -0000	1.24
+++ LcioMessenger.cc	20 Sep 2005 00:34:43 -0000	1.25
@@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/slic/src/LcioMessenger.cc,v 1.24 2005/06/27 18:51:29 jeremy Exp $
+// $Header: /cvs/lcd/slic/src/LcioMessenger.cc,v 1.25 2005/09/20 00:34:43 jeremy Exp $
 #include "LcioMessenger.hh"
 
 // SLIC
@@ -78,6 +78,9 @@
 
       m_mgr->useAutonaming( an );
     }
+    else if ( cmd == m_dumpEventCmd ) {
+      m_mgr->enableDumpEvent( m_dumpEventCmd->GetNewBoolValue( newVals.c_str() ) );
+    }
     // flags
     else if ( cmd == m_setLongFlagCmd || cmd == m_setPDGFlagCmd ) {
 
@@ -175,5 +178,11 @@
     m_autonameCmd->SetGuidance( "Use automatic file naming." );
     m_autonameCmd->SetParameterName( "enable", 'b', true );
     m_autonameCmd->SetDefaultValue( true );
+
+    /* dumping of event data */
+    m_dumpEventCmd = new G4UIcmdWithABool( "/lcio/dumpEvent", this );
+    m_dumpEventCmd->SetGuidance( "Dump information about collections in the event" );
+    m_dumpEventCmd->SetParameterName("enable", true);
+    m_dumpEventCmd->SetDefaultValue(true);
   }
 };
CVSspam 0.2.8