#include <DQM/SiStripCommissioningDbClients/interface/CommissioningHistosUsingDb.h>
Definition at line 18 of file CommissioningHistosUsingDb.h.
typedef std::map<uint32_t,DetInfo> CommissioningHistosUsingDb::DetInfos [private] |
Definition at line 101 of file CommissioningHistosUsingDb.h.
typedef std::map<uint32_t,uint16_t> CommissioningHistosUsingDb::DisabledDevices [private] |
Definition at line 105 of file CommissioningHistosUsingDb.h.
CommissioningHistosUsingDb::CommissioningHistosUsingDb | ( | SiStripConfigDb * const | db, | |
sistrip::RunType | type = sistrip::UNDEFINED_RUN_TYPE | |||
) |
Definition at line 20 of file CommissioningHistosUsingDb.cc.
References SiStripFedCablingBuilderFromDb::buildFecCabling(), SiStripFedCablingBuilderFromDb::buildFecCablingFromDevices(), cabling_, db_, lat::endl(), sistrip::FAST_CABLING, SiStripFedCablingBuilderFromDb::getFedCabling(), LogTrace, sistrip::mlDqmClient_, runType_, ss, SiStripFedCabling::summary(), and SiStripFedCabling::terse().
00022 : CommissioningHistograms(), 00023 runType_(type), 00024 db_(db), 00025 cabling_(0), 00026 detInfo_(), 00027 disabled_(), 00028 uploadAnal_(true), 00029 uploadConf_(false) 00030 { 00031 LogTrace(mlDqmClient_) 00032 << "[" << __PRETTY_FUNCTION__ << "]" 00033 << " Constructing object..."; 00034 00035 // Build FEC cabling object from connections found in DB 00036 SiStripFecCabling fec_cabling; 00037 if ( runType_ == sistrip::FAST_CABLING ) { 00038 SiStripFedCablingBuilderFromDb::buildFecCablingFromDevices( db_, fec_cabling ); 00039 } else { 00040 SiStripFedCablingBuilderFromDb::buildFecCabling( db_, fec_cabling ); 00041 } 00042 00043 // Build FED cabling from FEC cabling 00044 cabling_ = new SiStripFedCabling(); 00045 SiStripFedCablingBuilderFromDb::getFedCabling( fec_cabling, *cabling_ ); 00046 std::stringstream ss; 00047 ss << "[CommissioningHistosUsingDb::" << __func__ << "]" 00048 << " Terse print out of FED cabling:" << std::endl; 00049 cabling_->terse(ss); 00050 LogTrace(mlDqmClient_) << ss.str(); 00051 00052 std::stringstream sss; 00053 sss << "[CommissioningHistosUsingDb::" << __func__ << "]" 00054 << " Summary of FED cabling:" << std::endl; 00055 cabling_->summary(sss); 00056 edm::LogVerbatim(mlDqmClient_) << sss.str(); 00057 00058 }
CommissioningHistosUsingDb::CommissioningHistosUsingDb | ( | SiStripConfigDb * const | db, | |
DQMOldReceiver * const | mui, | |||
sistrip::RunType | type = sistrip::UNDEFINED_RUN_TYPE | |||
) |
Definition at line 62 of file CommissioningHistosUsingDb.cc.
References SiStripFedCablingBuilderFromDb::buildFecCabling(), SiStripFedCablingBuilderFromDb::buildFecCablingFromDevices(), cabling_, db_, lat::endl(), sistrip::FAST_CABLING, SiStripFedCablingBuilderFromDb::getFedCabling(), LogTrace, sistrip::mlDqmClient_, runType_, ss, SiStripFedCabling::summary(), and SiStripFedCabling::terse().
00065 : CommissioningHistograms( mui, type ), 00066 runType_(type), 00067 db_(db), 00068 cabling_(0), 00069 detInfo_(), 00070 disabled_(), 00071 uploadAnal_(true), 00072 uploadConf_(false) 00073 { 00074 LogTrace(mlDqmClient_) 00075 << "[" << __PRETTY_FUNCTION__ << "]" 00076 << " Constructing object..."; 00077 00078 // Build FEC cabling object from connections found in DB 00079 SiStripFecCabling fec_cabling; 00080 if ( runType_ == sistrip::FAST_CABLING ) { 00081 SiStripFedCablingBuilderFromDb::buildFecCablingFromDevices( db_, fec_cabling ); 00082 } else { 00083 SiStripFedCablingBuilderFromDb::buildFecCabling( db_, fec_cabling ); 00084 } 00085 00086 // Build FED cabling from FEC cabling 00087 cabling_ = new SiStripFedCabling(); 00088 SiStripFedCablingBuilderFromDb::getFedCabling( fec_cabling, *cabling_ ); 00089 std::stringstream ss; 00090 ss << "[CommissioningHistosUsingDb::" << __func__ << "]" 00091 << " Terse print out of FED cabling:" << std::endl; 00092 cabling_->terse(ss); 00093 LogTrace(mlDqmClient_) << ss.str(); 00094 00095 std::stringstream sss; 00096 sss << "[CommissioningHistosUsingDb::" << __func__ << "]" 00097 << " Summary of FED cabling:" << std::endl; 00098 cabling_->summary(sss); 00099 edm::LogVerbatim(mlDqmClient_) << sss.str(); 00100 00101 }
CommissioningHistosUsingDb::~CommissioningHistosUsingDb | ( | ) | [virtual] |
Definition at line 122 of file CommissioningHistosUsingDb.cc.
References db_, LogTrace, and sistrip::mlDqmClient_.
00122 { 00123 if ( db_ ) { delete db_; } 00124 LogTrace(mlDqmClient_) 00125 << "[" << __PRETTY_FUNCTION__ << "]" 00126 << " Destructing object..."; 00127 }
CommissioningHistosUsingDb::CommissioningHistosUsingDb | ( | ) | [private] |
Definition at line 105 of file CommissioningHistosUsingDb.cc.
References lat::endl(), LogTrace, and sistrip::mlDqmClient_.
00106 : CommissioningHistograms( reinterpret_cast<DQMOldReceiver*>(0), sistrip::UNDEFINED_RUN_TYPE ), 00107 runType_(sistrip::UNDEFINED_RUN_TYPE), 00108 db_(0), 00109 cabling_(0), 00110 detInfo_(), 00111 disabled_(), 00112 uploadAnal_(false), 00113 uploadConf_(false) 00114 { 00115 LogTrace(mlDqmClient_) 00116 << "[" << __PRETTY_FUNCTION__ << "]" 00117 << " Constructing object..." << endl; 00118 }
void CommissioningHistosUsingDb::addDcuDetIds | ( | ) | [protected, virtual] |
Reimplemented in FastFedCablingHistosUsingDb.
Definition at line 201 of file CommissioningHistosUsingDb.cc.
References cabling_, FedChannelConnection::ccuAddr(), FedChannelConnection::ccuChan(), SiStripFedCabling::connection(), CommissioningHistograms::data(), CommissioningAnalysis::dcuId(), FedChannelConnection::dcuId(), FedChannelConnection::detId(), CommissioningAnalysis::detId(), lat::endl(), FedChannelConnection::fecCrate(), SiStripFedKey::feChan(), CommissioningAnalysis::fecKey(), FedChannelConnection::fecRing(), FedChannelConnection::fecSlot(), FedChannelConnection::fedCh(), SiStripFedKey::fedChannel(), SiStripFedKey::fedId(), FedChannelConnection::fedId(), CommissioningAnalysis::fedKey(), SiStripFedKey::feUnit(), FedChannelConnection::lldChannel(), sistrip::mlDqmClient_, SiStripKey::path(), and ss.
Referenced by uploadToConfigDb().
00201 { 00202 00203 if ( !cabling_ ) { 00204 edm::LogWarning(mlDqmClient_) 00205 << "[CommissioningHistosUsingDb::" << __func__ << "]" 00206 << " NULL pointer to SiStripFedCabling object!"; 00207 return; 00208 } 00209 00210 Analyses::iterator ianal = data().begin(); 00211 Analyses::iterator janal = data().end(); 00212 for ( ; ianal != janal; ++ianal ) { 00213 00214 CommissioningAnalysis* anal = ianal->second; 00215 00216 if ( !anal ) { 00217 edm::LogWarning(mlDqmClient_) 00218 << "[CommissioningHistosUsingDb::" << __func__ << "]" 00219 << " NULL pointer to CommissioningAnalysis object!"; 00220 return; 00221 } 00222 00223 SiStripFedKey fed_key = anal->fedKey(); 00224 SiStripFecKey fec_key = anal->fecKey(); 00225 00226 FedChannelConnection conn = cabling_->connection( fed_key.fedId(), 00227 fed_key.fedChannel() ); 00228 00229 SiStripFedKey fed( conn.fedId(), 00230 SiStripFedKey::feUnit( conn.fedCh() ), 00231 SiStripFedKey::feChan( conn.fedCh() ) ); 00232 00233 SiStripFecKey fec( conn.fecCrate(), 00234 conn.fecSlot(), 00235 conn.fecRing(), 00236 conn.ccuAddr(), 00237 conn.ccuChan(), 00238 conn.lldChannel() ); 00239 00240 if ( fed_key.path() != fed.path() ) { 00241 00242 std::stringstream ss; 00243 ss << "[CommissioningHistosUsingDb::" << __func__ << "]" 00244 << " Cannot set DCU and DetId values in commissioning analysis object!" << std::endl 00245 << " Incompatible FED key retrieved from cabling!" << std::endl 00246 << " FED key from analysis object : " << fed_key.path() << std::endl 00247 << " FED key from cabling object : " << fed.path() << std::endl 00248 << " FED id/ch from analysis object: " << fed_key.fedId() << "/" << fed_key.fedChannel() << std::endl 00249 << " FED id/ch from cabling object : " << conn.fedId() << "/" << conn.fedCh(); 00250 edm::LogWarning(mlDqmClient_) << ss.str(); 00251 00252 } else if ( fec_key.path() != fec.path() ) { 00253 00254 std::stringstream ss; 00255 ss << "[CommissioningHistosUsingDb::" << __func__ << "]" 00256 << " Cannot set DCU and DetId values in commissioning analysis object!" << std::endl 00257 << " Incompatible FEC key retrieved from cabling!" << std::endl 00258 << " FEC key from analysis object : " << fec_key.path() << std::endl 00259 << " FEC key from cabling object : " << fec.path(); 00260 edm::LogWarning(mlDqmClient_) << ss.str(); 00261 00262 } else { 00263 00264 anal->dcuId( conn.dcuId() ); 00265 anal->detId( conn.detId() ); 00266 00267 } 00268 00269 } 00270 00271 }
void CommissioningHistosUsingDb::addProblemDevice | ( | const SiStripFecKey & | key | ) | [protected] |
Definition at line 452 of file CommissioningHistosUsingDb.cc.
References sistrip::CCU_CHAN, detInfo(), disabled_, info, sistrip::invalid32_, and tmp.
Referenced by OptoScanHistosUsingDb::update(), PedestalsHistosUsingDb::update(), ApvTimingHistosUsingDb::update(), and VpspScanHistosUsingDb::update().
00452 { 00453 SiStripFecKey tmp( key, sistrip::CCU_CHAN ); 00454 std::pair<std::string,DetInfo> info = detInfo(key); 00455 if ( info.second.dcuId_ != sistrip::invalid32_ ) { disabled_[info.first][info.second.dcuId_] = info.second.pairs_; } 00456 }
void CommissioningHistosUsingDb::buildDetInfo | ( | ) | [protected] |
Definition at line 314 of file CommissioningHistosUsingDb.cc.
References addr, SiStripFecKey::ccuAddr(), SiStripConfigDb::DeviceAddress::ccuAddr_, SiStripFecKey::ccuChan(), SiStripConfigDb::DeviceAddress::ccuChan_, db(), db_, SiStripConfigDb::dbParams(), CommissioningHistosUsingDb::DetInfo::dcuId_, CommissioningHistosUsingDb::DetInfo::detId_, detInfo_, SiStripConfigDb::deviceAddress(), lat::endl(), SiStripFecKey::fecCrate(), SiStripConfigDb::DeviceAddress::fecCrate_, SiStripFecKey::fecRing(), SiStripConfigDb::DeviceAddress::fecRing_, SiStripFecKey::fecSlot(), SiStripConfigDb::DeviceAddress::fecSlot_, SiStripConfigDb::findDcuDetId(), SiStripConfigDb::getDcuDetIds(), SiStripConfigDb::getDeviceDescriptions(), info, edm::isDebugEnabled(), SiStripFecKey::isValid(), getDQMSummary::key, SiStripKey::key(), sistrip::mlDqmClient_, CommissioningHistosUsingDb::DetInfo::pairs_, SiStripDbParams::partitions(), and ss.
Referenced by uploadToConfigDb().
00314 { 00315 00316 detInfo_.clear(); 00317 00318 if ( !db() ) { 00319 edm::LogError(mlDqmClient_) 00320 << "[CommissioningHistosUsingDb::" << __func__ << "]" 00321 << " NULL pointer to SiStripConfigDb interface!"; 00322 return; 00323 } 00324 00325 SiStripDbParams::SiStripPartitions::const_iterator ii = db_->dbParams().partitions().begin(); 00326 SiStripDbParams::SiStripPartitions::const_iterator jj = db_->dbParams().partitions().end(); 00327 for ( ; ii != jj; ++ii ) { 00328 00329 // Retrieve DCUs and DetIds for given partition 00330 std::string pp = ii->second.partitionName(); 00331 SiStripConfigDb::DeviceDescriptionsRange dcus = db()->getDeviceDescriptions( DCU, pp ); 00332 SiStripConfigDb::DcuDetIdsRange dets = db()->getDcuDetIds( pp ); 00333 00334 // Iterate through DCUs 00335 SiStripConfigDb::DeviceDescriptionsV::const_iterator idcu = dcus.begin(); 00336 SiStripConfigDb::DeviceDescriptionsV::const_iterator jdcu = dcus.end(); 00337 for ( ; idcu != jdcu; ++idcu ) { 00338 00339 // Extract DCU-FEH description 00340 dcuDescription* dcu = dynamic_cast<dcuDescription*>( *idcu ); 00341 if ( !dcu ) { continue; } 00342 if ( dcu->getDcuType() != "FEH" ) { continue; } 00343 00344 // Find TkDcuInfo object corresponding to given DCU description 00345 SiStripConfigDb::DcuDetIdsV::const_iterator idet = dets.end(); 00346 idet = SiStripConfigDb::findDcuDetId( dets.begin(), dets.end(), dcu->getDcuHardId() ); 00347 if ( idet == dets.begin() ) { continue; } 00348 00349 // Extract TkDcuInfo object 00350 TkDcuInfo* det = idet->second; 00351 if ( !det ) { continue; } 00352 00353 // Build FEC key 00354 const SiStripConfigDb::DeviceAddress& addr = db()->deviceAddress( *dcu ); 00355 SiStripFecKey fec_key( addr.fecCrate_, 00356 addr.fecSlot_, 00357 addr.fecRing_, 00358 addr.ccuAddr_, 00359 addr.ccuChan_ ); 00360 00361 // Build DetInfo object 00362 DetInfo info; 00363 info.dcuId_ = det->getDcuHardId(); 00364 info.detId_ = det->getDetId(); 00365 info.pairs_ = det->getApvNumber()/2; 00366 00367 // Add it to map 00368 if ( fec_key.isValid() ) { detInfo_[pp][fec_key.key()] = info; } 00369 00370 } 00371 } 00372 00373 // Debug 00374 if ( edm::isDebugEnabled() ) { 00375 std::stringstream ss; 00376 ss << "[CommissioningHistosUsingDb::" << __func__ << "]" 00377 << " List of modules for " 00378 << detInfo_.size() 00379 << " partitions, with their DCUids, DetIds, and nApvPairs: " << std::endl; 00380 std::map<std::string,DetInfos>::const_iterator ii = detInfo_.begin(); 00381 std::map<std::string,DetInfos>::const_iterator jj = detInfo_.end(); 00382 for ( ; ii != jj; ++ii ) { 00383 ss << " Partition \"" << ii->first 00384 << "\" has " << ii->second.size() 00385 << " modules:" 00386 << std::endl; 00387 DetInfos::const_iterator iii = ii->second.begin(); 00388 DetInfos::const_iterator jjj = ii->second.end(); 00389 for ( ; iii != jjj; ++iii ) { 00390 SiStripFecKey key = iii->first; 00391 ss << " module= " 00392 << key.fecCrate() << "/" 00393 << key.fecSlot() << "/" 00394 << key.fecRing() << "/" 00395 << key.ccuAddr() << "/" 00396 << key.ccuChan() << ", " 00397 << std::hex 00398 << " DCUid= " 00399 << std::setw(8) << std::setfill('0') << iii->second.dcuId_ 00400 << " DetId= " 00401 << std::setw(8) << std::setfill('0') << iii->second.detId_ 00402 << std::dec 00403 << " nPairs= " 00404 << iii->second.pairs_ 00405 << std::endl; 00406 } 00407 } 00408 //LogTrace(mlDqmClient_) << ss.str(); 00409 } 00410 00411 }
SiStripFedCabling *const CommissioningHistosUsingDb::cabling | ( | ) | const [inline, protected] |
Definition at line 126 of file CommissioningHistosUsingDb.h.
References cabling_.
Referenced by FastFedCablingHistosUsingDb::addDcuDetIds(), FineDelayHistosUsingDb::computeDelays(), NoiseHistosUsingDb::update(), PedestalsHistosUsingDb::update(), PedsOnlyHistosUsingDb::update(), LatencyHistosUsingDb::update(), ApvTimingHistosUsingDb::update(), and FineDelayHistosUsingDb::update().
00126 { return cabling_; }
virtual void CommissioningHistosUsingDb::create | ( | SiStripConfigDb::AnalysisDescriptionsV & | , | |
Analysis | ||||
) | [inline, protected, virtual] |
Reimplemented in ApvTimingHistosUsingDb, CalibrationHistosUsingDb, FastFedCablingHistosUsingDb, FineDelayHistosUsingDb, LatencyHistosUsingDb, NoiseHistosUsingDb, OptoScanHistosUsingDb, PedestalsHistosUsingDb, PedsOnlyHistosUsingDb, SamplingHistosUsingDb, and VpspScanHistosUsingDb.
Definition at line 64 of file CommissioningHistosUsingDb.h.
Referenced by createAnalyses().
void CommissioningHistosUsingDb::createAnalyses | ( | SiStripConfigDb::AnalysisDescriptionsV & | desc | ) | [protected, virtual] |
Definition at line 275 of file CommissioningHistosUsingDb.cc.
References create(), CommissioningHistograms::data(), LogTrace, and sistrip::mlDqmClient_.
Referenced by uploadAnalyses().
00275 { 00276 00277 LogTrace(mlDqmClient_) 00278 << "[CommissioningHistosUsingDb::" << __func__ << "]" 00279 << " Creating AnalysisDescriptions..."; 00280 00281 desc.clear(); 00282 00283 // uint16_t size = 0; 00284 // std::stringstream ss; 00285 // ss << "[CommissioningHistosUsingDb::" << __func__ << "]" 00286 // << " Analysis descriptions:" << std::endl; 00287 00288 Analyses::iterator ianal = data().begin(); 00289 Analyses::iterator janal = data().end(); 00290 for ( ; ianal != janal; ++ianal ) { 00291 00292 // create analysis description 00293 create( desc, ianal ); 00294 00295 // // debug 00296 // if ( ianal->second ) { 00297 // if ( desc.size()/2 > size ) { // print every 2nd description 00298 // size = desc.size()/2; 00299 // ianal->second->print(ss); 00300 // ss << (*(desc.end()-2))->toString(); 00301 // ss << (*(desc.end()-1))->toString(); 00302 // ss << std::endl; 00303 // } 00304 // } 00305 00306 } 00307 00308 // LogTrace(mlDqmClient_) << ss.str(); 00309 00310 }
SiStripConfigDb *const CommissioningHistosUsingDb::db | ( | ) | const [inline, protected] |
Definition at line 125 of file CommissioningHistosUsingDb.h.
References db_.
Referenced by FastFedCablingHistosUsingDb::addDcuDetIds(), buildDetInfo(), FastFedCablingHistosUsingDb::connections(), FineDelayHistosUsingDb::create(), PedestalsHistosUsingDb::create(), FastFedCablingHistosUsingDb::create(), VpspScanHistosUsingDb::create(), PedsOnlyHistosUsingDb::create(), NoiseHistosUsingDb::create(), CalibrationHistosUsingDb::create(), LatencyHistosUsingDb::create(), ApvTimingHistosUsingDb::create(), OptoScanHistosUsingDb::create(), OptoScanHistosUsingDb::update(), LatencyHistosUsingDb::update(), CalibrationHistosUsingDb::update(), ApvTimingHistosUsingDb::update(), VpspScanHistosUsingDb::update(), FineDelayHistosUsingDb::update(), ApvTimingHistosUsingDb::uploadConfigurations(), LatencyHistosUsingDb::uploadConfigurations(), CalibrationHistosUsingDb::uploadConfigurations(), PedestalsHistosUsingDb::uploadConfigurations(), OptoScanHistosUsingDb::uploadConfigurations(), FineDelayHistosUsingDb::uploadConfigurations(), PedsOnlyHistosUsingDb::uploadConfigurations(), FastFedCablingHistosUsingDb::uploadConfigurations(), VpspScanHistosUsingDb::uploadConfigurations(), and NoiseHistosUsingDb::uploadConfigurations().
00125 { return db_; }
std::pair< std::string, CommissioningHistosUsingDb::DetInfo > CommissioningHistosUsingDb::detInfo | ( | const SiStripFecKey & | key | ) | [protected] |
Definition at line 415 of file CommissioningHistosUsingDb.cc.
References sistrip::CCU_CHAN, detInfo_, SiStripFecKey::isInvalid(), SiStripKey::key(), and tmp.
Referenced by addProblemDevice(), and deviceIsPresent().
00415 { 00416 SiStripFecKey tmp( key, sistrip::CCU_CHAN ); 00417 if ( tmp.isInvalid() ) { return std::make_pair("",DetInfo()); } 00418 std::map<std::string,DetInfos>::const_iterator ii = detInfo_.begin(); 00419 std::map<std::string,DetInfos>::const_iterator jj = detInfo_.end(); 00420 for ( ; ii != jj; ++ii ) { 00421 DetInfos::const_iterator iii = ii->second.find( tmp.key() ); 00422 if ( iii != ii->second.end() ) { return std::make_pair(ii->first,iii->second); } 00423 } 00424 return std::make_pair("",DetInfo()); 00425 }
bool CommissioningHistosUsingDb::deviceIsPresent | ( | const SiStripFecKey & | key | ) | [protected] |
Definition at line 429 of file CommissioningHistosUsingDb.cc.
References sistrip::CCU_CHAN, SiStripFecKey::ccuAddr(), SiStripFecKey::ccuChan(), SiStripKey::channel(), detInfo(), SiStripFecKey::fecCrate(), SiStripFecKey::fecRing(), SiStripFecKey::fecSlot(), info, sistrip::invalid32_, sistrip::mlDqmClient_, ss, and tmp.
Referenced by OptoScanHistosUsingDb::update(), PedestalsHistosUsingDb::update(), ApvTimingHistosUsingDb::update(), and VpspScanHistosUsingDb::update().
00429 { 00430 SiStripFecKey tmp( key, sistrip::CCU_CHAN ); 00431 std::pair<std::string,DetInfo> info = detInfo(key); 00432 if ( info.second.dcuId_ != sistrip::invalid32_ ) { 00433 if ( key.channel() == 2 && info.second.pairs_ == 2 ) { return false; } 00434 else { return true; } 00435 } else { 00436 std::stringstream ss; 00437 ss << "[CommissioningHistosUsingDb::" << __func__ << "]" 00438 << " Cannot find module (crate/FEC/ring/CCU/module): " 00439 << tmp.fecCrate() << "/" 00440 << tmp.fecSlot() << "/" 00441 << tmp.fecRing() << "/" 00442 << tmp.ccuAddr() << "/" 00443 << tmp.ccuChan() 00444 << "!"; 00445 edm::LogWarning(mlDqmClient_) << ss.str(); 00446 return true; 00447 } 00448 }
Definition at line 119 of file CommissioningHistosUsingDb.h.
References disableDevices_.
00119 { disableDevices_ = disable; }
bool CommissioningHistosUsingDb::disableDevices | ( | ) | const [inline] |
Definition at line 123 of file CommissioningHistosUsingDb.h.
References disableDevices_.
Referenced by SiStripCommissioningOfflineDbClient::createHistos().
00123 { return disableDevices_; }
void CommissioningHistosUsingDb::disableProblemDevices | ( | ) | [protected] |
Definition at line 460 of file CommissioningHistosUsingDb.cc.
References db_, SiStripConfigDb::deviceFactory(), disabled_, disableDevices_, lat::endl(), SiStripConfigDb::handleException(), edm::isDebugEnabled(), sistrip::mlDqmClient_, and ss.
Referenced by uploadToConfigDb().
00460 { 00461 00462 if ( edm::isDebugEnabled() ) { 00463 std::stringstream ss; 00464 ss << "[CommissioningHistosUsingDb::" << __func__ << "]" 00465 << " List of devices from " << disabled_.size() 00466 << " partitions to be disabled: " << std::endl; 00467 std::map<std::string,DisabledDevices>::const_iterator ii = disabled_.begin(); 00468 std::map<std::string,DisabledDevices>::const_iterator jj = disabled_.end(); 00469 for ( ; ii != jj; ++ii ) { 00470 ss << " Partition= " << ii->first << std::endl; 00471 DisabledDevices::const_iterator iii = ii->second.begin(); 00472 DisabledDevices::const_iterator jjj = ii->second.end(); 00473 for ( ; iii != jjj; ++iii ) { 00474 ss << " DCUid= " 00475 << std::setw(8) << std::setfill('0') 00476 << std::hex << iii->first << std::dec 00477 << ", ApvPair= " << iii->second << std::endl; 00478 } 00479 } 00480 edm::LogVerbatim(mlDqmClient_) << ss.str(); 00481 } 00482 00483 if ( !db_ ) { 00484 edm::LogError(mlDqmClient_) 00485 << "[CommissioningHistosUsingDb::" << __func__ << "]" 00486 << " NULL pointer to SiStripConfigDb interface!" 00487 << " Aborting disable of devices..."; 00488 return; 00489 } 00490 00491 DeviceFactory* df = db_->deviceFactory(); 00492 if ( !df ) { 00493 edm::LogError(mlDqmClient_) 00494 << "[CommissioningHistosUsingDb::" << __func__ << "]" 00495 << " NULL pointer to DeviceFactory interface!" 00496 << " Aborting disable of devices..."; 00497 return; 00498 } 00499 00500 if ( disableDevices_ ) { 00501 std::map<std::string,DisabledDevices>::const_iterator ii = disabled_.begin(); 00502 std::map<std::string,DisabledDevices>::const_iterator jj = disabled_.end(); 00503 for ( ; ii != jj; ++ii ) { 00504 std::vector<uint32_t> dcus; 00505 DisabledDevices::const_iterator iii = ii->second.begin(); 00506 DisabledDevices::const_iterator jjj = ii->second.end(); 00507 for ( ; iii != jjj; ++iii ) { dcus.push_back(iii->first); } 00508 #ifdef USING_NEW_DATABASE_MODEL 00509 edm::LogVerbatim(mlDqmClient_) 00510 << "[CommissioningHistosUsingDb::" << __func__ << "]" 00511 << " Disabling " << dcus.size() 00512 << " devices for partition \"" << ii->first << "\"..."; 00513 try { df->setEnableModules( ii->first, dcus, false ); } //@@ disable! 00514 catch (...) { db_->handleException( __func__ ); } 00515 edm::LogVerbatim(mlDqmClient_) 00516 << "[CommissioningHistosUsingDb::" << __func__ << "]" 00517 << " Disabled " << dcus.size() 00518 << " devices for partition \"" << ii->first << "\"!"; 00519 #else 00520 edm::LogWarning(mlDqmClient_) 00521 << "[CommissioningHistosUsingDb::" << __func__ << "]" 00522 << " Cannot disable devices using old DB model!"; 00523 #endif 00524 } 00525 } else { 00526 edm::LogVerbatim(mlDqmClient_) 00527 << "[CommissioningHistosUsingDb::" << __func__ << "]" 00528 << " TEST! Devices have not been disabled!..."; 00529 } 00530 00531 }
Definition at line 118 of file CommissioningHistosUsingDb.h.
References uploadAnal_.
00118 { uploadAnal_ = upload; }
bool CommissioningHistosUsingDb::doUploadAnal | ( | ) | const [inline] |
Definition at line 121 of file CommissioningHistosUsingDb.h.
References uploadAnal_.
Referenced by SiStripCommissioningOfflineDbClient::createHistos().
00121 { return uploadAnal_; }
Definition at line 117 of file CommissioningHistosUsingDb.h.
References uploadConf_.
00117 { uploadConf_ = upload; }
bool CommissioningHistosUsingDb::doUploadConf | ( | ) | const [inline] |
Definition at line 122 of file CommissioningHistosUsingDb.h.
References uploadConf_.
Referenced by SiStripCommissioningOfflineDbClient::createHistos(), ApvTimingHistosUsingDb::uploadConfigurations(), LatencyHistosUsingDb::uploadConfigurations(), CalibrationHistosUsingDb::uploadConfigurations(), PedestalsHistosUsingDb::uploadConfigurations(), OptoScanHistosUsingDb::uploadConfigurations(), FineDelayHistosUsingDb::uploadConfigurations(), PedsOnlyHistosUsingDb::uploadConfigurations(), FastFedCablingHistosUsingDb::uploadConfigurations(), VpspScanHistosUsingDb::uploadConfigurations(), and NoiseHistosUsingDb::uploadConfigurations().
00122 { return uploadConf_; }
void CommissioningHistosUsingDb::uploadAnalyses | ( | ) | [protected] |
Definition at line 142 of file CommissioningHistosUsingDb.cc.
References createAnalyses(), db_, SiStripConfigDb::dbParams(), sistrip::mlDqmClient_, SiStripDbParams::partitions(), uploadAnal_, and uploadConf_.
Referenced by uploadToConfigDb().
00142 { 00143 00144 #ifdef USING_NEW_DATABASE_MODEL 00145 00146 if ( !db_ ) { 00147 edm::LogError(mlDqmClient_) 00148 << "[CommissioningHistosUsingDb::" << __func__ << "]" 00149 << " NULL pointer to SiStripConfigDb interface!" 00150 << " Aborting upload..."; 00151 return; 00152 } 00153 00154 db_->clearAnalysisDescriptions(); 00155 SiStripDbParams::SiStripPartitions::const_iterator ip = db_->dbParams().partitions().begin(); 00156 SiStripDbParams::SiStripPartitions::const_iterator jp = db_->dbParams().partitions().end(); 00157 for ( ; ip != jp; ++ip ) { 00158 00159 // Upload commissioning analysis results 00160 SiStripConfigDb::AnalysisDescriptionsV anals; 00161 createAnalyses( anals ); 00162 00163 edm::LogVerbatim(mlDqmClient_) 00164 << "[CommissioningHistosUsingDb::" << __func__ << "]" 00165 << " Created analysis descriptions for " 00166 << anals.size() << " devices"; 00167 00168 // Update analysis descriptions with new commissioning results 00169 if ( uploadAnal_ ) { 00170 if ( uploadConf_ ) { 00171 edm::LogVerbatim(mlDqmClient_) 00172 << "[CommissioningHistosUsingDb::" << __func__ << "]" 00173 << " Uploading major version of analysis descriptions to DB" 00174 << " (will be used for physics)..."; 00175 } else { 00176 edm::LogVerbatim(mlDqmClient_) 00177 << "[CommissioningHistosUsingDb::" << __func__ << "]" 00178 << " Uploading minor version of analysis descriptions to DB" 00179 << " (will not be used for physics)..."; 00180 } 00181 db_->clearAnalysisDescriptions( ip->second.partitionName() ); 00182 db_->addAnalysisDescriptions( ip->second.partitionName(), anals ); 00183 db_->uploadAnalysisDescriptions( uploadConf_, ip->second.partitionName() ); 00184 edm::LogVerbatim(mlDqmClient_) 00185 << "[CommissioningHistosUsingDb::" << __func__ << "]" 00186 << " Upload of analysis descriptions to DB finished!"; 00187 } else { 00188 edm::LogWarning(mlDqmClient_) 00189 << "[CommissioningHistosUsingDb::" << __func__ << "]" 00190 << " TEST only! No analysis descriptions will be uploaded to DB..."; 00191 } 00192 00193 } 00194 00195 #endif 00196 00197 }
virtual void CommissioningHistosUsingDb::uploadConfigurations | ( | ) | [inline, protected, virtual] |
Reimplemented in ApvTimingHistosUsingDb, CalibrationHistosUsingDb, FastFedCablingHistosUsingDb, FineDelayHistosUsingDb, LatencyHistosUsingDb, NoiseHistosUsingDb, OptoScanHistosUsingDb, PedestalsHistosUsingDb, PedsOnlyHistosUsingDb, SamplingHistosUsingDb, and VpspScanHistosUsingDb.
Definition at line 58 of file CommissioningHistosUsingDb.h.
Referenced by uploadToConfigDb().
void CommissioningHistosUsingDb::uploadToConfigDb | ( | ) |
Definition at line 131 of file CommissioningHistosUsingDb.cc.
References addDcuDetIds(), buildDetInfo(), disabled_, disableProblemDevices(), uploadAnalyses(), and uploadConfigurations().
Referenced by SiStripCommissioningOfflineDbClient::uploadToConfigDb().
00131 { 00132 disabled_.clear(); 00133 buildDetInfo(); 00134 addDcuDetIds(); 00135 uploadConfigurations(); 00136 uploadAnalyses(); 00137 disableProblemDevices(); 00138 }
Definition at line 99 of file CommissioningHistosUsingDb.h.
Referenced by addDcuDetIds(), cabling(), and CommissioningHistosUsingDb().
SiStripConfigDb* CommissioningHistosUsingDb::db_ [private] |
Definition at line 97 of file CommissioningHistosUsingDb.h.
Referenced by buildDetInfo(), CommissioningHistosUsingDb(), db(), disableProblemDevices(), uploadAnalyses(), and ~CommissioningHistosUsingDb().
std::map<std::string,DetInfos> CommissioningHistosUsingDb::detInfo_ [private] |
Definition at line 103 of file CommissioningHistosUsingDb.h.
Referenced by buildDetInfo(), and detInfo().
std::map<std::string,DisabledDevices> CommissioningHistosUsingDb::disabled_ [private] |
Definition at line 107 of file CommissioningHistosUsingDb.h.
Referenced by addProblemDevice(), disableProblemDevices(), and uploadToConfigDb().
Definition at line 113 of file CommissioningHistosUsingDb.h.
Referenced by disableDevices(), and disableProblemDevices().
Definition at line 95 of file CommissioningHistosUsingDb.h.
Referenced by CommissioningHistosUsingDb().
bool CommissioningHistosUsingDb::uploadAnal_ [private] |
Definition at line 109 of file CommissioningHistosUsingDb.h.
Referenced by doUploadAnal(), and uploadAnalyses().
bool CommissioningHistosUsingDb::uploadConf_ [private] |
Definition at line 111 of file CommissioningHistosUsingDb.h.
Referenced by doUploadConf(), and uploadAnalyses().