CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Member Functions | Private Attributes
SiStripCommissioningSource Class Reference

#include <SiStripCommissioningSource.h>

Inheritance diagram for SiStripCommissioningSource:
edm::one::EDAnalyzer< edm::one::SharedResources, edm::one::WatchRuns > edm::one::EDAnalyzerBase edm::EDConsumerBase

Public Types

typedef dqm::legacy::DQMStore DQMStore
 
typedef dqm::legacy::MonitorElement MonitorElement
 
typedef std::map< unsigned int, CommissioningTask * > TaskMap
 
typedef std::vector< CommissioningTask * > VecOfTasks
 
typedef std::vector< VecOfTasksVecOfVecOfTasks
 
- Public Types inherited from edm::one::EDAnalyzerBase
typedef EDAnalyzerBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 

Public Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
void beginRun (edm::Run const &, const edm::EventSetup &) override
 
void endJob () override
 
void endRun (edm::Run const &, const edm::EventSetup &) override
 
 SiStripCommissioningSource (const edm::ParameterSet &)
 
 SiStripCommissioningSource ()=delete
 
 ~SiStripCommissioningSource () override
 
- Public Member Functions inherited from edm::one::EDAnalyzer< edm::one::SharedResources, edm::one::WatchRuns >
 EDAnalyzer ()=default
 
 EDAnalyzer (const EDAnalyzer &)=delete
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
const EDAnalyzeroperator= (const EDAnalyzer &)=delete
 
bool wantsGlobalLuminosityBlocks () const noexcept final
 
bool wantsGlobalRuns () const noexcept final
 
bool wantsInputProcessBlocks () const noexcept final
 
bool wantsProcessBlocks () const noexcept final
 
- Public Member Functions inherited from edm::one::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const noexcept
 
bool wantsStreamRuns () const noexcept
 
 ~EDAnalyzerBase () override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESResolverIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESResolverIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::array< std::vector< ModuleDescription const *> *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, ProductRegistry const &preg, std::map< std::string, ModuleDescription const *> const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProductResolverIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Member Functions

void clearCablingTasks ()
 
void clearTasks ()
 
void createCablingTasks ()
 
void createRunNumber ()
 
void createTask (const SiStripEventSummary *const, const edm::EventSetup &)
 
void createTasks (sistrip::RunType, const edm::EventSetup &)
 
void directory (std::stringstream &, uint32_t run_number=0)
 
DQMStore *const dqm (std::string method="") const
 
void fillCablingHistos (const SiStripEventSummary *const, const edm::DetSetVector< SiStripRawDigi > &)
 
void fillHistos (const SiStripEventSummary *const, const edm::DetSetVector< SiStripRawDigi > &, const edm::DetSetVector< SiStripRawDigi > &=edm::DetSetVector< SiStripRawDigi >(), const edmNew::DetSetVector< SiStripCluster > &=edmNew::DetSetVector< SiStripCluster >())
 
void remove ()
 

Private Attributes

std::string base_
 
bool cablingTask_
 
TaskMap cablingTasks_
 
edm::EDGetTokenT< edmNew::DetSetVector< SiStripCluster > > clustersToken_
 
edm::EDGetTokenT< edm::DetSetVector< SiStripRawDigi > > digiFineDelaySelectionToken_
 
edm::EDGetTokenT< edm::DetSetVector< SiStripRawDigi > > digiReorderedToken_
 
edm::EDGetTokenT< edm::DetSetVector< SiStripRawDigi > > digiScopeModeToken_
 
edm::EDGetTokenT< edm::DetSetVector< SiStripRawDigi > > digiVirginRawToken_
 
DQMStoredqm_
 
SiStripFecCablingfecCabling_
 
SiStripFedCablingfedCabling_
 
edm::ESGetToken< SiStripFedCabling, SiStripFedCablingRcdfedCablingToken_
 
std::string filename_
 
std::string inputClusterLabel_
 
std::string inputModuleLabel_
 
std::string inputModuleLabelAlt_
 
std::string inputModuleLabelSummary_
 
edm::EDGetTokenT< SiStripEventSummaryinputModuleSummaryToken_
 
bool isSpy_
 
edm::ESGetToken< SiStripNoises, SiStripNoisesRcdnoiseToken_
 
edm::ParameterSet parameters_
 
std::string partitionName_
 
edm::ESGetToken< SiStripPedestals, SiStripPedestalsRcdpedestalToken_
 
uint32_t run_
 
sistrip::RunType task_
 
std::string taskConfigurable_
 
VecOfVecOfTasks tasks_
 
bool tasksExist_
 
int32_t time_
 
int updateFreq_
 
std::string view_
 

Additional Inherited Members

- Static Public Member Functions inherited from edm::one::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< Bconsumes (edm::InputTag tag) noexcept
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes ()
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag)
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
void resetItemsToGetFrom (BranchType iType)
 

Detailed Description

Definition at line 34 of file SiStripCommissioningSource.h.

Member Typedef Documentation

◆ DQMStore

Definition at line 40 of file SiStripCommissioningSource.h.

◆ MonitorElement

Definition at line 41 of file SiStripCommissioningSource.h.

◆ TaskMap

typedef std::map<unsigned int, CommissioningTask*> SiStripCommissioningSource::TaskMap

Map of task objects, identified through FedChanelId

Definition at line 37 of file SiStripCommissioningSource.h.

◆ VecOfTasks

Definition at line 38 of file SiStripCommissioningSource.h.

◆ VecOfVecOfTasks

Definition at line 39 of file SiStripCommissioningSource.h.

Constructor & Destructor Documentation

◆ SiStripCommissioningSource() [1/2]

SiStripCommissioningSource::SiStripCommissioningSource ( const edm::ParameterSet pset)

Definition at line 52 of file SiStripCommissioningSource.cc.

References sistrip::CALIBRATION, sistrip::CALIBRATION_DECO, sistrip::CALIBRATION_SCAN, sistrip::CALIBRATION_SCAN_DECO, clustersToken_, digiFineDelaySelectionToken_, digiReorderedToken_, digiScopeModeToken_, digiVirginRawToken_, edm::EDConsumerBase::esConsumes(), inputClusterLabel_, inputModuleLabel_, inputModuleLabelAlt_, inputModuleLabelSummary_, inputModuleSummaryToken_, ProducerED_cfi::InputTag, isSpy_, LogTrace, sistrip::mlDqmSource_, sistrip::NOISE, noiseToken_, pedestalToken_, task_, and tasks_.

53  : dqm_(nullptr),
54  fedCablingToken_(esConsumes<edm::Transition::BeginRun>()),
55  fecCabling_(nullptr),
56  inputModuleLabel_(pset.getParameter<std::string>("InputModuleLabel")),
57  inputModuleLabelAlt_(pset.existsAs<std::string>("InputModuleLabelAlt")
58  ? pset.getParameter<std::string>("InputModuleLabelAlt")
59  : ""),
60  inputModuleLabelSummary_(pset.getParameter<std::string>("SummaryInputModuleLabel")),
62  pset.existsAs<std::string>("InputClusterLabel") ? pset.getParameter<std::string>("InputClusterLabel") : ""),
63  filename_(pset.getUntrackedParameter<std::string>("RootFileName", sistrip::dqmSourceFileName_)),
64  run_(0),
65  partitionName_(pset.existsAs<std::string>("PartitionName") ? pset.getParameter<std::string>("PartitionName")
66  : ""),
67  time_(0),
68  isSpy_(pset.existsAs<bool>("isSpy") ? pset.getParameter<bool>("isSpy") : false),
69  taskConfigurable_(pset.getUntrackedParameter<std::string>("CommissioningTask", "UNDEFINED")),
71  tasks_(),
72  cablingTasks_(),
73  tasksExist_(false),
74  cablingTask_(false),
75  updateFreq_(pset.getUntrackedParameter<int>("HistoUpdateFreq", 1)),
76  base_(""),
77  view_(pset.getUntrackedParameter<std::string>("View", "Default")),
78  parameters_(pset) {
79  usesResource("DQMStore");
80  inputModuleSummaryToken_ = consumes<SiStripEventSummary>(edm::InputTag(inputModuleLabelSummary_));
81  digiVirginRawToken_ = mayConsume<edm::DetSetVector<SiStripRawDigi> >(edm::InputTag(inputModuleLabel_, "VirginRaw"));
83  mayConsume<edm::DetSetVector<SiStripRawDigi> >(edm::InputTag(inputModuleLabel_, "FineDelaySelection"));
84  digiReorderedToken_ = mayConsume<edm::DetSetVector<SiStripRawDigi> >(edm::InputTag(inputModuleLabel_, "Reordered"));
86  if (not isSpy_)
87  digiScopeModeToken_ = mayConsume<edm::DetSetVector<SiStripRawDigi> >(edm::InputTag(inputModuleLabel_, "ScopeMode"));
88  else {
90  mayConsume<edm::DetSetVector<SiStripRawDigi> >(edm::InputTag(inputModuleLabelAlt_, "ScopeRawDigis"));
91  clustersToken_ = mayConsume<edmNew::DetSetVector<SiStripCluster> >(edm::InputTag(inputClusterLabel_));
92  }
94  LogTrace(mlDqmSource_) << "[SiStripCommissioningSource::" << __func__ << "]"
95  << " Constructing object...";
96  tasks_.clear();
97  tasks_.resize(1024, VecOfTasks(96, static_cast<CommissioningTask*>(nullptr)));
98 
99  if (task_ == sistrip::NOISE) {
101  }
105  }
106 }
edm::EDGetTokenT< edm::DetSetVector< SiStripRawDigi > > digiReorderedToken_
edm::EDGetTokenT< edm::DetSetVector< SiStripRawDigi > > digiVirginRawToken_
edm::ESGetToken< SiStripPedestals, SiStripPedestalsRcd > pedestalToken_
edm::EDGetTokenT< edmNew::DetSetVector< SiStripCluster > > clustersToken_
static const char mlDqmSource_[]
#define LogTrace(id)
std::vector< CommissioningTask * > VecOfTasks
static const char dqmSourceFileName_[]
edm::EDGetTokenT< edm::DetSetVector< SiStripRawDigi > > digiFineDelaySelectionToken_
edm::EDGetTokenT< SiStripEventSummary > inputModuleSummaryToken_
edm::EDGetTokenT< edm::DetSetVector< SiStripRawDigi > > digiScopeModeToken_
edm::ESGetToken< SiStripFedCabling, SiStripFedCablingRcd > fedCablingToken_
edm::ESGetToken< SiStripNoises, SiStripNoisesRcd > noiseToken_

