Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-08-06 09:38:21

0001 // -*- C++ -*-
0002 //
0003 // EventInfoBase.h is a part of ThePEG - Toolkit for HEP Event Generation
0004 // Copyright (C) 1999-2019 Leif Lonnblad
0005 //
0006 // ThePEG is licenced under version 3 of the GPL, see COPYING for details.
0007 // Please respect the MCnet academic guidelines, see GUIDELINES for details.
0008 //
0009 #ifndef ThePEG_EventInfoBase_H
0010 #define ThePEG_EventInfoBase_H
0011 // This is the declaration of the EventInfoBase class.
0012 
0013 #include "ThePEG/EventRecord/EventConfig.h"
0014 #include "ThePEG/Utilities/ClassDescription.h"
0015 
0016 namespace ThePEG {
0017 
0018 /**
0019  * EventInfoBase is a base class for information objects. It is used
0020  * as a base class for classes representing user-defined information
0021  * which may be associated with a Particle. The class itself is
0022  * practically empty. Information added in sub-classes can be accessed
0023  * from a Particle by the Particle::getInfo() function and the
0024  * resulting pointers need to be dynamically cast to check if they are
0025  * of a desired class.
0026  */
0027 class EventInfoBase: public EventRecordBase {
0028 
0029 public:
0030 
0031   /**
0032    * Rebind to cloned objects. If an EventInfoBase is cloned together
0033    * with a whole Event and this has pointers to other event record
0034    * objects, these should be rebound to their clones in this
0035    * function.
0036    */
0037   virtual void rebind(const EventTranslationMap & ) {}
0038 
0039   /**
0040    * Standard Init function. @see Base::Init().
0041    */
0042   static void Init() {}
0043 
0044   /**
0045    * Standard clone method.
0046    */
0047   virtual EIPtr clone() const { return new_ptr(*this); }
0048 
0049 private:
0050 
0051   /**
0052    * Describe concrete class without persistent data.
0053    */
0054   static NoPIOClassDescription<EventInfoBase> initEventInfoBase;
0055 
0056   /**
0057    *  Private and non-existent assignment operator.
0058    */
0059   EventInfoBase & operator=(const EventInfoBase &) = delete;
0060 
0061 };
0062 
0063 
0064 /** @cond TRAITSPECIALIZATIONS */
0065 ThePEG_DECLARE_CLASS_TRAITS(EventInfoBase,EventRecordBase);
0066 /** @endcond */
0067 
0068 }
0069 
0070 #endif /* ThePEG_EventInfoBase_H */