Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-05 08:16:20

0001 #ifndef PHOOL_PHOBJECT_H
0002 #define PHOOL_PHOBJECT_H
0003 
0004 //  Declaration of class PHObject
0005 //  Purpose: Tiny layer between TObject and output objects and
0006 //           enforce some standards
0007 //  Author: Chris Pinkenburg
0008 
0009 #include <TObject.h>
0010 
0011 #include <iostream>
0012 
0013 class PHObject : public TObject
0014 {
0015  public:
0016   /// ctor
0017   PHObject() = default;
0018 
0019   /// dtor
0020   ~PHObject() override = default;
0021   /// Virtual copy constructor.
0022   virtual PHObject* CloneMe() const;
0023 
0024   virtual PHObject* clone() const final;
0025   PHObject* Clone(const char* newname = "") const final;
0026   void Copy(TObject& object) const final;
0027 
0028   /** identify Function from PHObject
0029       @param os Output Stream
0030    */
0031   virtual void identify(std::ostream& os = std::cout) const;
0032 
0033   /// Clear Event
0034   virtual void Reset();
0035 
0036   /// isValid returns non zero if object contains vailid data
0037   virtual int isValid() const;
0038 
0039   virtual int Integrate() const { return 0; }
0040   virtual int Integrate(PHObject* /*obj*/) { return -1; }
0041   virtual void CopyFrom(const PHObject* obj);
0042 
0043  private:
0044   ClassDefOverride(PHObject, 0)  // no I/O
0045 };
0046 
0047 #endif /* PHOOL_PHOBJECT_H */