◆ SiStripCommissioningSource() [2/2]

SiStripCommissioningSource::SiStripCommissioningSource ( )
delete

Private default constructor.

◆ ~SiStripCommissioningSource()

SiStripCommissioningSource::~SiStripCommissioningSource ( )
override

Definition at line 110 of file SiStripCommissioningSource.cc.

References LogTrace, and sistrip::mlDqmSource_.

110  {
111  LogTrace(mlDqmSource_) << "[SiStripCommissioningSource::" << __func__ << "]"
112  << " Destructing object...";
113 }
static const char mlDqmSource_[]
#define LogTrace(id)

Member Function Documentation

◆ analyze()

void SiStripCommissioningSource::analyze ( const edm::Event event,
const edm::EventSetup setup 
)
overridevirtual

Implements edm::one::EDAnalyzerBase.

Definition at line 289 of file SiStripCommissioningSource.cc.

References sistrip::APV_LATENCY, sistrip::APV_TIMING, cablingTask_, sistrip::CALIBRATION, sistrip::CALIBRATION_DECO, sistrip::CALIBRATION_SCAN, sistrip::CALIBRATION_SCAN_DECO, clustersToken_, createRunNumber(), createTask(), sistrip::DAQ_SCOPE_MODE, digiFineDelaySelectionToken_, digiReorderedToken_, digiScopeModeToken_, digiVirginRawToken_, sistrip::FAST_CABLING, sistrip::FED_CABLING, sistrip::FED_SCOPE_MODE, sistrip::FED_TIMING, sistrip::FED_VIRGIN_RAW, SiStripEnumsAndStrings::fedReadoutMode(), fillCablingHistos(), fillHistos(), sistrip::FINE_DELAY, inputClusterLabel_, inputModuleLabelAlt_, inputModuleSummaryToken_, isSpy_, edm::HandleBase::isValid(), sistrip::mlDqmSource_, sistrip::NOISE, sistrip::OPTO_SCAN, sistrip::PEDESTALS, sistrip::PEDS_FULL_NOISE, sistrip::PEDS_ONLY, run_, SiStripEnumsAndStrings::runType(), singleTopDQM_cfi::setup, contentValuesCheck::ss, edmLumisInFiles::summary, submitPVValidationJobs::t, task_, tasks_, tasksExist_, hcalRecHitTable_cff::time, time_, sistrip::UNDEFINED_RUN_TYPE, sistrip::UNKNOWN_RUN_TYPE, updateFreq_, findQualityFiles::v, and sistrip::VPSP_SCAN.

289  {
290  // Retrieve commissioning information from "event summary"
292  // event.getByLabel( inputModuleLabelSummary_, summary );
293  event.getByToken(inputModuleSummaryToken_, summary);
294 
295  // Check if EventSummary has info attached
296  if ((summary->runType() == sistrip::UNDEFINED_RUN_TYPE || summary->runType() == sistrip::UNKNOWN_RUN_TYPE) &&
297  summary->nullParams()) {
298  edm::LogWarning(mlDqmSource_) << "[SiStripCommissioningSource::" << __func__ << "]"
299  << " Unknown/undefined RunType and NULL parameter values!"
300  << " It may be that the 'trigger FED' object was not found!";
301  }
302 
303  // Check if need to rebuild FED/FEC cabling objects for connection run
304  //cablingForConnectionRun( summary->runType() ); //@@ do not use!
305 
306  // Extract run number and forward to client
307  if (event.id().run() != run_) {
308  run_ = event.id().run();
309  createRunNumber();
310  }
311 
312  // Coarse event rate counter
313  if (!(event.id().event() % updateFreq_)) {
314  std::stringstream ss;
315  ss << "[SiStripCommissioningSource::" << __func__ << "]"
316  << " The last " << updateFreq_ << " events were processed at a rate of ";
317  if (time(nullptr) == time_) {
318  ss << ">" << updateFreq_ << " Hz";
319  } else {
320  ss << (updateFreq_ / (time(nullptr) - time_)) << " Hz";
321  }
322  edm::LogVerbatim(mlDqmSource_) << ss.str();
323  time_ = time(nullptr);
324  }
325 
326  // Create commissioning task objects
327  if (!tasksExist_) {
328  createTask(summary.product(), setup);
329  } else {
330  for (auto& v : tasks_) {
331  for (auto& t : v) {
332  t->eventSetup(&setup);
333  }
334  }
335  }
336 
337  // Retrieve raw digis with mode appropriate to task
341 
342  if (task_ == sistrip::DAQ_SCOPE_MODE) { // scop-mode runs
343  if (not isSpy_ and
344  summary->fedReadoutMode() == FED_VIRGIN_RAW) { // if the readout is virgin raw just take the VR digis
345  event.getByToken(digiVirginRawToken_, raw);
346  } else if (not isSpy_ and summary->fedReadoutMode() == FED_SCOPE_MODE) {
347  event.getByToken(digiScopeModeToken_, raw);
348  } else if (isSpy_) { // spy case take both re-ordered and scope mode
349  event.getByToken(digiScopeModeToken_, rawAlt);
350  event.getByToken(digiReorderedToken_, raw);
351  if (not inputClusterLabel_.empty())
352  event.getByToken(clustersToken_, cluster);
353  } else {
354  std::stringstream ss;
355  ss << "[SiStripCommissioningSource::" << __func__ << "]"
356  << " Requested DAQ_SCOPE_MODE but unknown FED"
357  << " readout mode retrieved from SiStripEventSummary: "
358  << SiStripEnumsAndStrings::fedReadoutMode(summary->fedReadoutMode());
359  edm::LogWarning(mlDqmSource_) << ss.str();
360  }
363  event.getByToken(digiScopeModeToken_, raw);
368  event.getByToken(digiVirginRawToken_, raw);
369  } else if (task_ == sistrip::APV_LATENCY || task_ == sistrip::FINE_DELAY) {
370  event.getByToken(digiFineDelaySelectionToken_, raw);
371  } else {
372  std::stringstream ss;
373  ss << "[SiStripCommissioningSource::" << __func__ << "]"
374  << " Unknown CommissioningTask: " << SiStripEnumsAndStrings::runType(task_)
375  << " Unable to establish FED readout mode and retrieve digi container!"
376  << " Check if SiStripEventSummary object is found/present in Event";
377  edm::LogWarning(mlDqmSource_) << ss.str();
378  return;
379  }
380 
381  // Check for NULL pointer to digi container
382  if (not raw.isValid()) {
383  std::stringstream ss;
384  ss << "[SiStripCommissioningSource::" << __func__ << "]" << std::endl
385  << " NULL pointer to DetSetVector!" << std::endl
386  << " Unable to fill histograms!";
387  edm::LogWarning(mlDqmSource_) << ss.str();
388  return;
389  }
390 
391  if (isSpy_ and not inputModuleLabelAlt_.empty() and not rawAlt.isValid()) {
392  std::stringstream ss;
393  ss << "[SiStripCommissioningSource::" << __func__ << "]" << std::endl
394  << " NULL pointer to DetSetVector!" << std::endl
395  << " Unable to fill histograms!";
396  edm::LogWarning(mlDqmSource_) << ss.str();
397  return;
398  }
399 
400  if (isSpy_ and not inputClusterLabel_.empty() and not cluster.isValid()) {
401  std::stringstream ss;
402  ss << "[SiStripCommissioningSource::" << __func__ << "]" << std::endl
403  << " NULL pointer to DetSetVector!" << std::endl
404  << " Unable to fill histograms!";
405  edm::LogWarning(mlDqmSource_) << ss.str();
406  return;
407  }
408 
409  if (!cablingTask_) {
410  fillHistos(summary.product(), *raw, *rawAlt, *cluster);
411  } else {
412  fillCablingHistos(summary.product(), *raw);
413  }
414 }
Log< level::Info, true > LogVerbatim
edm::EDGetTokenT< edm::DetSetVector< SiStripRawDigi > > digiReorderedToken_
edm::EDGetTokenT< edm::DetSetVector< SiStripRawDigi > > digiVirginRawToken_
void createTask(const SiStripEventSummary *const, const edm::EventSetup &)
edm::EDGetTokenT< edmNew::DetSetVector< SiStripCluster > > clustersToken_
void fillHistos(const SiStripEventSummary *const, const edm::DetSetVector< SiStripRawDigi > &, const edm::DetSetVector< SiStripRawDigi > &=edm::DetSetVector< SiStripRawDigi >(), const edmNew::DetSetVector< SiStripCluster > &=edmNew::DetSetVector< SiStripCluster >())
static const char mlDqmSource_[]
static std::string runType(const sistrip::RunType &)
void fillCablingHistos(const SiStripEventSummary *const, const edm::DetSetVector< SiStripRawDigi > &)
edm::EDGetTokenT< edm::DetSetVector< SiStripRawDigi > > digiFineDelaySelectionToken_
bool isValid() const
Definition: HandleBase.h:70
edm::EDGetTokenT< SiStripEventSummary > inputModuleSummaryToken_
edm::EDGetTokenT< edm::DetSetVector< SiStripRawDigi > > digiScopeModeToken_
Log< level::Warning, false > LogWarning
Definition: event.py:1
static std::string fedReadoutMode(const sistrip::FedReadoutMode &)

