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 435 of file mlogger.cxx.

Constructor & Destructor Documentation

◆ WriterNull()

WriterNull::WriterNull ( LOG_CHN log_chn)
inline

Definition at line 438 of file mlogger.cxx.

439 {
440 if (fTrace)
441 printf("WriterNull: path [%s]\n", log_chn->path.c_str());
442 fSimulateCompression = false;
443 }
bool fSimulateCompression
Definition mlogger.cxx:496
TH1X EXPRT * h1_book(const char *name, const char *title, int bins, double min, double max)
Definition rmidas.h:24
Here is the call graph for this function:

◆ ~WriterNull()

WriterNull::~WriterNull ( )
inline

Definition at line 445 of file mlogger.cxx.

446 {
447 if (fTrace)
448 printf("WriterNull: destructor\n");
449 }
Here is the call graph for this function:

Member Function Documentation

◆ wr_close()

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

Implements WriterInterface.

Definition at line 475 of file mlogger.cxx.

476 {
477 if (fTrace)
478 printf("WriterNull: close path [%s]\n", log_chn->path.c_str());
480 fBytesOut += 20; // simulate compression footer
481 log_chn->handle = 0;
482 return SUCCESS;
483 }
#define SUCCESS
Definition mcstd.h:54
Here is the call graph for this function:

◆ wr_get_chain()

std::string WriterNull::wr_get_chain ( )
inlinevirtual

Implements WriterInterface.

Definition at line 490 of file mlogger.cxx.

491 {
492 return "NULL";
493 }

◆ wr_get_file_ext()

std::string WriterNull::wr_get_file_ext ( )
inlinevirtual

Reimplemented from WriterInterface.

Definition at line 485 of file mlogger.cxx.

486 {
487 return ".null";
488 }

◆ wr_open()

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

Implements WriterInterface.

Definition at line 451 of file mlogger.cxx.

452 {
453 if (fTrace)
454 printf("WriterNull: open path [%s]\n", log_chn->path.c_str());
455 fBytesIn = 0;
456 fBytesOut = 0;
457 log_chn->handle = 9999;
459 fBytesOut += 10; // simulate compression header
460 return SUCCESS;
461 }
Here is the call graph for this function:

◆ wr_write()

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

Implements WriterInterface.

Definition at line 463 of file mlogger.cxx.

464 {
465 if (fTrace)
466 printf("WriterNull: write path [%s], size %d\n", log_chn->path.c_str(), size);
467 fBytesIn += size;
469 fBytesOut += size/3; // simulate compression
470 else
471 fBytesOut += size;
472 return SUCCESS;
473 }
Here is the call graph for this function:

Member Data Documentation

◆ fSimulateCompression

bool WriterNull::fSimulateCompression
private

Definition at line 496 of file mlogger.cxx.


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