40 verbose_ =
pset.getUntrackedParameter<
bool>(
"DebugOn",
false);
41 AndOr_ =
pset.getParameter<
bool>(
"AndOr");
42 applyfilter_ =
pset.getParameter<
bool>(
"ApplyFilter");
43 DetNames_ =
pset.getParameter<std::vector<std::string>>(
"DetectorType");
48 for (
unsigned int detreq = 0; detreq < DetNames_.size(); detreq++) {
54 requestedPartitions_.set(detlist,
true);
66 scalersToken_ = consumes<DcsStatusCollection>(
edm::InputTag(
"scalersRawToDigi"));
67 dcsRecordToken_ = consumes<DCSRecord>(
edm::InputTag(
"onlineMetaDataDigis"));
80 edm::LogInfo(
"DetStatus") <<
"Using FED#735 for reading DCS bits" << std::endl;
83 bool accepted =
false;
84 unsigned int curr_dcs = (dcsStatus)[0].ready();
90 accepted = ((DetMap_ & curr_dcs) == DetMap_);
92 accepted = ((DetMap_ & curr_dcs) != 0);
95 edm::LogInfo(
"DetStatus") <<
"DCSStatus filter: requested map: " << DetMap_ <<
" dcs in event: " << curr_dcs
96 <<
" filter: " << accepted <<
"( AndOr: " << AndOr_ <<
")" << std::endl;
112 bool accepted =
false;
115 edm::LogInfo(
"DetStatus") <<
"Using softFED#1022 for reading DCS bits" << std::endl;
121 if (requestedPartitions_.test(detlist)) {
125 accepted =
dcsRecord.highVoltageReady(detlist);
129 accepted = (accepted ||
dcsRecord.highVoltageReady(detlist));
135 edm::LogInfo(
"DetStatus") <<
"DCSStatus filter: " << accepted <<
" ( AndOr: " << AndOr_ <<
")" << std::endl;
138 if ((
dcsRecord.highVoltageReady(detlist))) {
152 bool accepted =
false;
164 if (dcsStatus.
isValid() && !dcsStatus->empty()) {
165 accepted = checkForDCSStatus(*dcsStatus);
169 accepted = checkForDCSRecord(*
dcsRecord);
176 <<
"Error! can't get the product, neither DCSRecord, nor scalersRawToDigi: accept in any case!";
190 desc.addUntracked<
bool>(
"DebugOn",
false);
191 desc.add<
bool>(
"AndOr",
true);
192 desc.add<
bool>(
"ApplyFilter",
true);
193 desc.add<std::vector<std::string>>(
"DetectorType", {});
194 descriptions.
add(
"detStatus",
desc);
DetStatus(const edm::ParameterSet &)
Log< level::Info, true > LogVerbatim
#define DEFINE_FWK_MODULE(type)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
std::bitset< DcsStatus::nPartitions > requestedPartitions_
Class to contain DCS information from soft FED 1022.
EventAuxiliary const & eventAuxiliary() const override
Log< level::Error, false > LogError
edm::EDGetTokenT< DcsStatusCollection > scalersToken_
bool checkForDCSRecord(const DCSRecord &dcsRecod)
bool filter(edm::Event &, edm::EventSetup const &) override
static const char *const partitionName[]
std::vector< DcsStatus > DcsStatusCollection
Log< level::Info, false > LogInfo
void add(std::string const &label, ParameterSetDescription const &psetDescription)
bool checkForDCSStatus(const DcsStatusCollection &dcsStatus)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
std::vector< std::string > DetNames_
static const int partitionList[]
edm::EDGetTokenT< DCSRecord > dcsRecordToken_