Logo RedisPubSub Project   v0.9.0
RedisPubSub is an utility with Publisher/Subscirber model based on Redis for J-PARC/MLF.
writeDataToDisk.cpp File Reference

Subscriber based on Redis Publisher/Subscriber utility for J-PARC/MLF. More...

#include "RedisPubSub.h"
#include <iostream>
#include <sstream>
#include <fstream>
#include <iomanip>
#include <string>
#include <sys/stat.h>
#include <errno.h>
#include <stdlib.h>
Include dependency graph for writeDataToDisk.cpp:

Macros

#define MAX_SIZE   1024*1024*1024
 mkdir() More...
 

Functions

int main (int argc, char **argv)
 in heap area More...
 

Variables

char buf [1024 *1024 *32]
 

Detailed Description

Subscriber based on Redis Publisher/Subscriber utility for J-PARC/MLF.

The subscriber writes raw data from Redis server into files in the specified directory. The format of the file name and the directory is the same as the format generated by the DAQMW component, LoggerMlf.

How to compile:
g++ -o writeDataToDisk writeDataToDisk.cpp -lhiredis
How to use:
./writeDataToDisk runNo date daqId modId
runNo : run number (000001)
date : date (20171206)
daqId : daq id (00)
modId : module id (000)
Date
25-OCT-2017
Author
Yoshiji Yasu (Yoshi.nosp@m.ji.Y.nosp@m.asu@k.nosp@m.ek.j.nosp@m.p)

Macro Definition Documentation

#define MAX_SIZE   1024*1024*1024

mkdir()

exit()

Function Documentation

int main ( int  argc,
char **  argv 
)

in heap area

key name for text data = NVA:DaqInfo:string:DaqCommand

key name for binary data = NVA:edb:NVA000001_01_000_edb

directory name = ./tmp/NVA000001_20171206/

file name orignal = NVA000001_01_000_ file name = NVA000001_01_000_xxx.edb

name = key name comming from Redis server

Here is the call graph for this function:

Variable Documentation

char buf[1024 *1024 *32]