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 ()
 
 CommissioningHistograms (const edm::ParameterSet &pset, DQMStore *const, const sistrip::RunType &)
 
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.

16  factory_(new Factory),
22  cout << "[" << __PRETTY_FUNCTION__ << "]"
23  << " Created object for APV TIMING histograms" << endl;
24 }

References gather_cfg::cout.

◆ ~FedTimingHistograms()

FedTimingHistograms::~FedTimingHistograms ( )
override

Definition at line 28 of file FedTimingHistograms.cc.

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

References gather_cfg::cout.

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.

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)
150  TH1* summary = histogram(histo, type, view, directory, xbins);
151 
152  // Fill histogram with data
153  factory_->fill(*summary);
154 }

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

◆ histoAnalysis()

void FedTimingHistograms::histoAnalysis ( bool  debug)
overridevirtual

Reimplemented from CommissioningHistograms.

Definition at line 32 of file FedTimingHistograms.cc.

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 }

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

Referenced by createSummaryHisto().

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.

fw3dlego::xbins
const double xbins[]
Definition: fw3dlego_xbins.cc:16
FedTimingHistograms::factory_
std::unique_ptr< Factory > factory_
Definition: FedTimingHistograms.h:27
FedTimingHistograms::maxDelay_
float maxDelay_
Definition: FedTimingHistograms.h:31
sistrip::View
View
Definition: ConstantsForView.h:26
CommissioningHistograms::pset
const edm::ParameterSet & pset() const
Definition: CommissioningHistograms.h:163
CommissioningHistograms::bei
DQMStore *const bei() const
Definition: CommissioningHistograms.h:159
min
T min(T a, T b)
Definition: MathUtil.h:58
gather_cfg.cout
cout
Definition: gather_cfg.py:144
FedTimingHistograms::deviceWithMinDelay_
uint32_t deviceWithMinDelay_
Definition: FedTimingHistograms.h:32
timingPdfMaker.histo
histo
Definition: timingPdfMaker.py:279
CommissioningHistograms::CommissioningHistograms
CommissioningHistograms()
Definition: CommissioningHistograms.cc:60
contentValuesCheck.ss
ss
Definition: contentValuesCheck.py:33
debug
#define debug
Definition: HDRShower.cc:19
FedTimingHistograms::Factory
SummaryHistogramFactory< FedTimingAnalysis > Factory
Definition: FedTimingHistograms.h:13
CommissioningHistograms::histogram
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_)
Definition: CommissioningHistograms.cc:656
SiStripFecKey
Utility class that identifies a position within the strip tracker control structure,...
Definition: SiStripFecKey.h:45
edm::ParameterSet
Definition: ParameterSet.h:47
FedTimingHistograms::data_
std::map< uint32_t, FedTimingAnalysis > data_
Definition: FedTimingHistograms.h:25
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
type
type
Definition: SiPixelVCal_PayloadInspector.cc:37
sistrip::maximum_
static const uint16_t maximum_
Definition: Constants.h:20
edmLumisInFiles.summary
summary
Definition: edmLumisInFiles.py:39
FedTimingHistograms::minDelay_
float minDelay_
Definition: FedTimingHistograms.h:30
SiStripEnumsAndStrings::view
static std::string view(const sistrip::View &)
Definition: SiStripEnumsAndStrings.cc:5
sistrip::FED_TIMING
Definition: ConstantsForRunType.h:80
sistrip::invalid_
static const uint16_t invalid_
Definition: Constants.h:16
sistrip::UNKNOWN_VIEW
Definition: ConstantsForView.h:27
createBeamHaloJobs.directory
string directory
Definition: createBeamHaloJobs.py:211
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
FedTimingHistograms::histoAnalysis
void histoAnalysis(bool debug) override
Definition: FedTimingHistograms.cc:32
FedTimingHistograms::optimumSamplingPoint_
const float optimumSamplingPoint_
Definition: FedTimingHistograms.h:29
EcnaPython_AdcPeg12_S1_10_R170298_1_0_150_Dee0.cerr
cerr
Definition: EcnaPython_AdcPeg12_S1_10_R170298_1_0_150_Dee0.py:8
FedTimingHistograms::deviceWithMaxDelay_
uint32_t deviceWithMaxDelay_
Definition: FedTimingHistograms.h:33