CMS 3D CMS Logo

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

#include <PedsOnlyTask.h>

Inheritance diagram for PedsOnlyTask:
CommissioningTask

Public Member Functions

 PedsOnlyTask (DQMStore *, const FedChannelConnection &)
 
 ~PedsOnlyTask () override
 
- Public Member Functions inherited from CommissioningTask
void bookHistograms ()
 
 CommissioningTask (DQMStore *, const FedChannelConnection &, const std::string &my_name)
 
void eventSetup (const edm::EventSetup *)
 
const uint32_t & fillCntr () const
 
void fillHistograms (const SiStripEventSummary &, const edm::DetSet< SiStripRawDigi > &)
 
void fillHistograms (const SiStripEventSummary &, const edm::DetSet< SiStripRawDigi > &, const edm::DetSet< SiStripRawDigi > &)
 
void fillHistograms (const SiStripEventSummary &, const edm::DetSet< SiStripRawDigi > &, const edm::DetSet< SiStripRawDigi > &, const std::vector< uint16_t > &)
 
void fillHistograms (const SiStripEventSummary &, const uint16_t &fed_id, const std::map< uint16_t, float > &fed_ch)
 
const std::string & myName () const
 
const uint32_t & updateFreq () const
 
void updateFreq (const uint32_t &)
 
void updateHistograms ()
 
virtual ~CommissioningTask ()
 

Private Member Functions

void book () override
 
void fill (const SiStripEventSummary &, const edm::DetSet< SiStripRawDigi > &) override
 
void update () override
 

Private Attributes

ApvAnalysisFactorypApvFactory_
 
std::vector< HistoSetpeds_
 

Additional Inherited Members

- Protected Member Functions inherited from CommissioningTask
const FedChannelConnectionconnection () const
 
DQMStore *const dqm () const
 
const edm::EventSetup *const eventSetup () const
 
const uint32_t & fecKey () const
 
const uint32_t & fedKey () const
 
void updateHistoSet (HistoSet &, const uint32_t &bin, const float &value)
 
void updateHistoSet (CompactHistoSet &, const uint32_t &bin, const short &value)
 
void updateHistoSet (HistoSet &, const uint32_t &bin)
 
void updateHistoSet (CompactHistoSet &, const uint32_t &bin)
 
void updateHistoSet (HistoSet &, const float &value)
 
void updateHistoSet (CompactHistoSet &)
 
void updateHistoSet (HistoSet &)
 

Detailed Description

Definition at line 19 of file PedsOnlyTask.h.

Constructor & Destructor Documentation

PedsOnlyTask::PedsOnlyTask ( DQMStore dqm,
const FedChannelConnection rCONN 
)

Definition at line 17 of file PedsOnlyTask.cc.

References LogTrace, sistrip::mlDqmSource_, Utilities::operator, and pApvFactory_.

19  : CommissioningTask( dqm, rCONN, "PedsOnlyTask")
20 {
21  //@@ NOT GUARANTEED TO BE THREAD SAFE!
22  pApvFactory_ = edm::Service<ApvFactoryService>().operator->()->getApvFactory();
23 
25  << "[PedsOnlyTask::" << __func__ << "]"
26  << " Constructing object...";
27 }
static const char mlDqmSource_[]
#define LogTrace(id)
ApvAnalysisFactory * pApvFactory_
Definition: PedsOnlyTask.h:33
PedsOnlyTask::~PedsOnlyTask ( )
override

Definition at line 31 of file PedsOnlyTask.cc.

References LogTrace, sistrip::mlDqmSource_, and pApvFactory_.

32 {
34  << "[PedsOnlyTask::" << __func__ << "]"
35  << " Destructing object...";
36 
37  // Have to delete pApvFactory_ manually even though we didn't create it
38  // ourself. :(
39  if( pApvFactory_) { delete pApvFactory_; }
40 }
static const char mlDqmSource_[]
#define LogTrace(id)
ApvAnalysisFactory * pApvFactory_
Definition: PedsOnlyTask.h:33

Member Function Documentation

void PedsOnlyTask::book ( )
overrideprivatevirtual

Reimplemented from CommissioningTask.

Definition at line 44 of file PedsOnlyTask.cc.