◆ beginRun()

void SiStripCommissioningSource::beginRun ( edm::Run const &  run,
const edm::EventSetup setup 
)
override

Definition at line 137 of file SiStripCommissioningSource.cc.

References base_, cablingTask_, clearCablingTasks(), clearTasks(), SiStripFecCabling::crates(), DeadROC_duringRun::dir, dqm(), dqm_, fecCabling_, fedCabling_, fedCablingToken_, SiStripFedCabling::fedIds(), LogDebug, LogTrace, sistrip::mlDqmSource_, Utilities::operator, singleTopDQM_cfi::setup, contentValuesCheck::ss, task_, tasksExist_, and sistrip::UNDEFINED_RUN_TYPE.

137  {
138  LogTrace(mlDqmSource_) << "[SiStripCommissioningSource::" << __func__ << "]"
139  << " Configuring..." << std::endl;
140 
141  // ---------- DQM back-end interface ----------
142 
144  edm::LogInfo(mlDqmSource_) << "[SiStripCommissioningSource::" << __func__ << "]"
145  << " DQMStore service: " << dqm_;
146  dqm(__func__);
147 
148  // ---------- Base directory ----------
149 
150  std::stringstream dir("");
151  base_ = dir.str();
152 
153  // ---------- FED and FEC cabling ----------
154 
155  const auto& fed_cabling = setup.getData(fedCablingToken_);
156  fedCabling_ = const_cast<SiStripFedCabling*>(&fed_cabling);
157  LogDebug(mlDqmSource_) << "[SiStripCommissioningSource::" << __func__ << "]"
158  << "Initialized FED cabling. Number of FEDs is " << fedCabling_->fedIds().size();
159  fecCabling_ = new SiStripFecCabling(fed_cabling);
160  if (fecCabling_->crates().empty()) {
161  std::stringstream ss;
162  ss << "[SiStripCommissioningSource::" << __func__ << "]"
163  << " Empty std::vector returned by FEC cabling object!"
164  << " Check if database connection failed...";
165  edm::LogWarning(mlDqmSource_) << ss.str();
166  }
167 
168  // ---------- Reset ----------
169 
170  tasksExist_ = false;
172  cablingTask_ = false;
173 
174  remove();
175 
177  clearTasks();
178 }
static const char mlDqmSource_[]
#define LogTrace(id)
const std::vector< SiStripFecCrate > & crates() const
Log< level::Info, false > LogInfo
Contains cabling info at the device level, including DetId, APV pair numbers, hardware addresses...
DQMStore *const dqm(std::string method="") const
Log< level::Warning, false > LogWarning
FedsConstIterRange fedIds() const
edm::ESGetToken< SiStripFedCabling, SiStripFedCablingRcd > fedCablingToken_
#define LogDebug(id)

◆ clearCablingTasks()

void SiStripCommissioningSource::clearCablingTasks ( )
private

Definition at line 1050 of file SiStripCommissioningSource.cc.

References cablingTasks_.

Referenced by beginRun().

1050  {
1051  if (cablingTasks_.empty()) {
1052  return;
1053  }
1054  for (TaskMap::iterator itask = cablingTasks_.begin(); itask != cablingTasks_.end(); itask++) {
1055  if (itask->second) {
1056  delete itask->second;
1057  }
1058  }
1059  cablingTasks_.clear();
1060 }

◆ clearTasks()

void SiStripCommissioningSource::clearTasks ( )
private

Definition at line 1064 of file SiStripCommissioningSource.cc.

References tasks_.

Referenced by beginRun().

1064  {
1065  if (tasks_.empty()) {
1066  return;
1067  }
1068  VecOfVecOfTasks::iterator ifed = tasks_.begin();
1069  for (; ifed != tasks_.end(); ifed++) {
1070  VecOfTasks::iterator ichan = ifed->begin();
1071  for (; ichan != ifed->end(); ichan++) {
1072  if (*ichan) {
1073  delete *ichan;
1074  *ichan = 0;
1075  }
1076  }
1077  ifed->resize(96, nullptr);
1078  }
1079  tasks_.resize(1024);
1080 }

◆ createCablingTasks()

void SiStripCommissioningSource::createCablingTasks ( )
private

Definition at line 777 of file SiStripCommissioningSource.cc.

References base_, cablingTasks_, getInfo::conn, SiStripFecCabling::crates(), TauDecayModes::dec, DeadROC_duringRun::dir, dqm(), fecCabling_, sistrip::FED_CABLING, submitPVResolutionJobs::key, LogTrace, sistrip::mlDqmSource_, castor_dqm_sourceclient_file_cfg::path, SiStripEnumsAndStrings::runType(), dqm::implementation::DQMStore::setCurrentFolder(), contentValuesCheck::ss, AlCaHLTBitMon_QueryRunRegistry::string, task_, sistrip::UNDEFINED_RUN_TYPE, and sistrip::UNKNOWN_RUN_TYPE.

Referenced by createTask().

777  {
778  // Iterate through FEC cabling and create commissioning task objects
779  uint16_t booked = 0;
780  for (std::vector<SiStripFecCrate>::const_iterator icrate = fecCabling_->crates().begin();
781  icrate != fecCabling_->crates().end();
782  icrate++) {
783  for (std::vector<SiStripFec>::const_iterator ifec = icrate->fecs().begin(); ifec != icrate->fecs().end(); ifec++) {
784  for (std::vector<SiStripRing>::const_iterator iring = ifec->rings().begin(); iring != ifec->rings().end();
785  iring++) {
786  for (std::vector<SiStripCcu>::const_iterator iccu = iring->ccus().begin(); iccu != iring->ccus().end();
787  iccu++) {
788  for (std::vector<SiStripModule>::const_iterator imodule = iccu->modules().begin();
789  imodule != iccu->modules().end();
790  imodule++) {
791  // Build FEC key
793  icrate->fecCrate(), ifec->fecSlot(), iring->fecRing(), iccu->ccuAddr(), imodule->ccuChan());
794 
795  // Check if FEC key is invalid
796  if (!path.isValid()) {
797  continue;
798  }
799 
800  // Set working directory prior to booking histograms
801  std::string dir = base_ + path.path();
803 
804  // Iterate through all APV pairs for this module
805  for (uint16_t ipair = 0; ipair < imodule->nApvPairs(); ipair++) {
806  // Retrieve active APV devices
807  SiStripModule::PairOfU16 apvs = imodule->activeApvPair(imodule->lldChannel(ipair));
808 
809  // Create connection object to hold all relevant info
810  FedChannelConnection conn(icrate->fecCrate(),
811  ifec->fecSlot(),
812  iring->fecRing(),
813  iccu->ccuAddr(),
814  imodule->ccuChan(),
815  apvs.first,
816  apvs.second,
817  imodule->dcuId(),
818  imodule->detId(),
819  imodule->nApvPairs());
820 
821  // Define key encoding control path
822  uint32_t key = SiStripFecKey(icrate->fecCrate(),
823  ifec->fecSlot(),
824  iring->fecRing(),
825  iccu->ccuAddr(),
826  imodule->ccuChan(),
827  imodule->lldChannel(ipair))
828  .key();
829 
830  // Check key is non zero
831  if (!key) {
832  edm::LogWarning(mlDqmSource_) << "[SiStripCommissioningSource::" << __func__ << "]"
833  << " Unexpected NULL value for FEC key!";
834  continue;
835  }
836 
837  // Create cabling task objects if not already existing
838  if (cablingTasks_.find(key) == cablingTasks_.end()) {
839  if (task_ == sistrip::FED_CABLING) {
841  } else if (task_ == sistrip::UNDEFINED_RUN_TYPE) {
842  edm::LogWarning(mlDqmSource_) << "[SiStripCommissioningSource::" << __func__ << "]"
843  << " Undefined CommissioningTask"
844  << " Unable to create FedCablingTask object!";
845  } else if (task_ == sistrip::UNKNOWN_RUN_TYPE) {
846  edm::LogWarning(mlDqmSource_) << "[SiStripCommissioningSource::" << __func__ << "]"
847  << " Unknown CommissioningTask"
848  << " Unable to create FedCablingTask object!";
849  } else {
851  << "[SiStripCommissioningSource::" << __func__ << "]"
852  << " Unexpected CommissioningTask: " << SiStripEnumsAndStrings::runType(task_)
853  << " Unable to create FedCablingTask object!";
854  }
855 
856  // Check if key is found and, if so, book histos and set update freq
857  if (cablingTasks_.find(key) != cablingTasks_.end()) {
858  if (cablingTasks_[key]) {
859  cablingTasks_[key]->bookHistograms();
860  cablingTasks_[key]->updateFreq(1); //@@ hardwired to update every event!!!
861  booked++;
862  std::stringstream ss;
863  ss << "[SiStripCommissioningSource::" << __func__ << "]"
864  << " Booking histograms for '" << cablingTasks_[key]->myName() << "' object with key 0x"
865  << std::hex << std::setfill('0') << std::setw(8) << key << std::dec << " in directory \"" << dir
866  << "\"";
867  LogTrace(mlDqmSource_) << ss.str();
868  } else {
869  std::stringstream ss;
870  ss << "[SiStripCommissioningSource::" << __func__ << "]"
871  << " NULL pointer to CommissioningTask for key 0x" << std::hex << std::setfill('0')
872  << std::setw(8) << key << std::dec << " in directory " << dir << " Unable to book histograms!";
873  edm::LogWarning(mlDqmSource_) << ss.str();
874  }
875  } else {
876  std::stringstream ss;
877  ss << "[SiStripCommissioningSource::" << __func__ << "]"
878  << " Unable to find CommissioningTask for key 0x" << std::hex << std::setfill('0') << std::setw(8)
879  << key << std::dec << " in directory " << dir << " Unable to book histograms!";
880  edm::LogWarning(mlDqmSource_) << ss.str();
881  }
882 
883  } else {
884  std::stringstream ss;
885  ss << "[SiStripCommissioningSource::" << __func__ << "]"
886  << " CommissioningTask object already exists for key 0x" << std::hex << std::setfill('0')
887  << std::setw(8) << key << std::dec << " in directory " << dir
888  << " Unable to create FedCablingTask object!";
889  edm::LogWarning(mlDqmSource_) << ss.str();
890  }
891 
892  } // loop through apv pairs
893  } // loop through modules
894  } // loop through ccus
895  } // loop through rings
896  } // loop through fecs
897  } // loop through crates
898 
899  edm::LogVerbatim(mlDqmSource_) << "[SiStripCommissioningSource::" << __func__ << "]"
900  << " Created " << booked << " CommissioningTask objects and booked histograms";
901 }
Log< level::Info, true > LogVerbatim
void setCurrentFolder(std::string const &fullpath) override
Definition: DQMStore.h:656
static const char mlDqmSource_[]
#define LogTrace(id)
Utility class that identifies a position within the strip tracker control structure, down to the level of an APV25.
Definition: SiStripFecKey.h:45
static std::string runType(const sistrip::RunType &)
Class containning control, module, detector and connection information, at the level of a FED channel...
key
prepare the HTCondor submission files and eventually submit them
const std::vector< SiStripFecCrate > & crates() const
DQMStore *const dqm(std::string method="") const
conn
Definition: getInfo.py:9
Log< level::Warning, false > LogWarning
std::pair< uint16_t, uint16_t > PairOfU16
Definition: SiStripModule.h:40

