CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes
CommissioningHistosUsingDb Class Reference

#include <CommissioningHistosUsingDb.h>

Inheritance diagram for CommissioningHistosUsingDb:
CommissioningHistograms ApvTimingHistosUsingDb CalibrationHistosUsingDb DaqScopeModeHistosUsingDb FastFedCablingHistosUsingDb FineDelayHistosUsingDb LatencyHistosUsingDb NoiseHistosUsingDb OptoScanHistosUsingDb PedestalsHistosUsingDb PedsFullNoiseHistosUsingDb PedsOnlyHistosUsingDb VpspScanHistosUsingDb

Classes

class  DetInfo
 

Public Member Functions

 CommissioningHistosUsingDb (SiStripConfigDb *const, edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopoToken, sistrip::RunType=sistrip::UNDEFINED_RUN_TYPE)
 
void configure (const edm::ParameterSet &, const edm::EventSetup &) override
 
bool doUploadAnal () const
 
void doUploadAnal (bool)
 
bool doUploadConf () const
 
void doUploadConf (bool)
 
void uploadToConfigDb ()
 
 ~CommissioningHistosUsingDb () override
 
- Public Member Functions inherited from CommissioningHistograms
 CommissioningHistograms (const edm::ParameterSet &pset, DQMStore *const, const sistrip::RunType &)
 
 CommissioningHistograms ()
 
void createCollations (const std::vector< std::string > &)
 
virtual void createSummaryHisto (const sistrip::Monitorable &, const sistrip::Presentation &, const std::string &top_level_dir, const sistrip::Granularity &)
 
void extractHistograms (const std::vector< std::string > &)
 
virtual void histoAnalysis (bool debug)
 
virtual void printAnalyses ()
 
virtual void printSummary ()
 
void remove (std::string pattern="")
 
void save (std::string &filename, uint32_t run_number=0, std::string partitionName="")
 
virtual ~CommissioningHistograms ()
 

Protected Member Functions

virtual void addDcuDetIds ()
 
void buildDetInfo ()
 
SiStripFedCabling *const cabling () const
 
virtual void create (SiStripConfigDb::AnalysisDescriptionsV &, Analysis)
 
virtual void createAnalyses (SiStripConfigDb::AnalysisDescriptionsV &)
 
SiStripConfigDb *const db () const
 
std::pair< std::string, DetInfodetInfo (const SiStripFecKey &)
 
bool deviceIsPresent (const SiStripFecKey &)
 
void uploadAnalyses ()
 
virtual void uploadConfigurations ()
 
- Protected Member Functions inherited from CommissioningHistograms
DQMStore *const bei () const
 
void clearHistosMap ()
 
Analysesdata (bool getMaskedData=false)
 
Factory *const factory ()
 
TH1 * histogram (const sistrip::Monitorable &, const sistrip::Presentation &, const sistrip::View &, const std::string &directory, const uint32_t &xbins, const float &xlow=1. *sistrip::invalid_, const float &xhigh=1. *sistrip::invalid_)
 
const HistosMaphistos () const
 
const FedToFecMapmapping () const
 
void printHistosMap ()
 
const edm::ParameterSetpset () const
 
const sistrip::RunTypetask () const
 

Private Types

typedef std::map< uint32_t, DetInfoDetInfos
 

Private Member Functions

 CommissioningHistosUsingDb ()
 

Private Attributes

SiStripFedCablingcabling_
 
SiStripConfigDbdb_
 
std::map< std::string, DetInfosdetInfo_
 
sistrip::RunType runType_
 
edm::ESGetToken< TrackerTopology, TrackerTopologyRcdtTopoToken_
 
bool uploadAnal_
 
bool uploadConf_
 

Additional Inherited Members

- Public Types inherited from CommissioningHistograms
typedef std::map< uint32_t, CommissioningAnalysis * > Analyses
 
typedef Analyses::iterator Analysis
 
typedef dqm::harvesting::DQMStore DQMStore
 
typedef SummaryPlotFactory< CommissioningAnalysis * > Factory
 
typedef std::map< uint32_t, uint32_t > FedToFecMap
 
typedef std::vector< Histo * > Histos
 
typedef std::map< uint32_t, HistosHistosMap
 
typedef dqm::harvesting::MonitorElement MonitorElement
 
- Static Public Member Functions inherited from CommissioningHistograms
static void copyCustomInformation (DQMStore *const, const std::vector< std::string > &)
 
static uint32_t runNumber (DQMStore *const, const std::vector< std::string > &)
 
static sistrip::RunType runType (DQMStore *const, const std::vector< std::string > &)
 
- Protected Attributes inherited from CommissioningHistograms
std::unique_ptr< Factoryfactory_
 

Detailed Description

Definition at line 18 of file CommissioningHistosUsingDb.h.

Member Typedef Documentation

◆ DetInfos

typedef std::map<uint32_t, DetInfo> CommissioningHistosUsingDb::DetInfos
private

Definition at line 82 of file CommissioningHistosUsingDb.h.

Constructor & Destructor Documentation

◆ CommissioningHistosUsingDb() [1/2]

CommissioningHistosUsingDb::CommissioningHistosUsingDb ( SiStripConfigDb * const  db,
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd tTopoToken,
sistrip::RunType  type = sistrip::UNDEFINED_RUN_TYPE 
)

Definition at line 17 of file CommissioningHistosUsingDb.cc.

21  runType_(type),
22  db_(db),
23  cabling_(nullptr),
24  detInfo_(),
25  uploadAnal_(true),
26  uploadConf_(false),
27  tTopoToken_{tTopoToken} {
28  LogTrace(mlDqmClient_) << "[" << __PRETTY_FUNCTION__ << "]"
29  << " Constructing object...";
30 }
std::map< std::string, DetInfos > detInfo_
static const char mlDqmClient_[]
#define LogTrace(id)
SiStripConfigDb *const db() const
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopoToken_

◆ ~CommissioningHistosUsingDb()

CommissioningHistosUsingDb::~CommissioningHistosUsingDb ( )
override

Definition at line 48 of file CommissioningHistosUsingDb.cc.

References db_, LogTrace, and sistrip::mlDqmClient_.

48  {
49  if (db_) {
50  delete db_;
51  }
52  LogTrace(mlDqmClient_) << "[" << __PRETTY_FUNCTION__ << "]"
53  << " Destructing object...";
54 }
static const char mlDqmClient_[]
#define LogTrace(id)

◆ CommissioningHistosUsingDb() [2/2]

CommissioningHistosUsingDb::CommissioningHistosUsingDb ( )
private

Definition at line 34 of file CommissioningHistosUsingDb.cc.

References LogTrace, and sistrip::mlDqmClient_.

37  db_(nullptr),
38  cabling_(nullptr),
39  detInfo_(),
40  uploadAnal_(false),
41  uploadConf_(false) {
42  LogTrace(mlDqmClient_) << "[" << __PRETTY_FUNCTION__ << "]"
43  << " Constructing object..." << endl;
44 }
std::map< std::string, DetInfos > detInfo_
static const char mlDqmClient_[]
#define LogTrace(id)

Member Function Documentation

◆ addDcuDetIds()

void CommissioningHistosUsingDb::addDcuDetIds ( )
protectedvirtual

Reimplemented in FastFedCablingHistosUsingDb.

Definition at line 184 of file CommissioningHistosUsingDb.cc.

References conversion_template_cfg::anal, cabling_, G2GainsValidator::conn, CommissioningHistograms::data(), SiStripFedKey::feChan(), SiStripFedKey::fedChannel(), SiStripFedCabling::fedConnection(), SiStripFedKey::fedId(), SiStripFedKey::feUnit(), sistrip::mlDqmClient_, SiStripKey::path(), and contentValuesCheck::ss.

Referenced by uploadToConfigDb().

