00001 // $Id: DQMEventSelector.cc,v 1.6 2011/03/07 15:31:32 mommsen Exp $ 00003 00004 #include "EventFilter/StorageManager/interface/DQMEventSelector.h" 00005 00006 using namespace stor; 00007 00008 bool DQMEventSelector::acceptEvent 00009 ( 00010 const I2OChain& ioc, 00011 const utils::TimePoint_t& now 00012 ) 00013 { 00014 if( registrationInfo_->isStale(now) ) return false; 00015 if( registrationInfo_->topLevelFolderName() == std::string( "*" ) ) return true; 00016 if( registrationInfo_->topLevelFolderName() == ioc.topFolderName() ) return true; 00017 return false; 00018 } 00019 00020 00021 bool DQMEventSelector::operator<(const DQMEventSelector& other) const 00022 { 00023 if ( queueId() != other.queueId() ) 00024 return ( queueId() < other.queueId() ); 00025 return ( *(registrationInfo_) < *(other.registrationInfo_) ); 00026 } 00027 00028 00029