8#include <daq/dqm/DqmMemFile.h>
9#include <daq/rfarm/event/hltsocket/HLTMainLoop.h>
10#include <framework/datastore/DataStore.h>
11#include <framework/datastore/StoreObjPtr.h>
12#include <framework/dataobjects/EventMetaData.h>
13#include <framework/logging/Logger.h>
15#include <daq/hbasf2/utils/HLTStreamHelper.h>
18#include <boost/program_options.hpp>
23namespace po = boost::program_options;
26int main(
int argc,
char* argv[])
28 std::string outputFileName;
30 po::options_description
31 desc(
"b2hlt_create_histos - helper tool to create a single histogram raw file for testing.");
33 (
"help,h",
"Print this help message")
34 (
"output", po::value<std::string>(&outputFileName)->required(),
35 "where to store the histograms to");
37 po::positional_options_description p;
42 po::command_line_parser(argc, argv).options(desc).positional(p).run(), vm);
43 }
catch (std::exception& e) {
47 if (vm.count(
"help")) {
48 std::cout << desc << std::endl;
54 }
catch (std::exception& e) {
65 TH1F histogram(
"my_histogram",
"Some title", 1, 0, 1);
71 const auto& histogramMessage = message->getDataMessage();
73 std::ofstream outfile(outputFileName, std::ofstream::binary);
74 outfile.write(histogramMessage.data<
char>(), histogramMessage.size());
static DataStore & Instance()
Instance of singleton Store.
void setInitializeActive(bool active)
Setter for m_initializeActive.
Helper class for data store serialization.
std::unique_ptr< ZMQNoIdMessage > streamHistograms(bool compressed=true)
Stream all objects derived from TH1 into a message. Only the last subfolder is streamed by prefixing ...
bool registerInDataStore(DataStore::EStoreFlags storeFlags=DataStore::c_WriteOut)
Register the object/array in the DataStore.
bool create(bool replace=false)
Create a default object in the data store.
Type-safe access to single objects in the data store.
Abstract base class for different kinds of events.