CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions
DumpTools.h File Reference
#include "IOPool/Streamer/interface/MsgTools.h"
#include "IOPool/Streamer/interface/InitMessage.h"
#include "IOPool/Streamer/interface/EventMessage.h"
#include "IOPool/Streamer/interface/DQMEventMessage.h"
#include "IOPool/Streamer/interface/FRDEventMessage.h"

Go to the source code of this file.

Functions

void dumpDQMEventHeader (const DQMEventMsgView *dview)
 
void dumpDQMEventView (const DQMEventMsgView *dview)
 
void dumpEvent (uint8 *buf)
 
void dumpEventHeader (const EventMsgView *eview)
 
void dumpEventIndex (const EventMsgView *eview)
 
void dumpEventView (const EventMsgView *eview)
 
void dumpFRDEventView (const FRDEventMsgView *fview)
 
void dumpInit (uint8 *buf)
 
void dumpInitHeader (const InitMsgView *view)
 
void dumpInitVerbose (const InitMsgView *view)
 
void dumpInitView (const InitMsgView *view)
 
void dumpStartMsg (const InitMsgView *view)
 
void printBits (unsigned char c)
 

Function Documentation

void dumpDQMEventHeader ( const DQMEventMsgView dview)

Definition at line 208 of file DumpTools.cc.

References DQMEventMsgView::adler32_chksum(), DQMEventMsgView::code(), DQMEventMsgView::compressionFlag(), gather_cfg::cout, DQMEventMsgView::eventLength(), DQMEventMsgView::eventNumberAtUpdate(), DQMEventMsgView::fuGuid(), DQMEventMsgView::fuProcessId(), DQMEventMsgView::hostName(), DQMEventMsgView::lumiSection(), DQMEventMsgView::mergeCount(), DQMEventMsgView::protocolVersion(), DQMEventMsgView::releaseTag(), DQMEventMsgView::runNumber(), DQMEventMsgView::size(), DQMEventMsgView::topFolderName(), and DQMEventMsgView::updateNumber().

Referenced by dumpDQMEventView().

209 {
210  std::cout << "code = " << dview->code() << "\n"
211  << "size = " << dview->size() << "\n"
212  << "protocolVersion = " << dview->protocolVersion() << "\n"
213  << "run = " << dview->runNumber() << "\n"
214  << "event = " << dview->eventNumberAtUpdate() << "\n"
215  << "lumi = " << dview->lumiSection() << "\n"
216  << "update = " << dview->updateNumber() << "\n"
217  << "checksum = " << dview->adler32_chksum() << "\n"
218  << "host name= " << dview->hostName() << "\n"
219  << "compressionFlag = " << dview->compressionFlag() << "\n"
220  << "fuProcessId = " << dview->fuProcessId() << "\n"
221  << "fuGuid = 0x" << std::hex << dview->fuGuid() << std::dec << "\n"
222  << "mergeCount = " << dview->mergeCount() << "\n"
223  << "release = " << dview->releaseTag() << "\n"
224  << "topFolder = " << dview->topFolderName() << "\n"
225  << "event length = " << dview->eventLength() << "\n";
226  std::cout.flush();
227  }
uint32 protocolVersion() const
uint32 eventNumberAtUpdate() const
uint32 adler32_chksum() const
uint32 updateNumber() const
std::string topFolderName() const
uint32 eventLength() const
uint32 fuGuid() const
uint32 compressionFlag() const
std::string releaseTag() const
uint32 lumiSection() const
uint32 code() const
tuple cout
Definition: gather_cfg.py:121
uint32 fuProcessId() const
std::string hostName() const
uint32 size() const
uint32 runNumber() const
uint32 mergeCount() const
void dumpDQMEventView ( const DQMEventMsgView dview)

Definition at line 229 of file DumpTools.cc.

References prof2calltree::count, gather_cfg::cout, dumpDQMEventHeader(), customizeTrackingMonitorSeedNumber::idx, DQMEventMsgView::meCount(), mergeVDriftHistosByStation::name, AlCaHLTBitMon_QueryRunRegistry::string, and DQMEventMsgView::subFolderNames().

230 {
231  std::cout << "\n>>>>> DQMEvent Message Dump (begin) >>>>>" << std::endl;
232  dumpDQMEventHeader(dview);
233 
234  boost::shared_ptr< std::vector<std::string> > subFolders =
235  dview->subFolderNames();
236  for (uint32 idx = 0; idx < subFolders->size(); idx++) {
237  std::string name = subFolders->at(idx);
238  uint32 count = dview->meCount(name);
239  std::cout << "Subfolder " << name << " has " << count
240  << " monitor elements." << std::endl;
241  }
242 
243  std::cout << ">>>>> DQMEvent Message Dump (end) >>>>>" << std::endl;
244  std::cout.flush();
245 }
uint32 meCount(std::string const &subFolderName) const
unsigned int uint32
Definition: MsgTools.h:13
tuple idx
DEBUGGING if hasattr(process,&quot;trackMonIterativeTracking2012&quot;): print &quot;trackMonIterativeTracking2012 D...
void dumpDQMEventHeader(const DQMEventMsgView *dview)
Definition: DumpTools.cc:208
boost::shared_ptr< std::vector< std::string > > subFolderNames() const
tuple cout
Definition: gather_cfg.py:121
void dumpEvent ( uint8 buf)

Definition at line 193 of file DumpTools.cc.

References gather_cfg::cout, and dumpEventHeader().

Referenced by evf::FUResourceTable::buildResource().

194 {
195  EventMsgView eview(buf);
196 
197  dumpEventHeader(&eview);
198 
199  //const uint8* edata = eview.eventData();
200  //std::cout << "\nevent data=\n(";
201  //std::copy(&edata[0],&edata[0]+eview.eventLength(),
202  // std::ostream_iterator<char>(std::cout,""));
203  //std::cout << ")\n";
204  std::cout.flush();
205 
206 }
void dumpEventHeader(const EventMsgView *eview)
Definition: DumpTools.cc:142
tuple cout
Definition: gather_cfg.py:121
void dumpEventHeader ( const EventMsgView eview)

Definition at line 142 of file DumpTools.cc.

References EventMsgView::adler32_chksum(), EventMsgView::code(), edm::copy_all(), gather_cfg::cout, EventMsgView::droppedEventsCount(), EventMsgView::event(), EventMsgView::eventLength(), EventMsgView::hltCount(), EventMsgView::hltTriggerBits(), EventMsgView::hostName(), i, EventMsgView::l1TriggerBits(), EventMsgView::lumi(), EventMsgView::origDataSize(), EventMsgView::outModId(), printBits(), EventMsgView::protocolVersion(), EventMsgView::run(), and EventMsgView::size().

Referenced by dumpEvent(), dumpEventIndex(), and dumpEventView().

