CMS 3D CMS Logo

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::unique_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.

61  : fedId_(fedId__),
62  startingLumiBlock_(startingLumiBlock__),
63  out_(out__),
64  tmpFileName_(tmpFileName__),
65  finalFileName_(finalFileName__),
66  indexError_(false) {
67  indices_.reserve(indexReserve_);
68  }
edm::LuminosityBlockNumber_t startingLumiBlock_
Definition: LaserSorter.h:85
std::vector< IndexRecord > indices_
Definition: LaserSorter.h:95
std::unique_ptr< std::ofstream > out_
Definition: LaserSorter.h:86
static const size_t indexReserve_
Definition: LaserSorter.h:109

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 81 of file LaserSorter.h.

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

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

Definition at line 70 of file LaserSorter.h.

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

Definition at line 73 of file LaserSorter.h.

Referenced by LaserSorter::analyze().

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

Definition at line 75 of file LaserSorter.h.

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

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

Definition at line 72 of file LaserSorter.h.

Referenced by LaserSorter::writeEvent().

72 { return out_.get(); }
std::unique_ptr< std::ofstream > out_
Definition: LaserSorter.h:86
edm::LuminosityBlockNumber_t LaserSorter::OutStreamRecord::startingLumiBlock ( ) const
inline

Definition at line 71 of file LaserSorter.h.

Referenced by LaserSorter::analyze().

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

Definition at line 74 of file LaserSorter.h.

74 { return tmpFileName_; }

Member Data Documentation

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

Definition at line 89 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 100 of file LaserSorter.h.

int LaserSorter::OutStreamRecord::fedId_
private

Definition at line 84 of file LaserSorter.h.

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

Definition at line 88 of file LaserSorter.h.

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 105 of file LaserSorter.h.

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

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

Definition at line 109 of file LaserSorter.h.

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 95 of file LaserSorter.h.

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

Definition at line 86 of file LaserSorter.h.

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

Definition at line 85 of file LaserSorter.h.

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

Definition at line 87 of file LaserSorter.h.