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 edm::EDConsumerBase

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 ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndex indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Attributes

bool debug
 
MonitorElementhisto
 
bool isLocalRun
 
edm::InputTag ltcDigiCollectionTag
 
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
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
CurrentProcessingContext const * currentContext () const
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Detailed Description

Author
S.Bolognesi - INFN Torino

Definition at line 27 of file DTTriggerCheck.h.

Constructor & Destructor Documentation

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

Constructor.

Definition at line 20 of file DTTriggerCheck.cc.

References DQMStore::book1D(), debug, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), histo, isLocalRun, ltcDigiCollectionTag, cppFunctionSkipper::operator, DQMStore::setCurrentFolder(), and theDbe.

20  :
21  isLocalRun(pset.getUntrackedParameter<bool>("localrun", true)) {
22 
23  if (!isLocalRun) {
24  ltcDigiCollectionTag = pset.getParameter<edm::InputTag>("ltcDigiCollectionTag");
25  }
26 
28 
29  debug = pset.getUntrackedParameter<bool>("debug",false);
30 
31  theDbe->setCurrentFolder("DT/DTTriggerTask");
32  histo = theDbe->book1D("hNTriggerPerType",
33  "# of trigger per type",21, -1, 20);
34 }
T getParameter(std::string const &) const
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:722
DQMStore * theDbe
edm::InputTag ltcDigiCollectionTag
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:434
DTTriggerCheck::~DTTriggerCheck ( )
virtual

Destructor.

Definition at line 36 of file DTTriggerCheck.cc.

36  {
37 }

Member Function Documentation

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

Analyze.

Implements edm::EDAnalyzer.

Definition at line 50 of file DTTriggerCheck.cc.

References gather_cfg::cout, debug, MonitorElement::Fill(), histo, isLocalRun, and ltcDigiCollectionTag.

50  {
51  if(debug)
52  cout << "[DTTriggerCheck] Analyze #Run: " << event.id().run()
53  << " #Event: " << event.id().event() << endl;
54 
55  //Get the trigger source from ltc digis
57  if (!isLocalRun)
58  {
59  event.getByLabel(ltcDigiCollectionTag, ltcdigis);
60  for (std::vector<LTCDigi>::const_iterator ltc_it = ltcdigis->begin(); ltc_it != ltcdigis->end(); ltc_it++){
61  if (((*ltc_it).HasTriggered(0)) ||
62  ((*ltc_it).HasTriggered(1)) ||
63  ((*ltc_it).HasTriggered(2)) ||
64  ((*ltc_it).HasTriggered(3)) ||
65  ((*ltc_it).HasTriggered(4)))
66  histo->Fill(-1);
67  if ((*ltc_it).HasTriggered(0))
68  histo->Fill(0);
69  if ((*ltc_it).HasTriggered(1))
70  histo->Fill(1);
71  if ((*ltc_it).HasTriggered(2))
72  histo->Fill(2);
73  if ((*ltc_it).HasTriggered(3))
74  histo->Fill(3);
75  if ((*ltc_it).HasTriggered(4))
76  histo->Fill(4);
77  }
78  }
79  else
80  histo->Fill(0);
81 }
MonitorElement * histo
void Fill(long long x)
edm::InputTag ltcDigiCollectionTag
tuple cout
Definition: gather_cfg.py:121
void DTTriggerCheck::beginJob ( void  )
virtual

Reimplemented from edm::EDAnalyzer.

Definition at line 39 of file DTTriggerCheck.cc.

39  {
40 }
void DTTriggerCheck::endJob ( void  )
virtual

Reimplemented from edm::EDAnalyzer.

Definition at line 42 of file DTTriggerCheck.cc.

References gather_cfg::cout, debug, DQMStore::rmdir(), and theDbe.

42  {
43 
44  if(debug)
45  cout<<"[DTTriggerCheck] endjob called!"<<endl;
46 
47  theDbe->rmdir("DT/DTTriggerTask");
48 }
void rmdir(const std::string &fullpath)
Definition: DQMStore.cc:2535
DQMStore * theDbe
tuple cout
Definition: gather_cfg.py:121

Friends And Related Function Documentation

friend class DTMonitorModule
friend

Definition at line 29 of file DTTriggerCheck.h.

Member Data Documentation

bool DTTriggerCheck::debug
private
MonitorElement* DTTriggerCheck::histo
private

Definition at line 53 of file DTTriggerCheck.h.

Referenced by analyze(), and DTTriggerCheck().

bool DTTriggerCheck::isLocalRun
private

Definition at line 55 of file DTTriggerCheck.h.

Referenced by analyze(), and DTTriggerCheck().

edm::InputTag DTTriggerCheck::ltcDigiCollectionTag
private

Definition at line 56 of file DTTriggerCheck.h.

Referenced by analyze(), and DTTriggerCheck().

DQMStore* DTTriggerCheck::theDbe
private

Definition at line 49 of file DTTriggerCheck.h.

Referenced by DTTriggerCheck(), and endJob().