CMS 3D CMS Logo

FedTimingTask.cc
Go to the documentation of this file.
5 
6 using namespace sistrip;
7 
8 // -----------------------------------------------------------------------------
9 //
11  : CommissioningTask(dqm, conn, "FedTimingTask"),
12  timing_(),
13  nBins_(
14  40) //@@ this should be from number of scope mode samples (mean booking in event loop and putting scope mode length in trigger fed)
15 {
16  LogDebug("Commissioning") << "[FedTimingTask::FedTimingTask] Constructing object...";
17 }
18 
19 // -----------------------------------------------------------------------------
20 //
21 FedTimingTask::~FedTimingTask() { LogDebug("Commissioning") << "[FedTimingTask::FedTimingTask] Destructing object..."; }
22 
23 // -----------------------------------------------------------------------------
24 //
26  LogDebug("Commissioning") << "[FedTimingTask::book]";
27 
28  uint16_t nbins = 24 * nBins_; // 24 "fine" pll skews possible
29 
31 
35  fedKey(),
37  connection().lldChannel())
38  .title();
39 
40  timing_.histo(dqm()->bookProfile(title, title, nbins, -0.5, nbins * 1. - 0.5, 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  Some notes:
51  - use all samples
52  - extract number of samples from trigger fed
53  - need to book histos in event loop?
54  - why only use fine skew setting when filling histos? should use coarse setting as well?
55  - why do different settings every 100 events - change more freq?
56 */
58  LogDebug("Commissioning") << "[FedTimingTask::fill]";
59 
60  //@@ if scope mode length is in trigger fed, then
61  //@@ can add check here on number of digis
62  if (digis.data.size() < nBins_) {
63  edm::LogWarning("Commissioning") << "[FedTimingTask::fill]"
64  << " Unexpected number of digis! " << digis.data.size();
65  } else {
66  uint32_t pll_fine = summary.pllFine();
67  for (uint16_t coarse = 0; coarse < nBins_ /*digis.data.size()*/; coarse++) {
68  uint16_t fine = (coarse + 1) * 24 - (pll_fine + 1);
69  updateHistoSet(timing_, fine, digis.data[coarse].adc());
70  }
71  }
72 }
73 
74 // -----------------------------------------------------------------------------
75 //
77  LogDebug("Commissioning") << "[FedTimingTask::update]";
79 }
CommissioningTask::HistoSet::vSumOfSquares_
std::vector< double > vSumOfSquares_
Definition: CommissioningTask.h:46
runGCPTkAlMap.title
string title
Definition: runGCPTkAlMap.py:94
MessageLogger.h
CommissioningTask::HistoSet::vSumOfContents_
std::vector< float > vSumOfContents_
Definition: CommissioningTask.h:45
edm::DetSet
Definition: DetSet.h:23
CommissioningTask::connection
const FedChannelConnection & connection() const
Definition: CommissioningTask.h:189
FedTimingTask::FedTimingTask
FedTimingTask(DQMStore *, const FedChannelConnection &)
Definition: FedTimingTask.cc:10
SiStripCommissioningClient_cfg.conn
conn
Definition: SiStripCommissioningClient_cfg.py:5
DQMStore.h
CommissioningTask
Definition: CommissioningTask.h:24
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
CommissioningTask::HistoSet::vNumOfEntries_
std::vector< float > vNumOfEntries_
Definition: CommissioningTask.h:44
CommissioningTask::fedKey
const uint32_t & fedKey() const
Definition: CommissioningTask.h:192
FedTimingTask::nBins_
uint16_t nBins_
Definition: FedTimingTask.h:21
dqm::legacy::DQMStore
Definition: DQMStore.h:727
sistrip::EXPERT_HISTO
Definition: ConstantsForHistoType.h:29
FedTimingTask::timing_
HistoSet timing_
Definition: FedTimingTask.h:19
LaserClient_cfi.nbins
nbins
Definition: LaserClient_cfi.py:51
FedTimingTask::book
void book() override
Definition: FedTimingTask.cc:25
FedTimingTask::update
void update() override
Definition: FedTimingTask.cc:76
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
FedChannelConnection
Class containning control, module, detector and connection information, at the level of a FED channel...
Definition: FedChannelConnection.h:26
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:223
CommissioningTask::HistoSet::histo
void histo(MonitorElement *)
Definition: CommissioningTask.cc:89
edmLumisInFiles.summary
summary
Definition: edmLumisInFiles.py:39
CommissioningTask::updateHistoSet
void updateHistoSet(HistoSet &, const uint32_t &bin, const float &value)
Definition: CommissioningTask.cc:274
sistrip::FED_TIMING
Definition: ConstantsForRunType.h:80
FedTimingTask::fill
void fill(const SiStripEventSummary &, const edm::DetSet< SiStripRawDigi > &) override
Definition: FedTimingTask.cc:57
CommissioningTask::dqm
DQMStore *const dqm() const
Definition: CommissioningTask.h:188
SiStripHistoTitle.h
SiStripHistoTitle::title
const std::string & title() const
Definition: SiStripHistoTitle.h:109
edm::DetSet::data
collection_type data
Definition: DetSet.h:80
SiStripHistoTitle
Utility class that holds histogram title.
Definition: SiStripHistoTitle.h:20
FedTimingTask.h
dqm
Definition: DQMStore.h:18
sistrip::FED_KEY
Definition: ConstantsForKeyType.h:30
sistrip
sistrip classes
Definition: SiStripQualityHelpers.h:14
SiStripEventSummary
Definition: SiStripEventSummary.h:22
FedTimingTask::~FedTimingTask
~FedTimingTask() override
Definition: FedTimingTask.cc:21
sistrip::LLD_CHAN
Definition: ConstantsForGranularity.h:78