143 {
144  std::cout << "code=" << eview->code() << "\n"
145  << "size=" << eview->size() << "\n"
146  << "protocolVersion=" << eview->protocolVersion() << "\n"
147  << "run=" << eview->run() << "\n"
148  << "event=" << eview->event() << "\n"
149  << "lumi=" << eview->lumi() << "\n"
150  << "origDataSize=" << eview->origDataSize() << "\n"
151  << "outModId=0x" << std::hex << eview->outModId() << std::dec << "\n"
152  << "adler32 chksum= " << eview->adler32_chksum() << "\n"
153  << "host name= " << eview->hostName() << "\n"
154  << "event length=" << eview->eventLength() << "\n"
155  << "droppedEventsCount=" << eview->droppedEventsCount() << "\n";
156 
157  std::vector<bool> l1_out;
158  eview->l1TriggerBits(l1_out);
159 
160  std::cout << "\nl1 size= " << l1_out.size() << "\n l1 bits=\n";
161  edm::copy_all(l1_out,std::ostream_iterator<bool>(std::cout," "));
162 
163  std::vector<unsigned char> hlt_out;
164  if (eview->hltCount() > 0) {hlt_out.resize(1 + (eview->hltCount()-1)/4);}
165  eview->hltTriggerBits(&hlt_out[0]);
166 
167  std::cout << "\nhlt Count:" << eview->hltCount();
168  std::cout << "\nhlt bits=\n(";
169  for(int i=(hlt_out.size()-1); i != -1 ; --i)
170  printBits(hlt_out[i]);
171  std::cout << ")\n";
172  std::cout.flush();
173 }
int i
Definition: DBlmapReader.cc:9
uint32 lumi() const
Definition: EventMessage.cc:85
void printBits(unsigned char c)
Definition: DumpTools.cc:134
void hltTriggerBits(uint8 *put_here) const
std::string hostName() const
uint32 outModId() const
Definition: EventMessage.cc:97
uint32 run() const
Definition: EventMessage.cc:73
uint32 adler32_chksum() const
Definition: EventMessage.h:95
uint32 eventLength() const
Definition: EventMessage.h:80
uint32 code() const
Definition: EventMessage.h:75
uint32 event() const
Definition: EventMessage.cc:79
uint32 hltCount() const
Definition: EventMessage.h:93
uint32 droppedEventsCount() const
uint32 size() const
Definition: EventMessage.h:76
uint32 origDataSize() const
Definition: EventMessage.cc:91
Func copy_all(ForwardSequence &s, Func f)
wrappers for copy
Definition: Algorithms.h:24
tuple cout
Definition: gather_cfg.py:121
void l1TriggerBits(std::vector< bool > &put_here) const
uint32 protocolVersion() const
Definition: EventMessage.cc:67
void dumpEventIndex ( const EventMsgView eview)

Definition at line 187 of file DumpTools.cc.

References gather_cfg::cout, and dumpEventHeader().

188 {
189  dumpEventHeader(eview);
190  std::cout.flush();
191 }
void dumpEventHeader(const EventMsgView *eview)
Definition: DumpTools.cc:142
tuple cout
Definition: gather_cfg.py:121
void dumpEventView ( const EventMsgView eview)

Definition at line 175 of file DumpTools.cc.

References gather_cfg::cout, and dumpEventHeader().

176  {
177  dumpEventHeader(eview);
178  //const uint8* edata = eview->eventData();
179  //std::cout << "\nevent data=\n(";
180  //std::copy(&edata[0],&edata[0]+eview->eventLength(),
181  // std::ostream_iterator<char>(std::cout,""));
182  //std::cout << ")\n";
183  std::cout.flush();
184 
185 }
void dumpEventHeader(const EventMsgView *eview)
Definition: DumpTools.cc:142
tuple cout
Definition: gather_cfg.py:121
void dumpFRDEventView ( const FRDEventMsgView fview)

Definition at line 247 of file DumpTools.cc.

References gather_cfg::cout, FRDEventMsgView::event(), FRDEventMsgView::lumi(), FRDEventMsgView::run(), FRDEventMsgView::size(), and FRDEventMsgView::version().

248 {
249  std::cout << "\n>>>>> FRDEvent Message Dump (begin) >>>>>" << std::endl;
250  std::cout.flush();
251 
252  std::cout << "size = " << fview->size() << "\n"
253  << "version = " << fview->version() << "\n"
254  << "run = " << fview->run() << "\n"
255  << "lumi = " << fview->lumi() << "\n"
256  << "event = " << fview->event() << "\n";
257  std::cout.flush();
258 
259  std::cout << ">>>>> FRDEvent Message Dump (end) >>>>>" << std::endl;
260  std::cout.flush();
261 }
uint32 lumi() const
uint32 size() const
uint32 run() const
uint32 version() const
tuple cout
Definition: gather_cfg.py:121
uint32 event() const
void dumpInit ( uint8 buf)

Definition at line 122 of file DumpTools.cc.

References gather_cfg::cout, InitMsgView::descLength(), and dumpInitHeader().

123 {
124  InitMsgView view(buf);
125  dumpInitHeader(&view);
126 
127  std::cout << "desc len = " << view.descLength() << "\n";
128  //const uint8* pos = view.descData();
129  //std::copy(pos,pos+view.descLength(),std::ostream_iterator<uint8>(std::cout,""));
130  //std::cout << "\n";
131  std::cout.flush();
132 }
void dumpInitHeader(const InitMsgView *view)
Definition: DumpTools.cc:17
tuple cout
Definition: gather_cfg.py:121
void dumpInitHeader ( const InitMsgView view)

