CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
FedCablingSummaryFactory.cc
Go to the documentation of this file.
5 #include <iostream>
6 #include <sstream>
7 
8 using namespace sistrip;
9 
10 // -----------------------------------------------------------------------------
11 //
13  const sistrip::Presentation& pres,
14  const sistrip::View& view,
15  const std::string& level,
16  const sistrip::Granularity& gran,
17  const std::map<uint32_t,FedCablingAnalysis*>& data ) {
18 
19  // Some initialisation
20  SummaryPlotFactoryBase::init( mon, pres, view, level, gran );
21 
22  // Check if generator class exists
23  if ( !SummaryPlotFactoryBase::generator_ ) { return 0; }
24 
25  // Extract monitorable
26  std::map<uint32_t,FedCablingAnalysis*>::const_iterator iter = data.begin();
27  for ( ; iter != data.end(); iter++ ) {
28  float value = static_cast<float>(sistrip::invalid_);
29  if ( SummaryPlotFactoryBase::mon_ == sistrip::FED_CABLING_FED_ID ) { value = iter->second->fedId(); }
30  else if ( SummaryPlotFactoryBase::mon_ == sistrip::FED_CABLING_FED_CH ) { value = iter->second->fedCh(); }
31  else if ( SummaryPlotFactoryBase::mon_ == sistrip::FED_CABLING_ADC_LEVEL ) { value = iter->second->adcLevel(); }
32  else {
34  << "[SummaryPlotFactory::" << __func__ << "]"
35  << " Unexpected monitorable: "
37  continue;
38  }
41  iter->first,
42  value );
43  }
44 
46 
47 }
48 
49 //------------------------------------------------------------------------------
50 //
52 
53  // Histogram filling and formating
54  SummaryPlotFactoryBase::fill( summary_histo );
55 
56  if ( !SummaryPlotFactoryBase::generator_ ) { return; }
57 
58  // Histogram formatting
64  SummaryPlotFactoryBase::generator_->axisLabel( "Signal level [ADC]" );
65  } else {
67  << "[SummaryPlotFactory::" << __func__ << "]"
68  << " Unexpected SummaryHisto value:"
70  }
71 
72 }
73 
74 // -----------------------------------------------------------------------------
75 //
77 
static std::string monitorable(const sistrip::Monitorable &)
sistrip::Monitorable mon_
void init(const sistrip::Monitorable &, const sistrip::Presentation &, const sistrip::View &, const std::string &top_level_dir, const sistrip::Granularity &)
uint32_t init(const sistrip::Monitorable &, const sistrip::Presentation &, const sistrip::View &, const std::string &top_level_dir, const sistrip::Granularity &, const std::map< uint32_t, T > &data)
uint32_t nBins() const
void fillMap(const std::string &top_level_dir, const sistrip::Granularity &, const uint32_t &key, const float &value, const float &error=0.)
void fill(TH1 &summary_histo)
sistrip::Granularity gran_
static const char mlSummaryPlots_[]
SummaryGenerator * generator_
static const uint16_t invalid_
Definition: Constants.h:17
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
tuple level
Definition: testEve_cfg.py:34
void axisLabel(const std::string &)
void fill(TH1 &summary_histo)