CMS 3D CMS Logo

Public Member Functions

edmtest::L1TriggerScalerESAnalyzer Class Reference

Inheritance diagram for edmtest::L1TriggerScalerESAnalyzer:
edm::EDAnalyzer edm::EDConsumerBase

List of all members.

Public Member Functions

virtual void analyze (const edm::Event &e, const edm::EventSetup &c)
virtual void beginJob ()
virtual void beginRun (const edm::Run &, const edm::EventSetup &context)
 L1TriggerScalerESAnalyzer (int i)
 L1TriggerScalerESAnalyzer (edm::ParameterSet const &p)
virtual ~L1TriggerScalerESAnalyzer ()

Detailed Description

Definition at line 24 of file L1TriggerScalerESAnalyzer.cc.


Constructor & Destructor Documentation

edmtest::L1TriggerScalerESAnalyzer::L1TriggerScalerESAnalyzer ( edm::ParameterSet const &  p) [inline, explicit]

Definition at line 27 of file L1TriggerScalerESAnalyzer.cc.

References gather_cfg::cout.

    { 
      std::cout<<"L1TriggerScalerESAnalyzer"<<std::endl;
    }
edmtest::L1TriggerScalerESAnalyzer::L1TriggerScalerESAnalyzer ( int  i) [inline, explicit]

Definition at line 31 of file L1TriggerScalerESAnalyzer.cc.

References gather_cfg::cout.

    { std::cout<<"L1TriggerScalerESAnalyzer "<<i<<std::endl; }
virtual edmtest::L1TriggerScalerESAnalyzer::~L1TriggerScalerESAnalyzer ( ) [inline, virtual]

Definition at line 33 of file L1TriggerScalerESAnalyzer.cc.

References gather_cfg::cout.

                                         {  
      std::cout<<"~L1TriggerScalerESAnalyzer "<<std::endl;
    }

Member Function Documentation

void edmtest::L1TriggerScalerESAnalyzer::analyze ( const edm::Event e,
const edm::EventSetup c 
) [virtual]

Implements edm::EDAnalyzer.

Definition at line 60 of file L1TriggerScalerESAnalyzer.cc.

