CMS 3D CMS Logo

Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
edm::streamer Namespace Reference

Namespaces

 MsgTools
 

Classes

struct  EventHeader
 
class  EventMsgBuilder
 
class  EventMsgView
 
struct  FRDEventHeader_V1
 
struct  FRDEventHeader_V2
 
struct  FRDEventHeader_V3
 
struct  FRDEventHeader_V4
 
struct  FRDEventHeader_V5
 
struct  FRDEventHeader_V6
 
class  FRDEventMsgView
 
struct  FRDFileHeader_v1
 
struct  FRDFileHeader_v2
 
struct  FRDFileHeaderContent_v1
 
struct  FRDFileHeaderContent_v2
 
struct  FRDFileHeaderIdentifier
 
struct  Header
 
class  HeaderView
 
struct  InitHeader
 
class  InitMsgBuilder
 
class  InitMsgView
 
class  OutputFile
 
class  RootDebug
 
struct  SerializeDataBuffer
 
class  StreamerFileReader
 
class  StreamerFileWriter
 
class  StreamerInputFile
 
class  StreamerInputModule
 
class  StreamerInputSource
 
class  StreamerOutputFile
 
class  StreamerOutputModule
 
class  StreamerOutputModuleBase
 
class  StreamerOutputModuleCommon
 
class  StreamerOutputMsgBuilders
 
class  StreamSerializer
 
struct  Version
 

Typedefs

typedef unsigned char char_uint16[sizeof(uint16)]
 
typedef unsigned char char_uint32[sizeof(uint32)]
 
typedef unsigned char char_uint64[sizeof(uint64)]
 
typedef std::vector< std::string > Strings
 
typedef unsigned short uint16
 
typedef unsigned int uint32
 
typedef unsigned long long uint64
 
typedef unsigned char uint8
 

Enumerations

enum  StreamerCompressionAlgo { UNCOMPRESSED = 0, ZLIB = 1, LZMA = 2, ZSTD = 4 }
 

Functions

void convert (uint32 i, char_uint32 v)
 
void convert (uint16 i, char_uint16 v)
 
void convert (uint64 li, char_uint64 v)
 
uint16 convert16 (char_uint16 v)
 
uint32 convert32 (char_uint32 v)
 
uint64 convert64 (char_uint64 v)
 
void doBuildRealData (const std::string &name)
 
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)
 
uint16_t getFRDFileHeaderVersion (const std::array< uint8_t, 4 > &id, const std::array< uint8_t, 4 > &version)
 
TClass * getTClass (const std::type_info &ti)
 
bool loadCap (const std::string &name, std::vector< std::string > &missingDictionaries)
 
void loadExtraClasses ()
 
void printBits (unsigned char c)
 

Variables

const uint16 FRDEVENT_MASK_ISGENDATA = 1
 
constexpr std::array< unsigned char, 4 > FRDFileHeader_id {{0x52, 0x41, 0x57, 0x5f}}
 
constexpr std::array< unsigned char, 4 > FRDFileVersion_1 {{0x30, 0x30, 0x30, 0x31}}
 
constexpr std::array< unsigned char, 4 > FRDFileVersion_2 {{0x30, 0x30, 0x30, 0x32}}
 
constexpr size_t FRDHeaderMaxVersion = 6
 
constexpr std::array< uint32, FRDHeaderMaxVersion+1 > FRDHeaderVersionSize
 

Detailed Description

This module is an source module reading continously file as they are copied in the input directory. The processed file is moved to directoryt inprocessDir before being processed. Once it is processed it is moved to processedDir. To prevent processing files before their transfer is finished, it is waited than file size is stable during one second before the file is processed. This protection is obviously not full proof, especially to transfer lag.

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

Event Message Represented here

Protocol Versions 1-4: code 1 | size 4 | run 4 | event 4 | lumi 4 | reserved 4 | l1_count 4| l1bits l1_count/8 | hlt_count 4| hltbits hlt_count/4 | eventdatalength 4 | eventdata blob {variable}

Protocol Version 5: code 1 | size 4 | protocol version 1 | run 4 | event 4 | lumi 4 | origDataSize 4 | outModId 4 | l1_count 4| l1bits l1_count/8 | hlt_count 4| hltbits hlt_count/4 | eventdatalength 4 | eventdata blob {variable}

Protocol Version 6: // no change here, only INIT msg change code 1 | size 4 | protocol version 1 | run 4 | event 4 | lumi 4 | origDataSize 4 | outModId 4 | l1_count 4| l1bits l1_count/8 | hlt_count 4| hltbits hlt_count/4 | eventdatalength 4 | eventdata blob {variable}

Protocol Version 7: // no change here, only data blob changes code 1 | size 4 | protocol version 1 | run 4 | event 4 | lumi 4 | origDataSize 4 | outModId 4 | l1_count 4| l1bits l1_count/8 | hlt_count 4| hltbits hlt_count/4 | eventdatalength 4 | eventdata blob {variable}

Protocol Version 8: // add in checksum of data blob changes code 1 | size 4 | protocol version 1 | run 4 | event 4 | lumi 4 | origDataSize 4 | outModId 4 | l1_count 4| l1bits l1_count/8 | hlt_count 4| hltbits hlt_count/4 | adler32_chksum 4 | host name length 1 | host name {Fixed size} eventdatalength 4 | eventdata blob {variable}

Protocol Version 9: // add dropped events counter code 1 | size 4 | protocol version 1 | run 4 | event 4 | lumi 4 | origDataSize 4 | outModId 4 | droppedEventsCount 4 | l1_count 4 | l1bits l1_count/8 | hlt_count 4 | hltbits hlt_count/4 | adler32_chksum 4 | host name length 1 | host name {Fixed size} eventdatalength 4 | eventdata blob {variable}

Protocol Version 10: identical to version 9, but incremented to keep in sync with init msg version

Protocol Version 11: identical to version 10, except event changed from 4 bytes to 8 bytes

This class is used to view the contents of "FED Raw Data" (FRD) events. Initially, the only time that such events are created is when an error occurs in the HLT. So, in the beginning, "error event" == "FRD event". However, if new ways of creating events of this type are added to the HLT, hopefully this class can be used or upgraded to handle those events as well.

08-Aug-2008 - KAB - Initial Implementation 06-Oct-2008 - KAB - Added version number and lumi block number (version #2) 14-Nov-2013 - RKM - Added event size, adler32 and padding size (version #3) 15-Oct-2014 - WDD - Event number from 32 bits to 64 bits (version #4) 01-Apr-2015 - SM - replaced adler32 with crc32c which is accelerated in SSE 4.2 (version #5) 22-Sep-2020 - SM - reused high version 16-bits for event info via flags (version #6)

Version 6 Format: uint16 - format version number uint16 - event flags uint32 - run number uint32 - lumi number uint32 - event number uint32 - event size uint32 - crc32c checksum of FED data (excluding event header) variable size - FED data

Version 5 Format: uint32 - format version number uint32 - run number uint32 - lumi number uint32 - event number uint32 - event size uint32 - crc32c checksum of FED data (excluding event header) variable size - FED data

Version 4 Format: uint32 - format version number uint32 - run number uint32 - lumi number uint32 - event number low 32 bits uint32 - event number high 32 bits uint32 - event size uint32 - padding size needed to fill memory page size (_SC_PAGE_SIZE) uint32 - adler32 checksum of FED data (excluding event header) variable size - FED data

Version 3 Format: uint32 - format version number uint32 - run number uint32 - lumi number uint32 - event number uint32 - event size uint32 - padding size needed to fill memory page size (_SC_PAGE_SIZE) uint32 - adler32 checksum of FED data (excluding event header) variable size - FED data

Version 2 Format: uint32 - format version number uint32 - run number uint32 - lumi number uint32 - event number 1024 * uint32 - size values for all 1024 FED buffers variable size - FED data

Init Message

Protocol Versoion 2: code 1 | size 4 | protocol version 1 | pset 16 | run 4 | Init Header Size 4| Event Header Seize 4| releaseTagLength 1 | ReleaseTag var| HLT count 4| HLT Trig Legth 4 | HLT Trig names var | L1 Trig Count 4| L1 TrigName len 4| L1 Trig Names var |desc legth 4 | description blob var

Protocol Version 3: code 1 | size 4 | protocol version 1 | pset 16 | run 4 | Init Header Size 4| Event Header Size 4| releaseTagLength 1 | ReleaseTag var| HLT count 4| HLT Trig Legth 4 | HLT Trig names var | L1 Trig Count 4| L1 TrigName len 4| L1 Trig Names var |desc legth 4 | description blob var

Protocol Version 4: code 1 | size 4 | protocol version 1 | pset 16 | run 4 | Init Header Size 4| Event Header Size 4| releaseTagLength 1 | ReleaseTag var| processNameLength 1 | processName var | HLT count 4| HLT Trig Legth 4 | HLT Trig names var | L1 Trig Count 4| L1 TrigName len 4| L1 Trig Names var |desc legth 4 | description blob var

Protocol Version 5: code 1 | size 4 | protocol version 1 | pset 16 | run 4 | Init Header Size 4| Event Header Size 4| releaseTagLength 1 | ReleaseTag var| processNameLength 1 | processName var| outputModuleLabelLength 1 | outputModuleLabel var | HLT Trig count 4| HLT Trig Length 4 | HLT Trig names var | HLT Selection count 4| HLT Selection Length 4 | HLT Selection names var | L1 Trig Count 4| L1 TrigName len 4| L1 Trig Names var |desc legth 4 | description blob var

Protocol Version 6: code 1 | size 4 | protocol version 1 | pset 16 | run 4 | Init Header Size 4| Event Header Size 4| releaseTagLength 1 | ReleaseTag var| processNameLength 1 | processName var| outputModuleLabelLength 1 | outputModuleLabel var | outputModuleId 4 | HLT Trig count 4| HLT Trig Length 4 | HLT Trig names var | HLT Selection count 4| HLT Selection Length 4 | HLT Selection names var | L1 Trig Count 4| L1 TrigName len 4| L1 Trig Names var |desc legth 4 | description blob var

Protocol Version 7: No change to protocol, only description blob (and event data blob) changed code 1 | size 4 | protocol version 1 | pset 16 | run 4 | Init Header Size 4| Event Header Size 4| releaseTagLength 1 | ReleaseTag var| processNameLength 1 | processName var| outputModuleLabelLength 1 | outputModuleLabel var | outputModuleId 4 | HLT Trig count 4| HLT Trig Length 4 | HLT Trig names var | HLT Selection count 4| HLT Selection Length 4 | HLT Selection names var | L1 Trig Count 4| L1 TrigName len 4| L1 Trig Names var |desc legth 4 | description blob var

Protocol Version 8: added data blob checksum and hostname code 1 | size 4 | protocol version 1 | pset 16 | run 4 | Init Header Size 4| Event Header Size 4| releaseTagLength 1 | ReleaseTag var| processNameLength 1 | processName var| outputModuleLabelLength 1 | outputModuleLabel var | outputModuleId 4 | HLT Trig count 4| HLT Trig Length 4 | HLT Trig names var | HLT Selection count 4| HLT Selection Length 4 | HLT Selection names var | L1 Trig Count 4| L1 TrigName len 4| L1 Trig Names var | adler32 chksum 4| host name length 4| host name var|desc legth 4 | description blob var

Protocol Version 9: identical to version 8, but incremented to keep in sync with event msg protocol version

Protocol Version 10: removed hostname code 1 | size 4 | protocol version 1 | pset 16 | run 4 | Init Header Size 4| Event Header Size 4| releaseTagLength 1 | ReleaseTag var| processNameLength 1 | processName var| outputModuleLabelLength 1 | outputModuleLabel var | outputModuleId 4 | HLT Trig count 4| HLT Trig Length 4 | HLT Trig names var | HLT Selection count 4| HLT Selection Length 4 | HLT Selection names var | L1 Trig Count 4| L1 TrigName len 4| L1 Trig Names var | adler32 chksum 4| desc legth 4 | description blob var

Protocol Version 11: identical to version 10, but incremented to keep in sync with event msg protocol version

This file contains Class definitions for the Class representing Output (Streamer) file.

StreamerOutputFile: Class for doing Streamer Write operations

StreamSerializer.cc

Utility class for serializing framework objects (e.g. ProductRegistry and Event) into streamer message objects.

Typedef Documentation

◆ char_uint16

typedef unsigned char edm::streamer::char_uint16[sizeof(uint16)]

Definition at line 18 of file MsgTools.h.

◆ char_uint32

typedef unsigned char edm::streamer::char_uint32[sizeof(uint32)]

Definition at line 17 of file MsgTools.h.

◆ char_uint64

typedef unsigned char edm::streamer::char_uint64[sizeof(uint64)]

Definition at line 16 of file MsgTools.h.

◆ Strings

typedef std::vector<std::string> edm::streamer::Strings

Definition at line 19 of file MsgTools.h.

◆ uint16

typedef unsigned short edm::streamer::uint16

Definition at line 13 of file MsgTools.h.

◆ uint32

typedef unsigned int edm::streamer::uint32

Definition at line 14 of file MsgTools.h.

◆ uint64

typedef unsigned long long edm::streamer::uint64

Definition at line 15 of file MsgTools.h.

◆ uint8

typedef unsigned char edm::streamer::uint8

Definition at line 12 of file MsgTools.h.

Enumeration Type Documentation

◆ StreamerCompressionAlgo

Enumerator
UNCOMPRESSED 
ZLIB 
LZMA 
ZSTD 

Definition at line 72 of file StreamSerializer.h.

Function Documentation

◆ convert() [1/3]

void edm::streamer::convert ( uint32  i,
char_uint32  v 
)
inline

◆ convert() [2/3]

void edm::streamer::convert ( uint16  i,
char_uint16  v 
)
inline

Definition at line 50 of file MsgTools.h.

References mps_fire::i, and findQualityFiles::v.

50  {
51  v[0] = i & 0xff;
52  v[1] = (i >> 8) & 0xff;
53  }

◆ convert() [3/3]

void edm::streamer::convert ( uint64  li,
char_uint64  v 
)
inline

Definition at line 55 of file MsgTools.h.

References findQualityFiles::v.

55  {
56  v[0] = li & 0xff;
57  v[1] = (li >> 8) & 0xff;
58  v[2] = (li >> 16) & 0xff;
59  v[3] = (li >> 24) & 0xff;
60  v[4] = (li >> 32) & 0xff;
61  v[5] = (li >> 40) & 0xff;
62  v[6] = (li >> 48) & 0xff;
63  v[7] = (li >> 56) & 0xff;
64  }

◆ convert16()

uint16 edm::streamer::convert16 ( char_uint16  v)
inline

Definition at line 36 of file MsgTools.h.

References a, b, and findQualityFiles::v.

36  {
37  // first four bytes are code, LSB first
38  unsigned int a = v[0], b = v[1];
39  a |= (b << 8);
40  return a;
41  }
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121

◆ convert32()

uint32 edm::streamer::convert32 ( char_uint32  v)
inline

◆ convert64()

uint64 edm::streamer::convert64 ( char_uint64  v)
inline

Definition at line 21 of file MsgTools.h.

References a, b, DummyCfis::c, ztail::d, MillePedeFileConverter_cfg::e, f, g, h, and findQualityFiles::v.

Referenced by edm::streamer::EventMsgView::event(), and edm::streamer::StreamerInputFile::readEventMessage().

21  {
22  // first four bytes are code, LSB first
23  unsigned long long a = v[0], b = v[1], c = v[2], d = v[3];
24  unsigned long long e = v[4], f = v[5], g = v[6], h = v[7];
25  a |= (b << 8) | (c << 16) | (d << 24) | (e << 32) | (f << 40) | (g << 48) | (h << 56);
26  return a;
27  }
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e g
Definition: Activities.doc:4
double f[11][100]
d
Definition: ztail.py:151
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4

◆ doBuildRealData()

void edm::streamer::doBuildRealData ( const std::string &  name)

Definition at line 22 of file ClassFiller.cc.

References edm::errors::Configuration, Exception, FDEBUG, and mergeVDriftHistosByStation::name.

Referenced by edm::streamer::StreamerInputSource::buildClassCache().

22  {
23  FDEBUG(3) << "doing BuildRealData for " << name << "\n";
24  TClass* ttest = TClass::GetClass(name.c_str());
25  if (ttest != nullptr) {
26  ttest->BuildRealData();
27  } else {
28  throw edm::Exception(errors::Configuration) << "Could not find TClass for " << name << "\n";
29  }
30  }
#define FDEBUG(lev)
Definition: DebugMacros.h:19

◆ dumpEvent()

void edm::streamer::dumpEvent ( uint8 buf)

Definition at line 180 of file DumpTools.cc.

References visDQMUpload::buf, gather_cfg::cout, and dumpEventHeader().

180  {
181  EventMsgView eview(buf);
182 
183  dumpEventHeader(&eview);
184 
185  //const uint8* edata = eview.eventData();
186  //std::cout << "\nevent data=\n(";
187  //std::copy(&edata[0],&edata[0]+eview.eventLength(),
188  // std::ostream_iterator<char>(std::cout,""));
189  //std::cout << ")\n";
190  std::cout.flush();
191  }
void dumpEventHeader(const EventMsgView *eview)
Definition: DumpTools.cc:131

◆ dumpEventHeader()

void edm::streamer::dumpEventHeader ( const EventMsgView eview)

Definition at line 131 of file DumpTools.cc.

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

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

131  {
132  std::cout << "code=" << eview->code() << "\n"
133  << "size=" << eview->size() << "\n"
134  << "protocolVersion=" << eview->protocolVersion() << "\n"
135  << "run=" << eview->run() << "\n"
136  << "event=" << eview->event() << "\n"
137  << "lumi=" << eview->lumi() << "\n"
138  << "origDataSize=" << eview->origDataSize() << "\n"
139  << "outModId=0x" << std::hex << eview->outModId() << std::dec << "\n"
140  << "adler32 chksum= " << eview->adler32_chksum() << "\n"
141  << "host name= " << eview->hostName() << "\n"
142  << "event length=" << eview->eventLength() << "\n"
143  << "droppedEventsCount=" << eview->droppedEventsCount() << "\n";
144 
145  std::vector<bool> l1_out;
146  eview->l1TriggerBits(l1_out);
147 
148  std::cout << "\nl1 size= " << l1_out.size() << "\n l1 bits=\n";
149  edm::copy_all(l1_out, std::ostream_iterator<bool>(std::cout, " "));
150 
151  std::vector<unsigned char> hlt_out;
152  if (eview->hltCount() > 0) {
153  hlt_out.resize(1 + (eview->hltCount() - 1) / 4);
154  }
155  eview->hltTriggerBits(&hlt_out[0]);
156 
157  std::cout << "\nhlt Count:" << eview->hltCount();
158  std::cout << "\nhlt bits=\n(";
159  for (int i = (hlt_out.size() - 1); i != -1; --i)
160  printBits(hlt_out[i]);
161  std::cout << ")\n";
162  std::cout.flush();
163  }
Func copy_all(ForwardSequence &s, Func f)
wrappers for copy
Definition: Algorithms.h:20
void printBits(unsigned char c)
Definition: DumpTools.cc:124

◆ dumpEventIndex()

void edm::streamer::dumpEventIndex ( const EventMsgView eview)

Definition at line 175 of file DumpTools.cc.

References gather_cfg::cout, and dumpEventHeader().

175  {
176  dumpEventHeader(eview);
177  std::cout.flush();
178  }
void dumpEventHeader(const EventMsgView *eview)
Definition: DumpTools.cc:131

◆ dumpEventView()

void edm::streamer::dumpEventView ( const EventMsgView eview)

Definition at line 165 of file DumpTools.cc.

References gather_cfg::cout, and dumpEventHeader().

165  {
166  dumpEventHeader(eview);
167  //const uint8* edata = eview->eventData();
168  //std::cout << "\nevent data=\n(";
169  //std::copy(&edata[0],&edata[0]+eview->eventLength(),
170  // std::ostream_iterator<char>(std::cout,""));
171  //std::cout << ")\n";
172  std::cout.flush();
173  }
void dumpEventHeader(const EventMsgView *eview)
Definition: DumpTools.cc:131

◆ dumpFRDEventView()

void edm::streamer::dumpFRDEventView ( const FRDEventMsgView fview)

Definition at line 193 of file DumpTools.cc.

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

193  {
194  std::cout << "\n>>>>> FRDEvent Message Dump (begin) >>>>>" << std::endl;
195  std::cout.flush();
196 
197  std::cout << "size = " << fview->size() << "\n"
198  << "version = " << fview->version() << "\n"
199  << "run = " << fview->run() << "\n"
200  << "lumi = " << fview->lumi() << "\n"
201  << "event = " << fview->event() << "\n";
202  std::cout.flush();
203 
204  std::cout << ">>>>> FRDEvent Message Dump (end) >>>>>" << std::endl;
205  std::cout.flush();
206  }

◆ dumpInit()

void edm::streamer::dumpInit ( uint8 buf)

Definition at line 113 of file DumpTools.cc.

References visDQMUpload::buf, gather_cfg::cout, and dumpInitHeader().

113  {
114  InitMsgView view(buf);
116 
117  std::cout << "desc len = " << view.descLength() << "\n";
118  //const uint8* pos = view.descData();
119  //std::copy(pos,pos+view.descLength(),std::ostream_iterator<uint8>(std::cout,""));
120  //std::cout << "\n";
121  std::cout.flush();
122  }
void dumpInitHeader(const InitMsgView *view)
Definition: DumpTools.cc:20

◆ dumpInitHeader()

void edm::streamer::dumpInitHeader ( const InitMsgView view)

Definition at line 20 of file DumpTools.cc.

References edm::copy_all(), gather_cfg::cout, TauDecayModes::dec, cms::Digest::digest(), and AlCaHLTBitMon_QueryRunRegistry::string.

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

20  {
21  std::cout << "code = " << view->code() << ", "
22  << "size = " << view->size() << "\n"
23  << "run = " << view->run() << ", "
24  << "proto = " << view->protocolVersion() << "\n"
25  << "release = " << view->releaseTag() << "\n"
26  << "processName = " << view->processName() << "\n";
27  if (view->protocolVersion() >= 5) {
28  std::cout << "outModuleLabel = " << view->outputModuleLabel() << "\n";
29  }
30  if (view->protocolVersion() >= 6) {
31  std::cout << "outputModuleId=0x" << std::hex << view->outputModuleId() << std::dec << std::endl;
32  }
33  if (view->protocolVersion() >= 8) {
34  std::cout << "Checksum for Registry data = " << view->adler32_chksum() << " Hostname = " << view->hostName()
35  << 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  }
EventSelector::Strings Strings
unsigned char uint8
Definition: MsgTools.h:12
Func copy_all(ForwardSequence &s, Func f)
wrappers for copy
Definition: Algorithms.h:20

◆ dumpInitVerbose()

void edm::streamer::dumpInitVerbose ( const InitMsgView view)

Definition at line 85 of file DumpTools.cc.

References edm::BranchDescription::branchName(), gather_cfg::cout, submitPVResolutionJobs::desc, dumpInitHeader(), getTClass(), and edm::BranchDescription::init().

85  {
86  std::cout << ">>>>> INIT Message Dump (begin) >>>>>" << std::endl;
88 
89  TClass* desc = getTClass(typeid(SendJobHeader));
90  TBufferFile xbuf(TBuffer::kRead, view->descLength(), (char*)view->descData(), kFALSE);
91  std::unique_ptr<SendJobHeader> sd((SendJobHeader*)xbuf.ReadObjectAny(desc));
92 
93  if (sd.get() == nullptr) {
94  std::cout << "Unable to determine the product registry - "
95  << "Registry deserialization error." << std::endl;
96  } else {
97  std::cout << "Branch Descriptions:" << std::endl;
98  SendDescs const& descs = sd->descs();
99  SendDescs::const_iterator iDesc(descs.begin()), eDesc(descs.end());
100  while (iDesc != eDesc) {
101  BranchDescription branchDesc = *iDesc;
102  branchDesc.init();
103  //branchDesc.write(std::cout);
104  std::cout << branchDesc.branchName() << std::endl;
105  iDesc++;
106  }
107  }
108 
109  std::cout << "<<<<< INIT Message Dump (end) <<<<<" << std::endl;
110  std::cout.flush();
111  }
std::vector< BranchDescription > SendDescs
std::string const & branchName() const
TClass * getTClass(const std::type_info &ti)
Definition: ClassFiller.cc:63
void dumpInitHeader(const InitMsgView *view)
Definition: DumpTools.cc:20

◆ dumpInitView()

void edm::streamer::dumpInitView ( const InitMsgView view)

Definition at line 71 of file DumpTools.cc.

References gather_cfg::cout, and dumpInitHeader().

71  {
73  std::cout << "desc len = " << view->descLength() << "\n";
74  //const uint8* pos = view->descData();
75  //std::copy(pos,pos+view->descLength(),std::ostream_iterator<uint8>(std::cout,""));
76  //std::cout << "\n";
77  std::cout.flush();
78  }
void dumpInitHeader(const InitMsgView *view)
Definition: DumpTools.cc:20

◆ dumpStartMsg()

void edm::streamer::dumpStartMsg ( const InitMsgView view)

Definition at line 80 of file DumpTools.cc.

References gather_cfg::cout, and dumpInitHeader().

80  {
82  std::cout.flush();
83  }
void dumpInitHeader(const InitMsgView *view)
Definition: DumpTools.cc:20

◆ getFRDFileHeaderVersion()

uint16_t edm::streamer::getFRDFileHeaderVersion ( const std::array< uint8_t, 4 > &  id,
const std::array< uint8_t, 4 > &  version 
)
inline

Definition at line 81 of file FRDFileHeader.h.

References FRDFileHeader_id, mps_fire::i, runTheMatrix::ret, and relval_steps::version.

Referenced by evf::EvFDaqDirector::parseFRDFileHeader(), evf::EvFDaqDirector::rawFileHasHeader(), and FRDStreamSource::setRunAndEventInfo().

81  {
82  size_t i;
83  for (i = 0; i < 4; i++)
84  if (id[i] != FRDFileHeader_id[i])
85  return 0; //not FRD file header
86  uint16_t ret = 0;
87  for (i = 0; i < 4; i++) {
88  if (version[i] > '9' || version[i] < '0')
89  return 0; //NaN sequence
90  ret = ret * 10 + (uint16_t)(version[i] - '0');
91  }
92  return ret;
93  }
ret
prodAgent to be discontinued
constexpr std::array< unsigned char, 4 > FRDFileHeader_id
Definition: FRDFileHeader.h:22

◆ getTClass()

TClass * edm::streamer::getTClass ( const std::type_info &  ti)

Definition at line 63 of file ClassFiller.cc.

Referenced by edm::streamer::StreamerInputSource::deserializeRegistry(), dumpInitVerbose(), and edm::streamer::StreamSerializer::serializeRegistry().

63  {
64  TypeID const type(ti);
65  return getRootClass(type.className());
66  }

◆ loadCap()

bool edm::streamer::loadCap ( const std::string &  name,
std::vector< std::string > &  missingDictionaries 
)

Definition at line 16 of file ClassFiller.cc.

References edm::TypeWithDict::byName(), edm::checkClassDictionaries(), FDEBUG, and mergeVDriftHistosByStation::name.

Referenced by edm::streamer::StreamerInputSource::declareStreamers(), and loadExtraClasses().

16  {
17  FDEBUG(1) << "Loading dictionary for " << name << "\n";
18  TypeWithDict typeWithDict = TypeWithDict::byName(name);
19  return checkClassDictionaries(missingDictionaries, name, typeWithDict);
20  }
#define FDEBUG(lev)
Definition: DebugMacros.h:19
bool checkClassDictionaries(std::vector< std::string > &missingDictionaries, TypeID const &typeID)

◆ loadExtraClasses()

void edm::streamer::loadExtraClasses ( )

Definition at line 33 of file ClassFiller.cc.

References visDQMUpload::context, fileCollector::done, loadCap(), AlCaHLTBitMon_QueryRunRegistry::string, and edm::throwMissingDictionariesException().

Referenced by edm::streamer::StreamerInputSource::mergeIntoRegistry().

33  {
34  static bool done = false;
35  if (done == false) {
36  std::vector<std::string> missingDictionaries;
37  loadCap(std::string("edm::StreamedProduct"), missingDictionaries);
38  loadCap(std::string("std::vector<edm::StreamedProduct>"), missingDictionaries);
39  loadCap(std::string("edm::SendEvent"), missingDictionaries);
40  loadCap(std::string("std::vector<edm::BranchDescription>"), missingDictionaries);
41  loadCap(std::string("edm::SendJobHeader"), missingDictionaries);
42  if (!missingDictionaries.empty()) {
43  std::string context("Calling loadExtraClasses, checking dictionaries");
44  throwMissingDictionariesException(missingDictionaries, context);
45  }
46  }
47  done = true;
48  }
void throwMissingDictionariesException(std::vector< std::string > &missingDictionaries, std::string const &context)
bool loadCap(const std::string &name, std::vector< std::string > &missingDictionaries)
Definition: ClassFiller.cc:16

◆ printBits()

void edm::streamer::printBits ( unsigned char  c)

Definition at line 124 of file DumpTools.cc.

References triggerObjects_cff::bit, DummyCfis::c, gather_cfg::cout, and mps_fire::i.

Referenced by dumpEventHeader().

124  {
125  for (int i = 7; i >= 0; --i) {
126  int bit = ((c >> i) & 1);
127  std::cout << " " << bit;
128  }
129  }

Variable Documentation

◆ FRDEVENT_MASK_ISGENDATA

const uint16 edm::streamer::FRDEVENT_MASK_ISGENDATA = 1

◆ FRDFileHeader_id

constexpr std::array<unsigned char, 4> edm::streamer::FRDFileHeader_id {{0x52, 0x41, 0x57, 0x5f}}

Definition at line 22 of file FRDFileHeader.h.

Referenced by getFRDFileHeaderVersion().

◆ FRDFileVersion_1

constexpr std::array<unsigned char, 4> edm::streamer::FRDFileVersion_1 {{0x30, 0x30, 0x30, 0x31}}

Definition at line 23 of file FRDFileHeader.h.

◆ FRDFileVersion_2

constexpr std::array<unsigned char, 4> edm::streamer::FRDFileVersion_2 {{0x30, 0x30, 0x30, 0x32}}

Definition at line 24 of file FRDFileHeader.h.

◆ FRDHeaderMaxVersion

constexpr size_t edm::streamer::FRDHeaderMaxVersion = 6

◆ FRDHeaderVersionSize

constexpr std::array<uint32, FRDHeaderMaxVersion + 1> edm::streamer::FRDHeaderVersionSize