184  {
185  if (!cabling_) {
186  edm::LogWarning(mlDqmClient_) << "[CommissioningHistosUsingDb::" << __func__ << "]"
187  << " NULL pointer to SiStripFedCabling object!";
188  return;
189  }
190 
191  Analyses::iterator ianal = data().begin();
192  Analyses::iterator janal = data().end();
193  for (; ianal != janal; ++ianal) {
194  CommissioningAnalysis* anal = ianal->second;
195 
196  if (!anal) {
197  edm::LogWarning(mlDqmClient_) << "[CommissioningHistosUsingDb::" << __func__ << "]"
198  << " NULL pointer to CommissioningAnalysis object!";
199  return;
200  }
201 
202  SiStripFedKey fed_key = anal->fedKey();
203  SiStripFecKey fec_key = anal->fecKey();
204 
206 
207  SiStripFedKey fed(conn.fedId(), SiStripFedKey::feUnit(conn.fedCh()), SiStripFedKey::feChan(conn.fedCh()));
208 
209  SiStripFecKey fec(
210  conn.fecCrate(), conn.fecSlot(), conn.fecRing(), conn.ccuAddr(), conn.ccuChan(), conn.lldChannel());
211 
212  if (fed_key.path() != fed.path()) {
213  std::stringstream ss;
214  ss << "[CommissioningHistosUsingDb::" << __func__ << "]"
215  << " Cannot set DCU and DetId values in commissioning analysis object!" << std::endl
216  << " Incompatible FED key retrieved from cabling!" << std::endl
217  << " FED key from analysis object : " << fed_key.path() << std::endl
218  << " FED key from cabling object : " << fed.path() << std::endl
219  << " FED id/ch from analysis object: " << fed_key.fedId() << "/" << fed_key.fedChannel() << std::endl
220  << " FED id/ch from cabling object : " << conn.fedId() << "/" << conn.fedCh();
221  edm::LogWarning(mlDqmClient_) << ss.str();
222 
223  } else if (fec_key.path() != fec.path()) {
224  std::stringstream ss;
225  ss << "[CommissioningHistosUsingDb::" << __func__ << "]"
226  << " Cannot set DCU and DetId values in commissioning analysis object!" << std::endl
227  << " Incompatible FEC key retrieved from cabling!" << std::endl
228  << " FEC key from analysis object : " << fec_key.path() << std::endl
229  << " FEC key from cabling object : " << fec.path();
230  edm::LogWarning(mlDqmClient_) << ss.str();
231 
232  } else {
233  anal->dcuId(conn.dcuId());
234  anal->detId(conn.detId());
235  }
236  }
237 }
const uint16_t & feChan() const
Analyses & data(bool getMaskedData=false)
const uint16_t & feUnit() const
A container class for generic run and event-related info, information required by the commissioning a...
Definition: SiStripFedKey.h:56
FedChannelConnection fedConnection(uint16_t fed_id, uint16_t fed_ch) const
const std::string & path() const
Definition: SiStripKey.h:121
static const char mlDqmClient_[]
Utility class that identifies a position within the strip tracker control structure, down to the level of an APV25.
Definition: SiStripFecKey.h:45
uint16_t fedChannel() const
Class containning control, module, detector and connection information, at the level of a FED channel...
const uint16_t & fedId() const
Abstract base for derived classes that provide analysis of commissioning histograms.
Log< level::Warning, false > LogWarning

◆ buildDetInfo()

void CommissioningHistosUsingDb::buildDetInfo ( )
protected

Definition at line 257 of file CommissioningHistosUsingDb.cc.

References generateTowerEtThresholdLUT::addr, db(), db_, SiStripConfigDb::dbParams(), TauDecayModes::dec, detInfo_, SiStripConfigDb::deviceAddress(), SiStripConfigDb::findDcuDetId(), SiStripConfigDb::getDcuDetIds(), SiStripConfigDb::getDeviceDescriptions(), cuy::ii, info(), edm::isDebugEnabled(), SiStripFecKey::isValid(), findQualityFiles::jj, SiStripKey::key(), submitPVResolutionJobs::key, sistrip::mlDqmClient_, SiStripDbParams::partitions(), createTree::pp, contentValuesCheck::ss, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by uploadToConfigDb().

