test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes
DTConfigSectColl Class Reference

#include <DTConfigSectColl.h>

Inheritance diagram for DTConfigSectColl:
DTConfig

Public Member Functions

int CoarseSync (int istat) const
 Return coarsesync parameter in Sector Collector for station istat (5 is second MB4 station) More...
 
bool debug () const
 Return the debug flag. More...
 
 DTConfigSectColl (const edm::ParameterSet &ps)
 Constructor. More...
 
 DTConfigSectColl ()
 Constructor. More...
 
void print () const
 Print the setup. More...
 
bool SCGetCarryFlag (int istat) const
 Return carry in Sector Collector for station istat (1 means enabled, 0 disabled) More...
 
void setCoarseSync (int sccsp, int istat)
 Return coarsesync parameter in Sector Collector for station istat (5 is second MB4 station) More...
 
void setDebug (bool debug)
 Set debug flag. More...
 
void setSCCarryFlag (bool scecf, int istat)
 Set carry in Sector Collector for station istat (1 means enabled, 0 disabled) More...
 
 ~DTConfigSectColl ()
 Destructor. More...
 
- Public Member Functions inherited from DTConfig
 DTConfig ()
 Constructor. More...
 
virtual ~DTConfig ()
 Destructor. More...
 

Static Public Attributes

static const int NDTSC =4
 Constant: maximum number of Sector Collector sorting Chip in input to Sector Collector. More...
 
static const int NTSPSC =5
 
static const int NTSTSC =3
 Constants: number of TSTheta/TSPhi in input to Sector Collector. More...
 
- Static Public Attributes inherited from DTConfig
static const int NBTITC =4
 
static const int NSTEPF =9
 
static const int NSTEPL =24
 Constants: first and last step to start trigger finding. More...
 
static const int NTCTSS = 4
 Constant: number of TRACOs in input to a TSS. More...
 

Private Member Functions

void setDefaults (const edm::ParameterSet &ps)
 Load pset values into class variables. More...
 

Private Attributes

bool m_debug
 
int m_sccsp [5]
 
bool m_scecf [4]
 

Detailed Description

Configurable parameters and constants for Level-1 Muon DT Trigger - SectorCollector

Author
c. Battilana

Definition at line 38 of file DTConfigSectColl.h.

Constructor & Destructor Documentation

DTConfigSectColl::DTConfigSectColl ( const edm::ParameterSet ps)

Constructor.

Definition at line 41 of file DTConfigSectColl.cc.

References debug(), print(), and setDefaults().

41  {
42 
43  setDefaults(ps);
44  if(debug()) print();
45 
46 }
void print() const
Print the setup.
bool debug() const
Return the debug flag.
void setDefaults(const edm::ParameterSet &ps)
Load pset values into class variables.
DTConfigSectColl::DTConfigSectColl ( )

Constructor.

Definition at line 31 of file DTConfigSectColl.cc.

References i, m_debug, setCoarseSync(), and setSCCarryFlag().

31  {
32 
33  m_debug = 0;
34  for (int i=1; i<4; i++)
35  setSCCarryFlag(0,i);
36  for (int i=1; i<5; i++)
37  setCoarseSync(0,i);
38 
39 }
void setSCCarryFlag(bool scecf, int istat)
Set carry in Sector Collector for station istat (1 means enabled, 0 disabled)
int i
Definition: DBlmapReader.cc:9
void setCoarseSync(int sccsp, int istat)
Return coarsesync parameter in Sector Collector for station istat (5 is second MB4 station) ...
DTConfigSectColl::~DTConfigSectColl ( )

Destructor.

Definition at line 51 of file DTConfigSectColl.cc.

51 {}

Member Function Documentation

int DTConfigSectColl::CoarseSync ( int  istat) const
inline

Return coarsesync parameter in Sector Collector for station istat (5 is second MB4 station)

Definition at line 69 of file DTConfigSectColl.h.

References Exception, and m_sccsp.

Referenced by DTSectCollThCand::CoarseSync(), DTSectCollPhCand::CoarseSync(), and print().

