14 using namespace sistrip;
26 <<
"[ApvTimingHistograms::" << __func__ <<
"]"
27 <<
" Constructing object...";
34 <<
"[ApvTimingHistograms::" << __func__ <<
"]"
35 <<
" Destructing object...";
42 <<
"[ApvTimingHistograms::" << __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; }
64 iter !=
histos().end(); iter++ ) {
67 if ( iter->second.empty() ) {
69 <<
"[ApvTimingHistograms::" << __func__ <<
"]"
70 <<
" Zero histograms found!";
75 std::vector<TH1*> profs;
76 Histos::const_iterator ihis = iter->second.begin();
77 for ( ; ihis != iter->second.end(); ihis++ ) {
79 if ( prof ) { profs.push_back(prof); }
86 data()[iter->first] = anal;
92 if ( anal->
time() > time_max ) {
93 time_max = anal->
time();
94 device_max = iter->first;
98 if ( anal->
time() < time_min ) {
99 time_min = anal->
time();
100 device_min = iter->first;
110 <<
"[ApvTimingHistograms::" << __func__ <<
"]"
111 <<
" Unable to set maximum time! Found unexpected value: "
118 <<
"[ApvTimingHistograms::" << __func__ <<
"]"
119 <<
" Crate/FEC/Ring/CCU/module/channel: "
126 <<
" has minimum time for tick mark rising edge [ns]: " << time_min;
130 <<
"[ApvTimingHistograms::" << __func__ <<
"]"
131 <<
" Crate/FEC/Ring/CCU/module/channel: "
138 <<
" has maximum time for tick mark rising edge [ns]: " << time_max;
141 <<
"[ApvTimingHistograms::" << __func__ <<
"]"
142 <<
" Difference b/w minimum and maximum times"
143 <<
" for tick mark rising edges [ns] is: " << ( time_max - time_min );
148 for ( ianal =
data().begin(); ianal !=
data().end(); ianal++ ) {
150 if ( !anal ) {
continue; }
151 anal->
refTime( time_max, this->
pset().getParameter<int>(
"TargetDelay") );
152 if ( anal->
isValid() ) { valid++; }
160 <<
"[ApvTimingHistograms::" << __func__ <<
"]"
161 <<
" Analyzed histograms for " <<
histos().size()
162 <<
" FED channels, of which " << valid
163 <<
" (" << 100 * valid /
histos().size()
167 <<
"[ApvTimingHistograms::" << __func__ <<
"]"
168 <<
" No histograms to analyze!";
173 <<
"[ApvTimingHistograms::" << __func__ <<
"]"
174 <<
" Analyzed histograms for " <<
histos().size()
175 <<
" FED channels, of which " << valid
176 <<
" (" << 100 * valid /
histos().size()
178 if ( !errors.empty() ) {
180 std::stringstream ss;
182 std::map<std::string,uint16_t>::const_iterator
ii;
183 for ( ii = errors.begin(); ii != errors.end(); ++
ii ) {
184 ss <<
" " << ii->first <<
": " << ii->second << std::endl;
188 <<
"[ApvTimingHistograms::" << __func__ <<
"]"
189 <<
" Found " << count <<
" errors ("
190 << 100 * count /
histos().size() <<
"%): "
195 <<
"[ApvTimingHistograms::" << __func__ <<
"]"
196 <<
" No histograms to analyze!";
void analysis(const std::vector< TH1 * > &)
const uint16_t & fecRing() const
const edm::ParameterSet & pset() const
const float & refTime() const
Analysis for timing run using APV tick marks.
static const char mlDqmClient_[]
const uint16_t & lldChan() const
const uint16_t & fecSlot() const
static const uint16_t valid_
Utility class that identifies a position within the strip tracker control structure, down to the level of an APV25.
const T & max(const T &a, const T &b)
void histoAnalysis(bool debug)
virtual ~ApvTimingHistograms()
const float & time() const
const uint16_t & fecCrate() const
int extract(std::vector< int > *output, const std::string &dati)
const uint16_t & ccuAddr() const
static const uint16_t invalid_
std::auto_ptr< Factory > factory_
const uint16_t & ccuChan() const
Analysis for timing run using APV tick marks.
const VString & getErrorCodes() const
bool foundTickMark() const
ApvTimingHistograms(const edm::ParameterSet &pset, DQMStore *)
const HistosMap & histos() const