MIDAS
Loading...
Searching...
No Matches
WriterNull Class Reference
Inheritance diagram for WriterNull:
Collaboration diagram for WriterNull:

Public Member Functions

 WriterNull (LOG_CHN *log_chn)
 
 ~WriterNull ()
 
int wr_open (LOG_CHN *log_chn, int run_number)
 
int wr_write (LOG_CHN *log_chn, const void *data, const int size)
 
int wr_close (LOG_CHN *log_chn, int run_number)
 
std::string wr_get_file_ext ()
 
std::string wr_get_chain ()
 
- Public Member Functions inherited from WriterInterface
 WriterInterface ()
 
virtual ~WriterInterface ()
 

Private Attributes

bool fSimulateCompression
 

Additional Inherited Members

- Public Attributes inherited from WriterInterface
bool fTrace
 
double fBytesIn
 
double fBytesOut
 

Detailed Description

Definition at line 409 of file mlogger.cxx.

Constructor & Destructor Documentation

◆ WriterNull()

WriterNull::WriterNull ( LOG_CHN log_chn)
inline

Definition at line 412 of file mlogger.cxx.

413 {
414 if (fTrace)
415 printf("WriterNull: path [%s]\n", log_chn->path.c_str());
416 fSimulateCompression = false;
417 }
bool fSimulateCompression
Definition mlogger.cxx:470
std::string path
Definition mlogger.cxx:250

◆ ~WriterNull()

WriterNull::~WriterNull ( )
inline

Definition at line 419 of file mlogger.cxx.

420 {
421 if (fTrace)
422 printf("WriterNull: destructor\n");
423 }

Member Function Documentation

◆ wr_close()

int WriterNull::wr_close ( LOG_CHN log_chn,
int  run_number 
)
inlinevirtual

Implements WriterInterface.

Definition at line 449 of file mlogger.cxx.

450 {
451 if (fTrace)
452 printf("WriterNull: close path [%s]\n", log_chn->path.c_str());
454 fBytesOut += 20; // simulate compression footer
455 log_chn->handle = 0;
456 return SUCCESS;
457 }
#define SUCCESS
Definition mcstd.h:54
INT handle
Definition mlogger.cxx:249

◆ wr_get_chain()

std::string WriterNull::wr_get_chain ( )
inlinevirtual

Implements WriterInterface.

Definition at line 464 of file mlogger.cxx.

465 {
466 return "NULL";
467 }

◆ wr_get_file_ext()

std::string WriterNull::wr_get_file_ext ( )
inlinevirtual

Reimplemented from WriterInterface.

Definition at line 459 of file mlogger.cxx.

460 {
461 return ".null";
462 }

◆ wr_open()

int WriterNull::wr_open ( LOG_CHN log_chn,
int  run_number 
)
inlinevirtual

Implements WriterInterface.

Definition at line 425 of file mlogger.cxx.

426 {
427 if (fTrace)
428 printf("WriterNull: open path [%s]\n", log_chn->path.c_str());
429 fBytesIn = 0;
430 fBytesOut = 0;
431 log_chn->handle = 9999;
433 fBytesOut += 10; // simulate compression header
434 return SUCCESS;
435 }

◆ wr_write()

int WriterNull::wr_write ( LOG_CHN log_chn,
const void *  data,
const int  size 
)
inlinevirtual

Implements WriterInterface.

Definition at line 437 of file mlogger.cxx.

438 {
439 if (fTrace)
440 printf("WriterNull: write path [%s], size %d\n", log_chn->path.c_str(), size);
441 fBytesIn += size;
443 fBytesOut += size/3; // simulate compression
444 else
445 fBytesOut += size;
446 return SUCCESS;
447 }

Member Data Documentation

◆ fSimulateCompression

bool WriterNull::fSimulateCompression
private

Definition at line 470 of file mlogger.cxx.


The documentation for this class was generated from the following file: