Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-30 10:11:34

0001 #ifndef PROCESSUNKNOWNID_HH
0002 #define PROCESSUNKNOWNID_HH
0003 // ----------------------------------------------------------------------
0004 //
0005 // ProcessUnknownID.hh
0006 // Author: Lynn Garren
0007 //
0008 // ----------------------------------------------------------------------
0009 
0010 #include "HepPDT/ParticleID.hh"
0011 #include "HepPDT/CommonParticleData.hh"
0012 
0013 namespace HepPDT {
0014 
0015 // forward declaration to avoid circular dependencies
0016 class ParticleDataTable;
0017 
0018   
0019 //! The ProcessUnknownID class is abstract.
0020 
0021 ///
0022 /// \class ProcessUnknownID
0023 /// \author Lynn Garren
0024 ///
0025 /// This is an abstract class which allows you to define 
0026 /// your own methods for handling undefined particle lookups.
0027 ///
0028 class ProcessUnknownID  {
0029 
0030 public:
0031 
0032   /// safety wrapper to avoid secondary calls to processUnknownID
0033   CommonParticleData  * callProcessUnknownID( ParticleID, const ParticleDataTable & );
0034 
0035   /// allow cleanup by ParticleDataTable
0036   virtual ~ProcessUnknownID( ) {}
0037 
0038 protected:
0039   ProcessUnknownID( ) : alreadyHere(false) {}
0040 
0041 private: 
0042 
0043   bool alreadyHere;
0044 
0045   virtual CommonParticleData  * processUnknownID( ParticleID, 
0046                                             const ParticleDataTable & ) = 0;
0047 
0048 };  // ProcessUnknownID
0049 
0050 }   // HepPDT
0051 
0052 #endif // PROCESSUNKNOWNID_HH