Commit 67f6e4da authored by Marco Clemencic's avatar Marco Clemencic
Browse files

Moved ParticlePropertySvc to a dedicated package (in namespace Gaudi)

IN PROGRESS - issue GAUDI-1: Split GaudiSvc in smaller libraries 
https://sftjira.cern.ch/browse/GAUDI-1

From: Marco Clemencic <marco.clemencic@cern.ch>


git-svn-id: svn+ssh://svn.cern.ch/reps/gaudi/Gaudi/branches/GAUDI/GAUDI_newpack@6726 53ecefc3-a64d-0410-9bdf-b8581fa3287e
parent 0d7c28a5
......@@ -7,6 +7,7 @@ use AIDA * LCG_Interfaces
use Gaudi *
use GaudiPartProp * -no_auto_imports
use PartPropSvc * -no_auto_imports
use GaudiPython * -no_auto_imports
use GaudiGSL *
......
......@@ -3,6 +3,8 @@ Package manager : Marco Clemencic
! 2011-12-05 - Marco Clemencic
- Removed the unused FastContainerSvc.
- Moved ParticlePropertySvc to a dedicated package and wrapped it in the
namespace Gaudi.
! 2011-12-02 - Marco Clemencic
- Removed DataListenerSvc test.
......
// $Id: PPSLHCb.cpp,v 1.1 2008/05/29 18:12:56 marcocle Exp $
// Include files
// from Gaudi
#include "GaudiKernel/AlgFactory.h"
#include "GaudiKernel/IParticlePropertySvc.h"
// local
#include "PPSLHCb.h"
#include "GaudiPPS.h"
//-----------------------------------------------------------------------------
// Implementation file for class : PPSLHCb
// Implementation file for class : GaudiPPS
//
// 2008-05-23 : Marco CLEMENCIC
//-----------------------------------------------------------------------------
namespace GaudiExamples {
// Declaration of the Algorithm Factory
DECLARE_ALGORITHM_FACTORY( PPSLHCb )
DECLARE_ALGORITHM_FACTORY( GaudiPPS )
//=============================================================================
// Standard constructor, initializes variables
//=============================================================================
PPSLHCb::PPSLHCb( const std::string& name,
GaudiPPS::GaudiPPS( const std::string& name,
ISvcLocator* pSvcLocator)
: GaudiAlgorithm ( name , pSvcLocator )
{
......@@ -30,18 +28,18 @@ PPSLHCb::PPSLHCb( const std::string& name,
//=============================================================================
// Destructor
//=============================================================================
PPSLHCb::~PPSLHCb() {}
GaudiPPS::~GaudiPPS() {}
//=============================================================================
// Initialization
//=============================================================================
StatusCode PPSLHCb::initialize() {
StatusCode GaudiPPS::initialize() {
StatusCode sc = GaudiAlgorithm::initialize(); // must be executed first
if ( sc.isFailure() ) return sc; // error printed already by GaudiAlgorithm
if ( msgLevel(MSG::DEBUG) ) debug() << "==> Initialize" << endmsg;
svc<IParticlePropertySvc>("ParticlePropertySvc",true);
svc<IParticlePropertySvc>("Gaudi::ParticlePropertySvc",true);
return StatusCode::SUCCESS;
}
......@@ -49,7 +47,7 @@ StatusCode PPSLHCb::initialize() {
//=============================================================================
// Main execution
//=============================================================================
StatusCode PPSLHCb::execute() {
StatusCode GaudiPPS::execute() {
if ( msgLevel(MSG::DEBUG) ) debug() << "==> Execute" << endmsg;
......@@ -59,11 +57,12 @@ StatusCode PPSLHCb::execute() {
//=============================================================================
// Finalize
//=============================================================================
StatusCode PPSLHCb::finalize() {
StatusCode GaudiPPS::finalize() {
if ( msgLevel(MSG::DEBUG) ) debug() << "==> Finalize" << endmsg;
return GaudiAlgorithm::finalize(); // must be called after all other actions
}
} // namespace GaudiExamples
//=============================================================================
// $Id: PPSLHCb.h,v 1.1 2008/05/29 18:12:56 marcocle Exp $
#ifndef PARTPROP_PPSLHCB_H
#define PARTPROP_PPSLHCB_H 1
#ifndef PARTPROP_GAUDIPPS_H
#define PARTPROP_GAUDIPPS_H 1
// Include files
// from Gaudi
#include "GaudiAlg/GaudiAlgorithm.h"
/** @class PPSLHCb PPSLHCb.h PartProp/PPSLHCb.h
*
namespace GaudiExamples {
/** Small algorithm using Gaudi::ParticlePropertySvc.
*
* @author Marco CLEMENCIC
* @date 2008-05-23
*/
class PPSLHCb : public GaudiAlgorithm {
public:
class GaudiPPS : public GaudiAlgorithm {
public:
/// Standard constructor
PPSLHCb( const std::string& name, ISvcLocator* pSvcLocator );
GaudiPPS( const std::string& name, ISvcLocator* pSvcLocator );
virtual ~PPSLHCb( ); ///< Destructor
virtual ~GaudiPPS( ); ///< Destructor
virtual StatusCode initialize(); ///< Algorithm initialization
virtual StatusCode execute (); ///< Algorithm execution
virtual StatusCode finalize (); ///< Algorithm finalization
protected:
private:
};
#endif // PARTPROP_PPSLHCB_H
}
#endif // PARTPROP_GAUDIPPS_H
......@@ -3,7 +3,8 @@
<argument name="program"><text>gaudirun.py</text></argument>
<argument name="options"><text>
from Gaudi.Configuration import *
from Configurables import PPSLHCb
from Configurables import Gaudi__ParticlePropertySvc as ParticlePropertySvc
from Configurables import GaudiExamples__GaudiPPS as GaudiPPS
importOptions("Common.opts")
......@@ -11,7 +12,7 @@ ParticlePropertySvc( ParticlePropertiesFile = "../data/ParticleTable.txt" )
ApplicationMgr( EvtMax = 1,
EvtSel = 'NONE',
TopAlg = [PPSLHCb()] )
TopAlg = [GaudiPPS()] )
</text></argument>
<argument name="validator"><text>
......
# ============================================================================
# Created : 2011-12-05
# Maintainer : Marco Clemencic
# ============================================================================
package GaudiPartProp
version v1r0
# ============================================================================
# Structure, i.e. directories to process.
# ============================================================================
branches doc src cmt
# ============================================================================
# Used packages. Specify the version, * at the end specifies 'any revision'
# Put as many lines as needed, with all packages, without the '#'
# ============================================================================
use GaudiKernel *
include_path none
# ============================================================================
# Component library building rule
# ============================================================================
library GaudiPartProp -no_static *.cpp
# ============================================================================
# define component library link options
# ============================================================================
apply_pattern component_library library=GaudiPartProp
!-----------------------------------------------------------------------------
! Package : GaudiPartProp
! Responsible : Marco Clemencic
! Purpose : Gaudi Particle Property Service
!-----------------------------------------------------------------------------
! 2011-12-05 - Marco Clemencic
- Moved ParticlePropertySvc to a dedicated package and wrapped it in the
namespace Gaudi.
// $Id: ParticlePropertySvc.cpp,v 1.17 2008/10/27 16:41:33 marcocle Exp $
// ============================================================================
// CVS tag $Name: $ , version $Revision: 1.17 $
// ============================================================================
//Include files
// Include files
// ============================================================================
// STD&STL
// ============================================================================
......@@ -26,6 +23,7 @@
// ============================================================================
#include "ParticlePropertySvc.h"
// ============================================================================
namespace Gaudi {
/** Instantiation of a static factory class used by clients to create
* instances of this service
*/
......@@ -39,7 +37,7 @@ DECLARE_SERVICE_FACTORY(ParticlePropertySvc)
* @author : I. Last
* Modify by : G.Corti 09/11/1999 to read file from LHCBDBASE and
* introduce find/eraseByStdHepID methods
* Modified by Vanya BELYAEV to allow readig of additional files
* Modified by Vanya BELYAEV to allow reading of additional files
* to add/replace/modify the existing particle properties
*/
// ============================================================================
......@@ -617,6 +615,8 @@ bool ParticlePropertySvc::diff
//
return result ;
}
}
#ifdef __ICC
// re-enable icc remark #1572
#pragma warning(pop)
......
// $Id: ParticlePropertySvc.h,v 1.9 2008/05/09 12:43:29 marcocle Exp $
// ============================================================================
// CVS tag $Name: $, version $Revision: 1.9 $
// ============================================================================
#ifndef PARTICLEPROPERTYSVC_PARTICLEPROPERTYSVC_H
#define PARTICLEPROPERTYSVC_PARTICLEPROPERTYSVC_H
// ============================================================================
......@@ -20,6 +16,7 @@
class IFileAccess;
namespace Gaudi {
// ============================================================================
/** @class ParticlePropertySvc ParticlePropertySvc.h
*
......@@ -42,8 +39,8 @@ class IFileAccess;
* @author Vanya BELYAEV
* @date 2006-09-22
* 1) Modified to add possibility to redefine properties of existing
* particles and to read addiitonal files.
* New propeety "OtherFiles" (default is empty vector) is introduces.
* particles and to read additional files.
* New property "OtherFiles" (default is empty vector) is introduces.
* Service parsed additional files after the main one.
*
* @code
......@@ -56,8 +53,8 @@ class IFileAccess;
*
* @endcode
*
* 2) Add possibility to modify only certain partiles through the
* new property "Particles" (default is enpty list),
* 2) Add possibility to modify only certain particles through the
* new property "Particles" (default is empty list),
* Each line is interpreted as a line in particle data table, e.g.
*
* @code
......@@ -119,7 +116,7 @@ public:
* @return StatusCode - SUCCESS if the particle property was added.
*/
virtual StatusCode push_back( ParticleProperty* pp );
/// Get a const reference to the begining of the container.
/// Get a const reference to the beginning of the container.
virtual const_iterator begin() const { return m_vectpp.begin() ; }
/// Get a const reference to the end of the container.
virtual const_iterator end () const { return m_vectpp.end() ; }
......@@ -188,7 +185,7 @@ private:
std::string m_filename; ///< Filename of the particle properties file
Files m_other ; ///< additional file names
// properties to be redefined explicitely
// properties to be redefined explicitly
Particles m_particles ;
VectPP m_vectpp; ///< Vector of all particle properties
......@@ -203,7 +200,7 @@ private:
IFileAccess *m_fileAccess;
};
} // namespace Gaudi
// =============================================================================
// The END
// =============================================================================
......
......@@ -27,6 +27,7 @@ use GaudiAud v9r4
use GaudiAlg v13r8
use GaudiGSL v7r10
use GaudiUtils v3r14
use GaudiPartProp v1r0
# Technology-specific Persistency packages
use RootHistCnv v10r7
......
......@@ -12,7 +12,6 @@ use ROOT * LCG_Interfaces -no_auto_imports
library GaudiSvc -import=Boost -import=CLHEP -import=ROOT -no_static \
DetectorDataSvc/*.cpp \
NTupleSvc/*.cpp \
ParticlePropertySvc/*.cpp \
RndmGenSvc/*.cpp \
THistSvc/*.cpp
......
......@@ -3,6 +3,8 @@ Package manager : Marco Clemencic
! 2011-12-05 - Marco Clemencic
- Removed the unused FastContainerSvc.
- Moved ParticlePropertySvc to a dedicated package and wrapped it in the
namespace Gaudi.
! 2011-12-02 - Marco Clemencic
- Moved VFSSvc from GaudiSvc to GaudiUtils.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment