CMS 3D CMS Logo

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

#include <JetMETDQMDCSFilter.h>

Public Member Functions

bool filter (const edm::Event &evt, const edm::EventSetup &es)
 
 JetMETDQMDCSFilter (const edm::ParameterSet &, edm::ConsumesCollector &)
 
 JetMETDQMDCSFilter (const std::string &detectorTypes, edm::ConsumesCollector &, const bool verbose=false, const bool alwaysPass=false)
 
 ~JetMETDQMDCSFilter ()
 

Public Attributes

bool passECAL
 
bool passES
 
bool passHBHE
 
bool passHF
 
bool passHO
 
bool passMuon
 
bool passPIX
 
bool passSiStrip
 
edm::EDGetTokenT
< DcsStatusCollection
scalarsToken
 

Private Attributes

bool detectorOn_
 
std::string detectorTypes_
 
bool filter_
 
bool verbose_
 

Detailed Description

Definition at line 24 of file JetMETDQMDCSFilter.h.

Constructor & Destructor Documentation

JetMETDQMDCSFilter::JetMETDQMDCSFilter ( const edm::ParameterSet pset,
edm::ConsumesCollector iC 
)

Definition at line 21 of file JetMETDQMDCSFilter.cc.

References edm::ConsumesCollector::consumes(), gather_cfg::cout, detectorOn_, detectorTypes_, edm::false, filter_, edm::ParameterSet::getUntrackedParameter(), passECAL, passES, passHBHE, passHF, passHO, passMuon, passPIX, passSiStrip, scalarsToken, AlCaHLTBitMon_QueryRunRegistry::string, and verbose_.

21  {
22  verbose_ = pset.getUntrackedParameter<bool>( "DebugOn", false );
23  detectorTypes_ = pset.getUntrackedParameter<std::string>( "DetectorTypes", "ecal:hcal");
24  filter_ = !pset.getUntrackedParameter<bool>( "alwaysPass", false );
25 
26  detectorOn_ = false;
27  if (verbose_) std::cout << "JetMETDQMDCSFilter constructor: " << detectorTypes_ << std::endl;
28 
29  passPIX = false, passSiStrip = false;
30  passECAL = false, passES = false;
31  passHBHE = false, passHF = false, passHO = false;
32  passMuon = false;
33  scalarsToken = iC.consumes<DcsStatusCollection > (std::string("scalersRawToDigi"));
34 }
edm::EDGetTokenT< DcsStatusCollection > scalarsToken
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
T getUntrackedParameter(std::string const &, T const &) const
std::vector< DcsStatus > DcsStatusCollection
Definition: DcsStatus.h:116
tuple cout
Definition: gather_cfg.py:121
std::string detectorTypes_
volatile std::atomic< bool > shutdown_flag false
JetMETDQMDCSFilter::JetMETDQMDCSFilter ( const std::string &  detectorTypes,
edm::ConsumesCollector iC,
const bool  verbose = false,
const bool  alwaysPass = false 
)

Definition at line 35 of file JetMETDQMDCSFilter.cc.

References edm::ConsumesCollector::consumes(), gather_cfg::cout, detectorOn_, detectorTypes_, filter_, passECAL, passES, passHBHE, passHF, passHO, passMuon, passPIX, passSiStrip, scalarsToken, AlCaHLTBitMon_QueryRunRegistry::string, verbose, and verbose_.

35  {
36  verbose_ = verbose;
37  detectorTypes_ = detectorTypes;
38  filter_ = !alwaysPass;
39  scalarsToken = iC.consumes<DcsStatusCollection > (std::string("scalersRawToDigi"));
40 
41  detectorOn_ = false;
42  if (verbose_) std::cout << "JetMETDQMDCSFilter constructor: " << detectorTypes_ << std::endl;
43 
44  passPIX = false, passSiStrip = false;
45  passECAL = false, passES = false;
46  passHBHE = false, passHF = false, passHO = false;
47  passMuon = false;
48 }
edm::EDGetTokenT< DcsStatusCollection > scalarsToken
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
bool verbose
std::vector< DcsStatus > DcsStatusCollection
Definition: DcsStatus.h:116
tuple cout
Definition: gather_cfg.py:121
std::string detectorTypes_
JetMETDQMDCSFilter::~JetMETDQMDCSFilter ( )

Definition at line 53 of file JetMETDQMDCSFilter.cc.

References gather_cfg::cout, and verbose_.

53  {
54  if (verbose_) std::cout << "JetMETDQMDCSFilter destructor: " << std::endl;
55 }
tuple cout
Definition: gather_cfg.py:121

Member Function Documentation

bool JetMETDQMDCSFilter::filter ( const edm::Event evt,
const edm::EventSetup es 
)

Definition at line 57 of file JetMETDQMDCSFilter.cc.

References DcsStatus::BPIX, gather_cfg::cout, DcsStatus::CSCm, DcsStatus::CSCp, detectorOn_, detectorTypes_, DcsStatus::DT0, DcsStatus::DTm, DcsStatus::DTp, DcsStatus::EBm, DcsStatus::EBp, DcsStatus::EEm, DcsStatus::EEp, DcsStatus::ESm, DcsStatus::ESp, filter_, DcsStatus::FPIX, edm::Event::getByToken(), DcsStatus::HBHEa, DcsStatus::HBHEb, DcsStatus::HBHEc, DcsStatus::HF, DcsStatus::HO, edm::EventBase::isRealData(), edm::HandleBase::isValid(), passECAL, passES, passHBHE, passHF, passHO, passMuon, passPIX, passSiStrip, DcsStatus::RPC, scalarsToken, DcsStatus::TECm, DcsStatus::TECp, DcsStatus::TIBTID, DcsStatus::TOB, and verbose_.

Referenced by Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::filter(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::find(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::setDataAccessor(), and Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::switchCenterView().

57  {
58 
59  detectorOn_ = true;
60 
61  if (!evt.isRealData()) return detectorOn_;
62  if (!filter_) return detectorOn_;
63 
65  evt.getByToken(scalarsToken, dcsStatus);
66 
67  if (dcsStatus.isValid() && dcsStatus->size() != 0) {
68 
69  if (detectorTypes_.find("pixel") !=std::string::npos) {
70  if ((*dcsStatus)[0].ready(DcsStatus::BPIX) &&
71  (*dcsStatus)[0].ready(DcsStatus::FPIX)) {
72  if (verbose_) std::cout << "pixel on" << std::endl;
73  passPIX = true;
74  } else detectorOn_ = false;
75  }
76 
77  if (detectorTypes_.find("sistrip") !=std::string::npos){
78  if ((*dcsStatus)[0].ready(DcsStatus::TIBTID) &&
79  (*dcsStatus)[0].ready(DcsStatus::TOB) &&
80  (*dcsStatus)[0].ready(DcsStatus::TECp) &&
81  (*dcsStatus)[0].ready(DcsStatus::TECm)) {
82  if (verbose_) std::cout << "sistrip on" << std::endl;
83  passSiStrip = true;
84  } else detectorOn_ = false;
85  }
86 
87  if (detectorTypes_.find("ecal") !=std::string::npos){
88  if ((*dcsStatus)[0].ready(DcsStatus::EBp) &&
89  (*dcsStatus)[0].ready(DcsStatus::EBm) &&
90  (*dcsStatus)[0].ready(DcsStatus::EEp) &&
91  (*dcsStatus)[0].ready(DcsStatus::EEm)) {
92  if (verbose_) std::cout << "ecal on" << std::endl;
93  passECAL = true;
94  } else detectorOn_ = false;
95  }
96 
97  if (detectorTypes_.find("hbhe") !=std::string::npos){
98  if ((*dcsStatus)[0].ready(DcsStatus::HBHEa) &&
99  (*dcsStatus)[0].ready(DcsStatus::HBHEb) &&
100  (*dcsStatus)[0].ready(DcsStatus::HBHEc)){
101  if (verbose_) std::cout << "hbhe on" << std::endl;
102  passHBHE = true;
103  } else detectorOn_ = false;
104  }
105 
106  if (detectorTypes_.find("hf") !=std::string::npos){
107  if ((*dcsStatus)[0].ready(DcsStatus::HF)){
108  if (verbose_) std::cout << "hf on" << std::endl;
109  passHF = true;
110  } else detectorOn_ = false;
111  }
112 
113  if (detectorTypes_.find("ho") !=std::string::npos){
114  if ((*dcsStatus)[0].ready(DcsStatus::HO)){
115  if (verbose_) std::cout << "ho on" << std::endl;
116  passHO = true;
117  } else detectorOn_ = false;
118  }
119 
120  if (detectorTypes_.find("es") !=std::string::npos){
121  if ((*dcsStatus)[0].ready(DcsStatus::ESp) &&
122  (*dcsStatus)[0].ready(DcsStatus::ESm)) {
123  if (verbose_) std::cout << "es on" << std::endl;
124  passES = true;
125  } else detectorOn_ = false;
126  }
127 
128  if (detectorTypes_.find("muon") !=std::string::npos){
129  if ((*dcsStatus)[0].ready(DcsStatus::RPC) &&
130  (*dcsStatus)[0].ready(DcsStatus::DT0) &&
131  (*dcsStatus)[0].ready(DcsStatus::DTp) &&
132  (*dcsStatus)[0].ready(DcsStatus::DTm) &&
133  (*dcsStatus)[0].ready(DcsStatus::CSCp) &&
134  (*dcsStatus)[0].ready(DcsStatus::CSCm)) {
135  if (verbose_) std::cout << "muon on" << std::endl;
136  passMuon = true;
137  } else detectorOn_ = false;
138  }
139 
140  }
141  return detectorOn_;
142 }
edm::EDGetTokenT< DcsStatusCollection > scalarsToken
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:464
bool isRealData() const
Definition: EventBase.h:64
bool isValid() const
Definition: HandleBase.h:75
tuple cout
Definition: gather_cfg.py:121
std::string detectorTypes_

Member Data Documentation

bool JetMETDQMDCSFilter::detectorOn_
private

Definition at line 37 of file JetMETDQMDCSFilter.h.

Referenced by filter(), and JetMETDQMDCSFilter().

std::string JetMETDQMDCSFilter::detectorTypes_
private

Definition at line 38 of file JetMETDQMDCSFilter.h.

Referenced by filter(), and JetMETDQMDCSFilter().

bool JetMETDQMDCSFilter::filter_
private

Definition at line 36 of file JetMETDQMDCSFilter.h.

Referenced by filter(), and JetMETDQMDCSFilter().

bool JetMETDQMDCSFilter::passECAL

Definition at line 31 of file JetMETDQMDCSFilter.h.

Referenced by filter(), and JetMETDQMDCSFilter().

bool JetMETDQMDCSFilter::passES

Definition at line 31 of file JetMETDQMDCSFilter.h.

Referenced by filter(), and JetMETDQMDCSFilter().

bool JetMETDQMDCSFilter::passHBHE

Definition at line 31 of file JetMETDQMDCSFilter.h.

Referenced by filter(), and JetMETDQMDCSFilter().

bool JetMETDQMDCSFilter::passHF

Definition at line 31 of file JetMETDQMDCSFilter.h.

Referenced by filter(), and JetMETDQMDCSFilter().

bool JetMETDQMDCSFilter::passHO

Definition at line 31 of file JetMETDQMDCSFilter.h.

Referenced by filter(), and JetMETDQMDCSFilter().

bool JetMETDQMDCSFilter::passMuon

Definition at line 31 of file JetMETDQMDCSFilter.h.

Referenced by filter(), and JetMETDQMDCSFilter().

bool JetMETDQMDCSFilter::passPIX

Definition at line 31 of file JetMETDQMDCSFilter.h.

Referenced by filter(), and JetMETDQMDCSFilter().

bool JetMETDQMDCSFilter::passSiStrip

Definition at line 31 of file JetMETDQMDCSFilter.h.

Referenced by filter(), and JetMETDQMDCSFilter().

edm::EDGetTokenT<DcsStatusCollection> JetMETDQMDCSFilter::scalarsToken

Definition at line 32 of file JetMETDQMDCSFilter.h.

Referenced by filter(), and JetMETDQMDCSFilter().

bool JetMETDQMDCSFilter::verbose_
private

Definition at line 35 of file JetMETDQMDCSFilter.h.

Referenced by filter(), JetMETDQMDCSFilter(), and ~JetMETDQMDCSFilter().