References gather_cfg::cout, edm::EventID::event(), edm::eventsetup::heterocontainer::HCTypeTag::findType(), edm::EventSetup::get(), edm::EventBase::id(), edm::EventID::run(), and edm::eventsetup::EventSetupRecordKey::type().

                                                                                    {
    using namespace edm::eventsetup;
    std::cout<<"###L1TriggerScalerESAnalyzer::analyze"<<std::endl;
     
    // Context is not used.
    std::cout <<" I AM IN RUN NUMBER "<<e.id().run() <<std::endl;
    std::cout <<" ---EVENT NUMBER "<<e.id().event() <<std::endl;
    edm::eventsetup::EventSetupRecordKey recordKey(edm::eventsetup::EventSetupRecordKey::TypeTag::findType("L1TriggerScalerRcd"));
    if( recordKey.type() == edm::eventsetup::EventSetupRecordKey::TypeTag()) {
      //record not found
      std::cout <<"Record \"L1TriggerScalerRcd"<<"\" does not exist "<<std::endl;
    }
    edm::ESHandle<L1TriggerScaler> l1tr;
    std::cout<<"got eshandle"<<std::endl;
    context.get<L1TriggerScalerRcd>().get(l1tr);
    std::cout<<"got context"<<std::endl;
    const L1TriggerScaler* l1lumiscaler=l1tr.product();
    std::cout<<"got L1TriggerScaler* "<< std::endl;

    /* let's user the printValues method
    std::cout<< "print result" << std::endl;
    l1lumiscaler->printAllValues();
    std::cout<< "print finished" << std::endl;
    */
std::cout<< "print  result" << std::endl;
    l1lumiscaler->printRunValue();
    l1lumiscaler->printLumiSegmentValues();
    l1lumiscaler->printFormat();
    l1lumiscaler->printGTAlgoCounts();
    l1lumiscaler->printGTAlgoRates();
    l1lumiscaler->printGTAlgoPrescaling();
    l1lumiscaler->printGTTechCounts();
    l1lumiscaler->printGTTechRates();
    l1lumiscaler->printGTTechPrescaling();
    l1lumiscaler->printGTPartition0TriggerCounts();
    l1lumiscaler->printGTPartition0TriggerRates();
    l1lumiscaler->printGTPartition0DeadTime();
    l1lumiscaler->printGTPartition0DeadTimeRatio();
    std::cout<<  "print  finished" << std::endl;
 


   /*
    for(std::vector<L1TriggerScaler::Lumi>::const_iterator it=l1lumiscaler->m_run.begin(); it!=l1lumiscaler->m_run.end(); ++it){
      std::cout << "  run:  " <<it->m_rn<<
        "\nlumisegment: "  << it->m_lumisegment<<std::endl;  



      for(size_t i=0; i<it->m_GTAlgoRates.size(); i++ ){ 
        std::cout << "m_GTAlgoRates["<<i<<"] = "<< it->m_GTAlgoRates[i]<<std::endl;  
      }
     for(size_t i=0; i<it->m_GTAlgoPrescaling.size(); i++ ){ 
       std::cout << "m_GTAlgoPrescaling["<<i<<"] = "<< it->m_GTAlgoPrescaling[i]<<std::endl;  
      } 
for(size_t i=0; i<it->m_GTTechCounts.size(); i++ ){ 
       std::cout << " m_GTTechCounts["<<i<<"] = "<< it->m_GTTechCounts[i]<<std::endl;  
      } 

for(size_t i=0; i<it->m_GTTechRates.size(); i++ ){ 
       std::cout << " m_GTTechRates["<<i<<"] = "<< it->m_GTTechRates[i]<<std::endl;  
      } 
for(size_t i=0; i<it->m_GTTechPrescaling.size(); i++ ){ 
       std::cout << " m_GTTechPrescaling["<<i<<"] = "<< it->m_GTTechPrescaling[i]<<std::endl;  
      } 
for(size_t i=0; i<it->m_GTPartition0TriggerCounts.size(); i++ ){ 
       std::cout << " m_GTPartition0TriggerCounts["<<i<<"] = "<< it->m_GTPartition0TriggerCounts[i]<<std::endl;  
      } 
for(size_t i=0; i<it->m_GTPartition0TriggerRates.size(); i++ ){ 
       std::cout << " m_GTPartition0TriggerRates["<<i<<"] = "<< it->m_GTPartition0TriggerRates[i]<<std::endl;  
      } 

for(size_t i=0; i<it->m_GTPartition0DeadTime.size(); i++ ){ 
       std::cout << " m_GTPartition0DeadTime["<<i<<"] = "<< it->m_GTPartition0DeadTime[i]<<std::endl;  
      }
for(size_t i=0; i<it->m_GTPartition0DeadTimeRatio.size(); i++ ){ 
       std::cout << " m_GTPartition0DeadTimeRatio["<<i<<"] = "<< it->m_GTPartition0DeadTimeRatio[i]<<std::endl;  
      }
   }
    */
  }
void edmtest::L1TriggerScalerESAnalyzer::beginJob ( void  ) [virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 53 of file L1TriggerScalerESAnalyzer.cc.

References gather_cfg::cout.

                                     {
    std::cout<<"###L1TriggerScalerESAnalyzer::beginJob"<<std::endl;
   
  }
void edmtest::L1TriggerScalerESAnalyzer::beginRun ( const edm::Run ,
const edm::EventSetup context 
) [virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 44 of file L1TriggerScalerESAnalyzer.cc.

References gather_cfg::cout, and edm::EventSetup::get().

                                                                                {
    std::cout<<"###L1TriggerScalerESAnalyzer::beginRun"<<std::endl;
    edm::ESHandle<L1TriggerScaler> L1TriggerScaler_lumiarray;
    std::cout<<"got eshandle"<<std::endl;
    context.get<L1TriggerScalerRcd>().get(L1TriggerScaler_lumiarray);
    std::cout<<"got data"<<std::endl;
  }