#include <CondFormats/DTObjects/interface/DTStatusFlag.h>
Public Types | |
typedef std::vector< std::pair < DTStatusFlagId, DTStatusFlagData > >::const_iterator | const_iterator |
Access methods to data. | |
Public Member Functions | |
const_iterator | begin () const |
int | cellStatus (const DTWireId &id, bool &noiseFlag, bool &feMask, bool &tdcMask, bool &trigMask, bool &deadFlag, bool &nohvFlag) const |
int | cellStatus (int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId, bool &noiseFlag, bool &feMask, bool &tdcMask, bool &trigMask, bool &deadFlag, bool &nohvFlag) const |
Operations. | |
void | clear () |
reset content | |
DTStatusFlag (const std::string &version) | |
DTStatusFlag () | |
Constructor. | |
const_iterator | end () const |
int | get (const DTWireId &id, bool &noiseFlag, bool &feMask, bool &tdcMask, bool &trigMask, bool &deadFlag, bool &nohvFlag) const |
int | get (int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId, bool &noiseFlag, bool &feMask, bool &tdcMask, bool &trigMask, bool &deadFlag, bool &nohvFlag) const |
int | setCellDead (const DTWireId &id, bool flag) |
int | setCellDead (int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId, bool flag) |
int | setCellFEMask (const DTWireId &id, bool mask) |
int | setCellFEMask (int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId, bool mask) |
int | setCellNoHV (const DTWireId &id, bool flag) |
int | setCellNoHV (int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId, bool flag) |
int | setCellNoise (const DTWireId &id, bool flag) |
int | setCellNoise (int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId, bool flag) |
int | setCellStatus (const DTWireId &id, bool noiseFlag, bool feMask, bool tdcMask, bool trigMask, bool deadFlag, bool nohvFlag) |
int | setCellStatus (int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId, bool noiseFlag, bool feMask, bool tdcMask, bool trigMask, bool deadFlag, bool nohvFlag) |
int | setCellTDCMask (const DTWireId &id, bool mask) |
int | setCellTDCMask (int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId, bool mask) |
int | setCellTrigMask (const DTWireId &id, bool mask) |
int | setCellTrigMask (int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId, bool mask) |
std::string & | version () |
const std::string & | version () const |
access version | |
~DTStatusFlag () | |
Destructor. | |
Private Member Functions | |
void | cacheMap () const |
read and store full content | |
std::string | mapName () const |
Private Attributes | |
std::vector< std::pair < DTStatusFlagId, DTStatusFlagData > > | dataList |
std::string | dataVersion |
Definition at line 76 of file DTStatusFlag.h.
typedef std::vector< std::pair<DTStatusFlagId, DTStatusFlagData> >::const_iterator DTStatusFlag::const_iterator |
DTStatusFlag::DTStatusFlag | ( | ) |
Constructor.
Definition at line 29 of file DTStatusFlag.cc.
References dataList.
00029 : 00030 dataVersion( " " ) { 00031 dataList.reserve( 1000 ); 00032 }
DTStatusFlag::DTStatusFlag | ( | const std::string & | version | ) |
Definition at line 35 of file DTStatusFlag.cc.
References dataList.
00035 : 00036 dataVersion( version ) { 00037 dataList.reserve( 1000 ); 00038 }
DTStatusFlag::~DTStatusFlag | ( | ) |
Destructor.
Definition at line 64 of file DTStatusFlag.cc.
References DTDataBuffer< Key, Content >::dropBuffer(), and mapName().
00064 { 00065 DTDataBuffer<int,int>::dropBuffer( mapName() ); 00066 }
DTStatusFlag::const_iterator DTStatusFlag::begin | ( | ) | const |
Definition at line 586 of file DTStatusFlag.cc.
References dataList.
00586 { 00587 return dataList.begin(); 00588 }
void DTStatusFlag::cacheMap | ( | ) | const [private] |
read and store full content
Definition at line 603 of file DTStatusFlag.cc.
References dataList, DTBufferTree< Key, Content >::insert(), mapName(), DTDataBuffer< Key, Content >::openBuffer(), and DTStatusFlagId::stationId.
Referenced by get(), and setCellStatus().
00603 { 00604 00605 std::string mName = mapName(); 00606 DTBufferTree<int,int>* dBuf = 00607 DTDataBuffer<int,int>::openBuffer( mName ); 00608 00609 int entryNum = 0; 00610 int entryMax = dataList.size(); 00611 std::vector<int> chanKey; 00612 chanKey.reserve(6); 00613 while ( entryNum < entryMax ) { 00614 00615 const DTStatusFlagId& chan = dataList[entryNum].first; 00616 00617 chanKey.clear(); 00618 chanKey.push_back( chan. wheelId ); 00619 chanKey.push_back( chan.stationId ); 00620 chanKey.push_back( chan. sectorId ); 00621 chanKey.push_back( chan. slId ); 00622 chanKey.push_back( chan. layerId ); 00623 chanKey.push_back( chan. cellId ); 00624 dBuf->insert( chanKey.begin(), chanKey.end(), entryNum++ ); 00625 00626 } 00627 00628 return; 00629 00630 }
int DTStatusFlag::cellStatus | ( | const DTWireId & | id, | |
bool & | noiseFlag, | |||
bool & | feMask, | |||
bool & | tdcMask, | |||
bool & | trigMask, | |||
bool & | deadFlag, | |||
bool & | nohvFlag | |||
) | const [inline] |
int DTStatusFlag::cellStatus | ( | int | wheelId, | |
int | stationId, | |||
int | sectorId, | |||
int | slId, | |||
int | layerId, | |||
int | cellId, | |||
bool & | noiseFlag, | |||
bool & | feMask, | |||
bool & | tdcMask, | |||
bool & | trigMask, | |||
bool & | deadFlag, | |||
bool & | nohvFlag | |||
) | const [inline] |
Operations.
get content
Definition at line 92 of file DTStatusFlag.h.
Referenced by setCellDead(), setCellFEMask(), setCellNoHV(), setCellNoise(), setCellTDCMask(), and setCellTrigMask().
00104 { return get( wheelId, stationId, sectorId, slId, layerId, cellId, 00105 noiseFlag, feMask, tdcMask, trigMask, 00106 deadFlag, nohvFlag); };
reset content
Definition at line 162 of file DTStatusFlag.cc.
References dataList, DTDataBuffer< Key, Content >::dropBuffer(), and mapName().
00162 { 00163 DTDataBuffer<int,int>::dropBuffer( mapName() ); 00164 dataList.clear(); 00165 return; 00166 }
DTStatusFlag::const_iterator DTStatusFlag::end | ( | ) | const |
Definition at line 591 of file DTStatusFlag.cc.
References dataList.
00591 { 00592 return dataList.end(); 00593 }
int DTStatusFlag::get | ( | const DTWireId & | id, | |
bool & | noiseFlag, | |||
bool & | feMask, | |||
bool & | tdcMask, | |||
bool & | trigMask, | |||
bool & | deadFlag, | |||
bool & | nohvFlag | |||
) | const |
Definition at line 133 of file DTStatusFlag.cc.
00139 { 00140 return get( id.wheel(), 00141 id.station(), 00142 id.sector(), 00143 id.superLayer(), 00144 id.layer(), 00145 id.wire(), 00146 noiseFlag, feMask, tdcMask, 00147 trigMask, deadFlag, nohvFlag ); 00148 }
int DTStatusFlag::get | ( | int | wheelId, | |
int | stationId, | |||
int | sectorId, | |||
int | slId, | |||
int | layerId, | |||
int | cellId, | |||
bool & | noiseFlag, | |||
bool & | feMask, | |||
bool & | tdcMask, | |||
bool & | trigMask, | |||
bool & | deadFlag, | |||
bool & | nohvFlag | |||
) | const |
Definition at line 80 of file DTStatusFlag.cc.
References cacheMap(), data, dataList, DTBufferTree< Key, Content >::find(), DTDataBuffer< Key, Content >::findBuffer(), mapName(), DTStatusFlagData::noiseFlag, and edm::second().
00091 { 00092 00093 noiseFlag = 00094 feMask = 00095 tdcMask = 00096 deadFlag = 00097 nohvFlag = false; 00098 00099 std::string mName = mapName(); 00100 DTBufferTree<int,int>* dBuf = 00101 DTDataBuffer<int,int>::findBuffer( mName ); 00102 if ( dBuf == 0 ) { 00103 cacheMap(); 00104 dBuf = 00105 DTDataBuffer<int,int>::findBuffer( mName ); 00106 } 00107 00108 std::vector<int> chanKey; 00109 chanKey.reserve(6); 00110 chanKey.push_back( wheelId ); 00111 chanKey.push_back( stationId ); 00112 chanKey.push_back( sectorId ); 00113 chanKey.push_back( slId ); 00114 chanKey.push_back( layerId ); 00115 chanKey.push_back( cellId ); 00116 int ientry; 00117 int searchStatus = dBuf->find( chanKey.begin(), chanKey.end(), ientry ); 00118 if ( !searchStatus ) { 00119 const DTStatusFlagData& data( dataList[ientry].second ); 00120 noiseFlag = data.noiseFlag; 00121 feMask = data. feMask; 00122 tdcMask = data. tdcMask; 00123 trigMask = data. trigMask; 00124 deadFlag = data. deadFlag; 00125 nohvFlag = data. nohvFlag; 00126 } 00127 00128 return searchStatus; 00129 00130 }
std::string DTStatusFlag::mapName | ( | ) | const [private] |
Definition at line 596 of file DTStatusFlag.cc.
References dataVersion, and name.
Referenced by cacheMap(), clear(), get(), setCellStatus(), and ~DTStatusFlag().
00596 { 00597 std::stringstream name; 00598 name << dataVersion << "_map_StatusFlag" << this; 00599 return name.str(); 00600 }
Definition at line 519 of file DTStatusFlag.cc.
References setCellDead(), and muonGeometry::wheel.
00520 { 00521 return setCellDead( id.wheel(), 00522 id.station(), 00523 id.sector(), 00524 id.superLayer(), 00525 id.layer(), 00526 id.wire(), 00527 flag ); 00528 }
int DTStatusFlag::setCellDead | ( | int | wheelId, | |
int | stationId, | |||
int | sectorId, | |||
int | slId, | |||
int | layerId, | |||
int | cellId, | |||
bool | flag | |||
) |
Definition at line 476 of file DTStatusFlag.cc.
References cellStatus(), setCellStatus(), and StDecayID::status.
Referenced by setCellDead().
00482 { 00483 00484 bool noiseFlag; 00485 bool feMask; 00486 bool tdcMask; 00487 bool trigMask; 00488 bool deadFlag; 00489 bool nohvFlag; 00490 int status = cellStatus( wheelId, 00491 stationId, 00492 sectorId, 00493 slId, 00494 layerId, 00495 cellId, 00496 noiseFlag, 00497 feMask, 00498 tdcMask, 00499 trigMask, 00500 deadFlag, 00501 nohvFlag ); 00502 setCellStatus( wheelId, 00503 stationId, 00504 sectorId, 00505 slId, 00506 layerId, 00507 cellId, 00508 noiseFlag, 00509 feMask, 00510 tdcMask, 00511 trigMask, 00512 flag, 00513 nohvFlag ); 00514 return status; 00515 00516 }
Definition at line 354 of file DTStatusFlag.cc.
References setCellFEMask(), and muonGeometry::wheel.
00355 { 00356 return setCellFEMask( id.wheel(), 00357 id.station(), 00358 id.sector(), 00359 id.superLayer(), 00360 id.layer(), 00361 id.wire(), 00362 mask ); 00363 }
int DTStatusFlag::setCellFEMask | ( | int | wheelId, | |
int | stationId, | |||
int | sectorId, | |||
int | slId, | |||
int | layerId, | |||
int | cellId, | |||
bool | mask | |||
) |
Definition at line 311 of file DTStatusFlag.cc.
References cellStatus(), setCellStatus(), and StDecayID::status.
Referenced by setCellFEMask().
00317 { 00318 00319 bool noiseFlag; 00320 bool feMask; 00321 bool tdcMask; 00322 bool trigMask; 00323 bool deadFlag; 00324 bool nohvFlag; 00325 int status = cellStatus( wheelId, 00326 stationId, 00327 sectorId, 00328 slId, 00329 layerId, 00330 cellId, 00331 noiseFlag, 00332 feMask, 00333 tdcMask, 00334 trigMask, 00335 deadFlag, 00336 nohvFlag ); 00337 setCellStatus( wheelId, 00338 stationId, 00339 sectorId, 00340 slId, 00341 layerId, 00342 cellId, 00343 noiseFlag, 00344 mask, 00345 tdcMask, 00346 trigMask, 00347 deadFlag, 00348 nohvFlag ); 00349 return status; 00350 00351 }
Definition at line 574 of file DTStatusFlag.cc.
References setCellNoHV(), and muonGeometry::wheel.
00575 { 00576 return setCellNoHV( id.wheel(), 00577 id.station(), 00578 id.sector(), 00579 id.superLayer(), 00580 id.layer(), 00581 id.wire(), 00582 flag ); 00583 }
int DTStatusFlag::setCellNoHV | ( | int | wheelId, | |
int | stationId, | |||
int | sectorId, | |||
int | slId, | |||
int | layerId, | |||
int | cellId, | |||
bool | flag | |||
) |
Definition at line 531 of file DTStatusFlag.cc.
References cellStatus(), setCellStatus(), and StDecayID::status.
Referenced by setCellNoHV().
00537 { 00538 00539 bool noiseFlag; 00540 bool feMask; 00541 bool tdcMask; 00542 bool trigMask; 00543 bool deadFlag; 00544 bool nohvFlag; 00545 int status = cellStatus( wheelId, 00546 stationId, 00547 sectorId, 00548 slId, 00549 layerId, 00550 cellId, 00551 noiseFlag, 00552 feMask, 00553 tdcMask, 00554 trigMask, 00555 deadFlag, 00556 nohvFlag ); 00557 setCellStatus( wheelId, 00558 stationId, 00559 sectorId, 00560 slId, 00561 layerId, 00562 cellId, 00563 noiseFlag, 00564 feMask, 00565 tdcMask, 00566 trigMask, 00567 deadFlag, 00568 flag ); 00569 return status; 00570 00571 }
Definition at line 299 of file DTStatusFlag.cc.
References setCellNoise(), and muonGeometry::wheel.
00300 { 00301 return setCellNoise( id.wheel(), 00302 id.station(), 00303 id.sector(), 00304 id.superLayer(), 00305 id.layer(), 00306 id.wire(), 00307 flag ); 00308 }
int DTStatusFlag::setCellNoise | ( | int | wheelId, | |
int | stationId, | |||
int | sectorId, | |||
int | slId, | |||
int | layerId, | |||
int | cellId, | |||
bool | flag | |||
) |
Definition at line 256 of file DTStatusFlag.cc.
References cellStatus(), setCellStatus(), and StDecayID::status.
Referenced by DTNoiseCalibration::endJob(), and setCellNoise().
00262 { 00263 00264 bool noiseFlag; 00265 bool feMask; 00266 bool tdcMask; 00267 bool trigMask; 00268 bool deadFlag; 00269 bool nohvFlag; 00270 int status = cellStatus( wheelId, 00271 stationId, 00272 sectorId, 00273 slId, 00274 layerId, 00275 cellId, 00276 noiseFlag, 00277 feMask, 00278 tdcMask, 00279 trigMask, 00280 deadFlag, 00281 nohvFlag ); 00282 setCellStatus( wheelId, 00283 stationId, 00284 sectorId, 00285 slId, 00286 layerId, 00287 cellId, 00288 flag, 00289 feMask, 00290 tdcMask, 00291 trigMask, 00292 deadFlag, 00293 nohvFlag ); 00294 return status; 00295 00296 }
int DTStatusFlag::setCellStatus | ( | const DTWireId & | id, | |
bool | noiseFlag, | |||
bool | feMask, | |||
bool | tdcMask, | |||
bool | trigMask, | |||
bool | deadFlag, | |||
bool | nohvFlag | |||
) |
Definition at line 238 of file DTStatusFlag.cc.
References setCellStatus(), and muonGeometry::wheel.
00244 { 00245 return setCellStatus( id.wheel(), 00246 id.station(), 00247 id.sector(), 00248 id.superLayer(), 00249 id.layer(), 00250 id.wire(), 00251 noiseFlag, feMask, tdcMask, 00252 trigMask, deadFlag, nohvFlag ); 00253 }
int DTStatusFlag::setCellStatus | ( | int | wheelId, | |
int | stationId, | |||
int | sectorId, | |||
int | slId, | |||
int | layerId, | |||
int | cellId, | |||
bool | noiseFlag, | |||
bool | feMask, | |||
bool | tdcMask, | |||
bool | trigMask, | |||
bool | deadFlag, | |||
bool | nohvFlag | |||
) |
Definition at line 169 of file DTStatusFlag.cc.
References cacheMap(), data, dataList, DTBufferTree< Key, Content >::find(), DTDataBuffer< Key, Content >::findBuffer(), DTBufferTree< Key, Content >::insert(), getDQMSummary::key, mapName(), DTStatusFlagData::noiseFlag, edm::second(), and DTStatusFlagId::stationId.
Referenced by DTStatusFlagHandler::getNewObjects(), setCellDead(), setCellFEMask(), setCellNoHV(), setCellNoise(), setCellStatus(), setCellTDCMask(), and setCellTrigMask().
00180 { 00181 00182 std::string mName = mapName(); 00183 DTBufferTree<int,int>* dBuf = 00184 DTDataBuffer<int,int>::findBuffer( mName ); 00185 if ( dBuf == 0 ) { 00186 cacheMap(); 00187 dBuf = 00188 DTDataBuffer<int,int>::findBuffer( mName ); 00189 } 00190 std::vector<int> chanKey; 00191 chanKey.reserve(6); 00192 chanKey.push_back( wheelId ); 00193 chanKey.push_back( stationId ); 00194 chanKey.push_back( sectorId ); 00195 chanKey.push_back( slId ); 00196 chanKey.push_back( layerId ); 00197 chanKey.push_back( cellId ); 00198 int ientry; 00199 int searchStatus = dBuf->find( chanKey.begin(), chanKey.end(), ientry ); 00200 00201 if ( !searchStatus ) { 00202 DTStatusFlagData& data( dataList[ientry].second ); 00203 data.noiseFlag = noiseFlag; 00204 data. feMask = feMask; 00205 data. tdcMask = tdcMask; 00206 data. trigMask = trigMask; 00207 data. deadFlag = deadFlag; 00208 data. nohvFlag = nohvFlag; 00209 return -1; 00210 } 00211 else { 00212 DTStatusFlagId key; 00213 key. wheelId = wheelId; 00214 key.stationId = stationId; 00215 key. sectorId = sectorId; 00216 key. slId = slId; 00217 key. layerId = layerId; 00218 key. cellId = cellId; 00219 DTStatusFlagData data; 00220 data.noiseFlag = noiseFlag; 00221 data. feMask = feMask; 00222 data. tdcMask = tdcMask; 00223 data. trigMask = trigMask; 00224 data. deadFlag = deadFlag; 00225 data. nohvFlag = nohvFlag; 00226 ientry = dataList.size(); 00227 dataList.push_back( std::pair<const DTStatusFlagId, 00228 DTStatusFlagData>( key, data ) ); 00229 dBuf->insert( chanKey.begin(), chanKey.end(), ientry ); 00230 return 0; 00231 } 00232 00233 return 99; 00234 00235 }
Definition at line 409 of file DTStatusFlag.cc.
References setCellTDCMask(), and muonGeometry::wheel.
00410 { 00411 return setCellTDCMask( id.wheel(), 00412 id.station(), 00413 id.sector(), 00414 id.superLayer(), 00415 id.layer(), 00416 id.wire(), 00417 mask ); 00418 }
int DTStatusFlag::setCellTDCMask | ( | int | wheelId, | |
int | stationId, | |||
int | sectorId, | |||
int | slId, | |||
int | layerId, | |||
int | cellId, | |||
bool | mask | |||
) |
Definition at line 366 of file DTStatusFlag.cc.
References cellStatus(), setCellStatus(), and StDecayID::status.
Referenced by setCellTDCMask().
00372 { 00373 00374 bool noiseFlag; 00375 bool feMask; 00376 bool tdcMask; 00377 bool trigMask; 00378 bool deadFlag; 00379 bool nohvFlag; 00380 int status = cellStatus( wheelId, 00381 stationId, 00382 sectorId, 00383 slId, 00384 layerId, 00385 cellId, 00386 noiseFlag, 00387 feMask, 00388 tdcMask, 00389 trigMask, 00390 deadFlag, 00391 nohvFlag ); 00392 setCellStatus( wheelId, 00393 stationId, 00394 sectorId, 00395 slId, 00396 layerId, 00397 cellId, 00398 noiseFlag, 00399 feMask, 00400 mask, 00401 trigMask, 00402 deadFlag, 00403 nohvFlag ); 00404 return status; 00405 00406 }
Definition at line 464 of file DTStatusFlag.cc.
References setCellTrigMask(), and muonGeometry::wheel.
00465 { 00466 return setCellTrigMask( id.wheel(), 00467 id.station(), 00468 id.sector(), 00469 id.superLayer(), 00470 id.layer(), 00471 id.wire(), 00472 mask ); 00473 }
int DTStatusFlag::setCellTrigMask | ( | int | wheelId, | |
int | stationId, | |||
int | sectorId, | |||
int | slId, | |||
int | layerId, | |||
int | cellId, | |||
bool | mask | |||
) |
Definition at line 421 of file DTStatusFlag.cc.
References cellStatus(), setCellStatus(), and StDecayID::status.
Referenced by setCellTrigMask().
00427 { 00428 00429 bool noiseFlag; 00430 bool feMask; 00431 bool tdcMask; 00432 bool trigMask; 00433 bool deadFlag; 00434 bool nohvFlag; 00435 int status = cellStatus( wheelId, 00436 stationId, 00437 sectorId, 00438 slId, 00439 layerId, 00440 cellId, 00441 noiseFlag, 00442 feMask, 00443 tdcMask, 00444 trigMask, 00445 deadFlag, 00446 nohvFlag ); 00447 setCellStatus( wheelId, 00448 stationId, 00449 sectorId, 00450 slId, 00451 layerId, 00452 cellId, 00453 noiseFlag, 00454 feMask, 00455 tdcMask, 00456 mask, 00457 deadFlag, 00458 nohvFlag ); 00459 return status; 00460 00461 }
std::string & DTStatusFlag::version | ( | ) |
Definition at line 157 of file DTStatusFlag.cc.
References dataVersion.
00157 { 00158 return dataVersion; 00159 }
const std::string & DTStatusFlag::version | ( | ) | const |
access version
Definition at line 152 of file DTStatusFlag.cc.
References dataVersion.
00152 { 00153 return dataVersion; 00154 }
std::vector< std::pair<DTStatusFlagId,DTStatusFlagData> > DTStatusFlag::dataList [private] |
Definition at line 236 of file DTStatusFlag.h.
Referenced by begin(), cacheMap(), clear(), DTStatusFlag(), end(), get(), and setCellStatus().
std::string DTStatusFlag::dataVersion [private] |