#include <DTDeadFlag.h>
Public Types | |
typedef std::vector< std::pair < DTDeadFlagId, DTDeadFlagData > >::const_iterator | const_iterator |
Access methods to data. | |
Public Member Functions | |
const_iterator | begin () const |
int | cellStatus (const DTWireId &id, bool &dead_HV, bool &dead_TP, bool &dead_RO, bool &discCat) const |
int | cellStatus (int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId, bool &dead_HV, bool &dead_TP, bool &dead_RO, bool &discCat) const |
get content | |
void | clear () |
reset content | |
DTDeadFlag (const std::string &version) | |
DTDeadFlag () | |
const_iterator | end () const |
int | get (int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId, bool &dead_HV, bool &dead_TP, bool &dead_RO, bool &discCat) const |
int | get (const DTWireId &id, bool &dead_HV, bool &dead_TP, bool &dead_RO, bool &discCat) const |
bool | getCellDead_HV (int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId) const |
bool | getCellDead_HV (const DTWireId &id) const |
bool | getCellDead_RO (int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId) const |
bool | getCellDead_RO (const DTWireId &id) const |
bool | getCellDead_TP (int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId) const |
bool | getCellDead_TP (const DTWireId &id) const |
bool | getCellDiscCat (int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId) const |
bool | getCellDiscCat (const DTWireId &id) const |
int | set (int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId, bool dead_HV, bool dead_TP, bool dead_RO, bool discCat) |
int | set (const DTWireId &id, bool dead_HV, bool dead_TP, bool dead_RO, bool discCat) |
int | setCellDead_HV (int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId, bool flag) |
int | setCellDead_HV (const DTWireId &id, bool flag) |
int | setCellDead_RO (const DTWireId &id, bool flag) |
int | setCellDead_RO (int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId, bool flag) |
int | setCellDead_TP (int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId, bool flag) |
int | setCellDead_TP (const DTWireId &id, bool flag) |
int | setCellDiscCat (const DTWireId &id, bool flag) |
int | setCellDiscCat (int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId, bool flag) |
int | setCellStatus (const DTWireId &id, bool dead_HV, bool dead_TP, bool dead_RO, bool discCat) |
int | setCellStatus (int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId, bool dead_HV, bool dead_TP, bool dead_RO, bool discCat) |
std::string & | version () |
const std::string & | version () const |
access version | |
~DTDeadFlag () | |
Private Member Functions | |
void | cacheMap () const |
read and store full content | |
std::string | mapName () const |
Private Attributes | |
std::vector< std::pair < DTDeadFlagId, DTDeadFlagData > > | dataList |
std::string | dataVersion |
DTBufferTree< int, int > * | dBuf |
Description: Class to hold drift tubes life and HV status
Definition at line 67 of file DTDeadFlag.h.
typedef std::vector< std::pair<DTDeadFlagId, DTDeadFlagData> >::const_iterator DTDeadFlag::const_iterator |
Access methods to data.
Definition at line 235 of file DTDeadFlag.h.
DTDeadFlag::DTDeadFlag | ( | ) |
Constructor
Definition at line 29 of file DTDeadFlag.cc.
References dataList, and dBuf.
: dataVersion( " " ) { dataList.reserve( 1000 ); dBuf = 0; }
DTDeadFlag::DTDeadFlag | ( | const std::string & | version | ) |
Definition at line 36 of file DTDeadFlag.cc.
References dataList, and dBuf.
: dataVersion( version ) { dataList.reserve( 1000 ); dBuf = 0; }
DTDeadFlag::~DTDeadFlag | ( | ) |
Destructor
Definition at line 64 of file DTDeadFlag.cc.
References dBuf.
{ // DTDataBuffer<int,int>::dropBuffer( mapName() ); delete dBuf; }
DTDeadFlag::const_iterator DTDeadFlag::begin | ( | void | ) | const |
void DTDeadFlag::cacheMap | ( | ) | const [private] |
read and store full content
Definition at line 564 of file DTDeadFlag.cc.
References dataList, dBuf, DTBufferTree< Key, Content >::insert(), and DTDeadFlagId::stationId.
Referenced by get(), and set().
{ // std::string mName = mapName(); // DTBufferTree<int,int>* dBuf = // DTDataBuffer<int,int>::openBuffer( mName ); DTBufferTree<int,int>** pBuf; pBuf = const_cast<DTBufferTree<int,int>**>( &dBuf ); *pBuf = new DTBufferTree<int,int>; int entryNum = 0; int entryMax = dataList.size(); std::vector<int> chanKey; chanKey.reserve(6); while ( entryNum < entryMax ) { const DTDeadFlagId& chan = dataList[entryNum].first; chanKey.clear(); chanKey.push_back( chan. wheelId ); chanKey.push_back( chan.stationId ); chanKey.push_back( chan. sectorId ); chanKey.push_back( chan. slId ); chanKey.push_back( chan. layerId ); chanKey.push_back( chan. cellId ); dBuf->insert( chanKey.begin(), chanKey.end(), entryNum++ ); } return; }
int DTDeadFlag::cellStatus | ( | const DTWireId & | id, |
bool & | dead_HV, | ||
bool & | dead_TP, | ||
bool & | dead_RO, | ||
bool & | discCat | ||
) | const [inline] |
Definition at line 95 of file DTDeadFlag.h.
References ExpressReco_HICollisions_FallBack::id.
{ return get( id, dead_HV, dead_TP, dead_RO, discCat ); };
int DTDeadFlag::cellStatus | ( | int | wheelId, |
int | stationId, | ||
int | sectorId, | ||
int | slId, | ||
int | layerId, | ||
int | cellId, | ||
bool & | dead_HV, | ||
bool & | dead_TP, | ||
bool & | dead_RO, | ||
bool & | discCat | ||
) | const [inline] |
get content
Operations
Definition at line 83 of file DTDeadFlag.h.
Referenced by setCellDead_HV(), setCellDead_RO(), setCellDead_TP(), and setCellDiscCat().
{ return get( wheelId, stationId, sectorId, slId, layerId, cellId, dead_HV, dead_TP, dead_RO, discCat ); };
void DTDeadFlag::clear | ( | void | ) |
DTDeadFlag::const_iterator DTDeadFlag::end | ( | void | ) | const |
int DTDeadFlag::get | ( | const DTWireId & | id, |
bool & | dead_HV, | ||
bool & | dead_TP, | ||
bool & | dead_RO, | ||
bool & | discCat | ||
) | const |
Definition at line 129 of file DTDeadFlag.cc.
{ return get( id.wheel(), id.station(), id.sector(), id.superLayer(), id.layer(), id.wire(), dead_HV, dead_TP, dead_RO, discCat ); }
int DTDeadFlag::get | ( | int | wheelId, |
int | stationId, | ||
int | sectorId, | ||
int | slId, | ||
int | layerId, | ||
int | cellId, | ||
bool & | dead_HV, | ||
bool & | dead_TP, | ||
bool & | dead_RO, | ||
bool & | discCat | ||
) | const |
Definition at line 81 of file DTDeadFlag.cc.
References cacheMap(), runTheMatrix::data, dataList, dBuf, DTDeadFlagData::dead_HV, DTDeadFlagData::dead_RO, DTDeadFlagData::dead_TP, DTDeadFlagData::discCat, DTBufferTree< Key, Content >::find(), and edm::second().
{ dead_HV = dead_TP = dead_RO = discCat = false; // std::string mName = mapName(); // DTBufferTree<int,int>* dBuf = // DTDataBuffer<int,int>::findBuffer( mName ); // if ( dBuf == 0 ) { // cacheMap(); // dBuf = // DTDataBuffer<int,int>::findBuffer( mName ); // } if ( dBuf == 0 ) cacheMap(); std::vector<int> chanKey; chanKey.reserve(6); chanKey.push_back( wheelId ); chanKey.push_back( stationId ); chanKey.push_back( sectorId ); chanKey.push_back( slId ); chanKey.push_back( layerId ); chanKey.push_back( cellId ); int ientry; int searchStatus = dBuf->find( chanKey.begin(), chanKey.end(), ientry ); if ( !searchStatus ) { const DTDeadFlagData& data( dataList[ientry].second ); dead_HV = data.dead_HV; dead_TP = data.dead_TP; dead_RO = data.dead_RO; discCat = data.discCat; } return searchStatus; }
bool DTDeadFlag::getCellDead_HV | ( | int | wheelId, |
int | stationId, | ||
int | sectorId, | ||
int | slId, | ||
int | layerId, | ||
int | cellId | ||
) | const |
Definition at line 144 of file DTDeadFlag.cc.
Referenced by getCellDead_HV().
{ bool dead_HV; bool dead_TP; bool dead_RO; bool discCat; get( wheelId, stationId, sectorId, slId, layerId, cellId, dead_HV, dead_TP, dead_RO, discCat ); return dead_HV; }
bool DTDeadFlag::getCellDead_HV | ( | const DTWireId & | id | ) | const |
Definition at line 167 of file DTDeadFlag.cc.
References getCellDead_HV(), and relativeConstraints::station.
{ return getCellDead_HV( id.wheel(), id.station(), id.sector(), id.superLayer(), id.layer(), id.wire() ); }
bool DTDeadFlag::getCellDead_RO | ( | int | wheelId, |
int | stationId, | ||
int | sectorId, | ||
int | slId, | ||
int | layerId, | ||
int | cellId | ||
) | const |
Definition at line 210 of file DTDeadFlag.cc.
Referenced by getCellDead_RO().
{ bool dead_HV; bool dead_TP; bool dead_RO; bool discCat; get( wheelId, stationId, sectorId, slId, layerId, cellId, dead_HV, dead_TP, dead_RO, discCat ); return dead_RO; }
bool DTDeadFlag::getCellDead_RO | ( | const DTWireId & | id | ) | const |
Definition at line 233 of file DTDeadFlag.cc.
References getCellDead_RO(), and relativeConstraints::station.
{ return getCellDead_RO( id.wheel(), id.station(), id.sector(), id.superLayer(), id.layer(), id.wire() ); }
bool DTDeadFlag::getCellDead_TP | ( | const DTWireId & | id | ) | const |
Definition at line 200 of file DTDeadFlag.cc.
References getCellDead_TP(), and relativeConstraints::station.
{ return getCellDead_TP( id.wheel(), id.station(), id.sector(), id.superLayer(), id.layer(), id.wire() ); }
bool DTDeadFlag::getCellDead_TP | ( | int | wheelId, |
int | stationId, | ||
int | sectorId, | ||
int | slId, | ||
int | layerId, | ||
int | cellId | ||
) | const |
Definition at line 177 of file DTDeadFlag.cc.
Referenced by getCellDead_TP().
{ bool dead_HV; bool dead_TP; bool dead_RO; bool discCat; get( wheelId, stationId, sectorId, slId, layerId, cellId, dead_HV, dead_TP, dead_RO, discCat ); return dead_TP; }
bool DTDeadFlag::getCellDiscCat | ( | int | wheelId, |
int | stationId, | ||
int | sectorId, | ||
int | slId, | ||
int | layerId, | ||
int | cellId | ||
) | const |
Definition at line 243 of file DTDeadFlag.cc.
Referenced by getCellDiscCat().
{ bool dead_HV; bool dead_TP; bool dead_RO; bool discCat; get( wheelId, stationId, sectorId, slId, layerId, cellId, dead_HV, dead_TP, dead_RO, discCat ); return discCat; }
bool DTDeadFlag::getCellDiscCat | ( | const DTWireId & | id | ) | const |
Definition at line 266 of file DTDeadFlag.cc.
References getCellDiscCat(), and relativeConstraints::station.
{ return getCellDiscCat( id.wheel(), id.station(), id.sector(), id.superLayer(), id.layer(), id.wire() ); }
std::string DTDeadFlag::mapName | ( | ) | const [private] |
Definition at line 557 of file DTDeadFlag.cc.
References dataVersion, and AlCaRecoCosmics_cfg::name.
{ std::stringstream name; name << dataVersion << "_map_DeadFlag" << this; return name.str(); }
int DTDeadFlag::set | ( | int | wheelId, |
int | stationId, | ||
int | sectorId, | ||
int | slId, | ||
int | layerId, | ||
int | cellId, | ||
bool | dead_HV, | ||
bool | dead_TP, | ||
bool | dead_RO, | ||
bool | discCat | ||
) |
Definition at line 296 of file DTDeadFlag.cc.
References cacheMap(), runTheMatrix::data, dataList, dBuf, DTDeadFlagData::dead_HV, DTDeadFlagData::dead_RO, DTDeadFlagData::dead_TP, DTDeadFlagData::discCat, DTBufferTree< Key, Content >::find(), DTBufferTree< Key, Content >::insert(), combine::key, edm::second(), and DTDeadFlagId::stationId.
Referenced by DTDeadFlagHandler::getNewObjects().
{ // std::string mName = mapName(); // DTBufferTree<int,int>* dBuf = // DTDataBuffer<int,int>::findBuffer( mName ); // if ( dBuf == 0 ) { // cacheMap(); // dBuf = // DTDataBuffer<int,int>::findBuffer( mName ); // } if ( dBuf == 0 ) cacheMap(); std::vector<int> chanKey; chanKey.reserve(6); chanKey.push_back( wheelId ); chanKey.push_back( stationId ); chanKey.push_back( sectorId ); chanKey.push_back( slId ); chanKey.push_back( layerId ); chanKey.push_back( cellId ); int ientry; int searchStatus = dBuf->find( chanKey.begin(), chanKey.end(), ientry ); if ( !searchStatus ) { DTDeadFlagData& data( dataList[ientry].second ); data.dead_HV = dead_HV; data.dead_TP = dead_TP; data.dead_RO = dead_RO; data.discCat = discCat; return -1; } else { DTDeadFlagId key; key. wheelId = wheelId; key.stationId = stationId; key. sectorId = sectorId; key. slId = slId; key. layerId = layerId; key. cellId = cellId; DTDeadFlagData data; data.dead_HV = dead_HV; data.dead_TP = dead_TP; data.dead_RO = dead_RO; data.discCat = discCat; ientry = dataList.size(); dataList.push_back( std::pair<const DTDeadFlagId, DTDeadFlagData>( key, data ) ); dBuf->insert( chanKey.begin(), chanKey.end(), ientry ); return 0; } return 99; }
int DTDeadFlag::set | ( | const DTWireId & | id, |
bool | dead_HV, | ||
bool | dead_TP, | ||
bool | dead_RO, | ||
bool | discCat | ||
) |
Definition at line 360 of file DTDeadFlag.cc.
{ return set( id.wheel(), id.station(), id.sector(), id.superLayer(), id.layer(), id.wire(), dead_HV, dead_TP, dead_RO, discCat ); }
int DTDeadFlag::setCellDead_HV | ( | const DTWireId & | id, |
bool | flag | ||
) |
Definition at line 406 of file DTDeadFlag.cc.
References setCellDead_HV(), and relativeConstraints::station.
{ return setCellDead_HV( id.wheel(), id.station(), id.sector(), id.superLayer(), id.layer(), id.wire(), flag ); }
int DTDeadFlag::setCellDead_HV | ( | int | wheelId, |
int | stationId, | ||
int | sectorId, | ||
int | slId, | ||
int | layerId, | ||
int | cellId, | ||
bool | flag | ||
) |
Definition at line 375 of file DTDeadFlag.cc.
References cellStatus(), setCellStatus(), and ntuplemaker::status.
Referenced by setCellDead_HV().
{ bool dead_HV; bool dead_TP; bool dead_RO; bool discCat; int status = cellStatus( wheelId, stationId, sectorId, slId, layerId, cellId, dead_HV, dead_TP, dead_RO, discCat ); setCellStatus( wheelId, stationId, sectorId, slId, layerId, cellId, flag, dead_TP, dead_RO, discCat ); return status; }
int DTDeadFlag::setCellDead_RO | ( | int | wheelId, |
int | stationId, | ||
int | sectorId, | ||
int | slId, | ||
int | layerId, | ||
int | cellId, | ||
bool | flag | ||
) |
Definition at line 461 of file DTDeadFlag.cc.
References cellStatus(), setCellStatus(), and ntuplemaker::status.
Referenced by setCellDead_RO().
{ bool dead_HV; bool dead_TP; bool dead_RO; bool discCat; int status = cellStatus( wheelId, stationId, sectorId, slId, layerId, cellId, dead_HV, dead_TP, dead_RO, discCat ); setCellStatus( wheelId, stationId, sectorId, slId, layerId, cellId, dead_HV, dead_TP, flag, discCat ); return status; }
int DTDeadFlag::setCellDead_RO | ( | const DTWireId & | id, |
bool | flag | ||
) |
Definition at line 492 of file DTDeadFlag.cc.
References setCellDead_RO(), and relativeConstraints::station.
{ return setCellDead_RO( id.wheel(), id.station(), id.sector(), id.superLayer(), id.layer(), id.wire(), flag ); }
int DTDeadFlag::setCellDead_TP | ( | int | wheelId, |
int | stationId, | ||
int | sectorId, | ||
int | slId, | ||
int | layerId, | ||
int | cellId, | ||
bool | flag | ||
) |
Definition at line 418 of file DTDeadFlag.cc.
References cellStatus(), setCellStatus(), and ntuplemaker::status.
Referenced by setCellDead_TP().
{ bool dead_HV; bool dead_TP; bool dead_RO; bool discCat; int status = cellStatus( wheelId, stationId, sectorId, slId, layerId, cellId, dead_HV, dead_TP, dead_RO, discCat ); setCellStatus( wheelId, stationId, sectorId, slId, layerId, cellId, dead_HV, flag, dead_RO, discCat ); return status; }
int DTDeadFlag::setCellDead_TP | ( | const DTWireId & | id, |
bool | flag | ||
) |
Definition at line 449 of file DTDeadFlag.cc.
References setCellDead_TP(), and relativeConstraints::station.
{ return setCellDead_TP( id.wheel(), id.station(), id.sector(), id.superLayer(), id.layer(), id.wire(), flag ); }
int DTDeadFlag::setCellDiscCat | ( | const DTWireId & | id, |
bool | flag | ||
) |
Definition at line 535 of file DTDeadFlag.cc.
References setCellDiscCat(), and relativeConstraints::station.
{ return setCellDiscCat( id.wheel(), id.station(), id.sector(), id.superLayer(), id.layer(), id.wire(), flag ); }
int DTDeadFlag::setCellDiscCat | ( | int | wheelId, |
int | stationId, | ||
int | sectorId, | ||
int | slId, | ||
int | layerId, | ||
int | cellId, | ||
bool | flag | ||
) |
Definition at line 504 of file DTDeadFlag.cc.
References cellStatus(), setCellStatus(), and ntuplemaker::status.
Referenced by setCellDiscCat().
{ bool dead_HV; bool dead_TP; bool dead_RO; bool discCat; int status = cellStatus( wheelId, stationId, sectorId, slId, layerId, cellId, dead_HV, dead_TP, dead_RO, discCat ); setCellStatus( wheelId, stationId, sectorId, slId, layerId, cellId, dead_HV, dead_TP, dead_RO, flag ); return status; }
int DTDeadFlag::setCellStatus | ( | int | wheelId, |
int | stationId, | ||
int | sectorId, | ||
int | slId, | ||
int | layerId, | ||
int | cellId, | ||
bool | dead_HV, | ||
bool | dead_TP, | ||
bool | dead_RO, | ||
bool | discCat | ||
) | [inline] |
Definition at line 157 of file DTDeadFlag.h.
Referenced by setCellDead_HV(), setCellDead_RO(), setCellDead_TP(), and setCellDiscCat().
{ return set( wheelId, stationId, sectorId, slId, layerId, cellId, dead_HV, dead_TP, dead_RO, discCat ); };
int DTDeadFlag::setCellStatus | ( | const DTWireId & | id, |
bool | dead_HV, | ||
bool | dead_TP, | ||
bool | dead_RO, | ||
bool | discCat | ||
) | [inline] |
Definition at line 169 of file DTDeadFlag.h.
References ExpressReco_HICollisions_FallBack::id.
{ return set( id, dead_HV, dead_TP, dead_RO, discCat ); };
const std::string & DTDeadFlag::version | ( | ) | const |
access version
Definition at line 277 of file DTDeadFlag.cc.
References dataVersion.
{ return dataVersion; }
std::string & DTDeadFlag::version | ( | ) |
std::vector< std::pair<DTDeadFlagId,DTDeadFlagData> > DTDeadFlag::dataList [private] |
Definition at line 243 of file DTDeadFlag.h.
Referenced by begin(), cacheMap(), clear(), DTDeadFlag(), end(), get(), and set().
std::string DTDeadFlag::dataVersion [private] |
Definition at line 241 of file DTDeadFlag.h.
DTBufferTree<int,int>* DTDeadFlag::dBuf [private] |
Definition at line 245 of file DTDeadFlag.h.
Referenced by cacheMap(), clear(), DTDeadFlag(), get(), set(), and ~DTDeadFlag().