Commits

Anonymous committed 5625506

initial checkin for v20r4p5

Comments (0)

Files changed (67)

GAUDI_v20r4-branch/Gaudi/tests/python/Test_confDb.py

-"""
-Hand-written confDb file for tests.
-"""
-
-def _fillCfgDb():
-    from GaudiKernel.Proxy.ConfigurableDb import CfgDb
-
-    # get a handle on the repository of Configurables
-    cfgDb = CfgDb()
-    cfgDb.add( configurable = 'MyTestTool',
-               package = 'GaudiTests',
-               module  = 'TestConf',
-               lib     = 'None' )
-    
-    return #_fillCfgDb
-# fill cfgDb at module import...
-try:
-    _fillCfgDb()
-    #house cleaning...
-    del _fillCfgDb
-except Exception,err:
-    print "Py:ConfigurableDb   ERROR Problem with [%s] content!" % __name__
-    print "Py:ConfigurableDb   ERROR",err
-    print "Py:ConfigurableDb   ERROR   ==> culprit is package [Test] !"

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

     return StatusCode::FAILURE;
   }
 
+  m_pps->setUnknownParticleHandler(new HepPDT::TestUnknownID, "My Unknwon PID Test");
+
   HepPDT::ParticleDataTable *pdt = m_pps->PDT();
 
   std::ostringstream ost;
   return StatusCode::SUCCESS;
 
 }
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+namespace HepPDT {
+
+CommonParticleData* 
+TestUnknownID::processUnknownID
+              ( ParticleID key, const ParticleDataTable & pdt ) { 
+
+  std::cout << "TestUnknownID: " << key.PDTname() << std::endl;
+
+  CommonParticleData * cpd = 0;
+  if( key.isNucleus() ) {
+    
+    // have to create a TempParticleData with all properties first
+    TempParticleData tpd(key);
+    // calculate approximate mass
+    // WARNING: any calls to particle() from here MUST reference 
+    //          a ParticleData which is already in the table
+    // This convention is enforced.
+    const ParticleData * proton = pdt.particle(2212);
+    if( proton ) {
+      double protonMass = proton->mass();
+      tpd.tempMass = Measurement(key.A()*protonMass, 0.);
+      // now create CommonParticleData
+      cpd = new CommonParticleData(tpd);
+    }
+  }
+  return cpd;
+};
+
+}
+

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

 #define GAUDIEXAMPLES_PARTPROPEXA_H 1
 
 #include "GaudiKernel/Algorithm.h"
+#include "HepPDT/ProcessUnknownID.hh"
+#include "HepPDT/CommonParticleData.hh"
 
 class IPartPropSvc;
 
 
 };
 
+namespace HepPDT {
+class TestUnknownID : public ProcessUnknownID {
+public:
+  TestUnknownID() {}
+
+  virtual 
+  CommonParticleData *processUnknownID( ParticleID, 
+					const ParticleDataTable & pdt );
+
+};
+
+}
 
 #endif // GAUDIEXAMPLES_PARTPROPEXA_H

GAUDI_v20r4-branch/GaudiKernel/GaudiKernel/AlgTool.h

   virtual const IInterface*  parent() const;
 
   // State machine implementation
-  virtual StatusCode configure() { return StatusCode::SUCCESS; }
+  //OBSOLETE CLASH virtual StatusCode configure() { return StatusCode::SUCCESS; }
   virtual StatusCode initialize();
   virtual StatusCode start();
   virtual StatusCode stop();

GAUDI_v20r4-branch/GaudiKernel/GaudiKernel/Bootstrap.h

-// $Header: /tmp/svngaudi/tmp.jEpFh25751/Gaudi/GaudiKernel/GaudiKernel/Bootstrap.h,v 1.8 2006/11/30 14:43:12 mato Exp $
+// $Header: /local/reps/Gaudi/GaudiKernel/GaudiKernel/Bootstrap.h,v 1.8 2006/11/30 14:43:12 mato Exp $
 #ifndef GAUDIKERNEL_BOOTSTRAP_H
 #define GAUDIKERNEL_BOOTSTRAP_H
 
       @return   Previous instance of service locator object.
   */
   IAppMgrUI* setInstance(IAppMgrUI* newInstance);
+  bool hasApplicationMgr();
 
 }
 

GAUDI_v20r4-branch/GaudiKernel/GaudiKernel/GaudiException.h

 
   /// destructor (perform the deletion of "previous" field!) 
   virtual ~GaudiException() throw() {
+    m_code.setChecked();
     if( 0 != m_previous ) { delete m_previous ; m_previous = 0 ; }
   } 
   

GAUDI_v20r4-branch/GaudiKernel/GaudiKernel/IAlgTool.h

   /// Retrieve interface ID
   static const InterfaceID& interfaceID() { return IID_IAlgTool; }
 
+  /// Virtual destructor.
+  virtual ~IAlgTool(){}
+
   /// The type of an AlgTool, meaning the concrete AlgTool class.
   virtual const std::string&  type() const = 0;
 
   // --- Methods from IStateful ---
   /** Configuration (from OFFLINE to CONFIGURED).
   */
-  virtual StatusCode configure() = 0;
+  //OBSOLETE CLASH virtual StatusCode configure() = 0;
 
   /** Initialization (from CONFIGURED to INITIALIZED). 
    */

GAUDI_v20r4-branch/GaudiKernel/GaudiKernel/IIoComponent.h

+///////////////////////// -*- C++ -*- /////////////////////////////
+// IIoComponent.h 
+// Header file for class IIoComponent
+// Author: S.Binet<binet@cern.ch>
+/////////////////////////////////////////////////////////////////// 
+#ifndef GAUDIKERNEL_IIOCOMPONENT_H 
+#define GAUDIKERNEL_IIOCOMPONENT_H 1 
+
+/** @class IIoComponent
+ */
+
+// STL includes
+#include <string>
+
+// GaudiKernel includes
+#include "GaudiKernel/INamedInterface.h"
+#include "GaudiKernel/StatusCode.h"
+
+class IIoComponent
+  : virtual public ::INamedInterface
+{ 
+  /////////////////////////////////////////////////////////////////// 
+  // Public methods: 
+  /////////////////////////////////////////////////////////////////// 
+ public: 
+
+  /** Destructor: 
+   */
+  virtual ~IIoComponent();
+
+  /////////////////////////////////////////////////////////////////// 
+  // Const methods: 
+  ///////////////////////////////////////////////////////////////////
+
+  /////////////////////////////////////////////////////////////////// 
+  // Non-const methods: 
+  /////////////////////////////////////////////////////////////////// 
+
+  /// Declaration of the interface ID
+  static const InterfaceID& interfaceID();
+  
+  /** @brief callback method to reinitialize the internal state of
+   *         the component for I/O purposes (e.g. upon @c fork(2))
+   */
+  virtual
+  StatusCode io_reinit () = 0;
+}; 
+
+// I/O operators
+//////////////////////
+
+/////////////////////////////////////////////////////////////////// 
+// Inline methods: 
+/////////////////////////////////////////////////////////////////// 
+
+inline 
+const InterfaceID& 
+IIoComponent::interfaceID() 
+{ 
+  // Declaration of the interface ID
+  static const InterfaceID IID_IIoComponent("IIoComponent", 1, 0);
+  return IID_IIoComponent; 
+}
+
+
+#endif //> !GAUDIKERNEL_IIOCOMPONENT_H

GAUDI_v20r4-branch/GaudiKernel/GaudiKernel/IIoComponentMgr.h

+///////////////////////// -*- C++ -*- /////////////////////////////
+// IIoComponentMgr.h 
+// Header file for class IIoComponentMgr
+// Author: S.Binet<binet@cern.ch>
+/////////////////////////////////////////////////////////////////// 
+#ifndef GAUDIKERNEL_IIOCOMPONENTMGR_H 
+#define GAUDIKERNEL_IIOCOMPONENTMGR_H 1 
+
+/** @class IIoComponentMgr
+ */
+
+// STL includes
+#include <string>
+
+// GaudiKernel includes
+#include "GaudiKernel/INamedInterface.h"
+#include "GaudiKernel/StatusCode.h"
+
+// forward declare
+class IIoComponent;
+
+class IIoComponentMgr
+  : virtual public ::INamedInterface
+{ 
+  /////////////////////////////////////////////////////////////////// 
+  // Public enums: 
+  /////////////////////////////////////////////////////////////////// 
+ public: 
+  struct IoMode {
+    enum Type {
+      Input  = 0,
+      Output
+    };
+  };
+
+  /////////////////////////////////////////////////////////////////// 
+  // Public methods: 
+  /////////////////////////////////////////////////////////////////// 
+ public: 
+
+  /** Destructor: 
+   */
+  virtual ~IIoComponentMgr();
+
+  /// Declaration of the interface ID
+  static const InterfaceID& interfaceID();
+
+  /** @brief: allow a @c IIoComponent to register itself with this
+   *          manager so appropriate actions can be taken when e.g.
+   *          a @c fork(2) has been issued (this is usually handled
+   *          by calling @c IIoComponent::io_reinit on every registered
+   *          component)
+   */
+  virtual
+  StatusCode io_register (IIoComponent* iocomponent) = 0;
+
+  /** @brief: allow a @c IIoComponent to register itself with this
+   *          manager so appropriate actions can be taken when e.g.
+   *          a @c fork(2) has been issued (this is usually handled
+   *          by calling @c IIoComponent::io_reinit on every registered
+   *          component)
+   */
+  virtual
+  StatusCode io_register (IIoComponent* iocomponent,
+			  IIoComponentMgr::IoMode::Type iomode,
+			  const std::string& fname) = 0;
+
+  /** @brief: check if the registry contains a given @c IIoComponent
+   */
+  virtual
+  bool io_hasitem (IIoComponent* iocomponent) const = 0;
+
+  /** @brief: check if the registry contains a given @c IIoComponent and
+   *          that component had @param `fname` as a filename
+   */
+  virtual
+  bool io_contains (IIoComponent* iocomponent,
+		    const std::string& fname) const = 0;
+
+  /** @brief: retrieve the new filename for a given @c IIoComponent and
+   *          @param `fname` filename
+   */
+  virtual
+  StatusCode io_retrieve (IIoComponent* iocomponent,
+			  std::string& fname) = 0;
+
+  /** @brief: reinitialize the I/O subsystem.
+   *  This effectively calls @c IIoComponent::io_reinit on all the registered
+   *  @c IIoComponent.
+   */
+  virtual
+  StatusCode io_reinitialize () = 0;
+
+  /** @brief: finalize the I/O subsystem.
+   *  Hook to allow to e.g. give a chance to I/O subsystems to merge output
+   *  files. Not sure how to do this correctly though...
+   */
+  virtual
+  StatusCode io_finalize () = 0;
+
+}; 
+
+// I/O operators
+//////////////////////
+
+/////////////////////////////////////////////////////////////////// 
+// Inline methods: 
+/////////////////////////////////////////////////////////////////// 
+
+inline 
+const InterfaceID& 
+IIoComponentMgr::interfaceID() 
+{ 
+  // Declaration of the interface ID
+  static const InterfaceID IID_IIoComponentMgr("IIoComponentMgr", 1, 0);
+  return IID_IIoComponentMgr; 
+}
+
+
+#endif //> !GAUDIKERNEL_IIOCOMPONENTMGR_H

GAUDI_v20r4-branch/GaudiKernel/GaudiKernel/IPartPropSvc.h

 #define GAUDIKERNEL_IPARTPROPSVC_H
 
 // Include Files
-#include <map>
+#include <string>
 #include "GaudiKernel/IService.h"
 
 namespace HepPDT {
   class ParticleDataTable;
+  class ProcessUnknownID;
 }
 
 // Declaration of the interface ID ( interface id, major version, minor version) 
   static const InterfaceID& interfaceID() { return IID_IPartPropSvc; }
 
   virtual HepPDT::ParticleDataTable* PDT() = 0;
+  virtual void setUnknownParticleHandler( HepPDT::ProcessUnknownID*,
+					  const std::string& ) = 0;
 
 };
 

GAUDI_v20r4-branch/GaudiKernel/GaudiKernel/IStateful.h

   
   /** Configuration (from OFFLINE to CONFIGURED).
   */
-  virtual StatusCode configure() = 0;
+  //  virtual StatusCode configure() = 0;
 
   /** Initialization (from CONFIGURED to INITIALIZED). 
    */

GAUDI_v20r4-branch/GaudiKernel/GaudiKernel/MsgStream.h

   return lhs;
 }
 
+// /// Specialize const char* to optimize
+inline
+MsgStream& operator<< (MsgStream& lhs, const char* arg) {
+  if(lhs.isActive()) lhs.stream() << arg;
+  return lhs;
+} 
+
+
 #ifdef __GNUC__
 /// compiler is stupid. Must specialize
 template<typename T>

GAUDI_v20r4-branch/GaudiKernel/GaudiKernel/Property.h

   /// use the call-back function at reading
   virtual void useReadHandler   () const ;
   /// use the call-back function at update
-  virtual void useUpdateHandler ()       ;
+  virtual bool useUpdateHandler ()       ;
 public:
   /// virtual destructor
   virtual ~Property() ;
   /// update the value
   i_set( value ) ;
   /// invoke the update handler
-  this->useUpdateHandler() ;
-  return true ;
+  return this->useUpdateHandler() ;
 }
 // ============================================================================
 /// assignement

GAUDI_v20r4-branch/GaudiKernel/GaudiKernel/PropertyMgr.h

 // $Id: PropertyMgr.h,v 1.22 2008/04/03 17:27:01 marcocle Exp $
 // ============================================================================
-// CVS tag $Name:  $, version $Revision: 1.22 $
+// CVS tag $Name: HEAD $, version $Revision: 1.22 $
 // ============================================================================
 #ifndef GAUDIKERNEL_PROPERTYMGR_H
 #define GAUDIKERNEL_PROPERTYMGR_H
 template< class T> class ToolHandle;
 template< class T> class ServiceHandle;
 template< class T> class ToolHandleArray;
