Commits

Anonymous committed 789a73c

ATLAS Gaudi v20r4p6 release

Comments (0)

Files changed (30)

GAUDI_v20r4-branch/ChangeLog

-2009-10-20:
+2010-01-27:
+    - GaudiKernel/Algorithm.cpp: rework to eliminate unchecked status
+      codes when exceptions are thrown.
+	 
+2010-01-14:
+    - GaudiSvc/StatusCodeSvc: filter out libraries, ignore Dicts.so 
+	StatusCodeSvc.Filter = [ function, FNC=function1, FNC=function2,
+	LIB=lib ]
+	StatusCodeSvc.IgnoreDicts = True
+
+2009-12-16:
+    - GaudiSvc/THistSvc.cpp: fire a BeginHistFile FileIncident
+    - GaudiKernel/ProcessDescriptor.cpp: fix bug #59450 (valgrind)
+
+2009-12-14:
+    - GaudiSvc/IncidentSvc.cpp: fix bug in printing out name of Incidents.
+    - GaudiSvc/THistSvc.cpp: don't fire a BeginInputFile FileIncident
+
+2009-12-09:
+    - update to LCG_Configuration-oo-56-04, and oracle:
+
+  unsetenv CVSROOT
+  setenv SVNOFF $SVNROOT
+  cmt co -r LCG_Configuration-00-56-04 LCG_Configuration
+  cmt co -r LCG_Settings-00-56-03-01 LCG_Settings
+  cmt co -r RELAX-00-56-03 LCG_Interfaces/RELAX
+  cmt co -r uuid-00-56-03 LCG_Interfaces/uuid
+  cmt co -r COOL-00-56-03 LCG_Interfaces/COOL
+  cmt co -r CLHEP-00-56-03 LCG_Interfaces/CLHEP
+  cmt co -r CORAL-00-56-03 LCG_Interfaces/CORAL
+  cmt co -r HepPDT-00-56-03 LCG_Interfaces/HepPDT
+  cmt co -r POOL-00-56-03 LCG_Interfaces/POOL
+  cmt co -r Python-00-56-03 LCG_Interfaces/Python
+  cmt co -r ROOT-00-56-03 LCG_Interfaces/ROOT
+  cmt co -r doxygen-00-56-03 LCG_Interfaces/doxygen
+  cmt co -r oracle-00-56-03-01 LCG_Interfaces/oracle
+  cmt co -r pyxml-00-56-03 LCG_Interfaces/pyxml
+	
+
+2009-12-09:
+    - clone from v20r4p6-LCG56d
+	
+2009-12-07:
+    - more overrides for LCG56d
+  svn co $SVNROOT/LCG_Configuration/tags/LCG_Configuration-00-56-03-05 LCG_Configuration
+  svn co $SVNROOT/LCG_Interfaces/RELAX/tags/RELAX-00-56-03 RELAX
+  svn co $SVNROOT/LCG_Interfaces/uuid/tags/uuid-00-56-03 uuid
+  svn co $SVNROOT/LCG_Interfaces/COOL/tags/COOL-00-56-03 COOL
+  svn co $SVNROOT/LCG_Interfaces/CLHEP/tags/CLHEP-00-56-03 CLHEP
+
+2009-12-07:
+    - GaudiSvc/src/THistSvc.cpp: move GlobalDirectoryRestore before
+    initialize
+    - bug #60162
+	
+2009-11-13:
+    - overrides for LCG56d
+  svn co $SVNROOT/LCG_Interfaces/CORAL/tags/CORAL-00-56-03 CORAL
+  svn co $SVNROOT/LCG_Interfaces/HepPDT/tags/HepPDT-00-56-03 HepPDT
+  svn co $SVNROOT/LCG_Interfaces/POOL/tags/POOL-00-56-03 POOL
+  svn co $SVNROOT/LCG_Interfaces/Python/tags/Python-00-56-03 Python
+  svn co $SVNROOT/LCG_Interfaces/ROOT/tags/ROOT-00-56-03 ROOT
+  svn co $SVNROOT/LCG_Interfaces/doxygen/tags/doxygen-00-56-03 doxygen
+  svn co $SVNROOT/LCG_Interfaces/oracle/tags/oracle-00-56-03 oracle
+  svn co $SVNROOT/LCG_Interfaces/pyxml/tags/pyxml-00-56-03 pyxml
+  svn co $SVNROOT/LCG_Settings/tags/LCG_Settings-00-56-03-01 LCG_Settings
+  svn co $SVNROOT/LCG_Configuration/tags/LCG_Configuration-00-56-03-02 LCG_Configuration
+
+	
+2009-11-09:
+    - GaudiSvc/IncidentSvc.cpp: print out name of incident when exception i
+      is caught. bug #57416
+
+2009-11-03:
+    - GaudiKernel: FileIncident.h
+    - GaudiSvc/THistSvc: fire FileIncidents
+2009-10-28:
+    - GaudiKernel: ITHistSvc::exists(name) 
+    - GaudiSvc/THistSvc: THistSvc::exists(name) : test for existence of hist
+
+2009-10-22:
     - GaudiPython: Bindings.py: fix typo (bug #57398)
 
+2009-09-11:
+    - new incidents for EventSelector 
+	GaudiKernel: Incident.h, EventSelectorDataStream.h/cpp
+	GaudiSvc: EventSelector.h/cpp
+	GaudiUtils: IODataManager.h/cpp
+
+2009-08-20:
+    - PartPropSvc/PartPropSvc.cpp: delete things in finalize instead of dtor.
+
 2009-08-07: 
     - THistSvc/THistSvc.cpp: ishared++
 

GAUDI_v20r4-branch/GaudiExamples/cmt/requirements

                           Timing/*.cpp \
                           Selections/*.cpp \
                           SvcInitLoop/*.cpp \
+                          StatusCodeSvc/*.cpp \
                           Dll/GaudiExamples*.cpp
 
 

GAUDI_v20r4-branch/GaudiExamples/options/StatusCodeSvc.opts

+//##############################################################
+// Job options file
+//==============================================================
+
+#include "Common.opts"
+//--------------------------------------------------------------
+// Private Application Configuration options
+//--------------------------------------------------------------
+
+ApplicationMgr.TopAlg = { "SCSAlg"};
+
+//--------------------------------------------------------------
+// Set output level threshold (2=DEBUG, 3=INFO, 4=WARNING, 5=ERROR, 6=FATAL )
+//--------------------------------------------------------------
+
+StatusCodeSvc.OutputLevel = 1;
+StatusCodeSvc.SuppressCheck=false;
+StatusCodeSvc.Filter = { "FNC=SCSAlg::fncUnchecked2()" };
+// StatusCodeSvc.Filter = { "SCSAlg::fncUnchecked2()" };
+// StatusCodeSvc.Filter = { "LIB=libGaudiExamples.so" };
+
+
+//--------------------------------------------------------------
+// Event related parameters
+//--------------------------------------------------------------
+
+// Number of events to be processed (default is 10)
+ApplicationMgr.EvtMax = 5;
+ApplicationMgr.EvtSel = "NONE";
+
+//==============================================================
+//
+// End of job options file
+//
+//##############################################################

GAUDI_v20r4-branch/GaudiExamples/src/PartProp/PartPropExa.cpp

 
   m_pps->setUnknownParticleHandler(new HepPDT::TestUnknownID, "My Unknwon PID Test");
 
+  log << MSG::INFO << "this should cause a warning: " << endreq;
+  m_pps->setUnknownParticleHandler(new HepPDT::TestUnknownID, "Second Unknwon PID Test");
+
   HepPDT::ParticleDataTable *pdt = m_pps->PDT();
 
+  m_pps->setUnknownParticleHandler(new HepPDT::TestUnknownID, "Third Unknwon PID Test");
+
   std::ostringstream ost;
   pdt->writeParticleData( ost );
 

GAUDI_v20r4-branch/GaudiExamples/src/THist/THistRead.cpp

   }
 
   // stream read1, 1D in "/xxx"
+
+  if (! m_ths->exists("/read1/xxx/1Dgauss")) {
+    log << MSG::INFO << "1Dgauss doesn't exist yet, which is OK" << endreq;
+  } else {
+    log << MSG::ERROR << "1Dgauss shouldn't exist yet!!" << endreq;
+  }
+
   TH1 *h1(0);
   if (m_ths->regHist("/read1/xxx/1Dgauss").isFailure() || 
       m_ths->getHist("/read1/xxx/1Dgauss",h1).isFailure()) {
 	<< endreq;
   }
 
+  if (m_ths->exists("/read1/xxx/1Dgauss")) {
+    log << MSG::INFO << "1Dgauss now exists." << endreq;
+  } else {
+    log << MSG::ERROR << "1Dgauss should exist but doesn't!!" << endreq;
+  }
+
   
   // stream read2, 2D tree in "/"
   TH2* h2(0);

GAUDI_v20r4-branch/GaudiKernel/GaudiKernel/EventSelectorDataStream.h

 //	Package    : EventSelectorDataStream  (LHCb Event Selector Package)
 //
 //	Author     : M.Frank
-//  Created    : 4/10/00
+//      Created    : 4/10/00
+//	Changes    : R. Lambert 2009-09-04
 //
 //====================================================================
 #ifndef GAUDIKERNEL_EVENTSELECTORDATASTREAM_H
 
 /** Definition of class EventSelectorDataStream
 
-    Small class which eases the management of multiple 
+    Small class which eases the management of multiple
     input streams for the event selector.
 
     History:
-    +---------+----------------------------------------------+---------+
-    |    Date |                 Comment                      | Who     |
-    +---------+----------------------------------------------+---------+
-    | 3/10/00 | Initial version                              | M.Frank |
-    +---------+----------------------------------------------+---------+
+    +---------+----------------------------------------------+------------+
+    |    Date |                 Comment                      |    Who     |
+    +---------+----------------------------------------------+------------+
+    | 3/10/00 | Initial version                              | M.Frank    |
+    +---------+----------------------------------------------+------------+
+    | 4/09/09 | Added m_dbName and dbName()                  | R. Lambert |
+    +---------+----------------------------------------------+------------+
    @author Markus Frank
+   @author R. Lambert
    @version 1.0
 */
 class EventSelectorDataStream : virtual public IInterface   {
   std::string             m_definition;
   /// Criteria
   std::string             m_criteria;
+  /// String with name of the db as parsed
+  std::string             m_dbName;
   /// Event selector type
   std::string             m_selectorType;
   /// Pointer to valid selector
   const std::string& criteria()   const   {
     return m_criteria;
   }
+  /// Retrieve stream dbName
+  const std::string& dbName()   const   {
+    return m_dbName;
+  }
   /// Retrieve event selector type
   const std::string& selectorType()   const   {
     return m_selectorType;
   IEvtSelector* selector()  const  {
     return m_pSelector;
   }
-  /// Check initialisation status
+  /// Check initialization status
   bool isInitialized()  const   {
     return m_initialized;
   }

GAUDI_v20r4-branch/GaudiKernel/GaudiKernel/FileIncident.h

+#ifndef GAUDIKERNEL_FILEINCIDENT_H
+#define GAUDIKERNEL_FILEINCIDENT_H
+
+/** @file FileIncident.h
+ *  @brief This file contains the class definition for the FileIncident class.
+ *  @author Peter van Gemmeren <gemmeren@anl.gov>
+ *  @author Charles Leggett
+ *  $Id: $
+ **/
+
+#include "GaudiKernel/Incident.h"
+
+#include <string>
+
+/** @class FileIncident
+ *  @brief This class is the FileIncident.
+ **/
+class FileIncident : public Incident {
+public:
+   /// standard constructor
+   FileIncident(const std::string& source,
+           const std::string& type,
+           const std::string& fileName,
+           bool isPayload = false);
+   FileIncident(const std::string& source,
+           const std::string& type,
+           const std::string& fileName,
+           const std::string& fileGuid,
+           bool isPayload = false);
+   FileIncident(const FileIncident& rhs);
+   virtual ~FileIncident();
+
+   /// Overloaded Assignment Operator
+   const FileIncident& operator=(const FileIncident& rhs);
+   const std::string& fileName() const;
+   const std::string& fileGuid() const;
+   bool isPayload() const;
+
+private:
+   std::string m_fileName;
+   std::string m_fileGuid;
+   bool m_isPayload;
+};
+
+inline FileIncident::FileIncident(const std::string& source,
+        const std::string& type,
+        const std::string& fileName,
+        bool isPayload) : Incident(source, type), m_fileName(fileName), m_fileGuid(""), m_isPayload(isPayload) {}
+inline FileIncident::FileIncident(const std::string& source,
+        const std::string& type,
+        const std::string& fileName,
+        const std::string& fileGuid,
+        bool isPayload) : Incident(source, type), m_fileName(fileName), m_fileGuid(fileGuid), m_isPayload(isPayload) {}
+inline FileIncident::FileIncident(const FileIncident& rhs) : Incident(rhs),
+        m_fileName(rhs.m_fileName),
+        m_fileGuid(rhs.m_fileGuid),
+        m_isPayload(rhs.m_isPayload) {}
+inline FileIncident::~FileIncident() {}
+
+inline const FileIncident& FileIncident::operator=(const FileIncident& rhs) {
+   if (this != &rhs) {
+      Incident::operator=(rhs);
+      m_fileName = rhs.m_fileName;
+      m_fileGuid = rhs.m_fileGuid;
+      m_isPayload = rhs.m_isPayload;
+   }
+   return(rhs);
+}
+
+inline const std::string& FileIncident::fileName() const { return(m_fileName); }
+inline const std::string& FileIncident::fileGuid() const { return(m_fileGuid); }
+inline bool FileIncident::isPayload() const { return(m_isPayload); }
+
+#endif

GAUDI_v20r4-branch/GaudiKernel/GaudiKernel/ITHistSvc.h

   virtual StatusCode regGraph(const std::string& name, TGraph*) = 0;
   virtual StatusCode getGraph(const std::string& name, TGraph*&) const = 0;
 
+  virtual bool exists(const std::string& name) const = 0;
+
 };
 
 inline

GAUDI_v20r4-branch/GaudiKernel/GaudiKernel/Incident.h

   const std::string EndStream  = "EndStream";  ///< Processing of the stream has finished
 
   const std::string AbortEvent = "AbortEvent"; ///< Stop processing the current event and pass to te next one
+  
+  //Added by R. Lambert 2009-09-03, for summary services
+  //define a preprocessor macro to allow backward-compatibility
+#define GAUDI_FILE_INCIDENTS
+
+  const std::string BeginOutputFile = "BeginOutputFile"; ///< a new output file has been created
+  const std::string FailOutputFile = "FailOutputFile"; ///< could not create or write to this file
+  const std::string WroteToOutputFile = "WroteToOutputFile"; ///< the output file was written to in this event
+  const std::string EndOutputFile   = "EndOutputFile";   ///< an output file has been finished
+  
+  const std::string BeginInputFile = "BeginInputFile"; ///< a new input file has been started
+  const std::string FailInputFile = "FailInputFile"; ///< could not open or read from this file
+  const std::string EndInputFile   = "EndInputFile";   ///< an input file has been finished
+  
+
 }
 
 #endif //GAUDI_INCIDENT_H

GAUDI_v20r4-branch/GaudiKernel/doc/release.notes

 Package : GaudiKernel
 Package manager : Marco Clemencic
 
+==== ATLAS Gaudi v20r4p6 ===
+
+! 2010-01-27: Charles Leggett 
+    - GaudiKernel/Algorithm.cpp: rework to eliminate unchecked status
+      codes when exceptions are thrown.
+	 
+! 2009-12-16: Charles Leggett 
+    - GaudiKernel/ProcessDescriptor.cpp: fix bug #59450 (valgrind)
+
+! 2009-11-03: Charles Leggett 
+    - GaudiKernel: FileIncident.h
+
+! 2009-10-28: Charles Leggett 
+    - GaudiKernel: ITHistSvc::exists(name) 
+
+! 2009-09-11: Charles Leggett 
+    - new incidents for EventSelector 
+	GaudiKernel: Incident.h, EventSelectorDataStream.h/cpp
+
+
+==== ATLAS Gaudi v20r4p5 ====
+
 ! 2009-07-17: Charles Leggett
     - GaudiKernel/IPartPropSvc
 
 ! 2009-06-10: Charles Leggett
     - GaudiKernel/Service.cpp, AlgTool.cpp: fix unchecked StatusCodes
-	gerenated when exceptions are thrown.
+        gerenated when exceptions are thrown.
 
 ! 2009-05-12: Charles Leggett
     - AlgTool.cpp: don't finalize if state != INITIALIZED

GAUDI_v20r4-branch/GaudiKernel/src/Lib/Algorithm.cpp

       // Invoke the initialize() method of the derived class
       sc = initialize();
     }
-    if( sc.isFailure() ) return StatusCode::FAILURE;
+    if( sc.isSuccess() ) {
 
-    // Now initialize care of any sub-algorithms
-    std::vector<Algorithm *>::iterator it;
-    StatusCode result = StatusCode::SUCCESS;
-    for (it = m_subAlgms->begin(); it != m_subAlgms->end(); it++) {
-      sc = (*it)->sysInitialize();
-      if( sc.isFailure() ) result = sc;
+      // Now initialize care of any sub-algorithms
+      std::vector<Algorithm *>::iterator it;
+      bool fail(false);
+      for (it = m_subAlgms->begin(); it != m_subAlgms->end(); it++) {
+	if ((*it)->sysInitialize().isFailure()) fail = true;
+      }
+    
+      if( fail ) {
+	sc = StatusCode::FAILURE;
+	MsgStream log ( msgSvc() , name() + ".sysInitialize()" );
+	log << MSG::ERROR << " Error initializing one or several sub-algorithms"
+	    << endreq;
+      } else {
+	// Update the state.
+	m_state = m_targetState;
+      }
     }
-    if( result.isFailure() ) {
-      MsgStream log ( msgSvc() , name() + ".sysInitialize()" );
-      log << MSG::ERROR << " Error initializing one or several sub-algorithms"
-          << endreq;
-      return result;
-    }
-    // Update the state.
-    m_state = m_targetState;
-    return StatusCode::SUCCESS;
   }
   catch ( const GaudiException& Exception )  {
     MsgStream log ( msgSvc() , name() + ".sysInitialize()" );
         << " is caught " << endreq;
     log << MSG::ERROR << Exception  << endreq;
     Stat stat( chronoSvc() , Exception.tag() );
+    sc = StatusCode::FAILURE;
   }
   catch( const std::exception& Exception ) {
     MsgStream log ( msgSvc() , name() + ".sysInitialize()" );
     log << MSG::FATAL << " Standard std::exception is caught " << endreq;
     log << MSG::ERROR << Exception.what()  << endreq;
     Stat stat( chronoSvc() , "*std::exception*" );
+    sc = StatusCode::FAILURE;
   }
   catch(...) {
     MsgStream log ( msgSvc() , name() + ".sysInitialize()" );
     log << MSG::FATAL << "UNKNOWN Exception is caught " << endreq;
     Stat stat( chronoSvc() , "*UNKNOWN Exception*" ) ;
+    sc = StatusCode::FAILURE;
   }
 
