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

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

Definition at line 20 of file RPCData.cc.

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

21  {
22  m_wheelid = wheel;
23  int maxsectors=12;
24 
25  for(int k=1; k <= maxsectors; ++k)
26  m_sector[k] = 0;
27  m_nearSide = 0;
28  m_farSide = 0;
29  m_wheel=0;
30 
31  }
std::map< int, int > m_sector
Definition: RPCData.h:39
int k[5][pyjets_maxn]

Member Function Documentation

void l1trigger::Counters::evalCounters ( )

Definition at line 33 of file RPCData.cc.

References m_farSide, m_nearSide, m_sector, and m_wheel.

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

Definition at line 86 of file RPCData.cc.

References m_sector.

87  {
88  m_sector[ sector ] += 1;
89  }
std::map< int, int > m_sector
Definition: RPCData.h:39
void l1trigger::Counters::printSummary ( ) const

Definition at line 73 of file RPCData.cc.

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

74  {
75 
76  std::cout << m_wheelid << std::endl;
77  std::map<int,int>::iterator itr;
78  for(auto const& s :m_sector)
79  std::cout << s.first << ": " << s.second << '\t';
80  std::cout << '\n';
81 
82  std::cout << "total wheel: "
83  << m_wheel << " " << m_farSide << " " << m_nearSide << '\n';
84  }
std::map< int, int > m_sector
Definition: RPCData.h:39

Member Data Documentation

int l1trigger::Counters::m_farSide

Definition at line 37 of file RPCData.h.

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

int l1trigger::Counters::m_nearSide

Definition at line 36 of file RPCData.h.

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

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

Definition at line 39 of file RPCData.h.

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

int l1trigger::Counters::m_wheel

Definition at line 38 of file RPCData.h.

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

int l1trigger::Counters::m_wheelid

Definition at line 35 of file RPCData.h.

Referenced by Counters(), and printSummary().