26 #include <boost/shared_ptr.hpp>
39 cachedBrickNumber( 0 ),
40 cachedStringNumber( 0 ),
41 cachedByteNumber( 0 ) {
56 bool cacheFound =
false;
57 int cacheAge = 999999999;
58 std::map<int,counted_brick>::iterator cache_iter =
brickMap.begin();
59 std::map<int,counted_brick>::iterator cache_icfg =
brickMap.find( cfgId );
60 std::map<int,counted_brick>::iterator cache_iend =
brickMap.end();
61 if ( cache_icfg != cache_iend ) {
62 std::pair<const int,counted_brick>& entry = *cache_icfg;
64 cacheAge = cBrick.first;
69 std::map<int,const DTKeyedConfig*> ageMap;
71 if ( !cacheAge )
return 0;
72 while ( cache_iter != cache_iend ) {
73 std::pair<const int,counted_brick>& entry = *cache_iter++;
75 int& brickAge = cBrick.first;
76 if ( brickAge < cacheAge ) brickAge++;
77 if ( entry.first == cfgId ) brickAge = 0;
82 while ( cache_iter != cache_iend ) {
83 std::pair<const int,counted_brick>& entry = *cache_iter++;
85 ageMap.insert( std::pair<int,const DTKeyedConfig*>(
86 ++cBrick.first, entry.second.second ) );
100 if ( keyList == 0 )
return 999;
102 std::vector<unsigned long long> checkedKeys;
103 boost::shared_ptr<DTKeyedConfig> kBrick;
104 checkedKeys.push_back( cfgId );
105 bool brickFound =
false;
107 keyList->
load( checkedKeys );
109 if ( kBrick.get() ) brickFound = ( kBrick->getId() == cfgId );
115 brickMap.insert( std::pair<int,counted_brick>( cfgId, cBrick ) );
122 std::map<int,const DTKeyedConfig*>::reverse_iterator
iter = ageMap.rbegin();
127 int oldestId = oldestBrick->
getId();
145 std::vector<std::string>&
list ) {
147 get( keyRecord, cfgId,
obj );
148 if ( obj == 0 )
return;
151 while ( d_iter != d_iend ) list.push_back( *d_iter++ );
154 while ( l_iter != l_iend )
getData( keyRecord, *l_iter++, list );
160 std::map<int,counted_brick>::const_iterator
iter =
brickMap.begin();
161 std::map<int,counted_brick>::const_iterator iend =
brickMap.end();
162 while ( iter != iend ) {
163 delete iter->second.second;
std::map< int, counted_brick > brickMap
void getData(const DTKeyedConfigListRcd &keyRecord, int cfgId, std::vector< std::string > &list)
boost::shared_ptr< T > get(size_t n) const
data_iterator dataBegin() const
link_iterator linkBegin() const
link_iterator linkEnd() const
void get(HolderT &iHolder) const
int get(const DTKeyedConfigListRcd &keyRecord, int cfgId, const DTKeyedConfig *&obj)
std::vector< int >::const_iterator link_iterator
static const int maxByteNumber
T const * product() const
std::vector< std::string >::const_iterator data_iterator
static const int maxBrickNumber
void load(const std::vector< unsigned long long > &keys)
std::pair< int, const DTKeyedConfig * > counted_brick
static const int maxStringNumber
tuple size
Write out results.
data_iterator dataEnd() const
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger list("!*","!HLTx*"if it matches 2 triggers or more) will accept the event if all the matching triggers are FAIL.It will reject the event if any of the triggers are PASS or EXCEPTION(this matches the behavior of"!*"before the partial wildcard feature was incorporated).Triggers which are in the READY state are completely ignored.(READY should never be returned since the trigger paths have been run
virtual ~DTKeyedConfigCache()