◆ createRunNumber()

void SiStripCommissioningSource::createRunNumber ( )
private

Definition at line 680 of file SiStripCommissioningSource.cc.

References base_, dqm::implementation::IBooker::bookString(), dqm(), sistrip::mlDqmSource_, sistrip::root_, writedatasetfile::run, run_, sistrip::runNumber_, sistrip::sep_, dqm::implementation::DQMStore::setCurrentFolder(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by analyze().

680  {
681  // Set commissioning task to default ("undefined") value
682  if (!run_) {
683  edm::LogWarning(mlDqmSource_) << "[SiStripCommissioningSource::" << __func__ << "]"
684  << " NULL run number!";
685  return;
686  }
687 
688  // Create MonitorElement that identifies run number
690  std::stringstream run;
691  run << run_;
693 }
static const char runNumber_[]
void setCurrentFolder(std::string const &fullpath) override
Definition: DQMStore.h:656
static const char mlDqmSource_[]
MonitorElement * bookString(TString const &name, TString const &value, FUNC onbooking=NOOP())
Definition: DQMStore.h:87
static const char sep_[]
DQMStore *const dqm(std::string method="") const
static const char root_[]
Log< level::Warning, false > LogWarning

◆ createTask()

void SiStripCommissioningSource::createTask ( const SiStripEventSummary * const  summary,
const edm::EventSetup setup 
)
private

Definition at line 697 of file SiStripCommissioningSource.cc.

References base_, dqm::implementation::IBooker::bookString(), cablingTask_, createCablingTasks(), createTasks(), dqm(), sistrip::FED_CABLING, LogTrace, sistrip::mlDqmSource_, sistrip::root_, SiStripEnumsAndStrings::runType(), sistrip::sep_, dqm::implementation::DQMStore::setCurrentFolder(), singleTopDQM_cfi::setup, contentValuesCheck::ss, AlCaHLTBitMon_QueryRunRegistry::string, edmLumisInFiles::summary, task_, taskConfigurable_, sistrip::taskId_, tasksExist_, sistrip::UNDEFINED_RUN_TYPE, and sistrip::UNKNOWN_RUN_TYPE.

Referenced by analyze().

697  {
698  // Set commissioning task to default ("undefined") value
700 
701  // Retrieve commissioning task from EventSummary
702  if (summary) {
703  task_ = summary->runType();
704  std::stringstream ss;
705  ss << "[SiStripCommissioningSource::" << __func__ << "]"
706  << " Identified CommissioningTask from EventSummary to be \"" << SiStripEnumsAndStrings::runType(task_) << "\"";
707  LogTrace(mlDqmSource_) << ss.str();
708  } else {
710  std::stringstream ss;
711  ss << "[SiStripCommissioningSource::" << __func__ << "]"
712  << " NULL pointer to SiStripEventSummary!"
713  << " Check SiStripEventSummary is found/present in Event";
714  edm::LogWarning(mlDqmSource_) << ss.str();
715  }
716 
717  // Override task with ParameterSet configurable (if defined)
719  if (configurable != sistrip::UNDEFINED_RUN_TYPE && configurable != sistrip::UNKNOWN_RUN_TYPE) {
720  std::stringstream ss;
721  ss << "[SiStripCommissioningSource::" << __func__ << "]"
722  << " Overriding CommissioningTask from EventSummary (\"" << SiStripEnumsAndStrings::runType(task_)
723  << "\") with value retrieved from .cfg file (\"" << SiStripEnumsAndStrings::runType(configurable) << "\")!";
724  LogTrace(mlDqmSource_) << ss.str();
725  task_ = configurable;
726  }
727 
728  // Create ME (std::string) that identifies commissioning task
731  dqm()->bookString(std::string(sistrip::taskId_) + sistrip::sep_ + task_str, task_str);
732 
733  // Check commissioning task is known / defined
735  std::stringstream ss;
736  ss << "[SiStripCommissioningSource::" << __func__ << "]"
737  << " Unexpected CommissioningTask found (" << static_cast<uint16_t>(task_) << ") \""
739  << " Unexpected value found in SiStripEventSummary and/or cfg file"
740  << " If SiStripEventSummary is not present in Event,"
741  << " check 'CommissioningTask' configurable in cfg file";
742  edm::LogWarning(mlDqmSource_) << ss.str();
743  return;
744  } else {
745  std::stringstream ss;
746  ss << "[SiStripCommissioningSource::" << __func__ << "]"
747  << " Identified CommissioningTask to be \"" << SiStripEnumsAndStrings::runType(task_) << "\"";
748  LogTrace(mlDqmSource_) << ss.str();
749  }
750 
751  // Check if commissioning task is FED cabling
752  if (task_ == sistrip::FED_CABLING) {
753  cablingTask_ = true;
754  } else {
755  cablingTask_ = false;
756  }
757 
758  std::stringstream ss;
759  ss << "[SiStripCommissioningSource::" << __func__ << "]"
760  << " CommissioningTask: " << SiStripEnumsAndStrings::runType(summary->runType());
761  LogTrace(mlDqmSource_) << ss.str();
762 
763  edm::LogVerbatim(mlDqmSource_) << "[SiStripCommissioningSource::" << __func__ << "]"
764  << " Creating CommissioningTask objects and booking histograms...";
765  if (cablingTask_) {
767  } else {
769  }
770  edm::LogVerbatim(mlDqmSource_) << "[SiStripCommissioningSource::" << __func__ << "]"
771  << " Finished booking histograms!";
772  tasksExist_ = true;
773 }
Log< level::Info, true > LogVerbatim
void setCurrentFolder(std::string const &fullpath) override
Definition: DQMStore.h:656
static const char mlDqmSource_[]
void createTasks(sistrip::RunType, const edm::EventSetup &)
#define LogTrace(id)
MonitorElement * bookString(TString const &name, TString const &value, FUNC onbooking=NOOP())
Definition: DQMStore.h:87
static std::string runType(const sistrip::RunType &)
static const char sep_[]
static const char taskId_[]
DQMStore *const dqm(std::string method="") const
static const char root_[]
Log< level::Warning, false > LogWarning

◆ createTasks()

void SiStripCommissioningSource::createTasks ( sistrip::RunType  run_type,
const edm::EventSetup setup 
)
private

Definition at line 905 of file SiStripCommissioningSource.cc.

References sistrip::APV_LATENCY, sistrip::APV_TIMING, base_, sistrip::CALIBRATION, sistrip::CALIBRATION_DECO, sistrip::CALIBRATION_SCAN, sistrip::CALIBRATION_SCAN_DECO, sistrip::DAQ_SCOPE_MODE, TauDecayModes::dec, sistrip::detectorView_, DeadROC_duringRun::dir, sistrip::dir_, dqm(), sistrip::FAST_CABLING, SiStripFedKey::feChan(), sistrip::FED_TIMING, fedCabling_, SiStripFedCabling::fedConnections(), SiStripFedCabling::fedIds(), SiStripFedKey::feUnit(), filename_, sistrip::FINE_DELAY, sistrip::invalid_, sistrip::mlDqmSource_, sistrip::NOISE, noiseToken_, sistrip::OPTO_SCAN, or, parameters_, l1ctLayer1_patternWriters_cff::partition, sistrip::PEDESTALS, pedestalToken_, sistrip::PEDS_FULL_NOISE, sistrip::PEDS_ONLY, sistrip::root_, run_, dqm::implementation::DQMStore::setCurrentFolder(), singleTopDQM_cfi::setup, contentValuesCheck::ss, task_, tasks_, sistrip::UNDEFINED_RUN_TYPE, updateFreq_, view_, and sistrip::VPSP_SCAN.

Referenced by createTask().

905  {
906  uint16_t booked = 0;
907 
908  // latency has partition-level histos, so treat separately
909  if (task_ == sistrip::APV_LATENCY) {
910  for (uint16_t partition = 0; partition < 4; ++partition) {
911  // make a task for every partition; tracker-wide histo is shared
912  tasks_[0][partition] = new LatencyTask(
913  dqm(),
916  tasks_[0][partition]->eventSetup(&setup);
917  tasks_[0][partition]->bookHistograms();
918  tasks_[0][partition]->updateFreq(updateFreq_);
919  booked++;
920  }
921 
922  // fine-delay has 1 histo for the whole tracker, so treat separately
923  } else if (task_ == sistrip::FINE_DELAY) {
924  tasks_[0][0] = new FineDelayTask(dqm(), FedChannelConnection());
925  tasks_[0][0]->eventSetup(&setup);
926  tasks_[0][0]->bookHistograms();
927  tasks_[0][0]->updateFreq(updateFreq_);
928  booked++;
929 
930  } else { // now do any other task
931 
932  // Iterate through FED ids and channels
933  for (auto ifed = fedCabling_->fedIds().begin(); ifed != fedCabling_->fedIds().end(); ++ifed) {
934  // Iterate through connected FED channels
935  auto conns = fedCabling_->fedConnections(*ifed);
936  for (auto iconn = conns.begin(); iconn != conns.end(); ++iconn) {
937  // Create FEC key
938  SiStripFecKey fec_key(
939  iconn->fecCrate(), iconn->fecSlot(), iconn->fecRing(), iconn->ccuAddr(), iconn->ccuChan());
940  // Create FED key and check if non-zero
941  SiStripFedKey fed_key(
942  iconn->fedId(), SiStripFedKey::feUnit(iconn->fedCh()), SiStripFedKey::feChan(iconn->fedCh()));
943  if (!iconn->isConnected()) {
944  continue;
945  }
946 
947  // define the view in which to work and paths for histograms
948  // currently FecView (control view) and FedView (readout view)
949  // DetView (detector view) implementation has started
950  // Set working directory prior to booking histograms
951  std::stringstream dir;
952  dir << base_;
953  if (view_ == "Default") { // default
954  if (run_type == sistrip::FAST_CABLING) {
955  dir << fed_key.path(); // cabling in fed view
956  } else {
957  dir << fec_key.path(); // all other runs in control view
958  }
959  } else if (view_ == "FecView") {
960  dir << fec_key.path();
961  } else if (view_ == "FedView") {
962  dir << fed_key.path();
963  } else if (view_ == "DetView") {
964  // currently just by detid from the connection, which is empty...
966  } else {
967  edm::LogWarning(mlDqmSource_) << "[SiStripCommissioningSource::" << __func__ << "]"
968  << " Invalid view " << view_ << std::endl
969  << " Histograms will end up all in the top directory.";
970  } // end if view_ == ...
971  dqm()->setCurrentFolder(dir.str());
972 
973  // Create commissioning task objects
974  if (!tasks_[iconn->fedId()][iconn->fedCh()]) {
975  if (task_ == sistrip::FAST_CABLING) {
976  tasks_[iconn->fedId()][iconn->fedCh()] = new FastFedCablingTask(dqm(), *iconn);
977  } else if (task_ == sistrip::APV_TIMING) {
978  tasks_[iconn->fedId()][iconn->fedCh()] = new ApvTimingTask(dqm(), *iconn);
979  } else if (task_ == sistrip::FED_TIMING) {
980  tasks_[iconn->fedId()][iconn->fedCh()] = new FedTimingTask(dqm(), *iconn);
981  } else if (task_ == sistrip::OPTO_SCAN) {
982  tasks_[iconn->fedId()][iconn->fedCh()] = new OptoScanTask(dqm(), *iconn);
983  } else if (task_ == sistrip::VPSP_SCAN) {
984  tasks_[iconn->fedId()][iconn->fedCh()] = new VpspScanTask(dqm(), *iconn);
985  } else if (task_ == sistrip::PEDESTALS) {
986  tasks_[iconn->fedId()][iconn->fedCh()] = new PedestalsTask(dqm(), *iconn);
987  } else if (task_ == sistrip::PEDS_ONLY) {
988  tasks_[iconn->fedId()][iconn->fedCh()] = new PedsOnlyTask(dqm(), *iconn);
989  } else if (task_ == sistrip::NOISE) {
990  tasks_[iconn->fedId()][iconn->fedCh()] = new NoiseTask(dqm(), *iconn, pedestalToken_, noiseToken_);
991  } else if (task_ == sistrip::PEDS_FULL_NOISE) {
992  tasks_[iconn->fedId()][iconn->fedCh()] = new PedsFullNoiseTask(dqm(), *iconn, parameters_);
993  } else if (task_ == sistrip::DAQ_SCOPE_MODE) {
994  tasks_[iconn->fedId()][iconn->fedCh()] = new DaqScopeModeTask(dqm(), *iconn, parameters_);
996  tasks_[iconn->fedId()][iconn->fedCh()] =
997  new CalibrationScanTask(dqm(), *iconn, task_, filename_.c_str(), run_, setup.getData(pedestalToken_));
999  tasks_[iconn->fedId()][iconn->fedCh()] =
1000  new CalibrationTask(dqm(), *iconn, task_, filename_.c_str(), run_, setup.getData(pedestalToken_));
1001  } else if (task_ == sistrip::UNDEFINED_RUN_TYPE) {
1002  edm::LogWarning(mlDqmSource_) << "[SiStripCommissioningSource::" << __func__ << "]"
1003  << " Undefined CommissioningTask"
1004  << " Unable to create CommissioningTask object!";
1005  } else {
1006  edm::LogWarning(mlDqmSource_) << "[SiStripCommissioningSource::" << __func__ << "]"
1007  << " Unknown CommissioningTask"
1008  << " Unable to create CommissioningTask object!";
1009  }
1010 
1011  // Check if fed_key is found and, if so, book histos and set update freq
1012  if (tasks_[iconn->fedId()][iconn->fedCh()]) {
1013  tasks_[iconn->fedId()][iconn->fedCh()]->eventSetup(&setup);
1014 
1017  tasks_[iconn->fedId()][iconn->fedCh()]->bookHistograms();
1018  else {
1020  static_cast<CalibrationScanTask*>(tasks_[iconn->fedId()][iconn->fedCh()])->setCurrentFolder(dir.str());
1022  static_cast<CalibrationTask*>(tasks_[iconn->fedId()][iconn->fedCh()])->setCurrentFolder(dir.str());
1023  }
1024  tasks_[iconn->fedId()][iconn->fedCh()]->updateFreq(updateFreq_);
1025  booked++;
1026  } else {
1027  std::stringstream ss;
1028  ss << "[SiStripCommissioningSource::" << __func__ << "]"
1029  << " NULL pointer to CommissioningTask for key 0x" << std::hex << std::setfill('0') << std::setw(8)
1030  << fed_key.key() << std::dec << " in directory " << dir.str() << " Unable to book histograms!";
1031  edm::LogWarning(mlDqmSource_) << ss.str();
1032  }
1033  } else {
1034  std::stringstream ss;
1035  ss << "[SiStripCommissioningSource::" << __func__ << "]"
1036  << " CommissioningTask object already exists for key 0x" << std::hex << std::setfill('0') << std::setw(8)
1037  << fed_key.key() << std::dec << " in directory " << dir.str()
1038  << " Unable to create CommissioningTask object!";
1039  edm::LogWarning(mlDqmSource_) << ss.str();
1040  }
1041  } // loop over fed channels
1042  } // loop over feds
1043  } // end other tasks
1044  edm::LogVerbatim(mlDqmSource_) << "[SiStripCommissioningSource::" << __func__ << "]"
1045  << " Created " << booked << " CommissioningTask objects and booked histograms";
1046 }
Log< level::Info, true > LogVerbatim
const uint16_t & feChan() const
edm::ESGetToken< SiStripPedestals, SiStripPedestalsRcd > pedestalToken_
static const char dir_[]
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
void setCurrentFolder(std::string const &fullpath) override
Definition: DQMStore.h:656
static const char mlDqmSource_[]
static const char detectorView_[]
Utility class that identifies a position within the strip tracker control structure, down to the level of an APV25.
Definition: SiStripFecKey.h:45
Class containning control, module, detector and connection information, at the level of a FED channel...
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
static const uint16_t invalid_
Definition: Constants.h:16
DQMStore *const dqm(std::string method="") const
static const char root_[]
Log< level::Warning, false > LogWarning
FedsConstIterRange fedIds() const
ConnsConstIterRange fedConnections(uint16_t fed_id) const
edm::ESGetToken< SiStripNoises, SiStripNoisesRcd > noiseToken_

◆ directory()

void SiStripCommissioningSource::directory ( std::stringstream &  dir,
uint32_t  run_number = 0 
)
private

Definition at line 1090 of file SiStripCommissioningSource.cc.

References DeadROC_duringRun::dir, hcalSimParameters_cfi::he, contentValuesCheck::run_number, AlCaHLTBitMon_QueryRunRegistry::string, and createJobs::tmp.

Referenced by endJob().

1090  {
1091  // Get details about host
1092  char hn[256];
1093  gethostname(hn, sizeof(hn));
1094  struct hostent* he;
1095  he = gethostbyname(hn);
1096 
1097  // Extract host name and ip
1098  std::string host_name;
1099  std::string host_ip;
1100  if (he) {
1101  host_name = std::string(he->h_name);
1102  host_ip = std::string(inet_ntoa(*(struct in_addr*)(he->h_addr)));
1103  } else {
1104  host_name = "unknown.cern.ch";
1105  host_ip = "255.255.255.255";
1106  }
1107 
1108  // Reformat IP address
1110  std::stringstream ip;
1111  //for ( uint16_t ii = 0; ii < 4; ++ii ) {
1112  while (pos != std::string::npos) {
1113  std::string::size_type tmp = host_ip.find('.', pos);
1114  if (tmp != std::string::npos) {
1115  ip << std::setw(3) << std::setfill('0') << host_ip.substr(pos, tmp - pos) << ".";
1116  pos = tmp + 1; // skip the delimiter "."
1117  } else {
1118  ip << std::setw(3) << std::setfill('0') << host_ip.substr(pos);
1119  pos = std::string::npos;
1120  }
1121  }
1122 
1123  // Get pid
1124  pid_t pid = getpid();
1125 
1126  // Construct string
1127  if (run_number) {
1128  dir << std::setw(8) << std::setfill('0') << run_number << "_";
1129  }
1130  dir << ip.str() << "_" << std::setw(5) << std::setfill('0') << pid;
1131 }
uint16_t size_type
tmp
align.sh
Definition: createJobs.py:716

◆ dqm()

SiStripCommissioningSource::DQMStore *const SiStripCommissioningSource::dqm ( std::string  method = "") const
private

Definition at line 117 of file SiStripCommissioningSource.cc.

References dqm_, AlcaSiPixelAliHarvester0T_cff::method, sistrip::mlDqmSource_, and contentValuesCheck::ss.

Referenced by beginRun(), createCablingTasks(), createRunNumber(), createTask(), createTasks(), and endJob().

117  {
118  if (!dqm_) {
119  std::stringstream ss;
120  if (!method.empty()) {
121  ss << "[SiStripCommissioningSource::" << method << "]" << std::endl;
122  } else {
123  ss << "[SiStripCommissioningSource]" << std::endl;
124  }
125  ss << " NULL pointer to DQMStore";
126  edm::LogWarning(mlDqmSource_) << ss.str();
127  return nullptr;
128  } else {
129  return dqm_;
130  }
131 }
static const char mlDqmSource_[]
Log< level::Warning, false > LogWarning

◆ endJob()

void SiStripCommissioningSource::endJob ( void  )
overridevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 182 of file SiStripCommissioningSource.cc.

References sistrip::APV_LATENCY, cablingTasks_, sistrip::DAQ_SCOPE_MODE, DeadROC_duringRun::dir, directory(), dqm(), fecCabling_, fedCabling_, SiStripFedCabling::fedConnections(), SiStripFedCabling::fedIds(), filename_, sistrip::FINE_DELAY, LogTrace, sistrip::mlDqmSource_, Skims_PA_cff::name, l1ctLayer1_patternWriters_cff::partition, partitionName_, run_, dqm::implementation::DQMStore::save(), contentValuesCheck::ss, AlCaHLTBitMon_QueryRunRegistry::string, task_, and tasks_.

182  {
183  LogTrace(mlDqmSource_) << "[SiStripCommissioningSource::" << __func__ << "]"
184  << " Halting..." << std::endl;
185 
186  // ---------- Update histograms ----------
187  // Cabling task
188  for (TaskMap::iterator itask = cablingTasks_.begin(); itask != cablingTasks_.end(); itask++) {
189  if (itask->second) {
190  itask->second->updateHistograms();
191  }
192  }
193 
194  if (task_ == sistrip::APV_LATENCY) {
195  for (uint16_t partition = 0; partition < 4; ++partition) {
196  tasks_[0][partition]->updateHistograms();
197  }
198  } else if (task_ == sistrip::FINE_DELAY) {
199  tasks_[0][0]->updateHistograms();
200  } else {
201  // All tasks except cabling
202  uint16_t fed_id = 0;
203  uint16_t fed_ch = 0;
204  auto ifed = fedCabling_->fedIds().begin();
205  for (; ifed != fedCabling_->fedIds().end(); ifed++) {
206  auto conns = fedCabling_->fedConnections(*ifed);
207  for (auto iconn = conns.begin(); iconn != conns.end(); iconn++) {
208  if (!iconn->isConnected()) {
209  continue;
210  }
211  fed_id = iconn->fedId();
212  fed_ch = iconn->fedCh();
213  if (tasks_[fed_id][fed_ch]) {
214  tasks_[fed_id][fed_ch]->updateHistograms();
215  delete tasks_[fed_id][fed_ch];
216  }
217  }
218  }
219  }
220  // ---------- Save histos to root file ----------
221 
222  // Strip filename of ".root" extension
224  if (filename_.find(".root", 0) == std::string::npos) {
225  name = filename_;
226  } else {
227  name = filename_.substr(0, filename_.find(".root", 0));
228  }
229 
230  // Retrieve SCRATCH directory
231  std::string scratch = "SCRATCH"; //@@ remove trailing slash!!!
232  std::string dir = "";
233  if (std::getenv(scratch.c_str()) != nullptr) {
234  dir = std::getenv(scratch.c_str());
235  }
236 
237  // Add directory path
238  std::stringstream ss;
239  if (!dir.empty()) {
240  ss << dir << "/";
241  } else {
242  ss << "/tmp/";
243  }
244 
245  // Add filename with run number, host ip, pid and .root extension
246  ss << name << "_";
247  if (task_ == sistrip::DAQ_SCOPE_MODE and not partitionName_.empty()) // only for spy-runs
248  ss << partitionName_ << "_";
249 
250  directory(ss, run_);
251  ss << ".root";
252 
253  // Save file with appropriate filename (if run number is known)
254  if (!filename_.empty()) {
255  if (run_ != 0) {
256  dqm()->save(ss.str());
257  } else {
258  edm::LogWarning(mlDqmSource_) << "[SiStripCommissioningSource::" << __func__ << "]"
259  << " NULL value for RunNumber! No root file saved!";
260  }
261  } else {
262  edm::LogWarning(mlDqmSource_) << "[SiStripCommissioningSource::" << __func__ << "]"
263  << " NULL value for filename! No root file saved!";
264  }
265 
266  LogTrace(mlDqmSource_) << "[SiStripCommissioningSource::" << __func__ << "]"
267  << " Saved all histograms to file \"" << ss.str() << "\"";
268 
269  // ---------- Delete histograms ----------
270  // Remove all MonitorElements in "SiStrip" dir and below
271  // remove();
272 
273  // Delete histogram objects
274  // clearCablingTasks();
275  // clearTasks();
276 
277  // ---------- Delete cabling ----------
278  if (fedCabling_) {
279  fedCabling_ = nullptr;
280  }
281  if (fecCabling_) {
282  delete fecCabling_;
283  fecCabling_ = nullptr;
284  }
285 }
static const char mlDqmSource_[]
#define LogTrace(id)
void directory(std::stringstream &, uint32_t run_number=0)
DQM_DEPRECATED void save(std::string const &filename, std::string const &path="")
Definition: DQMStore.cc:824
DQMStore *const dqm(std::string method="") const
Log< level::Warning, false > LogWarning
FedsConstIterRange fedIds() const
ConnsConstIterRange fedConnections(uint16_t fed_id) const

◆ endRun()

void SiStripCommissioningSource::endRun ( edm::Run const &  ,
const edm::EventSetup  
)
inlineoverride

Definition at line 51 of file SiStripCommissioningSource.h.

51 {}

◆ fillCablingHistos()

void SiStripCommissioningSource::fillCablingHistos ( const SiStripEventSummary * const  summary,
const edm::DetSetVector< SiStripRawDigi > &  raw 
)
private

Definition at line 418 of file SiStripCommissioningSource.cc.

References PDRates::average, cablingTasks_, sistrip::CCU_CHAN, ewkTauDQM_cfi::channels, TauDecayModes::dec, edm::DetSetVector< T >::end(), fecCabling_, fedCabling_, SiStripFedCabling::fedIds(), edm::DetSetVector< T >::find(), cuy::ii, sistrip::invalid_, findQualityFiles::jj, SiStripKey::key(), LogTrace, sistrip::mlDqmSource_, sistrip::mlTest_, SiStripFecCabling::module(), submitPVValidationJobs::params, castor_dqm_sourceclient_file_cfg::path, contentValuesCheck::ss, edmLumisInFiles::summary, and createJobs::tmp.

Referenced by analyze().

419  {
420  // Create FEC key using DCU id and LLD channel from SiStripEventSummary
421  const SiStripModule& module = fecCabling_->module(summary->dcuId());
422  uint16_t lld_channel = (summary->deviceId() & 0x3) + 1;
423  SiStripFecKey key_object(module.key().fecCrate(),
424  module.key().fecSlot(),
425  module.key().fecRing(),
426  module.key().ccuAddr(),
427  module.key().ccuChan(),
428  lld_channel);
429  uint32_t fec_key = key_object.key();
430  std::stringstream sss;
431  sss << "[SiStripCommissioningSource::" << __func__ << "]"
432  << " Found DcuId 0x" << std::hex << std::setw(8) << std::setfill('0') << summary->dcuId() << std::dec
433  << " with Crate/FEC/Ring/CCU/Module/LLD: " << module.key().fecCrate() << "/" << module.key().fecSlot() << "/"
434  << module.key().fecRing() << "/" << module.key().ccuAddr() << "/" << module.key().ccuChan() << "/" << lld_channel;
435  edm::LogWarning(mlDqmSource_) << sss.str();
436 
437  //LogTrace(mlTest_) << "TEST : " << key_object;
438 
439  // Check on whether DCU id is found
440  if (key_object.isInvalid(sistrip::CCU_CHAN)) {
441  std::stringstream ss;
442  ss << "[SiStripCommissioningSource::" << __func__ << "]"
443  << " DcuId 0x" << std::hex << std::setw(8) << std::setfill('0') << summary->dcuId() << std::dec
444  << " in 'DAQ register' field not found in cabling map!"
445  << " (NULL values returned for FEC path)";
446  edm::LogWarning(mlDqmSource_) << ss.str();
447  return;
448  }
449 
450  // Iterate through FED ids
451  for (auto ifed = fedCabling_->fedIds().begin(); ifed != fedCabling_->fedIds().end(); ifed++) {
452  // Check if FedId is non-zero
453  if (*ifed == sistrip::invalid_) {
454  continue;
455  }
456 
457  // Container to hold median signal level for FED cabling task
458  std::map<uint16_t, float> medians;
459  medians.clear();
460  std::map<uint16_t, float> medians1;
461  medians1.clear();
462 
463  // Iterate through FED channels
464  for (uint16_t ichan = 0; ichan < 96; ichan++) {
465  // Retrieve digis for given FED key
466  uint32_t fed_key = ((*ifed & sistrip::invalid_) << 16) | (ichan & sistrip::invalid_);
467 
468  std::vector<edm::DetSet<SiStripRawDigi> >::const_iterator digis = raw.find(fed_key);
469  if (digis != raw.end()) {
470  if (digis->data.empty()) {
471  continue;
472  }
473 
474  Averages ave;
475  for (uint16_t idigi = 0; idigi < digis->data.size(); idigi++) {
476  ave.add(static_cast<uint32_t>(digis->data[idigi].adc()));
477  }
479  ave.calc(params);
480  medians[ichan] = params.median_; // Store median signal level
481  medians1[ichan] = digis->data[0].adc();
482  }
483 
484  } // fed channel loop
485 
486  // Calculate mean and spread on all (median) signal levels
487  Averages average;
488  std::map<uint16_t, float>::const_iterator ii = medians.begin();
489  for (; ii != medians.end(); ii++) {
490  average.add(ii->second);
491  }
493  average.calc(tmp);
494 
495  std::stringstream ss;
496  ss << "FED Averages:" << std::endl
497  << " nChans: " << medians.size() << std::endl
498  << " num/mean/median/rms/max/min: " << tmp.num_ << "/" << tmp.mean_ << "/" << tmp.median_ << "/" << tmp.rms_
499  << "/" << tmp.max_ << "/" << tmp.min_ << std::endl;
500  LogTrace(mlDqmSource_) << ss.str();
501 
502  // Calculate mean and spread on "filtered" data
503  Averages truncated;
504  std::map<uint16_t, float>::const_iterator jj = medians.begin();
505  for (; jj != medians.end(); jj++) {
506  if (jj->second < tmp.median_ + tmp.rms_) {
507  truncated.add(jj->second);
508  }
509  }
511  truncated.calc(params);
512 
513  std::stringstream ss1;
514  ss1 << "Truncated Averages:" << std::endl
515  << " nChans: " << medians.size() << std::endl
516  << " num/mean/median/rms/max/min: " << params.num_ << "/" << params.mean_ << "/" << params.median_ << "/"
517  << params.rms_ << "/" << params.max_ << "/" << params.min_ << std::endl;
518  LogTrace(mlDqmSource_) << ss1.str();
519 
520  // Identify channels with signal
521  std::stringstream ss2;
522  std::stringstream ss3;
523  std::map<uint16_t, float> channels;
524  std::map<uint16_t, float>::const_iterator ichan = medians.begin();
525  for (; ichan != medians.end(); ichan++) {
526  if (ichan->second > 200.) {
527  LogTrace(mlTest_) << "TEST FOUND SIGNAL HIGH: " << *ifed << " " << ichan->first << " " << ichan->second;
528  channels[ichan->first] = ichan->second;
529  }
530  ss2 //<< ichan->first << "/"
531  << ichan->second << " ";
532  ss3 //<< ichan->first << "/"
533  << medians1[ichan->first] << " ";
534  }
535 
536  ss2 << std::endl;
537  ss3 << std::endl;
538  LogTrace(mlTest_) << "DUMP for FED " << *ifed << ": " << ss2.str();
539  LogTrace(mlTest_) << "FIRST ADC VAL " << *ifed << ": " << ss3.str();
540 
541  // Fill cabling histograms
542  if (cablingTasks_.find(fec_key) != cablingTasks_.end()) {
543  if (!channels.empty()) {
544  cablingTasks_[fec_key]->fillHistograms(*summary, *ifed, channels);
545  SiStripFecKey path(fec_key);
546  std::stringstream ss;
547  ss << "[SiStripCommissioningSource::" << __func__ << "]"
548  << " Filled histogram for '" << cablingTasks_[fec_key]->myName() << "' object with FecKey: 0x" << std::hex
549  << std::setfill('0') << std::setw(8) << fec_key << std::dec
550  << " and Crate/FEC/ring/CCU/module/LLDchan: " << path.fecCrate() << "/" << path.fecSlot() << "/"
551  << path.fecRing() << "/" << path.ccuAddr() << "/" << path.ccuChan() << "/" << path.channel();
552  LogTrace(mlDqmSource_) << ss.str();
553  }
554  } else {
555  SiStripFecKey path(fec_key);
556  std::stringstream ss;
557  ss << "[SiStripCommissioningSource::" << __func__ << "]"
558  << " Unable to find CommissioningTask object with FecKey: 0x" << std::hex << std::setfill('0') << std::setw(8)
559  << fec_key << std::dec << " and Crate/FEC/ring/CCU/module/LLDchan: " << path.fecCrate() << "/"
560  << path.fecSlot() << "/" << path.fecRing() << "/" << path.ccuAddr() << "/" << path.ccuChan() << "/"
561  << path.channel();
562  edm::LogWarning(mlDqmSource_) << ss.str();
563  }
564 
565  } // fed id loop
566 }
Device and connection information at the level of a front-end module.
Definition: SiStripModule.h:24
iterator find(det_id_type id)
Definition: DetSetVector.h:255
const SiStripModule & module(const FedChannelConnection &conn) const
static const char mlDqmSource_[]
#define LogTrace(id)
Utility class that identifies a position within the strip tracker control structure, down to the level of an APV25.
Definition: SiStripFecKey.h:45
const uint32_t & key() const
Definition: SiStripKey.h:120
static const char mlTest_[]
iterator end()
Return the off-the-end iterator.
Definition: DetSetVector.h:316
ii
Definition: cuy.py:589
static const uint16_t invalid_
Definition: Constants.h:16
Log< level::Warning, false > LogWarning
tmp
align.sh
Definition: createJobs.py:716
FedsConstIterRange fedIds() const

◆ fillHistos()

void SiStripCommissioningSource::fillHistos ( const SiStripEventSummary * const  summary,
const edm::DetSetVector< SiStripRawDigi > &  raw,
const edm::DetSetVector< SiStripRawDigi > &  rawAlt = edm::DetSetVector<SiStripRawDigi>(),
const edmNew::DetSetVector< SiStripCluster > &  clusters = edmNew::DetSetVector<SiStripCluster>() 
)
private

Definition at line 570 of file SiStripCommissioningSource.cc.

References sistrip::APV_LATENCY, bsc_activity_cfg::clusters, TauDecayModes::dec, edm::DetSetVector< T >::empty(), edm::DetSetVector< T >::end(), fedCabling_, SiStripFedCabling::fedConnections(), SiStripFedCabling::fedIds(), edm::DetSetVector< T >::find(), sistrip::FINE_DELAY, sistrip::invalid_, sistrip::mlDqmSource_, or, contentValuesCheck::ss, edmLumisInFiles::summary, task_, tasks_, and sistrip::valid_.

Referenced by analyze().

573  {
574  // Iterate through FED ids and channels
575  std::vector<uint16_t> stripOnClusters;
576  auto ifed = fedCabling_->fedIds().begin();
577  for (; ifed != fedCabling_->fedIds().end(); ifed++) {
578  // Iterate through connected FED channels
579  auto conns = fedCabling_->fedConnections(*ifed);
580  for (auto iconn = conns.begin(); iconn != conns.end(); iconn++) {
581  if (!(iconn->fedId()) || iconn->fedId() > sistrip::valid_) {
582  continue;
583  }
584  if (!iconn->isConnected()) {
585  continue;
586  }
587 
588  // Create FED key and check if non-zero
589  // note: the key is not computed using the same formula as in commissioning histograms.
590  // beware that changes here must match changes in raw2digi and in SiStripFineDelayHit
591  uint32_t fed_key = ((iconn->fedId() & sistrip::invalid_) << 16) | (iconn->fedCh() & sistrip::invalid_);
592  // Retrieve digis for given FED key and check if found
593  std::vector<edm::DetSet<SiStripRawDigi> >::const_iterator digis = raw.find(fed_key);
594 
595  // only for spy data-taking --> tick measurement
596  std::vector<edm::DetSet<SiStripRawDigi> >::const_iterator digisAlt;
597  if (not rawAlt.empty()) {
598  digisAlt = rawAlt.find(fed_key);
599  if (digisAlt == rawAlt.end())
600  continue;
601  }
602 
603  // find the strips belonging to the clusters connected to this APV pair
604  stripOnClusters.clear();
605  if (not clusters.empty()) {
606  for (edmNew::DetSetVector<SiStripCluster>::const_iterator DSViter = clusters.begin(); DSViter != clusters.end();
607  DSViter++) {
608  if (DSViter->id() != iconn->detId())
609  continue; // select clusters on this module
610  for (edmNew::DetSet<SiStripCluster>::const_iterator DSiter = DSViter->begin(); DSiter != DSViter->end();
611  DSiter++) { // loop on the clusters
612  if (DSiter->firstStrip() >= iconn->apvPairNumber() * 256 and
613  DSiter->firstStrip() < (1 + iconn->apvPairNumber()) * 256) { // found the right APV
614  for (size_t istrip = 0; istrip < DSiter->amplitudes().size(); istrip++) {
615  stripOnClusters.push_back(DSiter->firstStrip() + istrip - iconn->apvPairNumber() * 256);
616  }
617  }
618  }
619  }
620  }
621 
622  if (digis != raw.end()) {
623  // tasks involving tracking have partition-level histos, so treat separately
624  if (task_ == sistrip::APV_LATENCY) {
625  if (tasks_[0][iconn->fecCrate() - 1]) {
626  tasks_[0][iconn->fecCrate() - 1]->fillHistograms(*summary, *digis);
627  } else {
628  std::stringstream ss;
629  ss << "[SiStripCommissioningSource::" << __func__ << "]"
630  << " Unable to find CommissioningTask for FEC crate " << iconn->fecCrate()
631  << ". Unable to fill histograms!";
632  edm::LogWarning(mlDqmSource_) << ss.str();
633  }
634  } else if (task_ == sistrip::FINE_DELAY) {
635  if (tasks_[0][0]) {
636  tasks_[0][0]->fillHistograms(*summary, *digis);
637  } else {
638  std::stringstream ss;
639  ss << "[SiStripCommissioningSource::" << __func__ << "]"
640  << " Unable to find global CommissioningTask for FineDelay. Unable to fill histograms!";
641  edm::LogWarning(mlDqmSource_) << ss.str();
642  }
643  } else {
644  if (tasks_[iconn->fedId()][iconn->fedCh()]) {
645  if (not rawAlt.empty() or digisAlt == rawAlt.end())
646  tasks_[iconn->fedId()][iconn->fedCh()]->fillHistograms(*summary, *digis);
647  else { // for spy-data
648  if (stripOnClusters.empty())
649  tasks_[iconn->fedId()][iconn->fedCh()]->fillHistograms(*summary, *digis, *digisAlt);
650  else {
651  tasks_[iconn->fedId()][iconn->fedCh()]->fillHistograms(*summary, *digis, *digisAlt, stripOnClusters);
652  }
653  }
654  } else {
655  std::stringstream ss;
656  ss << "[SiStripCommissioningSource::" << __func__ << "]"
657  << " Unable to find CommissioningTask object with FED key " << std::hex << std::setfill('0')
658  << std::setw(8) << fed_key << std::dec << " and FED id/ch " << iconn->fedId() << "/" << iconn->fedCh()
659  << " Unable to fill histograms!";
660  edm::LogWarning(mlDqmSource_) << ss.str();
661  }
662  }
663  } else {
664  // issue a warning only for standard runs, as latency and fine delay only deliver
665  // pseudo zero-suppressed data
667  std::stringstream ss;
668  ss << "[SiStripCommissioningSource::" << __func__ << "]"
669  << " Unable to find any DetSet containing digis for FED key " << std::hex << std::setfill('0')
670  << std::setw(8) << fed_key << std::dec << " and FED id/ch " << iconn->fedId() << "/" << iconn->fedCh();
671  edm::LogWarning(mlDqmSource_) << ss.str();
672  }
673  }
674  } // fed channel loop
675  } // fed id loop
676 }
iterator find(det_id_type id)
Definition: DetSetVector.h:255
static const char mlDqmSource_[]
data_type const * const_iterator
Definition: DetSetNew.h:31
bool empty() const
Return true if we contain no DetSets.
Definition: DetSetVector.h:245
static const uint16_t valid_
Definition: Constants.h:17
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
iterator end()
Return the off-the-end iterator.
Definition: DetSetVector.h:316
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
static const uint16_t invalid_
Definition: Constants.h:16
Log< level::Warning, false > LogWarning
FedsConstIterRange fedIds() const
ConnsConstIterRange fedConnections(uint16_t fed_id) const

