1 #ifndef EVENTFILTER_UTILTIES_PLUGINS_EVFBuildingThrottle 2 #define EVENTFILTER_UTILTIES_PLUGINS_EVFBuildingThrottle 12 #include <sys/statvfs.h> 15 #include "boost/thread/thread.hpp" 25 :
highWaterMark_(pset.getUntrackedParameter<double>(
"highWaterMark",0.8))
26 ,
lowWaterMark_(pset.getUntrackedParameter<double>(
"lowWaterMark",0.5))
30 ,
sleep_( pset.getUntrackedParameter<unsigned
int>(
"sleepmSecs",1000))
70 int retval = statvfs(
baseDir_.c_str(),&buf);
81 std::cout <<
" building throttle on " <<
baseDir_ <<
" is " << fraction*100 <<
" %full " << std::endl;
85 std::cout <<
" Shutdown flag set: stop throttling" << std::endl;
static boost::mutex mutex
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_
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)