CMS 3D CMS Logo

Public Member Functions | Private Attributes

cond::KeyGenerator Class Reference

#include <DecodingKey.h>

List of all members.

Public Member Functions

 KeyGenerator ()
std::string make (size_t keySize)
std::string makeWithRandomSize (size_t maxSize)

Private Attributes

int m_iteration

Detailed Description

Definition at line 18 of file DecodingKey.h.


Constructor & Destructor Documentation

cond::KeyGenerator::KeyGenerator ( ) [inline]

Definition at line 90 of file DecodingKey.h.

                              :m_iteration(0){
}

Member Function Documentation

std::string cond::KeyGenerator::make ( size_t  keySize)
std::string cond::KeyGenerator::makeWithRandomSize ( size_t  maxSize)

Definition at line 87 of file DecodingKey.cc.

References reco::modules::make(), reco_skim_cfg_mod::maxSize, NULL, and cond::rpcobgas::time.

                                                              {
  ::srand( m_iteration+2 );
  int rseed = ::rand();
  int seed = ::time( NULL)%10 + rseed;
  ::srand( seed );
  size_t sz = rand()%maxSize;
  return make( sz );
}

Member Data Documentation

Definition at line 28 of file DecodingKey.h.

Referenced by make().