#include "DatabaseUpdater/DbuRunSummary.h"#include "DatabaseUpdater/DbuSignalHandler.h"#include "MessageService/MsgService.h"#include "DatabaseInterface/DbiOutRowStream.h"#include "DatabaseInterface/DbiResultSet.h"#include "DatabaseInterface/DbiValidityRec.h"#include "DatabaseInterface/DbiString.h"#include "DatabaseUpdater/DbuDaqConfigFilesText.h"#include "DatabaseUpdater/DbuDaqFileSummary.h"#include "TMath.h"#include <iostream>#include <cassert>#include "DatabaseUpdater/RunTypeName.h"#include "OnlineUtil/msgLogLib/msgLog.h"#include "Util/UtilString.h"#include "DatabaseInterface/DbiResultPtr.tpl"#include "DatabaseInterface/DbiWriter.tpl"Go to the source code of this file.
Functions | |
| CVSID ("$Id: DbuRunSummary.cxx,v 1.13 2007/02/15 14:15:48 rhatcher Exp $ CVSID_DBIRESULTPTR ") | |
| std::ostream & | operator<< (std::ostream &os, const DbuRunSummary &drs) |
|
||||||||||||
|
|
|
||||||||||||
|
Definition at line 63 of file DbuRunSummary.cxx. 00064 {
00065
00066 const char* countMatchMsg = "[consistent]";
00067 bool rmatch =
00068 ( drs.fRunEndSnarls == drs.CalcSnarls() ) &&
00069 ( drs.fRunEndNonSnarls == drs.CalcNonSnarls() );
00070 if ( !rmatch ) {
00071 countMatchMsg = "[MISMATCH]";
00072 // the DAQ RawRunEndBlock sometimes doesn't count the monitor record
00073 // that contains itself so their count is off by one
00074 bool rmatchClose =
00075 ( drs.fRunEndSnarls == drs.CalcSnarls() ) &&
00076 ( drs.fRunEndNonSnarls+1 == drs.CalcNonSnarls() );
00077 if ( rmatchClose) countMatchMsg = "[DAQ off-by-one error]";
00078 }
00079
00080 os << drs.GetName()
00081 << " " << Detector::AsString(drs.fDetector)
00082 << " Run " << drs.fRun
00083 << " LastSubRun " << drs.fLastSubRun
00084 << " RunType " << RunTypeName(drs.fRunType,drs.fDetector,drs.fRun)
00085 << " (0x" << hex << drs.fRunType << dec << ")"
00086 << endl
00087 << " {" << drs.fStartTime << "} {" << drs.fEndTime << "}"
00088 << endl
00089 << " Snarls " << drs.fRunEndSnarls << " (" << drs.CalcSnarls() << ") "
00090 << " NonSnarls " << drs.fRunEndNonSnarls << " (" << drs.CalcNonSnarls() << ") "
00091 << countMatchMsg
00092 << endl
00093 << " TermCode " << drs.fTermCode
00094 << " Errors " << drs.fNErrs
00095 << " TimeFrames " << drs.fTimeFrames
00096 << " Dropped " << drs.fDroppedFrames
00097 << " Consistency 0x" << hex << drs.fConsistency << dec
00098 << endl;
00099
00100 if ( DbuRunSummary::fgFmtFlag & DbuRunSummary::fmt_RunComment ) {
00101 os << " RunComment: \"" << drs.fRunComment << "\"" << endl;
00102 }
00103 if ( DbuRunSummary::fgFmtFlag & DbuRunSummary::fmt_RunPrepare ) {
00104 os << " RunPrepare: \"" << drs.fRunPrepare << "\"" << endl;
00105 }
00106 if ( DbuRunSummary::fgFmtFlag & DbuRunSummary::fmt_AuxConfigText ) {
00107 os << " AuxConfigFiles: \"" << drs.fAuxConfigText << "\"" << endl;
00108 }
00109 if ( DbuRunSummary::fgFmtFlag & DbuRunSummary::fmt_ConfigFilesText ) {
00110 os << " ConfigFilesText:" << endl << *drs.fDbuDaqConfigFilesText;
00111 }
00112 else {
00113 const DbuDaqConfigFilesText* ddcft = drs.fDbuDaqConfigFilesText;
00114 os << " ConfigFilesText:" << endl
00115 << ddcft->GetName() << " SeqNo " << ddcft->fSeqNo
00116 << " MD5 \"" << ddcft->fMD5 << "\" " << endl
00117 << " Text [actual text suppressed]" << endl;
00118 }
00119
00120 if ( DbuRunSummary::fgFmtFlag & DbuRunSummary::fmt_DaqFiles ) {
00121 for (size_t k=0; k < drs.fDbuDaqFiles.size(); ++k) {
00122 const DbuDaqFileSummary* fs = drs.fDbuDaqFiles[k];
00123 if (fs) os << " [" << setw(2) << k << "] " << *fs;
00124 }
00125 }
00126
00127 return os;
00128 }
|
1.3.9.1