CMS 3D CMS Logo

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

#include <L1MuDTEtaPatternLut.h>

Public Types

typedef LUT::const_iterator ETFLut_iter
 
typedef LUT::iterator ETFLut_Iter
 
typedef std::map< short, L1MuDTEtaPattern, std::less< short > > LUT
 

Public Member Functions

ETFLut_iter begin () const
 return iterator which points to the first entry of the LUT More...
 
ETFLut_iter end () const
 return iterator which points to the one-past-last entry of the LUT More...
 
L1MuDTEtaPattern getPattern (int id) const
 get pattern with a given ID More...
 
 L1MuDTEtaPatternLut ()
 constructor More...
 
int load ()
 load pattern look-up table More...
 
void print () const
 print pattern look-up table More...
 
void reset ()
 reset pattern look-up table More...
 
int size () const
 return number of entries in the LUT More...
 
virtual ~L1MuDTEtaPatternLut ()
 destructor More...
 

Public Attributes

LUT m_lut
 

Private Member Functions

template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 

Friends

class boost::serialization::access
 
template<typename CondSerializationT , typename Enabled >
struct cond::serialization::access
 

Detailed Description

Look-up table for eta track finder

Date
2007/03/30 07:48:02
Revision
1.1

N. Neumeister CERN EP

Definition at line 40 of file L1MuDTEtaPatternLut.h.

Member Typedef Documentation

◆ ETFLut_iter

typedef LUT::const_iterator L1MuDTEtaPatternLut::ETFLut_iter

Definition at line 43 of file L1MuDTEtaPatternLut.h.

◆ ETFLut_Iter

typedef LUT::iterator L1MuDTEtaPatternLut::ETFLut_Iter

Definition at line 44 of file L1MuDTEtaPatternLut.h.

◆ LUT

typedef std::map<short, L1MuDTEtaPattern, std::less<short> > L1MuDTEtaPatternLut::LUT

Definition at line 42 of file L1MuDTEtaPatternLut.h.

Constructor & Destructor Documentation

◆ L1MuDTEtaPatternLut()

L1MuDTEtaPatternLut::L1MuDTEtaPatternLut ( )

constructor

Definition at line 48 of file L1MuDTEtaPatternLut.cc.

48  {
49  // if ( load() != 0 ) {
50  // cout << "Can not open files to load eta track finder look-up tables for DTTrackFinder!" << endl;
51  // }
52 
53  // if ( L1MuDTTFConfig::Debug(6) ) print();
54 }

◆ ~L1MuDTEtaPatternLut()

L1MuDTEtaPatternLut::~L1MuDTEtaPatternLut ( )
virtual

destructor

Definition at line 60 of file L1MuDTEtaPatternLut.cc.

60 { m_lut.clear(); }

Member Function Documentation

◆ begin()

ETFLut_iter L1MuDTEtaPatternLut::begin ( void  ) const
inline

return iterator which points to the first entry of the LUT

Definition at line 68 of file L1MuDTEtaPatternLut.h.

68 { return m_lut.begin(); }

References m_lut.

Referenced by L1MuDTEtaProcessor::runEtaTrackFinder().

◆ end()

ETFLut_iter L1MuDTEtaPatternLut::end ( void  ) const
inline

return iterator which points to the one-past-last entry of the LUT

Definition at line 71 of file L1MuDTEtaPatternLut.h.

71 { return m_lut.end(); }

References m_lut.

Referenced by Types.LuminosityBlockRange::cppID(), Types.EventRange::cppID(), and L1MuDTEtaProcessor::runEtaTrackFinder().

◆ getPattern()

L1MuDTEtaPattern L1MuDTEtaPatternLut::getPattern ( int  id) const

get pattern with a given ID

Definition at line 147 of file L1MuDTEtaPatternLut.cc.

147  {
148  LUT::const_iterator it = m_lut.find(id);
149  if (it == m_lut.end()) {
150  cerr << "Error: L1MuDTEtaPatternLut: pattern not found : " << id << endl;
151  // return 0;
152  }
153  return (*it).second;
154 }

References EcnaPython_AdcPeg12_S1_10_R170298_1_0_150_Dee0::cerr.

Referenced by L1MuDTEtaProcessor::assign(), L1MuDTEtaProcessor::print(), and L1MuDTEtaProcessor::runEtaMatchingUnit().

◆ load()

int L1MuDTEtaPatternLut::load ( )

load pattern look-up table

Definition at line 74 of file L1MuDTEtaPatternLut.cc.

74  {
75  // get directory name
76  string defaultPath = "L1TriggerConfig/DTTrackFinder/parameters/";
77  string eau_dir = "L1TriggerData/DTTrackFinder/Eau/";
78 
79  // assemble file name
80  edm::FileInPath lut_f = edm::FileInPath(string(defaultPath + eau_dir + "ETFPatternList.lut"));
81  string etf_file = lut_f.fullPath();
82 
83  // open file
84  L1TriggerLutFile file(etf_file);
85  if (file.open() != 0)
86  return -1;
87  // if ( L1MuDTTFConfig::Debug(1) ) cout << "Reading file : "
88  // << file.getName() << endl;
89 
90  // ignore comment lines
91  file.ignoreLines(16);
92 
93  // read patterns
94  while (file.good()) {
95  int id = file.readInteger();
96  if (!file.good())
97  break;
98  string pat = file.readString();
99  if (!file.good())
100  break;
101  int qual = file.readInteger();
102  if (!file.good())
103  break;
104  int eta = file.readInteger();
105  if (!file.good())
106  break;
107  L1MuDTEtaPattern pattern(id, pat, eta, qual);
108 
109  m_lut[pattern.id()] = pattern;
110 
111  if (!file.good()) {
112  file.close();
113  break;
114  }
115  }
116 
117  file.close();
118 
119  return 0;
120 }

References PVValHelper::eta, geometryDiff::file, edm::FileInPath::fullPath(), and topSingleLeptonDQM_PU_cfi::pattern.

Referenced by MatrixToProcess.MatrixToProcess::getProcess(), MatrixToProcess.MatrixToProcess::listAll(), and ConfigBuilder.ConfigBuilder::prepare_FILTER().

◆ print()

void L1MuDTEtaPatternLut::print ( void  ) const

print pattern look-up table

Definition at line 125 of file L1MuDTEtaPatternLut.cc.

125  {
126  cout << endl;
127  cout << "L1 barrel Track Finder ETA Pattern look-up table :" << endl;
128  cout << "==================================================" << endl;
129  cout << endl;
130 
131  cout << "ETF Patterns : " << m_lut.size() << endl;
132  cout << "======================" << endl;
133  cout << endl;
134 
135  LUT::const_iterator iter = m_lut.begin();
136  while (iter != m_lut.end()) {
137  cout << (*iter).second << endl;
138  iter++;
139  }
140 
141  cout << endl;
142 }

References gather_cfg::cout.

◆ reset()

void L1MuDTEtaPatternLut::reset ( void  )

reset pattern look-up table

Definition at line 69 of file L1MuDTEtaPatternLut.cc.

69 { m_lut.clear(); }

Referenced by MatrixReader.MatrixReader::__init__(), and MatrixReader.MatrixReader::showRaw().

◆ serialize()

template<class Archive >
void L1MuDTEtaPatternLut::serialize ( Archive &  ar,
const unsigned int  version 
)
private

◆ size()

int L1MuDTEtaPatternLut::size ( void  ) const
inline

return number of entries in the LUT

Definition at line 65 of file L1MuDTEtaPatternLut.h.

65 { return m_lut.size(); }

References m_lut.

Referenced by ntupleDataFormat._Collection::__iter__(), and ntupleDataFormat._Collection::__len__().

Friends And Related Function Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Definition at line 76 of file L1MuDTEtaPatternLut.h.

◆ cond::serialization::access

template<typename CondSerializationT , typename Enabled >
friend struct cond::serialization::access
friend

Definition at line 76 of file L1MuDTEtaPatternLut.h.

Member Data Documentation

◆ m_lut

LUT L1MuDTEtaPatternLut::m_lut

Definition at line 74 of file L1MuDTEtaPatternLut.h.

Referenced by begin(), end(), and size().

L1MuDTEtaPattern
Definition: L1MuDTEtaPattern.h:46
L1TriggerLutFile
Definition: L1TriggerLutFile.h:37
gather_cfg.cout
cout
Definition: gather_cfg.py:144
L1MuDTEtaPatternLut::m_lut
LUT m_lut
Definition: L1MuDTEtaPatternLut.h:74
edm::FileInPath
Definition: FileInPath.h:61
PVValHelper::eta
Definition: PVValidationHelpers.h:70
geometryDiff.file
file
Definition: geometryDiff.py:13
topSingleLeptonDQM_PU_cfi.pattern
pattern
Definition: topSingleLeptonDQM_PU_cfi.py:39
pat
Definition: HeavyIon.h:7
EcnaPython_AdcPeg12_S1_10_R170298_1_0_150_Dee0.cerr
cerr
Definition: EcnaPython_AdcPeg12_S1_10_R170298_1_0_150_Dee0.py:8
edm::FileInPath::fullPath
std::string fullPath() const
Definition: FileInPath.cc:161