Definition at line 475 of file mlogger.cxx.
◆ WriterFile()
| WriterFile::WriterFile |
( |
LOG_CHN * |
log_chn | ) |
|
|
inline |
Definition at line 478 of file mlogger.cxx.
479 {
481 printf(
"WriterFile: path [%s]\n", log_chn->
path.c_str());
483 }
◆ ~WriterFile()
| WriterFile::~WriterFile |
( |
| ) |
|
|
inline |
Definition at line 485 of file mlogger.cxx.
486 {
488 printf("WriterFile: destructor\n");
490 }
◆ wr_close()
| int WriterFile::wr_close |
( |
LOG_CHN * |
log_chn, |
|
|
int |
run_number |
|
) |
| |
|
inlinevirtual |
Implements WriterInterface.
Definition at line 546 of file mlogger.cxx.
547 {
548 int err;
549
551 printf(
"WriterFile: close path [%s]\n", log_chn->
path.c_str());
552
554
556
559
560 if (err != 0) {
561 cm_msg(
MERROR,
"WriterFile::wr_close",
"Cannot write to file \'%s\', close() errno %d (%s)", log_chn->
path.c_str(), errno, strerror(errno));
563 }
564
566 }
INT cm_msg(INT message_type, const char *filename, INT line, const char *routine, const char *format,...)
◆ wr_get_chain()
| std::string WriterFile::wr_get_chain |
( |
| ) |
|
|
inlinevirtual |
◆ wr_open()
| int WriterFile::wr_open |
( |
LOG_CHN * |
log_chn, |
|
|
int |
run_number |
|
) |
| |
|
inlinevirtual |
Implements WriterInterface.
Definition at line 492 of file mlogger.cxx.
493 {
496
498 printf(
"WriterFile: open path [%s]\n", log_chn->
path.c_str());
499
501
504
505#ifdef OS_WINNT
506 fFileno = (int) CreateFile(log_chn->
path.c_str(), GENERIC_WRITE, FILE_SHARE_READ, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_WRITE_THROUGH | FILE_FLAG_SEQUENTIAL_SCAN, 0);
507#else
509#endif
511 cm_msg(
MERROR,
"WriterFile::wr_open",
"Cannot write to file \'%s\', open() errno %d (%s)", log_chn->
path.c_str(), errno, strerror(errno));
513 }
514
516
519 }
static bool check_file_exists(const char *filename)
◆ wr_write()
| int WriterFile::wr_write |
( |
LOG_CHN * |
log_chn, |
|
|
const void * |
data, |
|
|
const int |
size |
|
) |
| |
|
inlinevirtual |
Implements WriterInterface.
Definition at line 521 of file mlogger.cxx.
522 {
524 printf(
"WriterFile: write path [%s], size %d\n", log_chn->
path.c_str(), size);
525
526 if (size == 0)
528
530
532
534
535 if (wr > 0)
537
538 if (wr != size) {
539 cm_msg(
MERROR,
"WriterFile::wr_write",
"Cannot write to file \'%s\', write(%d) returned %d, errno: %d (%s)", log_chn->
path.c_str(), size, wr, errno, strerror(errno));
541 }
542
544 }
#define write(n, a, f, d)
◆ fFilename
| std::string WriterFile::fFilename |
|
private |
◆ fFileno
The documentation for this class was generated from the following file: