CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes
DTDataIntegrityTask Class Reference

#include <DTDataIntegrityTask.h>

Inheritance diagram for DTDataIntegrityTask:
DQMOneEDAnalyzer< edm::one::WatchLuminosityBlocks > edm::one::EDProducer< edm::EndRunProducer, edm::one::WatchRuns, edm::Accumulator, Args... > edm::one::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

void analyze (const edm::Event &e, const edm::EventSetup &c) override
 
void beginLuminosityBlock (const edm::LuminosityBlock &ls, const edm::EventSetup &es) override
 
 DTDataIntegrityTask (const edm::ParameterSet &ps)
 
void endLuminosityBlock (const edm::LuminosityBlock &ls, const edm::EventSetup &es) override
 
bool eventHasErrors () const
 
void fedEntry (int dduID)
 
void fedFatal (int dduID)
 
void fedNonFatal (int dduID)
 
void processFED (DTuROSFEDData &data, int fed)
 
void processFED (DTDDUData &dduData, const std::vector< DTROS25Data > &rosData, int dduID)
 
void processROS25 (DTROS25Data &data, int dduID, int ros)
 
void processuROS (DTuROSROSData &data, int fed, int uRos)
 
void TimeHistos (DQMStore::IBooker &, std::string histoType)
 
 ~DTDataIntegrityTask () override
 
- Public Member Functions inherited from DQMOneEDAnalyzer< edm::one::WatchLuminosityBlocks >
void accumulate (edm::Event const &event, edm::EventSetup const &setup) final
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) final
 
 DQMOneEDAnalyzer ()
 
void endRun (edm::Run const &, edm::EventSetup const &) final
 
void endRunProduce (edm::Run &run, edm::EventSetup const &setup) final
 
virtual bool getCanSaveByLumi ()
 
- Public Member Functions inherited from edm::one::EDProducer< edm::EndRunProducer, edm::one::WatchRuns, edm::Accumulator, Args... >
 EDProducer ()=default
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
- Public Member Functions inherited from edm::one::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDProducerBase () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
 ~ProducerBase () noexcept(false) override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Protected Member Functions

void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
- Protected Member Functions inherited from DQMOneEDAnalyzer< edm::one::WatchLuminosityBlocks >
virtual void analyze (edm::Event const &, edm::EventSetup const &)
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
virtual void dqmEndRun (edm::Run const &, edm::EventSetup const &)
 
- Protected Member Functions inherited from edm::ProducerBase
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Private Types

enum  histoTypes { uROSEventLength = 0, uROSError = 1, TDCError = 4, TTSValues = 7 }
 

Private Member Functions

void bookHistos (DQMStore::IBooker &, const int fedMin, const int fedMax)
 
void bookHistos (DQMStore::IBooker &, std::string folder, DTROChainCoding code)
 
void bookHistos (DQMStore::IBooker &, std::string folder, const int fed)
 
void bookHistosROS (DQMStore::IBooker &, const int wheel, const int ros)
 
void bookHistosROS25 (DQMStore::IBooker &, DTROChainCoding code)
 
void bookHistosuROS (DQMStore::IBooker &, const int fed, const int uRos)
 
void channelsInCEROS (int cerosId, int chMask, std::vector< int > &channels)
 
void channelsInROS (int cerosMask, std::vector< int > &channels)
 
int theDDU (int crate, int slot, int link, bool tenDDU)
 
int theROS (int slot, int link)
 
std::string topFolder (bool isFEDIntegrity) const
 

Private Attributes

bool checkUros
 
DTROChainCoding coding
 
edm::EDGetTokenT< DTDDUCollectiondduToken
 
bool doTimeHisto
 
bool eventErrorFlag
 
std::set< int > fedBXIds
 
std::map< std::string, std::map< int, MonitorElement * > > fedHistos
 
int FEDIDmax
 
int FEDIDmin
 
std::string fedIntegrityFolder
 
std::map< std::string, std::map< int, DTTimeEvolutionHisto * > > fedTimeHistos
 
edm::EDGetTokenT< DTuROSFEDDataCollectionfedToken
 
bool getSCInfo
 
MonitorElementhCorruptionSummary
 
MonitorElementhFEDEntry
 
MonitorElementhFEDFatal
 
MonitorElementhFEDNonFatal
 
MonitorElementhTTSSummary
 
std::multimap< std::string, std::string >::iterator it
 
double link_max [72]
 
int mode
 
int myPrevEv
 
int myPrevFifoVal [7]
 
int myPrevRosVal
 
int myPrevTtsVal
 
std::multimap< std::string, std::string > names
 
MonitorElementnEventMonitor
 
int nevents
 
int neventsFED
 
int nEventsLS
 
int neventsuROS
 
const int NuROS = 12
 
std::string outputFile
 
edm::ParameterSet parameters
 
double rob_max [25]
 
std::map< std::string, std::map< int, MonitorElement * > > robHistos
 
edm::EDGetTokenT< DTROS25Collectionros25Token
 
std::map< int, std::set< int > > rosBxIdsPerFED
 
std::map< std::string, std::map< int, MonitorElement * > > rosHistos
 
std::map< int, std::set< int > > rosL1AIdsPerFED
 
std::map< std::string, std::map< int, DTTimeEvolutionHisto * > > rosTimeHistos
 
std::map< std::string, std::map< int, MonitorElement * > > summaryHistos
 
float trigger_counter
 
std::map< unsigned int, MonitorElement * > urosHistos
 
std::map< unsigned int, DTTimeEvolutionHisto * > urosTimeHistos
 

Additional Inherited Members

- Public Types inherited from DQMOneEDAnalyzer< edm::one::WatchLuminosityBlocks >
typedef dqm::reco::DQMStore DQMStore
 
typedef dqm::reco::MonitorElement MonitorElement
 
- Public Types inherited from edm::one::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex >>
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::one::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Attributes inherited from DQMOneEDAnalyzer< edm::one::WatchLuminosityBlocks >
edm::EDPutTokenT< DQMTokenrunToken_
 

Detailed Description

Class for DT Data Integrity.

Author
Marco Zanetti (INFN Padova), Gianluca Cerminara (INFN Torino)

Definition at line 39 of file DTDataIntegrityTask.h.

Member Enumeration Documentation

Constructor & Destructor Documentation

DTDataIntegrityTask::DTDataIntegrityTask ( const edm::ParameterSet ps)

Definition at line 30 of file DTDataIntegrityTask.cc.

References checkUros, dduToken, Exception, FEDIDmax, FEDIDmin, fedIntegrityFolder, fedToken, edm::ParameterSet::getParameter(), getSCInfo, edm::ParameterSet::getUntrackedParameter(), LogTrace, FEDNumbering::MAXDTFEDID, FEDNumbering::MAXDTUROSFEDID, FEDNumbering::MINDTFEDID, FEDNumbering::MINDTUROSFEDID, mode, neventsFED, neventsuROS, DTskim_cfg::processingMode, and ros25Token.

