00001 #ifndef DYBSVC_TRIMMINGAGENT_H 00002 #define DYBSVC_TRIMMINGAGENT_H 00003 00004 #include "GaudiKernel/IDataStoreAgent.h" 00005 #include "Context/TimeStamp.h" 00006 00007 #include <map> 00008 #include <string> 00009 00010 class MsgStream; 00011 00012 class TrimmingAgent : 00013 virtual public IDataStoreAgent { 00014 00015 public: 00016 00017 TrimmingAgent(MsgStream* msgStream); 00018 ~TrimmingAgent(); 00019 00025 virtual bool analyse(IRegistry* pRegistry, 00026 int level); 00027 00031 const TimeStamp earliest(); 00032 00036 const TimeStamp& latest(); 00037 00042 const TimeStamp& window(); 00043 00048 const TimeStamp& window(const std::string& path); 00049 00055 void setLatest(const TimeStamp& latest); 00056 00061 void setWindow(const TimeStamp& window); 00062 00067 void setWindow(const std::string& path, const TimeStamp& window); 00068 00069 private: 00070 00074 TimeStamp m_latest; 00075 00079 TimeStamp m_window; 00080 00084 MsgStream* m_msgStream; 00085 00089 typedef std::map<std::string, TimeStamp> WindowMap_t; 00090 WindowMap_t m_windows; 00091 }; 00092 00093 #endif /* DYBSVC_TRIMMINGAGENT_H */