CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
LatencyTask Class Reference

#include <LatencyTask.h>

Inheritance diagram for LatencyTask:
CommissioningTask

Public Member Functions

 LatencyTask (DQMStore *, const FedChannelConnection &)
 
virtual ~LatencyTask ()
 
- 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 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

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

Private Attributes

HistoSet clusterPartition_
 
int firstReading_
 
HistoSet timingPartition_
 

Static Private Attributes

static HistoSet cluster_
 
static HistoSet timing_
 

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 11 of file LatencyTask.h.

Constructor & Destructor Documentation

LatencyTask::LatencyTask ( DQMStore dqm,
const FedChannelConnection conn 
)

Definition at line 19 of file LatencyTask.cc.

References LogDebug.

20  :
21  CommissioningTask( dqm, conn, "LatencyTask" ),firstReading_(-1)
22 {
23  LogDebug("Commissioning") << "[LatencyTask::LatencyTask] Constructing object...";
24 }
#define LogDebug(id)
int firstReading_
Definition: LatencyTask.h:29
LatencyTask::~LatencyTask ( )
virtual

Definition at line 28 of file LatencyTask.cc.

References LogDebug.

28  {
29  LogDebug("Commissioning") << "[LatencyTask::LatencyTask] Destructing object...";
30 }
#define LogDebug(id)

Member Function Documentation

void LatencyTask::book ( )
privatevirtual

Reimplemented from CommissioningTask.

Definition at line 34 of file LatencyTask.cc.

References sistrip::APV_LATENCY, cluster_, sistrip::extrainfo::clusterCharge_, clusterPartition_, CommissioningTask::connection(), sistrip::DET_KEY, CommissioningTask::dqm(), sistrip::EXPERT_HISTO, HIGHBIN, CommissioningTask::HistoSet::histo(), CommissioningTask::HistoSet::isProfile_, SiStripKey::key(), LogDebug, LOWBIN, NBINS, sistrip::extrainfo::occupancy_, sistrip::PARTITION, SiStripKey::path(), DQMStore::pwd(), DQMStore::setCurrentFolder(), AlCaHLTBitMon_QueryRunRegistry::string, timing_, timingPartition_, indexGen::title, sistrip::TRACKER, CommissioningTask::HistoSet::vNumOfEntries_, CommissioningTask::HistoSet::vSumOfContents_, and CommissioningTask::HistoSet::vSumOfSquares_.

