CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Protected Attributes
FedTimingHistograms Class Reference

#include <FedTimingHistograms.h>

Inheritance diagram for FedTimingHistograms:
CommissioningHistograms

Public Types

typedef SummaryHistogramFactory< FedTimingAnalysisFactory
 
- Public Types inherited from CommissioningHistograms
typedef std::map< uint32_t, CommissioningAnalysis * > Analyses
 
typedef Analyses::iterator Analysis
 
typedef dqm::harvesting::DQMStore DQMStore
 
typedef SummaryPlotFactory< CommissioningAnalysis * > Factory
 
typedef std::map< uint32_t, uint32_t > FedToFecMap
 
typedef std::vector< Histo * > Histos
 
typedef std::map< uint32_t, HistosHistosMap
 
typedef dqm::harvesting::MonitorElement MonitorElement
 

Public Member Functions

void createSummaryHisto (const sistrip::Monitorable &, const sistrip::Presentation &, const std::string &top_level_dir, const sistrip::Granularity &) override
 
 FedTimingHistograms (const edm::ParameterSet &pset, DQMStore *)
 
void histoAnalysis (bool debug) override
 
 ~FedTimingHistograms () override
 
- Public Member Functions inherited from CommissioningHistograms
 CommissioningHistograms (const edm::ParameterSet &pset, DQMStore *const, const sistrip::RunType &)
 
 CommissioningHistograms ()
 
virtual void configure (const edm::ParameterSet &, const edm::EventSetup &)
 
void createCollations (const std::vector< std::string > &)
 
void extractHistograms (const std::vector< std::string > &)
 
virtual void printAnalyses ()
 
virtual void printSummary ()
 
void remove (std::string pattern="")
 
void save (std::string &filename, uint32_t run_number=0, std::string partitionName="")
 
virtual ~CommissioningHistograms ()
 

Protected Attributes

std::map< uint32_t, FedTimingAnalysisdata_
 
uint32_t deviceWithMaxDelay_
 
uint32_t deviceWithMinDelay_
 
std::unique_ptr< Factoryfactory_
 
float maxDelay_
 
float minDelay_
 
const float optimumSamplingPoint_
 
- Protected Attributes inherited from CommissioningHistograms
std::unique_ptr< Factoryfactory_
 

Additional Inherited Members

- Static Public Member Functions inherited from CommissioningHistograms
static void copyCustomInformation (DQMStore *const, const std::vector< std::string > &)
 
static uint32_t runNumber (DQMStore *const, const std::vector< std::string > &)
 
static sistrip::RunType runType (DQMStore *const, const std::vector< std::string > &)
 
- Protected Member Functions inherited from CommissioningHistograms
DQMStore *const bei () const
 
void clearHistosMap ()
 
Analysesdata (bool getMaskedData=false)
 
Factory *const factory ()
 
TH1 * histogram (const sistrip::Monitorable &, const sistrip::Presentation &, const sistrip::View &, const std::string &directory, const uint32_t &xbins, const float &xlow=1. *sistrip::invalid_, const float &xhigh=1. *sistrip::invalid_)
 
const HistosMaphistos () const
 
const FedToFecMapmapping () const
 
void printHistosMap ()
 
const edm::ParameterSetpset () const
 
const sistrip::RunTypetask () const
 

Detailed Description

Definition at line 8 of file FedTimingHistograms.h.

Member Typedef Documentation

◆ Factory

Definition at line 13 of file FedTimingHistograms.h.

Constructor & Destructor Documentation

◆ FedTimingHistograms()

FedTimingHistograms::FedTimingHistograms ( const edm::ParameterSet pset,
DQMStore bei 
)

Definition at line 14 of file FedTimingHistograms.cc.

References gather_cfg::cout.

16  factory_(new Factory),
22  cout << "[" << __PRETTY_FUNCTION__ << "]"
23  << " Created object for APV TIMING histograms" << endl;
24 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
std::unique_ptr< Factory > factory_
static const uint16_t invalid_
Definition: Constants.h:16
SummaryHistogramFactory< FedTimingAnalysis > Factory
const edm::ParameterSet & pset() const
DQMStore *const bei() const
const float optimumSamplingPoint_