◆ remove()

void SiStripCommissioningSource::remove ( )
private

Definition at line 1084 of file SiStripCommissioningSource.cc.

1084  {
1085  // TODO: remove no longer supported in DQMStore.
1086 }

Member Data Documentation

◆ base_

std::string SiStripCommissioningSource::base_
private

◆ cablingTask_

bool SiStripCommissioningSource::cablingTask_
private

Flag to indicate whether task is FED cabling or not.

Definition at line 154 of file SiStripCommissioningSource.h.

Referenced by analyze(), beginRun(), and createTask().

◆ cablingTasks_

TaskMap SiStripCommissioningSource::cablingTasks_
private

Map of cabling task objects (indexed using FEC key).

Definition at line 148 of file SiStripCommissioningSource.h.

Referenced by clearCablingTasks(), createCablingTasks(), endJob(), and fillCablingHistos().

◆ clustersToken_

edm::EDGetTokenT<edmNew::DetSetVector<SiStripCluster> > SiStripCommissioningSource::clustersToken_
private

Definition at line 113 of file SiStripCommissioningSource.h.

Referenced by analyze(), and SiStripCommissioningSource().

◆ digiFineDelaySelectionToken_

edm::EDGetTokenT<edm::DetSetVector<SiStripRawDigi> > SiStripCommissioningSource::digiFineDelaySelectionToken_
private

