CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ApvTimingTask.cc
Go to the documentation of this file.
6 
7 using namespace sistrip;
8 
9 // -----------------------------------------------------------------------------
10 //@@ nBins_ should be number of scope mode samples from trigger fed data???
12  : CommissioningTask(dqm, conn, "ApvTimingTask"), timing_(), nSamples_(40), nFineDelays_(24), nBins_(40) {}
13 
14 // -----------------------------------------------------------------------------
15 //
17 
18 // -----------------------------------------------------------------------------
19 //
21  uint16_t nbins = 24 * nBins_;
22 
26  fedKey(),
28  connection().lldChannel())
29  .title();
30 
31  timing_.histo(dqm()->bookProfile(title, title, nbins, -0.5, nBins_ * 25. - 0.5, 1025, 0., 1025.));
32 
33  timing_.vNumOfEntries_.resize(nbins, 0);
34  timing_.vSumOfContents_.resize(nbins, 0);
35  timing_.vSumOfSquares_.resize(nbins, 0);
36 }
37 
38 // -----------------------------------------------------------------------------
39 //
40 /*
41  Some notes:
42  - use all samples
43  - extract number of samples from trigger fed
44  - need to book histos in event loop?
45  - why only use fine skew setting when filling histos? should use coarse setting as well?
46  - why do different settings every 100 events - change more freq?
47 */
49  if (digis.data.size() < nBins_) { //@@ check scope mode length?
50  edm::LogWarning(mlDqmSource_) << "[ApvTimingTask::" << __func__ << "]"
51  << " Unexpected number of digis! " << digis.data.size();
52  return;
53  }
54 
55  uint32_t pll_fine = summary.pllFine();
56  for (uint16_t coarse = 0; coarse < nBins_ /*digis.data.size()*/; coarse++) {
57  uint16_t fine = (coarse + 1) * 24 - (pll_fine + 1);
58  updateHistoSet(timing_, fine, digis.data[coarse].adc());
59  }
60 }
61 
62 // -----------------------------------------------------------------------------
63 //
std::vector< float > vNumOfEntries_
Utility class that holds histogram title.
const std::string & title() const
static const char mlDqmSource_[]
void update() override
std::vector< float > vSumOfContents_
const uint32_t & pllFine() const
void updateHistoSet(HistoSet &, const uint32_t &bin, const float &value)
DQMStore *const dqm() const
Class containning control, module, detector and connection information, at the level of a FED channel...
ApvTimingTask(DQMStore *, const FedChannelConnection &)
uint16_t nBins_
Definition: ApvTimingTask.h:23
void book() override
void fill(const SiStripEventSummary &, const edm::DetSet< SiStripRawDigi > &) override
collection_type data
Definition: DetSet.h:80
HistoSet timing_
Definition: ApvTimingTask.h:19
void histo(MonitorElement *)
tuple conn
Definition: getInfo.py:9
const uint32_t & fedKey() const
std::vector< double > vSumOfSquares_
const FedChannelConnection & connection() const
Log< level::Warning, false > LogWarning
~ApvTimingTask() override