CMS 3D CMS Logo

DTConfigSectColl.cc
Go to the documentation of this file.
1 //-------------------------------------------------
2 //
3 // Class: DTConfigSectColl
4 //
5 // Description: Configurable parameters and constants
6 // for Level1 Mu DT Trigger - Sector Collector chip
7 //
8 //
9 // Author List:
10 // C. Battilana
11 //
12 //-----------------------------------------------------------------------
13 
14 //-----------------------
15 // This Class's Header --
16 //-----------------------
18 
19 //---------------
20 // C++ Headers --
21 //---------------
22 
23 //-------------------------------
24 // Collaborating Class Headers --
25 //-------------------------------
27 
28 //----------------
29 // Constructors --
30 //----------------
32  m_debug = false;
33  for (int i = 1; i < 4; i++)
34  setSCCarryFlag(false, i);
35  for (int i = 1; i < 5; i++)
36  setCoarseSync(0, i);
37 }
38 
40  setDefaults(ps);
41  if (debug())
42  print();
43 }
44 
45 //--------------
46 // Destructor --
47 //--------------
49 
50 //--------------
51 // Operations --
52 //--------------
53 
54 void DTConfigSectColl::setSCCarryFlag(bool scecf, int istat) {
55  if (istat < 1 || istat > 4) {
56  throw cms::Exception("DTTPG") << "DTConfigSectColl::setSCCarryFlag: station number out of range: istat=" << istat
57  << std::endl;
58  }
59  m_scecf[istat - 1] = scecf;
60 }
61 
62 void DTConfigSectColl::setCoarseSync(int sccsp, int istat) {
63  if (istat < 1 || istat > 5) {
64  throw cms::Exception("DTTPG") << "DTConfigSectColl::setCoarseSync: station number out of range: istat=" << istat
65  << std::endl;
66  }
67  if (sccsp < 0 || sccsp > 7) {
68  throw cms::Exception("DTTPG") << "DTConfigSectColl::setCoarseSync: wrong SCCSP" << istat << " value!" << std::endl;
69  }
70  m_sccsp[istat - 1] = sccsp;
71 }
72 
74  // Debug flag
75  m_debug = ps.getUntrackedParameter<bool>("Debug");
76 
77  // Enabling Carry in Sector Collector for MB1 (1 means enabled, 0 disabled)
78  m_scecf[0] = ps.getParameter<bool>("SCECF1");
79 
80  // Enabling Carry in Sector Collector for MB2 (1 means enabled, 0 disabled)
81  m_scecf[1] = ps.getParameter<bool>("SCECF2");
82 
83  // Enabling Carry in Sector Collector for MB3 (1 means enabled, 0 disabled)
84  m_scecf[2] = ps.getParameter<bool>("SCECF3");
85 
86  // Enabling Carry in Sector Collector for MB4 (1 means enabled, 0 disabled)
87  m_scecf[3] = ps.getParameter<bool>("SCECF4");
88 
89  // Progammable Coars Sync parameter in Sector Collector for MB1 (possible values [0-7])
90  int mycsp = ps.getParameter<int>("SCCSP1");
91  setCoarseSync(mycsp, 1);
92 
93  // Progammable Coars Sync parameter in Sector Collector for MB2 (possible values [0-7])
94  mycsp = ps.getParameter<int>("SCCSP2");
95  setCoarseSync(mycsp, 2);
96 
97  // Progammable Coars Sync parameter in Sector Collector for MB3 (possible values [0-7])
98  mycsp = ps.getParameter<int>("SCCSP3");
99  setCoarseSync(mycsp, 3);
100 
101  // Progammable Coars Sync parameter in Sector Collector for firts MB4 station (possible values [0-7])
102  mycsp = ps.getParameter<int>("SCCSP4");
103  setCoarseSync(mycsp, 4);
104 
105  // Progammable Coars Sync parameter in Sector Collector for second MB4 station (sectors 4 & 10) (possible values [0-7])
106  mycsp = ps.getParameter<int>("SCCSP5");
107  setCoarseSync(mycsp, 5);
108 }
109 
111  std::cout << "******************************************************************************" << std::endl;
112  std::cout << "* DTTrigger configuration : SectorCollector chips *" << std::endl;
113  std::cout << "******************************************************************************" << std::endl
114  << std::endl;
115  std::cout << "Debug flag : " << debug() << std::endl;
116  std::cout << "SCECF1 :" << SCGetCarryFlag(1) << std::endl;
117  std::cout << "SCECF2 :" << SCGetCarryFlag(2) << std::endl;
118  std::cout << "SCECF3 :" << SCGetCarryFlag(3) << std::endl;
119  std::cout << "SCECF4 :" << SCGetCarryFlag(4) << std::endl;
120  std::cout << "SCCSP1 :" << CoarseSync(1) << std::endl;
121  std::cout << "SCCSP2 :" << CoarseSync(2) << std::endl;
122  std::cout << "SCCSP3 :" << CoarseSync(3) << std::endl;
123  std::cout << "SCCSP4 :" << CoarseSync(4) << std::endl;
124  std::cout << "SCCSP5 :" << CoarseSync(5) << std::endl;
125  std::cout << "******************************************************************************" << std::endl;
126 }
DTConfigSectColl::CoarseSync
int CoarseSync(int istat) const
Return coarsesync parameter in Sector Collector for station istat (5 is second MB4 station)
Definition: DTConfigSectColl.h:67
mps_fire.i
i
Definition: mps_fire.py:355
DTConfigSectColl::~DTConfigSectColl
~DTConfigSectColl() override
Destructor.
Definition: DTConfigSectColl.cc:48
DTConfigSectColl::m_debug
bool m_debug
Definition: DTConfigSectColl.h:92
gather_cfg.cout
cout
Definition: gather_cfg.py:144
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
DTConfigSectColl::debug
bool debug() const
Return the debug flag.
Definition: DTConfigSectColl.h:55
DTConfigSectColl::setSCCarryFlag
void setSCCarryFlag(bool scecf, int istat)
Set carry in Sector Collector for station istat (1 means enabled, 0 disabled)
Definition: DTConfigSectColl.cc:54
DTConfigSectColl::setDefaults
void setDefaults(const edm::ParameterSet &ps)
Load pset values into class variables.
Definition: DTConfigSectColl.cc:73
DTConfigSectColl::m_scecf
bool m_scecf[4]
Definition: DTConfigSectColl.h:93
DTConfigSectColl::DTConfigSectColl
DTConfigSectColl()
Constructor.
Definition: DTConfigSectColl.cc:31
DTConfigSectColl::setCoarseSync
void setCoarseSync(int sccsp, int istat)
Return coarsesync parameter in Sector Collector for station istat (5 is second MB4 station)
Definition: DTConfigSectColl.cc:62
DTConfigSectColl::m_sccsp
int m_sccsp[5]
Definition: DTConfigSectColl.h:94
edm::ParameterSet
Definition: ParameterSet.h:36
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Exception
Definition: hltDiff.cc:246
DTConfigSectColl::print
void print() const
Print the setup.
Definition: DTConfigSectColl.cc:110
Exception.h
DTConfigSectColl::SCGetCarryFlag
bool SCGetCarryFlag(int istat) const
Return carry in Sector Collector for station istat (1 means enabled, 0 disabled)
Definition: DTConfigSectColl.h:58
DTConfigSectColl.h