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:
DQMEDAnalyzer edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > > edm::stream::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

void analyze (const edm::Event &event, const edm::EventSetup &setup)
 Analyze. More...
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
 DTTriggerCheck (const edm::ParameterSet &pset)
 Constructor. More...
 
virtual ~DTTriggerCheck ()
 Destructor. More...
 
- Public Member Functions inherited from DQMEDAnalyzer
virtual void beginRun (edm::Run const &, edm::EventSetup const &) final
 
virtual void beginStream (edm::StreamID id) final
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer (void)
 
virtual void endLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
virtual void endRunSummary (edm::Run const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
uint32_t streamId () const
 
- Public Member Functions inherited from edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
 EDAnalyzer ()=default
 
- Public Member Functions inherited from edm::stream::EDAnalyzerBase
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDAnalyzerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 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
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) 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_
 

Friends

class DTMonitorModule
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
typedef CacheContexts< T...> CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T...> HasAbility
 
typedef
CacheTypes::LuminosityBlockCache 
LuminosityBlockCache
 
typedef
LuminosityBlockContextT
< LuminosityBlockCache,
RunCache, GlobalCache
LuminosityBlockContext
 
typedef
CacheTypes::LuminosityBlockSummaryCache 
LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache,
GlobalCache
RunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Public Types inherited from edm::stream::EDAnalyzerBase
typedef EDAnalyzerAdaptorBase ModuleType
 
- Static Public Member Functions inherited from DQMEDAnalyzer
static std::shared_ptr
< dqmDetails::NoCache
globalBeginLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *)
 
static std::shared_ptr
< dqmDetails::NoCache
globalBeginRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *)
 
static void globalEndLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *, dqmDetails::NoCache *)
 
static void globalEndRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *, dqmDetails::NoCache *)
 
- Static Public Member Functions inherited from edm::stream::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::stream::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
- 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 debug, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), isLocalRun, and ltcDigiCollectionToken_.

19  :
20  isLocalRun(pset.getUntrackedParameter<bool>("localrun", true)) {
21 
22  if (!isLocalRun) {
23  ltcDigiCollectionToken_ = consumes<LTCDigiCollection>(
24  pset.getParameter<edm::InputTag>("ltcDigiCollectionTag"));
25  }
26 
27  debug = pset.getUntrackedParameter<bool>("debug",false);
28 
29 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
edm::EDGetTokenT< LTCDigiCollection > ltcDigiCollectionToken_
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::stream::EDAnalyzerBase.

Definition at line 43 of file DTTriggerCheck.cc.

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

43  {
44  if(debug)
45  cout << "[DTTriggerCheck] Analyze #Run: " << event.id().run()
46  << " #Event: " << event.id().event() << endl;
47 
48  //Get the trigger source from ltc digis
50  if (!isLocalRun)
51  {
52  event.getByToken(ltcDigiCollectionToken_, ltcdigis);
53  for (std::vector<LTCDigi>::const_iterator ltc_it = ltcdigis->begin(); ltc_it != ltcdigis->end(); ltc_it++){
54  if (((*ltc_it).HasTriggered(0)) ||
55  ((*ltc_it).HasTriggered(1)) ||
56  ((*ltc_it).HasTriggered(2)) ||
57  ((*ltc_it).HasTriggered(3)) ||
58  ((*ltc_it).HasTriggered(4)))
59  histo->Fill(-1);
60  if ((*ltc_it).HasTriggered(0))
61  histo->Fill(0);
62  if ((*ltc_it).HasTriggered(1))
63  histo->Fill(1);
64  if ((*ltc_it).HasTriggered(2))
65  histo->Fill(2);
66  if ((*ltc_it).HasTriggered(3))
67  histo->Fill(3);
68  if ((*ltc_it).HasTriggered(4))
69  histo->Fill(4);
70  }
71  }
72  else
73  histo->Fill(0);
74 }
MonitorElement * histo
edm::EDGetTokenT< LTCDigiCollection > ltcDigiCollectionToken_
void Fill(long long x)
tuple cout
Definition: gather_cfg.py:121
void DTTriggerCheck::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  iRun,
edm::EventSetup const &   
)
overridevirtual

Implements DQMEDAnalyzer.

Definition at line 34 of file DTTriggerCheck.cc.

References DQMStore::IBooker::book1D(), histo, and DQMStore::IBooker::setCurrentFolder().

36  {
37  ibooker.setCurrentFolder("DT/DTTriggerTask");
38 
39  histo = ibooker.book1D("hNTriggerPerType",
40  "# of trigger per type",21,-1,20);
41 }
MonitorElement * histo
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:115
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:274

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 50 of file DTTriggerCheck.h.

Referenced by analyze(), and bookHistograms().

bool DTTriggerCheck::isLocalRun
private

Definition at line 52 of file DTTriggerCheck.h.

Referenced by analyze(), and DTTriggerCheck().

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

Definition at line 53 of file DTTriggerCheck.h.

Referenced by analyze(), and DTTriggerCheck().