CMS 3D CMS Logo

Public Member Functions | Private Attributes | Friends

DTTriggerCheck Class Reference

#include <DTTriggerCheck.h>

Inheritance diagram for DTTriggerCheck:
edm::EDAnalyzer

List of all members.

Public Member Functions

void analyze (const edm::Event &event, const edm::EventSetup &setup)
 Analyze.
void beginJob ()
 DTTriggerCheck (const edm::ParameterSet &pset)
 Constructor.
void endJob ()
virtual ~DTTriggerCheck ()
 Destructor.

Private Attributes

bool debug
MonitorElementhisto
edm::ParameterSet parameters
DQMStoretheDbe

Friends

class DTMonitorModule

Detailed Description

Author:
S.Bolognesi - INFN Torino

Definition at line 26 of file DTTriggerCheck.h.


Constructor & Destructor Documentation

DTTriggerCheck::DTTriggerCheck ( const edm::ParameterSet pset)

Constructor.

Definition at line 20 of file DTTriggerCheck.cc.

References debug, edm::ParameterSet::getUntrackedParameter(), interpolateCardsSimple::histo, cppFunctionSkipper::operator, and Parameters::parameters.

                                                      {
 theDbe = edm::Service<DQMStore>().operator->();

 debug = pset.getUntrackedParameter<bool>("debug",false);
    parameters = pset;

  theDbe->setCurrentFolder("DT/DTTriggerTask");
  histo = theDbe->book1D("hNTriggerPerType",
                         "# of trigger per type",21, -1, 20);
}
DTTriggerCheck::~DTTriggerCheck ( ) [virtual]

Destructor.

Definition at line 31 of file DTTriggerCheck.cc.

                               {
}

Member Function Documentation

void DTTriggerCheck::analyze ( const edm::Event event,
const edm::EventSetup setup 
) [virtual]

Analyze.

Implements edm::EDAnalyzer.

Definition at line 45 of file DTTriggerCheck.cc.

References gather_cfg::cout, debug, interpolateCardsSimple::histo, and Parameters::parameters.

                                                                        {
  if(debug)
    cout << "[DTTriggerCheck] Analyze #Run: " << event.id().run()
         << " #Event: " << event.id().event() << endl;
  
  //Get the trigger source from ltc digis
  edm::Handle<LTCDigiCollection> ltcdigis;
  if ( !parameters.getUntrackedParameter<bool>("localrun", true) ) 
    {
      event.getByType(ltcdigis);
      for (std::vector<LTCDigi>::const_iterator ltc_it = ltcdigis->begin(); ltc_it != ltcdigis->end(); ltc_it++){
        if (((*ltc_it).HasTriggered(0)) || 
            ((*ltc_it).HasTriggered(1)) || 
            ((*ltc_it).HasTriggered(2)) || 
            ((*ltc_it).HasTriggered(3)) || 
            ((*ltc_it).HasTriggered(4)))
          histo->Fill(-1);
        if ((*ltc_it).HasTriggered(0))
          histo->Fill(0);
        if ((*ltc_it).HasTriggered(1))
          histo->Fill(1);
        if ((*ltc_it).HasTriggered(2))
          histo->Fill(2);
        if ((*ltc_it).HasTriggered(3))
          histo->Fill(3);
        if ((*ltc_it).HasTriggered(4))
          histo->Fill(4);
      }
    }
  else
    histo->Fill(0);   
}  
void DTTriggerCheck::beginJob ( void  ) [virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 34 of file DTTriggerCheck.cc.

                             {
}
void DTTriggerCheck::endJob ( void  ) [virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 37 of file DTTriggerCheck.cc.

References gather_cfg::cout, and debug.

                           {

  if(debug)
    cout<<"[DTTriggerCheck] endjob called!"<<endl;
  
  theDbe->rmdir("DT/DTTriggerTask");
}

Friends And Related Function Documentation

friend class DTMonitorModule [friend]

Definition at line 28 of file DTTriggerCheck.h.


Member Data Documentation

bool DTTriggerCheck::debug [private]

Definition at line 50 of file DTTriggerCheck.h.

Definition at line 54 of file DTTriggerCheck.h.

Definition at line 52 of file DTTriggerCheck.h.

Definition at line 48 of file DTTriggerCheck.h.