-  return StatusCode::FAILURE;
+  return sc;
 }
 
 // IAlgorithm implementation
       // Invoke the start() method of the derived class
       sc = start();
     }
-    if( sc.isFailure() ) return StatusCode::FAILURE;
+    if( sc.isSuccess() ) {
 
-    // Now start any sub-algorithms
-    std::vector<Algorithm *>::iterator it;
-    StatusCode result = StatusCode::SUCCESS;
-    for (it = m_subAlgms->begin(); it != m_subAlgms->end(); it++) {
-      sc = (*it)->sysStart();
-      if( sc.isFailure() ) result = sc;
+      // Now start any sub-algorithms
+      std::vector<Algorithm *>::iterator it;
+      bool fail(false);
+      for (it = m_subAlgms->begin(); it != m_subAlgms->end(); it++) {
+	if ((*it)->sysStart().isFailure()) fail = true;
+      }
+      
+      if( fail ) {
+	sc = StatusCode::FAILURE;
+	MsgStream log ( msgSvc() , name() + ".sysInitialize()" );
+	log << MSG::ERROR << " Error initializing one or several sub-algorithms"
+	    << endreq;
+      } else {
+	// Update the state.
+	m_state = m_targetState;
+      }
     }
-    if( result.isFailure() ) {
-      MsgStream log ( msgSvc() , name() + ".sysInitialize()" );
-      log << MSG::ERROR << " Error initializing one or several sub-algorithms"
-          << endreq;
-      return result;
-    }
-    // Update the state.
-    m_state = m_targetState;
-    return StatusCode::SUCCESS;
   }
   catch ( const GaudiException& Exception )  {
     MsgStream log ( msgSvc() , name() );
         << " is caught" << endreq;
     log << MSG::ERROR << Exception << endreq;
     Stat stat( chronoSvc() , Exception.tag() );
+    sc = StatusCode::FAILURE;
   }
   catch( const std::exception& Exception ) {
     MsgStream log ( msgSvc() , name() );
     log << MSG::FATAL << "in sysStart(): standard std::exception is caught" << endreq;
     log << MSG::ERROR << Exception.what()  << endreq;
     Stat stat( chronoSvc() , "*std::exception*" );
+    sc = StatusCode::FAILURE;
   }
   catch(...) {
     MsgStream log ( msgSvc() , name() );
     log << MSG::FATAL << "in sysStart(): UNKNOWN Exception is caught" << endreq;
     Stat stat( chronoSvc() , "*UNKNOWN Exception*" ) ;
+    sc = StatusCode::FAILURE;
   }
 
-  return StatusCode::FAILURE;
+  return sc;
 }
 
 // IAlgorithm implementation
   // Reset Error count
   // m_errorCount = 0; // done during start
 
-  StatusCode sc(StatusCode::SUCCESS,true);
+  StatusCode sc;
   // Invoke reinitialize() method of the derived class inside a try/catch clause
   try {
     { // limit the scope of the guard
       // Invoke the reinitialize() method of the derived class
       sc = reinitialize();
     }
-    if( sc.isFailure() ) return StatusCode::FAILURE;
+    if( sc.isSuccess() ) {
 
-    // Now initialize care of any sub-algorithms
-    std::vector<Algorithm *>::iterator it;
-    StatusCode result = StatusCode::SUCCESS;
-    for (it = m_subAlgms->begin(); it != m_subAlgms->end(); it++) {
-      sc = (*it)->sysReinitialize();
-      if( sc.isFailure() ) result = sc;
+      // Now initialize care of any sub-algorithms
+      std::vector<Algorithm *>::iterator it;
+      bool fail(false);
+      for (it = m_subAlgms->begin(); it != m_subAlgms->end(); it++) {
+	if ((*it)->sysReinitialize().isFailure()) fail = true;
+      }
+      if( fail ) {
+	sc = StatusCode::FAILURE;
+	MsgStream log ( msgSvc() , name() );
+	log << MSG::ERROR
+	    << "sysReinitialize(): Error reinitializing one or several sub-algorithms"
+	    << endreq;
+      }
     }
-    if( result.isFailure() ) {
-      MsgStream log ( msgSvc() , name() );
-      log << MSG::ERROR
-          << "sysReinitialize(): Error reinitializing one or several sub-algorithms"
-          << endreq;
-      return result;
-    }
-    return StatusCode::SUCCESS;
   }
   catch ( const GaudiException& Exception )  {
     MsgStream log ( msgSvc() , name() );
         << " is caught" << endreq;
     log << MSG::ERROR << Exception  << endreq;
     Stat stat( chronoSvc() , Exception.tag() );
+    sc = StatusCode::FAILURE;
   }
   catch( const std::exception& Exception ) {
     MsgStream log ( msgSvc() , name() );
     log << MSG::FATAL << "sysReinitialize(): Standard std::exception is caught" << endreq;
     log << MSG::ERROR << Exception.what()  << endreq;
     Stat stat( chronoSvc() , "*std::exception*" );
+    sc = StatusCode::FAILURE;
   }
   catch(...) {
     MsgStream log ( msgSvc() , name() );
     log << MSG::FATAL << "sysReinitialize(): UNKNOWN Exception is caught" << endreq;
     Stat stat( chronoSvc() , "*UNKNOWN Exception*" ) ;
+    sc = StatusCode::FAILURE;
   }
 
   return StatusCode::FAILURE;
   // Reset Error count
   m_errorCount = 0;
 
-  StatusCode sc(StatusCode::SUCCESS,true);
+  StatusCode sc;
   // Invoke reinitialize() method of the derived class inside a try/catch clause
   try {
     { // limit the scope of the guard
       // Invoke the reinitialize() method of the derived class
       sc = restart();
     }
-    if( sc.isFailure() ) return StatusCode::FAILURE;
+    if( sc.isSuccess() ) {
 
-    // Now initialize care of any sub-algorithms
-    std::vector<Algorithm *>::iterator it;
-    StatusCode result = StatusCode::SUCCESS;
-    for (it = m_subAlgms->begin(); it != m_subAlgms->end(); it++) {
-      sc = (*it)->sysRestart();
-      if( sc.isFailure() ) result = sc;
+      // Now initialize care of any sub-algorithms
+      std::vector<Algorithm *>::iterator it;
+      bool fail(false);
+      for (it = m_subAlgms->begin(); it != m_subAlgms->end(); it++) {
+	if ((*it)->sysRestart().isFailure()) fail = true;
+      }
+      if( fail ) {
+	sc = StatusCode::FAILURE;
+	MsgStream log ( msgSvc() , name() );
+	log << MSG::ERROR
+	    << "sysRestart(): Error restarting one or several sub-algorithms"
+	    << endreq;
+      }
     }
-    if( result.isFailure() ) {
-      MsgStream log ( msgSvc() , name() );
-      log << MSG::ERROR
-          << "sysRestart(): Error restarting one or several sub-algorithms"
-          << endreq;
-      return result;
-    }
-    return StatusCode::SUCCESS;
   }
   catch ( const GaudiException& Exception )  {
     MsgStream log ( msgSvc() , name() );
         << " is caught" << endreq;
     log << MSG::ERROR << Exception  << endreq;
     Stat stat( chronoSvc() , Exception.tag() );
+    sc = StatusCode::FAILURE;
   }
   catch( const std::exception& Exception ) {
     MsgStream log ( msgSvc() , name() );
     log << MSG::FATAL << "sysRestart(): Standard std::exception is caught" << endreq;
     log << MSG::ERROR << Exception.what()  << endreq;
     Stat stat( chronoSvc() , "*std::exception*" );
+    sc = StatusCode::FAILURE;
   }
   catch(...) {
     MsgStream log ( msgSvc() , name() );
     log << MSG::FATAL << "sysRestart(): UNKNOWN Exception is caught" << endreq;
     Stat stat( chronoSvc() , "*UNKNOWN Exception*" ) ;
+    sc = StatusCode::FAILURE;
   }
 
-  return StatusCode::FAILURE;
+  return sc;
 }
 
 // IAlgorithm implementation
       // Invoke the beginRun() method of the derived class
       sc = beginRun();
     }
-    if( sc.isFailure() ) return StatusCode::FAILURE;
+    if( sc.isSuccess() ) {
 
-    // Now call beginRun for any sub-algorithms
-    std::vector<Algorithm *>::iterator it;
-    StatusCode result = StatusCode::SUCCESS;
-    for (it = m_subAlgms->begin(); it != m_subAlgms->end(); it++) {
-      sc = (*it)->sysBeginRun();
-      if( sc.isFailure() ) result = sc;
+      // Now call beginRun for any sub-algorithms
+      std::vector<Algorithm *>::iterator it;
+      bool fail(false);
+      for (it = m_subAlgms->begin(); it != m_subAlgms->end(); it++) {
+	if ((*it)->sysBeginRun().isFailure()) fail = true;
+	
+      }
+      if( fail ) {
+	sc = StatusCode::FAILURE;
+	MsgStream log ( msgSvc() , name() + ".sysBeginRun()" );
+	log << MSG::ERROR << " Error executing BeginRun for one or several sub-algorithms"
+	    << endreq;
+      }
     }
-    if( result.isFailure() ) {
-      MsgStream log ( msgSvc() , name() + ".sysBeginRun()" );
-      log << MSG::ERROR << " Error executing BeginRun for one or several sub-algorithms"
-          << endreq;
-      return result;
-    }
-    return StatusCode::SUCCESS;
   }
   catch ( const GaudiException& Exception )  {
     MsgStream log ( msgSvc() , name() + ".sysBeginRun()" );
         << " is caught " << endreq;
     log << MSG::ERROR << Exception  << endreq;
     Stat stat( chronoSvc() , Exception.tag() );
+    sc = StatusCode::FAILURE;
   }
   catch( const std::exception& Exception ) {
     MsgStream log ( msgSvc() , name() + ".sysBeginRun()" );
     log << MSG::FATAL << " Standard std::exception is caught " << endreq;
     log << MSG::ERROR << Exception.what()  << endreq;
     Stat stat( chronoSvc() , "*std::exception*" );
+    sc = StatusCode::FAILURE;
   }
   catch(...) {
     MsgStream log ( msgSvc() , name() + ".sysBeginRun()" );
     log << MSG::FATAL << "UNKNOWN Exception is caught " << endreq;
     Stat stat( chronoSvc() , "*UNKNOWN Exception*" ) ;
+    sc = StatusCode::FAILURE;
   }
-  return StatusCode::FAILURE;
+  return sc;
+
 }
 
 StatusCode Algorithm::beginRun() {
       // Invoke the endRun() method of the derived class
       sc = endRun();
     }
-    if( sc.isFailure() ) return StatusCode::FAILURE;
+    if( sc.isSuccess() ) {
 
-    // Now call endRun for any sub-algorithms
-    std::vector<Algorithm *>::iterator it;
-    StatusCode result = StatusCode::SUCCESS;
-    for (it = m_subAlgms->begin(); it != m_subAlgms->end(); it++) {
-      sc = (*it)->sysEndRun();
-      if( sc.isFailure() ) result = sc;
+      // Now call endRun for any sub-algorithms
+      std::vector<Algorithm *>::iterator it;
+      bool fail(false);
+      for (it = m_subAlgms->begin(); it != m_subAlgms->end(); it++) {
+	if ((*it)->sysEndRun().isFailure()) fail = true;
+      }
+      if( fail ) {
+	sc = StatusCode::FAILURE;
+	MsgStream log ( msgSvc() , name() + ".sysEndRun()" );
+	log << MSG::ERROR << " Error calling endRun for one or several sub-algorithms"
+	    << endreq;
+      }
     }
-    if( result.isFailure() ) {
-      MsgStream log ( msgSvc() , name() + ".sysEndRun()" );
-      log << MSG::ERROR << " Error calling endRun for one or several sub-algorithms"
-          << endreq;
-      return result;
-    }
-    return StatusCode::SUCCESS;
   }
   catch ( const GaudiException& Exception )  {
     MsgStream log ( msgSvc() , name() + ".sysEndRun()" );
         << " is caught " << endreq;
     log << MSG::ERROR << Exception  << endreq;
     Stat stat( chronoSvc() , Exception.tag() );
+    sc = StatusCode::FAILURE;
   }
   catch( const std::exception& Exception ) {
     MsgStream log ( msgSvc() , name() + ".sysEndRun()" );
     log << MSG::FATAL << " Standard std::exception is caught " << endreq;
     log << MSG::ERROR << Exception.what()  << endreq;
     Stat stat( chronoSvc() , "*std::exception*" );
+    sc = StatusCode::FAILURE;
   }
   catch(...) {
     MsgStream log ( msgSvc() , name() + ".sysEndRun()" );
     log << MSG::FATAL << "UNKNOWN Exception is caught " << endreq;
     Stat stat( chronoSvc() , "*UNKNOWN Exception*" ) ;
+    sc = StatusCode::FAILURE;
   }
-  return StatusCode::FAILURE;
+  return sc;
 }
 
 StatusCode Algorithm::endRun() {
       // Invoke the stop() method of the derived class
       sc = stop();
     }
-    if( sc.isFailure() ) return StatusCode::FAILURE;
+    if( sc.isSuccess() ) {
 
-    // Update the state.
-    m_state = m_targetState;
-    return StatusCode::SUCCESS;
+      // Update the state.
+      m_state = m_targetState;
+    }
   }
   catch ( const GaudiException& Exception )  {
     MsgStream log ( msgSvc() , name() );
         << " is caught" << endreq;
     log << MSG::ERROR << Exception << endreq;
     Stat stat( chronoSvc() , Exception.tag() );
+    sc = StatusCode::FAILURE;
   }
   catch( const std::exception& Exception ) {
     MsgStream log ( msgSvc() , name() );
     log << MSG::FATAL << "in sysStop(): standard std::exception is caught" << endreq;
     log << MSG::ERROR << Exception.what()  << endreq;
     Stat stat( chronoSvc() , "*std::exception*" );
+    sc = StatusCode::FAILURE;
   }
   catch(...) {
     MsgStream log ( msgSvc() , name() );
     log << MSG::FATAL << "in sysStop(): UNKNOWN Exception is caught" << endreq;
     Stat stat( chronoSvc() , "*UNKNOWN Exception*" ) ;
+    sc = StatusCode::FAILURE;
   }
 
