test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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
< FedTimingAnalysis
Factory
 
- Public Types inherited from CommissioningHistograms
typedef std::map< uint32_t,
CommissioningAnalysis * > 
Analyses
 
typedef Analyses::iterator Analysis
 
typedef SummaryPlotFactory
< CommissioningAnalysis * > 
Factory
 
typedef std::map< uint32_t,
uint32_t > 
FedToFecMap
 
typedef std::vector< Histo * > Histos
 
typedef std::map< uint32_t,
Histos
HistosMap
 

Public Member Functions

void createSummaryHisto (const sistrip::Monitorable &, const sistrip::Presentation &, const std::string &top_level_dir, const sistrip::Granularity &)
 
 FedTimingHistograms (const edm::ParameterSet &pset, DQMStore *)
 
void histoAnalysis (bool debug)
 
virtual ~FedTimingHistograms ()
 
- 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)
 
virtual ~CommissioningHistograms ()
 

Protected Attributes

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

Additional Inherited Members

- Static Public Member Functions inherited from CommissioningHistograms
static void copyCustomInformation (DQMStore *const, const std::vector< std::string > &)
 
static void getContents (DQMStore *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 ()
 
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 9 of file FedTimingHistograms.h.

Member Typedef Documentation

Definition at line 16 of file FedTimingHistograms.h.

Constructor & Destructor Documentation

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

Definition at line 14 of file FedTimingHistograms.cc.

References gather_cfg::cout.

16  : CommissioningHistograms( pset.getParameter<edm::ParameterSet>("FedTimingParameters"),
17  bei,
19  factory_( new Factory ),
25 {
26  cout << "[" << __PRETTY_FUNCTION__ << "]"
27  << " Created object for APV TIMING histograms" << endl;
28 }
T getParameter(std::string const &) const
std::auto_ptr< Factory > factory_
static const uint16_t invalid_
Definition: Constants.h:16
SummaryHistogramFactory< FedTimingAnalysis > Factory
tuple cout
Definition: gather_cfg.py:121
const float optimumSamplingPoint_
FedTimingHistograms::~FedTimingHistograms ( )
virtual

Definition at line 32 of file FedTimingHistograms.cc.

References gather_cfg::cout.

32  {
33  cout << "[" << __PRETTY_FUNCTION__ << "]" << endl;
34 }
tuple cout
Definition: gather_cfg.py:121

Member Function Documentation

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

Reimplemented from CommissioningHistograms.

Definition at line 148 of file FedTimingHistograms.cc.

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

151  {
152  cout << "[" << __PRETTY_FUNCTION__ <<"]" << endl;
153 
154  // Check view
156  if ( view == sistrip::UNKNOWN_VIEW ) { return; }
157 
158  // Analyze histograms
159  histoAnalysis( false );
160 
161  // Extract data to be histogrammed
162  factory_->init( histo, type, view, directory, gran );
163  uint32_t xbins = factory_->extract( data_ );
164 
165  // Create summary histogram (if it doesn't already exist)
166  TH1* summary = histogram( histo, type, view, directory, xbins );
167 
168  // Fill histogram with data
169  factory_->fill( *summary );
170 
171 }
type
Definition: HCALResponse.h:21
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 double xbins[]
std::auto_ptr< Factory > factory_
void histoAnalysis(bool debug)
static std::string view(const sistrip::View &)
std::map< uint32_t, FedTimingAnalysis > data_
tuple cout
Definition: gather_cfg.py:121
void FedTimingHistograms::histoAnalysis ( bool  debug)
virtual

Reimplemented from CommissioningHistograms.

Definition at line 38 of file FedTimingHistograms.cc.

References SiStripFecKey::ccuAddr(), SiStripFecKey::ccuChan(), dtNoiseDBValidation_cfg::cerr, gather_cfg::cout, data_, SiStripFecKey::fecCrate(), SiStripFecKey::fecRing(), SiStripFecKey::fecSlot(), sistrip::invalid_, bookConverter::max, sistrip::maximum_, min(), and contentValuesCheck::ss.

Referenced by createSummaryHisto().

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

Member Data Documentation

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

Definition at line 29 of file FedTimingHistograms.h.

Referenced by createSummaryHisto(), and histoAnalysis().

uint32_t FedTimingHistograms::deviceWithMaxDelay_
protected

Definition at line 37 of file FedTimingHistograms.h.

uint32_t FedTimingHistograms::deviceWithMinDelay_
protected

Definition at line 36 of file FedTimingHistograms.h.

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

Definition at line 31 of file FedTimingHistograms.h.

Referenced by createSummaryHisto().

float FedTimingHistograms::maxDelay_
protected

Definition at line 35 of file FedTimingHistograms.h.

float FedTimingHistograms::minDelay_
protected

Definition at line 34 of file FedTimingHistograms.h.

const float FedTimingHistograms::optimumSamplingPoint_
protected

Definition at line 33 of file FedTimingHistograms.h.