References CommissioningTask::connection(), CommissioningTask::dqm(), sistrip::EXPERT_HISTO, sistrip::FED_KEY, CommissioningTask::fedKey(), CommissioningTask::HistoSet::histo(), ApvAnalysisFactory::instantiateApvs(), CommissioningTask::HistoSet::isProfile_, sistrip::LLD_CHAN, LogTrace, sistrip::mlDqmSource_, pApvFactory_, sistrip::extrainfo::pedestals_, peds_, sistrip::PEDS_ONLY, sistrip::extrainfo::rawNoise_, AlCaHLTBitMon_QueryRunRegistry::string, fftjetcommon_cfi::title, SiStripHistoTitle::title(), CommissioningTask::HistoSet::vNumOfEntries_, CommissioningTask::HistoSet::vSumOfContents_, and CommissioningTask::HistoSet::vSumOfSquares_.

45 {
46  LogTrace( mlDqmSource_) << "[PedsOnlyTask::" << __func__ << "]";
47 
48  const uint16_t nBINS = 256;
49 
50  {
51  // Pedestals
55  fedKey(),
57  connection().lldChannel(),
59 
60  HistoSet oHSet;
61  oHSet.isProfile_ = true;
62 
63  oHSet.vNumOfEntries_.resize( nBINS, 0);
64  oHSet.vSumOfContents_.resize( nBINS, 0);
65  oHSet.vSumOfSquares_.resize( nBINS, 0);
66 
67  oHSet.histo( dqm()->bookProfile( title, title,
68  nBINS, -0.5, nBINS * 1. - 0.5,
69  1025, 0., 1025.) );
70 
71  peds_.push_back( oHSet);
72  }
73 
74  {
75  // Raw Noise
79  fedKey(),
81  connection().lldChannel(),
83 
84  HistoSet oHSet;
85  oHSet.isProfile_ = true;
86 
87  oHSet.vNumOfEntries_.resize( nBINS, 0);
88  oHSet.vSumOfContents_.resize( nBINS, 0);
89  oHSet.vSumOfSquares_.resize( nBINS, 0);
90 
91  oHSet.histo( dqm()->bookProfile( title, title,
92  nBINS, -0.5, nBINS * 1. - 0.5,
93  1025, 0., 1025.) );
94 
95  peds_.push_back( oHSet);
96  }
97 
99  connection().nApvs());
100 }
static const char rawNoise_[]
Utility class that holds histogram title.
const std::string & title() const
static const char mlDqmSource_[]
bool instantiateApvs(uint32_t det_id, int numberOfApvs)
std::vector< HistoSet > peds_
Definition: PedsOnlyTask.h:31
#define LogTrace(id)
static const char pedestals_[]
DQMStore *const dqm() const
ApvAnalysisFactory * pApvFactory_
Definition: PedsOnlyTask.h:33
const uint32_t & fedKey() const
const FedChannelConnection & connection() const
void PedsOnlyTask::fill ( const SiStripEventSummary rSummary,
const edm::DetSet< SiStripRawDigi > &  rDigis 
)
overrideprivatevirtual

Reimplemented from CommissioningTask.

Definition at line 104 of file PedsOnlyTask.cc.

References CommissioningTask::connection(), pApvFactory_, and ApvAnalysisFactory::updatePair().

106 {
107  pApvFactory_->updatePair( connection().detId(),
108  connection().apvPairNumber(),
109  rDigis);
110 }
void updatePair(uint32_t det_id, size_t apvPair, const edm::DetSet< SiStripRawDigi > &in)
ApvAnalysisFactory * pApvFactory_
Definition: PedsOnlyTask.h:33
const FedChannelConnection & connection() const
void PedsOnlyTask::update ( )
overrideprivatevirtual

Reimplemented from CommissioningTask.

Definition at line 114 of file PedsOnlyTask.cc.

References FedChannelConnection::apvPairNumber(), CommissioningTask::connection(), extract(), ApvAnalysisFactory::getPedestal(), ApvAnalysisFactory::getRawNoise(), trackerHits::histo, pApvFactory_, peds_, and UpdateTProfile::setBinContent().

