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)) {
135 edm::LogInfo(
"DetStatus") <<
"DCSStatus filter: " << accepted <<
" ( AndOr: " << AndOr_ <<
")" << std::endl;
152 bool accepted =
false;
164 if (dcsStatus.
isValid() && !dcsStatus->empty()) {
165 accepted = checkForDCSStatus(*dcsStatus);
166 }
else if (dcsRecord.
isValid()) {
169 accepted = checkForDCSRecord(*dcsRecord);
176 <<
"Error! can't get the product, neither DCSRecord, nor scalersRawToDigi: accept in any case!";
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
T getUntrackedParameter(std::string const &, T const &) const
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
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[]
ParameterDescriptionBase * add(U const &iLabel, T const &value)
std::vector< DcsStatus > DcsStatusCollection
Log< level::Info, false > LogInfo
T getParameter(std::string const &) const
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_
bool highVoltageReady(const uint8_t partitionNumber) const
Return true if the high voltage of the given parition is ready.
static const int partitionList[]
edm::EDGetTokenT< DCSRecord > dcsRecordToken_