Back to home page

sPhenix code displayed by LXR

 
 

    


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

0001 // Tell emacs that this is a C++ source
0002 //  -*- C++ -*-.
0003 #ifndef FUN4ALL_FUN4ALLMONITORING_H
0004 #define FUN4ALL_FUN4ALLMONITORING_H
0005 
0006 #include "Fun4AllBase.h"
0007 
0008 #include <cstdint>
0009 #include <string>
0010 
0011 class Fun4AllMonitoring : public Fun4AllBase
0012 {
0013  public:
0014   static Fun4AllMonitoring *instance()
0015   {
0016     if (mInstance) return mInstance;
0017     mInstance = new Fun4AllMonitoring();
0018     return mInstance;
0019   }
0020   ~Fun4AllMonitoring() override = default;
0021   void Snapshot(const std::string &what = "AfterProcessEvent");
0022 
0023   static void PrintsMaps();
0024 
0025   void Get_Memory();
0026   void OutFileName(const std::string &fname);
0027 
0028  private:
0029   Fun4AllMonitoring();
0030   static Fun4AllMonitoring *mInstance;
0031   uint64_t mEvent = 0;
0032   uint64_t mHeapPss = 0;
0033   uint64_t mMMapPSS = 0;
0034   uint64_t mOtherPss = 0;
0035   std::string mOutFileName;
0036 };
0037 
0038 #endif