14 using namespace sistrip;
26 <<
"[OptoScanHistograms::" << __func__ <<
"]"
27 <<
" Constructing object...";
34 <<
"[OptoScanHistograms::" << __func__ <<
"]"
35 <<
" Denstructing object...";
42 <<
"[OptoScanHistograms::" << __func__ <<
"]";
46 HistosMap::const_iterator iter;
47 Analyses::iterator ianal;
48 std::map<std::string,uint16_t>
errors;
51 for ( ianal =
data().
begin(); ianal !=
data().end(); ianal++ ) {
52 if ( ianal->second ) {
delete ianal->second; }
58 iter !=
histos().end(); iter++ ) {
61 if ( iter->second.empty() ) {
63 <<
"[OptoScanHistograms::" << __func__ <<
"]"
64 <<
" Zero histograms found!";
69 std::vector<TH1*> profs;
70 Histos::const_iterator ihis = iter->second.begin();
71 for ( ; ihis != iter->second.end(); ihis++ ) {
73 if ( prof ) { profs.push_back(prof); }
80 data()[iter->first] = anal;
81 if ( anal->
isValid() ) { valid++; }
90 <<
"[OptoScanHistograms::" << __func__ <<
"]"
91 <<
" Analyzed histograms for " <<
histos().size()
92 <<
" FED channels, of which " << valid
93 <<
" (" << 100 * valid /
histos().size()
97 <<
"[OptoScanHistograms::" << __func__ <<
"]"
98 <<
" No histograms to analyze!";
103 <<
"[OptoScanHistograms::" << __func__ <<
"]"
104 <<
" Analyzed histograms for " <<
histos().size()
105 <<
" FED channels, of which " << valid
106 <<
" (" << 100 * valid /
histos().size()
108 if ( !errors.empty() ) {
110 std::stringstream
ss;
112 std::map<std::string,uint16_t>::const_iterator
ii;
113 for ( ii = errors.begin(); ii != errors.end(); ++
ii ) {
114 ss <<
" " << ii->first <<
": " << ii->second << std::endl;
118 <<
"[OptoScanHistograms::" << __func__ <<
"]"
119 <<
" Found " << count <<
" errors ("
120 << 100 * count /
histos().size() <<
"%): "
125 <<
"[OptoScanHistograms::" << __func__ <<
"]"
126 <<
" No histograms to analyze!";
134 Analyses::iterator ianal =
data().begin();
135 Analyses::iterator janal =
data().end();
136 for ( ; ianal != janal; ++ianal ) {
137 if ( ianal->second ) {
138 std::stringstream
ss;
139 if ( ianal->second->isValid() ) {
140 ianal->second->print( ss );
143 ianal->second->print( ss, 0 );
144 ianal->second->print( ss, 1 );
145 ianal->second->print( ss, 2 );
146 ianal->second->print( ss, 3 );
Histogram-based analysis for opto bias/gain scan.
void analysis(const std::vector< TH1 * > &)
const edm::ParameterSet & pset() const
OptoScanHistograms(const edm::ParameterSet &pset, DQMStore *)
static const char mlDqmClient_[]
int extract(std::vector< int > *output, const std::string &dati)
virtual ~OptoScanHistograms()
std::auto_ptr< Factory > factory_
const VString & getErrorCodes() const
void histoAnalysis(bool debug)
const HistosMap & histos() const