◆ ~FedTimingHistograms()

FedTimingHistograms::~FedTimingHistograms ( )
override

Definition at line 28 of file FedTimingHistograms.cc.

References gather_cfg::cout.

28 { cout << "[" << __PRETTY_FUNCTION__ << "]" << endl; }

Member Function Documentation

◆ createSummaryHisto()

void FedTimingHistograms::createSummaryHisto ( const sistrip::Monitorable histo,
const sistrip::Presentation type,
const std::string &  top_level_dir,
const sistrip::Granularity gran 
)
overridevirtual

Reimplemented from CommissioningHistograms.

Definition at line 130 of file FedTimingHistograms.cc.

References gather_cfg::cout, data_, createBeamHaloJobs::directory, factory_, timingPdfMaker::histo, histoAnalysis(), CommissioningHistograms::histogram(), edmLumisInFiles::summary, sistrip::UNKNOWN_VIEW, SiStripEnumsAndStrings::view(), and fw3dlego::xbins.

133  {
134  cout << "[" << __PRETTY_FUNCTION__ << "]" << endl;
135 
136  // Check view
138  if (view == sistrip::UNKNOWN_VIEW) {
139  return;
140  }
141 
142  // Analyze histograms
143  histoAnalysis(false);
144 
145  // Extract data to be histogrammed
146  factory_->init(histo, type, view, directory, gran);
147  uint32_t xbins = factory_->extract(data_);
148 
149  // Create summary histogram (if it doesn't already exist)
151 
152  // Fill histogram with data
153  factory_->fill(*summary);
154 }
const double xbins[]
std::map< uint32_t, FedTimingAnalysis > data_
static std::string view(const sistrip::View &)
void histoAnalysis(bool debug) override
std::unique_ptr< Factory > factory_
TH1 * histogram(const sistrip::Monitorable &, const sistrip::Presentation &, const sistrip::View &, const std::string &directory, const uint32_t &xbins, const float &xlow=1. *sistrip::invalid_, const float &xhigh=1. *sistrip::invalid_)

◆ histoAnalysis()

void FedTimingHistograms::histoAnalysis ( bool  debug)
overridevirtual

Reimplemented from CommissioningHistograms.

Definition at line 32 of file FedTimingHistograms.cc.

References DMR_cfg::cerr, gather_cfg::cout, data_, debug, sistrip::invalid_, SiStripPI::max, sistrip::maximum_, SiStripPI::min, and contentValuesCheck::ss.

Referenced by createSummaryHisto().

32  {
33  // Clear std::map holding analysis objects
34  data_.clear();
35 
36  // Reset minimum / maximum delays
37  float time_min = 1. * sistrip::invalid_;
38  float time_max = -1. * sistrip::invalid_;
39  uint32_t device_min = sistrip::invalid_;
40  uint32_t device_max = sistrip::invalid_;
41 
42  // // Iterate through std::map containing std::vectors of profile histograms
43  // CollationsMap::const_iterator iter = collations().begin();
44  // for ( ; iter != collations().end(); iter++ ) {
45 
46  // // Check std::vector of histos is not empty (should be 2 histos)
47  // if ( iter->second.empty() ) {
48  // cerr << "[" << __PRETTY_FUNCTION__ << "]"
49  // << " Zero collation histograms found!" << endl;
50  // continue;
51  // }
52 
53  // // Retrieve pointers to profile histos for this FED channel
54  // std::vector<TH1*> profs;
55  // Collations::const_iterator ihis = iter->second.begin();
56  // for ( ; ihis != iter->second.end(); ihis++ ) {
57  // OBSOLETE!!!
58  // TProfile* prof = ExtractTObject<TProfile>().extract( mui()->get( ihis->first ) );
59  // if ( prof ) { profs.push_back(prof); }
60  // }
61 
62  // // Perform histo analysis
63  // FedTimingAnalysis anal( iter->first );
64  // FedTimingAlgorithm algo( &anal );
65  // algo.analysis( profs );
66  // data_[iter->first] = anal;
67 
68  // // Check tick height is valid
69  // if ( anal.height() < 100. ) {
70  // cerr << "[" << __PRETTY_FUNCTION__ << "]"
71  // << " Tick mark height too small: " << anal.height() << endl;
72  // continue;
73  // }
74 
75  // // Check time of rising edge
76  // if ( anal.time() > sistrip::maximum_ ) { continue; }
77 
78  // // Find maximum time
79  // if ( anal.time() > time_max ) {
80  // time_max = anal.time();
81  // device_max = iter->first;
82  // }
83 
84  // // Find minimum time
85  // if ( anal.time() < time_min ) {
86  // time_min = anal.time();
87  // device_min = iter->first;
88  // }
89 
90  // }
91 
92  // cout << "[" << __PRETTY_FUNCTION__ << "]"
93  // << " Analyzed histograms for "
94  // << collations().size()
95  // << " FED channels" << endl;
96 
97  // Adjust maximum (and minimum) delay(s) to find optimum sampling point(s)
98  if (time_max > sistrip::maximum_ || time_max < -1. * sistrip::maximum_) {
99  cerr << "[" << __PRETTY_FUNCTION__ << "]"
100  << " Unable to set maximum time! Found unexpected value: " << time_max << endl;
101  return;
102  }
103 
104  SiStripFecKey max(device_max);
105  cout << " Device (FEC/slot/ring/CCU/module/channel) " << max.fecCrate() << "/" << max.fecSlot() << "/"
106  << max.fecRing() << "/" << max.ccuAddr() << "/" << max.ccuChan() << "/"
107  << " has maximum delay (rising edge) [ns]:" << time_max << endl;
108 
109  SiStripFecKey min(device_min);
110  cout << " Device (FEC/slot/ring/CCU/module/channel): " << min.fecCrate() << "/" << min.fecSlot() << "/"
111  << min.fecRing() << "/" << min.ccuAddr() << "/" << min.ccuChan() << "/"
112  << " has minimum delay (rising edge) [ns]:" << time_min << endl;
113 
114  // Set maximum time for all analysis objects
115  std::map<uint32_t, FedTimingAnalysis>::iterator ianal = data_.begin();
116  for (; ianal != data_.end(); ianal++) {
117  ianal->second.max(time_max);
118  static uint16_t cntr = 0;
119  if (debug) {
120  std::stringstream ss;
121  ianal->second.print(ss);
122  cout << ss.str() << endl;
123  cntr++;
124  }
125  }
126 }
std::map< uint32_t, FedTimingAnalysis > data_
Utility class that identifies a position within the strip tracker control structure, down to the level of an APV25.
Definition: SiStripFecKey.h:45
static const uint16_t maximum_
Definition: Constants.h:20
#define debug
Definition: HDRShower.cc:19
static const uint16_t invalid_
Definition: Constants.h:16

Member Data Documentation

◆ data_

std::map<uint32_t, FedTimingAnalysis> FedTimingHistograms::data_
protected

Definition at line 25 of file FedTimingHistograms.h.

Referenced by createSummaryHisto(), and histoAnalysis().

◆ deviceWithMaxDelay_

uint32_t FedTimingHistograms::deviceWithMaxDelay_
protected

Definition at line 33 of file FedTimingHistograms.h.

◆ deviceWithMinDelay_

uint32_t FedTimingHistograms::deviceWithMinDelay_
protected

Definition at line 32 of file FedTimingHistograms.h.

◆ factory_

std::unique_ptr<Factory> FedTimingHistograms::factory_
protected

Definition at line 27 of file FedTimingHistograms.h.

Referenced by createSummaryHisto().

◆ maxDelay_

float FedTimingHistograms::maxDelay_
protected

Definition at line 31 of file FedTimingHistograms.h.

◆ minDelay_

float FedTimingHistograms::minDelay_
protected

Definition at line 30 of file FedTimingHistograms.h.

◆ optimumSamplingPoint_

const float FedTimingHistograms::optimumSamplingPoint_
protected

Definition at line 29 of file FedTimingHistograms.h.