CMS 3D CMS Logo

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 40 of file TestConsumer.cc.


Constructor & Destructor Documentation

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

Definition at line 56 of file TestConsumer.cc.

00056                                         :
00057     filename_(s),
00058     file_num_(),
00059     cnt_(0),
00060     max_(m),
00061     ost_(makeFile(filename_,file_num_))
00062   {
00063   }
  


Member Function Documentation

void edmtest::Worker::checkCount (  ) 

Definition at line 65 of file TestConsumer.cc.

References edmtest::makeFile().

Referenced by edmtest::TestConsumer::bufferReady().

00066   {
00067     if(cnt_!=0 && (cnt_%max_) == 0)
00068       {
00069         ++file_num_;
00070         ost_ = makeFile(filename_,file_num_);
00071         writeReg();
00072       }
00073     ++cnt_;
00074 
00075   }

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

Definition at line 87 of file TestConsumer.cc.

References reg_.

Referenced by edmtest::TestConsumer::sendRegistry().

00088   {
00089     reg_.resize(len);
00090     memcpy(&reg_[0],buf,len);
00091   }

void edmtest::Worker::writeReg (  ) 

Definition at line 77 of file TestConsumer.cc.

References len, reg_, and edm::ProductRegistry::size().

Referenced by edmtest::TestConsumer::sendRegistry().

00078   {
00079     if(!reg_.empty())
00080       {
00081         int len = reg_.size();
00082         ost_->write((const char*)(&len),sizeof(int));
00083         ost_->write((const char*)&reg_[0],len);
00084       }
00085   }


Member Data Documentation

int edmtest::Worker::cnt_

Definition at line 46 of file TestConsumer.cc.

int edmtest::Worker::file_num_

Definition at line 45 of file TestConsumer.cc.

std::string edmtest::Worker::filename_

Definition at line 44 of file TestConsumer.cc.

int edmtest::Worker::max_

Definition at line 47 of file TestConsumer.cc.

OutPtr edmtest::Worker::ost_

Definition at line 48 of file TestConsumer.cc.

Referenced by edmtest::TestConsumer::bufferReady().

SaveArea edmtest::Worker::reg_

Definition at line 49 of file TestConsumer.cc.


The documentation for this struct was generated from the following file:
Generated on Tue Jun 9 18:46:42 2009 for CMSSW by  doxygen 1.5.4