|
|
|||
File indexing completed on 2026-09-27 08:38:02
0001 /** 0002 * @file PandoraSDK/include/Api/PandoraApiImpl.h 0003 * 0004 * @brief Header file for the pandora api implementation class. 0005 * 0006 * $Log: $ 0007 */ 0008 #ifndef PANDORA_API_IMPL_H 0009 #define PANDORA_API_IMPL_H 1 0010 0011 #include "Api/PandoraApi.h" 0012 0013 namespace pandora 0014 { 0015 0016 class Pandora; 0017 0018 //------------------------------------------------------------------------------------------------------------------------------------------ 0019 0020 /** 0021 * @brief PandoraApiImpl class 0022 */ 0023 class PandoraApiImpl 0024 { 0025 private: 0026 /** 0027 * @brief Create an object for pandora 0028 * 0029 * @param parameters the object parameters 0030 * @param factory the factory that performs the object allocation 0031 */ 0032 template <typename PARAMETERS, typename OBJECT> 0033 StatusCode Create(const PARAMETERS ¶meters, const ObjectFactory<PARAMETERS, OBJECT> &factory) const; 0034 0035 /** 0036 * @brief Process event 0037 */ 0038 StatusCode ProcessEvent() const; 0039 0040 /** 0041 * @brief Set the event information 0042 * 0043 * @param run the run number 0044 * @param subrun the subrun number 0045 * @param event the event number 0046 */ 0047 StatusCode SetEventInformation(const unsigned int run, const unsigned int subrun, const unsigned int event) const; 0048 0049 /** 0050 * @brief Get an event context object 0051 * 0052 * @param key the key associated with the desired event context object 0053 * 0054 * @return the address of the event context object 0055 */ 0056 const EventContextObject *GetEventContextObject(const std::string &key) const; 0057 0058 /** 0059 * @brief Read pandora settings 0060 * 0061 * @param xmlFileName the name of the xml file containing the settings 0062 */ 0063 StatusCode ReadSettings(const std::string &xmlFileName) const; 0064 0065 /** 0066 * @brief Register an algorithm factory with pandora 0067 * 0068 * @param algorithmType the type of algorithm that the factory will create 0069 * @param pAlgorithmFactory the address of an algorithm factory instance 0070 */ 0071 StatusCode RegisterAlgorithmFactory(const std::string &algorithmType, AlgorithmFactory *const pAlgorithmFactory) const; 0072 0073 /** 0074 * @brief Register an algorithm tool factory with pandora 0075 * 0076 * @param algorithmToolType the type of algorithm tool that the factory will create 0077 * @param pAlgorithmToolFactory the address of an algorithm tool factory instance 0078 */ 0079 StatusCode RegisterAlgorithmToolFactory(const std::string &algorithmToolType, AlgorithmToolFactory *const pAlgorithmToolFactory) const; 0080 0081 /** 0082 * @brief Set parent-daughter mc particle relationship 0083 * 0084 * @param pParentAddress address of parent mc particle in the user framework 0085 * @param pDaughterAddress address of daughter mc particle in the user framework 0086 */ 0087 StatusCode SetMCParentDaughterRelationship(const void *const pParentAddress, const void *const pDaughterAddress) const; 0088 0089 /** 0090 * @brief Set parent-daughter track relationship 0091 * 0092 * @param pParentAddress address of parent track in the user framework 0093 * @param pDaughterAddress address of daughter track in the user framework 0094 */ 0095 StatusCode SetTrackParentDaughterRelationship(const void *const pParentAddress, const void *const pDaughterAddress) const; 0096 0097 /** 0098 * @brief Set sibling track relationship 0099 * 0100 * @param pFirstSiblingAddress address of first sibling track in the user framework 0101 * @param pSecondSiblingAddress address of second sibling track in the user framework 0102 */ 0103 StatusCode SetTrackSiblingRelationship(const void *const pFirstSiblingAddress, const void *const pSecondSiblingAddress) const; 0104 0105 /** 0106 * @brief Set calo hit to mc particle relationship 0107 * 0108 * @param pCaloHitParentAddress address of calo hit in the user framework 0109 * @param pMCParticleParentAddress address of mc particle in the user framework 0110 * @param mcParticleWeight weighting to assign to the mc particle 0111 */ 0112 StatusCode SetCaloHitToMCParticleRelationship( 0113 const void *const pCaloHitParentAddress, const void *const pMCParticleParentAddress, const float mcParticleWeight) const; 0114 0115 /** 0116 * @brief Set track to mc particle relationship 0117 * 0118 * @param pTrackParentAddress address of track in the user framework 0119 * @param pMCParticleParentAddress address of mc particle in the user framework 0120 * @param mcParticleWeight weighting to assign to the mc particle 0121 */ 0122 StatusCode SetTrackToMCParticleRelationship( 0123 const void *const pTrackParentAddress, const void *const pMCParticleParentAddress, const float mcParticleWeight) const; 0124 0125 /** 0126 * @brief Get the current pfo list 0127 * 0128 * @param pPfoList to receive the address of the current pfo list 0129 * @param pfoListName to receive the current pfo list name 0130 */ 0131 StatusCode GetCurrentPfoList(const PfoList *&pPfoList, std::string &pfoListName) const; 0132 0133 /** 0134 * @brief Get a named pfo list 0135 * 0136 * @param pfoListName the name of the pfo list 0137 * @param pPfoList to receive the address of the pfo list 0138 */ 0139 StatusCode GetPfoList(const std::string &pfoListName, const PfoList *&pPfoList) const; 0140 0141 /** 0142 * @brief Set the granularity level to be associated with a specified hit type 0143 * 0144 * @param hitType the specified hit type 0145 * @param granularity the specified granularity 0146 */ 0147 StatusCode SetHitTypeGranularity(const HitType hitType, const Granularity granularity) const; 0148 0149 /** 0150 * @brief Set the bfield plugin used by pandora 0151 * 0152 * @param pBFieldPlugin address of the bfield plugin (will pass ownership to pandora) 0153 */ 0154 StatusCode SetBFieldPlugin(BFieldPlugin *const pBFieldPlugin) const; 0155 0156 /** 0157 * @brief Set the lar transformation plugin used by pandora 0158 * 0159 * @param pLArTransformationPlugin address of the lar transformation plugin (will pass ownership to pandora) 0160 */ 0161 StatusCode SetLArTransformationPlugin(LArTransformationPlugin *const pLArTransformationPlugin) const; 0162 0163 /** 0164 * @brief Set the pseudo layer plugin used by pandora 0165 * 0166 * @param pPseudoLayerPlugin address of the pseudo layer plugin (will pass ownership to pandora) 0167 */ 0168 StatusCode SetPseudoLayerPlugin(PseudoLayerPlugin *const pPseudoLayerPlugin) const; 0169 0170 /** 0171 * @brief Set the shower profile plugin used by pandora 0172 * 0173 * @param pPseudoLayerPlugin address of the pseudo layer plugin (will pass ownership to pandora) 0174 */ 0175 StatusCode SetShowerProfilePlugin(ShowerProfilePlugin *const pShowerProfilePlugin) const; 0176 0177 /** 0178 * @brief Register an energy correction plugin 0179 * 0180 * @param name the name/label associated with the energy correction plugin 0181 * @param energyCorrectionType the energy correction type 0182 * @param pEnergyCorrectionPlugin address of the energy correction plugin (will pass ownership to pandora) 0183 */ 0184 StatusCode RegisterEnergyCorrectionPlugin(const std::string &name, const EnergyCorrectionType energyCorrectionType, 0185 EnergyCorrectionPlugin *const pEnergyCorrectionPlugin) const; 0186 0187 /** 0188 * @brief Register a particle id plugin 0189 * 0190 * @param functionName the name/label associated with the particle id plugin 0191 * @param pParticleIdPlugin address of the particle id plugin (will pass ownership to pandora) 0192 */ 0193 StatusCode RegisterParticleIdPlugin(const std::string &name, ParticleIdPlugin *const pParticleIdPlugin) const; 0194 0195 /** 0196 * @brief Reset pandora to process another event 0197 */ 0198 StatusCode ResetEvent() const; 0199 0200 /** 0201 * @brief Constructor 0202 * 0203 * @param pPandora address of the pandora object to interface 0204 */ 0205 PandoraApiImpl(Pandora *const pPandora); 0206 0207 Pandora *m_pPandora; ///< The pandora object to provide an interface to 0208 0209 friend class Pandora; 0210 friend class PandoraImpl; 0211 friend class ::PandoraApi; 0212 template <typename PARAMETERS, typename METADATA, typename OBJECT> 0213 friend class ::object_creation::ObjectCreationHelper; 0214 }; 0215 0216 } // namespace pandora 0217 0218 #endif // #ifndef PANDORA_API_IMPL_H
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|