CMS 3D CMS Logo

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  const FedChannelConnection& conn ) :
13  CommissioningTask( dqm, conn, "ApvTimingTask" ),
14  timing_(),
15  nSamples_(40),
16  nFineDelays_(24),
17  nBins_(40)
18 {}
19 
20 // -----------------------------------------------------------------------------
21 //
23 }
24 
25 // -----------------------------------------------------------------------------
26 //
28 
29  uint16_t nbins = 24 * nBins_;
30 
34  fedKey(),
36  connection().lldChannel() ).title();
37 
38  timing_.histo( dqm()->bookProfile( title, title,
39  nbins, -0.5, nBins_*25.-0.5,
40  1025, 0., 1025. ) );
41 
42  timing_.vNumOfEntries_.resize(nbins,0);
43  timing_.vSumOfContents_.resize(nbins,0);
44  timing_.vSumOfSquares_.resize(nbins,0);
45 
46 }
47 
48 // -----------------------------------------------------------------------------
49 //
50 /*
51  Some notes:
52  - use all samples
53  - extract number of samples from trigger fed
54  - need to book histos in event loop?
55  - why only use fine skew setting when filling histos? should use coarse setting as well?
56  - why do different settings every 100 events - change more freq?
57 */
59  const edm::DetSet<SiStripRawDigi>& digis ) {
60 
61  if ( digis.data.size() < nBins_ ) { //@@ check scope mode length?
63  << "[ApvTimingTask::" << __func__ << "]"
64  << " Unexpected number of digis! "
65  << digis.data.size();
66  return;
67  }
68 
69  uint32_t pll_fine = summary.pllFine();
70  for ( uint16_t coarse = 0; coarse < nBins_/*digis.data.size()*/; coarse++ ) {
71  uint16_t fine = (coarse+1)*24 - (pll_fine+1);
72  updateHistoSet( timing_, fine, digis.data[coarse].adc() );
73  }
74 
75 }
76 
77 // -----------------------------------------------------------------------------
78 //
81 }
82 
83 
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
sistrip classes
void updateHistoSet(HistoSet &, const uint32_t &bin, const float &value)
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:27
DQMStore *const dqm() const
void book() override
void fill(const SiStripEventSummary &, const edm::DetSet< SiStripRawDigi > &) override
collection_type data
Definition: DetSet.h:80
HistoSet timing_
Definition: ApvTimingTask.h:23
void histo(MonitorElement *)
const uint32_t & fedKey() const
std::vector< double > vSumOfSquares_
const FedChannelConnection & connection() const
~ApvTimingTask() override