1 #ifndef EVENTFILTER_UTILTIES_PLUGINS_EVFBuildingThrottle
2 #define EVENTFILTER_UTILTIES_PLUGINS_EVFBuildingThrottle
12 #include <sys/statvfs.h>
22 :
highWaterMark_(pset.getUntrackedParameter<double>(
"highWaterMark", 0.8)),
23 lowWaterMark_(pset.getUntrackedParameter<double>(
"lowWaterMark", 0.5)),
27 sleep_(pset.getUntrackedParameter<unsigned int>(
"sleepmSecs", 1000)) {
70 double fraction = 1. - float(buf.f_bfree * buf.f_bsize) / float(buf.f_blocks * buf.f_frsize);
76 std::cout <<
">>>>throttling on " << std::endl;
82 std::cout <<
" building throttle on " <<
baseDir_ <<
" is " << fraction * 100 <<
" %full " << std::endl;
86 std::cout <<
" Shutdown flag set: stop throttling" << std::endl;
std::atomic< bool > m_stoprequest
volatile std::atomic< bool > shutdown_flag
void watchPreGlobalBeginLumi(PreGlobalBeginLumi::slot_type const &iSlot)
void preBeginLumi(edm::GlobalContext const &gc)
ServiceToken presentToken() const
void postBeginRun(edm::GlobalContext const &gc)
static ServiceRegistry & instance()
Directory whatToThrottleOn_
EvFBuildingThrottle(const edm::ParameterSet &pset, edm::ActivityRegistry ®)
std::shared_ptr< std::thread > m_thread
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)