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
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Attributes

bool debug
 
MonitorElementhisto
 
bool isLocalRun
 
edm::EDGetTokenT
< LTCDigiCollection
ltcDigiCollectionToken_
 
DQMStoretheDbe
 

Friends

class DTMonitorModule
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- 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::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 29 of file DTTriggerCheck.h.

Constructor & Destructor Documentation

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

Constructor.

Definition at line 19 of file DTTriggerCheck.cc.

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

19  :
20  isLocalRun(pset.getUntrackedParameter<bool>("localrun", true)) {
21 
22  if (!isLocalRun) {
23  ltcDigiCollectionToken_ = consumes<LTCDigiCollection>(
24  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
edm::EDGetTokenT< LTCDigiCollection > ltcDigiCollectionToken_
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:942
DQMStore * theDbe
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:655
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 ltcDigiCollectionToken_.

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.getByToken(ltcDigiCollectionToken_, 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
edm::EDGetTokenT< LTCDigiCollection > ltcDigiCollectionToken_
void Fill(long long x)
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:3051
DQMStore * theDbe
tuple cout
Definition: gather_cfg.py:121

Friends And Related Function Documentation

friend class DTMonitorModule
friend

Definition at line 31 of file DTTriggerCheck.h.

Member Data Documentation

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

Definition at line 55 of file DTTriggerCheck.h.

Referenced by analyze(), and DTTriggerCheck().

bool DTTriggerCheck::isLocalRun
private

Definition at line 57 of file DTTriggerCheck.h.

Referenced by analyze(), and DTTriggerCheck().

edm::EDGetTokenT<LTCDigiCollection> DTTriggerCheck::ltcDigiCollectionToken_
private

Definition at line 58 of file DTTriggerCheck.h.

Referenced by analyze(), and DTTriggerCheck().

DQMStore* DTTriggerCheck::theDbe
private

Definition at line 51 of file DTTriggerCheck.h.

Referenced by DTTriggerCheck(), and endJob().