257  {
258  detInfo_.clear();
259 
260  if (!db()) {
261  edm::LogError(mlDqmClient_) << "[CommissioningHistosUsingDb::" << __func__ << "]"
262  << " NULL pointer to SiStripConfigDb interface!";
263  return;
264  }
265 
266  SiStripDbParams::SiStripPartitions::const_iterator ii = db_->dbParams().partitions().begin();
267  SiStripDbParams::SiStripPartitions::const_iterator jj = db_->dbParams().partitions().end();
268  for (; ii != jj; ++ii) {
269  // Retrieve DCUs and DetIds for given partition
270  std::string pp = ii->second.partitionName();
273 
274  // Iterate through DCUs
275  SiStripConfigDb::DeviceDescriptionsV::const_iterator idcu = dcus.begin();
276  SiStripConfigDb::DeviceDescriptionsV::const_iterator jdcu = dcus.end();
277  for (; idcu != jdcu; ++idcu) {
278  // Extract DCU-FEH description
279  dcuDescription* dcu = dynamic_cast<dcuDescription*>(*idcu);
280  if (!dcu) {
281  continue;
282  }
283  if (dcu->getDcuType() != "FEH") {
284  continue;
285  }
286 
287  // S.L. 29/1/2010
288  // HARDCODED!!! We have a broken module, known from Pisa integration tests
289  // We could really use a better solutin for this than hardcode it!!!
290  if (dcu->getDcuHardId() == 16448250)
291  continue; // fake dcu (0xfafafa)
292 
293  // Find TkDcuInfo object corresponding to given DCU description
294  SiStripConfigDb::DcuDetIdsV::const_iterator idet = dets.end();
295  idet = SiStripConfigDb::findDcuDetId(dets.begin(), dets.end(), dcu->getDcuHardId());
296  if (idet == dets.begin()) {
297  continue;
298  }
299 
300  // Extract TkDcuInfo object
301  TkDcuInfo* det = idet->second;
302  if (!det) {
303  continue;
304  }
305 
306  // Build FEC key
308  SiStripFecKey fec_key(addr.fecCrate_, addr.fecSlot_, addr.fecRing_, addr.ccuAddr_, addr.ccuChan_);
309 
310  // Build DetInfo object
311  DetInfo info;
312  info.dcuId_ = det->getDcuHardId();
313  info.detId_ = det->getDetId();
314  info.pairs_ = det->getApvNumber() / 2;
315 
316  // Add it to map
317  if (fec_key.isValid()) {
318  detInfo_[pp][fec_key.key()] = info;
319  }
320  }
321  }
322 
323  // Debug
324  if (edm::isDebugEnabled()) {
325  std::stringstream ss;
326  ss << "[CommissioningHistosUsingDb::" << __func__ << "]"
327  << " List of modules for " << detInfo_.size()
328  << " partitions, with their DCUids, DetIds, and nApvPairs: " << std::endl;
329  std::map<std::string, DetInfos>::const_iterator ii = detInfo_.begin();
330  std::map<std::string, DetInfos>::const_iterator jj = detInfo_.end();
331  for (; ii != jj; ++ii) {
332  ss << " Partition \"" << ii->first << "\" has " << ii->second.size() << " modules:" << std::endl;
333  DetInfos::const_iterator iii = ii->second.begin();
334  DetInfos::const_iterator jjj = ii->second.end();
335  for (; iii != jjj; ++iii) {
336  SiStripFecKey key = iii->first;
337  ss << " module= " << key.fecCrate() << "/" << key.fecSlot() << "/" << key.fecRing() << "/" << key.ccuAddr()
338  << "/" << key.ccuChan() << ", " << std::hex << " DCUid= " << std::setw(8) << std::setfill('0')
339  << iii->second.dcuId_ << " DetId= " << std::setw(8) << std::setfill('0') << iii->second.detId_ << std::dec
340  << " nPairs= " << iii->second.pairs_ << std::endl;
341  }
342  }
343  //LogTrace(mlDqmClient_) << ss.str();
344  }
345 }
bool isDebugEnabled()
static const TGPicture * info(bool iBackgroundIsBlack)
DcuDetIds::range DcuDetIdsRange
std::map< std::string, DetInfos > detInfo_
SiStripDetInfo::DetInfo DetInfo
static const char mlDqmClient_[]
Log< level::Error, false > LogError
const_iterator_range partitions() const
Utility class that identifies a position within the strip tracker control structure, down to the level of an APV25.
Definition: SiStripFecKey.h:45
static DcuDetIdsV::const_iterator findDcuDetId(DcuDetIdsV::const_iterator begin, DcuDetIdsV::const_iterator end, uint32_t dcu_id)
Definition: DcuDetIds.cc:412
SiStripConfigDb *const db() const
DeviceDescriptions::range DeviceDescriptionsRange
key
prepare the HTCondor submission files and eventually submit them
DeviceAddress deviceAddress(const deviceDescription &)
ii
Definition: cuy.py:589
const SiStripDbParams & dbParams() const
DeviceDescriptionsRange getDeviceDescriptions(std::string partition="")
DcuDetIdsRange getDcuDetIds(std::string partition="")
Definition: DcuDetIds.cc:10

◆ cabling()

SiStripFedCabling *const CommissioningHistosUsingDb::cabling ( ) const
inlineprotected

◆ configure()

void CommissioningHistosUsingDb::configure ( const edm::ParameterSet ,
const edm::EventSetup setup 
)
overridevirtual