Definition at line 112 of file SiStripCommissioningSource.h.

Referenced by analyze(), and SiStripCommissioningSource().

◆ digiReorderedToken_

edm::EDGetTokenT<edm::DetSetVector<SiStripRawDigi> > SiStripCommissioningSource::digiReorderedToken_
private

Definition at line 110 of file SiStripCommissioningSource.h.

Referenced by analyze(), and SiStripCommissioningSource().

◆ digiScopeModeToken_

edm::EDGetTokenT<edm::DetSetVector<SiStripRawDigi> > SiStripCommissioningSource::digiScopeModeToken_
private

Definition at line 111 of file SiStripCommissioningSource.h.

Referenced by analyze(), and SiStripCommissioningSource().

◆ digiVirginRawToken_

edm::EDGetTokenT<edm::DetSetVector<SiStripRawDigi> > SiStripCommissioningSource::digiVirginRawToken_
private

Definition at line 109 of file SiStripCommissioningSource.h.

Referenced by analyze(), and SiStripCommissioningSource().

◆ dqm_

DQMStore* SiStripCommissioningSource::dqm_
private

Interface to Data Quality Monitoring framework.

Definition at line 98 of file SiStripCommissioningSource.h.

Referenced by beginRun(), and dqm().

◆ fecCabling_

SiStripFecCabling* SiStripCommissioningSource::fecCabling_
private

◆ fedCabling_

SiStripFedCabling* SiStripCommissioningSource::fedCabling_
private

◆ fedCablingToken_

edm::ESGetToken<SiStripFedCabling, SiStripFedCablingRcd> SiStripCommissioningSource::fedCablingToken_
private

Definition at line 101 of file SiStripCommissioningSource.h.

Referenced by beginRun().

◆ filename_

std::string SiStripCommissioningSource::filename_
private

Filename of output root file containing source histos.

Definition at line 122 of file SiStripCommissioningSource.h.

Referenced by createTasks(), and endJob().

◆ inputClusterLabel_

std::string SiStripCommissioningSource::inputClusterLabel_
private

Definition at line 119 of file SiStripCommissioningSource.h.

Referenced by analyze(), and SiStripCommissioningSource().

◆ inputModuleLabel_

std::string SiStripCommissioningSource::inputModuleLabel_
private

Name of digi input module.

Definition at line 116 of file SiStripCommissioningSource.h.

Referenced by SiStripCommissioningSource().

◆ inputModuleLabelAlt_

std::string SiStripCommissioningSource::inputModuleLabelAlt_
private

Definition at line 117 of file SiStripCommissioningSource.h.

Referenced by analyze(), and SiStripCommissioningSource().

◆ inputModuleLabelSummary_

std::string SiStripCommissioningSource::inputModuleLabelSummary_
private

Definition at line 118 of file SiStripCommissioningSource.h.

Referenced by SiStripCommissioningSource().

◆ inputModuleSummaryToken_

edm::EDGetTokenT<SiStripEventSummary> SiStripCommissioningSource::inputModuleSummaryToken_
private

Definition at line 108 of file SiStripCommissioningSource.h.

Referenced by analyze(), and SiStripCommissioningSource().

◆ isSpy_

bool SiStripCommissioningSource::isSpy_
private

Is this a spy run ?

Definition at line 134 of file SiStripCommissioningSource.h.

Referenced by analyze(), and SiStripCommissioningSource().

◆ noiseToken_

edm::ESGetToken<SiStripNoises, SiStripNoisesRcd> SiStripCommissioningSource::noiseToken_
private

Definition at line 169 of file SiStripCommissioningSource.h.

Referenced by createTasks(), and SiStripCommissioningSource().

◆ parameters_

edm::ParameterSet SiStripCommissioningSource::parameters_
private

◆ partitionName_

std::string SiStripCommissioningSource::partitionName_
private

Partition name used for root files in spy

Definition at line 128 of file SiStripCommissioningSource.h.

Referenced by endJob().

◆ pedestalToken_

edm::ESGetToken<SiStripPedestals, SiStripPedestalsRcd> SiStripCommissioningSource::pedestalToken_
private

Definition at line 168 of file SiStripCommissioningSource.h.

Referenced by createTasks(), and SiStripCommissioningSource().

◆ run_

uint32_t SiStripCommissioningSource::run_
private

Run number used for naming of root file.

Definition at line 125 of file SiStripCommissioningSource.h.

Referenced by analyze(), createRunNumber(), createTasks(), and endJob().

◆ task_

sistrip::RunType SiStripCommissioningSource::task_
private

Identifies commissioning task.

Definition at line 142 of file SiStripCommissioningSource.h.

Referenced by analyze(), beginRun(), createCablingTasks(), createTask(), createTasks(), endJob(), fillHistos(), and SiStripCommissioningSource().

◆ taskConfigurable_

std::string SiStripCommissioningSource::taskConfigurable_
private

Identifies commissioning task read from cfg file.

Definition at line 139 of file SiStripCommissioningSource.h.

Referenced by createTask().

◆ tasks_

VecOfVecOfTasks SiStripCommissioningSource::tasks_
private

Vector of vector of task objects (indexed using FED id.ch.

Definition at line 145 of file SiStripCommissioningSource.h.

Referenced by analyze(), clearTasks(), createTasks(), endJob(), fillHistos(), and SiStripCommissioningSource().

◆ tasksExist_

bool SiStripCommissioningSource::tasksExist_
private

Flag to indicate whether histo objects exist or not.

Definition at line 151 of file SiStripCommissioningSource.h.

Referenced by analyze(), beginRun(), and createTask().

◆ time_

int32_t SiStripCommissioningSource::time_
private

Record of time used to calculate event rate.

Definition at line 131 of file SiStripCommissioningSource.h.

Referenced by analyze().

◆ updateFreq_

int SiStripCommissioningSource::updateFreq_
private

Update frequency for histograms (ignored for cabling).

Definition at line 157 of file SiStripCommissioningSource.h.

Referenced by analyze(), and createTasks().

◆ view_

std::string SiStripCommissioningSource::view_
private

flag for choosing the organizational 'view' the DQM histogram tree

Definition at line 163 of file SiStripCommissioningSource.h.

Referenced by createTasks().