BOSS 7.0.3
BESIII Offline Software System
Loading...
Searching...
No Matches
Reconstruction/MdcPatRec/TrkBase/TrkBase-00-01-12/TrkBase/AbsEvtObj.h
Go to the documentation of this file.
1//--------------------------------------------------------------------------
2// File and Version Information:
3// $Id: AbsEvtObj.h,v 1.1.1.1 2005/04/21 06:01:42 zhangy Exp $
4//
5// Description:
6// Class AbsEvtObj header file
7//
8// An AbsEvtObj is an abstract base class for holding common
9// method definitions for all objects in an AbsEvent
10//
11// The most important of these virtual methods is the destructor,
12// used to break dependencies on teh various class definitions
13//
14// Three forms of print are also declared.
15// stream << operator:
16// summarize object as a string, without using endl or newlines
17// print():
18// equivalent to the << operator
19// printAll():
20// output the entire contents of the object, using multiple
21// lines if needed. Should end with endl
22//
23// Environment:
24// Software developed for the BaBar Detector at the SLAC B-Factory.
25//
26// Author List:
27// Bob Jacobsen LBNL
28// Ed Frank University of Pennsylvania
29//
30// Copyright Information:
31// Copyright (C) 1995 LBNL
32//
33// History
34// ??xxx?? BobJ First versions
35// 02Feb97 Ed Frank Inherit from ProxyDict/DictData
36//
37// BUGS:
38// Any given object should have exactly one DictData base class.
39// There is a question of whether to make AbsEvtObj have DictData
40// as a public base or as a virtual public base. I've left it as
41// the former, thus leaving the design requirment of
42// "just one DictData base" as a responsibility of the user. I'm
43// not sure if this is the right thing to do. Comments are welcome.
44// If you are confused: the context is multiple inheritance
45// usage cases.
46//------------------------------------------------------------------------
47#ifndef ABSEVTOBJ_H
48#define ABSEVTOBJ_H
49//#include "BaBar/BaBar.hh"
50
51#include <assert.h>
52#include <iosfwd>
53//class AbsEvent;
54//class ToyCacheMgr;
55
56//
57// Class Definition
58//
59
60class AbsEvtObj {
61
62public:
63
64 virtual ~AbsEvtObj();
65
66 // There are three different print forms:
67 // 'print(cout)', used by and equivalent to <<, occupies exactly one line
68 virtual void print(std::ostream& o) const;
69
70 // 'printAll(cout)', is allowed to take multiple lines and should
71 // dump entire contents
72 virtual void printAll(std::ostream& o) const;
73
74 // used to setup any needed internal pointers for I/O
75 // right now, this is not used. Its intended as a post-load dbio setup.
76// virtual void loadPtrs(const AbsEvent* ) {};
77// virtual void savePtrs(const AbsEvent* ) {};
78
79 //This is a fix for ToyPrototype
80// virtual void bindCacheMgr(ToyCacheMgr*) {};
81
82 // op == is needed so these can be held in Tools.h++ collections
83 inline bool operator== (const AbsEvtObj& a) const { return this==&a; }
84
85protected:
86 // default constructor is protected to make it harder to
87 // instantiate by accident
88
90
91 // assignment operator protected to avoid use except by subclasses
92 AbsEvtObj& operator = (const AbsEvtObj&) {return *this;};
93
94};
95
96// The third print form is the stand alone:
97std::ostream& operator << (std::ostream& o, const AbsEvtObj&);
98
99#endif
std::ostream & operator<<(std::ostream &o, const AbsEvtObj &)
AbsEvtObj & operator=(const AbsEvtObj &)
virtual ~AbsEvtObj()
virtual void printAll(std::ostream &o) const
bool operator==(const AbsEvtObj &a) const
virtual void print(std::ostream &o) const