-  return StatusCode::FAILURE;
+  return sc;
 }
 
 StatusCode Algorithm::sysFinalize() {
   m_targetState = Gaudi::StateMachine::ChangeState(Gaudi::StateMachine::FINALIZE,m_state);
 
   // Invoke finalize() method of the derived class inside a try/catch clause
-  StatusCode sc = StatusCode::SUCCESS;
+  StatusCode sc;
   try {
     // Order changed (bug #3903 overview: finalize and nested algorithms)
     // Finalize first any sub-algoithms (it can be done more than once)
     std::vector<Algorithm *>::iterator it;
     bool fail(false);
     for (it = m_subAlgms->begin(); it != m_subAlgms->end(); it++) {
-      if (!(*it)->sysFinalize().isSuccess()) {
-	fail = true;
-      }
+      if ((*it)->sysFinalize().isFailure()) fail = true;
     }
 
     { // limit the scope of the guard
       // Invoke the finalize() method of the derived class
       sc = finalize();
     }
-    if( !sc.isSuccess() || fail )  return StatusCode::FAILURE;
 
-    // Release all sub-algorithms
-    for (it = m_subAlgms->begin(); it != m_subAlgms->end(); it++) {
-      (*it)->release();
+    if (fail) sc = StatusCode::FAILURE;
+
+    if( sc.isSuccess() ) {
+
+      // Release all sub-algorithms
+      for (it = m_subAlgms->begin(); it != m_subAlgms->end(); it++) {
+	(*it)->release();
+      }
+      // Indicate that this Algorithm has been finalized to prevent duplicate attempts
+      m_state = m_targetState;
     }
-    // Indicate that this Algorithm has been finalized to prevent duplicate attempts
-    m_state = m_targetState;
-    return sc;
   }
   catch( const GaudiException& Exception ) {
     MsgStream log ( msgSvc() , name() + ".sysFinalize()" );
         << " is caught " << endreq;
     log << MSG::ERROR << Exception  << endreq;
     Stat stat( chronoSvc() , Exception.tag() ) ;
+    sc = StatusCode::FAILURE;
   }
   catch( const std::exception& Exception ) {
     MsgStream log ( msgSvc() , name() + ".sysFinalize()" );
     log << MSG::FATAL << " Standard std::exception is caught " << endreq;
     log << MSG::ERROR << Exception.what()  << endreq;
     Stat stat( chronoSvc() , "*std::exception*" ) ;
+    sc = StatusCode::FAILURE;
   }
   catch( ... ) {
     MsgStream log ( msgSvc() , name() + ".sysFinalize()" );
     log << MSG::FATAL << "UNKNOWN Exception is caught " << endreq;
     Stat stat( chronoSvc() , "*UNKNOWN Exception*" ) ;
+    sc = StatusCode::FAILURE;
   }
-  return StatusCode::FAILURE ;
+  return sc;
 }
 
 StatusCode Algorithm::reinitialize() {

GAUDI_v20r4-branch/GaudiKernel/src/Lib/EventSelectorDataStream.cpp

 //
 //
 //	Author     : M.Frank
-//  Created    : 4/10/00
-//	Changes    : 
+//      Created    : 4/10/00
+//	Changes    : R. Lambert 2009-09-04
 //
 //====================================================================
 #define GAUDISVC_EVENTSELECTOR_EVENTSELECTORDATASTREAM_CPP 1
     cnt = eds->rootName();
   }
   eds->release();
-  m_selectorType = m_criteria = "";
+  m_selectorType = m_criteria = m_dbName= "";
   m_properties->erase(m_properties->begin(), m_properties->end());
 
   tok.analyse(m_definition, " ", "", "", "=", "'", "'");
       break;
     case 'D':
       m_criteria     = "FILE " + val;
+      m_dbName=val;
       break;
     case 'F':
       switch( ::toupper(tag[1]) )    {
       case 'I':
         dbtyp        = "SICB";
         m_criteria   = "FILE " + val;
+	m_dbName=val;
         break;
       case 'U':
         stmt = val;
       break;
     case 'J':
       m_criteria     = "JOBID " + val;
+      m_dbName=val;
       dbtyp          = "SICB";
       break;
     case 'T':
         break;
       case 'A':
         m_criteria   = "TAPE " + val;
+	m_dbName=val;
         dbtyp        = "SICB";
         break;
       default:
       break;
     }
   }
-  if ( !isData )    { // Unfortunaltely options do not come in order...
+  if ( !isData )    { // Unfortunately options do not come in order...
     m_selectorType = "EventCollectionSelector";
   }
   else if ( dbtyp == "SICB" )    {
       status = ipers->getService(dbtyp, icnvSvc);
       if ( status.isSuccess() )   {
         IService* isvc = 0;
-        status = icnvSvc->queryInterface(IID_IService, pp_cast<void>(&isvc));
+        status = icnvSvc->queryInterface(IService::interfaceID(), pp_cast<void>(&isvc));
         if ( status.isSuccess() )   {
           svc = isvc->name();
           isvc->release();

GAUDI_v20r4-branch/GaudiKernel/src/Lib/ProcessDescriptor.cpp

     status = (status==0) ? 1 : 0;
 #elif _WIN32                              // Windows 95,98...
 #elif defined(linux)                      // Linux
-    char buf[1024];
+    const ssize_t bufsize = 1024;
+    char buf[bufsize];
     sprintf(buf,"/proc/%ld/statm", processID(pid));
     long size, resident, share, trs, lrs, drs, dt;
     int fd = open(buf,O_RDONLY);
-    read(fd, buf, sizeof(buf));  
+    ssize_t nread = read(fd, buf, bufsize);
     close(fd);
+    if ( nread < bufsize && nread >= 0 )
+      buf[nread]='\0';
     fd = sscanf(buf, "%ld %ld %ld %ld %ld %ld %ld",
                      &size, &resident, &share, &trs, &drs, &lrs, &dt);
     linux_proc prc;

GAUDI_v20r4-branch/GaudiPolicy/cmt/requirements

       target-gcc&target-i686&host-x86_64 " -m32" \
       target-gcc&target-i386&host-x86_64 " -m32"
 
+# Add 64-bit link options for SLC5. This overrides the default library segment alignment of 1MB
+macro_append componentshr_linkopts "" \
+       target-gcc&slc5&x86_64               " -Wl,-z,max-page-size=0x1000 "
+macro_append libraryshr_linkopts   "" \
+       target-gcc&slc5&x86_64               " -Wl,-z,max-page-size=0x1000 "
+
 macro libraryshr_linkopts   "" \
       target-linux          "-fPIC -ldl -Wl,--as-needed " \
       target-winxp          "/DLL"

GAUDI_v20r4-branch/GaudiPython/doc/release.notes

 Package: GaudiPython
 Package manager : Marco Clemencic
 
+=== ATLAS Gaudi v20r4p5 ===
 ! 2009-10-20: Charles Leggett
-    - Bindings.py: fix typo (bug #57398)
+ - Bindings.py: fix typo (bug #57398)
 
 ================ GaudiPython v9r4 ====================================
 ! 2008-12-16 - Marco Clemencic

GAUDI_v20r4-branch/GaudiRelease/cmt/requirements

 
 package GaudiRelease
 
-version v20r4p5
+version v20r4p6
 branches doc cmt 
 
 # CMT and Gaudi policy

GAUDI_v20r4-branch/GaudiSvc/doc/release.notes

 Package: GaudiSvc
 Package manager : Marco Clemencic
 
+=== ATLAS Gaudi v20r4p6 ===
+
+! 2010-01-14: Charles Leggett
+ - GaudiSvc/StatusCodeSvc: filter out libraries, ignore Dicts.so 
+     StatusCodeSvc.Filter = [ function, FNC=function1, FNC=function2, LIB=lib ]
+     StatusCodeSvc.IgnoreDicts = True
+
+! 2009-12-16: Charles Leggett
+ - GaudiSvc/THistSvc.cpp: fire a BeginHistFile FileIncident
+
+! 2009-12-14: Charles Leggett
+ - GaudiSvc/IncidentSvc.cpp: fix bug in printing out name of Incidents.
+ - GaudiSvc/THistSvc.cpp: don't fire a BeginInputFile FileIncident
+
+! 2009-12-07: Charles Leggett
+ - GaudiSvc/src/THistSvc.cpp: move GlobalDirectoryRestore before initialize
+ - bug #60162
+		
+! 2009-11-09: Charles Leggett
+ - GaudiSvc/IncidentSvc.cpp: print out name of incident when exception is 
+   caught. bug #57416
+
+! 2009-11-03: Charles Leggett
+ - GaudiSvc/THistSvc: fire FileIncidents
+
+! 2009-10-28: Charles Leggett
+ - GaudiSvc/THistSvc: THistSvc::exists(name) : test for existence of hist
+
+! 2009-09-11: Charles Leggett
+ - new incidents for EventSelector 
+   GaudiSvc: EventSelector.h/cpp
+
+=== ATLAS Gaudi v20r4p5 ===
+
 ! 2009-08-07: Charles Leggett
-    - THistSvc/THistSvc.cpp: ishared++
+ - THistSvc/THistSvc.cpp: ishared++
 
 ! 2009-04-03: Charles Leggett
-     - ToolSvc: added start() and stop() methods (bug#48942)
+ - ToolSvc: added start() and stop() methods (bug#48942)
 
 ! 2009-01-27: Charles Leggett
-     - ApplicationMgr/ApplicationMgr.cpp: in terminate(), call finalize
-       on MessageSvc and JobOptionsSvc instead of sysFinalize to avoid
-       auditors segfaulting
+ - ApplicationMgr/ApplicationMgr.cpp: in terminate(), call finalize
+   on MessageSvc and JobOptionsSvc instead of sysFinalize to avoid
+   auditors segfaulting
 
 ! 2009-01-14: Charles Leggett
-     - ExceptionSvc: rewrite, new jobOpt syntax
-     - THistSvc: add int property CompressionLevel for ROOT output file
-                 patch #2754
+ - ExceptionSvc: rewrite, new jobOpt syntax
+ - THistSvc: add int property CompressionLevel for ROOT output file
+             patch #2754
 
 ================ GaudiSvc v17r3 ====================================
 ! 2008-12-11 - Charles Leggett

GAUDI_v20r4-branch/GaudiSvc/src/EventSelector/EventSelector.cpp

         }
       }
     }
+    if(s!=NULL) m_incidentSvc->fireIncident(Incident(s->dbName(),IncidentType::FailInputFile));
   }
 
   iter.set(this, -1, 0, 0);
       if ( it && sel )    { // First exploit the current stream
         StatusCode sc = sel->next(*it);  // This stream is empty: advance to the next stream
         if ( !sc.isSuccess() )   {
+          if(s!=NULL) m_incidentSvc->fireIncident(Incident(s->dbName(),IncidentType::EndInputFile));
           sc = firstOfNextStream(true, *pIt);
           if (sc.isSuccess() ) sc = next(*pIt);
         }

GAUDI_v20r4-branch/GaudiSvc/src/EventSelector/EventSelector.h

     itself is able to connect other services to attached streams.
 
     History:
-    +---------+----------------------------------------------+---------+
-    |    Date |                 Comment                      | Who     |
-    +---------+----------------------------------------------+---------+
-    | 3/10/00 | Initial version                              | M.Frank |
-    +---------+----------------------------------------------+---------+
+    +---------+----------------------------------------------+------------+
+    |    Date |                 Comment                      |    Who     |
+    +---------+----------------------------------------------+------------+
+    | 3/10/00 | Initial version                              | M.Frank    |
+    +---------+----------------------------------------------+------------+
+    | 4/09/09 | Added firing incident on opening/ending file | R. Lambert |
+    +---------+----------------------------------------------+------------+
    @author Markus Frank
    @version 1.0
 */

GAUDI_v20r4-branch/GaudiSvc/src/IncidentSvc/IncidentSvc.cpp

       (*itlist).iListener->handle(incident);
     }
     catch( const GaudiException& exc ) {
-      m_log << MSG::ERROR << "Exception with tag=" << exc.tag() << " is caught " << endreq;
+      m_log << MSG::ERROR << "Exception with tag=" << exc.tag() << " is caught"
+	    << " handling incident " << *m_currentIncidentType << endreq;
       m_log << MSG::ERROR <<  exc  << endreq;
       if ( (*itlist).rethrow ) { throw (exc); }
     }
     catch( const std::exception& exc ) {
-      m_log << MSG::ERROR << "Standard std::exception is caught " << endreq;
+      m_log << MSG::ERROR << "Standard std::exception is caught" 
+	    << " handling incident " << *m_currentIncidentType << endreq;
       m_log << MSG::ERROR << exc.what()  << endreq;
       if ( (*itlist).rethrow ) { throw (exc); }
     }
     catch(...) {
-      m_log << MSG::ERROR << "UNKNOWN Exception is caught " << endreq;
+      m_log << MSG::ERROR << "UNKNOWN Exception is caught " 
+	    << " handling incident " << *m_currentIncidentType << endreq;
       if ( (*itlist).rethrow ) { throw; }
     }
     // check if at least one of the listeners is a one-shot

GAUDI_v20r4-branch/GaudiSvc/src/StatusCodeSvc/StatusCodeSvc.cpp

 //
 ///////////////////////////////////////////////////////////////////////////
 //
+inline void toupper(std::string &s)
+{
+    std::string::iterator it=s.begin();
+    while(it != s.end())
+    {
+        *it = toupper(*it);
+        it++;
+    }
+}
+
 
 StatusCodeSvc::StatusCodeSvc(const std::string& name, ISvcLocator* svc )
   : Service( name, svc )
   declareProperty("Filter",m_pFilter);
   declareProperty("AbortOnError",m_abort=false);
   declareProperty("SuppressCheck", m_suppress=false);
+  declareProperty("IgnoreDicts",m_dict=true);
 
 }
 
   std::vector<std::string>::const_iterator itr;
   for (itr = m_pFilter.value().begin(); itr != m_pFilter.value().end(); ++itr) {
     // we need to do this if someone has gotten to regFnc before initialize
-    filterFnc(*itr);
+    
+    string fnc,lib;
+    parseFilter(*itr,fnc,lib);
 
-    m_filter.insert(*itr);
+    if (fnc != "") {
+      filterFnc(fnc);
+      m_filterfnc.insert(fnc);
+    }
+
+    if (lib != "") {
+      filterLib(lib);
+      m_filterlib.insert(lib);
+    }
+
   }
 
   return StatusCode::SUCCESS;
     return;
   }
 
-  if (m_filter.find(fnc) != m_filter.end()) {
+  if (m_dict && lib.rfind("Dict.so") == (lib.length()-7) ) {
+    return;
+  }
+
+  int i1 = lib.rfind("/",lib.length());
+  string rlib = lib.substr(i1+1,lib.length()-i1-1);
+
+
+  if (m_filterfnc.find(fnc) != m_filterfnc.end() || 
+      m_filterlib.find(rlib) != m_filterlib.end() ) {
     return;
   }
 
 
 
 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
 void
-StatusCodeSvc::filterFnc(std::string str) {
+StatusCodeSvc::filterFnc(const std::string& str) {
 
   std::map<std::string, StatCodeDat>::iterator itr;
   for (itr = m_dat.begin(); itr != m_dat.end(); ++itr ) {
   }
 
 }
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+void
+StatusCodeSvc::filterLib(const std::string& str) {
+
+  std::map<std::string, StatCodeDat>::iterator itr;
+  for (itr = m_dat.begin(); itr != m_dat.end(); ++itr ) {
+    if (itr->second.lib == str) {
+      m_dat.erase(itr);
+      return;
+    }
+      
+  }
+
+}
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+void
+StatusCodeSvc::parseFilter(const string& str, string& fnc, string& lib) {
+
+
+  string::size_type loc = str.find("=");
+  if (loc == std::string::npos) {
+    fnc = str;
+    lib = "";
+  } else {
+    string key,val;
+    key = str.substr(0,loc);
+    val = str.substr(loc+1,str.length()-loc-1);
+
+    toupper(key);
+
+    if (key == "FCN" || key == "FNC") {
+      fnc = val;
+      lib = "";
+    } else if (key == "LIB") {
+      fnc = "";
+      lib = val;
+    } else {
+      fnc = "";
+      lib = "";
+
+      MsgStream log( msgSvc(), name() );
+      log << MSG::WARNING << "ignoring unknown token in Filter: " << str 
+	  << endreq;
+    }
+  }
+
+}

GAUDI_v20r4-branch/GaudiSvc/src/StatusCodeSvc/StatusCodeSvc.h

   };
 
 
-  void filterFnc(std::string);
+  void parseFilter(const std::string& str, std::string& fnc, std::string& lib);
+  void filterFnc(const std::string&);
+  void filterLib(const std::string&);
 
   // Allow SvcFactory to instantiate the service.
   friend class SvcFactory<StatusCodeSvc>;
 
   StringArrayProperty m_pFilter;
-  BooleanProperty m_abort;
-  BooleanProperty m_suppress;
+  BooleanProperty m_abort, m_suppress, m_dict;
 
   std::map<std::string,StatCodeDat> m_dat;
-  std::set<std::string> m_filter;
+  std::set<std::string> m_filterfnc, m_filterlib;
 
 
 };

GAUDI_v20r4-branch/GaudiSvc/src/THistSvc/THistSvc.cpp

 #include "GaudiKernel/Tokenizer.h"
 #include "GaudiKernel/GaudiException.h"
 #include "GaudiKernel/Property.h"
+#include "GaudiKernel/IIncidentSvc.h"
+#include "GaudiKernel/FileIncident.h"
 
 #include "TROOT.h"
 #include "TFile.h"
 
 StatusCode
 THistSvc::initialize() {
+  GlobalDirectoryRestore restore;
+
   m_alreadyConnectedOutFiles.clear();
   m_alreadyConnectedInFiles.clear();
 
   StatusCode status = Service::initialize();
 
-  GlobalDirectoryRestore restore;
-
   if (status.isFailure()) {
     MsgStream log ( msgSvc(), name() );
     log << MSG::ERROR << "initializing service" << endreq;
 
     itr->second.first->Close();
 
+    IIncidentSvc *pi(0);
+    if (service("IncidentSvc",pi).isFailure()) {
+      log << MSG::ERROR << "Unable to get the IncidentSvc" << endreq;
+      return StatusCode::FAILURE;
+    }
+
     if (itr->second.second==SHARE) {
       TFile *outputfile;
       //Merge File
       try {
-	log << MSG::DEBUG << "Openning Final Output File: " <<m_sharedFiles[itr->first].c_str()<<endreq;
+	log << MSG::DEBUG << "Opening Final Output File: " <<m_sharedFiles[itr->first].c_str()<<endreq;
 	outputfile = new TFile(m_sharedFiles[itr->first].c_str(), "UPDATE");
       } catch (const std::exception& Exception) {
-      log << MSG::ERROR << "exception caught while trying to open root"
-	  << " file for appending: " << Exception.what() << std::endl
-	  << "  -> file probably corrupt." << endreq;
-      return StatusCode::FAILURE;
+	log << MSG::ERROR << "exception caught while trying to open root"
+	    << " file for appending: " << Exception.what() << std::endl
+	    << "  -> file probably corrupt." << endreq;
+	pi->fireIncident(FileIncident(name(), IncidentType::FailOutputFile, 
+				      m_sharedFiles[itr->first]));
+	return StatusCode::FAILURE;
       } catch (...) {
-	log << MSG::ERROR << "Problems opening output file  \"" << m_sharedFiles[itr->first]
+	log << MSG::ERROR << "Problems opening output file  \"" 
+	    << m_sharedFiles[itr->first]
 	    << "\" for append: probably corrupt" << endreq;
+	pi->fireIncident(FileIncident(name(), IncidentType::FailOutputFile, 
+				      m_sharedFiles[itr->first]));
 	return StatusCode::FAILURE;
       }
+      
+      pi->fireIncident(FileIncident(name(), IncidentType::WroteToOutputFile, 
+				    m_sharedFiles[itr->first]));
 
       log << MSG::DEBUG << "THistSvc::write()::Merging Rootfile "<<endreq;
       TFile *inputfile;
   }
 
 
+  IIncidentSvc *pi(0);
+  if (service("IncidentSvc",pi).isFailure()) {
+    log << MSG::ERROR << "Unable to get the IncidentSvc" << endreq;
+    return StatusCode::FAILURE;
+  }
+
   TFile *f(0) ;
   if (newMode == THistSvc::READ) {
     // old file
       log << MSG::ERROR << "exception caught while trying to open root"
           << " file for reading: " << Exception.what() << std::endl
           << "  -> file probably corrupt." << endreq;
+      pi->fireIncident(FileIncident(name(), IncidentType::FailInputFile, 
+				    filename));
       return StatusCode::FAILURE;
     } catch (...) {
       log << MSG::ERROR << "Problems opening input file  \"" << filename
           << "\": probably corrupt" << endreq;
+      pi->fireIncident(FileIncident(name(), IncidentType::FailInputFile, 
+				    filename));
       return StatusCode::FAILURE;
     }
 
     if (!f->IsOpen()) {
       log << MSG::ERROR << "Unable to open input file \"" << filename
           << "\": file does not exist" << endreq;
+      pi->fireIncident(FileIncident(name(), IncidentType::FailInputFile, 
+				    filename));
       return StatusCode::FAILURE;
     }
 
+// FIX ME!
+    pi->fireIncident(FileIncident(name(), "BeginHistFile", 
+ 				  filename));
+
 
   } else if (newMode == THistSvc::WRITE) {
     // new file
     if (!f->IsOpen()) {
       log << MSG::ERROR << "Unable to create new output file \"" << filename
           << "\" for writing: file already exists" << endreq;
+      pi->fireIncident(FileIncident(name(), IncidentType::FailOutputFile, 
+				    filename));
       return StatusCode::FAILURE;
     }
+
+// FIX ME!
+    pi->fireIncident(FileIncident(name(), "BeginHistFile", 
+ 				  filename));
     f->SetCompressionLevel( m_compressionLevel );
 
   } else if (newMode == THistSvc::APPEND) {
       log << MSG::ERROR << "exception caught while trying to open root"
           << " file for appending: " << Exception.what() << std::endl
           << "  -> file probably corrupt." << endreq;
+      pi->fireIncident(FileIncident(name(), IncidentType::FailOutputFile, 
+				    filename));
       return StatusCode::FAILURE;
     } catch (...) {
       log << MSG::ERROR << "Problems opening output file  \"" << filename
           << "\" for append: probably corrupt" << endreq;
+      pi->fireIncident(FileIncident(name(), IncidentType::FailOutputFile, 
+				    filename));
       return StatusCode::FAILURE;
     }
 
     if (!f->IsOpen()) {
       log << MSG::ERROR << "Unable to open output file \"" << filename
           << "\" for appending" << endreq;
+      pi->fireIncident(FileIncident(name(), IncidentType::FailOutputFile, 
+				    filename));
       return StatusCode::FAILURE;
     }
+    pi->fireIncident(FileIncident(name(), IncidentType::BeginOutputFile, 
+				  filename));
     f->SetCompressionLevel( m_compressionLevel );
 
   } else if (newMode == THistSvc::SHARE) {
       log << MSG::ERROR << "exception caught while trying to open root"
 	  << " file for appending: " << Exception.what() << std::endl
 	  << "  -> file probably corrupt." << endreq;
+      pi->fireIncident(FileIncident(name(), IncidentType::FailOutputFile, 
+				    filename));
       return StatusCode::FAILURE;
     } catch (...) {
       log << MSG::ERROR << "Problems opening output file  \"" << filename
 	  << "\" for append: probably corrupt" << endreq;
+      pi->fireIncident(FileIncident(name(), IncidentType::FailOutputFile, 
+				    filename));
       return StatusCode::FAILURE;
     }
     
     if (!f->IsOpen()) {
       log << MSG::ERROR << "Unable to open output file \"" << filename
 	  << "\" for appending" << endreq;
+      pi->fireIncident(FileIncident(name(), IncidentType::FailOutputFile, 
+				    filename));
       return StatusCode::FAILURE;
     }
+    pi->fireIncident(FileIncident(name(), IncidentType::BeginOutputFile, 
+				  filename));
     f->SetCompressionLevel( m_compressionLevel );
     
   } else if (newMode == THistSvc::UPDATE) {
       log << MSG::ERROR << "exception caught while trying to open root"
           << " file for updating: " << Exception.what() << std::endl
           << "  -> file probably corrupt." << endreq;
+      pi->fireIncident(FileIncident(name(), IncidentType::FailOutputFile, 
+				    filename));
       return StatusCode::FAILURE;
     } catch (...) {
       log << MSG::ERROR << "Problems opening output file  \"" << filename
           << "\" for update: probably corrupt" << endreq;
+      pi->fireIncident(FileIncident(name(), IncidentType::FailOutputFile, 
+				    filename));
       return StatusCode::FAILURE;
     }
 
     if (!f->IsOpen()) {
       log << MSG::ERROR << "Unable to open output file \"" << filename
           << "\" for updating" << endreq;
+      pi->fireIncident(FileIncident(name(), IncidentType::FailOutputFile, 
+				    filename));
       return StatusCode::FAILURE;
     }
+    pi->fireIncident(FileIncident(name(), IncidentType::BeginOutputFile, 
+				  filename));
     f->SetCompressionLevel( m_compressionLevel );
 
   }
 }
 
 //* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *//
+
+bool
+THistSvc::exists( const std::string& name ) const {
+
+  TH1* h;
+
+  return getHist_i(name,h,true).isSuccess();
+
+
+}

GAUDI_v20r4-branch/GaudiSvc/src/THistSvc/THistSvc.h

   virtual StatusCode getTTrees(TDirectory *td, TList &) const;
   virtual StatusCode getTTrees(const std::string& name, TList &) const;
 
+  virtual bool exists(const std::string& name) const;
 
   THistSvc(const std::string& name, ISvcLocator *svc );
 
   template <typename T>
   StatusCode regHist_i(T* hist, const std::string& name);
   template <typename T>
-  StatusCode getHist_i(const std::string& name, T*& hist) const;
+  StatusCode getHist_i(const std::string& name, T*& hist, bool quiet=false) const;
   template <typename T>
   StatusCode readHist_i(const std::string& name, T*& hist) const;
 

GAUDI_v20r4-branch/GaudiSvc/src/THistSvc/THistSvc.icc

 //* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *//
 
 template <typename T>
-StatusCode THistSvc::getHist_i(const std::string& id, T*& hist) const {
+StatusCode 
+THistSvc::getHist_i(const std::string& id, T*& hist, bool quiet) const {
   // id starts with "/": unique
 
   GlobalDirectoryRestore restore;
   if (idr.find("/") == 0) {
     std::map<std::string, THistID>::const_iterator itr = m_uids.find(id);
     if (itr == m_uids.end()) {
-      MsgStream log( msgSvc(), name() );
-      log << MSG::ERROR << "Could not locate Hist with id \"" << idr << "\""
-          << endreq;
+      if (!quiet) {
+	MsgStream log( msgSvc(), name() );
+	log << MSG::ERROR << "Could not locate Hist with id \"" << idr << "\""
+	    << endreq;
+      }
       hist = 0;
       return StatusCode::FAILURE;
     }
 
     THistID hid = itr->second;
-    hist = dynamic_cast<T*>(hid.obj);
-    if (hist == 0) {
+    if (!quiet) {
+      hist = dynamic_cast<T*>(hid.obj);
+      if (hist == 0) {
+	MsgStream log( msgSvc(), name() );
+	log << MSG::ERROR << "dcast failed, Hist id: \"" << idr << "\"" 
+	    << endreq;
+	return StatusCode::FAILURE;
+      }
       MsgStream log( msgSvc(), name() );
-      log << MSG::ERROR << "dcast failed, Hist id: \"" << idr << "\"" << endreq;
-      return StatusCode::FAILURE;
+      log << MSG::VERBOSE << "found unique Hist title: \"" << hist->GetTitle()
+	  << "\"  id: \"" << idr << "\"" << endreq;
+    } else {
+      MsgStream log( msgSvc(), name() );
+      log << MSG::VERBOSE << "found unique Hist id: \"" << idr << "\" type: \""
+	  << hid.obj->IsA()->GetName() << "\""
+	  << endreq;
     }
-    MsgStream log( msgSvc(), name() );
-    log << MSG::VERBOSE << "found unique Hist title: \"" << hist->GetTitle()
-        << "\"  id: \"" << idr << "\"" << endreq;
+
     return StatusCode::SUCCESS;
 
 
     std::pair< std::multimap<std::string,THistID>::const_iterator,
       std::multimap<std::string,THistID>::const_iterator > mitr = m_ids.equal_range(idr);
 
-
     if (mitr.first == mitr.second) {
-      MsgStream log( msgSvc(), name() );
-      log << MSG::ERROR << "Could not locate Hist with id \"" << idr << "\""
-          << endreq;
+      if (!quiet) {
+	MsgStream log( msgSvc(), name() );
+	log << MSG::ERROR << "Could not locate Hist with id \"" << idr << "\""
+	    << endreq;
+      }
       hist = 0;
       return StatusCode::FAILURE;
     } else {
 
       if (distance(mitr.first,mitr.second) == 1) {
         THistID hid = mitr.first->second;
-        hist = dynamic_cast<T*>(hid.obj);
-        if (hist == 0) {
-          MsgStream log( msgSvc(), name() );
-          log << MSG::ERROR << "dcast failed" << endreq;
-          return StatusCode::FAILURE;
-        }
-        MsgStream log( msgSvc(), name() );
-        log << MSG::VERBOSE << "found Hist title: \"" << hist->GetTitle()
-            << "\"  id: \"" << idr << "\"" << endreq;
+	if (!quiet) {
+	  hist = dynamic_cast<T*>(hid.obj);
+	  if (hist == 0) {
+	    MsgStream log( msgSvc(), name() );
+	    log << MSG::ERROR << "dcast failed" << endreq;
+	    return StatusCode::FAILURE;
+	  }
+	  MsgStream log( msgSvc(), name() );
+	  log << MSG::VERBOSE << "found Hist title: \"" << hist->GetTitle()
+	      << "\"  id: \"" << idr << "\"" << endreq;
+	} else {
+	  MsgStream log( msgSvc(), name() );
+	  log << MSG::VERBOSE << "found Hist id: \"" << idr << "\" type: \""
+	      << hid.obj->IsA()->GetName() << "\""
+	      << endreq;
+	}
         return StatusCode::SUCCESS;
       } else {
-        MsgStream log( msgSvc(), name() );
-        log << MSG::ERROR << "Multiple matches with id \"" << idr << "\"."
-            << " Further specifications required."
-            << endreq;
-        hist = 0;
-        return StatusCode::FAILURE;
+	MsgStream log( msgSvc(), name() );
+	if (!quiet) {
+	  // return failure if trying to GET a single hist
+	  log << MSG::ERROR << "Multiple matches with id \"" << idr << "\"."
+	      << " Further specifications required."
+	      << endreq;
+	  hist = 0;
+	  return StatusCode::FAILURE;
+	} else {
+	  // return a SUCCESS if just INQUIRING
+	  log << MSG::INFO << "Found multiple matches with id \"" << idr 
+	      << "\"" << endreq;
+	  hist = 0;
+	  return StatusCode::SUCCESS;
+	}
       }
     }
   }

GAUDI_v20r4-branch/GaudiUtils/src/component/IODataManager.cpp

 #include "GaudiKernel/DeclareFactoryEntries.h"
 #include "GaudiUtils/IFileCatalog.h"
 #include "IODataManager.h"
+#include "GaudiKernel/Incident.h"
+#include "GaudiKernel/IIncidentSvc.h"
 
 #include <set>
 
         << m_catalogSvcName << endreq;
     return status;
   }
+  status = serviceLocator()->service("IncidentSvc", m_incSvc);
+  if( !status.isSuccess() ) {
+    log << MSG::ERROR << "Error initializing IncidentSvc!" << endreq;
+    return status;
+  }
   return status;
 }
 
     m_catalog->release();
     m_catalog = 0;
   }