File contains simple tools to dump Init and Event Messages on screen.

Definition at line 17 of file DumpTools.cc.

References InitMsgView::adler32_chksum(), InitMsgView::code(), edm::copy_all(), gather_cfg::cout, cms::Digest::digest(), InitMsgView::hltTriggerNames(), InitMsgView::hltTriggerSelections(), InitMsgView::hostName(), InitMsgView::l1TriggerNames(), InitMsgView::outputModuleId(), InitMsgView::outputModuleLabel(), InitMsgView::processName(), InitMsgView::protocolVersion(), InitMsgView::pset(), diffTwoXMLs::r1, InitMsgView::releaseTag(), InitMsgView::run(), InitMsgView::size(), AlCaHLTBitMon_QueryRunRegistry::string, and cms::MD5Result::toString().

Referenced by dumpInit(), dumpInitVerbose(), dumpInitView(), and dumpStartMsg().

18 {
19  std::cout
20  << "code = " << view->code() << ", "
21  << "size = " << view->size() << "\n"
22  << "run = " << view->run() << ", "
23  << "proto = " << view->protocolVersion() << "\n"
24  << "release = " << view->releaseTag() << "\n"
25  << "processName = " << view->processName() << "\n";
26  if (view->protocolVersion() >= 5) {
27  std::cout << "outModuleLabel = " << view->outputModuleLabel() << "\n";
28  }
29  if (view->protocolVersion() >= 6) {
30  std::cout << "outputModuleId=0x" << std::hex << view->outputModuleId()
31  << std::dec << std::endl;
32  }
33  if (view->protocolVersion() >= 8) {
34  std::cout << "Checksum for Registry data = " << view->adler32_chksum()
35  << " Hostname = " << view->hostName() << std::endl;
36  }
37 
38  //PSet 16 byte non-printable representation, stored in message.
39  uint8 vpset[16];
40  view->pset(vpset);
41 
42  //Lets convert it to printable hex form
43  std::string pset_str(vpset, vpset+sizeof(vpset));
44  pset_str += '\0';
45  cms::Digest dig(pset_str);
46  cms::MD5Result r1 = dig.digest();
47  std::string hexy = r1.toString();
48  std::cout << "PSetID= " << hexy << std::endl;
49 
50  Strings vhltnames,vhltselections,vl1names;
51  view->hltTriggerNames(vhltnames);
52  if (view->protocolVersion() >= 5) {
53  view->hltTriggerSelections(vhltselections);
54  }
55  view->l1TriggerNames(vl1names);
56 
57  std::cout << "HLT names :- \n ";
58  edm::copy_all(vhltnames,std::ostream_iterator<std::string>(std::cout,"\n"));
59 
60  if (view->protocolVersion() >= 5) {
61  std::cout << "HLT selections :- \n ";
62  edm::copy_all(vhltselections,std::ostream_iterator<std::string>(std::cout,"\n"));
63  }
64 
65  std::cout << "L1 names :- \n ";
66  edm::copy_all(vl1names,std::ostream_iterator<std::string>(std::cout,"\n"));
67  std::cout << "\n";
68  std::cout.flush();
69 
70 }
std::vector< std::string > Strings
Definition: MsgTools.h:18
void hltTriggerNames(Strings &save_here) const
Definition: InitMessage.cc:142
uint32 adler32_chksum() const
Definition: InitMessage.h:90
std::string releaseTag() const
Definition: InitMessage.cc:118
std::string hostName() const
Definition: InitMessage.cc:186
void l1TriggerNames(Strings &save_here) const
Definition: InitMessage.cc:156
uint32 protocolVersion() const
Definition: InitMessage.cc:106
std::string outputModuleLabel() const
Definition: InitMessage.cc:132
std::string toString() const
Definition: Digest.cc:87
unsigned char uint8
Definition: MsgTools.h:11
uint32 outputModuleId() const
Definition: InitMessage.h:76
uint32 code() const
Definition: InitMessage.h:66
Func copy_all(ForwardSequence &s, Func f)
wrappers for copy
Definition: Algorithms.h:24
std::string processName() const
Definition: InitMessage.cc:123
uint32 run() const
Definition: InitMessage.cc:100
tuple cout
Definition: gather_cfg.py:121
uint32 size() const
Definition: InitMessage.h:67
void hltTriggerSelections(Strings &save_here) const
Definition: InitMessage.cc:147
void pset(uint8 *put_here) const
Definition: InitMessage.cc:112
void dumpInitVerbose ( const InitMsgView view)

Definition at line 91 of file DumpTools.cc.

References edm::BranchDescription::branchName(), gather_cfg::cout, InitMsgView::descData(), InitMsgView::descLength(), dumpInitHeader(), edm::getTClass(), edm::BranchDescription::init(), and sd.

92 {
93  std::cout << ">>>>> INIT Message Dump (begin) >>>>>" << std::endl;
94  dumpInitHeader(view);
95 
96  TClass* desc = getTClass(typeid(SendJobHeader));
97  TBufferFile xbuf(TBuffer::kRead, view->descLength(),
98  (char*)view->descData(), kFALSE);
99  std::auto_ptr<SendJobHeader> sd((SendJobHeader*)xbuf.ReadObjectAny(desc));
100 
101  if (sd.get() == 0) {
102  std::cout << "Unable to determine the product registry - "
103  << "Registry deserialization error." << std::endl;
104  }
105  else {
106  std::cout << "Branch Descriptions:" << std::endl;
107  SendDescs const& descs = sd->descs();
108  SendDescs::const_iterator iDesc(descs.begin()), eDesc(descs.end());
109  while (iDesc != eDesc) {
110  BranchDescription branchDesc = *iDesc;
111  branchDesc.init();
112  //branchDesc.write(std::cout);
113  std::cout << branchDesc.branchName() << std::endl;
114  iDesc++;
115  }
116  }
117 
118  std::cout << "<<<<< INIT Message Dump (end) <<<<<" << std::endl;
119  std::cout.flush();
120 }
void dumpInitHeader(const InitMsgView *view)
Definition: DumpTools.cc:17
const uint8 * descData() const
Definition: InitMessage.h:87
std::string & branchName() const
std::vector< BranchDescription > SendDescs
TClass * getTClass(const std::type_info &ti)
Definition: ClassFiller.cc:77
double sd
tuple cout
Definition: gather_cfg.py:121
uint32 descLength() const
Definition: InitMessage.h:86
void dumpInitView ( const InitMsgView view)

Definition at line 72 of file DumpTools.cc.

References gather_cfg::cout, InitMsgView::descLength(), and dumpInitHeader().

73 {
74 
75 
76  dumpInitHeader(view);
77  std::cout << "desc len = " << view->descLength() << "\n";
78  //const uint8* pos = view->descData();
79  //std::copy(pos,pos+view->descLength(),std::ostream_iterator<uint8>(std::cout,""));
80  //std::cout << "\n";
81  std::cout.flush();
82 
83 }
void dumpInitHeader(const InitMsgView *view)
Definition: DumpTools.cc:17
tuple cout
Definition: gather_cfg.py:121
uint32 descLength() const
Definition: InitMessage.h:86
void dumpStartMsg ( const InitMsgView view)

Definition at line 85 of file DumpTools.cc.

References gather_cfg::cout, and dumpInitHeader().

86 {
87  dumpInitHeader(view);
88  std::cout.flush();
89 }
void dumpInitHeader(const InitMsgView *view)
Definition: DumpTools.cc:17
tuple cout
Definition: gather_cfg.py:121
void printBits ( unsigned char  c)

Definition at line 134 of file DumpTools.cc.

References gather_cfg::cout, and i.

Referenced by dumpEventHeader().

134  {
135 
136  for (int i = 7; i >= 0; --i) {
137  int bit = ((c >> i) & 1);
138  std::cout << " "<<bit;
139  }
140 }
int i
Definition: DBlmapReader.cc:9
tuple cout
Definition: gather_cfg.py:121