Reimplemented from CommissioningHistograms.

Reimplemented in FineDelayHistosUsingDb, and LatencyHistosUsingDb.

Definition at line 56 of file CommissioningHistosUsingDb.cc.

References SiStripFedCablingBuilderFromDb::buildFecCabling(), SiStripFedCablingBuilderFromDb::buildFecCablingFromDevices(), cabling_, db_, sistrip::FAST_CABLING, SiStripFedCablingBuilderFromDb::getFedCabling(), LogTrace, sistrip::mlDqmClient_, runType_, singleTopDQM_cfi::setup, contentValuesCheck::ss, SiStripFedCabling::summary(), SiStripFedCabling::terse(), and tTopoToken_.

Referenced by LatencyHistosUsingDb::configure(), and FineDelayHistosUsingDb::configure().

56  {
57  if (!db_) {
58  edm::LogError(mlDqmClient_) << "[CommissioningHistosUsingDb::" << __func__ << "]"
59  << " NULL pointer to SiStripConfigDb interface!"
60  << " Cannot configure...";
61  } else {
62  // Build FEC cabling object from connections found in DB
63  SiStripFecCabling fec_cabling;
66  } else {
68  }
69 
70  // Build FED cabling from FEC cabling
73  std::stringstream ss;
74  ss << "[CommissioningHistosUsingDb::" << __func__ << "]"
75  << " Terse print out of FED cabling:" << std::endl;
76  cabling_->terse(ss);
77  LogTrace(mlDqmClient_) << ss.str();
78 
79  const auto& tTopo = setup.getData(tTopoToken_);
80  std::stringstream sss;
81  sss << "[CommissioningHistosUsingDb::" << __func__ << "]"
82  << " Summary of FED cabling:" << std::endl;
83  cabling_->summary(sss, &tTopo);
84  edm::LogVerbatim(mlDqmClient_) << sss.str();
85  }
86 }
void summary(std::stringstream &ss, const TrackerTopology *trackerTopo) const
LEFT FOR COMPATIBILITY. SHOULD BE REPLACED BY PRINTSUMMARY.
Log< level::Info, true > LogVerbatim
static const char mlDqmClient_[]
Log< level::Error, false > LogError
#define LogTrace(id)
static void buildFecCabling(SiStripConfigDb *const, SiStripFecCabling &, const sistrip::CablingSource &)
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopoToken_
static void getFedCabling(const SiStripFecCabling &in, SiStripFedCabling &out)
void terse(std::stringstream &) const
Contains cabling info at the device level, including DetId, APV pair numbers, hardware addresses...
static void buildFecCablingFromDevices(SiStripConfigDb *const, SiStripFecCabling &)

◆ create()

virtual void CommissioningHistosUsingDb::create ( SiStripConfigDb::AnalysisDescriptionsV ,
Analysis   
)
inlineprotectedvirtual

◆ createAnalyses()

void CommissioningHistosUsingDb::createAnalyses ( SiStripConfigDb::AnalysisDescriptionsV desc)
protectedvirtual

Definition at line 241 of file CommissioningHistosUsingDb.cc.

References create(), CommissioningHistograms::data(), submitPVResolutionJobs::desc, LogTrace, and sistrip::mlDqmClient_.

Referenced by uploadAnalyses().

241  {
242  LogTrace(mlDqmClient_) << "[CommissioningHistosUsingDb::" << __func__ << "]"
243  << " Creating AnalysisDescriptions...";
244 
245  desc.clear();
246 
247  Analyses::iterator ianal = data().begin();
248  Analyses::iterator janal = data().end();
249  for (; ianal != janal; ++ianal) {
250  // create analysis description
251  create(desc, ianal);
252  }
253 }
Analyses & data(bool getMaskedData=false)
static const char mlDqmClient_[]
#define LogTrace(id)
virtual void create(SiStripConfigDb::AnalysisDescriptionsV &, Analysis)

◆ db()

SiStripConfigDb *const CommissioningHistosUsingDb::db ( ) const
inlineprotected

Definition at line 99 of file CommissioningHistosUsingDb.h.

References db_.

