CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_3/src/L1TriggerConfig/L1GtConfigProducers/src/L1GtStableParametersTrivialProducer.cc

Go to the documentation of this file.
00001 
00017 // this class header
00018 #include "L1TriggerConfig/L1GtConfigProducers/interface/L1GtStableParametersTrivialProducer.h"
00019 
00020 // system include files
00021 #include <memory>
00022 #include <vector>
00023 
00024 #include "boost/shared_ptr.hpp"
00025 
00026 // user include files
00027 //   base class
00028 #include "FWCore/Framework/interface/ESProducer.h"
00029 
00030 #include "FWCore/Framework/interface/ModuleFactory.h"
00031 #include "FWCore/Framework/interface/ESHandle.h"
00032 
00033 #include "FWCore/MessageLogger/interface/MessageLogger.h"
00034 #include "FWCore/MessageLogger/interface/MessageDrop.h"
00035 
00036 #include "CondFormats/DataRecord/interface/L1GtStableParametersRcd.h"
00037 
00038 // forward declarations
00039 
00040 // constructor(s)
00041 L1GtStableParametersTrivialProducer::L1GtStableParametersTrivialProducer(
00042     const edm::ParameterSet& parSet) {
00043 
00044     // tell the framework what data is being produced
00045     setWhatProduced(
00046         this, &L1GtStableParametersTrivialProducer::produceGtStableParameters);
00047 
00048     // now do what ever other initialization is needed
00049 
00050     // trigger decision
00051 
00052     // number of physics trigger algorithms
00053     m_numberPhysTriggers
00054         = parSet.getParameter<unsigned int>("NumberPhysTriggers");
00055 
00056     // additional number of physics trigger algorithms
00057     m_numberPhysTriggersExtended
00058         = parSet.getParameter<unsigned int>("NumberPhysTriggersExtended");
00059 
00060     // number of technical triggers
00061     m_numberTechnicalTriggers
00062         = parSet.getParameter<unsigned int>("NumberTechnicalTriggers");
00063 
00064     // trigger objects
00065 
00066     // muons
00067     m_numberL1Mu = parSet.getParameter<unsigned int>("NumberL1Mu");
00068 
00069     // e/gamma and isolated e/gamma objects
00070     m_numberL1NoIsoEG = parSet.getParameter<unsigned int>("NumberL1NoIsoEG");
00071     m_numberL1IsoEG = parSet.getParameter<unsigned int>("NumberL1IsoEG");
00072 
00073     // central, forward and tau jets
00074     m_numberL1CenJet = parSet.getParameter<unsigned int>("NumberL1CenJet");
00075     m_numberL1ForJet = parSet.getParameter<unsigned int>("NumberL1ForJet");
00076     m_numberL1TauJet = parSet.getParameter<unsigned int>("NumberL1TauJet");
00077 
00078     // jet counts
00079     m_numberL1JetCounts = parSet.getParameter<unsigned int>("NumberL1JetCounts");
00080 
00081     // hardware
00082 
00083     // number of maximum chips defined in the xml file
00084     m_numberConditionChips
00085         = parSet.getParameter<unsigned int>("NumberConditionChips");
00086 
00087     // number of pins on the GTL condition chips
00088     m_pinsOnConditionChip
00089         = parSet.getParameter<unsigned int>("PinsOnConditionChip");
00090 
00091     // correspondence "condition chip - GTL algorithm word" in the hardware
00092     // e.g.: chip 2: 0 - 95;  chip 1: 96 - 128 (191)
00093     m_orderConditionChip
00094         = parSet.getParameter<std::vector<int> >("OrderConditionChip");
00095 
00096     // number of PSB boards in GT
00097     m_numberPsbBoards = parSet.getParameter<int>("NumberPsbBoards");
00098 
00100     m_ifCaloEtaNumberBits
00101         = parSet.getParameter<unsigned int>("IfCaloEtaNumberBits");
00102 
00104     m_ifMuEtaNumberBits = parSet.getParameter<unsigned int>("IfMuEtaNumberBits");
00105 
00106     // GT DAQ record organized in words of WordLength bits
00107     m_wordLength = parSet.getParameter<int>("WordLength");
00108 
00109     // one unit in the word is UnitLength bits
00110     m_unitLength = parSet.getParameter<int>("UnitLength");
00111 
00112 }
00113 
00114 // destructor
00115 L1GtStableParametersTrivialProducer::~L1GtStableParametersTrivialProducer() {
00116 
00117     // empty
00118 
00119 }
00120 
00121 // member functions
00122 
00123 // method called to produce the data
00124 boost::shared_ptr<L1GtStableParameters> 
00125     L1GtStableParametersTrivialProducer::produceGtStableParameters(
00126         const L1GtStableParametersRcd& iRecord) {
00127 
00128     boost::shared_ptr<L1GtStableParameters> pL1GtStableParameters =
00129         boost::shared_ptr<L1GtStableParameters>(new L1GtStableParameters());
00130 
00131     // set the number of physics trigger algorithms
00132     pL1GtStableParameters->setGtNumberPhysTriggers(m_numberPhysTriggers);
00133 
00134     // set the additional number of physics trigger algorithms
00135     pL1GtStableParameters->setGtNumberPhysTriggersExtended(m_numberPhysTriggersExtended);
00136 
00137     // set the number of technical triggers
00138     pL1GtStableParameters->setGtNumberTechnicalTriggers(m_numberTechnicalTriggers);
00139 
00140     // set the number of L1 muons received by GT
00141     pL1GtStableParameters->setGtNumberL1Mu(m_numberL1Mu);
00142     
00143     //  set the number of L1 e/gamma objects received by GT
00144     pL1GtStableParameters->setGtNumberL1NoIsoEG(m_numberL1NoIsoEG);
00145     
00146     //  set the number of L1 isolated e/gamma objects received by GT
00147     pL1GtStableParameters->setGtNumberL1IsoEG(m_numberL1IsoEG);
00148     
00149     // set the number of L1 central jets received by GT
00150     pL1GtStableParameters->setGtNumberL1CenJet(m_numberL1CenJet);
00151     
00152     // set the number of L1 forward jets received by GT
00153     pL1GtStableParameters->setGtNumberL1ForJet(m_numberL1ForJet);
00154     
00155     // set the number of L1 tau jets received by GT
00156     pL1GtStableParameters->setGtNumberL1TauJet(m_numberL1TauJet);
00157     
00158     // set the number of L1 jet counts received by GT
00159     pL1GtStableParameters->setGtNumberL1JetCounts(m_numberL1JetCounts);
00160     
00161     // hardware stuff
00162     
00163     // set the number of condition chips in GTL
00164     pL1GtStableParameters->setGtNumberConditionChips(m_numberConditionChips);
00165     
00166     // set the number of pins on the GTL condition chips
00167     pL1GtStableParameters->setGtPinsOnConditionChip(m_pinsOnConditionChip);
00168     
00169     // set the correspondence "condition chip - GTL algorithm word"
00170     // in the hardware
00171     pL1GtStableParameters->setGtOrderConditionChip(m_orderConditionChip);
00172     
00173     // set the number of PSB boards in GT
00174     pL1GtStableParameters->setGtNumberPsbBoards(m_numberPsbBoards);
00175     
00176     //   set the number of bits for eta of calorimeter objects
00177     pL1GtStableParameters->setGtIfCaloEtaNumberBits(m_ifCaloEtaNumberBits);
00178     
00179     //   set the number of bits for eta of muon objects
00180     pL1GtStableParameters->setGtIfMuEtaNumberBits(m_ifMuEtaNumberBits);
00181     
00182     // set WordLength
00183     pL1GtStableParameters->setGtWordLength(m_wordLength);
00184     
00185     // set one UnitLength
00186     pL1GtStableParameters->setGtUnitLength(m_unitLength);
00187     
00188     //
00189     //
00190     return pL1GtStableParameters;
00191 
00192 }
00193