DbuDaqFileSummary.cxx File Reference

#include "DatabaseUpdater/DbuDaqFileSummary.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 <iostream>
#include <cassert>
#include <sstream>
#include "DatabaseUpdater/RunTypeName.h"
#include "OnlineUtil/msgLogLib/msgLog.h"
#include "Util/UtilString.h"
#include "RawData/RawTriggerCodes.h"
#include "DatabaseInterface/DbiResultPtr.tpl"
#include "DatabaseInterface/DbiWriter.tpl"

Go to the source code of this file.

Functions

 CVSID ("$Id: DbuDaqFileSummary.cxx,v 1.14 2007/02/15 14:15:48 rhatcher Exp $ CVSID_DBIRESULTPTR ")
std::ostream & operator<< (std::ostream &os, const DbuDaqFileSummary &ddfs)

Function Documentation

CVSID ( "$Id: DbuDaqFileSummary.  cxx,
v 1.14 2007/02/15 14:15:48 rhatcher Exp $CVSID_DBIRESULTPTR"   
)
std::ostream& operator<< ( std::ostream &  os,
const DbuDaqFileSummary ddfs 
)

Definition at line 58 of file DbuDaqFileSummary.cxx.

References VldTimeStamp::AsString(), Detector::AsString(), DbuDaqFileSummary::fAdcLIBlocks, DbuDaqFileSummary::fBaseName, DbuDaqFileSummary::fBlockCount, DbuDaqFileSummary::fCompressFactor, DbuDaqFileSummary::fCompressLevel, DbuDaqFileSummary::fDetector, DbuDaqFileSummary::fDirName, DbuDaqFileSummary::fErrorDigitBlocks, DbuDaqFileSummary::fErrorDigits, DbuDaqFileSummary::fFirstMonitorTime, DbuDaqFileSummary::fFirstSnarlNum, DbuDaqFileSummary::fFirstSnarlTime, DbuDaqFileSummary::fFirstTimeFrame, DbuDaqFileSummary::fgFmtFlag, DbuDaqFileSummary::fLastMonitorTime, DbuDaqFileSummary::fLastSnarlNum, DbuDaqFileSummary::fLastSnarlTime, DbuDaqFileSummary::fLastTimeFrame, DbuDaqFileSummary::fLightInjRecs, DbuDaqFileSummary::fModTime, DbuDaqFileSummary::fMonitorRecs, DbuDaqFileSummary::fmt_BlockCount, DbuDaqFileSummary::fProcHost, DbuDaqFileSummary::fRecSets, DbuDaqFileSummary::fRecSetsNotLIOnly, DbuDaqFileSummary::fRootVersion, DbuDaqFileSummary::fRun, DbuDaqFileSummary::fSize, DbuDaqFileSummary::fSnarlRecs, DbuDaqFileSummary::fSubRun, DbuDaqFileSummary::fTimingLIBlocks, DbuDaqFileSummary::fTotalDigitBlocks, DbuDaqFileSummary::fTotalDigits, DbuDaqFileSummary::fTrigBitsSeen, and RawTriggerCodes::MaskToString().

00059 {
00060    os << ddfs.GetName() 
00061       << " " << Detector::AsString(ddfs.fDetector)
00062       << " Run " << ddfs.fRun
00063       << " SubRun " << ddfs.fSubRun
00064       << endl
00065       << " RecSets " << ddfs.fRecSets
00066       << " (" << ddfs.fRecSetsNotLIOnly << ")"
00067       << std::right
00068       << "  TimeFrames "
00069       << "# [" << setw(8) << ddfs.fFirstTimeFrame << ":"
00070       << setw(8) << ddfs.fLastTimeFrame << "] "
00071       << endl
00072       << "  Snarls " 
00073       << setw(8) << ddfs.fSnarlRecs << " : "
00074       << "  {" << ddfs.fFirstSnarlTime.AsString("sql") 
00075       << "} {" << ddfs.fLastSnarlTime.AsString("sql") << "}"
00076       << endl
00077       << "   " 
00078       << " TrigBits 0x" << setfill('0') << setw(8) << hex << ddfs.fTrigBitsSeen
00079       << dec << setfill(' ')
00080       << " \"" << RawTriggerCodes::MaskToString(ddfs.fTrigBitsSeen) << "\""
00081       << endl
00082       << "    Snarl # [" << setw(8) << ddfs.fFirstSnarlNum << ":"
00083       << setw(8) << ddfs.fLastSnarlNum << "] "
00084       << endl
00085       << "   "
00086       << " Digits: " 
00087       << ddfs.fTotalDigits << " (" << ddfs.fErrorDigits << ")"
00088       << " in "
00089       << ddfs.fTotalDigitBlocks << " (" << ddfs.fErrorDigitBlocks << ") blocks (errors)"
00090       << endl
00091       << "  Other  "
00092       << setw(8) << (ddfs.fMonitorRecs+ddfs.fLightInjRecs) << " : "
00093       << "  {" << ddfs.fFirstMonitorTime.AsString("sql") 
00094       << "} {" << ddfs.fLastMonitorTime.AsString("sql") << "}"
00095       << endl
00096       << "    Monitors " << ddfs.fMonitorRecs
00097       << " LightInj " << ddfs.fLightInjRecs
00098       << "  (LI Blocks: Adc " << ddfs.fAdcLIBlocks 
00099       << ", Timing " << ddfs.fTimingLIBlocks << ")"
00100       << resetiosflags(ios::adjustfield) // undo "right"/"left"
00101       << endl;
00102 
00103    if ( DbuDaqFileSummary::fgFmtFlag & DbuDaqFileSummary::fmt_BlockCount ) {
00104      os << "  Block Counts:" << endl;
00105      bool doendl = false;
00106      std::map<string,int>::const_iterator mapItr = ddfs.fBlockCount.begin();
00107      while (mapItr != ddfs.fBlockCount.end()) {
00108        string blkName = mapItr->first;
00109        int    blkCnt  = mapItr->second;
00110        os << "    " << std::left << setw(26) << blkName 
00111           << " " << std::right << setw(8) << blkCnt;
00112        if (doendl) os  << endl;
00113        doendl = !doendl; // toggle
00114        mapItr++;  // move on
00115      }
00116      os << std::right;
00117      if (doendl) os  << endl;  // if last line still hanging complete it
00118    }
00119    os << resetiosflags(ios::adjustfield); // undo "right"/"left"
00120 
00121    os << "  BaseName: " << ddfs.fBaseName 
00122       << endl
00123       << "  DirName: " << ddfs.fDirName << endl;
00124 
00125    os << "  Size " << ddfs.fSize << " bytes,"
00126       << " Compression level " << ddfs.fCompressLevel
00127       << " factor " << ddfs.fCompressFactor
00128       << " ROOT " << ddfs.fRootVersion
00129       << endl
00130       << "  ModTime " << ddfs.fModTime.AsString("sql")
00131       << ", processed on " << ddfs.fProcHost
00132       << endl;
00133 
00134    return os;
00135 }


Generated on 15 Jul 2018 for loon by  doxygen 1.6.1