+template< class T> class ServiceHandleArray;
 
 /** @class PropertyMgr PropertyMgr.h GaudiKernel/PropertyMgr.h
  *
   ( const std::string& name, 
     ToolHandleArray<TYPE>& ref, 
     const std::string& doc = "none" ) ;  
+  /// Declare a property (specialization)
+  template<class TYPE>
+  Property* declareProperty
+  ( const std::string& name, 
+    ServiceHandleArray<TYPE>& ref, 
+    const std::string& doc = "none" ) ;  
   /// Declare a remote property
   Property* declareRemoteProperty
   ( const std::string& name       , 
   return p ;
 }
 // ============================================================================
+template<class TYPE>
+inline Property* 
+PropertyMgr::declareProperty
+( const std::string& name, 
+  ServiceHandleArray<TYPE>& ref, 
+  const std::string& doc ) 
+{
+  Property* p = new GaudiHandleArrayProperty( name, ref );
+  //
+  p -> setDocumentation    ( doc ) ;
+  m_properties . push_back ( p   ) ;
+  m_todelete   . push_back ( p   ) ;
+  //
+  return p ;
+}
+// ============================================================================
 // The END 
 // ============================================================================
 #endif // GAUDIKERNEL_PROPERTYMGR_H

GAUDI_v20r4-branch/GaudiKernel/GaudiKernel/ServiceHandle.h

   mutable IMessageSvc* m_pMessageSvc;
 };
 
+/** @class ServiceHandleArray ServiceHandle.h GaudiKernel/ServiceHandle.h
+
+    Array of Handles to be used in lieu of vector of naked pointers to tools. 
+    This allows better control through the framework of tool loading and usage.
+    @parameter T is the AlgTool interface class (or concrete class) of
+    the tool to use, and must derive from IAlgTool.
+
+    @author Yushu Yao <yyao@lbl.gov>
+*/
+
+template < class T >
+class ServiceHandleArray : public GaudiHandleArray< ServiceHandle<T> > {
+public:
+  //
+  // Constructors
+  //
+  /** Generic constructor. Probably not very useful...
+   **/
+  ServiceHandleArray( const std::vector< std::string >& myTypesAndNamesList, 
+		      const std::string& myComponentType, const std::string& myParentName  ): 
+    GaudiHandleArray< ServiceHandle<T> >( myTypesAndNamesList,
+					  myComponentType,
+					  myParentName)
+  {  }
+
+  ServiceHandleArray( const std::string& myParentName )
+    : GaudiHandleArray< ServiceHandle<T> >( "Service", myParentName)
+  { }
+
+  virtual bool push_back( const std::string& serviceTypeAndName ) {
+    ServiceHandle<T> handle( serviceTypeAndName,GaudiHandleInfo::parentName());
+    GaudiHandleArray< ServiceHandle<T> >::push_back( handle );
+    return true;
+  }
+  
+  virtual bool push_back( const ServiceHandle<T>& myHandle ) {
+    return push_back( myHandle.typeAndName() );
+  }
+
+};
+
 template <class T>
 inline std::ostream& operator<<( std::ostream& os, const ServiceHandle<T>& handle ) {
   return operator<<(os, static_cast<const GaudiHandleInfo&>(handle) );
 }
 
+template <class T>
+inline std::ostream& operator<<( std::ostream& os, const ServiceHandleArray<T>& handle ) {
+  return operator<<(os, static_cast<const GaudiHandleInfo&>(handle) );
+}
+
 #endif // ! GAUDIKERNEL_SERVICEHANDLE_H

GAUDI_v20r4-branch/GaudiKernel/GaudiKernel/StatusCode.h

-// $Id: StatusCode.h,v 1.12 2008/10/28 17:21:58 marcocle Exp $
+// $Id: StatusCode.h,v 1.10 2008/10/28 14:15:03 marcocle Exp $
 #ifndef GAUDIKERNEL_STATUSCODE_H
 #define GAUDIKERNEL_STATUSCODE_H
 
 #include <ostream>
 
-#include "GaudiKernel/IssueSeverity.h"
-
 /**
  * @class StatusCode StatusCode.h GaudiKernel/StatusCode.h
  *
 
 class IMessageSvc;
 class IStatusCodeSvc;
+class IssueSeverity;
 
 class IgnoreError {};
 
   static IssueSeverity* cloneSeverity(const IssueSeverity*);
 };
 
-inline StatusCode::StatusCode():
+inline StatusCode::StatusCode(): 
   d_code(SUCCESS), m_checked(false), m_severity(0) {}
 
-inline StatusCode::StatusCode( unsigned long code, bool checked ) :
+inline StatusCode::StatusCode( unsigned long code, bool checked ) : 
   d_code(code),m_checked(checked), m_severity(0) {}
 
-inline StatusCode::StatusCode( unsigned long code, const IssueSeverity& sev ) :
+inline StatusCode::StatusCode( unsigned long code, const IssueSeverity& sev ) : 
   d_code(code),m_checked(false), m_severity(cloneSeverity(&sev)) {
 }
 
   m_severity = rhs.m_severity ? cloneSeverity(rhs.m_severity) : 0;
 }
 
-inline StatusCode& StatusCode::operator=(const StatusCode& rhs) {
-  if (this == &rhs) return *this; // Protection against self-assignment
-  d_code = rhs.d_code;
-  m_checked = rhs.m_checked;
-  rhs.m_checked = true;
-  if (m_severity) delete m_severity;
-  m_severity = rhs.m_severity ? cloneSeverity(rhs.m_severity): 0;
-  return *this;
-}
-
 inline bool StatusCode::isSuccess() const {
   m_checked = true;
   return (d_code == SUCCESS );

GAUDI_v20r4-branch/GaudiKernel/cmt/requirements

 private
 
 application genconf -import=Boost Util/genconf.cpp
-macro_append genconflinkopts "$(GaudiKernel_linkopts) $(Boost_linkopts) $(Boost_linkopts_filesystem) $(Boost_linkopts_program_options)"
+macro_append genconflinkopts "$(GaudiKernel_linkopts) $(Boost_linkopts) $(Boost_linkopts_filesystem) $(Boost_linkopts_program_options) $(ROOT_Reflex_linkopts)"
 macro genconf_dependencies GaudiKernel
 
 # FIXME: (MCl) I do not understand why genconf gets the CppUnit link options,

GAUDI_v20r4-branch/GaudiKernel/python/GaudiKernel/GaudiHandles.py

            "PublicToolHandle", "PrivateToolHandle",
            "ServiceHandle",
            "GaudiHandleArray",
+           "ServiceHandleArray",
            "PublicToolHandleArray", "PrivateToolHandleArray",
            ]
 __version__ = "$Revision: 1.6 $"
         self.typesAndNames = dict[ 'typesAndNames' ]
 
 
+class ServiceHandleArray(GaudiHandleArray):
+    __slots__ = ()
+    handleType = ServiceHandle
+    
+    def __init__(self, serviceTypesAndNames=None):
+        GaudiHandleArray.__init__( self, serviceTypesAndNames )
+
 class PublicToolHandleArray(GaudiHandleArray):
     __slots__ = ()
     handleType = PublicToolHandle

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

 
 //------------------------------------------------------------------------------
 unsigned long AlgTool::addRef()
-  //------------------------------------------------------------------------------
+//------------------------------------------------------------------------------
 {
   m_refCount++;
   return m_refCount;
 
 //------------------------------------------------------------------------------
 unsigned long AlgTool::release()
-  //------------------------------------------------------------------------------
+//------------------------------------------------------------------------------
 {
   unsigned long count = --m_refCount;
   if( count <= 0) {
 StatusCode AlgTool::queryInterface
 ( const InterfaceID& riid ,
   void**             ppvi )
-  //------------------------------------------------------------------------------
+//------------------------------------------------------------------------------
 {
   if ( 0 == ppvi ) { return StatusCode::FAILURE ; } // RETURN
   //
 }
 //------------------------------------------------------------------------------
 void AlgTool::declInterface( const InterfaceID& iid, void* ii)
-  //------------------------------------------------------------------------------
+//------------------------------------------------------------------------------
 {
   m_interfaceList.push_back(std::make_pair(iid, ii));
 }
 
 //------------------------------------------------------------------------------
 const std::string& AlgTool::name()   const
-  //------------------------------------------------------------------------------
+//------------------------------------------------------------------------------
 {
   return m_name;
 }
 
 //------------------------------------------------------------------------------
 const std::string& AlgTool::type()  const
-  //------------------------------------------------------------------------------
+//------------------------------------------------------------------------------
 {
   return m_type;
 }
 
 //------------------------------------------------------------------------------
 const IInterface* AlgTool::parent() const
-  //------------------------------------------------------------------------------
+//------------------------------------------------------------------------------
 {
   return m_parent;
 }
 
 //------------------------------------------------------------------------------
 ISvcLocator* AlgTool::serviceLocator()  const
-  //------------------------------------------------------------------------------
+//------------------------------------------------------------------------------
 {
   return m_svcLocator;
 }
 
 //------------------------------------------------------------------------------
 IMessageSvc* AlgTool::msgSvc()  const
-  //------------------------------------------------------------------------------
+//------------------------------------------------------------------------------
 {
   return m_messageSvc;
 }
 
 //------------------------------------------------------------------------------
 IToolSvc* AlgTool::toolSvc() const
-  //------------------------------------------------------------------------------
+//------------------------------------------------------------------------------
 {
   if ( 0 == m_ptoolSvc ) {
     StatusCode sc = service( "ToolSvc", m_ptoolSvc, true );
 
 //------------------------------------------------------------------------------
 StatusCode AlgTool::setProperty(const Property& p)
-  //------------------------------------------------------------------------------
+//------------------------------------------------------------------------------
 {
   return m_propertyMgr->setProperty(p);
 }
 
 //------------------------------------------------------------------------------
 StatusCode AlgTool::setProperty(const std::string& s)
-  //------------------------------------------------------------------------------
+//------------------------------------------------------------------------------
 {
   return m_propertyMgr->setProperty(s);
 }
 
 //------------------------------------------------------------------------------
 StatusCode AlgTool::setProperty(const std::string& n, const std::string& v)
-  //------------------------------------------------------------------------------
+//------------------------------------------------------------------------------
 {
   return m_propertyMgr->setProperty(n,v);
 }
 
 //------------------------------------------------------------------------------
 StatusCode AlgTool::getProperty(Property* p) const
-  //------------------------------------------------------------------------------
+//------------------------------------------------------------------------------
 {
   return m_propertyMgr->getProperty(p);
 }
 
 //------------------------------------------------------------------------------
 StatusCode AlgTool::getProperty(const std::string& n, std::string& v ) const
-  //------------------------------------------------------------------------------
+//------------------------------------------------------------------------------
 {
   return m_propertyMgr->getProperty(n,v);
 }
 
 //------------------------------------------------------------------------------
 const std::vector<Property*>& AlgTool::getProperties() const
-  //------------------------------------------------------------------------------
+//------------------------------------------------------------------------------
 {
   return m_propertyMgr->getProperties();
 }
 
 //------------------------------------------------------------------------------
 StatusCode AlgTool::setProperties()
-  //------------------------------------------------------------------------------
+//------------------------------------------------------------------------------
 {
   IJobOptionsSvc* jos;
   if( m_svcLocator == 0) {
 AlgTool::AlgTool( const std::string& type,
                   const std::string& name,
                   const IInterface* parent)
-  //------------------------------------------------------------------------------
+//------------------------------------------------------------------------------
   : m_outputLevel ( MSG::NIL )
   , m_type          ( type )
   , m_name          ( name )
 
 //-----------------------------------------------------------------------------
 StatusCode AlgTool::sysInitialize() {
-  //-----------------------------------------------------------------------------
-  StatusCode sc;
+//-----------------------------------------------------------------------------
+  StatusCode sc(StatusCode::FAILURE);
 
   try {
     m_targetState = Gaudi::StateMachine::ChangeState(Gaudi::StateMachine::INITIALIZE,m_state);
     sc = initialize();
     if (sc.isSuccess())
       m_state = m_targetState;
-    return sc;
   }
   catch( const GaudiException& Exception ) {
     MsgStream log ( msgSvc() , name() + ".sysInitialize()" );
     MsgStream log ( msgSvc() , name() + ".sysInitialize()" );
     log << MSG::FATAL << "UNKNOWN Exception is caught " << endreq;
   }
-  return StatusCode::FAILURE ;
+  return sc;
 
 }
 
 
 //-----------------------------------------------------------------------------
 StatusCode AlgTool::sysStart() {
-  //-----------------------------------------------------------------------------
-  StatusCode sc;
+//-----------------------------------------------------------------------------
+  StatusCode sc(StatusCode::FAILURE);
 
   try {
     m_targetState = Gaudi::StateMachine::ChangeState(Gaudi::StateMachine::START,m_state);
     sc = start();
     if (sc.isSuccess())
       m_state = m_targetState;
-    return sc;
   }
   catch( const GaudiException& Exception ) {
     MsgStream log ( msgSvc() , name() + ".sysStart()" );
     MsgStream log ( msgSvc() , name() + ".sysStart()" );
     log << MSG::FATAL << "UNKNOWN Exception is caught " << endreq;
   }
-  return StatusCode::FAILURE ;
+  return sc;
 
 }
 
 //------------------------------------------------------------------------------
 StatusCode AlgTool::start()
-  //------------------------------------------------------------------------------
+//------------------------------------------------------------------------------
 {
   // For the time being there is nothing to be done here.
   return StatusCode::SUCCESS;
 
 //-----------------------------------------------------------------------------
 StatusCode AlgTool::sysStop() {
-  //-----------------------------------------------------------------------------
-  StatusCode sc;
+//-----------------------------------------------------------------------------
+  StatusCode sc(StatusCode::FAILURE);
 
   try {
     m_targetState = Gaudi::StateMachine::ChangeState(Gaudi::StateMachine::STOP,m_state);
     sc = stop();
     if (sc.isSuccess())
       m_state = m_targetState;
-    return sc;
   }
   catch( const GaudiException& Exception ) {
     MsgStream log ( msgSvc() , name() + ".sysStop()" );
     MsgStream log ( msgSvc() , name() + ".sysStop()" );
     log << MSG::FATAL << "UNKNOWN Exception is caught " << endreq;
   }
-  return StatusCode::FAILURE ;
+  return sc;
 
 }
 
 //------------------------------------------------------------------------------
 StatusCode AlgTool::stop()
-  //------------------------------------------------------------------------------
+//------------------------------------------------------------------------------
 {
   // For the time being there is nothing to be done here.
   return StatusCode::SUCCESS;
 
 //-----------------------------------------------------------------------------
 StatusCode AlgTool::sysFinalize() {
-  //-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
 
-  StatusCode sc;
+  if (m_state != Gaudi::StateMachine::INITIALIZED) {
+    MsgStream log ( msgSvc() , name() + ".sysFinalize()" );
+    log << MSG::WARNING << "Not finalizing tool: current state not INITIALIZED"
+	<< endreq;
+    return StatusCode::SUCCESS;
+  }
+    
+  StatusCode sc(StatusCode::FAILURE);
 
   try {
     m_targetState = Gaudi::StateMachine::ChangeState(Gaudi::StateMachine::FINALIZE,m_state);
     sc = finalize();
     if (sc.isSuccess())
       m_state = m_targetState;
-    return sc;
   }
   catch( const GaudiException& Exception ) {
     MsgStream log ( msgSvc() , name() + ".sysFinalize()" );
     MsgStream log ( msgSvc() , name() + ".sysFinalize()" );
     log << MSG::FATAL << "UNKNOWN Exception is caught " << endreq;
   }
-  return StatusCode::FAILURE;
+  return sc;
 
 }
 //------------------------------------------------------------------------------
 StatusCode  AlgTool::finalize()
-  //------------------------------------------------------------------------------
+//------------------------------------------------------------------------------
 {
   // For the time being there is nothing to be done here.
   return StatusCode::SUCCESS;
 
 //-----------------------------------------------------------------------------
 StatusCode AlgTool::sysReinitialize() {
-  //-----------------------------------------------------------------------------
-  StatusCode sc;
+//-----------------------------------------------------------------------------
 
   // Check that the current status is the correct one.
   if ( Gaudi::StateMachine::INITIALIZED != FSMState() ) {
     return StatusCode::FAILURE;
   }
 
+  StatusCode sc(StatusCode::FAILURE);
+
   try {
     Gaudi::Guards::AuditorGuard guard(this,
                                       // check if we want to audit the initialize
                                       (m_auditorReinitialize) ? auditorSvc() : 0,
                                       IAuditor::ReInitialize);
     sc = reinitialize();
-    return sc;
   }
   catch( const GaudiException& Exception ) {
     MsgStream log ( msgSvc() , name() + ".sysReinitialize()" );
     MsgStream log ( msgSvc() , name() + ".sysReinitialize()" );
     log << MSG::FATAL << "UNKNOWN Exception is caught" << endreq;
   }
-  return StatusCode::FAILURE ;
+  return sc;
 
 }
 
   if (sc.isFailure()) {
     MsgStream log ( msgSvc() , name() );
     log << MSG::ERROR << "reinitialize(): cannot be initialized" << endreq;
-    return sc;
   }
   */
   return StatusCode::SUCCESS;
 
 //-----------------------------------------------------------------------------
 StatusCode AlgTool::sysRestart() {
-  //-----------------------------------------------------------------------------
-  StatusCode sc;
-
+//-----------------------------------------------------------------------------
   // Check that the current status is the correct one.
   if ( Gaudi::StateMachine::RUNNING != FSMState() ) {
     MsgStream log ( msgSvc() , name() );
     return StatusCode::FAILURE;
   }
 
+  StatusCode sc(StatusCode::FAILURE);
+
   try {
     m_targetState = Gaudi::StateMachine::ChangeState(Gaudi::StateMachine::START,m_state);
     Gaudi::Guards::AuditorGuard guard(this,
                                       (m_auditorRestart) ? auditorSvc() : 0,
                                       IAuditor::ReStart);
     sc = restart();
-    return sc;
   }
   catch( const GaudiException& Exception ) {
     MsgStream log ( msgSvc() , name() + ".sysRestart()" );
     MsgStream log ( msgSvc() , name() + ".sysRestart()" );
     log << MSG::FATAL << "UNKNOWN Exception is caught" << endreq;
   }
-  return StatusCode::FAILURE ;
+  return sc;
 
 }
 
 //------------------------------------------------------------------------------
 StatusCode AlgTool::restart()
-  //------------------------------------------------------------------------------
+//------------------------------------------------------------------------------
 {
   // Default implementation is stop+start
   StatusCode sc = stop();
   if (sc.isFailure()) {
     MsgStream log ( msgSvc() , name() );
     log << MSG::ERROR << "restart(): cannot be started" << endreq;
-    return sc;
   }
-  return StatusCode::SUCCESS;
+  return sc;
 }
 
 //------------------------------------------------------------------------------
 AlgTool::~AlgTool()
-  //------------------------------------------------------------------------------
+//------------------------------------------------------------------------------
 {
   delete m_propertyMgr;
   if( m_ptoolSvc ) m_ptoolSvc->release();

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

     // 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++) {
-      (*it)->sysFinalize().ignore();
+      if (!(*it)->sysFinalize().isSuccess()) {
+	fail = true;
+      }
     }
 
     { // limit the scope of the guard
       // Invoke the finalize() method of the derived class
       sc = finalize();
     }
-    if( !sc.isSuccess() )  return StatusCode::FAILURE;
+    if( !sc.isSuccess() || fail )  return StatusCode::FAILURE;
 
     // Release all sub-algorithms
     for (it = m_subAlgms->begin(); it != m_subAlgms->end(); it++) {

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

 static IAppMgrUI*   s_appmgrInstance = 0;
 
 //------------------------------------------------------------------------------
+bool Gaudi::hasApplicationMgr()
+//------------------------------------------------------------------------------
+{
+  //Return true if the applicationmgr has already been created
+  if ( 0 == s_appmgrInstance ) {
+    return false;
+  }
+  return true;
+}
+
+//------------------------------------------------------------------------------
 IAppMgrUI* Gaudi::createApplicationMgr(const std::string& dllname,
                                        const std::string& factname)
 //------------------------------------------------------------------------------

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

+///////////////////////// -*- C++ -*- /////////////////////////////
+// IIoComponent.cpp
+// Implementation file for class IIoComponent
+// Author: S.Binet<binet@cern.ch>
+/////////////////////////////////////////////////////////////////// 
+
+// GaudiKernel includes
+#include "GaudiKernel/IIoComponent.h"
+
+/////////////////////////////////////////////////////////////////// 
+// Public methods: 
+/////////////////////////////////////////////////////////////////// 
+
+// Constructors
+////////////////
+
+// Destructor
+///////////////
+IIoComponent::~IIoComponent()
+{}
+
+/////////////////////////////////////////////////////////////////// 
+// Const methods: 
+///////////////////////////////////////////////////////////////////
+
+/////////////////////////////////////////////////////////////////// 
+// Non-const methods: 
+/////////////////////////////////////////////////////////////////// 
+
+/////////////////////////////////////////////////////////////////// 
+// Protected methods: 
+/////////////////////////////////////////////////////////////////// 
+
+/////////////////////////////////////////////////////////////////// 
+// Const methods: 
+///////////////////////////////////////////////////////////////////
+
+/////////////////////////////////////////////////////////////////// 
+// Non-const methods: 
+/////////////////////////////////////////////////////////////////// 
+
+

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

+///////////////////////// -*- C++ -*- /////////////////////////////
+// IIoComponentMgr.cpp
+// Implementation file for class IIoComponentMgr
+// Author: S.Binet<binet@cern.ch>
+/////////////////////////////////////////////////////////////////// 
+
+// GaudiKernel includes
+#include "GaudiKernel/IIoComponentMgr.h"
+
+
+/////////////////////////////////////////////////////////////////// 
+// Public methods: 
+/////////////////////////////////////////////////////////////////// 
+
+// Constructors
+////////////////
+
+// Destructor
+///////////////
+IIoComponentMgr::~IIoComponentMgr()
+{}
+
+/////////////////////////////////////////////////////////////////// 
+// Const methods: 
+///////////////////////////////////////////////////////////////////
+
+/////////////////////////////////////////////////////////////////// 
+// Non-const methods: 
+/////////////////////////////////////////////////////////////////// 
+
+/////////////////////////////////////////////////////////////////// 
+// Protected methods: 
+/////////////////////////////////////////////////////////////////// 
+
+/////////////////////////////////////////////////////////////////// 
+// Const methods: 
+///////////////////////////////////////////////////////////////////
+
+/////////////////////////////////////////////////////////////////// 
+// Non-const methods: 
+/////////////////////////////////////////////////////////////////// 
+
+

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

 StatusCode MinimalEventLoopMgr::finalize()    {
   MsgStream log( msgSvc(), name() );
   StatusCode sc = StatusCode::SUCCESS;
+  StatusCode scRet = StatusCode::SUCCESS;
   // Call the finalize() method of all top algorithms
   ListAlg::iterator ita;
   for ( ita = m_topAlgList.begin(); ita != m_topAlgList.end(); ita++ ) {
     sc = (*ita)->sysFinalize();
     if( !sc.isSuccess() ) {
+      scRet = StatusCode::FAILURE;
       log << MSG::WARNING << "Finalization of algorithm " << (*ita)->name() << " failed" << endreq;
     }
   }
   for ( ita = m_outStreamList.begin(); ita != m_outStreamList.end(); ita++ ) {
     sc = (*ita)->sysFinalize();
     if( !sc.isSuccess() ) {
+      scRet = StatusCode::FAILURE;
       log << MSG::WARNING << "Finalization of algorithm " << (*ita)->name() << " failed" << endreq;
     }
   }
   SmartIF<IAlgManager> algMan(IID_IAlgManager, serviceLocator());
   for ( ita = m_topAlgList.begin(); ita != m_topAlgList.end(); ita++ ) {
     if (algMan->removeAlgorithm(*ita).isFailure()) {
+      scRet = StatusCode::FAILURE;
       log << MSG::ERROR << "Problems removing Algorithm " << (*ita)->name()
 	  << endreq;
     }
   m_incidentSvc = releaseInterface(m_incidentSvc);
   m_appMgrUI = releaseInterface(m_appMgrUI);
   
-  return Service::finalize();
+  sc = Service::finalize();
+  
+  if (sc.isFailure()) {
+    log << MSG::ERROR << "Problems finalizing Service base class" 
+	<< endreq;
+    scRet = StatusCode::FAILURE;
+  }
+
+  return scRet;
+
 }
 
 //--------------------------------------------------------------------------------------------

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

 // ============================================================================
 // use the call-back function at update
 // ============================================================================
-void Property::useUpdateHandler () 
+bool Property::useUpdateHandler () 
 {
-  if ( 0 == m_updateCallBack ) { return ; }              // RETURN
+  bool sc(true);
+  if ( 0 == m_updateCallBack ) { return sc; }  // RETURN
   PropertyCallbackFunctor* theCallBack = m_updateCallBack;
   // avoid infinite loop
   m_updateCallBack = 0;
-  (*theCallBack)( *this ) ;
+  try {
+    (*theCallBack)( *this ) ;
+  } catch(...) {
+    sc = false;
+  }    
   m_updateCallBack = theCallBack;
+  return sc;
 } 
 // ============================================================================
 // the printout of the property value
 
 bool GaudiHandleProperty::setValue( const GaudiHandleBase& value ) {
   m_pValue->setTypeAndName( value.typeAndName() );
-  useUpdateHandler();
-  return true;
+  return useUpdateHandler();
 }
 
 std::string GaudiHandleProperty::toString( ) const {
 
 StatusCode GaudiHandleProperty::fromString( const std::string& s) { 
   m_pValue->setTypeAndName( s );
-  useUpdateHandler();
-  return StatusCode::SUCCESS; 
+  return useUpdateHandler()?StatusCode::SUCCESS:StatusCode::FAILURE;
 }
 
 
 
 bool GaudiHandleArrayProperty::setValue( const GaudiHandleArrayBase& value ) {
   m_pValue->setTypesAndNames( value.typesAndNames() );
-  useUpdateHandler();
-  return true;
+  return useUpdateHandler();
 }
 
 std::string GaudiHandleArrayProperty::toString() const {
   StatusCode sc = Gaudi::Parsers::parse ( tmp , source );
   if ( sc.isFailure() ) return sc;
   if ( !m_pValue->setTypesAndNames( tmp ) ) return StatusCode::FAILURE;
-  useUpdateHandler();
-  return StatusCode::SUCCESS;
+  return useUpdateHandler()?StatusCode::SUCCESS:StatusCode::FAILURE;
 }
 
 

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

 
 // IService::sysInitialize
 StatusCode Service::sysInitialize() {
-  StatusCode sc;
+  StatusCode sc(StatusCode::FAILURE);
 
   try {
     m_targetState = Gaudi::StateMachine::INITIALIZED;
     sc = initialize(); // This should change the state to Gaudi::StateMachine::CONFIGURED
     if (sc.isSuccess())
       m_state = m_targetState;
-    return sc;
   }
   catch ( const GaudiException& Exception )  {
     MsgStream log ( msgSvc() , name() );
     //	  Stat stat( chronoSvc() , "*UNKNOWN Exception*" ) ;
   }
 
-  return StatusCode::FAILURE;
+  return sc;
 }
 
 
 
 // IService::sysStart
 StatusCode Service::sysStart() {
-  StatusCode sc;
+  StatusCode sc(StatusCode::FAILURE);
 
   try {
     m_targetState = Gaudi::StateMachine::ChangeState(Gaudi::StateMachine::START,m_state);
     sc = start();
     if (sc.isSuccess())
       m_state = m_targetState;
-    return sc;
   }
   catch ( const GaudiException& Exception )  {
     MsgStream log ( msgSvc() , name() );
     //    Stat stat( chronoSvc() , "*UNKNOWN Exception*" ) ;
   }
 
-  return StatusCode::FAILURE;
+  return sc;
 }
 
 // IService::sysStop
 StatusCode Service::sysStop() {
-  StatusCode sc;
+  StatusCode sc(StatusCode::FAILURE);
 
   try {
     m_targetState = Gaudi::StateMachine::ChangeState(Gaudi::StateMachine::STOP,m_state);
     sc = stop();
     if (sc.isSuccess())
       m_state = m_targetState;
-    return sc;
   }
   catch ( const GaudiException& Exception )  {
     MsgStream log ( msgSvc() , name() );
     //    Stat stat( chronoSvc() , "*UNKNOWN Exception*" ) ;
   }
 
-  return StatusCode::FAILURE;
+  return sc;
 }
 
 
 //--- IService::sysReinitialize
 StatusCode Service::sysReinitialize() {
 
-  StatusCode sc;
+  StatusCode sc(StatusCode::FAILURE);
 
   // Check that the current status is the correct one.
   if ( Gaudi::StateMachine::INITIALIZED != FSMState() ) {
     log << MSG::ERROR
         << "sysReinitialize(): cannot reinitialize service not initialized"
         << endreq;
-    return StatusCode::FAILURE;
+    return sc;
   }
 
   try {
                                       (m_auditorReinitialize) ? auditorSvc() : 0,
                                       IAuditor::ReInitialize);
     sc = reinitialize();
-    return sc;
   }
   catch( const GaudiException& Exception ) {
     MsgStream log ( msgSvc() , name() + ".sysReinitialize()" );
     log << MSG::FATAL << "UNKNOWN Exception is caught " << endreq;
     //    Stat stat( chronoSvc() , "*UNKNOWN Exception*" ) ;
   }
-  return StatusCode::FAILURE ;
+  return sc;
 
 }
 
 //--- IService::sysRestart
 StatusCode Service::sysRestart() {
 
-  StatusCode sc;
+  StatusCode sc(StatusCode::FAILURE);
 
   // Check that the current status is the correct one.
   if ( Gaudi::StateMachine::RUNNING != FSMState() ) {
         << "sysRestart(): cannot restart service in state " << FSMState()
         << " -- must be RUNNING "
         << endreq;
-    return StatusCode::FAILURE;
+    return sc;
   }
 
   try {
                                       (m_auditorRestart) ? auditorSvc() : 0,
                                       IAuditor::ReStart);
     sc = restart();
-    return sc;
   }
   catch( const GaudiException& Exception ) {
     MsgStream log ( msgSvc() , name() + ".sysRestart()" );
     log << MSG::FATAL << "UNKNOWN Exception is caught " << endreq;
     //    Stat stat( chronoSvc() , "*UNKNOWN Exception*" ) ;
   }
-  return StatusCode::FAILURE ;
+  return sc;
 
 }
 
   if (sc.isFailure()) {
     MsgStream log ( msgSvc() , name() );
     log << MSG::ERROR << "reinitialize(): cannot be initialized" << endreq;
-    return sc;
   }
   */
   return StatusCode::SUCCESS;
   if (sc.isFailure()) {
     MsgStream log ( msgSvc() , name() );
     log << MSG::ERROR << "restart(): cannot be started" << endreq;
-    return sc;
   }
-  return StatusCode::SUCCESS;
+  return sc;
 }
 
 //--- IService::getServiceName

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

   else            return dummy;
 }
 
+StatusCode& StatusCode::operator=(const StatusCode& rhs) {
+  if (this == &rhs) return *this; // Protection against self-assignment
+  d_code = rhs.d_code;
+  m_checked = rhs.m_checked;
+  rhs.m_checked = true;
+  if (m_severity) delete m_severity;
+  m_severity = rhs.m_severity ? cloneSeverity(rhs.m_severity): 0;
+  return *this;
+}
+
 StatusCode::~StatusCode() {
   if(s_checking) {
 

GAUDI_v20r4-branch/GaudiPolicy/.cvsignore

-slc3_ia32_gcc323*
-slc4_ia32_gcc34*
-slc4_amd64_gcc34*
-win32_vc71*
-i686-slc3-gcc323*
-i686-slc4-gcc34*
-i686-slc4-gcc41*
-x86_64-slc4-gcc34*
-x86_64-slc4-gcc41*
-genConf

GAUDI_v20r4-branch/GaudiPolicy/cmt/.cvsignore

-cleanup.*
-setup.*
-*.make
-Makefile
-*.nmake
-*.nmakesav
-NMake
-install.history

GAUDI_v20r4-branch/GaudiPolicy/cmt/cmt_make_shlib.bat

 @echo off
 
+rem Check if we were asked to export all the symbols in the library
+if %1 equ -export_all_symbols (
+    set EXPORT_ALL_SYMBOLS=yes
+    shift
+)
+
 rem #
 set bin=..\%1%
 set name=%2%
 rem   We need to define a better way to specify that option 
 rem
 
-if exist %bin%\%name%\%name%_dll.obj goto component
-if exist %bin%\%name%\%name%_entries.obj goto componentnew
+rem Special action if the environment variable EXPORT_ALL_SYMBOLS is defined
+IF NOT DEFINED EXPORT_ALL_SYMBOLS goto standard
 
-:linker
+:export_all
+%CMTROOT%\%CMTBIN%\cmt.exe build windefs %bin%\%name%.arc >%bin%\%name%.def
 
-%CMTROOT%\%CMTBIN%\cmt.exe build windefs %bin%\%name%.arc >%bin%\%name%.def
+rem Hack to reduce the number of exported symbols
+python %GAUDIPOLICYROOT%\cmt\remove_lines.py %bin%\%name%.def "details?@boost"
 
 lib.exe /nologo /machine:ix86 /def:%bin%\%name%.def /out:%bin%\%name%.lib
 
 
 goto return
 
-:component
+:standard
 link.exe /nologo /dll /out:%bin%\%name%.dll %bin%\%name%\*.obj /machine:ix86 %indirectlinkopts%
 goto return
- 
-:componentnew
-link.exe /nologo /dll /out:%bin%\%name%.dll %bin%\%name%\*.obj /machine:ix86 %indirectlinkopts%
 
 :return
 if exist %tmplinkopts% del %tmplinkopts%

GAUDI_v20r4-branch/GaudiPolicy/cmt/fragments/createProjVersHeader.py

-import sys, re
+import os, sys, re
 if len(sys.argv) != 4:
     print "ERROR: Usage %s <project> <version> <outputfile>"%sys.argv[0]
     exit(1)
 m = re.match("v([0-9]+)r([0-9]+)(?:p[0-9])?",version)
 majver, minver = [ int(x) for x in m.groups() ]
 
+outdir = os.path.dirname(outputfile)
+if not os.path.exists(outdir):
+    print "Creating directory", outdir
+    os.makedirs(outdir)
+
 open(outputfile,"w").write(
 """#ifndef %(proj)s_VERSION
 /* Automatically generated file: do not modify! */

GAUDI_v20r4-branch/GaudiPolicy/cmt/fragments/dependencies

+#-- start of dependency ------------------
+
+$(bin)${CONSTITUENT}_dependencies.make :: dirs
+
+ifndef QUICK
+$(bin)${CONSTITUENT}_dependencies.make :: ${LINE} requirements $(use_requirements) $(cmt_final_setup_${CONSTITUENT})
+	@echo "------> (${CONSTITUENT}.make) Rebuilding $@"; \
+	  args=`echo $? | sed -e "s#requirements.*##"`; \
+	  $(build_dependencies) ${CONSTITUENT} -all_sources $${args}
+endif
+
+#$(${CONSTITUENT}_dependencies)
+
+ifndef QUICK
+-include $(bin)${CONSTITUENT}_dependencies.make
+else
+ifneq ($(QUICK),2)
+-include $(bin)${CONSTITUENT}_dependencies.make
+endif
+endif
+#-- end of dependency -------------------

GAUDI_v20r4-branch/GaudiPolicy/cmt/fragments/dsp_shared_library_header

-# Microsoft Developer Studio Project File - Name=${CONSTITUENT}Shr - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
-
-CFG=${CONSTITUENT}Shr - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "${CONSTITUENT}Shr.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "${CONSTITUENT}Shr.mak" CFG="${CONSTITUENT}Shr - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "${CONSTITUENT}Shr - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "${CONSTITUENT}Shr - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE
-
-# Begin Project
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-F90=df.exe
-RSC=rc.exe
-
-!IF  "$(CFG)" == "${CONSTITUENT}Shr - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "../Win32"
-# PROP BASE Intermediate_Dir "../Win32"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "../Win32"
-# PROP Intermediate_Dir "../Win32/${CONSTITUENT}"
-# PROP Target_Dir ""
-# ADD BASE F90 $(${CONSTITUENT}_fflags} /libs:dll /dll $(fflags)
-# ADD F90 ${${CONSTITUENT}_fflags} /libs:dll /dll $(fflags)
-# ADD BASE CPP $(${CONSTITUENT}_cppflags) $(cppflags) /O2 /D "NDEBUG" $(includes) $(use_cppflags)
-# ADD CPP $(${CONSTITUENT}_cppflags) $(cppflags) /O2 /D "NDEBUG" $(includes) $(use_cppflags)
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 /nologo /nodefaultlib /subsystem:windows /dll /machine:I386
-# ADD LINK32  /nologo /nodefaultlib /subsystem:windows /dll /machine:I386 kernel32.lib user32.lib wsock32.lib advapi32.lib shell32.lib msvcrt.lib msvcprt.lib msvcirt.lib oldnames.lib ${${CONSTITUENT}_shlibflags} /out:"../Win32/lib${CONSTITUENT}Shr.dll" /implib:"../Win32/lib${CONSTITUENT}Shr.lib"
-# Begin Custom Build
-InputPath="..\Win32Debug\lib${CONSTITUENT}.lib"
-SOURCE=$(InputPath)
-${${CONSTITUENT}_shrCustomBuildDep}
-  ${${CONSTITUENT}_shrCustomBuild}
-  $(${CONSTITUENT}_shrCustomBuild1)
-  $(${CONSTITUENT}_shrCustomBuild2)
-  $(${CONSTITUENT}_shrCustomBuild3)
-
-# End Custom Build
-# Begin Special Build Tool
-SOURCE=$(InputPath)
-PreLink_Cmds=${${CONSTITUENT}_shrPreLink}       ${${CONSTITUENT}_shrPreLink1}   ${${CONSTITUENT}_shrPreLink2}
-PostBuild_Cmds=${${CONSTITUENT}_shrPostBuild}   ${${CONSTITUENT}_shrPostBuild1} ${${CONSTITUENT}_shrPostBuild2}
-# End Special Build Tool
-
-!ELSEIF  "$(CFG)" == "${CONSTITUENT}Shr - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "../Win32Debug"
-# PROP BASE Intermediate_Dir "../Win32Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "../Win32Debug"
-# PROP Intermediate_Dir "../Win32Debug/${CONSTITUENT}"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE F90  ${${CONSTITUENT}_fflags} /libs:dll /dll $(fflags) /nopdbfile /debug:full /optimize:0
-# ADD F90  ${${CONSTITUENT}_fflags} /libs:dll /dll $(fflags) /nopdbfile /debug:full /optimize:0
-# ADD BASE CPP $(${CONSTITUENT}_cppflags) $(cppflags) /Od /Z7 /D "_DEBUG" $(includes) $(use_cppflags)
-# ADD CPP $(${CONSTITUENT}_cppflags) $(cppflags) /Od /Z7 /D "_DEBUG" $(includes) $(use_cppflags)
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 /nologo /nodefaultlib /subsystem:windows /dll /machine:I386 /pdbtype:sept
-# ADD LINK32 /nologo /nodefaultlib /subsystem:windows /dll /machine:I386 /pdbtype:sept kernel32.lib user32.lib  wsock32.lib advapi32.lib shell32.lib msvcrt.lib msvcprt.lib msvcirt.lib oldnames.lib /debug ${${CONSTITUENT}_shlibflags} /out:"../Win32Debug/lib${CONSTITUENT}Shr.dll" /implib:"../Win32Debug/lib${CONSTITUENT}Shr.lib"
-# Begin Custom Build
-InputPath="..\Win32Debug\lib${CONSTITUENT}.lib"
-SOURCE=$(InputPath)
-${${CONSTITUENT}_shrCustomBuildDep}
-  ${${CONSTITUENT}_shrCustomBuild}
-  $(${CONSTITUENT}_shrCustomBuild1)
-  $(${CONSTITUENT}_shrCustomBuild2)
-  $(${CONSTITUENT}_shrCustomBuild3)
-
-# End Custom Build
-# Begin Special Build Tool
-SOURCE=$(InputPath)
-PreLink_Cmds=${${CONSTITUENT}_shrPreLink}       ${${CONSTITUENT}_shrPreLink1}   ${${CONSTITUENT}_shrPreLink2}
-PostBuild_Cmds=${${CONSTITUENT}_shrPostBuild}   ${${CONSTITUENT}_shrPostBuild1} ${${CONSTITUENT}_shrPostBuild2}
-# End Special Build Tool
-
-!ENDIF
-
-# Begin Target
-
-# Name "${CONSTITUENT}Shr - Win32 Release"
-# Name "${CONSTITUENT}Shr - Win32 Debug"

GAUDI_v20r4-branch/GaudiPolicy/cmt/fragments/genconfig_header

 product := $(instdir)/$(confpy)
 initpy  := $(instdir)/__init__.py
 
+ifdef GENCONF_ECHO
+genconf_silent =
+else
+genconf_silent = $(silent)
+endif
 
 ${CONSTITUENT} :: ${CONSTITUENT}install
 
 	 $(install_command) --exclude="*.py?" --exclude="__init__.py" $(outdir) $(conf_destdir) ; \
 
 $(outdir)/$(confpy) : $(conflib) $(outdir)
-	@$(genconfig_cmd) $(library_preload) -o $(outdir) -p $(package) \
+	$(genconf_silent) $(genconfig_cmd) $(library_preload) -o $(outdir) -p $(package) \
 	  --configurable-module=$(confModuleName) \
 	  --configurable-default-name=$(confDefaultName) \
 	  --configurable-algorithm=$(confAlgorithm) \

GAUDI_v20r4-branch/GaudiPolicy/cmt/fragments/install.py

     realdest = normpath(join(logdir, dest))
     dest_path = split(realdest)[0]
     realsrc = normpath(join(dest_path,src))
-    if (not exists(realdest)) or (getmtime(realsrc) > getmtime(realdest)):
+    # The modification time is compared only with the precision of the second
+    # to avoid a bug in Python 2.5 + Win32 (Fixed in Python 2.5.1).
+    # See:
+    #   http://bugs.python.org/issue1671965
+    #   http://bugs.python.org/issue1565150
+    if (not exists(realdest)) or (int(getmtime(realsrc)) > int(getmtime(realdest))):
         if not isdir(dest_path):
             print "Create dir '%s'"%(dest_path)
             makedirs(dest_path)

GAUDI_v20r4-branch/GaudiPolicy/cmt/fragments/library

+#-- start of libary ----------------------
 
 ${CONSTITUENT}LIB :: $(${CONSTITUENT}lib) $(${CONSTITUENT}shstamp)
 	@/bin/echo "------> ${CONSTITUENT} : library ok"
 
 $(${CONSTITUENT}lib) :: ${OBJS}
 	$(lib_echo) library
-	$(lib_silent) cd $(bin); $(ar) $(${CONSTITUENT}lib) $?;\
-           /bin/rm -f $?;touch $?
+	$(lib_silent) cd $(bin); \
+	  $(ar) $(${CONSTITUENT}lib) $?
 	$(lib_silent) $(ranlib) $(${CONSTITUENT}lib)
 	$(lib_silent) cat /dev/null >$(${CONSTITUENT}stamp)
 
-$(${CONSTITUENT}shstamp) :: $(${CONSTITUENT}lib)
-	$(lib_silent) cd $(bin); $(make_shlib) $(tag) ${CONSTITUENT} $(${CONSTITUENT}_shlibflags)
-	@if test -f $(bin)/lib${CONSTITUENT}.$(shlibsuffix) ; then cat /dev/null >$(${CONSTITUENT}shstamp) ; fi
+#------------------------------------------------------------------
+#  Future improvement? to empty the object files after
+#  storing in the library
+#
+##	  for f in $?; do \
+##	    rm $${f}; touch $${f}; \
+##	  done
+#------------------------------------------------------------------
+
+#
+# We add one level of dependency upon the true shared library