#include "DataFormats/Scalers/interface/DcsStatus.h"
#include "DataFormats/Scalers/interface/ScalersRaw.h"
#include <cstdio>
#include <ostream>
Go to the source code of this file.
Functions | |
std::ostream & | operator<< (std::ostream &s, const DcsStatus &c) |
Pretty-print operator for DcsStatus. |
std::ostream& operator<< | ( | std::ostream & | s, |
const DcsStatus & | c | ||
) |
Pretty-print operator for DcsStatus.
Definition at line 103 of file DcsStatus.cc.
References DcsStatus::bunchNumber(), DcsStatus::collectionTime(), DcsStatus::eventID(), i, geometryCSVtoXML::line, DcsStatus::magnetCurrent(), DcsStatus::magnetTemperature(), DcsStatus::nPartitions, DcsStatus::partitionList, DcsStatus::partitionName, DcsStatus::ready(), alignCSCRings::s, DcsStatus::sourceID(), DcsStatus::trigType(), and DcsStatus::version().
{ char zeit[128]; char line[128]; struct tm * hora; s << "DcsStatus Version: " << c.version() << " SourceID: "<< c.sourceID() << std::endl; timespec ts = c.collectionTime(); hora = gmtime(&ts.tv_sec); strftime(zeit, sizeof(zeit), "%Y.%m.%d %H:%M:%S", hora); sprintf(line, " CollectionTime: %s.%9.9d", zeit, (int)ts.tv_nsec); s << line << std::endl; sprintf(line, " TrigType: %d EventID: %d BunchNumber: %d", c.trigType(), c.eventID(), c.bunchNumber()); s << line << std::endl; sprintf(line," MagnetCurrent: %e MagnetTemperature: %e", c.magnetCurrent(), c.magnetTemperature()); s << line << std::endl; sprintf(line," Ready: %d 0x%8.8X", c.ready(), c.ready()); s << line << std::endl; for ( int i=0; i<DcsStatus::nPartitions; i++) { if ( c.ready(DcsStatus::partitionList[i])) { sprintf(line," %2d %6s: READY", i, DcsStatus::partitionName[i]); } else { sprintf(line," %2d %6s: NOT READY", i, DcsStatus::partitionName[i]); } s << line << std::endl; } return s; }