Back to home page

sPhenix code displayed by LXR

 
 

    


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

0001 // Tell emacs that this is a C++ source
0002 //  -*- C++ -*-.
0003 #ifndef FFAOBJECTS_FLAGSAVE_H
0004 #define FFAOBJECTS_FLAGSAVE_H
0005 
0006 #include <phool/PHObject.h>
0007 #include <phool/phool.h>
0008 
0009 class PHFlag;
0010 
0011 ///
0012 class FlagSave : public PHObject
0013 {
0014  public:
0015   /// dtor
0016   ~FlagSave() override {}
0017 
0018   /// Clear Flag
0019   void Reset() override
0020   {
0021     std::cout << PHWHERE << "ERROR Reset() not implemented by daughter class" << std::endl;
0022     return;
0023   }
0024 
0025   /** identify Function from PHObject
0026       @param os Output Stream
0027    */
0028   void identify(std::ostream& os = std::cout) const override
0029   {
0030     os << "identify yourself: virtual FlagSave Object" << std::endl;
0031     return;
0032   }
0033 
0034   /// isValid returns non zero if object contains valid data
0035   int isValid() const override
0036   {
0037     std::cout << PHWHERE << "isValid not implemented by daughter class" << std::endl;
0038     return 0;
0039   }
0040 
0041   /// Flags are read during InitRun() and written during End()
0042   /// Fills DST object with flags, if clearold is set, old flags from previous files
0043   /// which were deleted will not be saved
0044   virtual int FillFromPHFlag(const PHFlag* /*flags*/, const bool /* clearold */) { return -1; }
0045   /// Read back flags from the DST, if overwrite is set: flags from DST object will overwrite
0046   /// flag values set in the macro
0047   virtual int PutFlagsBack(PHFlag* /*flags*/, const bool /* overwrite */) { return -1; }
0048 
0049  private:
0050   ClassDefOverride(FlagSave, 1)
0051 };
0052 
0053 #endif