CMS 3D CMS Logo

DaqScopeModeTask.cc
Go to the documentation of this file.
6 
7 using namespace sistrip;
8 
9 // -----------------------------------------------------------------------------
10 //
12  const FedChannelConnection& conn ) :
13  CommissioningTask( dqm, conn, "DaqScopeModeTask" ),
14  scope_(),
15  nBins_(256) //@@ number of strips per FED channel
16 {}
17 
18 // -----------------------------------------------------------------------------
19 //
21 }
22 
23 // -----------------------------------------------------------------------------
24 //
26  LogTrace(mlDqmSource_) << "[CommissioningTask::" << __func__ << "]";
27 
31  fedKey(),
33  connection().lldChannel() ).title();
34 
35  scope_.histo( dqm()->book1D( title, title,
36  nBins_, -0.5, nBins_-0.5 ) );
37 
38  scope_.vNumOfEntries_.resize(nBins_,0);
39  scope_.vSumOfContents_.resize(nBins_,0);
40  scope_.vSumOfSquares_.resize(nBins_,0);
41  scope_.isProfile_ = false;
42 
43 }
44 
45 // -----------------------------------------------------------------------------
46 //
48  const edm::DetSet<SiStripRawDigi>& digis ) {
49 
50  // Only fill every 'N' events
51  if ( !updateFreq() || fillCntr()%updateFreq() ) { return; }
52 
53  if ( digis.data.size() != nBins_ ) { //@@ check scope mode length?
55  << "[DaqScopeModeTask::" << __func__ << "]"
56  << " Unexpected number of digis ("
57  << digis.data.size()
58  << ") wrt number of histogram bins ("
59  << nBins_ << ")!";
60  }
61 
62  uint16_t bins = digis.data.size() < nBins_ ? digis.data.size() : nBins_;
63  for ( uint16_t ibin = 0; ibin < bins; ibin++ ) {
64  updateHistoSet( scope_, ibin, digis.data[ibin].adc() );
65  }
66 
67 }
68 
69 // -----------------------------------------------------------------------------
70 //
73 }
74 
75 
std::vector< float > vNumOfEntries_
Utility class that holds histogram title.
const std::string & title() const
static const char mlDqmSource_[]
std::vector< float > vSumOfContents_
const uint32_t & updateFreq() const
sistrip classes
void updateHistoSet(HistoSet &, const uint32_t &bin, const float &value)
void book() override
Class containning control, module, detector and connection information, at the level of a FED channel...
DaqScopeModeTask(DQMStore *, const FedChannelConnection &)
void fill(const SiStripEventSummary &, const edm::DetSet< SiStripRawDigi > &) override
#define LogTrace(id)
~DaqScopeModeTask() override
DQMStore *const dqm() const
const uint32_t & fillCntr() const
void update() override
collection_type data
Definition: DetSet.h:78
void histo(MonitorElement *)
const uint32_t & fedKey() const
std::vector< double > vSumOfSquares_
const FedChannelConnection & connection() const