1 #ifndef EVENTFILTER_UTILTIES_PLUGINS_EVFBuildingThrottle 2 #define EVENTFILTER_UTILTIES_PLUGINS_EVFBuildingThrottle 12 #include <sys/statvfs.h> 14 #include "boost/thread/thread.hpp" 24 :
highWaterMark_(pset.getUntrackedParameter<double>(
"highWaterMark",0.8))
25 ,
lowWaterMark_(pset.getUntrackedParameter<double>(
"lowWaterMark",0.5))
29 ,
sleep_( pset.getUntrackedParameter<unsigned
int>(
"sleepmSecs",1000))
69 int retval = statvfs(
baseDir_.c_str(),&buf);
80 std::cout <<
" building throttle on " <<
baseDir_ <<
" is " << fraction*100 <<
" %full " << std::endl;
84 std::cout <<
" Shutdown flag set: stop throttling" << std::endl;
static boost::mutex mutex
volatile std::atomic< bool > shutdown_flag
void watchPreGlobalBeginLumi(PreGlobalBeginLumi::slot_type const &iSlot)
void preBeginLumi(edm::GlobalContext const &gc)
volatile bool m_stoprequest
ServiceToken presentToken() const
void postBeginRun(edm::GlobalContext const &gc)
static ServiceRegistry & instance()
Directory whatToThrottleOn_
boost::shared_ptr< boost::thread > m_thread
EvFBuildingThrottle(const edm::ParameterSet &pset, edm::ActivityRegistry ®)
void watchPreGlobalBeginRun(PreGlobalBeginRun::slot_type const &iSlot)
void watchPostGlobalEndRun(PostGlobalEndRun::slot_type const &iSlot)
void preBeginRun(edm::GlobalContext const &gc)
void postEndRun(edm::GlobalContext const &gc)
def operate(timelog, memlog, json_f, num)