/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/Reconstruction/MdcPatRec/TrkBase/TrkBase-00-01-12/TrkBase/AbsEvtObj.h

Go to the documentation of this file.
00001 //--------------------------------------------------------------------------
00002 // File and Version Information:
00003 //      $Id: AbsEvtObj.h,v 1.1.1.1 2005/04/21 06:01:42 zhangy Exp $
00004 //
00005 // Description:
00006 //      Class AbsEvtObj header file
00007 //
00008 //      An AbsEvtObj is an abstract base class for holding common
00009 //      method definitions for all objects in an AbsEvent
00010 //
00011 //      The most important of these virtual methods is the destructor,
00012 //      used to break dependencies on teh various class definitions
00013 //
00014 //      Three forms of print are also declared.  
00015 //        stream << operator:
00016 //           summarize object as a string, without using endl or newlines
00017 //        print():
00018 //           equivalent to the << operator
00019 //        printAll():
00020 //           output the entire contents of the object, using multiple
00021 //           lines if needed.  Should end with endl
00022 //
00023 // Environment:
00024 //      Software developed for the BaBar Detector at the SLAC B-Factory.
00025 //
00026 // Author List:
00027 //      Bob Jacobsen            LBNL
00028 //      Ed Frank                University of Pennsylvania
00029 //
00030 // Copyright Information:
00031 //      Copyright (C) 1995      LBNL
00032 //
00033 // History
00034 //    ??xxx??  BobJ             First versions
00035 //    02Feb97  Ed Frank         Inherit from ProxyDict/DictData
00036 //
00037 // BUGS:
00038 //    Any given object should have exactly one DictData base class.
00039 //    There is a question of whether to make AbsEvtObj have DictData
00040 //    as a public base or as a virtual public base.  I've left it as
00041 //    the former, thus leaving the design requirment of
00042 //    "just one DictData base" as a responsibility of the user.  I'm
00043 //    not sure if this is the right thing to do.  Comments are welcome.
00044 //    If you are confused: the context is multiple inheritance
00045 //    usage cases.
00046 //------------------------------------------------------------------------
00047 #ifndef ABSEVTOBJ_H
00048 #define ABSEVTOBJ_H
00049 //#include "BaBar/BaBar.hh"
00050 
00051 #include <assert.h>
00052 #include <iosfwd>
00053 //class AbsEvent;
00054 //class ToyCacheMgr;
00055 
00056 //
00057 // Class Definition
00058 //
00059 
00060 class AbsEvtObj {
00061 
00062 public:
00063 
00064   virtual ~AbsEvtObj();
00065 
00066   // There are three different print forms:
00067   // 'print(cout)', used by and equivalent to <<, occupies exactly one line
00068   virtual void print(std::ostream& o) const;
00069 
00070   // 'printAll(cout)', is allowed to take multiple lines and should
00071   // dump entire contents
00072   virtual void printAll(std::ostream& o) const;
00073 
00074   // used to setup any needed internal pointers for I/O
00075   // right now, this is not used. Its intended as a post-load dbio setup.
00076 //  virtual void loadPtrs(const AbsEvent* ) {};
00077 //  virtual void savePtrs(const AbsEvent* ) {};
00078 
00079   //This is a fix for ToyPrototype
00080 //    virtual void bindCacheMgr(ToyCacheMgr*) {};
00081   
00082   // op == is needed so these can be held in Tools.h++ collections
00083   inline bool operator== (const AbsEvtObj& a) const { return this==&a; }
00084 
00085 protected:
00086   // default constructor is protected to make it harder to 
00087   // instantiate by accident
00088   
00089   AbsEvtObj() {};
00090 
00091   // assignment operator protected to avoid use except by subclasses
00092   AbsEvtObj& operator = (const AbsEvtObj&) {return *this;};
00093 
00094 };
00095 
00096 // The third print form is the stand alone:
00097 std::ostream&  operator << (std::ostream& o, const AbsEvtObj&);
00098 
00099 #endif

Generated on Tue Nov 29 23:13:41 2016 for BOSS_7.0.2 by  doxygen 1.4.7