CMS 3D CMS Logo

Public Member Functions | Private Attributes

L1GtTriggerMenuXmlProducer Class Reference

#include <L1GtTriggerMenuXmlProducer.h>

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

List of all members.

Public Member Functions

 L1GtTriggerMenuXmlProducer (const edm::ParameterSet &)
 constructor
boost::shared_ptr
< L1GtTriggerMenu
produceGtTriggerMenu (const L1GtTriggerMenuRcd &)
 public methods
 ~L1GtTriggerMenuXmlProducer ()
 destructor

Private Attributes

std::string m_defXmlFile
 XML file for Global Trigger menu (def.xml)
std::string m_vmeXmlFile
 XML file for Global Trigger VME configuration (vme.xml)

Detailed Description

Description: ESProducer for the L1 Trigger Menu from an XML file .

Implementation: <TODO: enter implementation details>

Author:
: Vasile Mihai Ghete - HEPHY Vienna

$Date$ $Revision$

Definition at line 40 of file L1GtTriggerMenuXmlProducer.h.


Constructor & Destructor Documentation

L1GtTriggerMenuXmlProducer::L1GtTriggerMenuXmlProducer ( const edm::ParameterSet parSet)

constructor

Definition at line 49 of file L1GtTriggerMenuXmlProducer.cc.

References validate-o2o-wbm::f1, validate-o2o-wbm::f2, edm::FileInPath::fullPath(), edm::ParameterSet::getParameter(), m_defXmlFile, m_vmeXmlFile, produceGtTriggerMenu(), and edm::ESProducer::setWhatProduced().

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


    // now do what ever other initialization is needed


    // directory in /data/Luminosity for the trigger menu
    std::string menuDir = parSet.getParameter<std::string>("TriggerMenuLuminosity");


    // def.xml file
    std::string defXmlFileName = parSet.getParameter<std::string>("DefXmlFile");

    edm::FileInPath f1("L1TriggerConfig/L1GtConfigProducers/data/Luminosity/" +
                       menuDir + "/" + defXmlFileName);

    m_defXmlFile = f1.fullPath();


    // vme.xml file
    std::string vmeXmlFileName = parSet.getParameter<std::string>("VmeXmlFile");

    if (vmeXmlFileName != "") {
        edm::FileInPath f2("L1TriggerConfig/L1GtConfigProducers/data/Luminosity/" +
                           menuDir + "/" + vmeXmlFileName);

        m_vmeXmlFile = f2.fullPath();

    }

    edm::LogInfo("L1GtConfigProducers")
    << "\n\nL1 Trigger Menu: "
    << "\n\n  def.xml file: \n    " << m_defXmlFile
    << "\n\n  vme.xml file: \n    " << m_vmeXmlFile
    << "\n\n"
    << std::endl;

}
L1GtTriggerMenuXmlProducer::~L1GtTriggerMenuXmlProducer ( )

destructor

Definition at line 93 of file L1GtTriggerMenuXmlProducer.cc.

{

    // empty

}

Member Function Documentation

boost::shared_ptr< L1GtTriggerMenu > L1GtTriggerMenuXmlProducer::produceGtTriggerMenu ( const L1GtTriggerMenuRcd l1MenuRecord)

public methods

L1 GT parameters

Definition at line 104 of file L1GtTriggerMenuXmlProducer.cc.

References L1GtTriggerMenuXmlParser::corCaloTemplate(), L1GtTriggerMenuXmlParser::corEnergySumTemplate(), L1GtTriggerMenuXmlParser::corMuonTemplate(), edm::eventsetup::EventSetupRecord::get(), edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), L1GtTriggerMenuXmlParser::gtAlgorithmAliasMap(), L1GtTriggerMenuXmlParser::gtAlgorithmMap(), L1GtTriggerMenuXmlParser::gtScaleDbKey(), L1GtTriggerMenuXmlParser::gtTechnicalTriggerMap(), L1GtTriggerMenuXmlParser::gtTriggerMenuImplementation(), L1GtTriggerMenuXmlParser::gtTriggerMenuInterface(), L1GtTriggerMenuXmlParser::gtTriggerMenuName(), m_defXmlFile, m_vmeXmlFile, L1GtTriggerMenuXmlParser::parseXmlFile(), L1GtTriggerMenuXmlParser::setGtNumberConditionChips(), L1GtTriggerMenuXmlParser::setGtNumberL1JetCounts(), L1GtTriggerMenuXmlParser::setGtNumberPhysTriggers(), L1GtTriggerMenuXmlParser::setGtNumberTechTriggers(), L1GtTriggerMenuXmlParser::setGtOrderConditionChip(), L1GtTriggerMenuXmlParser::setGtPinsOnConditionChip(), L1GtTriggerMenuXmlParser::vecBptxTemplate(), L1GtTriggerMenuXmlParser::vecCaloTemplate(), L1GtTriggerMenuXmlParser::vecCastorTemplate(), L1GtTriggerMenuXmlParser::vecCorrelationTemplate(), L1GtTriggerMenuXmlParser::vecEnergySumTemplate(), L1GtTriggerMenuXmlParser::vecExternalTemplate(), L1GtTriggerMenuXmlParser::vecHfBitCountsTemplate(), L1GtTriggerMenuXmlParser::vecHfRingEtSumsTemplate(), L1GtTriggerMenuXmlParser::vecJetCountsTemplate(), and L1GtTriggerMenuXmlParser::vecMuonTemplate().

Referenced by L1GtTriggerMenuXmlProducer().

{

    // get the parameters needed from other records
    const L1GtStableParametersRcd& stableParametersRcd =
        l1MenuRecord.getRecord<L1GtStableParametersRcd>();

    edm::ESHandle<L1GtStableParameters> stableParameters;
    stableParametersRcd.get(stableParameters);

    unsigned int numberConditionChips = stableParameters->gtNumberConditionChips();
    unsigned int pinsOnConditionChip = stableParameters->gtPinsOnConditionChip();
    std::vector<int> orderConditionChip = stableParameters->gtOrderConditionChip();
    unsigned int numberPhysTriggers = stableParameters->gtNumberPhysTriggers();
    unsigned int numberTechTriggers = stableParameters->gtNumberTechnicalTriggers();
    unsigned int numberL1JetCounts = stableParameters->gtNumberL1JetCounts();

    L1GtTriggerMenuXmlParser gtXmlParser = L1GtTriggerMenuXmlParser();

    gtXmlParser.setGtNumberConditionChips(numberConditionChips);
    gtXmlParser.setGtPinsOnConditionChip(pinsOnConditionChip);
    gtXmlParser.setGtOrderConditionChip(orderConditionChip);
    gtXmlParser.setGtNumberPhysTriggers(numberPhysTriggers);
    gtXmlParser.setGtNumberTechTriggers(numberTechTriggers);
    gtXmlParser.setGtNumberL1JetCounts(numberL1JetCounts);

    gtXmlParser.parseXmlFile(m_defXmlFile, m_vmeXmlFile);

    // transfer the condition map and algorithm map from parser to L1GtTriggerMenu

    boost::shared_ptr<L1GtTriggerMenu> pL1GtTriggerMenu = boost::shared_ptr<L1GtTriggerMenu>(
                new L1GtTriggerMenu(gtXmlParser.gtTriggerMenuName(), numberConditionChips,
                        gtXmlParser.vecMuonTemplate(),
                        gtXmlParser.vecCaloTemplate(),
                        gtXmlParser.vecEnergySumTemplate(),
                        gtXmlParser.vecJetCountsTemplate(),
                        gtXmlParser.vecCastorTemplate(),
                        gtXmlParser.vecHfBitCountsTemplate(),
                        gtXmlParser.vecHfRingEtSumsTemplate(),
                        gtXmlParser.vecBptxTemplate(),
                        gtXmlParser.vecExternalTemplate(),
                        gtXmlParser.vecCorrelationTemplate(),
                        gtXmlParser.corMuonTemplate(),
                        gtXmlParser.corCaloTemplate(),
                        gtXmlParser.corEnergySumTemplate()) );


    pL1GtTriggerMenu->setGtTriggerMenuInterface(gtXmlParser.gtTriggerMenuInterface());
    pL1GtTriggerMenu->setGtTriggerMenuImplementation(gtXmlParser.gtTriggerMenuImplementation());
    pL1GtTriggerMenu->setGtScaleDbKey(gtXmlParser.gtScaleDbKey());

    pL1GtTriggerMenu->setGtAlgorithmMap(gtXmlParser.gtAlgorithmMap());
    pL1GtTriggerMenu->setGtAlgorithmAliasMap(gtXmlParser.gtAlgorithmAliasMap());
    pL1GtTriggerMenu->setGtTechnicalTriggerMap(gtXmlParser.gtTechnicalTriggerMap());

    //LogDebug("L1GtConfigProducers")
    //<< "\n\nReturning L1 Trigger Menu!"
    //<< "\n\n"
    //<< std::endl;

    return pL1GtTriggerMenu ;
}

Member Data Documentation

XML file for Global Trigger menu (def.xml)

Definition at line 61 of file L1GtTriggerMenuXmlProducer.h.

Referenced by L1GtTriggerMenuXmlProducer(), and produceGtTriggerMenu().

XML file for Global Trigger VME configuration (vme.xml)

Definition at line 64 of file L1GtTriggerMenuXmlProducer.h.

Referenced by L1GtTriggerMenuXmlProducer(), and produceGtTriggerMenu().