CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes
l1trigger::Counters Class Reference

#include <RPCData.h>

Public Member Functions

 Counters (int)
 
void evalCounters ()
 
void incrementSector (int)
 
void printSummary () const
 

Public Attributes

int m_farSide
 
int m_nearSide
 
std::map< int, int > m_sector
 
int m_wheel
 
int m_wheelid
 

Detailed Description

Definition at line 24 of file RPCData.h.

Constructor & Destructor Documentation

◆ Counters()

l1trigger::Counters::Counters ( int  wheel)
explicit

Definition at line 18 of file RPCData.cc.

References dqmdumpme::k, m_farSide, m_nearSide, m_sector, m_wheel, m_wheelid, and makeMuonMisalignmentScenario::wheel.

18  {
19  m_wheelid = wheel;
20  int maxsectors = 12;
21 
22  for (int k = 1; k <= maxsectors; ++k)
23  m_sector[k] = 0;
24  m_nearSide = 0;
25  m_farSide = 0;
26  m_wheel = 0;
27  }
std::map< int, int > m_sector
Definition: RPCData.h:38

Member Function Documentation

◆ evalCounters()

void l1trigger::Counters::evalCounters ( )

Definition at line 29 of file RPCData.cc.

References m_farSide, m_nearSide, m_sector, m_wheel, and fileinputsource_cfi::sec.

29  {
30  std::map<int, int>::iterator itr;
31  for (itr = m_sector.begin(); itr != m_sector.end(); ++itr)
32  m_wheel += (*itr).second;
33 
34  std::vector<int> far;
35  std::vector<int> near;
36 
37  far.push_back(3);
38  far.push_back(4);
39  far.push_back(5);
40  far.push_back(6);
41  far.push_back(7);
42  far.push_back(8);
43 
44  near.push_back(1);
45  near.push_back(2);
46  near.push_back(12);
47  near.push_back(11);
48  near.push_back(10);
49  near.push_back(9);
50 
51  std::vector<int>::iterator sec;
52  for (sec = far.begin(); sec != far.end(); ++sec) {
53  std::map<int, int>::iterator sector;
54  sector = m_sector.find((*sec));
55  m_farSide += (*sector).second;
56  }
57 
58  for (sec = near.begin(); sec != near.end(); ++sec) {
59  std::map<int, int>::iterator sector;
60  sector = m_sector.find((*sec));
61  m_nearSide += (*sector).second;
62  }
63  }
std::map< int, int > m_sector
Definition: RPCData.h:38

◆ incrementSector()

void l1trigger::Counters::incrementSector ( int  sector)

Definition at line 75 of file RPCData.cc.

References m_sector.

75 { m_sector[sector] += 1; }
std::map< int, int > m_sector
Definition: RPCData.h:38

◆ printSummary()

void l1trigger::Counters::printSummary ( ) const

Definition at line 65 of file RPCData.cc.

References gather_cfg::cout, m_farSide, m_nearSide, m_sector, m_wheel, m_wheelid, and alignCSCRings::s.

65  {
66  std::cout << m_wheelid << std::endl;
67  std::map<int, int>::iterator itr;
68  for (auto const& s : m_sector)
69  std::cout << s.first << ": " << s.second << '\t';
70  std::cout << '\n';
71 
72  std::cout << "total wheel: " << m_wheel << " " << m_farSide << " " << m_nearSide << '\n';
73  }
std::map< int, int > m_sector
Definition: RPCData.h:38

Member Data Documentation

◆ m_farSide

int l1trigger::Counters::m_farSide

Definition at line 36 of file RPCData.h.

Referenced by Counters(), evalCounters(), and printSummary().

◆ m_nearSide

int l1trigger::Counters::m_nearSide

Definition at line 35 of file RPCData.h.

Referenced by Counters(), evalCounters(), and printSummary().

◆ m_sector

std::map<int, int> l1trigger::Counters::m_sector

Definition at line 38 of file RPCData.h.

Referenced by Counters(), evalCounters(), incrementSector(), and printSummary().

◆ m_wheel

int l1trigger::Counters::m_wheel

Definition at line 37 of file RPCData.h.

Referenced by Counters(), evalCounters(), and printSummary().

◆ m_wheelid

int l1trigger::Counters::m_wheelid

Definition at line 34 of file RPCData.h.

Referenced by Counters(), and printSummary().