38 cachedBrickNumber( 0 ),
39 cachedStringNumber( 0 ),
40 cachedByteNumber( 0 ) {
55 bool cacheFound =
false;
56 int cacheAge = 999999999;
57 std::map<int,counted_brick>::iterator cache_iter =
brickMap.begin();
58 std::map<int,counted_brick>::iterator cache_icfg =
brickMap.find( cfgId );
59 std::map<int,counted_brick>::iterator cache_iend =
brickMap.end();
60 if ( cache_icfg != cache_iend ) {
61 std::pair<const int,counted_brick>&
entry = *cache_icfg;
63 cacheAge = cBrick.first;
68 std::map<int,const DTKeyedConfig*> ageMap;
70 if ( !cacheAge )
return 0;
71 while ( cache_iter != cache_iend ) {
72 std::pair<const int,counted_brick>&
entry = *cache_iter++;
74 int& brickAge = cBrick.first;
75 if ( brickAge < cacheAge ) brickAge++;
76 if ( entry.first == cfgId ) brickAge = 0;
81 while ( cache_iter != cache_iend ) {
82 std::pair<const int,counted_brick>&
entry = *cache_iter++;
84 ageMap.insert( std::pair<int,const DTKeyedConfig*>(
85 ++cBrick.first, entry.second.second ) );
99 if ( keyList == 0 )
return 999;
101 std::vector<unsigned long long> checkedKeys;
102 std::shared_ptr<DTKeyedConfig> kBrick;
103 checkedKeys.push_back( cfgId );
104 bool brickFound =
false;
106 keyList->
load( checkedKeys );
108 if ( kBrick.get() ) brickFound = ( kBrick->getId() == cfgId );
114 brickMap.insert( std::pair<int,counted_brick>( cfgId, cBrick ) );
121 std::map<int,const DTKeyedConfig*>::reverse_iterator iter = ageMap.rbegin();
126 int oldestId = oldestBrick->
getId();
144 std::vector<std::string>&
list ) {
146 get( keyRecord, cfgId,
obj );
147 if ( obj == 0 )
return;
150 while ( d_iter != d_iend ) list.push_back( *d_iter++ );
153 while ( l_iter != l_iend )
getData( keyRecord, *l_iter++, list );
159 std::map<int,counted_brick>::const_iterator iter =
brickMap.begin();
160 std::map<int,counted_brick>::const_iterator iend =
brickMap.end();
161 while ( iter != iend ) {
162 delete iter->second.second;
std::map< int, counted_brick > brickMap
void getData(const DTKeyedConfigListRcd &keyRecord, int cfgId, std::vector< std::string > &list)
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::shared_ptr< T > get(size_t n) 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()