#include <AdcChannelDumper.h>
Definition at line 22 of file AdcChannelDumper.h.
AdcChannelDumper::~AdcChannelDumper |
( |
| ) |
|
|
override |
bool AdcChannelDumper::updateWithView |
( |
| ) |
const |
|
inlineoverridevirtual |
Reimplemented from AdcChannelTool.
Definition at line 46 of file AdcChannelDumper_tool.cc.
49 bool newfile = pout ==
nullptr;
54 pout =
new ofstream(fname.c_str());
56 if ( pout ==
nullptr )
return res.
setStatus(2);
59 string sbad =
"<Unknown>";
60 out << pre <<
" Run: ";
62 else out << acd.
run();
67 out << pre <<
" Event: ";
69 else out << acd.
event();
71 out << pre <<
" Channel: ";
75 out << pre <<
" Pedestal: ";
84 for (
bool keep : acd.
signal )
if ( keep ) ++nkeep;
86 if ( nprp > nsam ) nsam = nprp;
89 if ( maxsam < nsam ) nsam = maxsam;
91 Index widx = 2 + log10(nsam);
92 if ( widx < 6 ) widx = 6;
98 out << pre <<
" Nraw: " <<
setw(wcnt) << nraw <<
endl;
99 out << pre <<
" Nprep: " <<
setw(wcnt) << nprp <<
endl;
100 out << pre <<
" Nsig: " <<
setw(wcnt) << acd.
signal.size() <<
endl;
101 out << pre <<
" Nkeep: " <<
setw(wcnt) << nkeep <<
endl;
102 out << pre <<
" Nroi: " <<
setw(wcnt) << acd.
rois.size() <<
endl;
107 <<
setw(widx) <<
"Data:" 108 <<
setw(wraw) <<
"Raw" 109 <<
setw(wflg) <<
"Flg" 110 <<
setw(wprp) <<
"Prepared" 113 for (
Index isam=0; isam<nsam; ++isam ) {
114 ostringstream ssline;
115 ssline <<
setw(widx) << isam;
116 if ( isam < nraw ) ssline <<
setw(wraw) << acd.
raw[isam];
117 else ssline <<
setw(wraw) <<
"";
118 if ( isam < nflg ) ssline <<
setw(wflg) << acd.
flags[isam];
119 else ssline <<
setw(wflg) <<
"";
121 else ssline <<
setw(wprp) <<
"";
122 if ( isam < nsig ) ssline <<
setw(wsig) << acd.
signal[isam];
123 else ssline <<
setw(wsig) <<
"";
124 out << pre << ssline.str() <<
endl;
126 if ( newfile )
delete pout;
DataMap & setStatus(int stat)
Q_EXPORT QTSManip setprecision(int p)
AdcSignalVector dftphases
Q_EXPORT QTSManip setw(int w)
static Index badChannel()
QTextStream & endl(QTextStream &s)
int AdcChannelDumper::m_MaxSample |
|
private |
bool AdcChannelDumper::m_NewFile |
|
private |
std::ostream* AdcChannelDumper::m_pout |
|
private |
The documentation for this class was generated from the following files: