CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DaqScopeModeHistograms.cc
Go to the documentation of this file.
8 #include <iostream>
9 #include <sstream>
10 #include <iomanip>
11 
12 using namespace std;
13 using namespace sistrip;
14 
15 // -----------------------------------------------------------------------------
18  DQMStore* bei )
19  : CommissioningHistograms( pset.getParameter<edm::ParameterSet>("DaqScopeModeParameters"),
20  bei,
21  sistrip::DAQ_SCOPE_MODE ),
22  factory_( new Factory )
23 {
24  cout << endl // LogTrace(mlDqmClient_)
25  << "[DaqScopeModeHistograms::" << __func__ << "]"
26  << " Constructing object...";
27 }
28 
29 // -----------------------------------------------------------------------------
32  cout << endl // LogTrace(mlDqmClient_)
33  << "[DaqScopeModeHistograms::" << __func__ << "]"
34  << " Constructing object...";
35 }
36 
37 // -----------------------------------------------------------------------------
40 
41  // Clear std::map holding analysis objects
42  data_.clear();
43 
44 // // Iterate through std::map containing std::vectors of profile histograms
45 // CollationsMap::const_iterator iter = collations().begin();
46 // for ( ; iter != collations().end(); iter++ ) {
47 
48 // // Check std::vector of histos is not empty (should be 1 histo)
49 // if ( iter->second.empty() ) {
50 // edm::LogWarning(mlDqmClient_)
51 // << "[DaqScopeModeHistograms::" << __func__ << "]"
52 // << " Zero collation histograms found!";
53 // continue;
54 // }
55 
56 // // Retrieve pointers to profile histos for this FED channel
57 // std::vector<TH1*> histos;
58 // Collations::const_iterator ihis = iter->second.begin();
59 // for ( ; ihis != iter->second.end(); ihis++ ) {
60 // TH1F* his = ExtractTObject<TH1F>().extract( ihis->second->getMonitorElement() );
61 // if ( his ) { histos.push_back(his); }
62 // }
63 
64 // // Perform histo analysis
65 // DaqScopeModeAnalysis anal( iter->first );
66 // DaqScopeModeAlgorithm algo( &anal );
67 // algo.analysis( histos );
68 // data_[iter->first] = anal;
69 // if ( debug ) {
70 // std::stringstream ss;
71 // anal.print( ss );
72 // cout << ss.str() << endl;
73 // }
74 
75 // }
76 
77 // cout << endl // LogTrace(mlDqmClient_)
78 // << "[DaqScopeModeHistograms::" << __func__ << "]"
79 // << " Analyzed histograms for "
80 // << collations().size()
81 // << " FED channels";
82 
83 }
84 
85 // -----------------------------------------------------------------------------
89  const std::string& directory,
90  const sistrip::Granularity& gran ) {
91  cout << endl // LogTrace(mlDqmClient_)
92  << "[DaqScopeModeHistograms::" << __func__ << "]";
93 
94  // Check view
96  if ( view == sistrip::UNKNOWN_VIEW ) { return; }
97 
98  // Analyze histograms
99  histoAnalysis( false );
100 
101  // Extract data to be histogrammed
102  factory_->init( histo, type, view, directory, gran );
103  uint32_t xbins = factory_->extract( data_ );
104 
105  // Create summary histogram (if it doesn't already exist)
106  TH1* summary = histogram( histo, type, view, directory, xbins );
107 
108  // Fill histogram with data
109  factory_->fill( *summary );
110 
111 }
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[]
DaqScopeModeHistograms(const edm::ParameterSet &pset, DQMStore *)
static std::string view(const sistrip::View &)
std::map< uint32_t, DaqScopeModeAnalysis > data_
#define debug
Definition: HDRShower.cc:19
std::auto_ptr< Factory > factory_
tuple cout
Definition: gather_cfg.py:121
void createSummaryHisto(const sistrip::Monitorable &, const sistrip::Presentation &, const std::string &top_level_dir, const sistrip::Granularity &)