Commit 58856081 authored by Tim Martin's avatar Tim Martin
Browse files

Revert "Merge branch '21.1-l1topo-mon-atr-17089' into '21.1'"

This reverts merge request !5077

Former-commit-id: 66230dfe
parent 6dfe5b7d
......@@ -46,6 +46,31 @@
#include <sstream>
#include <string>
// To be moved to L1TopoRDO Helpers.cxx
namespace L1Topo{
const std::string formatVecHex8(const std::vector<uint32_t>& vec)
{
std::ostringstream s;
s << "[ ";
for (auto elem: vec){
s << std::hex << std::showbase << std::setfill('0') << std::setw(10)
<< elem << " " << std::dec << std::noshowbase;
}
s << "]";
return s.str();
}
}
namespace L1Topo{
const std::string formatHex1(const uint32_t word)
{
std::ostringstream s;
s << std::hex << std::showbase << std::setfill('0') << std::setw(3)
<< word << std::dec << std::noshowbase;
return s.str();
}
}
TrigL1TopoROBMonitor::TrigL1TopoROBMonitor(const std::string& name, ISvcLocator* pSvcLocator) :
AthAlgorithm(name, pSvcLocator),
m_robDataProviderSvc( "ROBDataProviderSvc", name ),
......
......@@ -25,11 +25,7 @@ atlas_depends_on_subdirs( PUBLIC
Trigger/TrigConfiguration/TrigConfL1Data
Trigger/TrigEvent/TrigNavigation
Trigger/TrigEvent/TrigSteeringEvent
Trigger/TrigT1/TrigT1Result
Trigger/TrigT1/L1Topo/L1TopoConfig
Trigger/TrigT1/L1Topo/L1TopoRDO
Trigger/TrigMonitoring/TrigMonitorBase
Trigger/TrigSteer/TrigSteering )
Trigger/TrigT1/TrigT1Result )
# External dependencies:
find_package( Boost COMPONENTS filesystem thread system )
......@@ -41,7 +37,7 @@ atlas_add_component( TrigGenericAlgs
src/*.cxx
src/components/*.cxx
INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${TDAQ-COMMON_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
LINK_LIBRARIES ${Boost_LIBRARIES} ${TDAQ-COMMON_LIBRARIES} ${CLHEP_LIBRARIES} xAODTrigL1Calo xAODTrigMuon xAODTrigger TrigL2MuonSALib TrigCaloEvent TrigMuonEvent TrigInterfacesLib TrigT1Interfaces AthenaKernel IRegionSelector ByteStreamCnvSvcBaseLib GaudiKernel TrigConfL1Data TrigNavigationLib TrigSteeringEvent TrigT1Result L1TopoConfig L1TopoRDO TrigMonitorBase TrigSteering )
LINK_LIBRARIES ${Boost_LIBRARIES} ${TDAQ-COMMON_LIBRARIES} ${CLHEP_LIBRARIES} xAODTrigL1Calo xAODTrigMuon xAODTrigger TrigL2MuonSALib TrigCaloEvent TrigMuonEvent TrigInterfacesLib TrigT1Interfaces AthenaKernel IRegionSelector ByteStreamCnvSvcBaseLib GaudiKernel TrigConfL1Data TrigNavigationLib TrigSteeringEvent TrigT1Result )
# Install files from the package:
atlas_install_headers( TrigGenericAlgs )
......
# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
from TrigGenericAlgs.TrigGenericAlgsConf import OverlapRemoval, MergeTopoStarts, L1CorrelationAlgo, DetectorTimingAlgo, AcceptL1TopoMonitor
from TrigGenericAlgs.TrigGenericAlgsConf import OverlapRemoval, MergeTopoStarts, L1CorrelationAlgo, DetectorTimingAlgo
from TrigMonitorBase.TrigGenericMonitoringToolConfig import defineHistogram, TrigGenericMonitoringToolConfig
class OverlapRemovalConfig(OverlapRemoval):
......@@ -38,7 +38,3 @@ class DetectorTimingAlgoConfig(DetectorTimingAlgo):
from TrigGenericAlgs.TrigGenericAlgsMonitoring import DetectorTimingAlgoMonitoring
validationMon = DetectorTimingAlgoMonitoring()
self.AthenaMonTools = [ validationMon ]
class AcceptL1TopoMonitorConfig(AcceptL1TopoMonitor):
def __init__(self, name="AcceptL1TopoMonitorDefault", **kwargs):
super(AcceptL1TopoMonitorConfig , self ).__init__(name)
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
#ifndef TRIGGENERICALGS_ACCEPTL1TOPOMONITOR_H
#define TRIGGENERICALGS_ACCEPTL1TOPOMONITOR_H 1
/**
* @brief Algorithm to monitor L1Topo transmission and simulation errors
* @author Davide Gerbaudo
* @author Simon George
*
* This algorithm fetches L1Topo data from different sources, and
* performs comparisons trying to detect errors.
* Problematic events are accepted and written to a debug stream.
* The input collections are read in from:
* - ROI path: ROIB::RoIBResult. Read out full L1Topo RDO (TOBs, CRC,
* trigger+overflow bits) every event, w/out zero suppression.
* - DAQ path: L1TopoRDOCollection. Read out zero-suppressed TOBs and
* trigger bits every N events.
* - Real-time path to CTP: CTP_RDO. Read out trigger bits from the
* TIP bus of the CTP. Note that these bits are OR'ed with the
* overflow ones.
* - Simulation: LVL1::FrontPanelCTP. Trigger and overflow bits from
* L1TopoSimulation.
*
* Configurable flags (Accept*Error, Accept*Difference) are used to
* toggle which events are accepted.
*
* The reasons for accepting an event are stored in the output as a
* TrigComposite for offline debugging.
*
* $Id: $
*/
#include "TrigInterfaces/AllTEAlgo.h"
#include "GaudiKernel/HistoProperty.h"
#include <vector>
#include <map>
class ITHistSvc;
class IROBDataProviderSvc;
class ITrigROBDataProviderSvc;
class TH1F; /// for monitoring purposes
class TH2F; /// for monitoring purposes
class TProfile;/// for monitoring purposes
namespace L1Topo {
class Header;
class L1TopoTOB;
}
namespace HLT {
class IScaler;
}
namespace TrigConf {
class IL1TopoConfigSvc;
}
class AcceptL1TopoMonitor : public HLT::AllTEAlgo {
public:
AcceptL1TopoMonitor(const std::string& name, ISvcLocator* pSvcLocator);
HLT::ErrorCode hltInitialize();
HLT::ErrorCode hltExecute(std::vector<HLT::TEVec>&, unsigned int outputTeType);
HLT::ErrorCode hltFinalize();
HLT::ErrorCode hltBeginRun();
HLT::ErrorCode hltEndRun();
private:
static const unsigned int m_nTopoCTPOutputs = 128; //! Number of CTP outputs, used for histogram ranges and loops
/**
@brief Monitoring with converters
Retrieve ROIB, DAQ, and compare them.
*/
StatusCode doCnvMon(bool);
/**
@brief monitorROBs for ROIB and DAQ inputs
*/
StatusCode doRawMon(bool);
/**
@brief compare simulated trigger bits against the ones from ROIB
*/
StatusCode doSimMon(bool);
/**
@brief compare simulated trigger bits against the ones from ROIB
*/
StatusCode doSimDaq(bool);
/**
@brief compare simulated trigger bits against the ones from DAQ
*/
StatusCode doOverflowSimMon();
/**
@brief Monitor ROB fragments: word types and payload size
*/
void monitorROBs(const std::vector<uint32_t>&, bool);
/**
@brief Monitor L1Topo block info from ROIB: header and fiber status
*/
void monitorBlock(uint32_t sourceID, L1Topo::Header& header, std::vector<uint32_t>& vFibreSizes, std::vector<uint32_t>& vFibreStatus, std::vector<L1Topo::L1TopoTOB>& daqTobs);
bool bookAndRegisterHist(ServiceHandle<ITHistSvc>&, TH1F*& , const Histo1DProperty& prop, std::string extraName, std::string extraTitle);
bool bookAndRegisterHist(ServiceHandle<ITHistSvc>&, TH1F*& , std::string hName, std::string hTitle, int bins, float lowEdge, float highEdge);
/**
@brief compare two bitsets and histogram the differences
return true if the same, otherwise false
*/
bool compBitSets(std::string leftLabel, std::string rightLabel,
const std::bitset<m_nTopoCTPOutputs>& left,
const std::bitset<m_nTopoCTPOutputs>& right,
TH1F*& hist);
/**
@brief increment the counters for each error type
*/
void incrementErrorCounters();
ServiceHandle<IROBDataProviderSvc> m_robDataProviderSvc;
ServiceHandle<TrigConf::IL1TopoConfigSvc> m_l1topoConfigSvc;
BooleanProperty m_doRawMon;
BooleanProperty m_doCnvMon;
BooleanProperty m_doSimMon;
BooleanProperty m_doSimDaq;
UnsignedIntegerArrayProperty m_vDAQROBIDs;
UnsignedIntegerArrayProperty m_vROIROBIDs;
UnsignedIntegerProperty m_prescaleForDAQROBAccess;
StringProperty m_simTopoCTPLocation;
StringProperty m_simTopoOverflowCTPLocation;
StringProperty m_HltResultName;
HLT::IScaler* m_scaler; //! prescale decision tool
BooleanProperty m_useDetMask;
std::map<unsigned int,unsigned int> m_allSIDLabelsToInts;
//Histo1DProperty m_histPropNoBins; // obsolete?
TH1F* m_histSIDsViaConverters;
TH1F* m_histSIDsDirectFromROBs;
TH1F* m_histCTPSignalPartFromROIConv;
TH1F* m_histOverflowBitsFromROIConv;
TH1F* m_histTriggerBitsFromROIConv;
TH1F* m_histPayloadCRCFromDAQConv;
TH1F* m_histFibreStatusFlagsFromDAQConv;
TH1F* m_histTOBCountsFromROIROB;
TH1F* m_histTOBCountsFromDAQROB;
TH1F* m_histPayloadSizeDAQROB;
TH1F* m_histPayloadSizeROIROB;
TH1F* m_histBCNsFromDAQConv;
TH1F* m_histTopoSimHdwStatComparison;
TH1F* m_histTopoSimHdwEventComparison;
TH1F* m_histTopoSimHdwEventOverflowComparison;
TH1F* m_histTopoCtpSimHdwEventComparison;
TH1F* m_histTopoCtpHdwEventComparison;
TH1F* m_histTopoDaqRobEventComparison;
TH1F* m_histDaqRobCtpEventComparison;
TH1F* m_histTopoSimResult;
TH1F* m_histTopoHdwResult;
TH1F* m_histTopoSimNotHdwResult;
TH1F* m_histTopoHdwNotSimResult;
TH1F* m_histTopoSimOverflow;
TH1F* m_histTopoHdwOverflow;
TH1F* m_histTopoSimNotHdwOverflow;
TH1F* m_histTopoHdwNotSimOverflow;
TH1F* m_histTopoProblems;
TH1F* m_histInputLinkCRCfromROIConv;
TH1F* m_histTopoSimOverfl;
TH1F* m_histTopoHdwOverfl;
TH1F* m_histTopoDaqRobSimResult;
TH1F* m_histTopoDaqRobHdwResult;
TH1F* m_histTopoDaqRobSimNotHdwResult;
TH1F* m_histTopoDaqRobHdwNotSimResult;
std::bitset<m_nTopoCTPOutputs> m_triggerBits; //! trigger bits sent to CTP
std::bitset<m_nTopoCTPOutputs> m_overflowBits; //! overflow bits corresponding to CTP output
std::bitset<m_nTopoCTPOutputs> m_topoSimResult; //! simulation of CTP output
std::bitset<m_nTopoCTPOutputs> m_topoSimOverfl; //! simulation of overflow bits
std::bitset<m_nTopoCTPOutputs> m_topoCtpResult; //! actual hardware CTP output
std::bitset<m_nTopoCTPOutputs> m_triggerBitsDaqRob; //! trigger bits for BC0 from the DAQ ROB
std::bitset<m_nTopoCTPOutputs> m_overflowBitsDaqRob; //! overflow bits for BC0 from the DAQ ROB
bool m_setTopoSimResult; //! keep track of whether this event's sim results had been stored
bool m_firstEvent; //! used to toggle the ATH_MSG_INFO only on the first event
bool m_acceptThisEvent; //! whether this event had errors and it should be accepted
bool m_hasGenericRoiError;
bool m_hasGenericDaqError;
bool m_hasCrcTobError;
bool m_hasCrcFibreError;
bool m_hasCrcDaqError;
bool m_hasRoibDaqDifference;
bool m_hasRoibCtpDifference;
bool m_hasDaqCtpDifference;
bool m_acceptGenericRoiError;
bool m_acceptGenericDaqError;
bool m_acceptCrcTobError;
bool m_acceptCrcFibreError;
bool m_acceptCrcDaqError;
bool m_acceptRoibDaqDifference;
bool m_acceptRoibCtpDifference;
bool m_acceptDaqCtpDifference;
uint32_t m_counterGenericRoiError;
uint32_t m_counterGenericDaqError;
uint32_t m_counterCrcTobError;
uint32_t m_counterCrcFibreError;
uint32_t m_counterCrcDaqError;
uint32_t m_counterRoibDaqDifference;
uint32_t m_counterRoibCtpDifference;
uint32_t m_counterDaqCtpDifference;
enum class Problems {
ROI_NO_RDO=0,
ROI_CNV_ERR,
ROI_PAYLOAD_EMPTY,
ROI_BAD_TOB,
DAQ_NO_RDO,
DAQ_COLL_EMPTY,
DAQ_CNV_ERR,
DAQ_PAYLOAD_EMPTY,
DAQ_BAD_TOB,
FIBRE_OVERFLOW,
FIBRE_CRC
}; //! used to assign an integer ID and histogram bin to various types of problem that arise and should be reported.
const std::vector<std::string> m_problems = {
"ROI no RDO",
"ROI converter error",
"ROI payload empty",
"ROI invalid TOB type",
"DAQ no RDO",
"DAQ collection empty",
"DAQ converter error",
"DAQ payload empty",
"DAQ invalid TOB type",
"Fibre overflow",
"Fibre CRC"
}; //! bin labels for problem histograms
};
#endif // TRIGGENERICALGS
......@@ -16,7 +16,6 @@
#include "../AcceptAnyInput.h"
#include "../TrigRoiUpdater.h"
#include "../MergeTopoStarts.h"
#include "../AcceptL1TopoMonitor.h"
using namespace PESA;
......@@ -38,7 +37,6 @@ DECLARE_ALGORITHM_FACTORY( AcceptAnyInput )
DECLARE_ALGORITHM_FACTORY( SeededSuperRoiAllTEAlgo )
DECLARE_ALGORITHM_FACTORY( TrigRoiUpdater )
DECLARE_ALGORITHM_FACTORY( MergeTopoStarts )
DECLARE_ALGORITHM_FACTORY( AcceptL1TopoMonitor )
DECLARE_FACTORY_ENTRIES(TrigGenericAlgs) {
......@@ -59,5 +57,4 @@ DECLARE_FACTORY_ENTRIES(TrigGenericAlgs) {
DECLARE_ALGORITHM( SeededSuperRoiAllTEAlgo )
DECLARE_ALGORITHM( TrigRoiUpdater )
DECLARE_ALGORITHM( MergeTopoStarts )
DECLARE_ALGORITHM( AcceptL1TopoMonitor )
}
......@@ -33,8 +33,6 @@ namespace L1Topo {
std::string formatHex8(uint32_t word);
//! Helper function to format a 32-bit integer as a 4-digit hex number for printing
std::string formatHex4(uint32_t word);
//! Helper function to format a vector of 32-bit integers as 8-digit hex numbers for printing
const std::string formatVecHex8(const std::vector<uint32_t>& vec);
//! OUT OF DATE DO NOT USE Helper to calculate the index needed to pack trigger bits into the full 128-bit decision. See 4-bit part of L1Topo TOB definition in https://twiki.cern.ch/twiki/pub/Atlas/L1CaloUpgrade/ROD_data_format_v1.0.4.xlsx
unsigned int triggerBitIndex(uint32_t moduleId, L1Topo::L1TopoTOB);
......
......@@ -119,18 +119,6 @@ namespace L1Topo{
}
const std::string formatVecHex8(const std::vector<uint32_t>& vec)
{
std::ostringstream s;
s<<"[ ";
for (auto elem: vec){
s<<std::hex<<std::showbase<<std::setfill('0')<<std::setw(10)
<<elem<<" "<<std::dec<<std::noshowbase;
}
s<<"]";
return s.str();
}
// this is out of date and should not be used
unsigned int triggerBitIndex(uint32_t moduleId, L1Topo::L1TopoTOB c){
uint32_t module = (moduleId >>4) & 0x1;
......
......@@ -2,8 +2,6 @@
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
#pragma GCC diagnostic ignored "-Woverflow" // to avoid warning from test14
#undef NDEBUG
#include "L1TopoRDO/L1TopoRDO.h"
#include "L1TopoRDO/L1TopoRDOCollection.h"
......@@ -327,7 +325,7 @@ void test14()
std::cout << c << std::endl;
assert (c.module()==1 && c.link()==0 && c.isDAQ());
L1Topo::ModuleID d(0x00910091); // expect build warning due to implicit truncation to 16 bits; disabled with pragma on first line
L1Topo::ModuleID d(0x00910091); // expect build warning due to implicit truncation to 16 bits
std::cout << d << std::endl;
assert (d.module()==1 && d.link()==1 && d.isROI());
......
......@@ -46,8 +46,6 @@ class L2EFChain_Monitoring(L2EFChainDef):
self.setupCSCMonChain()
elif ('l1calooverflow' in self.monType):
self.setupL1CaloOverflow()
elif ('l1topodebug' in self.monType):
self.setupL1TopoTransmission()
else:
log.error("No suitable configuration for chain %s found!" % self.chainName)
......@@ -224,14 +222,7 @@ class L2EFChain_Monitoring(L2EFChainDef):
CaloOverflowMonitor = TrigL1CaloOverflow("TrigL1CaloOverflow")
self.L2sequenceList += [[ '' , [CaloOverflowMonitor], 'L2_l1calooverflow']]
self.L2signatureList += [ [['L2_l1calooverflow']] ]
####################################
####################################
def setupL1TopoTransmission(self):
from TrigGenericAlgs.TrigGenericAlgsConf import AcceptL1TopoMonitor
l1topodebug = AcceptL1TopoMonitor('L1TopoAcceptDebug')
self.L2sequenceList += [[ '' , [l1topodebug], 'L2_l1topodebug']]
self.L2signatureList += [ [['L2_l1topodebug']] ]
####################################
####################################
def setupIdmonTrkFS(self):
......
......@@ -4303,7 +4303,6 @@ def setupMenu():
TriggerFlags.MonitorSlice.signatures = [
['l1calooverflow','', [], ['L1Calo'], ['RATE:Monitoring','BW:Other'], -1],
['l1topodebug', 'L1_Topo', [], ['L1TopoMismatches'], ['RATE:Monitoring','BW:Other'], -1],
## # enhancedbias
['mistimemonl1bccorr', '', [], ['Mistimed'], ["RATE:Monitoring","BW:Other"], -1],
......
......@@ -765,7 +765,7 @@ CalibChainParts_Default = {
#==========================================================
# ---- MonitorDef chains -----
#==========================================================
AllowedMonitorChainIdentifiers = ['robrequest', 'timeburner', 'idmon', 'costmonitor','cscmon','l1calooverflow','mistimemonl1bccorr','mistimemonl1bccorrnomu','mistimemoncaltimenomu','mistimemoncaltime','mistimemonj400','l1topodebug']
AllowedMonitorChainIdentifiers = ['robrequest', 'timeburner', 'idmon', 'costmonitor','cscmon','l1calooverflow','mistimemonl1bccorr','mistimemonl1bccorrnomu','mistimemoncaltimenomu','mistimemoncaltime','mistimemonj400']
# ---- Monitor Chain Dictinary of all allowed Values ----
MonitorChainParts = {
......
......@@ -54,8 +54,7 @@ calibStreams = [
'BphysPEB',
'RPCNoise',
'IDprescaledL1',
'LArPEB',
'L1TopoMismatches'
'LArPEB'
]
##NOTE: DataScouting_xx_NAME:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment