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 207 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::protocolVersion(), DQMEventMsgView::releaseTag(), DQMEventMsgView::reserved(), DQMEventMsgView::runNumber(), DQMEventMsgView::size(), DQMEventMsgView::topFolderName(), and DQMEventMsgView::updateNumber().

Referenced by dumpDQMEventView().

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

Definition at line 228 of file DumpTools.cc.

References prof2calltree::count, gather_cfg::cout, dumpDQMEventHeader(), DQMEventMsgView::meCount(), AlCaRecoCosmics_cfg::name, and DQMEventMsgView::subFolderNames().

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

Definition at line 192 of file DumpTools.cc.

References gather_cfg::cout, and dumpEventHeader().

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

193 {
194  EventMsgView eview(buf);
195 
196  dumpEventHeader(&eview);
197 
198  //const uint8* edata = eview.eventData();
199  //std::cout << "\nevent data=\n(";
200  //std::copy(&edata[0],&edata[0]+eview.eventLength(),
201  // std::ostream_iterator<char>(std::cout,""));
202  //std::cout << ")\n";
203  std::cout.flush();
204 
205 }
void dumpEventHeader(const EventMsgView *eview)
Definition: DumpTools.cc:142
tuple cout
Definition: gather_cfg.py:41
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::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 
156  std::vector<bool> l1_out;
157  eview->l1TriggerBits(l1_out);
158 
159  std::cout << "\nl1 size= " << l1_out.size() << "\n l1 bits=\n";
160  edm::copy_all(l1_out,std::ostream_iterator<bool>(std::cout," "));
161 
162  std::vector<unsigned char> hlt_out;
163  if (eview->hltCount() > 0) {hlt_out.resize(1 + (eview->hltCount()-1)/4);}
164  eview->hltTriggerBits(&hlt_out[0]);
165 
166  std::cout << "\nhlt Count:" << eview->hltCount();
167  std::cout << "\nhlt bits=\n(";
168  for(int i=(hlt_out.size()-1); i != -1 ; --i)
169  printBits(hlt_out[i]);
170  std::cout << ")\n";
171  std::cout.flush();
172 }
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:84
uint32 eventLength() const
Definition: EventMessage.h:70
uint32 code() const
Definition: EventMessage.h:65
uint32 event() const
Definition: EventMessage.cc:79
uint32 hltCount() const
Definition: EventMessage.h:82
uint32 size() const
Definition: EventMessage.h:66
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:41
void l1TriggerBits(std::vector< bool > &put_here) const
uint32 protocolVersion() const
Definition: EventMessage.cc:67
void dumpEventIndex ( const EventMsgView eview)

Definition at line 186 of file DumpTools.cc.

References gather_cfg::cout, and dumpEventHeader().

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

Definition at line 174 of file DumpTools.cc.

References gather_cfg::cout, and dumpEventHeader().

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

Definition at line 246 of file DumpTools.cc.

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

247 {
248  std::cout << "\n>>>>> FRDEvent Message Dump (begin) >>>>>" << std::endl;
249  std::cout.flush();
250 
251  std::cout << "size = " << fview->size() << "\n"
252  << "version = " << fview->version() << "\n"
253  << "run = " << fview->run() << "\n"
254  << "lumi = " << fview->lumi() << "\n"
255  << "event = " << fview->event() << "\n";
256  std::cout.flush();
257 
258  std::cout << ">>>>> FRDEvent Message Dump (end) >>>>>" << std::endl;
259  std::cout.flush();
260 }
uint32 lumi() const
uint32 size() const
uint32 run() const
uint32 version() const
tuple cout
Definition: gather_cfg.py:41
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:41
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(), InitMsgView::releaseTag(), InitMsgView::run(), InitMsgView::size(), 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:122
uint32 adler32_chksum() const
Definition: InitMessage.h:89
std::string releaseTag() const
Definition: InitMessage.cc:98
std::string hostName() const
Definition: InitMessage.cc:166
void l1TriggerNames(Strings &save_here) const
Definition: InitMessage.cc:136
uint32 protocolVersion() const
Definition: InitMessage.cc:86
std::string outputModuleLabel() const
Definition: InitMessage.cc:112
std::string toString() const
Definition: Digest.cc:87
unsigned char uint8
Definition: MsgTools.h:11
uint32 outputModuleId() const
Definition: InitMessage.h:75
uint32 code() const
Definition: InitMessage.h:65
Func copy_all(ForwardSequence &s, Func f)
wrappers for copy
Definition: Algorithms.h:24
std::string processName() const
Definition: InitMessage.cc:103
uint32 run() const
Definition: InitMessage.cc:80
tuple cout
Definition: gather_cfg.py:41
uint32 size() const
Definition: InitMessage.h:66
void hltTriggerSelections(Strings &save_here) const
Definition: InitMessage.cc:127
void pset(uint8 *put_here) const
Definition: InitMessage.cc:92
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(), and edm::BranchDescription::init().

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:86
std::string & branchName() const
std::vector< BranchDescription > SendDescs
TClass * getTClass(const std::type_info &ti)
Definition: ClassFiller.cc:87
tuple cout
Definition: gather_cfg.py:41
uint32 descLength() const
Definition: InitMessage.h:85
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:41
uint32 descLength() const
Definition: InitMessage.h:85
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:41
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:41