Referenced by progressbar.ProgressBar::__next__(), MatrixUtil.Matrix::__setitem__(), MatrixUtil.Steps::__setitem__(), Vispa.Gui.VispaWidget.VispaWidget::autosize(), Vispa.Views.LineDecayView.LineDecayContainer::createObject(), Vispa.Views.LineDecayView.LineDecayContainer::deselectAllObjects(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::deselectAllWidgets(), Vispa.Gui.VispaWidget.VispaWidget::enableAutosizing(), dqm-mbProfile.Profile::finish(), progressbar.ProgressBar::finish(), Vispa.Gui.MenuWidget.MenuWidget::leaveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseMoveEvent(), Vispa.Gui.MenuWidget.MenuWidget::mouseMoveEvent(), Vispa.Views.LineDecayView.LineDecayContainer::mouseMoveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseReleaseEvent(), Vispa.Views.LineDecayView.LineDecayContainer::objectMoved(), MatrixUtil.Steps::overwrite(), Vispa.Views.LineDecayView.LineDecayContainer::removeObject(), Vispa.Gui.ConnectableWidget.ConnectableWidget::removePorts(), Vispa.Gui.FindDialog.FindDialog::reset(), Vispa.Gui.PortConnection.PointToPointConnection::select(), Vispa.Gui.VispaWidget.VispaWidget::select(), Vispa.Views.LineDecayView.LineDecayContainer::select(), Vispa.Gui.VispaWidget.VispaWidget::setText(), Vispa.Gui.VispaWidget.VispaWidget::setTitle(), Vispa.Gui.ZoomableWidget.ZoomableWidget::setZoom(), Vispa.Views.LineDecayView.LineDecayContainer::setZoom(), and Vispa.Gui.PortConnection.PointToPointConnection::updateConnection().

115 {
116  static UpdateTProfile updateTProfile;
117 
118  TProfile *pedsProf = ExtractTObject<TProfile>().extract( peds_[0].histo() );
119  TProfile *noiseProf = ExtractTObject<TProfile>().extract( peds_[1].histo() );
120 
121  for( uint16_t nLclApv = 2 * connection().apvPairNumber(),
122  nMaxLclApv = nLclApv + 2;
123  nMaxLclApv > nLclApv;
124  ++nLclApv)
125  {
126  ApvAnalysis::PedestalType lclPedestals;
127  ApvAnalysis::PedestalType lclNoises;
128 
129  pApvFactory_->getPedestal( connection().detId(), nLclApv, lclPedestals);
130  pApvFactory_->getRawNoise( connection().detId(), nLclApv, lclNoises );
131 
132  const uint16_t nSTART_BIN = 128 * ( nLclApv % 2);
133 
134  for( uint16_t nBin = 0,
135  nAbsBin = nSTART_BIN + nBin + 1;
136  128 > nBin;
137  ++nBin, ++nAbsBin)
138  {
139  updateTProfile.setBinContent( pedsProf, nAbsBin, 5,
140  lclPedestals[nBin], lclNoises[nBin]);
141  updateTProfile.setBinContent( noiseProf, nAbsBin, 5,
142  lclNoises[nBin], 0);
143  } // End loop over BINs
144  } // End loop over Local Apvs
145 }
std::vector< float > PedestalType
Definition: ApvAnalysis.h:48
void getPedestal(uint32_t det_id, int apvNumber, ApvAnalysis::PedestalType &peds)
uint16_t apvPairNumber() const
void getRawNoise(uint32_t det_id, int apvNumber, ApvAnalysis::PedestalType &noise)
std::vector< HistoSet > peds_
Definition: PedsOnlyTask.h:31
static void setBinContent(TProfile *const profile, const uint32_t &bin, const double &entries, const double &mean, const double &spread)
int extract(std::vector< int > *output, const std::string &dati)
ApvAnalysisFactory * pApvFactory_
Definition: PedsOnlyTask.h:33
const FedChannelConnection & connection() const

Member Data Documentation

ApvAnalysisFactory* PedsOnlyTask::pApvFactory_
private

Definition at line 33 of file PedsOnlyTask.h.

Referenced by book(), fill(), PedsOnlyTask(), update(), and ~PedsOnlyTask().

std::vector<HistoSet> PedsOnlyTask::peds_
private

Definition at line 31 of file PedsOnlyTask.h.

Referenced by book(), and update().