CMS 3D CMS Logo

L1MuCSCTFConfiguration Class Reference

#include <CondFormats/L1TObjects/interface/L1MuCSCTFConfiguration.h>

List of all members.

Public Member Functions

const std::string * configAsText (void) const throw ()
 L1MuCSCTFConfiguration (const L1MuCSCTFConfiguration &conf)
 L1MuCSCTFConfiguration (std::string regs[12])
 L1MuCSCTFConfiguration (void)
L1MuCSCTFConfigurationoperator= (const L1MuCSCTFConfiguration &conf)
edm::ParameterSet parameters (int sp) const
 ~L1MuCSCTFConfiguration (void)

Private Attributes

std::string registers [12]


Detailed Description

Definition at line 7 of file L1MuCSCTFConfiguration.h.


Constructor & Destructor Documentation

L1MuCSCTFConfiguration::L1MuCSCTFConfiguration ( void   )  [inline]

Definition at line 23 of file L1MuCSCTFConfiguration.h.

00023 {}

L1MuCSCTFConfiguration::L1MuCSCTFConfiguration ( std::string  regs[12]  )  [inline]

Definition at line 24 of file L1MuCSCTFConfiguration.h.

References registers.

00024 { for(int sp=0;sp<12;sp++) registers[sp]=regs[sp]; }

L1MuCSCTFConfiguration::L1MuCSCTFConfiguration ( const L1MuCSCTFConfiguration conf  )  [inline]

Definition at line 25 of file L1MuCSCTFConfiguration.h.

References registers.

00025                                                                   {
00026                 for(int sp=0;sp<12;sp++) registers[sp] = conf.registers[sp];
00027         }

L1MuCSCTFConfiguration::~L1MuCSCTFConfiguration ( void   )  [inline]

Definition at line 28 of file L1MuCSCTFConfiguration.h.

00028 {}


Member Function Documentation

const std::string* L1MuCSCTFConfiguration::configAsText ( void   )  const throw () [inline]

Definition at line 12 of file L1MuCSCTFConfiguration.h.

References registers.

00012                                                           {
00013                 return registers;
00014         }

L1MuCSCTFConfiguration& L1MuCSCTFConfiguration::operator= ( const L1MuCSCTFConfiguration conf  )  [inline]

Definition at line 18 of file L1MuCSCTFConfiguration.h.

References registers.

00018                                                                              {
00019                 for(int sp=0;sp<12;sp++) registers[sp] = conf.registers[sp];
00020                 return *this;
00021         }

edm::ParameterSet L1MuCSCTFConfiguration::parameters ( int  sp  )  const

Definition at line 3 of file L1MuCSCTFConfiguration.cc.

References edm::ParameterSet::addParameter(), dbtoconf::conf, parsecf::pyparsing::line(), python::EventAnalyzer_cfg::pset, registers, and value.

Referenced by CSCTFSectorProcessor::initialize().

00003                                                                {
00004   edm::ParameterSet pset;
00005   if(sp>=12) return pset;
00006 
00007   pset.addParameter<int>("CoreLatency",8);
00008   std::vector<unsigned int> etamin(8), etamax(8), etawin(6);
00009 
00010   int eta_cnt=0;
00011   std::stringstream conf(registers[sp]);
00012   while( !conf.eof() ){
00013     char buff[1024];
00014     conf.getline(buff,1024);
00015     std::stringstream line(buff);
00016 
00017     std::string register_;     line>>register_;
00018     std::string chip_;         line>>chip_;
00019     std::string muon_;         line>>muon_;
00020     std::string writeValue_;   line>>writeValue_;
00021     std::string comments_;     std::getline(line,comments_);
00022 
00023     if( register_=="CSR_REQ" && chip_=="SP" ){
00024         unsigned int value = strtol(writeValue_.c_str(),'\0',16);
00025         pset.addParameter<bool>("run_core",       value&0x8000);
00026         pset.addParameter<bool>("trigger_on_ME1a",value&0x0001);
00027         pset.addParameter<bool>("trigger_on_ME1b",value&0x0002);
00028         pset.addParameter<bool>("trigger_on_ME2", value&0x0004);
00029         pset.addParameter<bool>("trigger_on_ME3", value&0x0008);
00030         pset.addParameter<bool>("trigger_on_ME4", value&0x0010);
00031         pset.addParameter<bool>("trigger_on_MB1a",value&0x0100);
00032         pset.addParameter<bool>("trigger_on_MB1d",value&0x0200);
00033     }
00034     if( register_=="DAT_FTR" && chip_=="SP" ){
00035         unsigned int value = strtol(writeValue_.c_str(),'\0',16);
00036         pset.addParameter<unsigned int>("singlesTrackPt",value); // 0x1F - rank, 0x60 - Q1,Q0, 0x80 - charge
00037     }
00038     if( register_=="CSR_SFC" && chip_=="SP" ){
00039         unsigned int value = strtol(writeValue_.c_str(),'\0',16);
00040         pset.addParameter<unsigned int>("singlesTrackOutput",(value&0x3000)>>12);
00041     }
00042     if( register_=="CNT_ETA" && chip_=="SP" ){
00043         unsigned int value = strtol(writeValue_.c_str(),'\0',16);
00044         eta_cnt = value;
00045     }
00046         if( register_=="CSR_SCC" && chip_=="SP" ){
00047         unsigned int value = strtol(writeValue_.c_str(),'\0',16);
00048         pset.addParameter<unsigned int>("BXAdepth",      value&0x3     );
00049         pset.addParameter<bool>        ("AllowALCTonly",(value&0x10)>>4);
00050         pset.addParameter<bool>        ("AllowCLCTonly",(value&0x20)>>5);
00051         pset.addParameter<bool>        ("useDT",        (value&0x80)>>8);
00052         pset.addParameter<unsigned int>("PreTrigger",   (value&0x300)>>8);
00053     }
00054     if( register_=="DAT_ETA" && chip_=="SP" ){
00055         unsigned int value = strtol(writeValue_.c_str(),'\0',16);
00056         if( eta_cnt< 8                ) etamin[eta_cnt   ] = value;
00057         if( eta_cnt>=8  && eta_cnt<16 ) etamax[eta_cnt-8 ] = value;
00058         if( eta_cnt>=16 && eta_cnt<22 ) etawin[eta_cnt-16] = value;
00059                 // 4 line below is just an exaple (need to verify a sequence):
00060         if( eta_cnt==22 ) pset.addParameter<unsigned int>("mindphip",    value);
00061         if( eta_cnt==23 ) pset.addParameter<unsigned int>("mindeta_accp",value);
00062         if( eta_cnt==24 ) pset.addParameter<unsigned int>("maxdeta_accp",value);
00063         if( eta_cnt==25 ) pset.addParameter<unsigned int>("maxdphi_accp",value);
00064         eta_cnt++;
00065     }
00066     if( register_=="CSR_LQE" && chip_=="F1" && muon_=="M1" )
00067         pset.addParameter<unsigned int>("QualityEnableME1a",strtol(writeValue_.c_str(),'\0',16));
00068     if( register_=="CSR_LQE" && chip_=="F1" && muon_=="M2" )
00069         pset.addParameter<unsigned int>("QualityEnableME1b",strtol(writeValue_.c_str(),'\0',16));
00070     if( register_=="CSR_LQE" && chip_=="F1" && muon_=="M3" )
00071         pset.addParameter<unsigned int>("QualityEnableME1c",strtol(writeValue_.c_str(),'\0',16));
00072     if( register_=="CSR_LQE" && chip_=="F2" && muon_=="M1" )
00073         pset.addParameter<unsigned int>("QualityEnableME1d",strtol(writeValue_.c_str(),'\0',16));
00074     if( register_=="CSR_LQE" && chip_=="F2" && muon_=="M2" )
00075         pset.addParameter<unsigned int>("QualityEnableME1e",strtol(writeValue_.c_str(),'\0',16));
00076     if( register_=="CSR_LQE" && chip_=="F2" && muon_=="M3" )
00077         pset.addParameter<unsigned int>("QualityEnableME1f",strtol(writeValue_.c_str(),'\0',16));
00078     if( register_=="CSR_LQE" && chip_=="F3" && muon_=="M1" )
00079         pset.addParameter<unsigned int>("QualityEnableME2a",strtol(writeValue_.c_str(),'\0',16));
00080     if( register_=="CSR_LQE" && chip_=="F3" && muon_=="M2" )
00081         pset.addParameter<unsigned int>("QualityEnableME2b",strtol(writeValue_.c_str(),'\0',16));
00082     if( register_=="CSR_LQE" && chip_=="F3" && muon_=="M3" )
00083         pset.addParameter<unsigned int>("QualityEnableME2c",strtol(writeValue_.c_str(),'\0',16));
00084     if( register_=="CSR_LQE" && chip_=="F4" && muon_=="M1" )
00085         pset.addParameter<unsigned int>("QualityEnableME3a",strtol(writeValue_.c_str(),'\0',16));
00086     if( register_=="CSR_LQE" && chip_=="F4" && muon_=="M2" )
00087         pset.addParameter<unsigned int>("QualityEnableME3b",strtol(writeValue_.c_str(),'\0',16));
00088     if( register_=="CSR_LQE" && chip_=="F4" && muon_=="M3" )
00089         pset.addParameter<unsigned int>("QualityEnableME3c",strtol(writeValue_.c_str(),'\0',16));
00090     if( register_=="CSR_LQE" && chip_=="F5" && muon_=="M1" )
00091         pset.addParameter<unsigned int>("QualityEnableME4a",strtol(writeValue_.c_str(),'\0',16));
00092     if( register_=="CSR_LQE" && chip_=="F5" && muon_=="M2" )
00093         pset.addParameter<unsigned int>("QualityEnableME4b",strtol(writeValue_.c_str(),'\0',16));
00094     if( register_=="CSR_LQE" && chip_=="F5" && muon_=="M3" )
00095         pset.addParameter<unsigned int>("QualityEnableME4c",strtol(writeValue_.c_str(),'\0',16));
00096 
00097     if( register_=="CSR_KFL" )//&& chip_=="SP" && muon_=="MA" )
00098         pset.addParameter<unsigned int>("kill_fiber",strtol(writeValue_.c_str(),'\0',16));
00099   }
00100 
00101   if( eta_cnt     ) pset.addParameter< std::vector<unsigned int> >("EtaMin",etamin);
00102   if( eta_cnt>=8  ) pset.addParameter< std::vector<unsigned int> >("EtaMax",etamax);
00103   if( eta_cnt>=16 ) pset.addParameter< std::vector<unsigned int> >("EtaWindows",etawin);
00104 
00105   return pset;
00106 }


Member Data Documentation

std::string L1MuCSCTFConfiguration::registers[12] [private]

Definition at line 9 of file L1MuCSCTFConfiguration.h.

Referenced by configAsText(), L1MuCSCTFConfiguration(), operator=(), and parameters().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:26:47 2009 for CMSSW by  doxygen 1.5.4