CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes | Friends
DTTriggerCheck Class Reference

#include <DTTriggerCheck.h>

Inheritance diagram for DTTriggerCheck:
edm::EDAnalyzer

Public Member Functions

void analyze (const edm::Event &event, const edm::EventSetup &setup)
 Analyze. More...
 
void beginJob ()
 
 DTTriggerCheck (const edm::ParameterSet &pset)
 Constructor. More...
 
void endJob ()
 
virtual ~DTTriggerCheck ()
 Destructor. More...
 
- Public Member Functions inherited from edm::EDAnalyzer
 EDAnalyzer ()
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 

Private Attributes

bool debug
 
MonitorElementhisto
 
edm::ParameterSet parameters
 
DQMStoretheDbe
 

Friends

class DTMonitorModule
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
typedef WorkerT< EDAnalyzerWorkerType
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Member Functions inherited from edm::EDAnalyzer
CurrentProcessingContext const * currentContext () const
 

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.

20  {
22 
23  debug = pset.getUntrackedParameter<bool>("debug",false);
24  parameters = pset;
25 
26  theDbe->setCurrentFolder("DT/DTTriggerTask");
27  histo = theDbe->book1D("hNTriggerPerType",
28  "# of trigger per type",21, -1, 20);
29 }
T getUntrackedParameter(std::string const &, T const &) const
MonitorElement * histo
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:717
DQMStore * theDbe
edm::ParameterSet parameters
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:429
DTTriggerCheck::~DTTriggerCheck ( )
virtual

Destructor.

Definition at line 31 of file DTTriggerCheck.cc.

31  {
32 }

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.

45  {
46  if(debug)
47  cout << "[DTTriggerCheck] Analyze #Run: " << event.id().run()
48  << " #Event: " << event.id().event() << endl;
49 
50  //Get the trigger source from ltc digis
52  if ( !parameters.getUntrackedParameter<bool>("localrun", true) )
53  {
54  event.getByType(ltcdigis);
55  for (std::vector<LTCDigi>::const_iterator ltc_it = ltcdigis->begin(); ltc_it != ltcdigis->end(); ltc_it++){
56  if (((*ltc_it).HasTriggered(0)) ||
57  ((*ltc_it).HasTriggered(1)) ||
58  ((*ltc_it).HasTriggered(2)) ||
59  ((*ltc_it).HasTriggered(3)) ||
60  ((*ltc_it).HasTriggered(4)))
61  histo->Fill(-1);
62  if ((*ltc_it).HasTriggered(0))
63  histo->Fill(0);
64  if ((*ltc_it).HasTriggered(1))
65  histo->Fill(1);
66  if ((*ltc_it).HasTriggered(2))
67  histo->Fill(2);
68  if ((*ltc_it).HasTriggered(3))
69  histo->Fill(3);
70  if ((*ltc_it).HasTriggered(4))
71  histo->Fill(4);
72  }
73  }
74  else
75  histo->Fill(0);
76 }
T getUntrackedParameter(std::string const &, T const &) const
MonitorElement * histo
void Fill(long long x)
edm::ParameterSet parameters
tuple cout
Definition: gather_cfg.py:121
void DTTriggerCheck::beginJob ( void  )
virtual

Reimplemented from edm::EDAnalyzer.

Definition at line 34 of file DTTriggerCheck.cc.

34  {
35 }
void DTTriggerCheck::endJob ( void  )
virtual

Reimplemented from edm::EDAnalyzer.

Definition at line 37 of file DTTriggerCheck.cc.

References gather_cfg::cout, and debug.

37  {
38 
39  if(debug)
40  cout<<"[DTTriggerCheck] endjob called!"<<endl;
41 
42  theDbe->rmdir("DT/DTTriggerTask");
43 }
void rmdir(const std::string &fullpath)
Definition: DQMStore.cc:2530
DQMStore * theDbe
tuple cout
Definition: gather_cfg.py:121

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.

MonitorElement* DTTriggerCheck::histo
private

Definition at line 54 of file DTTriggerCheck.h.

edm::ParameterSet DTTriggerCheck::parameters
private
DQMStore* DTTriggerCheck::theDbe
private

Definition at line 48 of file DTTriggerCheck.h.