63 int nthlumi =
iEvent.luminosityBlock();
71 std::array<bool, 6> dcsTk;
72 for (
auto&
e : dcsTk) {
77 if (!dcsStatus.isValid() && !
dcsRecord.isValid()) {
78 edm::LogWarning(
"TkStatus") <<
"DcsStatusCollection product with InputTag \"scalersRawToDigi\" not in event \n" 79 <<
"DCSRecord product with InputTag \"onlineMetaDataDigis\" not in event \n";
84 if (dcsStatus.isValid() && (*dcsStatus).empty()) {
85 if (
iEvent.eventAuxiliary().isRealData()) {
89 edm::LogPrint(
"TkStatus") <<
"Using dcsRecord because dcsStatus is empty";
98 edm::LogWarning(
"TkStatus") <<
"DCSRecord product with InputTag \"onlineMetaDataDigis\" empty \n";
110 edm::LogPrint(
"TkStatus") <<
"Using dcsStatus (Run 1 and Run 2 SCAL)";
111 for (
auto const&
status : *dcsStatus) {
136 outFile <<
"BPIX " << (dcsTk[0] ?
"On" :
"Off") << std::endl;
137 outFile <<
"FPIX " << (dcsTk[1] ?
"On" :
"Off") << std::endl;
138 outFile <<
"TIBTID " << (dcsTk[2] ?
"On" :
"Off") << std::endl;
139 outFile <<
"TOB " << (dcsTk[3] ?
"On" :
"Off") << std::endl;
140 outFile <<
"TECp " << (dcsTk[4] ?
"On" :
"Off") << std::endl;
141 outFile <<
"TECm " << (dcsTk[5] ?
"On" :
"Off") << std::endl;
143 for (
auto status : dcsTk) {
149 outFile <<
"WholeTrackerOn " << (AllTkOn ?
"Yes" :
"No") << std::endl;
T getParameter(std::string const &) const
#define DEFINE_FWK_MODULE(type)
Class to contain DCS information from soft FED 1022.
const edm::EDGetTokenT< DcsStatusCollection > dcsStatusToken_
std::string dcsTkFileName_
Log< level::Warning, true > LogPrint
const edm::EDGetTokenT< DCSRecord > dcsRecordToken_
std::vector< DcsStatus > DcsStatusCollection
TKStatus(const edm::ParameterSet &)
Log< level::Warning, false > LogWarning
void analyze(const edm::Event &e, const edm::EventSetup &c) override
void dumpTkDcsStatus(std::string const &, edm::RunNumber_t, std::array< bool, 6 > const &)