CMS 3D CMS Logo

Public Member Functions | Private Attributes

L1GtParametersTrivialProducer Class Reference

#include <L1GtParametersTrivialProducer.h>

Inheritance diagram for L1GtParametersTrivialProducer:
edm::ESProducer edm::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider

List of all members.

Public Member Functions

 L1GtParametersTrivialProducer (const edm::ParameterSet &)
 constructor
boost::shared_ptr< L1GtParametersproduceGtParameters (const L1GtParametersRcd &)
 public methods
 ~L1GtParametersTrivialProducer ()
 destructor

Private Attributes

unsigned int m_bstLengthBytes
 length of BST record (in bytes)
boost::uint16_t m_daqActiveBoards
 active boards in the L1 DAQ record
std::vector< int > m_daqNrBxBoard
 number of Bx per board in the DAQ record
boost::uint16_t m_evmActiveBoards
 active boards in the L1 EVM record
std::vector< int > m_evmNrBxBoard
 number of Bx per board in the EVM record
int m_totalBxInEvent
 total Bx's in the event

Detailed Description

Description: ESProducer for L1 GT parameters.

Implementation: <TODO: enter implementation details>

Author:
: Vasile Mihai Ghete - HEPHY Vienna

$Date$ $Revision$

Definition at line 39 of file L1GtParametersTrivialProducer.h.


Constructor & Destructor Documentation

L1GtParametersTrivialProducer::L1GtParametersTrivialProducer ( const edm::ParameterSet parSet)

constructor

Definition at line 41 of file L1GtParametersTrivialProducer.cc.

References edm::ParameterSet::getParameter(), m_bstLengthBytes, m_daqActiveBoards, m_daqNrBxBoard, m_evmActiveBoards, m_evmNrBxBoard, m_totalBxInEvent, produceGtParameters(), and edm::ESProducer::setWhatProduced().

{
    // tell the framework what data is being produced
    setWhatProduced(this, &L1GtParametersTrivialProducer::produceGtParameters);

    // now do what ever other initialization is needed

    // total Bx's in the event

    m_totalBxInEvent = parSet.getParameter<int>("TotalBxInEvent");

    if (m_totalBxInEvent > 0) {
        if ( (m_totalBxInEvent%2) == 0 ) {
            m_totalBxInEvent = m_totalBxInEvent - 1;

            edm::LogInfo("L1GtParametersTrivialProducer")
            << "\nWARNING: Number of bunch crossing in event rounded to: "
            << m_totalBxInEvent << "\n         The number must be an odd number!\n"
            << std::endl;
        }
    } else {

        edm::LogInfo("L1GtParametersTrivialProducer")
        << "\nWARNING: Number of bunch crossing in event must be a positive number!"
        << "\n  Requested value was: " << m_totalBxInEvent
        << "\n  Reset to 1 (L1Accept bunch only).\n"
        << std::endl;

        m_totalBxInEvent = 1;

    }

    m_daqActiveBoards = static_cast<boost::uint16_t> (parSet.getParameter<unsigned int> (
            "DaqActiveBoards"));

    m_evmActiveBoards = static_cast<boost::uint16_t> (parSet.getParameter<unsigned int> (
            "EvmActiveBoards"));

    m_daqNrBxBoard = parSet.getParameter<std::vector<int> > ("DaqNrBxBoard");

    m_evmNrBxBoard = parSet.getParameter<std::vector<int> > ("EvmNrBxBoard");

    m_bstLengthBytes = parSet.getParameter<unsigned int> ("BstLengthBytes");

}
L1GtParametersTrivialProducer::~L1GtParametersTrivialProducer ( )

destructor

Definition at line 88 of file L1GtParametersTrivialProducer.cc.

{

    // empty

}

Member Function Documentation

boost::shared_ptr< L1GtParameters > L1GtParametersTrivialProducer::produceGtParameters ( const L1GtParametersRcd iRecord)

public methods

L1 GT parameters

Definition at line 99 of file L1GtParametersTrivialProducer.cc.

References m_bstLengthBytes, m_daqActiveBoards, m_daqNrBxBoard, m_evmActiveBoards, m_evmNrBxBoard, and m_totalBxInEvent.

Referenced by L1GtParametersTrivialProducer().

{

    using namespace edm::es;


    boost::shared_ptr<L1GtParameters> pL1GtParameters =
        boost::shared_ptr<L1GtParameters>( new L1GtParameters() );


    // set total Bx's in the event
    pL1GtParameters->setGtTotalBxInEvent(m_totalBxInEvent);

    // set the active boards for L1 GT DAQ record
    pL1GtParameters->setGtDaqActiveBoards(m_daqActiveBoards);

    // set the active boards for L1 GT EVM record
    pL1GtParameters->setGtEvmActiveBoards(m_evmActiveBoards);

    // set the number of Bx per board for L1 GT DAQ record
    pL1GtParameters->setGtDaqNrBxBoard(m_daqNrBxBoard);

    // set the number of Bx per board for L1 GT EVM record
    pL1GtParameters->setGtEvmNrBxBoard(m_evmNrBxBoard);

    // set length of BST record (in bytes) for L1 GT EVM record
    pL1GtParameters->setGtBstLengthBytes(m_bstLengthBytes);

    return pL1GtParameters ;
}

Member Data Documentation

length of BST record (in bytes)

Definition at line 75 of file L1GtParametersTrivialProducer.h.

Referenced by L1GtParametersTrivialProducer(), and produceGtParameters().

active boards in the L1 DAQ record

Definition at line 63 of file L1GtParametersTrivialProducer.h.

Referenced by L1GtParametersTrivialProducer(), and produceGtParameters().

number of Bx per board in the DAQ record

Definition at line 69 of file L1GtParametersTrivialProducer.h.

Referenced by L1GtParametersTrivialProducer(), and produceGtParameters().

active boards in the L1 EVM record

Definition at line 66 of file L1GtParametersTrivialProducer.h.

Referenced by L1GtParametersTrivialProducer(), and produceGtParameters().

number of Bx per board in the EVM record

Definition at line 72 of file L1GtParametersTrivialProducer.h.

Referenced by L1GtParametersTrivialProducer(), and produceGtParameters().

total Bx's in the event

Definition at line 60 of file L1GtParametersTrivialProducer.h.

Referenced by L1GtParametersTrivialProducer(), and produceGtParameters().