45 dataVersion( version ) {
115 std::vector<int> chanKey;
117 chanKey.push_back( wheelId );
118 chanKey.push_back( stationId );
119 chanKey.push_back( sectorId );
120 chanKey.push_back( slId );
121 chanKey.push_back( layerId );
122 chanKey.push_back( partId );
124 int searchStatus =
dBuf->
find( chanKey.begin(), chanKey.end(), ientry );
125 if ( !searchStatus ) {
146 return get(
id.wheel(),
152 fCell, lCell, flagA, flagC, flagS );
160 flagA = flagC = flagS = 0;
161 int iCell =
id.wire();
165 fCheck =
get(
id.wheel(),
171 flagA, flagC, flagS );
172 if ( ( fCheck == 0 ) &&
173 ( fCell <= iCell ) &&
174 ( lCell >= iCell ) )
return 0;
175 fCheck =
get(
id.wheel(),
181 flagA, flagC, flagS );
182 if ( ( fCheck == 0 ) &&
183 ( fCell <= iCell ) &&
184 ( lCell >= iCell ) )
return 0;
185 flagA = flagC = flagS = 0;
194 while ( iter != iend ) {
195 const std::pair<DTHVStatusId,DTHVStatusData>& entry = *iter++;
198 int offA = data.
flagA & 1;
199 int offC = data.
flagC & 1;
200 int offS = data.
flagS & 1;
201 if ( offA || offC || offS )
212 while ( iter != iend ) {
213 const std::pair<DTHVStatusId,DTHVStatusData>& entry = *iter++;
216 if ( hvId. wheelId !=
id. wheel() )
continue;
217 if ( hvId.
stationId !=
id.station() )
continue;
218 if ( hvId. sectorId !=
id. sector() )
continue;
219 int offA = data.
flagA & 1;
220 int offC = data.
flagC & 1;
221 int offS = data.
flagS & 1;
222 if ( offA || offC || offS )
233 while ( iter != iend ) {
234 const std::pair<DTHVStatusId,DTHVStatusData>& entry = *iter++;
248 while ( iter != iend ) {
249 const std::pair<DTHVStatusId,DTHVStatusData>& entry = *iter++;
252 if ( hvId. wheelId !=
id. wheel() )
continue;
253 if ( hvId.
stationId !=
id.station() )
continue;
254 if ( hvId. sectorId !=
id. sector() )
continue;
304 std::vector<int> chanKey;
306 chanKey.push_back( wheelId );
307 chanKey.push_back( stationId );
308 chanKey.push_back( sectorId );
309 chanKey.push_back( slId );
310 chanKey.push_back( layerId );
311 chanKey.push_back( partId );
313 int searchStatus =
dBuf->
find( chanKey.begin(), chanKey.end(), ientry );
315 if ( !searchStatus ) {
326 key. wheelId = wheelId;
328 key. sectorId = sectorId;
330 key. layerId = layerId;
331 key. partId = partId;
341 dBuf->
insert( chanKey.begin(), chanKey.end(), ientry );
357 return set(
id.wheel(),
363 fCell, lCell, flagA, flagC, flagS );
528 std::stringstream
name;
545 std::vector<int> chanKey;
547 while ( entryNum < entryMax ) {
552 chanKey.push_back( chan. wheelId );
554 chanKey.push_back( chan. sectorId );
555 chanKey.push_back( chan. slId );
556 chanKey.push_back( chan. layerId );
557 chanKey.push_back( chan. partId );
558 dBuf->
insert( chanKey.begin(), chanKey.end(), entryNum++ );
std::vector< std::pair< DTHVStatusId, DTHVStatusData > > dataList
int get(int wheelId, int stationId, int sectorId, int slId, int layerId, int partId, int &fCell, int &lCell, int &flagA, int &flagC, int &flagS) const
get content
int setFlagS(int wheelId, int stationId, int sectorId, int slId, int layerId, int partId, int flag)
DTBufferTree< int, int > * dBuf
void cacheMap() const
read and store full content
void clear()
reset content
int insert(ElementKey fKey, ElementKey lKey, const Content &cont)
int setFlagC(int wheelId, int stationId, int sectorId, int slId, int layerId, int partId, int flag)
int setFlagA(int wheelId, int stationId, int sectorId, int slId, int layerId, int partId, int flag)
U second(std::pair< T, U > const &p)
std::string mapName() const
int offChannelsNumber() const
int badChannelsNumber() const
std::vector< std::pair< DTHVStatusId, DTHVStatusData > >::const_iterator const_iterator
Access methods to data.
int find(ElementKey fKey, ElementKey lKey, Content &cont)
int set(int wheelId, int stationId, int sectorId, int slId, int layerId, int partId, int fCell, int lCell, int flagA, int flagC, int flagS)
char data[epos_bytes_allocation]
const_iterator end() const
const_iterator begin() const
const std::string & version() const
access version