//----------------------------------------------------------- // File and Version Information: // $Id$ // // Description: // Singleton class to configure the odgbstream // // // // Environment: // Software developed for the PANDA Detector at FAIR. // // Author List: // Sebastian Neubert TUM (original author) // // //----------------------------------------------------------- #ifndef DEBUGLOGGER_HH #define DEBUGLOGGER_HH // Base Class Headers ---------------- // Collaborating Class Headers ------- #include // remove if you do not need streaming op #include #include #include "TFile.h" #include "TNamed.h" // Collaborating Class Declarations -- class abslogrule; class TH1; class DebugLogger : public TNamed{ public: // Constructors/Destructors --------- static DebugLogger* Instance(); DebugLogger(); ~DebugLogger(); // Operators // Accessors ----------------------- // Modifiers ----------------------- void addRule(abslogrule* rule); void addRule(std::string file, std::string function, unsigned int output); unsigned int addOutput(std::ostream&); unsigned int addOutFile(std::string filename); void setLevel(unsigned int l); void Histo(std::string name, double value, double x0=0, double x1=10, int bins=100); // Operations ---------------------- void WriteFiles(); protected: DebugLogger(const DebugLogger&); // forbidden private: // The singleton instance static DebugLogger* _instance; // Private Methods ----------------- bool findFuncInSource(std::string file,std::string function, unsigned int& startline, unsigned int& endline); // Private Data Members ------------ TFile* _outfile; std::map _histomap; public: ClassDef(DebugLogger,1) }; #endif //-------------------------------------------------------------- // $Log$ //--------------------------------------------------------------