+  if ( m_incSvc )  {
+    m_incSvc->release();
+    m_incSvc = 0;
+  }
   return Service::finalize();
 }
 
       ConnectionMap::const_iterator i=m_connectionMap.find(con->name());
       if ( i != m_connectionMap.end() )  {
         Connection* c = (*i).second->connection;
-        if ( c != con )  {
+        if ( c != con )  { 
+          m_incSvc->fireIncident(Incident(con->name(),IncidentType::FailInputFile));
           return error("Severe logic bug: Twice identical connection object for DSN:"+con->name(),true);
         }
         if ( reconnect((*i).second).isSuccess() ) {
       return connectDataIO(PFN, rw, dsn, technology, keep_open, connection);
     
     if(std::find(s_badFiles.begin(),s_badFiles.end(),dsn) != s_badFiles.end())  {
+      m_incSvc->fireIncident(Incident(dsn,IncidentType::FailInputFile));
       return IDataConnection::BAD_DATA_CONNECTION;
     }
     if ( typ == FID )  {
         if ( files.size() == 0 ) {
           if ( !m_useGFAL )   {
             if ( m_quarantine ) s_badFiles.insert(dsn);
+            m_incSvc->fireIncident(Incident(dsn,IncidentType::FailInputFile));
             error("connectDataIO> failed to resolve FID:"+dsn,false);
 	    return IDataConnection::BAD_DATA_CONNECTION;
           }
             if ( m_quarantine ) s_badFiles.insert(dsn);
           }
           if ( m_quarantine ) s_badFiles.insert(dsn);
+          m_incSvc->fireIncident(Incident(dsn,IncidentType::FailInputFile));
           error("connectDataIO> Failed to resolve FID:"+dsn,false);
 	  return IDataConnection::BAD_DATA_CONNECTION;
         }
         m_fidMap[dsn] = m_fidMap[dataset] = m_fidMap[pfn] = dsn;
         sc = connectDataIO(PFN, rw, pfn, technology, keep_open, connection);
         if ( !sc.isSuccess() )  {
-	  if ( m_quarantine ) s_badFiles.insert(pfn);
-	  return IDataConnection::BAD_DATA_CONNECTION;
-	}
+          if ( m_quarantine ) s_badFiles.insert(pfn);
+          m_incSvc->fireIncident(Incident(pfn,IncidentType::FailInputFile));
+          return IDataConnection::BAD_DATA_CONNECTION;
+        }
+        
         return sc;
       }
       return S_ERROR;
       case LFN:
         fid = m_catalog->lookupLFN(dsn);
         if ( fid.empty() )  {
+          m_incSvc->fireIncident(Incident(dsn,IncidentType::FailInputFile));
           log << MSG::ERROR << "Failed to resolve LFN:" << dsn
               << " Cannot access this dataset." << endmsg;
 	  return IDataConnection::BAD_DATA_CONNECTION;
         if ( !reconnect(e).isSuccess() )   {
           delete e;
           if ( m_quarantine ) s_badFiles.insert(dsn);
+          m_incSvc->fireIncident(Incident(dsn,IncidentType::FailInputFile));
           error("connectDataIO> Cannot connect to database: PFN="+dsn+" FID="+fid,false);
 	  return IDataConnection::BAD_DATA_CONNECTION;
         }
           if ( strcasecmp(dsn.c_str(),fid.c_str()) == 0 )  {
             log << MSG::ERROR << "Referring to existing dataset " << dsn
                 << " by its physical name." << endmsg;
-            log << "You may not be able to nagivate back to the input file"
+            log << "You may not be able to navigate back to the input file"
                 << " -- processing continues" << endmsg;
           }
         }
       // Here we open the file!
       if ( !reconnect((*fi).second).isSuccess() )   {
         if ( m_quarantine ) s_badFiles.insert(dsn);
+        m_incSvc->fireIncident(Incident(dsn,IncidentType::FailInputFile));
         error("connectDataIO> Cannot connect to database: PFN="+dsn+" FID="+fid,false);
 	return IDataConnection::BAD_DATA_CONNECTION;
       }
   }
   catch(...)  {
   }
+  m_incSvc->fireIncident(Incident(dsn,IncidentType::FailInputFile));
   error("connectDataIO> The dataset "+dsn+" cannot be opened.",false).ignore();
   s_badFiles.insert(dsn);
   return IDataConnection::BAD_DATA_CONNECTION;

GAUDI_v20r4-branch/GaudiUtils/src/component/IODataManager.h

 #include "GaudiKernel/Service.h"
 #include "GaudiUtils/IIODataManager.h"
 
+class IIncidentSvc;
+
 /*
  *  LHCb namespace declaration
  */
     *  @authot  M.Frank
     *  @version 1.0
     *  @date    20/10/2007
+    *  @author  R. Lambert
+    *  @date    03/09/2009
     */
   class IODataManager : virtual public IIODataManager, public Service  {
   protected:
     std::string          m_catalogSvcName;
     /// Property: Age limit
     int                  m_ageLimit;
-    /// Property: Flag for auto gfal data acesss
+    /// Property: Flag for auto gfal data access