CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Private Attributes

L1GtPrescaleFactorsAndMasksTester Class Reference

#include <L1GtPrescaleFactorsAndMasksTester.h>

Inheritance diagram for L1GtPrescaleFactorsAndMasksTester:
edm::EDAnalyzer

List of all members.

Public Member Functions

 L1GtPrescaleFactorsAndMasksTester (const edm::ParameterSet &)
virtual ~L1GtPrescaleFactorsAndMasksTester ()

Private Member Functions

void analyze (const edm::Event &, const edm::EventSetup &)
 analyze
void beginJob ()
 begin job
void beginLuminosityBlock (const edm::LuminosityBlock &, const edm::EventSetup &)
 begin luminosity block
void beginRun (const edm::Run &, const edm::EventSetup &)
 begin run
void endJob ()
 end job
void endLuminosityBlock (const edm::LuminosityBlock &, const edm::EventSetup &)
 end luminosity block
void endRun (const edm::Run &, const edm::EventSetup &)
 end run
void printL1EventSetup (const edm::EventSetup &)
 print the requred records
void retrieveL1EventSetup (const edm::EventSetup &)
 retrieve all the relevant L1 trigger event setup records

Private Attributes

const L1GtPrescaleFactorsm_l1GtPfAlgo
 prescale factors
const L1GtPrescaleFactorsm_l1GtPfTech
const L1GtTriggerMaskm_l1GtTmAlgo
 trigger masks & veto masks
const L1GtTriggerMaskm_l1GtTmTech
const L1GtTriggerMaskm_l1GtTmVetoAlgo
const L1GtTriggerMaskm_l1GtTmVetoTech
bool m_printInAnalyze
bool m_printInBeginLuminosityBlock
bool m_printInBeginRun
 print the records in beginRun, beginLuminosityBlock, analyze, respectively
int m_printOutput
 print output
bool m_retrieveInAnalyze
bool m_retrieveInBeginLuminosityBlock
bool m_retrieveInBeginRun
 retrieve the records in beginRun, beginLuminosityBlock, analyze, respectively
bool m_testerPrescaleFactors
 input parameters
bool m_testerTriggerMask
bool m_testerTriggerVetoMask

Detailed Description

Description: test analyzer for L1 GT prescale factors and masks.

Implementation: <TODO: enter implementation details>

Author:
: Vasile Mihai Ghete - HEPHY Vienna

$Date$ $Revision$

Definition at line 35 of file L1GtPrescaleFactorsAndMasksTester.h.


Constructor & Destructor Documentation

L1GtPrescaleFactorsAndMasksTester::L1GtPrescaleFactorsAndMasksTester ( const edm::ParameterSet parSet) [explicit]

Definition at line 52 of file L1GtPrescaleFactorsAndMasksTester.cc.

                                       :
            m_testerPrescaleFactors(
                    parSet.getParameter<bool> ("TesterPrescaleFactors")),
            m_testerTriggerMask(parSet.getParameter<bool> ("TesterTriggerMask")),
            m_testerTriggerVetoMask(
                    parSet.getParameter<bool> ("TesterTriggerVetoMask")),
            m_retrieveInBeginRun(
                    parSet.getParameter<bool> ("RetrieveInBeginRun")),
            m_retrieveInBeginLuminosityBlock(
                    parSet.getParameter<bool> ("RetrieveInBeginLuminosityBlock")),
            m_retrieveInAnalyze(parSet.getParameter<bool> ("RetrieveInAnalyze")),
            m_printInBeginRun(parSet.getParameter<bool> ("PrintInBeginRun")),
            m_printInBeginLuminosityBlock(
                    parSet.getParameter<bool> ("PrintInBeginLuminosityBlock")),
            m_printInAnalyze(parSet.getParameter<bool> ("PrintInAnalyze")),
            m_printOutput(parSet.getUntrackedParameter<int> ("PrintOutput", 3)) {
    // empty
}
L1GtPrescaleFactorsAndMasksTester::~L1GtPrescaleFactorsAndMasksTester ( ) [virtual]

Definition at line 73 of file L1GtPrescaleFactorsAndMasksTester.cc.

                                                                      {
    // empty
}

Member Function Documentation

void L1GtPrescaleFactorsAndMasksTester::analyze ( const edm::Event iEvent,
const edm::EventSetup evSetup 
) [private, virtual]
void L1GtPrescaleFactorsAndMasksTester::beginJob ( void  ) [private, virtual]

begin job

Reimplemented from edm::EDAnalyzer.

Definition at line 78 of file L1GtPrescaleFactorsAndMasksTester.cc.

                                                 {

}
void L1GtPrescaleFactorsAndMasksTester::beginLuminosityBlock ( const edm::LuminosityBlock iLumiBlock,
const edm::EventSetup evSetup 
) [private, virtual]
void L1GtPrescaleFactorsAndMasksTester::beginRun ( const edm::Run iRun,
const edm::EventSetup evSetup 
) [private, virtual]
void L1GtPrescaleFactorsAndMasksTester::endJob ( void  ) [private, virtual]

end job

Reimplemented from edm::EDAnalyzer.

Definition at line 137 of file L1GtPrescaleFactorsAndMasksTester.cc.

                                               {

}
void L1GtPrescaleFactorsAndMasksTester::endLuminosityBlock ( const edm::LuminosityBlock iLumiBlock,
const edm::EventSetup evSetup 
) [private, virtual]

end luminosity block

Reimplemented from edm::EDAnalyzer.

Definition at line 125 of file L1GtPrescaleFactorsAndMasksTester.cc.

                                                                            {

}
void L1GtPrescaleFactorsAndMasksTester::endRun ( const edm::Run iRun,
const edm::EventSetup evSetup 
) [private, virtual]

end run

Reimplemented from edm::EDAnalyzer.

Definition at line 131 of file L1GtPrescaleFactorsAndMasksTester.cc.

                                      {

}
void L1GtPrescaleFactorsAndMasksTester::printL1EventSetup ( const edm::EventSetup evSetup) [private]

print the requred records

Definition at line 181 of file L1GtPrescaleFactorsAndMasksTester.cc.

References gather_cfg::cout, LogTrace, m_l1GtPfAlgo, m_l1GtPfTech, m_l1GtTmAlgo, m_l1GtTmTech, m_l1GtTmVetoAlgo, m_l1GtTmVetoTech, m_printOutput, m_testerPrescaleFactors, m_testerTriggerMask, m_testerTriggerVetoMask, L1GtPrescaleFactors::print(), and L1GtTriggerMask::print().

Referenced by analyze(), beginLuminosityBlock(), and beginRun().

                                      {

    // define an output stream to print into
    // it can then be directed to whatever log level is desired
    std::ostringstream myCout;

    if (m_testerPrescaleFactors) {

        myCout << "\nL1 GT prescale factors for algorithm triggers"
                << std::endl;
        m_l1GtPfAlgo->print(myCout);

        myCout << "\nL1 GT prescale factors for technical triggers"
                << std::endl;
        m_l1GtPfTech->print(myCout);
    }

    // 
    if (m_testerTriggerMask) {
        myCout << "\nL1 GT trigger masks for algorithm triggers" << std::endl;
        m_l1GtTmAlgo->print(myCout);

        myCout << "\nL1 GT trigger masks for technical triggers" << std::endl;
        m_l1GtTmTech->print(myCout);

    }

    // 
    if (m_testerTriggerVetoMask) {
        myCout << "\nL1 GT trigger veto masks for algorithm triggers"
                << std::endl;
        m_l1GtTmVetoAlgo->print(myCout);

        myCout << "\nL1 GT trigger veto masks for technical triggers"
                << std::endl;
        m_l1GtTmVetoTech->print(myCout);

    }

    switch (m_printOutput) {
        case 0: {

            std::cout << myCout.str() << std::endl;

        }

            break;
        case 1: {

            LogTrace("L1GtPrescaleFactorsAndMasksTester") << myCout.str()
                    << std::endl;

        }
            break;

        case 2: {

            edm::LogVerbatim("L1GtPrescaleFactorsAndMasksTester")
                    << myCout.str() << std::endl;

        }

            break;
        case 3: {

            edm::LogInfo("L1GtPrescaleFactorsAndMasksTester") << myCout.str();

        }

            break;
        default: {
            myCout
                    << "\n\n  L1GtPrescaleFactorsAndMasksTester: Error - no print output = "
                    << m_printOutput
                    << " defined! \n  Check available values in the cfi file."
                    << "\n" << std::endl;

        }
            break;
    }

}
void L1GtPrescaleFactorsAndMasksTester::retrieveL1EventSetup ( const edm::EventSetup evSetup) [private]

retrieve all the relevant L1 trigger event setup records

Definition at line 141 of file L1GtPrescaleFactorsAndMasksTester.cc.

References edm::EventSetup::get(), m_l1GtPfAlgo, m_l1GtPfTech, m_l1GtTmAlgo, m_l1GtTmTech, m_l1GtTmVetoAlgo, m_l1GtTmVetoTech, m_testerPrescaleFactors, m_testerTriggerMask, m_testerTriggerVetoMask, and edm::ESHandle< T >::product().

Referenced by analyze(), beginLuminosityBlock(), and beginRun().

                                      {

    if (m_testerPrescaleFactors) {

        // get / update the prescale factors from the EventSetup

        edm::ESHandle<L1GtPrescaleFactors> l1GtPfAlgo;
        evSetup.get<L1GtPrescaleFactorsAlgoTrigRcd> ().get(l1GtPfAlgo);
        m_l1GtPfAlgo = l1GtPfAlgo.product();

        edm::ESHandle<L1GtPrescaleFactors> l1GtPfTech;
        evSetup.get<L1GtPrescaleFactorsTechTrigRcd> ().get(l1GtPfTech);
        m_l1GtPfTech = l1GtPfTech.product();
    }

    if (m_testerTriggerMask) {
        // get / update the trigger mask from the EventSetup

        edm::ESHandle<L1GtTriggerMask> l1GtTmAlgo;
        evSetup.get<L1GtTriggerMaskAlgoTrigRcd> ().get(l1GtTmAlgo);
        m_l1GtTmAlgo = l1GtTmAlgo.product();

        edm::ESHandle<L1GtTriggerMask> l1GtTmTech;
        evSetup.get<L1GtTriggerMaskTechTrigRcd> ().get(l1GtTmTech);
        m_l1GtTmTech = l1GtTmTech.product();
    }

    if (m_testerTriggerVetoMask) {
        edm::ESHandle<L1GtTriggerMask> l1GtTmVetoAlgo;
        evSetup.get<L1GtTriggerMaskVetoAlgoTrigRcd> ().get(l1GtTmVetoAlgo);
        m_l1GtTmVetoAlgo = l1GtTmVetoAlgo.product();

        edm::ESHandle<L1GtTriggerMask> l1GtTmVetoTech;
        evSetup.get<L1GtTriggerMaskVetoTechTrigRcd> ().get(l1GtTmVetoTech);
        m_l1GtTmVetoTech = l1GtTmVetoTech.product();
    }

}

Member Data Documentation

prescale factors

Definition at line 105 of file L1GtPrescaleFactorsAndMasksTester.h.

Referenced by printL1EventSetup(), and retrieveL1EventSetup().

Definition at line 106 of file L1GtPrescaleFactorsAndMasksTester.h.

Referenced by printL1EventSetup(), and retrieveL1EventSetup().

trigger masks & veto masks

Definition at line 109 of file L1GtPrescaleFactorsAndMasksTester.h.

Referenced by printL1EventSetup(), and retrieveL1EventSetup().

Definition at line 110 of file L1GtPrescaleFactorsAndMasksTester.h.

Referenced by printL1EventSetup(), and retrieveL1EventSetup().

Definition at line 112 of file L1GtPrescaleFactorsAndMasksTester.h.

Referenced by printL1EventSetup(), and retrieveL1EventSetup().

Definition at line 113 of file L1GtPrescaleFactorsAndMasksTester.h.

Referenced by printL1EventSetup(), and retrieveL1EventSetup().

Definition at line 95 of file L1GtPrescaleFactorsAndMasksTester.h.

Referenced by analyze().

Definition at line 94 of file L1GtPrescaleFactorsAndMasksTester.h.

Referenced by beginLuminosityBlock().

print the records in beginRun, beginLuminosityBlock, analyze, respectively

Definition at line 93 of file L1GtPrescaleFactorsAndMasksTester.h.

Referenced by beginRun().

print output

Definition at line 98 of file L1GtPrescaleFactorsAndMasksTester.h.

Referenced by printL1EventSetup().

Definition at line 90 of file L1GtPrescaleFactorsAndMasksTester.h.

Referenced by analyze().

Definition at line 89 of file L1GtPrescaleFactorsAndMasksTester.h.

Referenced by beginLuminosityBlock().

retrieve the records in beginRun, beginLuminosityBlock, analyze, respectively

Definition at line 88 of file L1GtPrescaleFactorsAndMasksTester.h.

Referenced by beginRun().

input parameters

analyze prescale factors, trigger masks and trigger veto masks, respectively

Definition at line 83 of file L1GtPrescaleFactorsAndMasksTester.h.

Referenced by printL1EventSetup(), and retrieveL1EventSetup().

Definition at line 84 of file L1GtPrescaleFactorsAndMasksTester.h.

Referenced by printL1EventSetup(), and retrieveL1EventSetup().

Definition at line 85 of file L1GtPrescaleFactorsAndMasksTester.h.

Referenced by printL1EventSetup(), and retrieveL1EventSetup().