CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes | Static Private Attributes
LaserSorter::OutStreamRecord Class Reference

Public Member Functions

std::set< uint32_t > & excludedOrbit ()
 
int fedId () const
 
std::string finalFileName () const
 
std::vector< IndexRecord > * indices ()
 
std::ofstream * out () const
 
 OutStreamRecord (int fedId__, edm::LuminosityBlockNumber_t startingLumiBlock__, std::ofstream *out__, std::string &tmpFileName__, std::string &finalFileName__)
 
edm::LuminosityBlockNumber_t startingLumiBlock () const
 
std::string tmpFileName () const
 

Private Attributes

std::set< uint32_t > excludedOrbit_
 
int fedId_
 
std::string finalFileName_
 
bool indexError_
 
std::vector< IndexRecordindices_
 
std::auto_ptr< std::ofstream > out_
 
edm::LuminosityBlockNumber_t startingLumiBlock_
 
std::string tmpFileName_
 

Static Private Attributes

static const std::string emptyString_
 
static const size_t indexReserve_ = 2000
 

Detailed Description

Definition at line 53 of file LaserSorter.h.

Constructor & Destructor Documentation

LaserSorter::OutStreamRecord::OutStreamRecord ( int  fedId__,
edm::LuminosityBlockNumber_t  startingLumiBlock__,
std::ofstream *  out__,
std::string &  tmpFileName__,
std::string &  finalFileName__ 
)
inline

Definition at line 56 of file LaserSorter.h.

References indexReserve_, and indices_.

60  :
61  fedId_(fedId__),
62  startingLumiBlock_(startingLumiBlock__),
63  out_(out__),
64  tmpFileName_(tmpFileName__), finalFileName_(finalFileName__),
65  indexError_(false){
66  indices_.reserve(indexReserve_);
67  }
edm::LuminosityBlockNumber_t startingLumiBlock_
Definition: LaserSorter.h:87
std::vector< IndexRecord > indices_
Definition: LaserSorter.h:97
std::auto_ptr< std::ofstream > out_
Definition: LaserSorter.h:88
static const size_t indexReserve_
Definition: LaserSorter.h:111

Member Function Documentation

std::set<uint32_t>& LaserSorter::OutStreamRecord::excludedOrbit ( )
inline

Gets the list of orbits to skip. Used to update an existing file: orbits of events already present in the file are excluded.

Returns
the list of orbits to skip.

Definition at line 83 of file LaserSorter.h.

References excludedOrbit_.

Referenced by LaserSorter::analyze(), and LaserSorter::readIndexTable().

83 { return excludedOrbit_; }
std::set< uint32_t > excludedOrbit_
Definition: LaserSorter.h:102
int LaserSorter::OutStreamRecord::fedId ( ) const
inline

Definition at line 69 of file LaserSorter.h.

References fedId_.

69 { return fedId_; }
std::string LaserSorter::OutStreamRecord::finalFileName ( ) const
inline

Definition at line 74 of file LaserSorter.h.

References finalFileName_.

Referenced by LaserSorter::analyze().

74 { return finalFileName_; }
std::vector<IndexRecord>* LaserSorter::OutStreamRecord::indices ( )
inline

Definition at line 76 of file LaserSorter.h.

References indices_.

Referenced by LaserSorter::readIndexTable(), and LaserSorter::writeEvent().

76 { return &indices_; }
std::vector< IndexRecord > indices_
Definition: LaserSorter.h:97
std::ofstream* LaserSorter::OutStreamRecord::out ( ) const
inline

Definition at line 73 of file LaserSorter.h.

References out_.

Referenced by LaserSorter::writeEvent().

73 { return out_.get(); }
std::auto_ptr< std::ofstream > out_
Definition: LaserSorter.h:88
edm::LuminosityBlockNumber_t LaserSorter::OutStreamRecord::startingLumiBlock ( ) const
inline

Definition at line 70 of file LaserSorter.h.

References startingLumiBlock_.

Referenced by LaserSorter::analyze().

70  {
71  return startingLumiBlock_;
72  }
edm::LuminosityBlockNumber_t startingLumiBlock_
Definition: LaserSorter.h:87
std::string LaserSorter::OutStreamRecord::tmpFileName ( ) const
inline

Definition at line 75 of file LaserSorter.h.

References tmpFileName_.

75 { return tmpFileName_; }

Member Data Documentation

const std::string LaserSorter::OutStreamRecord::emptyString_
staticprivate

Definition at line 91 of file LaserSorter.h.

std::set<uint32_t> LaserSorter::OutStreamRecord::excludedOrbit_
private

List of orbits to skip. Used to update an existing file: orbits of events already present in the file are excluded.

Definition at line 102 of file LaserSorter.h.

Referenced by excludedOrbit().

int LaserSorter::OutStreamRecord::fedId_
private

Definition at line 86 of file LaserSorter.h.

Referenced by fedId().

std::string LaserSorter::OutStreamRecord::finalFileName_
private

Definition at line 90 of file LaserSorter.h.

Referenced by finalFileName().

bool LaserSorter::OutStreamRecord::indexError_
private

Used to invalidate index table in case a problem preventing indexing is encountered: in principle non unicity of the orbit id.

Definition at line 107 of file LaserSorter.h.

const size_t LaserSorter::OutStreamRecord::indexReserve_ = 2000
staticprivate

Initial memory allocation for index table (see vector::reserve()).

Definition at line 111 of file LaserSorter.h.

Referenced by OutStreamRecord().

std::vector<IndexRecord> LaserSorter::OutStreamRecord::indices_
private

Index table. This map is used to index the events in the file according to their orbit id. An index table is stored at the end of the output files.

Definition at line 97 of file LaserSorter.h.

Referenced by indices(), and OutStreamRecord().

std::auto_ptr<std::ofstream> LaserSorter::OutStreamRecord::out_
private

Definition at line 88 of file LaserSorter.h.

Referenced by out().

edm::LuminosityBlockNumber_t LaserSorter::OutStreamRecord::startingLumiBlock_
private

Definition at line 87 of file LaserSorter.h.

Referenced by startingLumiBlock().

std::string LaserSorter::OutStreamRecord::tmpFileName_
private

Definition at line 89 of file LaserSorter.h.

Referenced by tmpFileName().