Referenced by FastFedCablingHistosUsingDb::addDcuDetIds(), buildDetInfo(), CalibrationHistosUsingDb::CalibrationHistosUsingDb(), FastFedCablingHistosUsingDb::connections(), DaqScopeModeHistosUsingDb::create(), VpspScanHistosUsingDb::create(), NoiseHistosUsingDb::create(), OptoScanHistosUsingDb::create(), PedestalsHistosUsingDb::create(), PedsFullNoiseHistosUsingDb::create(), PedsOnlyHistosUsingDb::create(), ApvTimingHistosUsingDb::create(), LatencyHistosUsingDb::create(), CalibrationHistosUsingDb::create(), FastFedCablingHistosUsingDb::create(), FineDelayHistosUsingDb::create(), VpspScanHistosUsingDb::update(), OptoScanHistosUsingDb::update(), ApvTimingHistosUsingDb::update(), LatencyHistosUsingDb::update(), CalibrationHistosUsingDb::update(), FineDelayHistosUsingDb::update(), DaqScopeModeHistosUsingDb::uploadConfigurations(), OptoScanHistosUsingDb::uploadConfigurations(), ApvTimingHistosUsingDb::uploadConfigurations(), VpspScanHistosUsingDb::uploadConfigurations(), NoiseHistosUsingDb::uploadConfigurations(), PedsOnlyHistosUsingDb::uploadConfigurations(), PedestalsHistosUsingDb::uploadConfigurations(), PedsFullNoiseHistosUsingDb::uploadConfigurations(), FastFedCablingHistosUsingDb::uploadConfigurations(), LatencyHistosUsingDb::uploadConfigurations(), CalibrationHistosUsingDb::uploadConfigurations(), and FineDelayHistosUsingDb::uploadConfigurations().

99 { return db_; }

◆ detInfo()

std::pair< std::string, CommissioningHistosUsingDb::DetInfo > CommissioningHistosUsingDb::detInfo ( const SiStripFecKey key)
protected

Definition at line 349 of file CommissioningHistosUsingDb.cc.

References sistrip::CCU_CHAN, detInfo_, cuy::ii, findQualityFiles::jj, submitPVResolutionJobs::key, and createJobs::tmp.

Referenced by deviceIsPresent().

350  {
352  if (tmp.isInvalid()) {
353  return std::make_pair("", DetInfo());
354  }
355  std::map<std::string, DetInfos>::const_iterator ii = detInfo_.begin();
356  std::map<std::string, DetInfos>::const_iterator jj = detInfo_.end();
357  for (; ii != jj; ++ii) {
358  DetInfos::const_iterator iii = ii->second.find(tmp.key());
359  if (iii != ii->second.end()) {
360  return std::make_pair(ii->first, iii->second);
361  }
362  }
363  return std::make_pair("", DetInfo());
364 }
std::map< std::string, DetInfos > detInfo_
SiStripDetInfo::DetInfo DetInfo
Utility class that identifies a position within the strip tracker control structure, down to the level of an APV25.
Definition: SiStripFecKey.h:45
key
prepare the HTCondor submission files and eventually submit them
ii
Definition: cuy.py:589
tmp
align.sh
Definition: createJobs.py:716

◆ deviceIsPresent()

bool CommissioningHistosUsingDb::deviceIsPresent ( const SiStripFecKey key)
protected

Definition at line 368 of file CommissioningHistosUsingDb.cc.

References sistrip::CCU_CHAN, detInfo(), info(), sistrip::invalid32_, submitPVResolutionJobs::key, sistrip::mlDqmClient_, contentValuesCheck::ss, and createJobs::tmp.

Referenced by DaqScopeModeHistosUsingDb::update(), VpspScanHistosUsingDb::update(), PedsFullNoiseHistosUsingDb::update(), PedestalsHistosUsingDb::update(), OptoScanHistosUsingDb::update(), ApvTimingHistosUsingDb::update(), and CalibrationHistosUsingDb::update().

368  {
370  std::pair<std::string, DetInfo> info = detInfo(key);
371  if (info.second.dcuId_ != sistrip::invalid32_) {
372  if (key.channel() == 2 && info.second.pairs_ == 2) {
373  return false;
374  } else {
375  return true;
376  }
377  } else {
378  std::stringstream ss;
379  ss << "[CommissioningHistosUsingDb::" << __func__ << "]"
380  << " Cannot find module (crate/FEC/ring/CCU/module): " << tmp.fecCrate() << "/" << tmp.fecSlot() << "/"
381  << tmp.fecRing() << "/" << tmp.ccuAddr() << "/" << tmp.ccuChan() << "!";
382  edm::LogWarning(mlDqmClient_) << ss.str();
383  return true;
384  }
385 }
static const TGPicture * info(bool iBackgroundIsBlack)
static const uint32_t invalid32_
Definition: Constants.h:15
static const char mlDqmClient_[]
Utility class that identifies a position within the strip tracker control structure, down to the level of an APV25.
Definition: SiStripFecKey.h:45
key
prepare the HTCondor submission files and eventually submit them
std::pair< std::string, DetInfo > detInfo(const SiStripFecKey &)
Log< level::Warning, false > LogWarning
tmp
align.sh
Definition: createJobs.py:716

◆ doUploadAnal() [1/2]

bool CommissioningHistosUsingDb::doUploadAnal ( ) const
inline

Definition at line 96 of file CommissioningHistosUsingDb.h.

References uploadAnal_.

◆ doUploadAnal() [2/2]

void CommissioningHistosUsingDb::doUploadAnal ( bool  upload)
inline

Definition at line 94 of file CommissioningHistosUsingDb.h.

References alcaDQMUpload::upload(), and uploadAnal_.

◆ doUploadConf() [1/2]

bool CommissioningHistosUsingDb::doUploadConf ( ) const
inline

◆ doUploadConf() [2/2]

void CommissioningHistosUsingDb::doUploadConf ( bool  upload)
inline

Definition at line 93 of file CommissioningHistosUsingDb.h.

References alcaDQMUpload::upload(), and uploadConf_.

◆ uploadAnalyses()

void CommissioningHistosUsingDb::uploadAnalyses ( )
protected

Definition at line 99 of file CommissioningHistosUsingDb.cc.

References SiStripConfigDb::addAnalysisDescriptions(), SiStripConfigDb::clearAnalysisDescriptions(), createAnalyses(), db_, SiStripConfigDb::dbParams(), TauDecayModes::dec, SiStripConfigDb::deviceFactory(), isotrackApplyRegressor::df, sistrip::mlDqmClient_, SiStripDbParams::partitions(), uploadAnal_, SiStripConfigDb::uploadAnalysisDescriptions(), and uploadConf_.

Referenced by uploadToConfigDb().

99  {
100  if (!db_) {
101  edm::LogError(mlDqmClient_) << "[CommissioningHistosUsingDb::" << __func__ << "]"
102  << " NULL pointer to SiStripConfigDb interface!"
103  << " Aborting upload...";
104  return;
105  }
106 
108  SiStripDbParams::SiStripPartitions::const_iterator ip = db_->dbParams().partitions().begin();
109  SiStripDbParams::SiStripPartitions::const_iterator jp = db_->dbParams().partitions().end();
110  for (; ip != jp; ++ip) {
111  edm::LogVerbatim(mlDqmClient_) << "[CommissioningHistosUsingDb::" << __func__ << "]"
112  << " Starting from partition " << ip->first << " with versions:\n"
113  << std::dec << " Conn: " << ip->second.cabVersion().first << "."
114  << ip->second.cabVersion().second << "\n"
115  << " FED: " << ip->second.fedVersion().first << "."
116  << ip->second.fedVersion().second << "\n"
117  << " FEC: " << ip->second.fecVersion().first << "."
118  << ip->second.fecVersion().second << "\n"
119  << " Mask: " << ip->second.maskVersion().first << "."
120  << ip->second.maskVersion().second;
121 
122  // Upload commissioning analysis results
124  createAnalyses(anals);
125 
126  edm::LogVerbatim(mlDqmClient_) << "[CommissioningHistosUsingDb::" << __func__ << "]"
127  << " Created analysis descriptions for " << anals.size() << " devices";
128 
129  // Update analysis descriptions with new commissioning results
130  if (uploadAnal_) {
131  if (uploadConf_) {
132  edm::LogVerbatim(mlDqmClient_) << "[CommissioningHistosUsingDb::" << __func__ << "]"
133  << " Uploading major version of analysis descriptions to DB"
134  << " (will be used for physics)...";
135  } else {
136  edm::LogVerbatim(mlDqmClient_) << "[CommissioningHistosUsingDb::" << __func__ << "]"
137  << " Uploading minor version of analysis descriptions to DB"
138  << " (will not be used for physics)...";
139  }
140  db_->clearAnalysisDescriptions(ip->second.partitionName());
141  db_->addAnalysisDescriptions(ip->second.partitionName(), anals);
142  db_->uploadAnalysisDescriptions(uploadConf_, ip->second.partitionName());
143  edm::LogVerbatim(mlDqmClient_) << "[CommissioningHistosUsingDb::" << __func__ << "]"
144  << " Upload of analysis descriptions to DB finished!";
145  } else {
146  edm::LogWarning(mlDqmClient_) << "[CommissioningHistosUsingDb::" << __func__ << "]"
147  << " TEST! No analysis descriptions will be uploaded to DB...";
148  }
149 
150  if (uploadConf_) {
151  SiStripDbParams::SiStripPartitions::const_iterator ip = db_->dbParams().partitions().begin();
152  SiStripDbParams::SiStripPartitions::const_iterator jp = db_->dbParams().partitions().end();
153  for (; ip != jp; ++ip) {
154  DeviceFactory* df = db_->deviceFactory();
155  tkStateVector states = df->getCurrentStates();
156  tkStateVector::const_iterator istate = states.begin();
157  tkStateVector::const_iterator jstate = states.end();
158  while (istate != jstate) {
159  if (*istate && ip->first == (*istate)->getPartitionName()) {
160  break;
161  }
162  istate++;
163  }
164  // Set versions if state was found
165  if (istate != states.end()) {
166  edm::LogVerbatim(mlDqmClient_) << "[CommissioningHistosUsingDb::" << __func__ << "]"
167  << " Created new version for partition " << ip->first << ". Current state:\n"
168  << std::dec << " Conn: " << (*istate)->getConnectionVersionMajorId() << "."
169  << (*istate)->getConnectionVersionMinorId() << "\n"
170  << " FED: " << (*istate)->getFedVersionMajorId() << "."
171  << (*istate)->getFedVersionMinorId() << "\n"
172  << " FEC: " << (*istate)->getFecVersionMajorId() << "."
173  << (*istate)->getFecVersionMinorId() << "\n"
174  << " Mask: " << (*istate)->getMaskVersionMajorId() << "."
175  << (*istate)->getMaskVersionMinorId();
176  }
177  }
178  }
179  }
180 }
Log< level::Info, true > LogVerbatim
void uploadAnalysisDescriptions(bool calibration_for_physics=false, std::string partition="")
void addAnalysisDescriptions(std::string partition, AnalysisDescriptionsV &)
static const char mlDqmClient_[]
Log< level::Error, false > LogError
const_iterator_range partitions() const
void clearAnalysisDescriptions(std::string partition="")
virtual void createAnalyses(SiStripConfigDb::AnalysisDescriptionsV &)
std::vector< AnalysisDescription * > AnalysisDescriptionsV
const SiStripDbParams & dbParams() const
Log< level::Warning, false > LogWarning
DeviceFactory *const deviceFactory(std::string method_name="") const

◆ uploadConfigurations()

virtual void CommissioningHistosUsingDb::uploadConfigurations ( )
inlineprotectedvirtual

◆ uploadToConfigDb()

void CommissioningHistosUsingDb::uploadToConfigDb ( )

Member Data Documentation

◆ cabling_

SiStripFedCabling* CommissioningHistosUsingDb::cabling_
private

Definition at line 80 of file CommissioningHistosUsingDb.h.

Referenced by addDcuDetIds(), cabling(), and configure().

◆ db_

SiStripConfigDb* CommissioningHistosUsingDb::db_
private

◆ detInfo_

std::map<std::string, DetInfos> CommissioningHistosUsingDb::detInfo_
private

Definition at line 84 of file CommissioningHistosUsingDb.h.

Referenced by buildDetInfo(), and detInfo().

◆ runType_

sistrip::RunType CommissioningHistosUsingDb::runType_
private

Definition at line 76 of file CommissioningHistosUsingDb.h.

Referenced by configure().

◆ tTopoToken_

edm::ESGetToken<TrackerTopology, TrackerTopologyRcd> CommissioningHistosUsingDb::tTopoToken_
private

Definition at line 90 of file CommissioningHistosUsingDb.h.

Referenced by configure().

◆ uploadAnal_

bool CommissioningHistosUsingDb::uploadAnal_
private

Definition at line 86 of file CommissioningHistosUsingDb.h.

Referenced by doUploadAnal(), and uploadAnalyses().

◆ uploadConf_

bool CommissioningHistosUsingDb::uploadConf_
private

Definition at line 88 of file CommissioningHistosUsingDb.h.

Referenced by doUploadConf(), and uploadAnalyses().