CMS 3D CMS Logo

Public Member Functions | Public Attributes | Static Public Attributes | Private Member Functions | Private Attributes

DTConfigSectColl Class Reference

#include <DTConfigSectColl.h>

Inheritance diagram for DTConfigSectColl:
DTConfig

List of all members.

Public Member Functions

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

Public Attributes

static const int NTSPSC = 5

Static Public Attributes

static const int NDTSC = 4
 Constant: maximum number of Sector Collector sorting Chip in input to Sector Collector.
static const int NTSTSC = 3
 Constants: number of TSTheta/TSPhi in input to Sector Collector.

Private Member Functions

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

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().

                                                            { 

  setDefaults(ps);
  if(debug()) print();

}
DTConfigSectColl::DTConfigSectColl ( )

Constructor.

Definition at line 31 of file DTConfigSectColl.cc.

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

                                   { 

  m_debug = 0;
  for (int i=1; i<4; i++)
    setSCCarryFlag(0,i);
  for (int i=1; i<5; i++)
    setCoarseSync(0,i);

}
DTConfigSectColl::~DTConfigSectColl ( )

Destructor.

Definition at line 51 of file DTConfigSectColl.cc.

{}

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().

                                         {
    
    if (istat<1 || istat>5){
       throw cms::Exception("DTTPG") << "DTConfigSectColl::CoarseSync: station number out of range: istat="
                << istat << std::endl;
    }
    return m_sccsp[istat-1];
    
  }
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().

{ 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().

                              {

  std::cout << "******************************************************************************" << std::endl;
  std::cout << "*              DTTrigger configuration : SectorCollector chips               *" << std::endl;
  std::cout << "******************************************************************************" << std::endl << std::endl;
  std::cout << "Debug flag : " <<  debug()     << std::endl;
  std::cout << "SCECF1 :" << SCGetCarryFlag(1) << std::endl;
  std::cout << "SCECF2 :" << SCGetCarryFlag(2) << std::endl;
  std::cout << "SCECF3 :" << SCGetCarryFlag(3) << std::endl;
  std::cout << "SCECF4 :" << SCGetCarryFlag(4) << std::endl;
  std::cout << "SCCSP1 :" << CoarseSync(1)     << std::endl;
  std::cout << "SCCSP2 :" << CoarseSync(2)     << std::endl;
  std::cout << "SCCSP3 :" << CoarseSync(3)     << std::endl;
  std::cout << "SCCSP4 :" << CoarseSync(4)     << std::endl;
  std::cout << "SCCSP5 :" << CoarseSync(5)     << std::endl;
  std::cout << "******************************************************************************" << std::endl;

}
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().

                                               {
    if (istat<1 || istat>4){
       throw cms::Exception("DTTPG") << "DTConfigSectColl::SCGetCarryFlag: station number out of range: istat=" << istat << std::endl;
    } 
    return m_scecf[istat-1];
  }
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().

                                                    {

  if (istat<1 || istat>5){
    throw cms::Exception("DTTPG") << "DTConfigSectColl::setCoarseSync: station number out of range: istat=" << istat << std::endl;
  }
  if (sccsp<0 || sccsp>7){
    throw cms::Exception("DTTPG") << "DTConfigSectColl::setCoarseSync: wrong SCCSP"<< istat << "  value!" << std::endl;
  }
  m_sccsp[istat-1] = sccsp;

}
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().

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().

                                                       {

  // Debug flag 
  m_debug = ps.getUntrackedParameter<bool>("Debug");

  //  Enabling Carry in Sector Collector for MB1 (1 means enabled, 0 disabled)
  m_scecf[0] = ps.getParameter<bool>("SCECF1");

  //  Enabling Carry in Sector Collector for MB2 (1 means enabled, 0 disabled)
  m_scecf[1] = ps.getParameter<bool>("SCECF2");

  //  Enabling Carry in Sector Collector for MB3 (1 means enabled, 0 disabled)
  m_scecf[2] = ps.getParameter<bool>("SCECF3");

  //  Enabling Carry in Sector Collector for MB4  (1 means enabled, 0 disabled)
  m_scecf[3] = ps.getParameter<bool>("SCECF4");

  // Progammable Coars Sync parameter in Sector Collector for MB1 (possible values [0-7])
  int mycsp = ps.getParameter<int>("SCCSP1");
  setCoarseSync(mycsp,1);

  // Progammable Coars Sync parameter in Sector Collector for MB2 (possible values [0-7])
  mycsp = ps.getParameter<int>("SCCSP2");
  setCoarseSync(mycsp,2);
  
  // Progammable Coars Sync parameter in Sector Collector for MB3 (possible values [0-7])
  mycsp = ps.getParameter<int>("SCCSP3");
  setCoarseSync(mycsp,3);

  // Progammable Coars Sync parameter in Sector Collector for firts MB4 station (possible values [0-7])
  mycsp = ps.getParameter<int>("SCCSP4");
  setCoarseSync(mycsp,4);

  // Progammable Coars Sync parameter in Sector Collector for second MB4 station (sectors 4 & 10) (possible values [0-7])
  mycsp = ps.getParameter<int>("SCCSP5");
  setCoarseSync(mycsp,5);

}
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().

                                                     {

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

}  

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

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.