CMS 3D CMS Logo

Public Member Functions | Public Attributes

edmtest::Worker Struct Reference

List of all members.

Public Member Functions

void checkCount ()
void saveReg (void *buf, int len)
 Worker (const std::string &s, int m)
void writeReg ()

Public Attributes

int cnt_
int file_num_
std::string filename_
int max_
OutPtr ost_
SaveArea reg_

Detailed Description

Definition at line 39 of file TestConsumer.cc.


Constructor & Destructor Documentation

edmtest::Worker::Worker ( const std::string &  s,
int  m 
)

Definition at line 55 of file TestConsumer.cc.


Member Function Documentation

void edmtest::Worker::checkCount ( )

Definition at line 64 of file TestConsumer.cc.

References cnt_, file_num_, filename_, edmtest::makeFile(), max_, ost_, and writeReg().

  {
    if(cnt_!=0 && (cnt_%max_) == 0)
      {
        ++file_num_;
        ost_ = makeFile(filename_,file_num_);
        writeReg();
      }
    ++cnt_;

  }
void edmtest::Worker::saveReg ( void *  buf,
int  len 
)

Definition at line 86 of file TestConsumer.cc.

References reg_.

  {
    reg_.resize(len);
    memcpy(&reg_[0],buf,len);
  }
void edmtest::Worker::writeReg ( )

Definition at line 76 of file TestConsumer.cc.

References ost_, and reg_.

Referenced by checkCount().

  {
    if(!reg_.empty())
      {
        int len = reg_.size();
        ost_->write((const char*)(&len),sizeof(int));
        ost_->write((const char*)&reg_[0],len);
      }
  }

Member Data Documentation

Definition at line 45 of file TestConsumer.cc.

Referenced by checkCount().

Definition at line 44 of file TestConsumer.cc.

Referenced by checkCount().

Definition at line 43 of file TestConsumer.cc.

Referenced by checkCount().

Definition at line 46 of file TestConsumer.cc.

Referenced by checkCount().

Definition at line 47 of file TestConsumer.cc.

Referenced by checkCount(), and writeReg().

Definition at line 48 of file TestConsumer.cc.

Referenced by saveReg(), and writeReg().