Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-27 09:15:19

0001 /**
0002  *  @file   PandoraSDK/include/Managers/PluginManager.h
0003  * 
0004  *  @brief  Header file for the pandora plugin manager class.
0005  * 
0006  *  $Log: $
0007  */
0008 #ifndef PANDORA_PLUGIN_MANAGER_H
0009 #define PANDORA_PLUGIN_MANAGER_H 1
0010 
0011 #include "Pandora/StatusCodes.h"
0012 
0013 namespace pandora
0014 {
0015 
0016 class BFieldPlugin;
0017 class LArTransformationPlugin;
0018 class PseudoLayerPlugin;
0019 class ShowerProfilePlugin;
0020 
0021 class EnergyCorrections;
0022 class ParticleId;
0023 
0024 class Pandora;
0025 class TiXmlHandle;
0026 
0027 //------------------------------------------------------------------------------------------------------------------------------------------
0028 
0029 /**
0030  *  @brief PluginManager class
0031  */
0032 class PluginManager
0033 {
0034 public:
0035     /**
0036      *  @brief  Constructor
0037      * 
0038      *  @param  pPandora address of the associated pandora object
0039      */
0040     PluginManager(const Pandora *const pPandora);
0041 
0042     /**
0043      *  @brief  Destructor
0044      */
0045     ~PluginManager();
0046 
0047     /**
0048      *  @brief  Whether the b field plugin is available
0049      * 
0050      *  @return boolean
0051      */
0052     bool HasBFieldPlugin() const;
0053 
0054     /**
0055      *  @brief  Whether the lar transformation plugin is available
0056      * 
0057      *  @return boolean
0058      */
0059     bool HasLArTransformationPlugin() const;
0060 
0061     /**
0062      *  @brief  Whether the pseudo layer plugin is available
0063      * 
0064      *  @return boolean
0065      */
0066     bool HasPseudoLayerPlugin() const;
0067 
0068     /**
0069      *  @brief  Whether the shower profile plugin is available
0070      * 
0071      *  @return boolean
0072      */
0073     bool HasShowerProfilePlugin() const;
0074 
0075     /**
0076      *  @brief  Get the address of the b field plugin
0077      * 
0078      *  @return the address of the b field plugin
0079      */
0080     const BFieldPlugin *GetBFieldPlugin() const;
0081 
0082     /**
0083      *  @brief  Get the address of the lar transformation plugin
0084      * 
0085      *  @return the address of the lar transformation plugin
0086      */
0087     const LArTransformationPlugin *GetLArTransformationPlugin() const;
0088 
0089     /**
0090      *  @brief  Get the address of the pseudo layer plugin
0091      * 
0092      *  @return the address of the pseudo layer plugin
0093      */
0094     const PseudoLayerPlugin *GetPseudoLayerPlugin() const;
0095 
0096     /**
0097      *  @brief  Get the shower profile plugin
0098      * 
0099      *  @return address of the shower profile plugin
0100      */
0101     const ShowerProfilePlugin *GetShowerProfilePlugin() const;
0102 
0103     /**
0104      *  @brief  Get the pandora energy corrections instance
0105      * 
0106      *  @return the address of the pandora energy corrections instance
0107      */
0108     const EnergyCorrections *GetEnergyCorrections() const;
0109 
0110     /**
0111      *  @brief  Get the address of the pandora particle id instance
0112      * 
0113      *  @return the address of the pandora particle id instance
0114      */
0115     const ParticleId *GetParticleId() const;
0116 
0117 private:
0118     /**
0119      *  @brief  Set the bfield plugin
0120      * 
0121      *  @param  pBFieldPlugin address of the bfield plugin
0122      */
0123     StatusCode SetBFieldPlugin(BFieldPlugin *const pBFieldPlugin);
0124 
0125     /**
0126      *  @brief  Set the lar transformation plugin
0127      * 
0128      *  @param  pLArTransformationPlugin address of the lar transformation plugin
0129      */
0130     StatusCode SetLArTransformationPlugin(LArTransformationPlugin *const pLArTransformationPlugin);
0131 
0132     /**
0133      *  @brief  Set the pseudo layer plugin
0134      * 
0135      *  @param  pPseudoLayerPlugin address of the pseudo layer plugin
0136      */
0137     StatusCode SetPseudoLayerPlugin(PseudoLayerPlugin *const pPseudoLayerPlugin);
0138 
0139     /**
0140      *  @brief  Set the shower profile plugin
0141      * 
0142      *  @param  pPseudoLayerPlugin address of the shower profile plugin
0143      */
0144     StatusCode SetShowerProfilePlugin(ShowerProfilePlugin *const pShowerProfilePlugin);
0145 
0146     /**
0147      *  @brief  Initialize plugins
0148      * 
0149      *  @param  pXmlHandle address of the relevant xml handle
0150      */
0151     StatusCode InitializePlugins(const TiXmlHandle *const pXmlHandle);
0152 
0153     /**
0154      *  @brief  Call the reset callback in all managed plugins
0155      */
0156     StatusCode ResetForNextEvent();
0157 
0158     BFieldPlugin                   *m_pBFieldPlugin;                    ///< Address of the bfield plugin
0159     LArTransformationPlugin        *m_pLArTransformationPlugin;         ///< Address of the lar transformation plugin
0160     PseudoLayerPlugin              *m_pPseudoLayerPlugin;               ///< Address of the pseudolayer plugin
0161     ShowerProfilePlugin            *m_pShowerProfilePlugin;             ///< The shower profile plugin
0162 
0163     EnergyCorrections              *m_pEnergyCorrections;               ///< The energy corrections
0164     ParticleId                     *m_pParticleId;                      ///< The particle id
0165 
0166     const Pandora *const            m_pPandora;                         ///< The associated pandora object
0167 
0168     friend class PandoraApiImpl;
0169     friend class PandoraImpl;
0170 };
0171 
0172 } // namespace pandora
0173 
0174 #endif // #ifndef PANDORA_PLUGIN_MANAGER_H