34  {
35  LogDebug("Commissioning") << "[LatencyTask::book]";
36 
38  int nBins = NBINS;
39  SiStripDetKey detkeytracker((uint32_t) 0);
40  SiStripDetKey detkeypartition((uint16_t) (connection().fecCrate()));
41 
42  // see if the global timing histogram is already booked
43  if (timing_.histo()) {
44  // if already booked, use it
45  LogDebug("Commissioning") << "[LatencyTask::book] using existing histogram.";
46  } else {
47  // make a new histo on the tracker level if not existing yet
48  LogDebug("Commissioning") << "[LatencyTask::book] booking a new histogram in " << dqm()->pwd();
49  // construct the histo title
53  detkeytracker.key(),
55  0,
57  dqm()->setCurrentFolder( detkeytracker.path() );
58  timing_.histo( dqm()->bookProfile( title, title, // name and title
59  nBins, LOWBIN, HIGHBIN, // binning + range
60  100, 0., -1., "s" ) ); // Y range : automatic
61  timing_.vNumOfEntries_.resize(nBins,0);
62  timing_.vSumOfContents_.resize(nBins,0);
63  timing_.vSumOfSquares_.resize(nBins,0);
64  }
65  // make a new histo on the partition level if not existing yet
66  LogDebug("Commissioning") << "[LatencyTask::book] booking a new histogram in " << dqm()->pwd();
67  // histo title
71  detkeypartition.key(),
73  0,
75  dqm()->setCurrentFolder( detkeypartition.path() );
76  timingPartition_.histo( dqm()->bookProfile( title, title, // name and title
77  nBins, LOWBIN, HIGHBIN, // binning + range
78  100, 0., -1., "s" ) ); // Y range : automatic
79  timingPartition_.vNumOfEntries_.resize(nBins,0);
80  timingPartition_.vSumOfContents_.resize(nBins,0);
81  timingPartition_.vSumOfSquares_.resize(nBins,0);
82 
83  // see if the global cluster histogram is already booked
84  if (cluster_.histo()) {
85  // if already booked, use it
86  LogDebug("Commissioning") << "[LatencyTask::book] using existing histogram.";
87  } else {
88  // make a new histo on the tracker level if not existing yet
89  LogDebug("Commissioning") << "[LatencyTask::book] booking a new histogram in " << dqm()->pwd();
90  // construct the histo title
94  detkeytracker.key(),
96  0,
98  dqm()->setCurrentFolder( detkeytracker.path() );
99  cluster_.histo( dqm()->book1D( title, title, // name and title
100  nBins, LOWBIN, HIGHBIN )); // binning + range
101  cluster_.isProfile_ = false;
102  cluster_.vNumOfEntries_.resize(nBins,0);
103  cluster_.vSumOfContents_.resize(nBins,0);
104  cluster_.vSumOfSquares_.resize(nBins,0);
105  }
106  // make a new histo on the partition level if not existing yet
107  LogDebug("Commissioning") << "[LatencyTask::book] booking a new histogram in " << dqm()->pwd();
108  // histo title
112  detkeypartition.key(),
114  0,
116  dqm()->setCurrentFolder( detkeypartition.path() );
117  clusterPartition_.histo( dqm()->book1D( title, title, // name and title
118  nBins, LOWBIN, HIGHBIN ) ); // binning + range
120  clusterPartition_.vNumOfEntries_.resize(nBins,0);
121  clusterPartition_.vSumOfContents_.resize(nBins,0);
122  clusterPartition_.vSumOfSquares_.resize(nBins,0);
123 
124  LogDebug("Commissioning") << "[LatencyTask::book] done";
125 }
#define LogDebug(id)
std::vector< float > vNumOfEntries_
static HistoSet timing_
Definition: LatencyTask.h:25
Utility class that holds histogram title.
std::vector< float > vSumOfContents_
#define HIGHBIN
Definition: LatencyTask.cc:10
static const char occupancy_[]
HistoSet clusterPartition_
Definition: LatencyTask.h:28
HistoSet timingPartition_
Definition: LatencyTask.h:27
Utility class that identifies a position within the strip tracker geometrical structure, down to the level of an APV25 chip.
Definition: SiStripDetKey.h:28
#define LOWBIN
Definition: LatencyTask.cc:9
static const char clusterCharge_[]
static HistoSet cluster_
Definition: LatencyTask.h:26
DQMStore *const dqm() const
#define NBINS
Definition: FineDelayTask.cc:8
void histo(MonitorElement *)
std::vector< double > vSumOfSquares_
const FedChannelConnection & connection() const
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:707
const std::string & pwd(void) const
Definition: DQMStore.cc:679
void LatencyTask::fill ( const SiStripEventSummary summary,
const edm::DetSet< SiStripRawDigi > &  digis 
)
privatevirtual

Reimplemented from CommissioningTask.

Definition at line 129 of file LatencyTask.cc.

References newFWLiteAna::bin, cluster_, clusterPartition_, edm::DetSet< T >::data, firstReading_, HIGHBIN, LogDebug, LOWBIN, NBINS, edmLumisInFiles::summary, timing_, timingPartition_, and CommissioningTask::updateHistoSet().

130  {
131  LogDebug("Commissioning") << "[LatencyTask::fill]";
132  // retrieve the delay from the EventSummary
133  int32_t delay = static_cast<int32_t>( const_cast<SiStripEventSummary&>(summary).latency() );
134  if(firstReading_==-1) firstReading_ = delay;
135  float correctedDelay = 0.;
136  LogDebug("Commissioning") << "[LatencyTask::fill]; the delay is " << delay;
137  // loop on the strips to find the (maybe) non-zero digi
138  unsigned int nclusters = 0;
139  for(unsigned int strip=0;strip<digis.data.size();strip++) {
140  if(digis.data[strip].adc()!=0) {
141  // count the "cluster"
142  ++nclusters;
143  // no TOF correction is applied.
144  // 2 reasons: the effect is a priori to thin to be seen with 25ns steps
145  // and it biases the result by one clock due to the 25bins in the HistoSet
146  correctedDelay = delay*(-25.); // no TOF correction is applied.
147  // compute the bin
148  int bin = int((correctedDelay-LOWBIN)/((HIGHBIN-LOWBIN)/NBINS));
149  LogDebug("Commissioning") << "[LatencyTask::fill]; using a hit with value " << ( digis.data[strip].adc()&0xff )
150  << " at corrected delay of " << correctedDelay
151  << " in bin " << bin ;
152  updateHistoSet( timing_,bin,digis.data[strip].adc()&0xff);
153  LogDebug("Commissioning") << "HistoSet timing Updated " << strip << " " << digis.data.size();
154  updateHistoSet( timingPartition_,bin,digis.data[strip].adc()&0xff);
155  LogDebug("Commissioning") << "HistoSet timingPartition Updated " << strip << " " << digis.data.size();
156  }
157  }
158  // set the occupancy
159  int bin = int((delay*(-25.)-LOWBIN)/((HIGHBIN-LOWBIN)/NBINS));
160  LogDebug("Commissioning") << "[LatencyTask::fill]; occupancy is " << nclusters;
161  updateHistoSet( cluster_,bin,nclusters );
162  updateHistoSet( clusterPartition_,bin,nclusters );
163 }
#define LogDebug(id)
static HistoSet timing_
Definition: LatencyTask.h:25
#define HIGHBIN
Definition: LatencyTask.cc:10
int firstReading_
Definition: LatencyTask.h:29
void updateHistoSet(HistoSet &, const uint32_t &bin, const float &value)
HistoSet clusterPartition_
Definition: LatencyTask.h:28
HistoSet timingPartition_
Definition: LatencyTask.h:27
#define LOWBIN
Definition: LatencyTask.cc:9
static HistoSet cluster_
Definition: LatencyTask.h:26
#define NBINS
Definition: FineDelayTask.cc:8
collection_type data
Definition: DetSet.h:78
void LatencyTask::update ( )
privatevirtual

Reimplemented from CommissioningTask.

Definition at line 167 of file LatencyTask.cc.

References cluster_, clusterPartition_, LogDebug, timing_, timingPartition_, and CommissioningTask::updateHistoSet().

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(), 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().

167  {
168  LogDebug("Commissioning") << "[LatencyTask::update]";
173 }
#define LogDebug(id)
static HistoSet timing_
Definition: LatencyTask.h:25
void updateHistoSet(HistoSet &, const uint32_t &bin, const float &value)
HistoSet clusterPartition_
Definition: LatencyTask.h:28
HistoSet timingPartition_
Definition: LatencyTask.h:27
static HistoSet cluster_
Definition: LatencyTask.h:26

Member Data Documentation

CommissioningTask::HistoSet LatencyTask::cluster_
staticprivate

Definition at line 26 of file LatencyTask.h.

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

HistoSet LatencyTask::clusterPartition_
private

Definition at line 28 of file LatencyTask.h.

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

int LatencyTask::firstReading_
private

Definition at line 29 of file LatencyTask.h.

Referenced by fill().

CommissioningTask::HistoSet LatencyTask::timing_
staticprivate

Definition at line 25 of file LatencyTask.h.

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

HistoSet LatencyTask::timingPartition_
private

Definition at line 27 of file LatencyTask.h.

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