30  : nevents(0) {
31  LogTrace("DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask") << "[DTDataIntegrityTask]: Constructor" << endl;
32 
33  checkUros = ps.getUntrackedParameter<bool>("checkUros", true);
34 
35  if (checkUros) {
36  fedToken = consumes<DTuROSFEDDataCollection>(ps.getParameter<InputTag>("dtFEDlabel"));
39  } else {
40  dduToken = consumes<DTDDUCollection>(ps.getParameter<InputTag>("dtDDULabel"));
41  ros25Token = consumes<DTROS25Collection>(ps.getParameter<InputTag>("dtROS25Label"));
44  }
45 
46  neventsFED = 0;
47  neventsuROS = 0;
48 
49  // If you want info VS time histos
50  // doTimeHisto = ps.getUntrackedParameter<bool>("doTimeHisto", false);
51  // Plot quantities about SC
52  getSCInfo = ps.getUntrackedParameter<bool>("getSCInfo", false);
53 
54  fedIntegrityFolder = ps.getUntrackedParameter<string>("fedIntegrityFolder", "DT/FEDIntegrity");
55 
56  string processingMode = ps.getUntrackedParameter<string>("processingMode", "Online");
57 
58  // processing mode flag to select plots to be produced and basedirs CB vedi se farlo meglio...
59  if (processingMode == "Online") {
60  mode = 0;
61  } else if (processingMode == "SM") {
62  mode = 1;
63  } else if (processingMode == "Offline") {
64  mode = 2;
65  } else if (processingMode == "HLT") {
66  mode = 3;
67  } else {
68  throw cms::Exception("MissingParameter") << "[DTDataIntegrityTask]: processingMode :" << processingMode
69  << " invalid! Must be Online, SM, Offline or HLT !" << endl;
70  }
71 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
edm::EDGetTokenT< DTuROSFEDDataCollection > fedToken
edm::EDGetTokenT< DTROS25Collection > ros25Token
#define LogTrace(id)
edm::EDGetTokenT< DTDDUCollection > dduToken
DTDataIntegrityTask::~DTDataIntegrityTask ( )
override

Definition at line 73 of file DTDataIntegrityTask.cc.

References LogTrace, and neventsFED.

73  {
74  LogTrace("DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
75  << "[DTDataIntegrityTask]: Destructor. Analyzed " << neventsFED << " events" << endl;
76  LogTrace("DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
77  << "[DTDataIntegrityTask]: postEndJob called!" << endl;
78 }
#define LogTrace(id)

Member Function Documentation

void DTDataIntegrityTask::analyze ( const edm::Event e,
const edm::EventSetup c 
)
override

Definition at line 1853 of file DTDataIntegrityTask.cc.

References checkUros, dduToken, DOCESLOTS, eventErrorFlag, fedBXIds, FEDIDmax, FEDIDmin, fedToken, dqm::impl::MonitorElement::Fill(), edm::Event::getByToken(), DTDDUData::getDDUHeader(), DTuROSFEDData::getfed(), DTuROSROSData::getslot(), DTuROSFEDData::getslotsize(), DTuROSFEDData::getuROS(), RecoTauValidation_cfi::header, mps_fire::i, edm::HandleBase::isValid(), dqmiolumiharvest::j, LogTrace, genParticles_cff::map, mode, nEventMonitor, nevents, nEventsLS, processFED(), processROS25(), processuROS(), ros25Token, rosBxIdsPerFED, rosL1AIdsPerFED, and FEDHeader::sourceID().

1853  {
1854  nevents++;
1856 
1857  nEventsLS++;
1858 
1859  LogTrace("DTRawToDigi|TDQM|DTMonitorModule|DTDataIntegrityTask") << "[DTDataIntegrityTask]: preProcessEvent" << endl;
1860 
1861  if (checkUros) { //uROS starting on 2018
1862  // Digi collection
1864  e.getByToken(fedToken, fedCol);
1865  DTuROSFEDData fedData;
1866  DTuROSROSData urosData;
1867 
1868  if (fedCol.isValid()) {
1869  for (unsigned int j = 0; j < fedCol->size(); ++j) {
1870  fedData = fedCol->at(j);
1871  int fed = fedData.getfed(); //argument should be void
1872  if (fed > FEDIDmax || fed < FEDIDmin) {
1873  LogError("DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
1874  << "[DTDataIntegrityTask]: analyze, FED ID " << fed << " not expected." << endl;
1875  continue;
1876  }
1877  processFED(fedData, fed);
1878 
1879  if (mode == 3 || mode == 1)
1880  continue; //Not needed for FEDIntegrity_EvF
1881 
1882  for (int slot = 1; slot <= DOCESLOTS; ++slot) {
1883  urosData = fedData.getuROS(slot);
1884  if (fedData.getslotsize(slot) == 0 || urosData.getslot() == -1)
1885  continue;
1886  processuROS(urosData, fed, slot);
1887  }
1888  }
1889  }
1890  } // checkUros
1891  else { //Legacy ROS
1892  // clear the set of BXids from the ROSs
1893  for (map<int, set<int> >::iterator rosBxIds = rosBxIdsPerFED.begin(); rosBxIds != rosBxIdsPerFED.end();
1894  ++rosBxIds) {
1895  (*rosBxIds).second.clear();
1896  }
1897 
1898  fedBXIds.clear();
1899 
1900  for (map<int, set<int> >::iterator rosL1AIds = rosL1AIdsPerFED.begin(); rosL1AIds != rosL1AIdsPerFED.end();
1901  ++rosL1AIds) {
1902  (*rosL1AIds).second.clear();
1903  }
1904 
1905  // reset the error flag
1906  eventErrorFlag = false;
1907 
1908  // Digi collection
1909  edm::Handle<DTDDUCollection> dduProduct;
1910  e.getByToken(dduToken, dduProduct);
1911  edm::Handle<DTROS25Collection> ros25Product;
1912  e.getByToken(ros25Token, ros25Product);
1913 
1914  DTDDUData dduData;
1915  std::vector<DTROS25Data> ros25Data;
1916  if (dduProduct.isValid() && ros25Product.isValid()) {
1917  for (unsigned int i = 0; i < dduProduct->size(); ++i) {
1918  dduData = dduProduct->at(i);
1919  ros25Data = ros25Product->at(i);
1920  // FIXME: passing id variable is not needed anymore - change processFED interface for next release!
1921  FEDHeader header = dduData.getDDUHeader();
1922  int id = header.sourceID();
1923  if (id > FEDIDmax || id < FEDIDmin)
1924  continue; //SIM uses extra FEDs not monitored
1925 
1926  processFED(dduData, ros25Data, id);
1927  for (unsigned int j = 0; j < ros25Data.size(); ++j) {
1928  int rosid = j + 1;
1929  processROS25(ros25Data[j], id, rosid);
1930  }
1931  }
1932  }
1933  }
1934 }
std::map< int, std::set< int > > rosBxIdsPerFED
std::map< int, std::set< int > > rosL1AIdsPerFED
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:525
uint16_t sourceID() const
Identifier of the FED.
Definition: FEDHeader.cc:19
edm::EDGetTokenT< DTuROSFEDDataCollection > fedToken
void processuROS(DTuROSROSData &data, int fed, int uRos)
static const int DOCESLOTS
edm::EDGetTokenT< DTROS25Collection > ros25Token
void Fill(long long x)
void processROS25(DTROS25Data &data, int dduID, int ros)
DTuROSROSData getuROS(int slot) const
bool isValid() const
Definition: HandleBase.h:70
#define LogTrace(id)
MonitorElement * nEventMonitor
const FEDHeader & getDDUHeader() const
Getters.
void processFED(DTuROSFEDData &data, int fed)
int getslotsize(int slot) const
int getslot() const
std::set< int > fedBXIds
int getfed() const
edm::EDGetTokenT< DTDDUCollection > dduToken
void DTDataIntegrityTask::beginLuminosityBlock ( const edm::LuminosityBlock ls,
const edm::EventSetup es 
)
override

Definition at line 1805 of file DTDataIntegrityTask.cc.

References nEventsLS.

1805  {
1806  nEventsLS = 0;
1807 }
void DTDataIntegrityTask::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  iRun,
edm::EventSetup const &  iSetup 
)
overrideprotectedvirtual

Implements DQMOneEDAnalyzer< edm::one::WatchLuminosityBlocks >.

Definition at line 96 of file DTDataIntegrityTask.cc.

References bookHistos(), bookHistosROS(), bookHistosROS25(), bookHistosuROS(), checkUros, FEDIDmax, FEDIDmin, LogTrace, mode, NuROS, DTROChainCoding::setDDU(), DTROChainCoding::setROS(), and makeMuonMisalignmentScenario::wheel.

98  {
99  LogTrace("DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask") << "[DTDataIntegrityTask]: postBeginJob" << endl;
100 
101  LogTrace("DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
102  << "[DTDataIntegrityTask] Get DQMStore service" << endl;
103 
104  // Loop over the DT FEDs
105 
106  LogTrace("DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
107  << " FEDS: " << FEDIDmin << " to " << FEDIDmax << " in the RO" << endl;
108 
109  // book FED integrity histos
110  bookHistos(ibooker, FEDIDmin, FEDIDmax);
111 
112  if (checkUros) { //uROS starting on 2018
113  // static booking of the histograms
114 
115  if (mode == 0 || mode == 2) {
116  for (int fed = FEDIDmin; fed <= FEDIDmax; ++fed) { // loop over the FEDs in the readout
117 
118  bookHistos(ibooker, string("FED"), fed);
119 
120  bookHistos(ibooker, string("CRATE"), fed);
121 
122  for (int uRos = 1; uRos <= NuROS; ++uRos) { // loop over all ROS
123  bookHistosuROS(ibooker, fed, uRos);
124  }
125  }
126 
127  for (int wheel = -2; wheel < 3; ++wheel) {
128  for (int ros = 1; ros <= NuROS; ++ros) { // loop over all ROS
129  bookHistosROS(ibooker, wheel, ros);
130  }
131  }
132 
133  } //Not in HLT or SM mode
134  } //uROS
135 
136  else { //Legacy ROS
137 
138  if (mode == 0 || mode == 2) {
139  // static booking of the histograms
140 
141  for (int fed = FEDIDmin; fed <= FEDIDmax; ++fed) { // loop over the FEDs in the readout
142  DTROChainCoding code;
143  code.setDDU(fed);
144  bookHistos(ibooker, string("ROS_S"), code);
145 
146  bookHistos(ibooker, string("DDU"), code);
147 
148  for (int ros = 1; ros <= NuROS; ++ros) { // loop over all ROS
149  code.setROS(ros);
150  bookHistosROS25(ibooker, code);
151  }
152  }
153  } //Not in HLT or SM mode
154  } //Legacy ROS
155 }
void bookHistosROS(DQMStore::IBooker &, const int wheel, const int ros)
void bookHistosuROS(DQMStore::IBooker &, const int fed, const int uRos)
void bookHistos(DQMStore::IBooker &, const int fedMin, const int fedMax)
#define LogTrace(id)
void setROS(const int &ID)
void setDDU(const int &ID)
need to reset the bits before setting
void bookHistosROS25(DQMStore::IBooker &, DTROChainCoding code)
void DTDataIntegrityTask::bookHistos ( DQMStore::IBooker ibooker,
const int  fedMin,
const int  fedMax 
)
private

checkUros

Definition at line 157 of file DTDataIntegrityTask.cc.

References dqm::dqmstoreimpl::DQMStore::IBooker::book1D(), dqm::dqmstoreimpl::DQMStore::IBooker::book2D(), dqm::dqmstoreimpl::DQMStore::IBooker::bookFloat(), checkUros, fedHistos, FEDIDmax, FEDIDmin, fedTimeHistos, printsummarytable::folder, newFWLiteAna::fullName, DTROChainCoding::getDDU(), DTROChainCoding::getDDUID(), DTROChainCoding::getROB(), DTROChainCoding::getROS(), DTROChainCoding::getROSID(), DTROChainCoding::getSCID(), hCorruptionSummary, hFEDEntry, hFEDFatal, hFEDNonFatal, timingPdfMaker::histo, HltBtagPostValidation_cff::histoName, hTTSSummary, LogTrace, mode, names, nEventMonitor, rosHistos, rosTimeHistos, dqm::impl::MonitorElement::setAxisTitle(), dqm::impl::MonitorElement::setBinLabel(), dqm::dqmstoreimpl::DQMStore::IBooker::setCurrentFolder(), summaryHistos, topFolder(), and makeMuonMisalignmentScenario::wheel.

Referenced by bookHistograms(), and bookHistosROS25().

157  {
158  ibooker.setCurrentFolder("DT/EventInfo/Counters");
159  nEventMonitor = ibooker.bookFloat("nProcessedEventsDataIntegrity");
160 
161  // Standard FED integrity histos
162  ibooker.setCurrentFolder(topFolder(true));
163 
164  int nFED = (fedMax - fedMin) + 1;
165 
166  hFEDEntry = ibooker.book1D("FEDEntries", "# entries per DT FED", nFED, fedMin, fedMax + 1);
167 
168  if (checkUros) {
169  if (mode == 3 || mode == 1) {
170  //Booked for completion in general CMS FED test. Not filled
171  hFEDFatal = ibooker.book1D("FEDFatal", "# fatal errors DT FED", nFED, fedMin, fedMax + 1); //No available in uROS
172  hFEDNonFatal =
173  ibooker.book1D("FEDNonFatal", "# NON fatal errors DT FED", nFED, fedMin, fedMax + 1); //No available in uROS
174  return; //Avoid duplication of Info in FEDIntegrity_EvF
175  }
176 
177  string histoType = "ROSSummary";
178  for (int wheel = -2; wheel < 3; ++wheel) {
179  string wheel_s = to_string(wheel);
180  string histoName = "ROSSummary_W" + wheel_s;
181  string fed_s = to_string(FEDIDmin + 1); //3 FEDs from 2018 onwards
182  if (wheel < 0)
183  fed_s = to_string(FEDIDmin);
184  else if (wheel > 0)
185  fed_s = to_string(FEDIDmax);
186  string histoTitle = "Summary Wheel" + wheel_s + " (FED " + fed_s + ")";
187 
188  ((summaryHistos[histoType])[wheel]) = ibooker.book2D(histoName, histoTitle, 11, 0, 11, 12, 1, 13);
189  MonitorElement* histo = ((summaryHistos[histoType])[wheel]);
190  histo->setBinLabel(1, "Error 1", 1);
191  histo->setBinLabel(2, "Error 2", 1);
192  histo->setBinLabel(3, "Error 3", 1);
193  histo->setBinLabel(4, "Error 4", 1);
194  histo->setBinLabel(5, "Not OKflag", 1);
195  // TDC error bins
196  histo->setBinLabel(6, "TDC Fatal", 1);
197  histo->setBinLabel(7, "TDC RO FIFO ov.", 1);
198  histo->setBinLabel(8, "TDC L1 buf. ov.", 1);
199  histo->setBinLabel(9, "TDC L1A FIFO ov.", 1);
200  histo->setBinLabel(10, "TDC hit err.", 1);
201  histo->setBinLabel(11, "TDC hit rej.", 1);
202 
203  histo->setBinLabel(1, "ROS1", 2);
204  histo->setBinLabel(2, "ROS2", 2);
205  histo->setBinLabel(3, "ROS3", 2);
206  histo->setBinLabel(4, "ROS4", 2);
207  histo->setBinLabel(5, "ROS5", 2);
208  histo->setBinLabel(6, "ROS6", 2);
209  histo->setBinLabel(7, "ROS7", 2);
210  histo->setBinLabel(8, "ROS8", 2);
211  histo->setBinLabel(9, "ROS9", 2);
212  histo->setBinLabel(10, "ROS10", 2);
213  histo->setBinLabel(11, "ROS11", 2);
214  histo->setBinLabel(12, "ROS12", 2);
215  }
216  }
217 
218  else { //if(!checkUros){
219  hFEDFatal = ibooker.book1D("FEDFatal", "# fatal errors DT FED", nFED, fedMin, fedMax + 1);
220  hFEDNonFatal = ibooker.book1D("FEDNonFatal", "# NON fatal errors DT FED", nFED, fedMin, fedMax + 1);
221 
222  if (mode == 3 || mode == 1)
223  return; //Avoid duplication of Info in FEDIntegrity_EvF
224 
225  ibooker.setCurrentFolder(topFolder(false));
226  hTTSSummary = ibooker.book2D("TTSSummary", "Summary Status TTS", nFED, fedMin, fedMax + 1, 9, 1, 10);
227  hTTSSummary->setAxisTitle("FED", 1);
228  hTTSSummary->setBinLabel(1, "ROS PAF", 2);
229  hTTSSummary->setBinLabel(2, "DDU PAF", 2);
230  hTTSSummary->setBinLabel(3, "ROS PAF", 2);
231  hTTSSummary->setBinLabel(4, "DDU PAF", 2);
232  hTTSSummary->setBinLabel(5, "DDU Full", 2);
233  hTTSSummary->setBinLabel(6, "L1A Mism.", 2);
234  hTTSSummary->setBinLabel(7, "ROS Error", 2);
235  hTTSSummary->setBinLabel(8, "BX Mism.", 2);
236  hTTSSummary->setBinLabel(9, "DDU Logic Err.", 2);
237 
238  // bookkeeping of the
240  ibooker.book2D("DataCorruptionSummary", "Data Corruption Sources", nFED, fedMin, fedMax + 1, 8, 1, 9);
241  hCorruptionSummary->setAxisTitle("FED", 1);
242  hCorruptionSummary->setBinLabel(1, "Miss Ch.", 2);
243  hCorruptionSummary->setBinLabel(2, "ROS BX mism", 2);
244  hCorruptionSummary->setBinLabel(3, "DDU BX mism", 2);
245  hCorruptionSummary->setBinLabel(4, "ROS L1A mism", 2);
246  hCorruptionSummary->setBinLabel(5, "Miss Payload", 2);
247  hCorruptionSummary->setBinLabel(6, "FCRC bit", 2);
248  hCorruptionSummary->setBinLabel(7, "Header check", 2);
249  hCorruptionSummary->setBinLabel(8, "Trailer Check", 2);
250  }
251 }
MonitorElement * hFEDNonFatal
MonitorElement * hFEDFatal
std::map< std::string, std::map< int, MonitorElement * > > summaryHistos
virtual void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
MonitorElement * nEventMonitor
std::string topFolder(bool isFEDIntegrity) const
MonitorElement * hFEDEntry
MonitorElement * hTTSSummary
MonitorElement * hCorruptionSummary
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void DTDataIntegrityTask::bookHistos ( DQMStore::IBooker ,
std::string  folder,
DTROChainCoding  code 
)
private
void DTDataIntegrityTask::bookHistos ( DQMStore::IBooker ,
std::string  folder,
const int  fed 
)
private
void DTDataIntegrityTask::bookHistosROS ( DQMStore::IBooker ibooker,
const int  wheel,
const int  ros 
)
private

Definition at line 719 of file DTDataIntegrityTask.cc.

References dqm::dqmstoreimpl::DQMStore::IBooker::book2D(), timingPdfMaker::histo, HltBtagPostValidation_cff::histoName, plotFactory::keyHisto, MainPageGenerator::link, mode, dqm::impl::MonitorElement::setBinLabel(), dqm::dqmstoreimpl::DQMStore::IBooker::setCurrentFolder(), TDCError, topFolder(), uROSError, and urosHistos.

Referenced by bookHistograms().

719  {
720  string wheel_s = to_string(wheel);
721  string ros_s = to_string(ros);
722  ibooker.setCurrentFolder(topFolder(false) + "Wheel" + wheel_s + "/ROS" + ros_s);
723 
724  string histoType = "ROSError";
725  int linkDown = 0;
726  string linkDown_s = to_string(linkDown);
727  int linkUp = linkDown + 24;
728  string linkUp_s = to_string(linkUp);
729  string histoName = "W" + wheel_s + "_" + "ROS" + ros_s + "_" + histoType;
730  string histoTitle = histoName + " (Link " + linkDown_s + "-" + linkUp_s + " error summary)";
731  unsigned int keyHisto = (uROSError)*1000 + (wheel + 2) * 100 + (ros - 1);
732  if (mode < 1) // Online only
733  urosHistos[keyHisto] = ibooker.book2D(histoName, histoTitle, 11, 0, 11, 25, 0, 25);
734  else
735  urosHistos[keyHisto] = ibooker.book2D(histoName, histoTitle, 5, 0, 5, 25, 0, 25);
736 
738  // uROS error bins
739  // Placeholders for the moment
740  histo->setBinLabel(1, "Error 1", 1);
741  histo->setBinLabel(2, "Error 2", 1);
742  histo->setBinLabel(3, "Error 3", 1);
743  histo->setBinLabel(4, "Error 4", 1);
744  histo->setBinLabel(5, "Not OKFlag", 1);
745  if (mode < 1) { //Online only
746  // TDC error bins
747  histo->setBinLabel(6, "TDC Fatal", 1);
748  histo->setBinLabel(7, "TDC RO FIFO ov.", 1);
749  histo->setBinLabel(8, "TDC L1 buf. ov.", 1);
750  histo->setBinLabel(9, "TDC L1A FIFO ov.", 1);
751  histo->setBinLabel(10, "TDC hit err.", 1);
752  histo->setBinLabel(11, "TDC hit rej.", 1);
753  }
754  for (int link = linkDown; link < (linkUp + 1); ++link) {
755  string link_s = to_string(link);
756  histo->setBinLabel(link + 1, "Link" + link_s, 2);
757  }
758 
759  if (mode > 1)
760  return;
761 
762  histoType = "TDCError";
763  linkDown = 0;
764  linkDown_s = to_string(linkDown);
765  linkUp = linkDown + 24;
766  linkUp_s = to_string(linkUp);
767  histoName = "W" + wheel_s + "_" + "ROS" + ros_s + "_" + histoType;
768  histoTitle = histoName + " (Link " + linkDown_s + "-" + linkUp_s + " error summary)";
769  keyHisto = (TDCError)*1000 + (wheel + 2) * 100 + (ros - 1);
770  urosHistos[keyHisto] = ibooker.book2D(histoName, histoTitle, 24, 0, 24, 25, 0, 25);
771  histo = urosHistos[keyHisto];
772  // TDC error bins
773  histo->setBinLabel(1, "Fatal", 1);
774  histo->setBinLabel(2, "RO FIFO ov.", 1);
775  histo->setBinLabel(3, "L1 buf. ov.", 1);
776  histo->setBinLabel(4, "L1A FIFO ov.", 1);
777  histo->setBinLabel(5, "hit err.", 1);
778  histo->setBinLabel(6, "hit rej.", 1);
779  histo->setBinLabel(7, "Fatal", 1);
780  histo->setBinLabel(8, "RO FIFO ov.", 1);
781  histo->setBinLabel(9, "L1 buf. ov.", 1);
782  histo->setBinLabel(10, "L1A FIFO ov.", 1);
783  histo->setBinLabel(11, "hit err.", 1);
784  histo->setBinLabel(12, "hit rej.", 1);
785  histo->setBinLabel(13, "Fatal", 1);
786  histo->setBinLabel(14, "RO FIFO ov.", 1);
787  histo->setBinLabel(15, "L1 buf. ov.", 1);
788  histo->setBinLabel(16, "L1A FIFO ov.", 1);
789  histo->setBinLabel(17, "hit err.", 1);
790  histo->setBinLabel(18, "hit rej.", 1);
791  histo->setBinLabel(19, "Fatal", 1);
792  histo->setBinLabel(20, "RO FIFO ov.", 1);
793  histo->setBinLabel(21, "L1 buf. ov.", 1);
794  histo->setBinLabel(22, "L1A FIFO ov.", 1);
795  histo->setBinLabel(23, "hit err.", 1);
796  histo->setBinLabel(24, "hit rej.", 1);
797 
798  for (int link = linkDown; link < (linkUp + 1); ++link) {
799  string link_s = to_string(link);
800  histo->setBinLabel(link + 1, "Link" + link_s, 2);
801  }
802 } //bookHistosROS
std::map< unsigned int, MonitorElement * > urosHistos
virtual void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
std::string topFolder(bool isFEDIntegrity) const
void DTDataIntegrityTask::bookHistosROS25 ( DQMStore::IBooker ibooker,
DTROChainCoding  code 
)
private

Definition at line 710 of file DTDataIntegrityTask.cc.

References bookHistos(), getSCInfo, and mode.

Referenced by bookHistograms().

710  {
711  bookHistos(ibooker, string("ROS"), code);
712 
713  if (mode < 1)
714  if (getSCInfo)
715  bookHistos(ibooker, string("SC"), code);
716 }
void bookHistos(DQMStore::IBooker &, const int fedMin, const int fedMax)
void DTDataIntegrityTask::bookHistosuROS ( DQMStore::IBooker ibooker,
const int  fed,
const int  uRos 
)
private

Definition at line 804 of file DTDataIntegrityTask.cc.

References dqm::dqmstoreimpl::DQMStore::IBooker::book1D(), FEDIDmin, timingPdfMaker::histo, HltBtagPostValidation_cff::histoName, plotFactory::keyHisto, mode, dqm::impl::MonitorElement::setBinLabel(), dqm::dqmstoreimpl::DQMStore::IBooker::setCurrentFolder(), topFolder(), TTSValues, uROSEventLength, urosHistos, and urosTimeHistos.

Referenced by bookHistograms().

804  {
805  string fed_s = to_string(fed);
806  string uRos_s = to_string(uRos);
807  ibooker.setCurrentFolder(topFolder(false) + "FED" + fed_s + "/uROS" + uRos_s);
808 
809  if (mode > 1)
810  return;
811 
812  string histoType = "uROSEventLength";
813  string histoName = "FED" + fed_s + "_uROS" + uRos_s + "_" + "EventLength";
814  string histoTitle = "Event Length (Bytes) FED " + fed_s + " uROS" + uRos_s;
815  unsigned int keyHisto = (uROSEventLength)*1000 + (fed - FEDIDmin) * 100 + (uRos - 1);
816  urosHistos[keyHisto] = ibooker.book1D(histoName, histoTitle, 101, 0, 5000);
817 
818  histoType = "uROSAvgEventLengthvsLumi";
819  histoName = "FED" + fed_s + "_ROS" + uRos_s + "AvgEventLengthvsLumi";
820  histoTitle = "Event Length (Bytes) FED " + fed_s + " ROS" + uRos_s;
821  keyHisto = (fed - FEDIDmin) * 100 + (uRos - 1);
822  urosTimeHistos[keyHisto] = new DTTimeEvolutionHisto(ibooker, histoName, histoTitle, 200, 10, true, 0);
823 
824  histoType = "TTSValues";
825  histoName = "FED" + fed_s + "_" + "uROS" + uRos_s + "_" + histoType;
826  keyHisto = TTSValues * 1000 + (fed - FEDIDmin) * 100 + (uRos - 1);
827  urosHistos[keyHisto] = ibooker.book1D(histoName, histoName, 8, 0, 8);
829  histo->setBinLabel(1, "Disconnected", 1);
830  histo->setBinLabel(2, "Overflow Warning ", 1);
831  histo->setBinLabel(3, "Out of synch", 1);
832  histo->setBinLabel(4, "Busy", 1);
833  histo->setBinLabel(5, "Ready", 1);
834  histo->setBinLabel(6, "Error", 1);
835  histo->setBinLabel(7, "Disconnected", 1);
836  histo->setBinLabel(8, "Unknown", 1);
837 }
std::map< unsigned int, MonitorElement * > urosHistos
virtual void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
std::string topFolder(bool isFEDIntegrity) const
std::map< unsigned int, DTTimeEvolutionHisto * > urosTimeHistos
void DTDataIntegrityTask::channelsInCEROS ( int  cerosId,
int  chMask,
std::vector< int > &  channels 
)
private

Definition at line 1785 of file DTDataIntegrityTask.cc.

References testProducerWithPsetDescEmpty_cfi::x1.

Referenced by processROS25().

1785  {
1786  for (int iCh = 0; iCh < 6; ++iCh) {
1787  if ((chMask >> iCh) & 0x1) {
1788  channels.push_back(cerosId * 6 + iCh);
1789  }
1790  }
1791  return;
1792 }
void DTDataIntegrityTask::channelsInROS ( int  cerosMask,
std::vector< int > &  channels 
)
private

Definition at line 1794 of file DTDataIntegrityTask.cc.

References testProducerWithPsetDescEmpty_cfi::x1.

Referenced by processROS25().

1794  {
1795  for (int iCeros = 0; iCeros < 5; ++iCeros) {
1796  if ((cerosMask >> iCeros) & 0x1) {
1797  for (int iCh = 0; iCh < 6; ++iCh) {
1798  channels.push_back(iCeros * 6 + iCh);
1799  }
1800  }
1801  }
1802  return;
1803 }
void DTDataIntegrityTask::endLuminosityBlock ( const edm::LuminosityBlock ls,
const edm::EventSetup es 
)
override

Definition at line 1809 of file DTDataIntegrityTask.cc.

References checkUros, fedTimeHistos, edm::LuminosityBlockBase::luminosityBlock(), nEventsLS, rosTimeHistos, and urosTimeHistos.

1809  {
1810  int lumiBlock = ls.luminosityBlock();
1811 
1812  if (checkUros) {
1813  map<string, map<int, DTTimeEvolutionHisto*> >::iterator fedIt = fedTimeHistos.begin();
1814  map<string, map<int, DTTimeEvolutionHisto*> >::iterator fedEnd = fedTimeHistos.end();
1815  for (; fedIt != fedEnd; ++fedIt) {
1816  map<int, DTTimeEvolutionHisto*>::iterator histoIt = fedIt->second.begin();
1817  map<int, DTTimeEvolutionHisto*>::iterator histoEnd = fedIt->second.end();
1818  for (; histoIt != histoEnd; ++histoIt) {
1819  histoIt->second->updateTimeSlot(lumiBlock, nEventsLS);
1820  }
1821  }
1822 
1823  map<unsigned int, DTTimeEvolutionHisto*>::iterator urosIt = urosTimeHistos.begin();
1824  map<unsigned int, DTTimeEvolutionHisto*>::iterator urosEnd = urosTimeHistos.end();
1825  for (; urosIt != urosEnd; ++urosIt) {
1826  urosIt->second->updateTimeSlot(lumiBlock, nEventsLS);
1827  }
1828 
1829  } //uROS starting on 2018
1830  else {
1831  map<string, map<int, DTTimeEvolutionHisto*> >::iterator dduIt = fedTimeHistos.begin();
1832  map<string, map<int, DTTimeEvolutionHisto*> >::iterator dduEnd = fedTimeHistos.end();
1833  for (; dduIt != dduEnd; ++dduIt) {
1834  map<int, DTTimeEvolutionHisto*>::iterator histoIt = dduIt->second.begin();
1835  map<int, DTTimeEvolutionHisto*>::iterator histoEnd = dduIt->second.end();
1836  for (; histoIt != histoEnd; ++histoIt) {
1837  histoIt->second->updateTimeSlot(lumiBlock, nEventsLS);
1838  }
1839  }
1840 
1841  map<string, map<int, DTTimeEvolutionHisto*> >::iterator rosIt = rosTimeHistos.begin();
1842  map<string, map<int, DTTimeEvolutionHisto*> >::iterator rosEnd = rosTimeHistos.end();
1843  for (; rosIt != rosEnd; ++rosIt) {
1844  map<int, DTTimeEvolutionHisto*>::iterator histoIt = rosIt->second.begin();
1845  map<int, DTTimeEvolutionHisto*>::iterator histoEnd = rosIt->second.end();
1846  for (; histoIt != histoEnd; ++histoIt) {
1847  histoIt->second->updateTimeSlot(lumiBlock, nEventsLS);
1848  }
1849  }
1850  } //ROS Legacy
1851 }
LuminosityBlockNumber_t luminosityBlock() const
std::map< std::string, std::map< int, DTTimeEvolutionHisto * > > fedTimeHistos
std::map< std::string, std::map< int, DTTimeEvolutionHisto * > > rosTimeHistos
std::map< unsigned int, DTTimeEvolutionHisto * > urosTimeHistos
bool DTDataIntegrityTask::eventHasErrors ( ) const

Definition at line 1765 of file DTDataIntegrityTask.cc.

References eventErrorFlag.

1765 { return eventErrorFlag; }
void DTDataIntegrityTask::fedEntry ( int  dduID)

Definition at line 1768 of file DTDataIntegrityTask.cc.

References dqm::impl::MonitorElement::Fill(), and hFEDEntry.

1768 { hFEDEntry->Fill(dduID); }
void Fill(long long x)
MonitorElement * hFEDEntry
void DTDataIntegrityTask::fedFatal ( int  dduID)

Definition at line 1771 of file DTDataIntegrityTask.cc.

References dqm::impl::MonitorElement::Fill(), and hFEDFatal.

1771 { hFEDFatal->Fill(dduID); }
MonitorElement * hFEDFatal
void Fill(long long x)
void DTDataIntegrityTask::fedNonFatal ( int  dduID)

Definition at line 1774 of file DTDataIntegrityTask.cc.

References dqm::impl::MonitorElement::Fill(), and hFEDNonFatal.

1774 { hFEDNonFatal->Fill(dduID); }
MonitorElement * hFEDNonFatal
void Fill(long long x)
void DTDataIntegrityTask::processFED ( DTuROSFEDData data,
int  fed 
)

Definition at line 1403 of file DTDataIntegrityTask.cc.

References fedHistos, FEDIDmax, fedTimeHistos, dqm::impl::MonitorElement::Fill(), DTuROSFEDData::getBXId(), DTuROSFEDData::getevtlgth(), DTuROSFEDData::getnslots(), DTuROSFEDData::getTTS(), hFEDEntry, LogTrace, mode, and neventsFED.

Referenced by analyze().

1403  {
1404  neventsFED++;
1405  if (neventsFED % 1000 == 0)
1406  LogTrace("DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
1407  << "[DTDataIntegrityTask]: " << neventsFED << " events analyzed by processFED" << endl;
1408 
1409  if (fed < FEDIDmin || fed > FEDIDmax)
1410  return;
1411 
1412  hFEDEntry->Fill(fed);
1413 
1414  if (mode == 3 || mode == 1)
1415  return; //Avoid duplication of Info in FEDIntegrity_EvF
1416 
1417  //1D HISTOS: EVENT LENGHT from trailer
1418  int fedEvtLength = data.getevtlgth() * 8; //1 word = 8 bytes
1419  // if(fedEvtLength > 16000) fedEvtLength = 16000; // overflow bin
1420  fedHistos["EventLength"][fed]->Fill(fedEvtLength);
1421 
1422  if (mode > 1)
1423  return;
1424 
1425  fedTimeHistos["FEDAvgEvLengthvsLumi"][fed]->accumulateValueTimeSlot(fedEvtLength);
1426 
1427  // fill the distribution of the BX ids
1428  fedHistos["BXID"][fed]->Fill(data.getBXId());
1429 
1430  // size of the list of ROS in the Read-Out
1431  fedHistos["uROSList"][fed]->Fill(data.getnslots());
1432 
1433  // Fill the status summary of the TTS
1434 
1435  //1D HISTO WITH TTS VALUES form trailer (7 bins = 7 values)
1436 
1437  int ttsCodeValue = -1;
1438  int value = data.getTTS();
1439  switch (value) {
1440  case 0: { //disconnected
1441  ttsCodeValue = 0;
1442  break;
1443  }
1444  case 1: { //warning overflow
1445  ttsCodeValue = 1;
1446  break;
1447  }
1448  case 2: { //out of sinch
1449  ttsCodeValue = 2;
1450  break;
1451  }
1452  case 4: { //busy
1453  ttsCodeValue = 3;
1454  break;
1455  }
1456  case 8: { //ready
1457  ttsCodeValue = 4;
1458  break;
1459  }
1460  case 12: { //error
1461  ttsCodeValue = 5;
1462  break;
1463  }
1464  case 15: { //disconnected
1465  ttsCodeValue = 6;
1466  break;
1467  }
1468  default: {
1469  LogError("DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
1470  << "[DTDataIntegrityTask] FED TTS control: wrong TTS value " << value << " in FED " << fed << endl;
1471  ttsCodeValue = 7;
1472  }
1473  }
1474  if (mode < 1)
1475  fedHistos["TTSValues"][fed]->Fill(ttsCodeValue);
1476 }
int getevtlgth() const
void Fill(long long x)
std::map< std::string, std::map< int, DTTimeEvolutionHisto * > > fedTimeHistos
int getBXId() const
Definition: value.py:1
std::map< std::string, std::map< int, MonitorElement * > > fedHistos
#define LogTrace(id)
MonitorElement * hFEDEntry
int getTTS() const
int getnslots() const
void DTDataIntegrityTask::processFED ( DTDDUData dduData,
const std::vector< DTROS25Data > &  rosData,
int  dduID 
)

Definition at line 1479 of file DTDataIntegrityTask.cc.

References DTDDUSecondStatusWord::busyROSPAF(), FEDHeader::bxID(), DTDDUSecondStatusWord::bxIDError(), FEDHeader::check(), FEDTrailer::check(), DTDDUData::crcErrorBit(), fedBXIds, fedHistos, FEDIDmax, FEDIDmin, fedTimeHistos, DTDDUSecondStatusWord::fifoAlmostFull(), DTDDUSecondStatusWord::fifoFull(), dqm::impl::MonitorElement::Fill(), FEDTrailer::fragmentLength(), DTDDUData::getDDUHeader(), DTROChainCoding::getDDUID(), DTDDUData::getDDUTrailer(), DTDDUData::getFirstStatusWord(), DTDDUData::getSecondStatusWord(), hCorruptionSummary, RecoTauValidation_cfi::header, hFEDEntry, hFEDFatal, hTTSSummary, mps_fire::i, DTDDUSecondStatusWord::inputFifoAlmostFull(), DTDDUSecondStatusWord::inputFifoFull(), DTDDUSecondStatusWord::l1AIDError(), LogTrace, FEDHeader::lvl1ID(), mode, neventsFED, DTDDUSecondStatusWord::outOfSynchROSError(), DTDDUSecondStatusWord::outputFifoAlmostFull(), DTDDUSecondStatusWord::outputFifoFull(), rosBxIdsPerFED, rosL1AIdsPerFED, DTDDUSecondStatusWord::rosList(), DTROChainCoding::setDDU(), FEDHeader::triggerType(), FEDTrailer::ttsBits(), DTDDUSecondStatusWord::warningROSPAF(), and testProducerWithPsetDescEmpty_cfi::x1.

1479  {
1480  neventsFED++;
1481  if (neventsFED % 1000 == 0)
1482  LogTrace("DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
1483  << "[DTDataIntegrityTask]: " << neventsFED << " events analyzed by processFED" << endl;
1484 
1485  DTROChainCoding code;
1486  code.setDDU(ddu);
1487  if (code.getDDUID() < FEDIDmin || code.getDDUID() > FEDIDmax)
1488  return;
1489 
1490  hFEDEntry->Fill(code.getDDUID());
1491 
1492  const FEDTrailer& trailer = data.getDDUTrailer();
1493  const FEDHeader& header = data.getDDUHeader();
1494 
1495  // check consistency of header and trailer
1496  if (!header.check()) {
1497  // error code 7
1498  hFEDFatal->Fill(code.getDDUID());
1499  hCorruptionSummary->Fill(code.getDDUID(), 7);
1500  }
1501 
1502  if (!trailer.check()) {
1503  // error code 8
1504  hFEDFatal->Fill(code.getDDUID());
1505  hCorruptionSummary->Fill(code.getDDUID(), 8);
1506  }
1507 
1508  // check CRC error bit set by DAQ before sending data on SLink
1509  if (data.crcErrorBit()) {
1510  // error code 6
1511  hFEDFatal->Fill(code.getDDUID());
1512  hCorruptionSummary->Fill(code.getDDUID(), 6);
1513  }
1514 
1515  if (mode == 3 || mode == 1)
1516  return; //Avoid duplication of Info in FEDIntegrity_EvF
1517 
1518  const DTDDUSecondStatusWord& secondWord = data.getSecondStatusWord();
1519 
1520  // Fill the status summary of the TTS
1521 
1522  //1D HISTO WITH TTS VALUES form trailer (7 bins = 7 values)
1523  int ttsCodeValue = -1;
1524  int ttsSummaryBin = -1;
1525 
1526  switch (trailer.ttsBits()) {
1527  case 0: { //disconnected
1528  ttsCodeValue = 0;
1529  break;
1530  }
1531  case 1: { //warning overflow
1532  ttsCodeValue = 1;
1533  if (secondWord.warningROSPAF()) { // ROS PAF
1534  ttsSummaryBin = 1;
1535  } else { // DDU PAF
1536  ttsSummaryBin = 2;
1537  }
1538 
1539  break;
1540  }
1541  case 2: { //out of sinch
1542  ttsCodeValue = 2;
1543  bool knownOrigin = false;
1544  if (secondWord.outOfSynchROSError()) { // ROS Error
1545  ttsSummaryBin = 7;
1546  knownOrigin = true;
1547  }
1548  if (secondWord.l1AIDError()) { // L1A Mism.
1549  ttsSummaryBin = 6;
1550  knownOrigin = true;
1551  }
1552  if (secondWord.bxIDError()) { // BX Mism.
1553  ttsSummaryBin = 8;
1554  knownOrigin = true;
1555  }
1556  if (secondWord.outputFifoFull() || secondWord.inputFifoFull() || secondWord.fifoFull()) { // DDU Full
1557  ttsSummaryBin = 5;
1558  knownOrigin = true;
1559  }
1560  if (!knownOrigin)
1561  ttsSummaryBin = 9; // Error in DDU logic
1562 
1563  break;
1564  }
1565  case 4: { //busy
1566  ttsCodeValue = 3;
1567  bool knownOrigin = false;
1568  if (secondWord.busyROSPAF()) { // ROS PAF
1569  ttsSummaryBin = 3;
1570  knownOrigin = true;
1571  }
1572  if (secondWord.outputFifoAlmostFull() || secondWord.inputFifoAlmostFull() ||
1573  secondWord.fifoAlmostFull()) { // DDU PAF
1574  ttsSummaryBin = 4;
1575  knownOrigin = true;
1576  }
1577  if (!knownOrigin)
1578  ttsSummaryBin = 9; // Error in DDU logic
1579  break;
1580  }
1581  case 8: { //ready
1582  ttsCodeValue = 4;
1583  break;
1584  }
1585  case 12: { //error
1586  ttsCodeValue = 5;
1587  break;
1588  }
1589  case 16: { //disconnected
1590  ttsCodeValue = 6;
1591  break;
1592  }
1593  default: {
1594  LogError("DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
1595  << "[DTDataIntegrityTask] DDU control: wrong TTS value " << trailer.ttsBits() << endl;
1596  ttsCodeValue = 7;
1597  }
1598  }
1599  if (mode < 1)
1600  fedHistos["TTSValues"][code.getDDUID()]->Fill(ttsCodeValue);
1601  if (ttsSummaryBin != -1) {
1602  hTTSSummary->Fill(ddu, ttsSummaryBin);
1603  }
1604 
1605  //2D HISTO: ROS VS STATUS (8 BIT = 8 BIN) from 1st-2nd status words (9th BIN FROM LIST OF ROS in 2nd status word)
1606  MonitorElement* hROSStatus = fedHistos["ROSStatus"][code.getDDUID()];
1607  //1D HISTO: NUMBER OF ROS IN THE EVENTS from 2nd status word
1608 
1609  int rosList = secondWord.rosList();
1610  set<int> rosPositions;
1611  for (int i = 0; i < 12; i++) {
1612  if (rosList & 0x1) {
1613  rosPositions.insert(i);
1614  //9th BIN FROM LIST OF ROS in 2nd status word
1615  if (mode <= 2)
1616  hROSStatus->Fill(8, i, 1);
1617  }
1618  rosList >>= 1;
1619  }
1620 
1621  int channel = 0;
1622  for (vector<DTDDUFirstStatusWord>::const_iterator fsw_it = data.getFirstStatusWord().begin();
1623  fsw_it != data.getFirstStatusWord().end();
1624  fsw_it++) {
1625  // assuming association one-to-one between DDU channel and ROS
1626  if (mode <= 2) {
1627  hROSStatus->Fill(0, channel, (*fsw_it).channelEnabled());
1628  hROSStatus->Fill(1, channel, (*fsw_it).timeout());
1629  hROSStatus->Fill(2, channel, (*fsw_it).eventTrailerLost());
1630  hROSStatus->Fill(3, channel, (*fsw_it).opticalFiberSignalLost());
1631  hROSStatus->Fill(4, channel, (*fsw_it).tlkPropagationError());
1632  hROSStatus->Fill(5, channel, (*fsw_it).tlkPatternError());
1633  hROSStatus->Fill(6, channel, (*fsw_it).tlkSignalLost());
1634  hROSStatus->Fill(7, channel, (*fsw_it).errorFromROS());
1635  }
1636  // check that the enabled channel was also in the read-out
1637  if ((*fsw_it).channelEnabled() == 1 && rosPositions.find(channel) == rosPositions.end()) {
1638  if (mode <= 2)
1639  hROSStatus->Fill(9, channel, 1);
1640  // error code 1
1641  hFEDFatal->Fill(code.getDDUID());
1642  hCorruptionSummary->Fill(code.getDDUID(), 1);
1643  }
1644  channel++;
1645  }
1646 
1647  // ---------------------------------------------------------------------
1648  // cross checks between FED and ROS data
1649  // check the BX ID against the ROSs
1650  set<int> rosBXIds = rosBxIdsPerFED[ddu];
1651  if ((rosBXIds.size() > 1 || rosBXIds.find(header.bxID()) == rosBXIds.end()) &&
1652  !rosBXIds.empty()) { // in this case look for faulty ROSs
1653  for (vector<DTROS25Data>::const_iterator rosControlData = rosData.begin(); rosControlData != rosData.end();
1654  ++rosControlData) { // loop over the ROS data
1655  for (vector<DTROSDebugWord>::const_iterator debug_it = (*rosControlData).getROSDebugs().begin();
1656  debug_it != (*rosControlData).getROSDebugs().end();
1657  debug_it++) { // Loop over ROS debug words
1658  if ((*debug_it).debugType() == 0 && (*debug_it).debugMessage() != header.bxID()) { // check the BX
1659  int ros = (*rosControlData).getROSID();
1660  // fill the error bin
1661  if (mode <= 2)
1662  hROSStatus->Fill(11, ros - 1);
1663  // error code 2
1664  hFEDFatal->Fill(code.getDDUID());
1665  hCorruptionSummary->Fill(code.getDDUID(), 2);
1666  }
1667  }
1668  }
1669  }
1670 
1671  // check the BX ID against other FEDs
1672  fedBXIds.insert(header.bxID());
1673  if (fedBXIds.size() != 1) {
1674  LogWarning("DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
1675  << "ERROR: FED " << ddu << " BX ID different from other feds: " << header.bxID() << endl;
1676  // error code 3
1677  hFEDFatal->Fill(code.getDDUID());
1678  hCorruptionSummary->Fill(code.getDDUID(), 3);
1679  }
1680 
1681  // check the L1A ID against the ROSs
1682  set<int> rosL1AIds = rosL1AIdsPerFED[ddu];
1683  if ((rosL1AIds.size() > 1 || rosL1AIds.find(header.lvl1ID() - 1) == rosL1AIds.end()) &&
1684  !rosL1AIds.empty()) { // in this case look for faulty ROSs
1685  //If L1A_ID error identify which ROS has wrong L1A
1686  for (vector<DTROS25Data>::const_iterator rosControlData = rosData.begin(); rosControlData != rosData.end();
1687  rosControlData++) { // loop over the ROS data
1688  unsigned int ROSHeader_TTCCount =
1689  ((*rosControlData).getROSHeader().TTCEventCounter() + 1) %
1690  0x1000000; // fix comparison in case of last counting bin in ROS /first one in DDU
1691  if (ROSHeader_TTCCount != header.lvl1ID()) {
1692  int ros = (*rosControlData).getROSID();
1693  if (mode <= 2)
1694  hROSStatus->Fill(10, ros - 1);
1695  // error code 4
1696  hFEDFatal->Fill(code.getDDUID());
1697  hCorruptionSummary->Fill(code.getDDUID(), 4);
1698  }
1699  }
1700  }
1701 
1702  //1D HISTOS: EVENT LENGHT from trailer
1703  int fedEvtLength = trailer.fragmentLength() * 8;
1704  // if(fedEvtLength > 16000) fedEvtLength = 16000; // overflow bin
1705  fedHistos["EventLength"][code.getDDUID()]->Fill(fedEvtLength);
1706 
1707  if (mode > 1)
1708  return;
1709 
1710  fedTimeHistos["FEDAvgEvLengthvsLumi"][code.getDDUID()]->accumulateValueTimeSlot(fedEvtLength);
1711 
1712  // size of the list of ROS in the Read-Out
1713  fedHistos["ROSList"][code.getDDUID()]->Fill(rosPositions.size());
1714 
1715  //2D HISTO: FIFO STATUS from 2nd status word
1716  MonitorElement* hFIFOStatus = fedHistos["FIFOStatus"][code.getDDUID()];
1717  int inputFifoFull = secondWord.inputFifoFull();
1718  int inputFifoAlmostFull = secondWord.inputFifoAlmostFull();
1719  int fifoFull = secondWord.fifoFull();
1720  int fifoAlmostFull = secondWord.fifoAlmostFull();
1721  int outputFifoFull = secondWord.outputFifoFull();
1722  int outputFifoAlmostFull = secondWord.outputFifoAlmostFull();
1723  for (int i = 0; i < 3; i++) {
1724  if (inputFifoFull & 0x1) {
1725  hFIFOStatus->Fill(i, 0);
1726  }
1727  if (inputFifoAlmostFull & 0x1) {
1728  hFIFOStatus->Fill(i, 1);
1729  }
1730  if (fifoFull & 0x1) {
1731  hFIFOStatus->Fill(3 + i, 0);
1732  }
1733  if (fifoAlmostFull & 0x1) {
1734  hFIFOStatus->Fill(3 + i, 1);
1735  }
1736  if (!(inputFifoFull & 0x1) && !(inputFifoAlmostFull & 0x1)) {
1737  hFIFOStatus->Fill(i, 2);
1738  }
1739  if (!(fifoFull & 0x1) && !(fifoAlmostFull & 0x1)) {
1740  hFIFOStatus->Fill(3 + i, 2);
1741  }
1742  inputFifoFull >>= 1;
1743  inputFifoAlmostFull >>= 1;
1744  fifoFull >>= 1;
1745  fifoAlmostFull >>= 1;
1746  }
1747 
1748  if (outputFifoFull) {
1749  hFIFOStatus->Fill(6, 0);
1750  }
1751  if (outputFifoAlmostFull) {
1752  hFIFOStatus->Fill(6, 1);
1753  }
1754  if (!outputFifoFull && !outputFifoAlmostFull) {
1755  hFIFOStatus->Fill(6, 2);
1756  }
1757 
1758  //1D HISTO: EVENT TYPE from header
1759  fedHistos["EventType"][code.getDDUID()]->Fill(header.triggerType());
1760 
1761  // fill the distribution of the BX ids
1762  fedHistos["BXID"][code.getDDUID()]->Fill(header.bxID());
1763 }
std::map< int, std::set< int > > rosBxIdsPerFED
std::map< int, std::set< int > > rosL1AIdsPerFED
uint8_t triggerType() const
Event Trigger type identifier.
Definition: FEDHeader.cc:13
int outputFifoFull() const
Definition: DTDDUWords.h:688
int rosList() const
Definition: DTDDUWords.h:690
bool check() const
Check that the header is OK.
Definition: FEDHeader.cc:44
bool check() const
Check that the trailer is OK.
Definition: FEDTrailer.cc:45
int busyROSPAF() const
Definition: DTDDUWords.h:692
int l1AIDError() const
Definition: DTDDUWords.h:682
MonitorElement * hFEDFatal
uint32_t fragmentLength() const
The length of the event fragment counted in 64-bit words including header and trailer.
Definition: FEDTrailer.cc:13
void Fill(long long x)
int warningROSPAF() const
Definition: DTDDUWords.h:691
std::map< std::string, std::map< int, DTTimeEvolutionHisto * > > fedTimeHistos
int fifoFull() const
Definition: DTDDUWords.h:684
std::map< std::string, std::map< int, MonitorElement * > > fedHistos
#define LogTrace(id)
int getDDUID() const
int inputFifoAlmostFull() const
Definition: DTDDUWords.h:687
int inputFifoFull() const
Definition: DTDDUWords.h:685
uint8_t ttsBits() const
Current value of the Trigger Throttling System bits.
Definition: FEDTrailer.cc:19
MonitorElement * hFEDEntry
int bxIDError() const
Definition: DTDDUWords.h:683
uint16_t bxID() const
The bunch crossing number.
Definition: FEDHeader.cc:17
int outputFifoAlmostFull() const
Definition: DTDDUWords.h:689
void setDDU(const int &ID)
need to reset the bits before setting
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
MonitorElement * hTTSSummary
std::set< int > fedBXIds
uint32_t lvl1ID() const
Level-1 event number generated by the TTC system.
Definition: FEDHeader.cc:15
int fifoAlmostFull() const
Definition: DTDDUWords.h:686
int outOfSynchROSError() const
Definition: DTDDUWords.h:693
MonitorElement * hCorruptionSummary
void DTDataIntegrityTask::processROS25 ( DTROS25Data data,
int  dduID,
int  ros 
)

Definition at line 1117 of file DTDataIntegrityTask.cc.

References DTROBHeaderWord::bunchID(), channelsInCEROS(), channelsInROS(), eventErrorFlag, DTROSTrailerWord::EventWordCount(), dqm::impl::MonitorElement::Fill(), DTROChainCoding::getDDUID(), DTROChainCoding::getROB(), DTROS25Data::getROBHeaders(), DTROS25Data::getROBTrailers(), DTROChainCoding::getROS(), DTROS25Data::getROSDebugs(), DTROS25Data::getROSErrors(), DTROS25Data::getROSHeader(), DTROChainCoding::getROSID(), DTROS25Data::getROSTrailer(), DTROChainCoding::getSCID(), getSCInfo, DTROS25Data::getSCTrailer(), DTROS25Data::getTDCData(), DTROS25Data::getTDCError(), DTROSTrailerWord::l1AFifoOccupancy(), LogTrace, mode, neventsuROS, DTTDCMeasurementWord::PC(), DTROBHeaderWord::robID(), rosBxIdsPerFED, rosHistos, rosL1AIdsPerFED, rosTimeHistos, DTROChainCoding::setDDU(), DTROChainCoding::setROB(), DTROChainCoding::setROS(), summaryHistos, DTROSTrailerWord::TPX(), DTROSHeaderWord::TTCEventCounter(), and DTLocalTriggerTrailerWord::wordCount().

Referenced by analyze().

1117  {
1118  neventsuROS++; // FIXME: implement a counter which makes sense
1119 
1120  LogTrace("DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
1121  << "[DTDataIntegrityTask]: " << neventsuROS << " events analyzed by processROS25" << endl;
1122 
1123  // The ID of the RO board (used to map the histos)
1124  DTROChainCoding code;
1125  code.setDDU(ddu);
1126  code.setROS(ros);
1127 
1128  if (mode == 3 || mode == 1)
1129  return; //Avoid duplication of Info in FEDIntegrity_EvF
1130 
1131  MonitorElement* ROSSummary = summaryHistos["ROSSummary"][code.getDDUID()];
1132 
1133  // Summary of all ROB errors
1134  MonitorElement* ROSError = nullptr;
1135  if (mode <= 2)
1136  ROSError = rosHistos["ROSError"][code.getROSID()];
1137 
1138  if ((mode <= 2) && (!ROSError)) {
1139  LogError("DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
1140  << "Trying to access non existing ME at ROSID " << code.getROSID() << std::endl;
1141  return;
1142  }
1143 
1144  // L1A ids to be checked against FED one
1145  rosL1AIdsPerFED[ddu].insert(data.getROSHeader().TTCEventCounter());
1146 
1147  // ROS errors
1148 
1149  // check for TPX errors
1150  if (data.getROSTrailer().TPX() != 0) {
1151  LogTrace("DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask") << " TXP error en ROS " << code.getROS() << endl;
1152  ROSSummary->Fill(9, code.getROS());
1153  }
1154 
1155  // L1 Buffer almost full (non-critical error!)
1156  if (data.getROSTrailer().l1AFifoOccupancy() > 31) {
1157  ROSSummary->Fill(10, code.getROS());
1158  }
1159 
1160  for (vector<DTROSErrorWord>::const_iterator error_it = data.getROSErrors().begin();
1161  error_it != data.getROSErrors().end();
1162  error_it++) { // Loop over ROS error words
1163 
1164  LogTrace("DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
1165  << " Error in ROS " << code.getROS() << " ROB Id " << (*error_it).robID() << " Error type "
1166  << (*error_it).errorType() << endl;
1167 
1168  // Fill the ROSSummary (1 per FED) histo
1169  ROSSummary->Fill((*error_it).errorType(), code.getROS());
1170  if ((*error_it).errorType() <= 11) { // set error flag
1171  eventErrorFlag = true;
1172  }
1173 
1174  if (mode <= 2) {
1175  // Fill the ROB Summary (1 per ROS) histo
1176  if ((*error_it).robID() != 31) {
1177  ROSError->Fill((*error_it).errorType(), (*error_it).robID());
1178  } else if ((*error_it).errorType() == 4) {
1179  vector<int> channelBins;
1180  channelsInROS((*error_it).cerosID(), channelBins);
1181  vector<int>::const_iterator channelIt = channelBins.begin();
1182  vector<int>::const_iterator channelEnd = channelBins.end();
1183  for (; channelIt != channelEnd; ++channelIt) {
1184  ROSError->Fill(4, (*channelIt));
1185  }
1186  }
1187  }
1188  }
1189 
1190  int ROSDebug_BunchNumber = -1;
1191 
1192  for (vector<DTROSDebugWord>::const_iterator debug_it = data.getROSDebugs().begin();
1193  debug_it != data.getROSDebugs().end();
1194  debug_it++) { // Loop over ROS debug words
1195 
1196  int debugROSSummary = 0;
1197  int debugROSError = 0;
1198  vector<int> debugBins;
1199  bool hasEvIdMis = false;
1200  vector<int> evIdMisBins;
1201 
1202  if ((*debug_it).debugType() == 0) {
1203  ROSDebug_BunchNumber = (*debug_it).debugMessage();
1204  } else if ((*debug_it).debugType() == 1) {
1205  // not used
1206  // ROSDebug_BcntResCntLow = (*debug_it).debugMessage();
1207  } else if ((*debug_it).debugType() == 2) {
1208  // not used
1209  // ROSDebug_BcntResCntHigh = (*debug_it).debugMessage();
1210  } else if ((*debug_it).debugType() == 3) {
1211  if ((*debug_it).dontRead()) {
1212  debugROSSummary = 11;
1213  debugROSError = 8;
1214  if (mode <= 2)
1215  channelsInCEROS((*debug_it).cerosIdCerosStatus(), (*debug_it).dontRead(), debugBins);
1216  }
1217  if ((*debug_it).evIdMis()) {
1218  hasEvIdMis = true;
1219  if (mode <= 2)
1220  channelsInCEROS((*debug_it).cerosIdCerosStatus(), (*debug_it).evIdMis(), evIdMisBins);
1221  }
1222  } else if ((*debug_it).debugType() == 4 && (*debug_it).cerosIdRosStatus()) {
1223  debugROSSummary = 13;
1224  debugROSError = 10;
1225  if (mode <= 2)
1226  channelsInROS((*debug_it).cerosIdRosStatus(), debugBins);
1227  }
1228 
1229  if (debugROSSummary) {
1230  ROSSummary->Fill(debugROSSummary, code.getROS());
1231  if (mode <= 2) {
1232  vector<int>::const_iterator channelIt = debugBins.begin();
1233  vector<int>::const_iterator channelEnd = debugBins.end();
1234  for (; channelIt != channelEnd; ++channelIt) {
1235  ROSError->Fill(debugROSError, (*channelIt));
1236  }
1237  }
1238  }
1239 
1240  if (hasEvIdMis) {
1241  ROSSummary->Fill(12, code.getROS());
1242  if (mode <= 2) {
1243  vector<int>::const_iterator channelIt = evIdMisBins.begin();
1244  vector<int>::const_iterator channelEnd = evIdMisBins.end();
1245  for (; channelIt != channelEnd; ++channelIt) {
1246  ROSError->Fill(9, (*channelIt));
1247  }
1248  }
1249  }
1250  }
1251 
1252  // ROB Group Header
1253  // Check the BX of the ROB headers against the BX of the ROS
1254  for (vector<DTROBHeader>::const_iterator rob_it = data.getROBHeaders().begin(); rob_it != data.getROBHeaders().end();
1255  rob_it++) { // loop over ROB headers
1256 
1257  code.setROB((*rob_it).first);
1258  DTROBHeaderWord robheader = (*rob_it).second;
1259 
1260  rosBxIdsPerFED[ddu].insert(ROSDebug_BunchNumber);
1261 
1262  if (robheader.bunchID() != ROSDebug_BunchNumber) {
1263  // fill ROS Summary plot
1264  ROSSummary->Fill(8, code.getROS());
1265  eventErrorFlag = true;
1266 
1267  // fill ROB Summary plot for that particular ROS
1268  if (mode <= 2)
1269  ROSError->Fill(7, robheader.robID());
1270  }
1271  }
1272 
1273  if (mode < 1) { // produce only when not in HLT or SM
1274  // ROB Trailer
1275  for (vector<DTROBTrailerWord>::const_iterator robt_it = data.getROBTrailers().begin();
1276  robt_it != data.getROBTrailers().end();
1277  robt_it++) { // loop over ROB trailers
1278  float wCount = (*robt_it).wordCount() < 100. ? (*robt_it).wordCount() : 99.9;
1279  rosHistos["ROB_mean"][code.getROSID()]->Fill((*robt_it).robID(), wCount);
1280  }
1281 
1282  // Plot the event length //NOHLT
1283  int rosEventLength = data.getROSTrailer().EventWordCount() * 4;
1284  rosTimeHistos["ROSAvgEventLengthvsLumi"][code.getROSID()]->accumulateValueTimeSlot(rosEventLength);
1285 
1286  if (rosEventLength > 1600)
1287  rosEventLength = 1600;
1288  rosHistos["ROSEventLength"][code.getROSID()]->Fill(rosEventLength);
1289  }
1290 
1291  // TDC Data
1292  for (vector<DTTDCData>::const_iterator tdc_it = data.getTDCData().begin(); tdc_it != data.getTDCData().end();
1293  tdc_it++) { // loop over TDC data
1294 
1295  DTTDCMeasurementWord tdcDatum = (*tdc_it).second;
1296 
1297  if (tdcDatum.PC() != 0) {
1298  LogTrace("DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
1299  << " PC error in ROS " << code.getROS() << " TDC " << (*tdc_it).first << endl;
1300  // fill ROS Summary plot
1301  ROSSummary->Fill(7, code.getROS());
1302 
1303  eventErrorFlag = true;
1304 
1305  // fill ROB Summary plot for that particular ROS
1306  if (mode <= 2)
1307  ROSError->Fill(6, (*tdc_it).first);
1308  }
1309  }
1310 
1311  // TDC Error
1312  for (vector<DTTDCError>::const_iterator tdc_it = data.getTDCError().begin(); tdc_it != data.getTDCError().end();
1313  tdc_it++) { // loop over TDC errors
1314 
1315  code.setROB((*tdc_it).first);
1316 
1317  int tdcError_ROSSummary = 0;
1318  int tdcError_ROSError = 0;
1319  int tdcError_TDCHisto = 0;
1320 
1321  if (((*tdc_it).second).tdcError() & 0x4000) {
1322  LogTrace("DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
1323  << " ROS " << code.getROS() << " ROB " << code.getROB() << " Internal fatal Error 4000 in TDC "
1324  << (*tdc_it).first << endl;
1325 
1326  tdcError_ROSSummary = 14;
1327  tdcError_ROSError = 11;
1328  tdcError_TDCHisto = 0;
1329 
1330  } else if (((*tdc_it).second).tdcError() & 0x0249) {
1331  LogTrace("DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
1332  << " ROS " << code.getROS() << " ROB " << code.getROB() << " TDC FIFO overflow in TDC " << (*tdc_it).first
1333  << endl;
1334 
1335  tdcError_ROSSummary = 15;
1336  tdcError_ROSError = 12;
1337  tdcError_TDCHisto = 1;
1338 
1339  } else if (((*tdc_it).second).tdcError() & 0x0492) {
1340  LogTrace("DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
1341  << " ROS " << code.getROS() << " ROB " << code.getROB() << " TDC L1 buffer overflow in TDC "
1342  << (*tdc_it).first << endl;
1343 
1344  tdcError_ROSSummary = 16;
1345  tdcError_ROSError = 13;
1346  tdcError_TDCHisto = 2;
1347 
1348  } else if (((*tdc_it).second).tdcError() & 0x2000) {
1349  LogTrace("DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
1350  << " ROS " << code.getROS() << " ROB " << code.getROB() << " TDC L1A FIFO overflow in TDC " << (*tdc_it).first
1351  << endl;
1352 
1353  tdcError_ROSSummary = 17;
1354  tdcError_ROSError = 14;
1355  tdcError_TDCHisto = 3;
1356 
1357  } else if (((*tdc_it).second).tdcError() & 0x0924) {
1358  LogTrace("DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
1359  << " ROS " << code.getROS() << " ROB " << code.getROB() << " TDC hit error in TDC " << (*tdc_it).first
1360  << endl;
1361 
1362  tdcError_ROSSummary = 18;
1363  tdcError_ROSError = 15;
1364  tdcError_TDCHisto = 4;
1365 
1366  } else if (((*tdc_it).second).tdcError() & 0x1000) {
1367  LogTrace("DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
1368  << " ROS " << code.getROS() << " ROB " << code.getROB() << " TDC hit rejected in TDC " << (*tdc_it).first
1369  << endl;
1370 
1371  tdcError_ROSSummary = 19;
1372  tdcError_ROSError = 16;
1373  tdcError_TDCHisto = 5;
1374 
1375  } else {
1376  LogWarning("DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
1377  << " TDC error code not known " << ((*tdc_it).second).tdcError() << endl;
1378  }
1379 
1380  ROSSummary->Fill(tdcError_ROSSummary, code.getROS());
1381 
1382  if (tdcError_ROSSummary <= 15) {
1383  eventErrorFlag = true;
1384  }
1385 
1386  if (mode <= 2) {
1387  ROSError->Fill(tdcError_ROSError, (*tdc_it).first);
1388  if (mode <= 1)
1389  rosHistos["TDCError"][code.getROSID()]->Fill(tdcError_TDCHisto + 6 * ((*tdc_it).second).tdcID(),
1390  (*tdc_it).first);
1391  }
1392  }
1393 
1394  // Read SC data
1395  if (mode < 1 && getSCInfo) {
1396  // NumberOf16bitWords counts the # of words + 1 subheader
1397  // the SC includes the SC "private header" and the ROS header and trailer (= NumberOf16bitWords +3)
1398  rosHistos["SCSizeVsROSSize"][code.getSCID()]->Fill(ros, data.getSCTrailer().wordCount());
1399  }
1400 }
std::map< int, std::set< int > > rosBxIdsPerFED
std::map< int, std::set< int > > rosL1AIdsPerFED
int EventWordCount() const
Definition: DTDDUWords.h:249
const std::vector< DTROBHeader > & getROBHeaders() const
Definition: DTControlData.h:59
const std::vector< DTTDCData > & getTDCData() const
Definition: DTControlData.h:62
int PC() const
Definition: DTDDUWords.h:487
int l1AFifoOccupancy() const
Definition: DTDDUWords.h:248
int getROS() const
void channelsInROS(int cerosMask, std::vector< int > &channels)
void Fill(long long x)
const DTLocalTriggerTrailerWord & getSCTrailer() const
Definition: DTControlData.h:67
int getSCID() const
int TTCEventCounter() const
Definition: DTDDUWords.h:213
const std::vector< DTROSDebugWord > & getROSDebugs() const
Definition: DTControlData.h:58
std::map< std::string, std::map< int, MonitorElement * > > summaryHistos
const DTROSTrailerWord & getROSTrailer() const
Definition: DTControlData.h:55
const DTROSHeaderWord & getROSHeader() const
Definition: DTControlData.h:56
int TPX() const
Definition: DTDDUWords.h:247
#define LogTrace(id)
int getDDUID() const
int robID() const
Definition: DTDDUWords.h:353
void setROB(const int &ID)
std::map< std::string, std::map< int, MonitorElement * > > rosHistos
void setROS(const int &ID)
const std::vector< DTROBTrailerWord > & getROBTrailers() const
Definition: DTControlData.h:60
void channelsInCEROS(int cerosId, int chMask, std::vector< int > &channels)
int getROB() const
void setDDU(const int &ID)
need to reset the bits before setting
const std::vector< DTROSErrorWord > & getROSErrors() const
Definition: DTControlData.h:57
std::map< std::string, std::map< int, DTTimeEvolutionHisto * > > rosTimeHistos
const std::vector< DTTDCError > & getTDCError() const
Definition: DTControlData.h:63
int bunchID() const
Definition: DTDDUWords.h:355
int getROSID() const
void DTDataIntegrityTask::processuROS ( DTuROSROSData data,
int  fed,
int  uRos 
)

Definition at line 841 of file DTDataIntegrityTask.cc.

References newFWLiteAna::bin, relativeConstraints::error, fedHistos, FEDIDmin, dqm::impl::MonitorElement::Fill(), HcalObjRepresent::Fill(), RemoveAddSevLevel::flag, DTuROSROSData::getboardId(), DTuROSROSData::geterror(), DTuROSROSData::geterrorROBID(), DTuROSROSData::geterrors(), DTuROSROSData::geterrorTDCID(), DTuROSROSData::getokxflag(), DTuROSROSData::gettrailer(), DTuROSROSData::getuserWord(), plotFactory::keyHisto, MainPageGenerator::link, LogTrace, mode, neventsuROS, SimDataFormats::CaloAnalysis::sc, summaryHistos, TDCError, theDDU(), theROS(), TTSValues, uROSError, uROSEventLength, urosHistos, urosTimeHistos, makeMuonMisalignmentScenario::wheel, and testProducerWithPsetDescEmpty_cfi::x1.

Referenced by analyze().

841  {
842  neventsuROS++; // FIXME: implement a counter which makes sense
843 
844  LogTrace("DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
845  << "[DTDataIntegrityTask]: " << neventsuROS << " events analyzed by processuROS" << endl;
846 
847  if (mode == 3 || mode == 1)
848  return; //Avoid duplication of Info in FEDIntegrity_EvF
849 
850  MonitorElement* uROSSummary = nullptr;
851  uROSSummary = summaryHistos["uROSSummary"][fed];
852 
853  MonitorElement* uROSStatus = nullptr;
854  uROSStatus = fedHistos["uROSStatus"][fed];
855 
856  if (!uROSSummary) {
857  LogError("DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
858  << "Trying to access non existing ME at FED " << fed << std::endl;
859  return;
860  }
861 
862  unsigned int slotMap = (data.getboardId()) & 0xF;
863  if (slotMap == 0)
864  return; //prevention for Simulation empty uROS data
865  int ros = theROS(slotMap, 0); //first sector correspondign to link 0
866  int ddu = theDDU(fed, slotMap, 0, false);
867  int wheel = (ddu - 770) % 5 - 2;
868  MonitorElement* ROSSummary = nullptr;
869  ROSSummary = summaryHistos["ROSSummary"][wheel];
870 
871  // Summary of all Link errors
872  MonitorElement* uROSError0 = nullptr;
873  MonitorElement* uROSError1 = nullptr;
874  MonitorElement* uROSError2 = nullptr;
875 
876  int errorX[5][12] = {{0}}; //5th is notOK flag
877 
878  if (mode <= 2) {
879  if (uRos > 2) { //sectors 1-12
880 
881  uROSError0 = urosHistos[(uROSError)*1000 + (wheel + 2) * 100 + (ros - 1)]; //links 0-23
882  uROSError1 = urosHistos[(uROSError)*1000 + (wheel + 2) * 100 + (ros)]; //links 24-47
883  uROSError2 = urosHistos[(uROSError)*1000 + (wheel + 2) * 100 + (ros + 1)]; //links 48-71
884 
885  if ((!uROSError2) || (!uROSError1) || (!uROSError0)) {
886  LogError("DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
887  << "Trying to access non existing ME at uROS " << uRos << std::endl;
888  return;
889  }
890 
891  // uROS errors
892  for (unsigned int link = 0; link < 72; ++link) {
893  for (unsigned int flag = 0; flag < 5; ++flag) {
894  if ((data.getokxflag(link) >> flag) & 0x1) { // Undefined Flag 1-4 64bits word for each MTP (12 channels)
895  int value = flag;
896  if (flag == 0)
897  value = 5; //move it to the 5th bin
898 
899  if (value > 0) {
900  if (link < 24) {
901  errorX[value - 1][ros - 1] += 1;
902  uROSError0->Fill(value - 1, link); //bins start at 0 despite labelin
903  } else if (link < 48) {
904  errorX[value - 1][ros] += 1;
905  uROSError1->Fill(value - 1, link - 23);
906  } else if (link < 72) {
907  errorX[value - 1][ros + 1] += 1;
908  uROSError2->Fill(value - 1, link - 47);
909  }
910  } //value>0
911  } //flag value
912  } //loop on flags
913  } //loop on links
914  } //uROS>2
915 
916  else { //uRos<3
917 
918  for (unsigned int link = 0; link < 12; ++link) {
919  for (unsigned int flag = 0; flag < 5; ++flag) {
920  if ((data.getokxflag(link) >> flag) & 0x1) { // Undefined Flag 1-4 64bits word for each MTP (12 channels)
921  int value = flag;
922  int sc = 24;
923  if (flag == 0)
924  value = 5; //move it to the 5th bin
925 
926  if (value > 0) {
927  unsigned int keyHisto = (uROSError)*1000 + (wheel + 2) * 100 + link; //ros -1 = link in this case
928  uROSError0 = urosHistos[keyHisto];
929  if (!uROSError0) {
930  LogError("DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
931  << "Trying to access non existing ME at uROS " << uRos << std::endl;
932  return;
933  }
934  errorX[value - 1][link] += 1; // ros-1=link in this case
935  uROSError0->Fill(value - 1, sc); //bins start at 0 despite labeling, this is the old SC
936  }
937  } //flag values
938  } //loop on flags
939  } //loop on links
940  } //else uRos<3
941 
942  } //mode<=2
943 
944  // Fill the ROSSummary (1 per wheel) histo
945  for (unsigned int iros = 0; iros < 12; ++iros) {
946  for (unsigned int bin = 0; bin < 5; ++bin) {
947  if (errorX[bin][iros] != 0)
948  ROSSummary->Fill(bin, iros + 1); //bins start at 1
949  }
950  }
951 
952  // Global Errors for uROS
953  for (unsigned int flag = 4; flag < 16; ++flag) {
954  if ((data.getuserWord() >> flag) & 0x1) {
955  uROSSummary->Fill(flag - 4, uRos);
956  uROSStatus->Fill(flag - 4, uRos); //duplicated info?
957  }
958  }
959 
960  // ROS error
961  for (unsigned int icounter = 0; icounter < data.geterrors().size(); ++icounter) {
962  int link = data.geterrorROBID(icounter);
963  int tdc = data.geterrorTDCID(icounter);
964  int error = data.geterror(icounter);
965  int tdcError_ROSSummary = 0;
966  int tdcError_ROSError = 0;
967  int tdcError_TDCHisto = 0;
968 
969  if (error & 0x4000) {
970  LogTrace("DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
971  << " ROS " << uRos << " ROB " << link << " Internal fatal Error 4000 in TDC " << error << endl;
972 
973  tdcError_ROSSummary = 5;
974  tdcError_ROSError = 5;
975  tdcError_TDCHisto = 0;
976 
977  } else if (error & 0x0249) {
978  LogTrace("DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
979  << " ROS " << uRos << " ROB " << link << " TDC FIFO overflow in TDC " << error << endl;
980 
981  tdcError_ROSSummary = 6;
982  tdcError_ROSError = 6;
983  tdcError_TDCHisto = 1;
984 
985  } else if (error & 0x0492) {
986  LogTrace("DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
987  << " ROS " << uRos << " ROB " << link << " TDC L1 buffer overflow in TDC " << error << endl;
988 
989  tdcError_ROSSummary = 7;
990  tdcError_ROSError = 7;
991  tdcError_TDCHisto = 2;
992 
993  } else if (error & 0x2000) {
994  LogTrace("DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
995  << " ROS " << uRos << " ROB " << link << " TDC L1A FIFO overflow in TDC " << error << endl;
996 
997  tdcError_ROSSummary = 8;
998  tdcError_ROSError = 8;
999  tdcError_TDCHisto = 3;
1000 
1001  } else if (error & 0x0924) {
1002  LogTrace("DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
1003  << " uROS " << uRos << " ROB " << link << " TDC hit error in TDC " << error << endl;
1004 
1005  tdcError_ROSSummary = 9;
1006  tdcError_ROSError = 9;
1007  tdcError_TDCHisto = 4;
1008 
1009  } else if (error & 0x1000) {
1010  LogTrace("DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
1011  << " uROS " << uRos << " ROB " << link << " TDC hit rejected in TDC " << error << endl;
1012 
1013  tdcError_ROSSummary = 10;
1014  tdcError_ROSError = 10;
1015  tdcError_TDCHisto = 5;
1016 
1017  } else {
1018  LogWarning("DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
1019  << " TDC error code not known " << error << endl;
1020  }
1021 
1022  if (uRos < 3) {
1023  ROSSummary->Fill(tdcError_ROSSummary, link + 1); //link 0 = ROS 1
1024  int sc = 24;
1025  if (mode <= 2) {
1026  urosHistos[(uROSError)*1000 + (wheel + 2) * 100 + (link)]->Fill(tdcError_ROSError, sc);
1027  if (mode <= 1)
1028  urosHistos[(TDCError)*1000 + (wheel + 2) * 100 + (link)]->Fill(tdcError_TDCHisto + 6 * (tdc - 1),
1029  sc); // ros-1=link in this case
1030  } //mode<=2
1031  } //uRos<3
1032  else { //uRos>2
1033  if (link < 24)
1034  ROSSummary->Fill(tdcError_ROSSummary, ros);
1035  else if (link < 48)
1036  ROSSummary->Fill(tdcError_ROSSummary, ros + 1);
1037  else if (link < 72)
1038  ROSSummary->Fill(tdcError_ROSSummary, ros + 2);
1039 
1040  if (mode <= 2) {
1041  if (link < 24)
1042  uROSError0->Fill(tdcError_ROSError, link);
1043  else if (link < 48)
1044  uROSError1->Fill(tdcError_ROSError, link - 23);
1045  else if (link < 72)
1046  uROSError2->Fill(tdcError_ROSError, link - 47);
1047 
1048  if (mode <= 1) {
1049  if (link < 24)
1050  urosHistos[(TDCError)*1000 + (wheel + 2) * 100 + (ros - 1)]->Fill(tdcError_TDCHisto + 6 * (tdc - 1), link);
1051  else if (link < 48)
1052  urosHistos[(TDCError)*1000 + (wheel + 2) * 100 + (ros)]->Fill(tdcError_TDCHisto + 6 * (tdc - 1), link - 23);
1053  else if (link < 72)
1054  urosHistos[(TDCError)*1000 + (wheel + 2) * 100 + (ros + 1)]->Fill(tdcError_TDCHisto + 6 * (tdc - 1),
1055  link - 47);
1056 
1057  } //mode<=1
1058  } //mode<=2
1059  } //uROS>2
1060  } //loop on errors
1061 
1062  // 1D histograms for TTS values per uROS
1063  int ttsCodeValue = -1;
1064 
1065  int value = (data.getuserWord() & 0xF);
1066  switch (value) {
1067  case 0: { //disconnected
1068  ttsCodeValue = 0;
1069  break;
1070  }
1071  case 1: { //warning overflow
1072  ttsCodeValue = 1;
1073  break;
1074  }
1075  case 2: { //out of sinch
1076  ttsCodeValue = 2;
1077  break;
1078  }
1079  case 4: { //busy
1080  ttsCodeValue = 3;
1081  break;
1082  }
1083  case 8: { //ready
1084  ttsCodeValue = 4;
1085  break;
1086  }
1087  case 12: { //error
1088  ttsCodeValue = 5;
1089  break;
1090  }
1091  case 15: { //disconnected
1092  ttsCodeValue = 6;
1093  break;
1094  }
1095  default: {
1096  LogError("DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityTask")
1097  << "[DTDataIntegrityTask] FED User control: wrong TTS value " << value << " in FED " << fed << " uROS "
1098  << uRos << endl; //FIXME
1099  ttsCodeValue = 7;
1100  }
1101  }
1102  if (mode < 1) {
1103  urosHistos[TTSValues * 1000 + (fed - FEDIDmin) * 100 + (uRos - 1)]->Fill(ttsCodeValue);
1104 
1105  // Plot the event length //NOHLT
1106  int uRosEventLength = (data.gettrailer() & 0xFFFFF) * 8;
1107  urosTimeHistos[(fed - FEDIDmin) * 100 + (uRos - 1)]->accumulateValueTimeSlot(uRosEventLength);
1108 
1109  if (uRosEventLength > 5000)
1110  uRosEventLength = 5000;
1111  urosHistos[uROSEventLength * 1000 + (fed - FEDIDmin) * 100 + (uRos - 1)]->Fill(uRosEventLength);
1112  }
1113 }
std::vector< int > geterrors() const
int geterrorTDCID(int i) const
void Fill(long long x)
std::map< std::string, std::map< int, MonitorElement * > > summaryHistos
int theROS(int slot, int link)
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
std::map< unsigned int, MonitorElement * > urosHistos
Definition: value.py:1
int getokxflag(int i) const
std::map< std::string, std::map< int, MonitorElement * > > fedHistos
#define LogTrace(id)
int getuserWord() const
int getboardId() const
long gettrailer() const
int geterror(int i) const
int geterrorROBID(int i) const
std::map< unsigned int, DTTimeEvolutionHisto * > urosTimeHistos
int theDDU(int crate, int slot, int link, bool tenDDU)
int DTDataIntegrityTask::theDDU ( int  crate,
int  slot,
int  link,
bool  tenDDU 
)
private

Definition at line 1937 of file DTDataIntegrityTask.cc.

References FEDNumbering::MAXDTUROSFEDID, FEDNumbering::MINDTUROSFEDID, and theROS().

Referenced by processuROS().

1937  {
1938  int ros = theROS(slot, link);
1939 
1940  int ddu = 772;
1941  //if (crate == 1368) { ddu = 775; }
1942  //Needed just in case this FED should be used due to fibers length
1943 
1944  if (crate == FEDNumbering::MINDTUROSFEDID) {
1945  if (slot < 7)
1946  ddu = 770;
1947  else
1948  ddu = 771;
1949  }
1950 
1951  if (crate == (FEDNumbering::MINDTUROSFEDID + 1)) {
1952  ddu = 772;
1953  }
1954 
1955  if (crate == FEDNumbering::MAXDTUROSFEDID) {
1956  if (slot < 7)
1957  ddu = 773;
1958  else
1959  ddu = 774;
1960  }
1961 
1962  if (ros > 6 && tenDDU && ddu < 775)
1963  ddu += 5;
1964 
1965  return ddu;
1966 }
int theROS(int slot, int link)
int DTDataIntegrityTask::theROS ( int  slot,
int  link 
)
private

Definition at line 1968 of file DTDataIntegrityTask.cc.

Referenced by processuROS(), and theDDU().

1968  {
1969  if (slot % 6 == 5)
1970  return link + 1;
1971 
1972  int ros = (link / 24) + 3 * (slot % 6) - 2;
1973  return ros;
1974 }
void DTDataIntegrityTask::TimeHistos ( DQMStore::IBooker ,
std::string  histoType 
)
std::string DTDataIntegrityTask::topFolder ( bool  isFEDIntegrity) const
private

Definition at line 1776 of file DTDataIntegrityTask.cc.

References fedIntegrityFolder, printsummarytable::folder, and mode.

Referenced by bookHistos(), bookHistosROS(), and bookHistosuROS().

1776  {
1777  string folder = isFEDIntegrity ? fedIntegrityFolder : "DT/00-DataIntegrity/";
1778 
1779  if (mode == 0 || mode == 2)
1780  folder = "DT/00-DataIntegrity/"; //Move everything from FEDIntegrity except for SM and HLT modes
1781 
1782  return folder;
1783 }

Member Data Documentation

bool DTDataIntegrityTask::checkUros
private
DTROChainCoding DTDataIntegrityTask::coding
private

Definition at line 100 of file DTDataIntegrityTask.h.

edm::EDGetTokenT<DTDDUCollection> DTDataIntegrityTask::dduToken
private

Definition at line 172 of file DTDataIntegrityTask.h.

Referenced by analyze(), and DTDataIntegrityTask().

bool DTDataIntegrityTask::doTimeHisto
private

Definition at line 92 of file DTDataIntegrityTask.h.

bool DTDataIntegrityTask::eventErrorFlag
private

Definition at line 161 of file DTDataIntegrityTask.h.

Referenced by analyze(), eventHasErrors(), and processROS25().

std::set<int> DTDataIntegrityTask::fedBXIds
private

Definition at line 164 of file DTDataIntegrityTask.h.

Referenced by analyze(), and processFED().

std::map<std::string, std::map<int, MonitorElement*> > DTDataIntegrityTask::fedHistos
private

Definition at line 105 of file DTDataIntegrityTask.h.

Referenced by bookHistos(), processFED(), and processuROS().

int DTDataIntegrityTask::FEDIDmax
private
int DTDataIntegrityTask::FEDIDmin
private
std::string DTDataIntegrityTask::fedIntegrityFolder
private

Definition at line 169 of file DTDataIntegrityTask.h.

Referenced by DTDataIntegrityTask(), and topFolder().

std::map<std::string, std::map<int, DTTimeEvolutionHisto*> > DTDataIntegrityTask::fedTimeHistos
private

Definition at line 129 of file DTDataIntegrityTask.h.

Referenced by bookHistos(), endLuminosityBlock(), and processFED().

edm::EDGetTokenT<DTuROSFEDDataCollection> DTDataIntegrityTask::fedToken
private

Definition at line 176 of file DTDataIntegrityTask.h.

Referenced by analyze(), and DTDataIntegrityTask().

bool DTDataIntegrityTask::getSCInfo
private

Definition at line 94 of file DTDataIntegrityTask.h.

Referenced by bookHistosROS25(), DTDataIntegrityTask(), and processROS25().

MonitorElement* DTDataIntegrityTask::hCorruptionSummary
private

Definition at line 123 of file DTDataIntegrityTask.h.

Referenced by bookHistos(), and processFED().

MonitorElement* DTDataIntegrityTask::hFEDEntry
private

Definition at line 120 of file DTDataIntegrityTask.h.

Referenced by bookHistos(), fedEntry(), and processFED().

MonitorElement* DTDataIntegrityTask::hFEDFatal
private

Definition at line 121 of file DTDataIntegrityTask.h.

Referenced by bookHistos(), fedFatal(), and processFED().

MonitorElement* DTDataIntegrityTask::hFEDNonFatal
private

Definition at line 122 of file DTDataIntegrityTask.h.

Referenced by bookHistos(), and fedNonFatal().

MonitorElement* DTDataIntegrityTask::hTTSSummary
private

Definition at line 126 of file DTDataIntegrityTask.h.

Referenced by bookHistos(), and processFED().

std::multimap<std::string, std::string>::iterator DTDataIntegrityTask::it
private

Definition at line 83 of file DTDataIntegrityTask.h.

double DTDataIntegrityTask::link_max[72]
private

Definition at line 143 of file DTDataIntegrityTask.h.

int DTDataIntegrityTask::mode
private
int DTDataIntegrityTask::myPrevEv
private

Definition at line 152 of file DTDataIntegrityTask.h.

int DTDataIntegrityTask::myPrevFifoVal[7]
private

Definition at line 157 of file DTDataIntegrityTask.h.

int DTDataIntegrityTask::myPrevRosVal
private

Definition at line 156 of file DTDataIntegrityTask.h.

int DTDataIntegrityTask::myPrevTtsVal
private

Definition at line 155 of file DTDataIntegrityTask.h.

std::multimap<std::string, std::string> DTDataIntegrityTask::names
private

Definition at line 82 of file DTDataIntegrityTask.h.

Referenced by bookHistos().

MonitorElement* DTDataIntegrityTask::nEventMonitor
private

Definition at line 103 of file DTDataIntegrityTask.h.

Referenced by analyze(), and bookHistos().

int DTDataIntegrityTask::nevents
private

Definition at line 98 of file DTDataIntegrityTask.h.

Referenced by analyze().

int DTDataIntegrityTask::neventsFED
private

Definition at line 137 of file DTDataIntegrityTask.h.

Referenced by DTDataIntegrityTask(), processFED(), and ~DTDataIntegrityTask().

int DTDataIntegrityTask::nEventsLS
private

Definition at line 135 of file DTDataIntegrityTask.h.

Referenced by analyze(), beginLuminosityBlock(), and endLuminosityBlock().

int DTDataIntegrityTask::neventsuROS
private

Definition at line 138 of file DTDataIntegrityTask.h.

Referenced by DTDataIntegrityTask(), processROS25(), and processuROS().

const int DTDataIntegrityTask::NuROS = 12
private

Definition at line 149 of file DTDataIntegrityTask.h.

Referenced by bookHistograms().

std::string DTDataIntegrityTask::outputFile
private
edm::ParameterSet DTDataIntegrityTask::parameters
private
double DTDataIntegrityTask::rob_max[25]
private

Definition at line 142 of file DTDataIntegrityTask.h.

std::map<std::string, std::map<int, MonitorElement*> > DTDataIntegrityTask::robHistos
private

Definition at line 113 of file DTDataIntegrityTask.h.

edm::EDGetTokenT<DTROS25Collection> DTDataIntegrityTask::ros25Token
private

Definition at line 174 of file DTDataIntegrityTask.h.

Referenced by analyze(), and DTDataIntegrityTask().

std::map<int, std::set<int> > DTDataIntegrityTask::rosBxIdsPerFED
private

Definition at line 163 of file DTDataIntegrityTask.h.

Referenced by analyze(), processFED(), and processROS25().

std::map<std::string, std::map<int, MonitorElement*> > DTDataIntegrityTask::rosHistos
private

Definition at line 109 of file DTDataIntegrityTask.h.

Referenced by bookHistos(), and processROS25().

std::map<int, std::set<int> > DTDataIntegrityTask::rosL1AIdsPerFED
private

Definition at line 165 of file DTDataIntegrityTask.h.

Referenced by analyze(), processFED(), and processROS25().

std::map<std::string, std::map<int, DTTimeEvolutionHisto*> > DTDataIntegrityTask::rosTimeHistos
private

Definition at line 130 of file DTDataIntegrityTask.h.

Referenced by bookHistos(), endLuminosityBlock(), and processROS25().

std::map<std::string, std::map<int, MonitorElement*> > DTDataIntegrityTask::summaryHistos
private

Definition at line 107 of file DTDataIntegrityTask.h.

Referenced by bookHistos(), processROS25(), and processuROS().

float DTDataIntegrityTask::trigger_counter
private

Definition at line 140 of file DTDataIntegrityTask.h.

std::map<unsigned int, MonitorElement*> DTDataIntegrityTask::urosHistos
private

Definition at line 111 of file DTDataIntegrityTask.h.

Referenced by bookHistosROS(), bookHistosuROS(), and processuROS().

std::map<unsigned int, DTTimeEvolutionHisto*> DTDataIntegrityTask::urosTimeHistos
private

Definition at line 132 of file DTDataIntegrityTask.h.

Referenced by bookHistosuROS(), endLuminosityBlock(), and processuROS().