#include <FWCore/Framework/src/PrincipalCache.h>
Definition at line 40 of file PrincipalCache.h.
typedef std::map<LumiKey, boost::shared_ptr<LuminosityBlockPrincipal> >::const_iterator edm::PrincipalCache::ConstLumiIterator [private] |
Definition at line 85 of file PrincipalCache.h.
typedef std::map<int, boost::shared_ptr<RunPrincipal> >::const_iterator edm::PrincipalCache::ConstRunIterator [private] |
Definition at line 83 of file PrincipalCache.h.
typedef std::map<LumiKey, boost::shared_ptr<LuminosityBlockPrincipal> >::iterator edm::PrincipalCache::LumiIterator [private] |
Definition at line 84 of file PrincipalCache.h.
typedef std::map<int, boost::shared_ptr<RunPrincipal> >::iterator edm::PrincipalCache::RunIterator [private] |
Definition at line 82 of file PrincipalCache.h.
edm::PrincipalCache::PrincipalCache | ( | ) |
edm::PrincipalCache::~PrincipalCache | ( | ) |
void edm::PrincipalCache::deleteLowestLumi | ( | ) |
Definition at line 199 of file PrincipalCache.cc.
References lumiPrincipals_.
Referenced by edm::EventProcessor::writeLumiCache().
00199 { 00200 lumiPrincipals_.erase(lumiPrincipals_.begin()); 00201 }
void edm::PrincipalCache::deleteLowestRun | ( | ) |
Definition at line 195 of file PrincipalCache.cc.
References runPrincipals_.
Referenced by edm::EventProcessor::writeRunCache().
00195 { 00196 runPrincipals_.erase(runPrincipals_.begin()); 00197 }
Definition at line 207 of file PrincipalCache.cc.
References lumiPrincipals_.
Referenced by edm::EventProcessor::deleteLumiFromCache().
00207 { 00208 lumiPrincipals_.erase(lumiPrincipals_.find(LumiKey(run, lumi))); 00209 }
Definition at line 203 of file PrincipalCache.cc.
References runPrincipals_.
Referenced by edm::EventProcessor::deleteRunFromCache().
00203 { 00204 runPrincipals_.erase(runPrincipals_.find(run)); 00205 }
bool edm::PrincipalCache::insert | ( | boost::shared_ptr< LuminosityBlockPrincipal > | lbp | ) |
Definition at line 160 of file PrincipalCache.cc.
References currentLumiPrincipal_, iter, getDQMSummary::key, edm::lumi, lumiPrincipals_, and edm::run.
00160 { 00161 int run = lbp->run(); 00162 int lumi = lbp->luminosityBlock(); 00163 LumiKey key(run, lumi); 00164 LumiIterator iter = lumiPrincipals_.find(key); 00165 if (iter == lumiPrincipals_.end()) { 00166 lumiPrincipals_[key] = lbp; 00167 currentLumiPrincipal_ = lbp; 00168 return true; 00169 } 00170 00171 iter->second->mergeLuminosityBlock(lbp); 00172 currentLumiPrincipal_ = iter->second; 00173 00174 return true; 00175 }
bool edm::PrincipalCache::insert | ( | boost::shared_ptr< RunPrincipal > | rp | ) |
Definition at line 145 of file PrincipalCache.cc.
References currentRunPrincipal_, iter, edm::run, and runPrincipals_.
Referenced by edm::EventProcessor::readAndCacheLumi(), and edm::EventProcessor::readAndCacheRun().
00145 { 00146 int run = rp->run(); 00147 RunIterator iter = runPrincipals_.find(run); 00148 if (iter == runPrincipals_.end()) { 00149 runPrincipals_[run] = rp; 00150 currentRunPrincipal_ = rp; 00151 return true; 00152 } 00153 00154 iter->second->mergeRun(rp); 00155 currentRunPrincipal_ = iter->second; 00156 00157 return true; 00158 }
LuminosityBlockPrincipal const & edm::PrincipalCache::lowestLumi | ( | ) | const |
Definition at line 190 of file PrincipalCache.cc.
References iter, and lumiPrincipals_.
Referenced by edm::EventProcessor::writeLumiCache().
00190 { 00191 ConstLumiIterator iter = lumiPrincipals_.begin(); 00192 return *iter->second.get(); 00193 }
RunPrincipal const & edm::PrincipalCache::lowestRun | ( | ) | const |
Definition at line 185 of file PrincipalCache.cc.
References iter, and runPrincipals_.
Referenced by edm::EventProcessor::writeRunCache().
00185 { 00186 ConstRunIterator iter = runPrincipals_.begin(); 00187 return *iter->second.get(); 00188 }
LuminosityBlockPrincipal const & edm::PrincipalCache::lumiPrincipal | ( | ) | const |
Definition at line 125 of file PrincipalCache.cc.
References currentLumiPrincipal_, and edm::errors::LogicError.
00125 { 00126 if (currentLumiPrincipal_.get() == 0) { 00127 throw edm::Exception(edm::errors::LogicError) 00128 << "PrincipalCache::lumiPrincipal\n" 00129 << "Requested current lumi and it is not initialized (should never happen)\n" 00130 << "Contact a Framework Developer\n"; 00131 } 00132 return *currentLumiPrincipal_.get(); 00133 }
LuminosityBlockPrincipal & edm::PrincipalCache::lumiPrincipal | ( | ) |
Definition at line 115 of file PrincipalCache.cc.
References currentLumiPrincipal_, and edm::errors::LogicError.
00115 { 00116 if (currentLumiPrincipal_.get() == 0) { 00117 throw edm::Exception(edm::errors::LogicError) 00118 << "PrincipalCache::lumiPrincipal\n" 00119 << "Requested current lumi and it is not initialized (should never happen)\n" 00120 << "Contact a Framework Developer\n"; 00121 } 00122 return *currentLumiPrincipal_.get(); 00123 }
LuminosityBlockPrincipal const & edm::PrincipalCache::lumiPrincipal | ( | int | run, | |
int | lumi | |||
) | const |
Definition at line 91 of file PrincipalCache.cc.
References iter, getDQMSummary::key, edm::errors::LogicError, and lumiPrincipals_.
00091 { 00092 LumiKey key(run, lumi); 00093 ConstLumiIterator iter = lumiPrincipals_.find(key); 00094 if (iter == lumiPrincipals_.end()) { 00095 throw edm::Exception(edm::errors::LogicError) 00096 << "PrincipalCache::lumiPrincipal\n" 00097 << "Requested a lumi that is not in the cache (should never happen)\n" 00098 << "Contact a Framework Developer\n"; 00099 } 00100 return *iter->second.get(); 00101 }
LuminosityBlockPrincipal & edm::PrincipalCache::lumiPrincipal | ( | int | run, | |
int | lumi | |||
) |
Definition at line 79 of file PrincipalCache.cc.
References iter, getDQMSummary::key, edm::errors::LogicError, and lumiPrincipals_.
Referenced by edm::EventProcessor::beginLumi(), edm::EventProcessor::endLumi(), edm::EventProcessor::readAndCacheLumi(), and edm::EventProcessor::writeLumi().
00079 { 00080 LumiKey key(run, lumi); 00081 LumiIterator iter = lumiPrincipals_.find(key); 00082 if (iter == lumiPrincipals_.end()) { 00083 throw edm::Exception(edm::errors::LogicError) 00084 << "PrincipalCache::lumiPrincipal\n" 00085 << "Requested a lumi that is not in the cache (should never happen)\n" 00086 << "Contact a Framework Developer\n"; 00087 } 00088 return *iter->second.get(); 00089 }
boost::shared_ptr< LuminosityBlockPrincipal > edm::PrincipalCache::lumiPrincipalPtr | ( | ) |
Definition at line 135 of file PrincipalCache.cc.
References currentLumiPrincipal_, and edm::errors::LogicError.
00135 { 00136 if (currentLumiPrincipal_.get() == 0) { 00137 throw edm::Exception(edm::errors::LogicError) 00138 << "PrincipalCache::lumiPrincipalPtr\n" 00139 << "Requested current lumi and it is not initialized (should never happen)\n" 00140 << "Contact a Framework Developer\n"; 00141 } 00142 return currentLumiPrincipal_; 00143 }
boost::shared_ptr< LuminosityBlockPrincipal > edm::PrincipalCache::lumiPrincipalPtr | ( | int | run, | |
int | lumi | |||
) |
Definition at line 103 of file PrincipalCache.cc.
References iter, getDQMSummary::key, edm::errors::LogicError, and lumiPrincipals_.
Referenced by edm::EventProcessor::readEvent().
00103 { 00104 LumiKey key(run, lumi); 00105 LumiIterator iter = lumiPrincipals_.find(key); 00106 if (iter == lumiPrincipals_.end()) { 00107 throw edm::Exception(edm::errors::LogicError) 00108 << "PrincipalCache::lumiPrincipalPtr\n" 00109 << "Requested a lumi that is not in the cache (should never happen)\n" 00110 << "Contact a Framework Developer\n"; 00111 } 00112 return iter->second; 00113 }
bool edm::PrincipalCache::noMoreLumis | ( | ) |
Definition at line 181 of file PrincipalCache.cc.
References lumiPrincipals_.
Referenced by edm::EventProcessor::writeLumiCache().
00181 { 00182 return lumiPrincipals_.empty(); 00183 }
bool edm::PrincipalCache::noMoreRuns | ( | ) |
Definition at line 177 of file PrincipalCache.cc.
References runPrincipals_.
Referenced by edm::EventProcessor::writeRunCache().
00177 { 00178 return runPrincipals_.empty(); 00179 }
RunPrincipal const & edm::PrincipalCache::runPrincipal | ( | ) | const |
Definition at line 59 of file PrincipalCache.cc.
References currentRunPrincipal_, and edm::errors::LogicError.
00059 { 00060 if (currentRunPrincipal_.get() == 0) { 00061 throw edm::Exception(edm::errors::LogicError) 00062 << "PrincipalCache::runPrincipal\n" 00063 << "Requested current run and it is not initialized (should never happen)\n" 00064 << "Contact a Framework Developer\n"; 00065 } 00066 return *currentRunPrincipal_.get(); 00067 }
RunPrincipal & edm::PrincipalCache::runPrincipal | ( | ) |
Definition at line 49 of file PrincipalCache.cc.
References currentRunPrincipal_, and edm::errors::LogicError.
00049 { 00050 if (currentRunPrincipal_.get() == 0) { 00051 throw edm::Exception(edm::errors::LogicError) 00052 << "PrincipalCache::runPrincipal\n" 00053 << "Requested current run and it is not initialized (should never happen)\n" 00054 << "Contact a Framework Developer\n"; 00055 } 00056 return *currentRunPrincipal_.get(); 00057 }
RunPrincipal const & edm::PrincipalCache::runPrincipal | ( | int | run | ) | const |
Definition at line 27 of file PrincipalCache.cc.
References iter, edm::errors::LogicError, and runPrincipals_.
00027 { 00028 ConstRunIterator iter = runPrincipals_.find(run); 00029 if (iter == runPrincipals_.end()) { 00030 throw edm::Exception(edm::errors::LogicError) 00031 << "PrincipalCache::runPrincipal\n" 00032 << "Requested a run that is not in the cache (should never happen)\n" 00033 << "Contact a Framework Developer\n"; 00034 } 00035 return *iter->second.get(); 00036 }
RunPrincipal & edm::PrincipalCache::runPrincipal | ( | int | run | ) |
Definition at line 16 of file PrincipalCache.cc.
References iter, edm::errors::LogicError, and runPrincipals_.
Referenced by edm::EventProcessor::beginRun(), edm::EventProcessor::endRun(), edm::EventProcessor::readAndCacheRun(), and edm::EventProcessor::writeRun().
00016 { 00017 RunIterator iter = runPrincipals_.find(run); 00018 if (iter == runPrincipals_.end()) { 00019 throw edm::Exception(edm::errors::LogicError) 00020 << "PrincipalCache::runPrincipal\n" 00021 << "Requested a run that is not in the cache (should never happen)\n" 00022 << "Contact a Framework Developer\n"; 00023 } 00024 return *iter->second.get(); 00025 }
boost::shared_ptr< RunPrincipal > edm::PrincipalCache::runPrincipalPtr | ( | ) |
Definition at line 69 of file PrincipalCache.cc.
References currentRunPrincipal_, and edm::errors::LogicError.
00069 { 00070 if (currentRunPrincipal_.get() == 0) { 00071 throw edm::Exception(edm::errors::LogicError) 00072 << "PrincipalCache::runPrincipalPtr\n" 00073 << "Requested current run and it is not initialized (should never happen)\n" 00074 << "Contact a Framework Developer\n"; 00075 } 00076 return currentRunPrincipal_; 00077 }
boost::shared_ptr< RunPrincipal > edm::PrincipalCache::runPrincipalPtr | ( | int | run | ) |
Definition at line 38 of file PrincipalCache.cc.
References iter, edm::errors::LogicError, and runPrincipals_.
Referenced by edm::EventProcessor::readAndCacheLumi().
00038 { 00039 RunIterator iter = runPrincipals_.find(run); 00040 if (iter == runPrincipals_.end()) { 00041 throw edm::Exception(edm::errors::LogicError) 00042 << "PrincipalCache::runPrincipalPtr\n" 00043 << "Requested a run that is not in the cache (should never happen)\n" 00044 << "Contact a Framework Developer\n"; 00045 } 00046 return iter->second; 00047 }
boost::shared_ptr<LuminosityBlockPrincipal> edm::PrincipalCache::currentLumiPrincipal_ [private] |
Definition at line 91 of file PrincipalCache.h.
Referenced by insert(), lumiPrincipal(), and lumiPrincipalPtr().
boost::shared_ptr<RunPrincipal> edm::PrincipalCache::currentRunPrincipal_ [private] |
Definition at line 90 of file PrincipalCache.h.
Referenced by insert(), runPrincipal(), and runPrincipalPtr().
std::map<LumiKey, boost::shared_ptr<LuminosityBlockPrincipal> > edm::PrincipalCache::lumiPrincipals_ [private] |
Definition at line 88 of file PrincipalCache.h.
Referenced by deleteLowestLumi(), deleteLumi(), insert(), lowestLumi(), lumiPrincipal(), lumiPrincipalPtr(), and noMoreLumis().
std::map<int, boost::shared_ptr<RunPrincipal> > edm::PrincipalCache::runPrincipals_ [private] |
Definition at line 87 of file PrincipalCache.h.
Referenced by deleteLowestRun(), deleteRun(), insert(), lowestRun(), noMoreRuns(), runPrincipal(), and runPrincipalPtr().