CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Attributes
L1GtPatternMap Class Reference

#include <L1GtPatternMap.h>

Public Types

typedef std::map< std::pair< int, int >, L1GtPatternLineLineMap
 

Public Member Functions

LineMap::iterator begin ()
 
LineMap::const_iterator begin () const
 
LineMap::iterator end ()
 
LineMap::const_iterator end () const
 
L1GtPatternLinegetLine (int eventNr, int bxNr)
 
void print (std::ostream &out) const
 

Private Attributes

LineMap m_lines
 

Detailed Description

The purpose of the L1GtPatternMap is to split input into pattern file lines identified by event/bunch crossing number.

Description: A class to map events to their proper pattern file lines

Implementation: <TODO: enter implementation details>

Author
: Thomas Themel - HEPHY Vienna

Description: see header file.

Implementation: <TODO: enter implementation details>

Author
: Thomas Themel - HEPHY Vienna

Definition at line 22 of file L1GtPatternMap.h.

Member Typedef Documentation

◆ LineMap

typedef std::map<std::pair<int, int>, L1GtPatternLine> L1GtPatternMap::LineMap

Definition at line 28 of file L1GtPatternMap.h.

Member Function Documentation

◆ begin() [1/2]

L1GtPatternMap::LineMap::iterator L1GtPatternMap::begin ( void  )

Export iteration support.

Definition at line 28 of file L1GtPatternMap.cc.

28 { return m_lines.begin(); }

References m_lines.

◆ begin() [2/2]

L1GtPatternMap::LineMap::const_iterator L1GtPatternMap::begin ( void  ) const

Export iteration support.

Definition at line 25 of file L1GtPatternMap.cc.

25 { return m_lines.begin(); }

References m_lines.

Referenced by L1GtPatternGenerator::packHfRecords(), and L1GtPatternWriter::writePatterns().

◆ end() [1/2]

L1GtPatternMap::LineMap::iterator L1GtPatternMap::end ( void  )

Definition at line 29 of file L1GtPatternMap.cc.

29 { return m_lines.end(); }

References m_lines.

◆ end() [2/2]

L1GtPatternMap::LineMap::const_iterator L1GtPatternMap::end ( void  ) const

Definition at line 26 of file L1GtPatternMap.cc.

26 { return m_lines.end(); }

References m_lines.

Referenced by L1GtPatternGenerator::packHfRecords(), and L1GtPatternWriter::writePatterns().

◆ getLine()

L1GtPatternLine & L1GtPatternMap::getLine ( int  eventNr,
int  bxNr 
)

Returns the pattern line for a certain event/bx combination, creating it if neccessary.

Definition at line 20 of file L1GtPatternMap.cc.

20  {
21  std::pair<int, int> key = std::make_pair(eventNr, bxNr);
22  return m_lines[key];
23 }

References crabWrapper::key, and m_lines.

Referenced by L1GtPatternGenerator::extractGlobalTriggerData(), and extractRecordData().

◆ print()

void L1GtPatternMap::print ( std::ostream &  out) const

Debug dump.

Definition at line 31 of file L1GtPatternMap.cc.

31  {
32  for (LineMap::const_iterator it = m_lines.begin(); it != m_lines.end(); ++it) {
33  out << "Event no: " << it->first.first << std::endl
34  << "Bx no : " << it->first.second << std::endl
35  << "Patterns: ";
36 
37  it->second.print(out);
38 
39  out << std::endl;
40  }
41 }

References m_lines, and MillePedeFileConverter_cfg::out.

Referenced by L1GtPatternWriter::writePatterns().

Member Data Documentation

◆ m_lines

LineMap L1GtPatternMap::m_lines
private

Definition at line 42 of file L1GtPatternMap.h.

Referenced by begin(), end(), getLine(), and print().

L1GtPatternMap::m_lines
LineMap m_lines
Definition: L1GtPatternMap.h:42
MillePedeFileConverter_cfg.out
out
Definition: MillePedeFileConverter_cfg.py:31
crabWrapper.key
key
Definition: crabWrapper.py:19