CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch13/src/DQM/L1TMonitor/src/L1TRateHelper.cc

Go to the documentation of this file.
00001 #include "DQM/L1TMonitor/interface/L1TRateHelper.h"
00002 
00003 
00004 namespace L1TRateHelper {
00005 
00006 
00007 std::pair< int, int> L1TRateHelper::removeAndGetRateForEarliestTime(){ 
00008   if (m_rateMap.begin() == m_rateMap.end() ) 
00009     return std::make_pair(-1,-1);
00010   
00011   if (m_timeStart==-1) {
00012     m_timeStart = m_rateMap.begin()->second.getTime()-1; // so time will start from 1
00013   }
00014   int r1 = m_rateMap.begin()->second.getTime()-m_timeStart; 
00015   int r2 = m_rateMap.begin()->second.m_events;
00016   m_lastRemovedOrbit = m_rateMap.begin()->second.m_orbitHigh;
00017   m_rateMap.erase(m_rateMap.begin());
00018   return std::make_pair(r1,r2);
00019 }
00020 
00021 
00022 }
00023 
00024