69  {
70 
71  if (istat<1 || istat>5){
72  throw cms::Exception("DTTPG") << "DTConfigSectColl::CoarseSync: station number out of range: istat="
73  << istat << std::endl;
74  }
75  return m_sccsp[istat-1];
76 
77  }
bool DTConfigSectColl::debug ( ) const
inline

Return the debug flag.

Definition at line 58 of file DTConfigSectColl.h.

References m_debug.

Referenced by DTConfigSectColl(), print(), and setDebug().

58 { return m_debug; }
void DTConfigSectColl::print ( void  ) const

Print the setup.

Definition at line 121 of file DTConfigSectColl.cc.

References CoarseSync(), gather_cfg::cout, debug(), and SCGetCarryFlag().

Referenced by DTConfigSectColl().

121  {
122 
123  std::cout << "******************************************************************************" << std::endl;
124  std::cout << "* DTTrigger configuration : SectorCollector chips *" << std::endl;
125  std::cout << "******************************************************************************" << std::endl << std::endl;
126  std::cout << "Debug flag : " << debug() << std::endl;
127  std::cout << "SCECF1 :" << SCGetCarryFlag(1) << std::endl;
128  std::cout << "SCECF2 :" << SCGetCarryFlag(2) << std::endl;
129  std::cout << "SCECF3 :" << SCGetCarryFlag(3) << std::endl;
130  std::cout << "SCECF4 :" << SCGetCarryFlag(4) << std::endl;
131  std::cout << "SCCSP1 :" << CoarseSync(1) << std::endl;
132  std::cout << "SCCSP2 :" << CoarseSync(2) << std::endl;
133  std::cout << "SCCSP3 :" << CoarseSync(3) << std::endl;
134  std::cout << "SCCSP4 :" << CoarseSync(4) << std::endl;
135  std::cout << "SCCSP5 :" << CoarseSync(5) << std::endl;
136  std::cout << "******************************************************************************" << std::endl;
137 
138 }
bool debug() const
Return the debug flag.
bool SCGetCarryFlag(int istat) const
Return carry in Sector Collector for station istat (1 means enabled, 0 disabled)
int CoarseSync(int istat) const
Return coarsesync parameter in Sector Collector for station istat (5 is second MB4 station) ...
tuple cout
Definition: gather_cfg.py:145
bool DTConfigSectColl::SCGetCarryFlag ( int  istat) const
inline

Return carry in Sector Collector for station istat (1 means enabled, 0 disabled)

Definition at line 61 of file DTConfigSectColl.h.

References Exception, and m_scecf.

Referenced by print().

61  {
62  if (istat<1 || istat>4){
63  throw cms::Exception("DTTPG") << "DTConfigSectColl::SCGetCarryFlag: station number out of range: istat=" << istat << std::endl;
64  }
65  return m_scecf[istat-1];
66  }
void DTConfigSectColl::setCoarseSync ( int  sccsp,
int  istat 
)

Return coarsesync parameter in Sector Collector for station istat (5 is second MB4 station)

Definition at line 68 of file DTConfigSectColl.cc.

References Exception, and m_sccsp.

Referenced by DTConfigSectColl(), and setDefaults().

68  {
69 
70  if (istat<1 || istat>5){
71  throw cms::Exception("DTTPG") << "DTConfigSectColl::setCoarseSync: station number out of range: istat=" << istat << std::endl;
72  }
73  if (sccsp<0 || sccsp>7){
74  throw cms::Exception("DTTPG") << "DTConfigSectColl::setCoarseSync: wrong SCCSP"<< istat << " value!" << std::endl;
75  }
76  m_sccsp[istat-1] = sccsp;
77 
78 }
void DTConfigSectColl::setDebug ( bool  debug)
inline

Set debug flag.

Definition at line 81 of file DTConfigSectColl.h.

References debug(), and m_debug.

Referenced by DTConfigDBProducer::readDTCCBConfig().

81 { m_debug=debug; }
bool debug() const
Return the debug flag.
void DTConfigSectColl::setDefaults ( const edm::ParameterSet ps)
private

Load pset values into class variables.

Definition at line 81 of file DTConfigSectColl.cc.

References edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), m_debug, m_scecf, and setCoarseSync().

Referenced by DTConfigSectColl().

81  {
82 
83  // Debug flag
84  m_debug = ps.getUntrackedParameter<bool>("Debug");
85 
86  // Enabling Carry in Sector Collector for MB1 (1 means enabled, 0 disabled)
87  m_scecf[0] = ps.getParameter<bool>("SCECF1");
88 
89  // Enabling Carry in Sector Collector for MB2 (1 means enabled, 0 disabled)
90  m_scecf[1] = ps.getParameter<bool>("SCECF2");
91 
92  // Enabling Carry in Sector Collector for MB3 (1 means enabled, 0 disabled)
93  m_scecf[2] = ps.getParameter<bool>("SCECF3");
94 
95  // Enabling Carry in Sector Collector for MB4 (1 means enabled, 0 disabled)
96  m_scecf[3] = ps.getParameter<bool>("SCECF4");
97 
98  // Progammable Coars Sync parameter in Sector Collector for MB1 (possible values [0-7])
99  int mycsp = ps.getParameter<int>("SCCSP1");
100  setCoarseSync(mycsp,1);
101 
102  // Progammable Coars Sync parameter in Sector Collector for MB2 (possible values [0-7])
103  mycsp = ps.getParameter<int>("SCCSP2");
104  setCoarseSync(mycsp,2);
105 
106  // Progammable Coars Sync parameter in Sector Collector for MB3 (possible values [0-7])
107  mycsp = ps.getParameter<int>("SCCSP3");
108  setCoarseSync(mycsp,3);
109 
110  // Progammable Coars Sync parameter in Sector Collector for firts MB4 station (possible values [0-7])
111  mycsp = ps.getParameter<int>("SCCSP4");
112  setCoarseSync(mycsp,4);
113 
114  // Progammable Coars Sync parameter in Sector Collector for second MB4 station (sectors 4 & 10) (possible values [0-7])
115  mycsp = ps.getParameter<int>("SCCSP5");
116  setCoarseSync(mycsp,5);
117 
118 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
void setCoarseSync(int sccsp, int istat)
Return coarsesync parameter in Sector Collector for station istat (5 is second MB4 station) ...
void DTConfigSectColl::setSCCarryFlag ( bool  scecf,
int  istat 
)

Set carry in Sector Collector for station istat (1 means enabled, 0 disabled)

Definition at line 58 of file DTConfigSectColl.cc.

References Exception, and m_scecf.

Referenced by DTConfigSectColl().

58  {
59 
60  if (istat<1 || istat>4){
61  throw cms::Exception("DTTPG") << "DTConfigSectColl::setSCCarryFlag: station number out of range: istat=" << istat << std::endl;
62  }
63  m_scecf[istat-1] = scecf;
64 
65 }

Member Data Documentation

bool DTConfigSectColl::m_debug
private

Definition at line 97 of file DTConfigSectColl.h.

Referenced by debug(), DTConfigSectColl(), setDebug(), and setDefaults().

int DTConfigSectColl::m_sccsp[5]
private

Definition at line 99 of file DTConfigSectColl.h.

Referenced by CoarseSync(), and setCoarseSync().

bool DTConfigSectColl::m_scecf[4]
private

Definition at line 98 of file DTConfigSectColl.h.

Referenced by SCGetCarryFlag(), setDefaults(), and setSCCarryFlag().

const int DTConfigSectColl::NDTSC =4
static

Constant: maximum number of Sector Collector sorting Chip in input to Sector Collector.

Definition at line 46 of file DTConfigSectColl.h.

const int DTConfigSectColl::NTSPSC =5
static

Definition at line 43 of file DTConfigSectColl.h.

const int DTConfigSectColl::NTSTSC =3
static

Constants: number of TSTheta/TSPhi in input to Sector Collector.

Definition at line 43 of file DTConfigSectColl.h.