#include <SiStripDCSStatus.h>
Public Member Functions | |
bool | getStatus (edm::Event const &e, edm::EventSetup const &eSetup) |
SiStripDCSStatus () | |
~SiStripDCSStatus () | |
Private Member Functions | |
void | initialise (edm::Event const &e, edm::EventSetup const &eSetup) |
Private Attributes | |
bool | initialised |
bool | rawdataAbsent |
bool | statusTECB |
bool | statusTECF |
bool | statusTIBTID |
bool | statusTOB |
bool | TECBinDAQ |
bool | TECFinDAQ |
bool | TIBTIDinDAQ |
bool | TOBinDAQ |
bool | trackerAbsent |
Definition at line 7 of file SiStripDCSStatus.h.
SiStripDCSStatus::SiStripDCSStatus | ( | ) |
Definition at line 29 of file SiStripDCSStatus.cc.
: TIBTIDinDAQ(false), TOBinDAQ(false), TECFinDAQ(false), TECBinDAQ(false), trackerAbsent(false), rawdataAbsent(true), initialised(false) { }
SiStripDCSStatus::~SiStripDCSStatus | ( | ) |
Definition at line 41 of file SiStripDCSStatus.cc.
{ }
bool SiStripDCSStatus::getStatus | ( | edm::Event const & | e, |
edm::EventSetup const & | eSetup | ||
) |
Definition at line 46 of file SiStripDCSStatus.cc.
References edm::Event::getByLabel(), initialise(), initialised, edm::HandleBase::isValid(), LogDebug, rawdataAbsent, statusTECB, statusTECF, statusTIBTID, statusTOB, TECBinDAQ, TECFinDAQ, DcsStatus::TECm, DcsStatus::TECp, DcsStatus::TIBTID, TIBTIDinDAQ, DcsStatus::TOB, TOBinDAQ, and trackerAbsent.
Referenced by SiStripMonitorCluster::analyze(), SiStripMonitorDigi::analyze(), SiStripMonitorTrack::analyze(), and SiStripDCSFilter::filter().
{ bool retVal = true; if (!initialised) initialise(e, eSetup); edm::Handle<DcsStatusCollection> dcsStatus; e.getByLabel("scalersRawToDigi", dcsStatus); if ( trackerAbsent || !dcsStatus.isValid()) return retVal; if ((*dcsStatus).size() == 0) return retVal; statusTIBTID = true; statusTOB = true; statusTECF = true; statusTECB = true; bool dcsTIBTID = ((*dcsStatus)[0].ready(DcsStatus::TIBTID)); bool dcsTOB = ((*dcsStatus)[0].ready(DcsStatus::TOB)); bool dcsTECF = ((*dcsStatus)[0].ready(DcsStatus::TECp)); bool dcsTECB = ((*dcsStatus)[0].ready(DcsStatus::TECm)); if (rawdataAbsent) { statusTIBTID = dcsTIBTID; statusTOB = dcsTOB; statusTECF = dcsTECF; statusTECB = dcsTECB; } else { if ( TIBTIDinDAQ && !dcsTIBTID ) statusTIBTID = false; if ( TOBinDAQ && !dcsTOB ) statusTOB = false; if ( TECFinDAQ && !dcsTECF ) statusTECF = false; if ( TECBinDAQ && !dcsTECB ) statusTECB = false; } LogDebug("SiStripDCSStatus") << " SiStripDCSStatus :: Detectors in DAQ (TIBTID, TOB, TEC+ TEC-)" << TIBTIDinDAQ << " " << TOBinDAQ << " " << TECFinDAQ << " " << TECBinDAQ << std::endl; LogDebug("SiStripDCSStatus") << " SiStripDCSStatus :: Detectors in ON (TIBTID, TOB, TEC+ TEC-)" << dcsTIBTID << " " << dcsTOB << " " << dcsTECF << " " << dcsTECB << std::endl; LogDebug("SiStripDCSStatus") << " SiStripDCSStatus :: Final Flags (TIBTID, TOB, TEC+ TEC-)" << statusTIBTID << " " << statusTOB << " " << statusTECF << " " << statusTECB << std::endl; if (statusTIBTID && statusTOB && statusTECF && statusTECB) retVal = true; else retVal = false; LogDebug("SiStripDCSStatus") << " Return Value " << retVal ; return retVal; }
void SiStripDCSStatus::initialise | ( | edm::Event const & | e, |
edm::EventSetup const & | eSetup | ||
) | [private] |
Definition at line 101 of file SiStripDCSStatus.cc.
References FEDRawData::data(), FEDRawDataCollection::FEDData(), edm::EventSetup::get(), edm::Event::getByLabel(), initialised, edm::HandleBase::isValid(), rawdataAbsent, TECDetId::side(), FEDRawData::size(), DetId::subdetId(), sistripsummary::TEC, TECBinDAQ, TECFinDAQ, sistripsummary::TIB, TIBTIDinDAQ, sistripsummary::TID, sistripsummary::TOB, TOBinDAQ, and trackerAbsent.
Referenced by getStatus().
{ edm::ESHandle< SiStripFedCabling > fedCabling_; eSetup.get<SiStripFedCablingRcd>().get(fedCabling_); const std::vector<uint16_t>& connectedFEDs = fedCabling_->feds(); edm::Handle<FEDRawDataCollection> rawDataHandle; e.getByLabel("source", rawDataHandle); if ( !rawDataHandle.isValid() ) { rawdataAbsent = true; return; } rawdataAbsent = false; const FEDRawDataCollection& rawDataCollection = *rawDataHandle; for(std::vector<unsigned short>::const_iterator ifed = connectedFEDs.begin(); ifed != connectedFEDs.end(); ifed++){ const std::vector<FedChannelConnection> fedChannels = fedCabling_->connections( *ifed ); if (!(rawDataCollection.FEDData(*ifed).size()) || !(rawDataCollection.FEDData(*ifed).data()) ) continue; // Check Modules Connected for (std::vector<FedChannelConnection>::const_iterator iconn = fedChannels.begin(); iconn < fedChannels.end(); iconn++){ if (!iconn->isConnected()) continue; uint32_t detId = iconn->detId(); StripSubdetector subdet(detId); if ( (subdet.subdetId() == StripSubdetector::TIB) || (subdet.subdetId() == StripSubdetector::TID)) { TIBTIDinDAQ = true; break; } else if (subdet.subdetId() == StripSubdetector::TOB) { TOBinDAQ = true; break; } else if (subdet.subdetId() == StripSubdetector::TEC) { if (TECDetId(detId).side() == 2) TECFinDAQ = true; else if (TECDetId(detId).side() == 1) TECBinDAQ = true; break; } } if (TIBTIDinDAQ && TOBinDAQ && TECFinDAQ && TECBinDAQ) break; } initialised = true; if (!TIBTIDinDAQ && !TOBinDAQ && !TECFinDAQ && !TECBinDAQ) trackerAbsent = true; }
bool SiStripDCSStatus::initialised [private] |
Definition at line 22 of file SiStripDCSStatus.h.
Referenced by getStatus(), and initialise().
bool SiStripDCSStatus::rawdataAbsent [private] |
Definition at line 21 of file SiStripDCSStatus.h.
Referenced by getStatus(), and initialise().
bool SiStripDCSStatus::statusTECB [private] |
Definition at line 19 of file SiStripDCSStatus.h.
Referenced by getStatus().
bool SiStripDCSStatus::statusTECF [private] |
Definition at line 19 of file SiStripDCSStatus.h.
Referenced by getStatus().
bool SiStripDCSStatus::statusTIBTID [private] |
Definition at line 19 of file SiStripDCSStatus.h.
Referenced by getStatus().
bool SiStripDCSStatus::statusTOB [private] |
Definition at line 19 of file SiStripDCSStatus.h.
Referenced by getStatus().
bool SiStripDCSStatus::TECBinDAQ [private] |
Definition at line 18 of file SiStripDCSStatus.h.
Referenced by getStatus(), and initialise().
bool SiStripDCSStatus::TECFinDAQ [private] |
Definition at line 18 of file SiStripDCSStatus.h.
Referenced by getStatus(), and initialise().
bool SiStripDCSStatus::TIBTIDinDAQ [private] |
Definition at line 18 of file SiStripDCSStatus.h.
Referenced by getStatus(), and initialise().
bool SiStripDCSStatus::TOBinDAQ [private] |
Definition at line 18 of file SiStripDCSStatus.h.
Referenced by getStatus(), and initialise().
bool SiStripDCSStatus::trackerAbsent [private] |
Definition at line 20 of file SiStripDCSStatus.h.
Referenced by getStatus(), and initialise().