diff --git a/AtlasTest/DatabaseTest/IOVDbTestAlg/src/IOVDbTestAlg.cxx b/AtlasTest/DatabaseTest/IOVDbTestAlg/src/IOVDbTestAlg.cxx index 16ec2cb4de14366419173dcbb4d4904cbfccc0c9..b504c16b27285c35d7a0439f2d6506fd5c8fd279 100755 --- a/AtlasTest/DatabaseTest/IOVDbTestAlg/src/IOVDbTestAlg.cxx +++ b/AtlasTest/DatabaseTest/IOVDbTestAlg/src/IOVDbTestAlg.cxx @@ -2,8 +2,6 @@ Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ -// $Id: IOVDbTestAlg.cxx,v 1.39 2009-03-30 12:10:15 ivukotic Exp $ - #include "IOVDbTestAlg/IOVDbTestAlg.h" // IOVDbTest includes @@ -18,12 +16,10 @@ // Gaudi includes #include "GaudiKernel/IIncidentSvc.h" +#include "GaudiKernel/Incident.h" #include "GaudiKernel/GaudiException.h" #include "GaudiKernel/IToolSvc.h" -// Event Incident -#include "EventInfo/EventIncident.h" - // AttributeList #include "CoralBase/Attribute.h" #include "CoralBase/Blob.h" @@ -170,8 +166,7 @@ StatusCode IOVDbTestAlg::readWithBeginRun(){ ServiceHandle<IIncidentSvc> incSvc("IncidentSvc", name() ); ATH_CHECK( incSvc.retrieve() ); - EventIncident evtInc(name(), "BeginRun",Gaudi::Hive::currentContext()); - incSvc->fireIncident( evtInc ); + incSvc->fireIncident( Incident(name(), IncidentType::BeginRun, Gaudi::Hive::currentContext()) ); return StatusCode::SUCCESS; } diff --git a/Calorimeter/CaloRec/python/CaloClusterTopoCoolFolder.py b/Calorimeter/CaloRec/python/CaloClusterTopoCoolFolder.py index c0b1992b334bee0886cff263dc406faa4cb416cc..143d05ac6e97f31098f075dfea80beb60d852526 100644 --- a/Calorimeter/CaloRec/python/CaloClusterTopoCoolFolder.py +++ b/Calorimeter/CaloRec/python/CaloClusterTopoCoolFolder.py @@ -30,16 +30,16 @@ def _setupCaloClusterTopoCoolFolder(): # use CALO_OFL only for GEO>=18 if globalflags.DataSource()=='data' or doOverride: conddb.addFolder("CALO","/CALO/HadCalibration2/CaloEMFrac", className='CaloLocalHadCoeff') - conddb.addFolder("CALO","/CALO/HadCalibration2/H1ClusterCellWeights") + conddb.addFolder("CALO","/CALO/HadCalibration2/H1ClusterCellWeights", className='CaloLocalHadCoeff') conddb.addFolder("CALO","/CALO/HadCalibration2/CaloOutOfCluster", className='CaloLocalHadCoeff') conddb.addFolder("CALO","/CALO/HadCalibration2/CaloOutOfClusterPi0", className='CaloLocalHadCoeff') - conddb.addFolder("CALO","/CALO/HadCalibration2/CaloDMCorr2") + conddb.addFolder("CALO","/CALO/HadCalibration2/CaloDMCorr2",className='CaloLocalHadCoeff') else: conddb.addFolder("CALO_OFL","/CALO/Ofl/HadCalibration2/CaloEMFrac", className='CaloLocalHadCoeff') - conddb.addFolder("CALO_OFL","/CALO/Ofl/HadCalibration2/H1ClusterCellWeights") + conddb.addFolder("CALO_OFL","/CALO/Ofl/HadCalibration2/H1ClusterCellWeights",className='CaloLocalHadCoeff') conddb.addFolder("CALO_OFL","/CALO/Ofl/HadCalibration2/CaloOutOfCluster", className='CaloLocalHadCoeff') conddb.addFolder("CALO_OFL","/CALO/Ofl/HadCalibration2/CaloOutOfClusterPi0", className='CaloLocalHadCoeff') - conddb.addFolder("CALO_OFL","/CALO/Ofl/HadCalibration2/CaloDMCorr2") + conddb.addFolder("CALO_OFL","/CALO/Ofl/HadCalibration2/CaloDMCorr2",className='CaloLocalHadCoeff') if doOverride: diff --git a/Calorimeter/CaloUtils/CaloUtils/CaloLCDeadMaterialTool.h b/Calorimeter/CaloUtils/CaloUtils/CaloLCDeadMaterialTool.h index ac357b1ef8fd94ec496a998e54c4a17490d23db5..039721ac393ae725aa43b11359dcd9f3af97e986 100644 --- a/Calorimeter/CaloUtils/CaloUtils/CaloLCDeadMaterialTool.h +++ b/Calorimeter/CaloUtils/CaloUtils/CaloLCDeadMaterialTool.h @@ -27,6 +27,7 @@ #include "GaudiKernel/ToolHandle.h" #include "AthenaKernel/IOVSvcDefs.h" #include "CaloGeoHelpers/CaloSampling.h" +#include "StoreGate/ReadCondHandleKey.h" #include <map> #include <vector> @@ -63,8 +64,6 @@ class CaloLCDeadMaterialTool : public AthAlgTool, virtual public IClusterCellWei virtual StatusCode weight(xAOD::CaloCluster* theCluster) const override; virtual StatusCode initialize() override; - virtual StatusCode LoadConditionsData(IOVSVC_CALLBACK_ARGS) override; - CaloLCDeadMaterialTool(const std::string& type, const std::string& name, const IInterface* parent); @@ -93,11 +92,11 @@ class CaloLCDeadMaterialTool : public AthAlgTool, virtual public IClusterCellWei std::vector<Area>& areas, std::vector<Cell>& cells, float* smp_energy, - float& cls_unweighted_energy) const; + float& cls_unweighted_energy, const CaloLocalHadCoeff* data) const; /** * @brief name of the key for DM cell weights */ - std::string m_key; + SG::ReadCondHandleKey<CaloLocalHadCoeff> m_key; /** * @brief Required Reco Status for the clusters in order to be calibrated */ @@ -136,12 +135,6 @@ class CaloLCDeadMaterialTool : public AthAlgTool, virtual public IClusterCellWei * engDM = p *engDM_EM+(1-p)*endDM_HAD */ bool m_useHadProbability; - /** - * @brief data object containing dead material correction coefficiengts - * - * This object contains the actual data used for calibration. */ - const DataHandle<CaloLocalHadCoeff> m_data; - /** * @brief interpolate correction coefficients */ bool m_interpolate; diff --git a/Calorimeter/CaloUtils/CaloUtils/CaloLCWeightTool.h b/Calorimeter/CaloUtils/CaloUtils/CaloLCWeightTool.h index b40cc764a0be1ba2b5ee22a662be6a9e6c93b5c1..ceb28383620043dc2a1a67bbf89e3c09f9bf5b96 100644 --- a/Calorimeter/CaloUtils/CaloUtils/CaloLCWeightTool.h +++ b/Calorimeter/CaloUtils/CaloUtils/CaloLCWeightTool.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef CALOUTILS_CALOLCWEIGHTTOOL_H @@ -24,6 +24,7 @@ #include "GaudiKernel/ToolHandle.h" #include "AthenaBaseComps/AthAlgTool.h" #include "AthenaKernel/IOVSvcDefs.h" +#include "StoreGate/ReadCondHandleKey.h" class CaloCell_ID; class CaloDetDescrManager; @@ -40,8 +41,6 @@ class CaloLCWeightTool : public AthAlgTool, virtual public IClusterCellWeightToo virtual StatusCode weight(xAOD::CaloCluster* theCluster) const override; virtual StatusCode initialize() override; - virtual StatusCode LoadConditionsData(IOVSVC_CALLBACK_ARGS) override; - CaloLCWeightTool(const std::string& type, const std::string& name, const IInterface* parent); @@ -49,7 +48,7 @@ class CaloLCWeightTool : public AthAlgTool, virtual public IClusterCellWeightToo /** * @brief name of the key for had cell weights */ - std::string m_key; + SG::ReadCondHandleKey<CaloLocalHadCoeff> m_key; /** * @brief minimal signal/elec_noise ratio for a cell to be weighted @@ -67,12 +66,6 @@ class CaloLCWeightTool : public AthAlgTool, virtual public IClusterCellWeightToo * the cases EM and HAD. */ bool m_useHadProbability; - /** - * @brief data object containing the hadronic weights - * - * This object contains the actual data used for calibration. */ - - const DataHandle<CaloLocalHadCoeff> m_data; /** * @brief map to indices inside the data for individual samplings diff --git a/Calorimeter/CaloUtils/src/CaloLCDeadMaterialTool.cxx b/Calorimeter/CaloUtils/src/CaloLCDeadMaterialTool.cxx index 4ea82044f56d1c7ccfbb9f619e3c751385a56fd3..e2b5833a43ee5cc02772d3f01469a02c5b85740d 100644 --- a/Calorimeter/CaloUtils/src/CaloLCDeadMaterialTool.cxx +++ b/Calorimeter/CaloUtils/src/CaloLCDeadMaterialTool.cxx @@ -128,9 +128,7 @@ StatusCode CaloLCDeadMaterialTool::initialize() ATH_MSG_INFO( "Initializing " << name() ); - // callback for conditions data - ATH_CHECK( detStore()->regFcn(&IClusterCellWeightTool::LoadConditionsData, dynamic_cast<IClusterCellWeightTool*>(this), m_data, m_key) ); - ATH_MSG_INFO( "Registered callback for key: " << m_key ); + ATH_CHECK(m_key.initialize()); return StatusCode::SUCCESS; } @@ -205,6 +203,14 @@ StatusCode CaloLCDeadMaterialTool::weight(CaloCluster* theCluster) const return StatusCode::FAILURE; } + const CaloLocalHadCoeff* data(0); + SG::ReadCondHandle<CaloLocalHadCoeff> rch(m_key); + data = *rch; + if(data==0) { + ATH_MSG_ERROR("Unable to access conditions object"); + return StatusCode::FAILURE; + } + ATH_MSG_DEBUG("Cluster is selected for local DM calibration." << " Old cluster energy:" << theCluster->e() << " m_weightModeDM:" << m_weightModeDM); @@ -215,7 +221,7 @@ StatusCode CaloLCDeadMaterialTool::weight(CaloCluster* theCluster) const float smp_energy[CaloSampling::Unknown]; float cls_unweighted_energy = 0; StatusCode sc = prepare_for_cluster(theCluster, areas, cells, - smp_energy, cls_unweighted_energy); + smp_energy, cls_unweighted_energy, data); if ( !sc.isSuccess() ) { #ifdef MAKE_MOMENTS set_zero_moments(theCluster); @@ -256,7 +262,7 @@ StatusCode CaloLCDeadMaterialTool::weight(CaloCluster* theCluster) const vars[CaloLocalHadDefs::DIMD_ENER] = log10ener; vars[CaloLocalHadDefs::DIMD_LAMBDA] = log10lambda; - size_t n_dm = m_data->getSizeAreaSet(); + size_t n_dm = data->getSizeAreaSet(); // loop over HAD/EM possibilities for mixing different correction types for(int i_mix=0; i_mix<2; i_mix++){ // 0 - pure HAD case, 1-pure EM case @@ -269,12 +275,12 @@ StatusCode CaloLCDeadMaterialTool::weight(CaloCluster* theCluster) const for(size_t i_dm=0; i_dm < n_dm; i_dm++){ if(areas[i_dm].eprep <= 0.0) continue; // no appropriate signal to reconstruct dm energy in this area - const CaloLocalHadCoeff::LocalHadArea *area = m_data->getArea(i_dm); + const CaloLocalHadCoeff::LocalHadArea *area = data->getArea(i_dm); float emax = area->getDimension(CaloLocalHadDefs::DIMD_ENER)->getXmax(); if(log10ener > emax) log10ener = emax - 0.0001; vars[CaloLocalHadDefs::DIMD_ENER] = log10ener; - const CaloLocalHadCoeff::LocalHadCoeff *pars = m_data->getCoeff(i_dm, vars); + const CaloLocalHadCoeff::LocalHadCoeff *pars = data->getCoeff(i_dm, vars); if( !pars ) continue; float edm = 0.0; @@ -282,7 +288,7 @@ StatusCode CaloLCDeadMaterialTool::weight(CaloCluster* theCluster) const if(area->getType() == CaloLocalHadDefs::AREA_DMFIT) { edm = (*pars)[CaloLocalHadDefs::BIN_P0] + (*pars)[CaloLocalHadDefs::BIN_P1]*areas[i_dm].eprep; if(m_interpolate) { - bool isa = hp.Interpolate(m_data, i_dm, vars, parint, m_interpolateDimensionsFit, areas[i_dm].eprep); + bool isa = hp.Interpolate(data, i_dm, vars, parint, m_interpolateDimensionsFit, areas[i_dm].eprep); // calculation of fitted values is done already in the interpolator if(isa) edm = parint[CaloLocalHadDefs::BIN_P0]; } @@ -291,7 +297,7 @@ StatusCode CaloLCDeadMaterialTool::weight(CaloCluster* theCluster) const }else if(area->getType() == CaloLocalHadDefs::AREA_DMLOOKUP){ if( (*pars)[CaloLocalHadDefs::BIN_ENTRIES] > m_MinLookupBinNentry) edm = cls_unweighted_energy*((*pars)[CaloLocalHadDefs::BIN_WEIGHT] - 1.0 ); if(m_interpolate) { - bool isa = hp.Interpolate(m_data, i_dm, vars, parint, m_interpolateDimensionsLookup); + bool isa = hp.Interpolate(data, i_dm, vars, parint, m_interpolateDimensionsLookup); if(isa && parint[CaloLocalHadDefs::BIN_ENTRIES] > m_MinLookupBinNentry) edm = cls_unweighted_energy*(parint[CaloLocalHadDefs::BIN_WEIGHT] - 1.0 ); } @@ -309,7 +315,7 @@ StatusCode CaloLCDeadMaterialTool::weight(CaloCluster* theCluster) const edm = ecalonew - ecaloold; // if(m_interpolate) { -// bool isa = hp.Interpolate(m_data, i_dm, vars, parint, m_interpolateDimensionsSampling); +// bool isa = hp.Interpolate(data, i_dm, vars, parint, m_interpolateDimensionsSampling); // if(isa) { // ecalonew = 0.0; // ecaloold = 0.0; @@ -530,9 +536,9 @@ CaloLCDeadMaterialTool::prepare_for_cluster std::vector<Area>& areas, std::vector<Cell>& cells, float* smp_energy, - float& cls_unweighted_energy) const + float& cls_unweighted_energy, const CaloLocalHadCoeff* data) const { - areas.resize(m_data->getSizeAreaSet()); + areas.resize(data->getSizeAreaSet()); cells.reserve (theCluster->size()); bzero(smp_energy, CaloSampling::Unknown*sizeof(float)); @@ -640,20 +646,3 @@ CaloLCDeadMaterialTool::prepare_for_cluster return StatusCode::SUCCESS; } - - -StatusCode CaloLCDeadMaterialTool::LoadConditionsData(IOVSVC_CALLBACK_ARGS_K(keys)) -{ - ATH_MSG_DEBUG( "Callback invoked for " << keys.size() << " keys"); - - for (std::list<std::string>::const_iterator itr=keys.begin(); itr!=keys.end(); ++itr) { - std::string key = *itr; - ATH_MSG_DEBUG( "key = " << key); - if(key==m_key) { - ATH_MSG_DEBUG( "retrieve CaloHadWeight "); - ATH_CHECK( detStore()->retrieve(m_data,m_key) ); - } - } - return StatusCode::SUCCESS; -} - diff --git a/Calorimeter/CaloUtils/src/CaloLCWeightTool.cxx b/Calorimeter/CaloUtils/src/CaloLCWeightTool.cxx index 2445833e41ad28ab6e955547d3a6916b72f123d0..c2adee22cdf68fb356b6cf0aa270dff5198f7188 100644 --- a/Calorimeter/CaloUtils/src/CaloLCWeightTool.cxx +++ b/Calorimeter/CaloUtils/src/CaloLCWeightTool.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ //----------------------------------------------------------------------- @@ -85,11 +85,7 @@ StatusCode CaloLCWeightTool::initialize() ATH_MSG_INFO( "Initializing " << name() ); - // callback for conditions data - ATH_CHECK( detStore()->regFcn(&IClusterCellWeightTool::LoadConditionsData, - dynamic_cast<IClusterCellWeightTool*>(this), - m_data,m_key) ); - ATH_MSG_INFO( "Registered callback for key: " << m_key ); + ATH_CHECK( m_key.initialize() ); // pointer to detector manager: m_calo_dd_man = CaloDetDescrManager::instance(); @@ -108,6 +104,25 @@ StatusCode CaloLCWeightTool::initialize() StatusCode CaloLCWeightTool::weight(xAOD::CaloCluster *theCluster) const { + const CaloLocalHadCoeff* data(0); + SG::ReadCondHandle<CaloLocalHadCoeff> rch(m_key); + data = *rch; + if(data==0) { + ATH_MSG_ERROR("Unable to access conditions object"); + return StatusCode::FAILURE; + } + // this is not super effective, but try to put is here first, and optimize later + std::vector<int> isAmpMap(CaloSampling::Unknown,-1); + for (int iArea=0;iArea<data->getSizeAreaSet();iArea++) { + for (int iSamp=0;iSamp<CaloSampling::Unknown;iSamp++) { + if ( CaloSamplingHelper::getSamplingName((CaloSampling::CaloSample)iSamp) == data->getArea(iArea)->getTitle() ) { + ATH_MSG_DEBUG("Found Area for Sampling " << CaloSamplingHelper::getSamplingName((CaloSampling::CaloSample)iSamp)); + isAmpMap[iSamp] = iArea; + break; + } + } + } + double eEM = theCluster->e(); std::vector<float> vars(5); @@ -139,7 +154,7 @@ StatusCode CaloLCWeightTool::weight(xAOD::CaloCluster *theCluster) const // check calo and sampling index for current cell Identifier myId = itrCell->ID(); CaloCell_ID::CaloSample theSample = CaloCell_ID::CaloSample(m_calo_id->calo_sample(myId)); - if ( m_isampmap[theSample] >= 0 ) { + if ( isAmpMap[theSample] >= 0 ) { double sigma = m_noiseTool->getNoise(*itrCell,ICalorimeterNoiseTool::ELECTRONICNOISE); double energy = fabs(itrCell->e()); double ratio = 0; @@ -158,7 +173,7 @@ StatusCode CaloLCWeightTool::weight(xAOD::CaloCluster *theCluster) const double abseta = fabs(itrCell->eta()); double log10edens = log10(density); double log10cluse = log10(eEM); - const CaloLocalHadCoeff::LocalHadDimension *logeDim = m_data->getArea(m_isampmap[theSample])->getDimension(3); + const CaloLocalHadCoeff::LocalHadDimension *logeDim = data->getArea(isAmpMap[theSample])->getDimension(3); double lemax = logeDim->getXmax()-0.5*logeDim->getDx(); if ( log10cluse > lemax ) log10cluse = lemax; @@ -172,16 +187,16 @@ StatusCode CaloLCWeightTool::weight(xAOD::CaloCluster *theCluster) const double wData(0); // accessing coefficients (non-interpolated) - int iBin = m_data->getBin(m_isampmap[theSample],vars); + int iBin = data->getBin(isAmpMap[theSample],vars); if ( iBin >= 0 ) { - const CaloLocalHadCoeff::LocalHadCoeff * pData = m_data->getCoeff(iBin); + const CaloLocalHadCoeff::LocalHadCoeff * pData = data->getCoeff(iBin); if ( pData && (*pData)[CaloLocalHadDefs::BIN_ENTRIES] > 10 ) { isDataOK = true; wData = (*pData)[CaloLocalHadDefs::BIN_WEIGHT]; } if(m_interpolate) { // accesing interpolated coefficients - bool isa = hp.Interpolate(m_data, m_isampmap[theSample], vars, parint, m_interpolateDimensions); + bool isa = hp.Interpolate(data, isAmpMap[theSample], vars, parint, m_interpolateDimensions); if(isa && parint[CaloLocalHadDefs::BIN_ENTRIES] > 10) { isDataOK = true; wData = parint[CaloLocalHadDefs::BIN_WEIGHT]; @@ -231,33 +246,4 @@ CaloLCWeightTool::~CaloLCWeightTool() { } -StatusCode CaloLCWeightTool::LoadConditionsData(IOVSVC_CALLBACK_ARGS_K(keys)) -{ - ATH_MSG_DEBUG("Callback invoked for " - << keys.size() << " keys"); - - for (std::list<std::string>::const_iterator itr=keys.begin(); - itr!=keys.end(); ++itr) { - std::string key = *itr; - ATH_MSG_DEBUG("key = " << key); - if(key==m_key) { - ATH_MSG_DEBUG("retrieve CaloLocalHadCoeff "); - ATH_CHECK( detStore()->retrieve(m_data,m_key) ); - // setup the index map - m_isampmap.resize(CaloSampling::Unknown,-1); - for (int iArea=0;iArea<m_data->getSizeAreaSet();iArea++) { - for (int iSamp=0;iSamp<CaloSampling::Unknown;iSamp++) { - if ( CaloSamplingHelper::getSamplingName((CaloSampling::CaloSample)iSamp) == m_data->getArea(iArea)->getTitle() ) { - ATH_MSG_DEBUG("Found Area for Sampling " << CaloSamplingHelper::getSamplingName((CaloSampling::CaloSample)iSamp)); - m_isampmap[iSamp] = iArea; - break; - } - } - } - } - } - return StatusCode::SUCCESS; -} - - diff --git a/Control/AthenaCommon/python/AlgScheduler.py b/Control/AthenaCommon/python/AlgScheduler.py index e768b43b965b2d4280a616f59d0615f5a76c1e49..d059e38af87dc276a3fb46622e2321576a7d5e67 100644 --- a/Control/AthenaCommon/python/AlgScheduler.py +++ b/Control/AthenaCommon/python/AlgScheduler.py @@ -106,7 +106,6 @@ class AlgScheduler: else : self.log.warning(self.SchedulerSvc.getFullName() + " has no property \"ShowDataDependencies\"") - # ## set the DataLoader Algorithm to handle unmet input data deps def setDataLoaderAlg(self,dataLoadAlg): @@ -123,6 +122,13 @@ class AlgScheduler: else : self.log.warning(self.SchedulerSvc.getFullName() + " has no property \"EnableConditions\"") +# +## enable verbose view state logging + def EnableVerboseViews(self,enable=True): + if ( 'VerboseSubSlots' in self.SchedulerSvc.properties() ): + self.SchedulerSvc.VerboseSubSlots = enable + else : + self.log.warning(self.SchedulerSvc.getFullName() + " has no property \"VerboseSubSlots\"") # ## explicitly set the thread pool size diff --git a/Control/AthenaConfiguration/python/ComponentAccumulator.py b/Control/AthenaConfiguration/python/ComponentAccumulator.py index 1ca584802a6a7d07237e05ed9eb8c6af60125f3f..965401231f777000b426ca0dae86be67a216f138 100644 --- a/Control/AthenaConfiguration/python/ComponentAccumulator.py +++ b/Control/AthenaConfiguration/python/ComponentAccumulator.py @@ -37,6 +37,9 @@ class ComponentAccumulator(object): #Backward compatiblity hack: Allow also public tools: self._publicTools=[] + # small CAs can have only tools + self._privateTools=[] + #To check if this accumulator was merged: self._wasMerged=False @@ -185,17 +188,30 @@ class ComponentAccumulator(object): return None - def getEventAlgo(self,name,seqName=None): + def getEventAlgo(self,name=None,seqName=None): + if name is None: + algs = self.getEventAlgos(seqName) + if len(algs) == 1: + return algs[0] + raise ConfigurationError("Number of algorithms returned by getEventAlgo %d which is != 1 expected by this API" % len(algs) ) + if seqName is None: seq=self._sequence else: seq = findSubSequence(self._sequence, seqName ) + algo = findAlgorithm( seq, name ) if algo is None: raise ConfigurationError("Can not find an algorithm of name %s "% name) return algo + def getEventAlgos(self,seqName=None): + if seqName is None: + seq=self._sequence + else: + seq = findSubSequence(self._sequence, seqName ) + return list( set( sum( flatSequencers( seq ).values(), []) ) ) def addCondAlgo(self,algo): if not isinstance(algo, ConfigurableAlgorithm): @@ -230,7 +246,6 @@ class ComponentAccumulator(object): - def _deduplicate(self,newComp,compList): #Check for duplicates: for comp in compList: @@ -334,19 +349,38 @@ class ComponentAccumulator(object): #end if startswith("_") pass + def __getOne(self, allcomps, name=None, typename="???"): + selcomps = allcomps if name is None else [ t for t in allcomps if t.getName() == name ] + if len( selcomps ) == 1: + return selcomps[0] + raise ConfigurationError("Number of %s available %d which is != 1 expected by this API" % (typename, len(selcomps)) ) + + def getPublicTools(self): + return self._publicTools + + def getPublicTool(self, name=None): + """ Returns single public tool, exception if either not found or to many found""" + return self.__getOne( self._publicTools, name, "PublicTools") + + def getServices(self): + return self._services + + def getService(self, name=None): + """ Returns single service, exception if either not found or to many found""" + return self.__getOne( self._services, name, "Services") + + def addPrivateTool(self, newTool): + if not isinstance(newTool,ConfigurableAlgTool): + raise TypeError("Attempt to add wrong type: %s as private AlgTool" % type( newTool ).__name__) + self._deduplicate(newTool,self._privateTools) - def getService(self,name): - for svc in self._services: - if svc.getName()==name: - return svc - raise KeyError("No service with name %s known" % name) - - def getPublicTool(self,name): - for pt in self._publicTools: - if pt.getName()==name: - return pt - raise KeyError("No public tool with name %s known" % name) + def getPrivateTools(self): + return self._privateTools + def getPrivateTool(self, name=None): + """ Returns single private tool, exception if either not found or to many found""" + return self.__getOne( self._privateTools, name, "PrivateTools") + def addEventInput(self,condObj): #That's a string, should do some sanity checks on formatting @@ -729,10 +763,10 @@ class ComponentAccumulator(object): else: maxEvents=-1 - print "INITIALIZE STEP" + self._msg.info("INITIALIZE STEP") sc = app.initialize() if not sc.isSuccess(): - selg._msg.error("Failed to initialize AppMgr") + self._msg.error("Failed to initialize AppMgr") return sc app.printAlgsSequences() #could be removed later .... @@ -778,11 +812,10 @@ class PropSetterProxy(object): if name.startswith("_PropSetterProxy"): return super(PropSetterProxy, self).__setattr__(name, value) - msg = logging.getLogger('forcomps') + msg = logging.getLogger('foreach_component') import fnmatch for component_path, component in PropSetterProxy.__compPaths.iteritems(): if fnmatch.fnmatch( component_path, self.__path ): - #print "cp", component if name in component.getProperties(): try: setattr( component, name, value ) @@ -803,6 +836,7 @@ class PropSetterProxy(object): return PropSetterProxy.__compPaths[ path ] = comp + for svc in ca._services: PropSetterProxy.__compPaths['SvcMgr/'+svc.getFullName()] = svc for t in ca._publicTools: @@ -821,18 +855,18 @@ class PropSetterProxy(object): __nestAlg( startpath+"/"+name+"/"+t.getName(), value[toolIndex] ) - def __nestSeq(startpath, comp): - for c in comp.getChildren(): + def __nestSeq( startpath, seq ): + for c in seq.getChildren(): if isSequence(c): - __nestSeq( startpath+"/"+c.getName(), c) - else: # the algorithm or tool - PropSetterProxy.__compPaths[ startpath+"/"+c.getFullName() ] = comp + __nestSeq( startpath+"/"+c.getName(), c ) + else: # the algorithm or tool + __add( startpath+"/"+c.getFullName(), c ) __nestAlg( startpath+"/"+c.getFullName(), c ) __nestSeq("", ca._sequence) -def forcomps(componentAccumulator, path): +def foreach_component(componentAccumulator, path): """ Utility to set properties of components using wildcards Example: diff --git a/Control/AthenaConfiguration/python/ComponentAccumulatorTest.py b/Control/AthenaConfiguration/python/ComponentAccumulatorTest.py index 3f059ae87694e2ee54702c438b5220780232a9e9..10bff26b51cab459d5a89ab9d0a47658944bfe6e 100644 --- a/Control/AthenaConfiguration/python/ComponentAccumulatorTest.py +++ b/Control/AthenaConfiguration/python/ComponentAccumulatorTest.py @@ -2,7 +2,7 @@ # self test of ComponentAccumulator -from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator, forcomps +from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator, foreach_component from AthenaConfiguration.AthConfigFlags import AthConfigFlags from AthenaCommon.CFElements import findSubSequence,findAlgorithm from AthenaCommon.Configurable import Configurable, ConfigurablePyAlgorithm # guinea pig algorithms @@ -40,7 +40,9 @@ class TestComponentAccumulator( unittest.TestCase ): acc = ComponentAccumulator() result,algs=AlgsConf1( flags ) acc.merge(result) - algs.append(Algo("Algo3")) + a = Algo("Algo3") + print "algo3 when created", id(a) + algs.append(a) return acc,algs acc = ComponentAccumulator() @@ -99,12 +101,16 @@ class TestComponentAccumulator( unittest.TestCase ): s = pickle.load( f ) self.assertIsNotNone( s, "The pickle has no content") - def test_forcomps( self ): - forcomps(self.acc, "/*sub2*/*Algo*").OutputLevel = DEBUG - forcomps(self.acc, "/*sub2*/*Algo*").OutputLevel = DEBUG - forcomps(self.acc, "/Algo/Algo*").OutputLevel = INFO - self.assertEqual(self.acc.getEventAlgo("Algo3").OutputLevel, INFO, "wrong OutputLevel value for Algo3") - self.assertEqual(self.acc.getEventAlgo("NestedAlgo1").OutputLevel, DEBUG, "wrong OutputLevel value for NestedAlgo1") + def test_foreach_component( self ): + from AthenaCommon.Logging import logging + logging.getLogger('foreach_component').setLevel(DEBUG) + algo3 = self.acc.getEventAlgo("Algo3") + algo3.OutputLevel = INFO + foreach_component(self.acc, "*/Algo3").OutputLevel = DEBUG # restet to debug level + self.assertEqual( algo3.OutputLevel, DEBUG, "wrong OutputLevel value for Algo3") + foreach_component(self.acc, "*sub2*/*").OutputLevel = INFO + self.assertEqual(self.acc.getEventAlgo("NestedAlgo1").OutputLevel, INFO, "wrong OutputLevel value for NestedAlgo1") + self.assertEqual(self.acc.getEventAlgo("NestedAlgo2").OutputLevel, INFO, "wrong OutputLevel value for NestedAlgo1") @@ -218,7 +224,6 @@ class ForbidRecursiveSequences( unittest.TestCase ): Configurable.configurableRun3Behavior=1 from AthenaCommon.CFElements import seqAND accTop = ComponentAccumulator() - accTop.store( open("test.pkl", "w") )#silence RuntimeError seq1 = seqAND("seq1") seq2 = seqAND("seq2") seq1_again = seqAND("seq1") @@ -280,5 +285,36 @@ class MergeMovingAlgorithms( unittest.TestCase ): destinationCA.wasMerged() sourceCA.wasMerged() + +class TestComponentAccumulatorAccessors( unittest.TestCase ): + def runTest( self ): + ca = ComponentAccumulator() + from AthenaCommon.Configurable import ConfigurablePyAlgorithm,ConfigurableAlgTool + ca.addEventAlgo(ConfigurablePyAlgorithm("alg1")) + + self.assertIsNotNone( ca.getEventAlgo(), "Found single alg") + self.assertEquals( len(ca.getEventAlgos()), 1 , "Found single alg") +# no idea why this assersts do not recognise exceptions +# self.assertRaises(ConfigurationError, ca.getEventAlgo("alg2")) + + ca.addEventAlgo(ConfigurablePyAlgorithm("alg2")) + + self.assertIsNotNone( ca.getEventAlgo("alg2"), "Found single alg") + self.assertEquals( len(ca.getEventAlgos()), 2 , "Found single alg") + # self.assertRaises(ConfigurationError, ca.getEventAlgo(), "Single Alg API ambiguity") + + class Tool(ConfigurableAlgTool): + def __init__(self, *args, **kwargs): + super(Tool, self).__init__(*args, **kwargs) + def getDlls(self): + return None + + + ca.addPublicTool( Tool(name="tool1") ) + self.assertIsNotNone( ca.getPublicTool(), "Found single tool") + ca.addPublicTool( Tool(name="tool2") ) +# self.assertRaises(ConfigurationError, ca.getPublicTool(), "Found single tool") + + if __name__ == "__main__": unittest.main() diff --git a/Control/AthenaMonitoring/AthenaMonitoring/ExampleMonitorAlgorithm.h b/Control/AthenaMonitoring/AthenaMonitoring/ExampleMonitorAlgorithm.h index 5b1b8aac4ac453824ee7a762ea3e6737df2762ab..b0509d55d034be06e3664bcbb179c7454f4e277b 100644 --- a/Control/AthenaMonitoring/AthenaMonitoring/ExampleMonitorAlgorithm.h +++ b/Control/AthenaMonitoring/AthenaMonitoring/ExampleMonitorAlgorithm.h @@ -14,7 +14,7 @@ class ExampleMonitorAlgorithm : public AthMonitorAlgorithm { public: ExampleMonitorAlgorithm( const std::string& name, ISvcLocator* pSvcLocator ); virtual ~ExampleMonitorAlgorithm(); - StatusCode initialize(); + virtual StatusCode initialize() override; virtual StatusCode fillHistograms( const EventContext& ctx ) const override; private: Gaudi::Property<bool> m_doRandom {this,"RandomHist",false}; diff --git a/Control/AthenaServices/src/AthIncFirerAlg.cxx b/Control/AthenaServices/src/AthIncFirerAlg.cxx index 69ac92f1107882e1d4d2da5fd2768e7089b783cc..683394c6a8adfdc86c61cb6e2bf76edd09b0c519 100644 --- a/Control/AthenaServices/src/AthIncFirerAlg.cxx +++ b/Control/AthenaServices/src/AthIncFirerAlg.cxx @@ -4,7 +4,6 @@ #include "AthIncFirerAlg.h" #include "GaudiKernel/IIncidentSvc.h" #include "GaudiKernel/Incident.h" -#include "EventInfo/EventIncident.h" #include "AthenaKernel/errorcheck.h" AthIncFirerAlg::AthIncFirerAlg( const std::string& name, ISvcLocator* pSvcLocator ):AthReentrantAlgorithm(name,pSvcLocator),m_Serial(false){ @@ -26,13 +25,8 @@ StatusCode AthIncFirerAlg::execute(const EventContext& ctx)const { auto ctxcp=ctx; for(auto & i:m_incLists.value()){ ATH_MSG_VERBOSE("Firing incident "<<i); - if((i=="BeginEvent")||(i=="EndEvent")){ - m_incSvc->fireIncident(std::make_unique<EventIncident>(name(),i,ctxcp)); - if(m_Serial.value())m_incSvc->fireIncident(EventIncident(name(),i,ctxcp)); - }else{ - m_incSvc->fireIncident(std::make_unique<Incident>(name(),i,ctxcp)); - if(m_Serial.value())m_incSvc->fireIncident(Incident( name(),i,ctxcp)); - } + m_incSvc->fireIncident(std::make_unique<Incident>(name(),i,ctxcp)); + if (m_Serial.value()) m_incSvc->fireIncident(Incident(name(),i,ctxcp)); } return StatusCode::SUCCESS; } diff --git a/Control/AthenaServices/src/AthenaEventLoopMgr.cxx b/Control/AthenaServices/src/AthenaEventLoopMgr.cxx index 109e9b856379f14c25bf4f8ec05b582da5f662c4..c52edc827a075325bcd77d250d2392572232e4a9 100644 --- a/Control/AthenaServices/src/AthenaEventLoopMgr.cxx +++ b/Control/AthenaServices/src/AthenaEventLoopMgr.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #define GAUDISVC_EVENTLOOPMGR_CPP @@ -34,7 +34,6 @@ #include "StoreGate/StoreGateSvc.h" #include "StoreGate/ActiveStoreSvc.h" -#include "EventInfo/EventIncident.h" #include "EventInfo/EventInfo.h" #include "EventInfo/EventID.h" #include "EventInfo/EventType.h" @@ -503,7 +502,7 @@ StatusCode AthenaEventLoopMgr::writeHistograms(bool force) { StatusCode AthenaEventLoopMgr::beginRunAlgorithms() { // Fire BeginRun "Incident" - m_incidentSvc->fireIncident(EventIncident(name(),IncidentType::BeginRun,m_eventContext)); + m_incidentSvc->fireIncident(Incident(name(),IncidentType::BeginRun,m_eventContext)); // Call the execute() method of all top algorithms for ( ListAlg::iterator ita = m_topAlgList.begin(); @@ -737,7 +736,7 @@ StatusCode AthenaEventLoopMgr::executeEvent(void* /*par*/) resetTimeout(Athena::Timeout::instance(m_eventContext)); if(toolsPassed) { // Fire BeginEvent "Incident" - //m_incidentSvc->fireIncident(EventIncident(*pEvent, name(),"BeginEvent")); + //m_incidentSvc->fireIncident(Incident(*pEvent, name(),"BeginEvent")); // An incident may schedule a stop, in which case is better to exit before the actual execution. if ( m_scheduledStop ) { @@ -800,7 +799,7 @@ StatusCode AthenaEventLoopMgr::executeEvent(void* /*par*/) } // Fire EndEvent "Incident" - //m_incidentSvc->fireIncident(EventIncident(*pEvent, name(),"EndEvent")); + //m_incidentSvc->fireIncident(Incident(*pEvent, name(),"EndEvent")); ++m_proc; } // end of toolsPassed test ++m_nev; diff --git a/Control/AthenaServices/src/AthenaHiveEventLoopMgr.cxx b/Control/AthenaServices/src/AthenaHiveEventLoopMgr.cxx index f8c30f49b1d692a5e6c36cce77ca52916c68797a..ff44dbfdfa834a8182b745050cdf4fe32fa1e5c9 100644 --- a/Control/AthenaServices/src/AthenaHiveEventLoopMgr.cxx +++ b/Control/AthenaServices/src/AthenaHiveEventLoopMgr.cxx @@ -39,7 +39,6 @@ #include "StoreGate/StoreGateSvc.h" #include "StoreGate/ActiveStoreSvc.h" -#include "EventInfo/EventIncident.h" #include "EventInfo/EventInfo.h" #include "EventInfo/EventID.h" #include "EventInfo/EventType.h" @@ -664,7 +663,7 @@ StatusCode AthenaHiveEventLoopMgr::executeEvent(void* createdEvts_IntPtr ) << endmsg; // FIXME!!! Fire BeginRun "Incident" - m_incidentSvc->fireIncident(EventIncident(name(),IncidentType::BeginRun,*evtContext)); + m_incidentSvc->fireIncident(Incident(name(),IncidentType::BeginRun,*evtContext)); } @@ -705,7 +704,7 @@ StatusCode AthenaHiveEventLoopMgr::executeEvent(void* createdEvts_IntPtr ) resetTimeout(Athena::Timeout::instance(*evtContext)); if(toolsPassed) { // Fire BeginEvent "Incident" - //m_incidentSvc->fireIncident(EventIncident(*pEvent, name(),"BeginEvent",*evtContext)); + //m_incidentSvc->fireIncident(Incident(*pEvent, name(),"BeginEvent",*evtContext)); CHECK( m_conditionsCleaner->event (*evtContext, true) ); diff --git a/Control/PileUpComps/src/PileUpEventLoopMgr.cxx b/Control/PileUpComps/src/PileUpEventLoopMgr.cxx index b85fd9fb5a7c44b50281bfdbd231171fb0744e3e..f1c4dad262bb8a7f217c4e6f28324be17a1964bf 100644 --- a/Control/PileUpComps/src/PileUpEventLoopMgr.cxx +++ b/Control/PileUpComps/src/PileUpEventLoopMgr.cxx @@ -16,7 +16,6 @@ #include "EventInfo/EventID.h" // OLD EDM #include "EventInfo/EventType.h" // OLD EDM #include "EventInfo/EventInfo.h" // OLD EDM -#include "EventInfo/EventIncident.h" // OLD EDM #include "PileUpTools/IBeamIntensity.h" #include "PileUpTools/IBeamLuminosity.h" @@ -733,12 +732,12 @@ StatusCode PileUpEventLoopMgr::executeEvent(void* par) ATH_MSG_INFO ( " ===>>> start of run " << m_currentRun << " <<<===" ); // Fire BeginRun "Incident" - m_incidentSvc->fireIncident(EventIncident(this->name(),IncidentType::BeginRun,*m_eventContext)); + m_incidentSvc->fireIncident(Incident(this->name(),IncidentType::BeginRun,*m_eventContext)); CHECK(this->beginRunAlgorithms()); } // Fire BeginEvent "Incident" - //m_incidentSvc->fireIncident(EventIncident(ei, this->name(),IncidentType::BeginEvent)); + //m_incidentSvc->fireIncident(Incident(ei, this->name(),IncidentType::BeginEvent)); // Execute Algorithms // StatusCode sc = MinimalEventLoopMgr::executeEvent(par); @@ -790,7 +789,7 @@ StatusCode PileUpEventLoopMgr::executeEvent(void* par) } // Fire EndEvent "Incident" - //m_incidentSvc->fireIncident( EventIncident(ei, this->name(), IncidentType::EndEvent) ); + //m_incidentSvc->fireIncident( Incident(ei, this->name(), IncidentType::EndEvent) ); //------------------------------------------------------------------------ // Check if there was an error processing current event diff --git a/Database/AthenaPOOL/AthenaPoolCnvSvc/AthenaPoolCnvSvc/T_AthenaPoolCoolMultChanCnv.icc b/Database/AthenaPOOL/AthenaPoolCnvSvc/AthenaPoolCnvSvc/T_AthenaPoolCoolMultChanCnv.icc index b60eb68583ffc62eb87e6f4858a5f17a05e0b2c1..bfa21a83fd674e096d9fa8e952ed3ebb96d68a50 100644 --- a/Database/AthenaPOOL/AthenaPoolCnvSvc/AthenaPoolCnvSvc/T_AthenaPoolCoolMultChanCnv.icc +++ b/Database/AthenaPOOL/AthenaPoolCnvSvc/AthenaPoolCnvSvc/T_AthenaPoolCoolMultChanCnv.icc @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /** @file T_AthenaPoolCoolMultChanCnv.icc @@ -268,7 +268,7 @@ T_AthenaPoolCoolMultChanCnv<COLL_T, ELEM_T, ELEM_P>::attrListCollToObject(CondAt for (; it != last; ++it, ++itIOV) { try { // pool token/ref - const AthenaAttributeList& attrList = (*it).second; + const coral::AttributeList& attrList = (*it).second; token=attrList["PoolRef"].data<std::string>(); } // FIXME exception diff --git a/Database/IOVDbSvc/src/IOVDbSvc.cxx b/Database/IOVDbSvc/src/IOVDbSvc.cxx index 0aa4867d79dd7164f9e7a96fea2d7017c23d1f5b..b4dab1126431242ba0cc89ec4f4102591840f595 100644 --- a/Database/IOVDbSvc/src/IOVDbSvc.cxx +++ b/Database/IOVDbSvc/src/IOVDbSvc.cxx @@ -659,6 +659,8 @@ StatusCode IOVDbSvc::signalBeginRun(const IOVTime& beginRunTime, { // Begin run - set state and save time for later use m_state=IOVDbSvc::BEGIN_RUN; + // Is this a different run compared to the previous call? + bool newRun = m_iovTime.isValid() && (m_iovTime.run() != beginRunTime.run()); m_iovTime=beginRunTime; // For a MC event, the run number we need to use to look up the conditions // may be different from that of the event itself. Override the run @@ -671,14 +673,17 @@ StatusCode IOVDbSvc::signalBeginRun(const IOVTime& beginRunTime, } ATH_MSG_DEBUG( "signalBeginRun> begin run time " << m_iovTime); - if(!m_par_onlineMode) return StatusCode::SUCCESS; - static int first=0; - if (!first) { - first=1; - ATH_MSG_DEBUG( "first call SKIPPING ... " ); + if (!m_par_onlineMode) { return StatusCode::SUCCESS; } - // all other stuff is event based so happens after this. + + // ONLINE mode: allow adding of new calibration constants between runs + if (!newRun) { + ATH_MSG_DEBUG( "Same run as previous signalBeginRun call. Skipping re-loading of folders..." ); + return StatusCode::SUCCESS; + } + + // all other stuff is event based so happens after this. // this is before first event of each run ATH_MSG_DEBUG( "In online mode will recheck ... " ); ATH_MSG_DEBUG( "First reload PoolCataloge ... " ); diff --git a/DetectorDescription/RegionSelector/src/RegSelSvc.cxx b/DetectorDescription/RegionSelector/src/RegSelSvc.cxx index 04de029fab07154a3ca96cbb309b7fed3690e107..fa8fdd5ad972af787ba24172a6648ddf1869d033 100755 --- a/DetectorDescription/RegionSelector/src/RegSelSvc.cxx +++ b/DetectorDescription/RegionSelector/src/RegSelSvc.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ @@ -65,7 +65,7 @@ RegSelSvc::RegSelSvc(const std::string& name, ISvcLocator* sl) m_lutCreatorToolTRT ("TRT_RegionSelectorTable/TRT_RegionSelectorTable"), m_lutCreatorToolLAR ("LArRegionSelectorTable"), m_lutCreatorToolTile ("TileRegionSelectorTable"), - m_SCTCablingToolCB("SCT_CablingToolCB"), + m_SCTCablingToolInc("SCT_CablingToolInc"), m_geoModelSvc("GeoModelSvc",name), m_DeltaZ(168), m_initRPC(true), @@ -180,8 +180,8 @@ StatusCode RegSelSvc::initialize() { if ( m_initOnlyID.value() ) { if ( !m_initSCT.value() ) sctflag = "disabled"; - else ATH_CHECK(m_SCTCablingToolCB.retrieve()); // SCT_CablingToolCB has to be retrieved now. - // Otherwise, SCT_RegionSelectorTable cannot use ready SCT_CablingToolCB. + else ATH_CHECK(m_SCTCablingToolInc.retrieve()); // SCT_CablingToolInc has to be retrieved now. + // Otherwise, SCT_RegionSelectorTable cannot use ready SCT_CablingToolInc. if ( !m_initPixel.value() ) pixelflag = "disabled"; if ( !m_initTRT.value() ) trtflag = "disabled"; diff --git a/DetectorDescription/RegionSelector/src/RegSelSvc.h b/DetectorDescription/RegionSelector/src/RegSelSvc.h index e021d5d7301775b88a68b7564ae8d667be3de341..6549ce60f43c9fb2a2649e06e47baefa1473d849 100755 --- a/DetectorDescription/RegionSelector/src/RegSelSvc.h +++ b/DetectorDescription/RegionSelector/src/RegSelSvc.h @@ -1,7 +1,7 @@ // emacs: this is -*- c++ -*- /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ @@ -454,7 +454,7 @@ private: ToolHandle<IRegionIDLUT_Creator> m_lutCreatorToolTRT; ToolHandle<IRegionLUT_Creator> m_lutCreatorToolLAR; ToolHandle<IRegionLUT_Creator> m_lutCreatorToolTile; - ToolHandle< ISCT_CablingTool > m_SCTCablingToolCB; // Retrieve SCT_CablingToolCB in initialize of RegSelSvc so that SCT_RegionSelectorTable can use ready SCT_CablingToolCB in BeginRun incident. + ToolHandle< ISCT_CablingTool > m_SCTCablingToolInc; // Retrieve SCT_CablingToolInc in initialize of RegSelSvc so that SCT_RegionSelectorTable can use ready SCT_CablingToolInc in BeginRun incident. ServiceHandle< IGeoModelSvc > m_geoModelSvc; std::vector<std::string> m_enabledDetectors; bool m_errorFlag; diff --git a/Event/EventInfo/CMakeLists.txt b/Event/EventInfo/CMakeLists.txt index 1e96943a7f0db3154efacf797e0ef307eef2ec4b..d8686924d36b0c89bea52cfe50bbb7d4d214d9cd 100644 --- a/Event/EventInfo/CMakeLists.txt +++ b/Event/EventInfo/CMakeLists.txt @@ -24,7 +24,6 @@ atlas_add_library( EventInfo src/EventStreamInfo.cxx src/PileUpEventInfo.cxx src/PileUpTimeEventIndex.cxx - src/EventIncident.cxx src/TriggerInfo.cxx src/MergedEventInfo.cxx src/TagInfo.cxx diff --git a/Event/EventInfo/EventInfo/EventIncident.h b/Event/EventInfo/EventInfo/EventIncident.h deleted file mode 100755 index 882b0c3d9960f0dac296e5931cac631ce272898f..0000000000000000000000000000000000000000 --- a/Event/EventInfo/EventInfo/EventIncident.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef EVENTINFO_EVENTINCIDENT_H -# define EVENTINFO_EVENTINCIDENT_H 1 -/** - * @file EventIncident.h - * - * @brief an incident that carries the EventInfo object - * - * @author Paolo Calafiura <pcalafiura@lbl.gov> - * - * $Id: EventIncident.h,v 1.2 2005-01-12 11:07:52 schaffer Exp $ - */ - - -//<<<<<< INCLUDES >>>>>> -#include <string> -#ifndef GAUDIKERNEL_INCIDENT_H -# include "GaudiKernel/Incident.h" -#endif - -#include "GaudiKernel/EventContext.h" - -//<<<<<< CLASS DECLARATIONS >>>>>> - -/** @class EventIncident - * @brief an incident that carries the EventInfo object - * @author pcalafiura@lbl.gov - ATLAS Collaboration - **/ - -class EventIncident : public Incident { -public: - - /// \name structors - //@{ - /// standard constructor - ///@param source the name of the service/algorithm firing - ///@param type e.g. "BeginEvent" - ///@param ctx event context - EventIncident(const std::string& source, - const std::string& type, - const EventContext& ctx); - // Use default copy constructor. - virtual ~EventIncident(); - //@} - -private: -}; - -#endif // EVENTINFO_EVENTINCIDENT_H - - diff --git a/Event/EventInfo/doc/packagedoc.h b/Event/EventInfo/doc/packagedoc.h index 4495f5b8339ad7d96f3011907b17cb170d364383..ab2787886ec21432cd5fb522b5e4e68b0dfaf089 100644 --- a/Event/EventInfo/doc/packagedoc.h +++ b/Event/EventInfo/doc/packagedoc.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /** @@ -28,13 +28,4 @@ during event processing the tags are stored in a TagInfo object in the DetectorStore. The TagInfoMgr service manages the creation of the TagInfo object from information in the incoming event and IOVDb. -Finally, there is an EventIncident class which is sent along with -begin/end event incidences by the IIncidentSvc. This class provides -access to the EventInfo object to the object receiving the Incident. - - - - - - */ diff --git a/Event/EventInfo/src/EventIncident.cxx b/Event/EventInfo/src/EventIncident.cxx deleted file mode 100755 index d9238da9961800e724420720c843a3ca1af2e222..0000000000000000000000000000000000000000 --- a/Event/EventInfo/src/EventIncident.cxx +++ /dev/null @@ -1,21 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -/** - * @file EventIncident.cxx - * - * @author Paolo Calafiura <pcalafiura@lbl.gov> - * - * $Id: EventIncident.cxx,v 1.2 2005-01-12 11:07:53 schaffer Exp $ - */ -#include "EventInfo/EventIncident.h" - -EventIncident::EventIncident(const std::string& source, - const std::string& type, - const EventContext& ctx) - : Incident(source, type, ctx) -{} - -EventIncident::~EventIncident() -{} diff --git a/InnerDetector/InDetDetDescr/InDetRegionSelector/InDetRegionSelector/SiRegionSelectorTable.h b/InnerDetector/InDetDetDescr/InDetRegionSelector/InDetRegionSelector/SiRegionSelectorTable.h index 8009d741ff0195793d4fd7d571cb9e5402db27fb..a56457bcc235f3eb4592b741ae951a6f6eaf76df 100755 --- a/InnerDetector/InDetDetDescr/InDetRegionSelector/InDetRegionSelector/SiRegionSelectorTable.h +++ b/InnerDetector/InDetDetDescr/InDetRegionSelector/InDetRegionSelector/SiRegionSelectorTable.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef InDetRegionSelector_SiRegionSelectorTable_h @@ -48,7 +48,7 @@ private: // cablings ServiceHandle<IPixelCablingSvc> m_pixIdMapping; - ToolHandle<ISCT_CablingTool> m_sctCablingToolCB; // This class accesses SCT cabling during initialization. + ToolHandle<ISCT_CablingTool> m_sctCablingToolInc; // This class accesses SCT cabling during initialization. }; diff --git a/InnerDetector/InDetDetDescr/InDetRegionSelector/src/SiRegionSelectorTable.cxx b/InnerDetector/InDetDetDescr/InDetRegionSelector/src/SiRegionSelectorTable.cxx index 6df46e4b607c33dc09d6ede80d621d2c7a132021..c465d725fc5e583abb19a687cbaa884e89edcf97 100755 --- a/InnerDetector/InDetDetDescr/InDetRegionSelector/src/SiRegionSelectorTable.cxx +++ b/InnerDetector/InDetDetDescr/InDetRegionSelector/src/SiRegionSelectorTable.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "InDetRegionSelector/SiRegionSelectorTable.h" @@ -40,7 +40,7 @@ SiRegionSelectorTable::SiRegionSelectorTable(const std::string& type, m_printTable(false), m_noDBM(true), m_pixIdMapping("PixelCablingSvc", name), - m_sctCablingToolCB("SCT_CablingToolCB") + m_sctCablingToolInc("SCT_CablingToolInc") { declareInterface<IRegionIDLUT_Creator>(this); declareProperty("ManagerName", m_managerName); @@ -126,8 +126,8 @@ SiRegionSelectorTable::createTable() return StatusCode::FAILURE; } } else { // SCT - if (m_sctCablingToolCB.retrieve().isFailure()) { - msg(MSG::ERROR) << "Can't get the SCT_CablingToolCB." << endmsg; + if (m_sctCablingToolInc.retrieve().isFailure()) { + msg(MSG::ERROR) << "Can't get the SCT_CablingToolInc." << endmsg; return StatusCode::FAILURE; } } @@ -187,7 +187,7 @@ SiRegionSelectorTable::createTable() if ( sctId!=0 ) { barrelEC = sctId->barrel_ec(element->identify()); layerDisk = sctId->layer_disk(element->identify()); - robId=m_sctCablingToolCB->getRobIdFromOfflineId(element->identify()); + robId=m_sctCablingToolInc->getRobIdFromOfflineId(element->identify()); } else { msg(MSG::ERROR) << " could not get SCT_ID for " << element->getIdHelper() << endmsg; diff --git a/InnerDetector/InDetDetDescr/SCT_Cabling/python/SCT_CablingConfig.py b/InnerDetector/InDetDetDescr/SCT_Cabling/python/SCT_CablingConfig.py index 55bd8fd06fbf57911598f9cb157e951c5789c649..9eb0341eefee2c8951ae9785669e8d1b1c9a98a9 100644 --- a/InnerDetector/InDetDetDescr/SCT_Cabling/python/SCT_CablingConfig.py +++ b/InnerDetector/InDetDetDescr/SCT_Cabling/python/SCT_CablingConfig.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration # https://twiki.cern.ch/twiki/bin/viewauth/AtlasComputing/ConfiguredFactory @@ -63,9 +63,9 @@ def getSCT_CablingCondAlgFromCoraCool(name="SCT_CablingCondAlgFromCoraCool", **k from SCT_Cabling.SCT_CablingConf import SCT_CablingCondAlgFromCoraCool return CfgMgr.SCT_CablingCondAlgFromCoraCool(name, **kwargs) -def getSCT_CablingToolCB(name="SCT_CablingToolCB", **kwargs): - from SCT_Cabling.SCT_CablingConf import SCT_CablingToolCB - return CfgMgr.SCT_CablingToolCB(name, **kwargs) +def getSCT_CablingToolInc(name="SCT_CablingToolInc", **kwargs): + from SCT_Cabling.SCT_CablingConf import SCT_CablingToolInc + return CfgMgr.SCT_CablingToolInc(name, **kwargs) def getSCT_FillCablingFromCoraCool(name="SCT_FillCablingFromCoraCool", **kwargs): from SCT_Cabling.SCT_CablingConf import SCT_FillCablingFromCoraCool diff --git a/InnerDetector/InDetDetDescr/SCT_Cabling/python/SCT_CablingConfigDb.py b/InnerDetector/InDetDetDescr/SCT_Cabling/python/SCT_CablingConfigDb.py index 0284d624ca803473559aee81a6ac064aaf3a890c..af8aaf583f966178f161ffb915063f70458bceb5 100644 --- a/InnerDetector/InDetDetDescr/SCT_Cabling/python/SCT_CablingConfigDb.py +++ b/InnerDetector/InDetDetDescr/SCT_Cabling/python/SCT_CablingConfigDb.py @@ -6,5 +6,5 @@ from AthenaCommon.CfgGetter import addTool, addAlgorithm addTool("SCT_Cabling.SCT_CablingConfig.getSCT_CablingTool", "SCT_CablingTool") addAlgorithm("SCT_Cabling.SCT_CablingConfig.getSCT_CablingCondAlgFromCoraCool", "SCT_CablingCondAlgFromCoraCool") -addTool("SCT_Cabling.SCT_CablingConfig.getSCT_CablingToolCB", "SCT_CablingToolCB") +addTool("SCT_Cabling.SCT_CablingConfig.getSCT_CablingToolInc", "SCT_CablingToolInc") addTool("SCT_Cabling.SCT_CablingConfig.getSCT_FillCablingFromCoraCool", "SCT_FillCablingFromCoraCool") diff --git a/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_CablingToolCB.cxx b/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_CablingToolInc.cxx similarity index 69% rename from InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_CablingToolCB.cxx rename to InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_CablingToolInc.cxx index c99cb35312fde597a15e3a2f93769a0776277827..d30f9265cde270e993bc7ae18e3b2e61d865d903 100644 --- a/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_CablingToolCB.cxx +++ b/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_CablingToolInc.cxx @@ -3,14 +3,14 @@ */ /** - * @file SCT_CablingToolCB.cxx - * Implementation file for SCT cabling tool using call back + * @file SCT_CablingToolInc.cxx + * Implementation file for SCT cabling tool using incident * @author Shaun Roe * @date 20 October, 2008 **/ //this package -#include "SCT_CablingToolCB.h" +#include "SCT_CablingToolInc.h" #include "SCT_Cabling/ISCT_FillCabling.h" #include "SCT_CablingUtilities.h" @@ -41,14 +41,14 @@ namespace { } // Constructor -SCT_CablingToolCB::SCT_CablingToolCB(const std::string& type, const std::string& name, const IInterface* parent) : +SCT_CablingToolInc::SCT_CablingToolInc(const std::string& type, const std::string& name, const IInterface* parent) : base_class(type, name, parent), m_idHelper(nullptr), m_usingDatabase(true) { declareProperty("DataSource", m_cablingDataSource=defaultSource); } // void -SCT_CablingToolCB::handle(const Incident& runIncident) { +SCT_CablingToolInc::handle(const Incident& runIncident) { ATH_MSG_INFO("Cabling event handler called."); if (runIncident.type()==IncidentType::BeginRun) { if (not empty()) { @@ -68,7 +68,7 @@ SCT_CablingToolCB::handle(const Incident& runIncident) { // StatusCode -SCT_CablingToolCB::initialize() { +SCT_CablingToolInc::initialize() { ATH_MSG_INFO("Initialize SCT cabling " << PACKAGE_VERSION); const std::string cablingDataSource = m_cablingDataSource.value(); m_usingDatabase=(cablingDataSource == coracool) or (cablingDataSource == coolVectorPayload) or (cablingDataSource == file); @@ -106,37 +106,37 @@ SCT_CablingToolCB::initialize() { // StatusCode -SCT_CablingToolCB::finalize() { - ATH_MSG_INFO("Thank-you for using the SCT_CablingToolCB, version "<<PACKAGE_VERSION); +SCT_CablingToolInc::finalize() { + ATH_MSG_INFO("Thank-you for using the SCT_CablingToolInc, version "<<PACKAGE_VERSION); ATH_MSG_INFO("The cabling data source was "<< ((not m_usingDatabase) ? m_cablingFillerText->getDataSource() : m_cablingFillerCoraCool->getDataSource())); return StatusCode::SUCCESS; } // unsigned int -SCT_CablingToolCB::size() const { +SCT_CablingToolInc::size() const { return m_data.getHashEntries(); } unsigned int -SCT_CablingToolCB::size(const EventContext& /*ctx*/) const { +SCT_CablingToolInc::size(const EventContext& /*ctx*/) const { return size(); } // bool -SCT_CablingToolCB::empty() const { +SCT_CablingToolInc::empty() const { return (size()==0); } bool -SCT_CablingToolCB::empty(const EventContext& /*ctx*/) const { +SCT_CablingToolInc::empty(const EventContext& /*ctx*/) const { return empty(); } // IdentifierHash -SCT_CablingToolCB::getHashFromOnlineId(const SCT_OnlineId& onlineId, const bool withWarnings) const { +SCT_CablingToolInc::getHashFromOnlineId(const SCT_OnlineId& onlineId, const bool withWarnings) const { //is it valid at all? if (not onlineId.is_valid()) { if (withWarnings) ATH_MSG_WARNING("Invalid online id ("<<std::hex<<onlineId<<") "<<std::dec); @@ -153,70 +153,70 @@ SCT_CablingToolCB::getHashFromOnlineId(const SCT_OnlineId& onlineId, const bool } IdentifierHash -SCT_CablingToolCB::getHashFromOnlineId(const SCT_OnlineId& onlineId, const EventContext& /*ctx*/, const bool withWarnings) const { +SCT_CablingToolInc::getHashFromOnlineId(const SCT_OnlineId& onlineId, const EventContext& /*ctx*/, const bool withWarnings) const { return getHashFromOnlineId(onlineId, withWarnings); } // SCT_OnlineId -SCT_CablingToolCB::getOnlineIdFromHash(const IdentifierHash& hash) const { +SCT_CablingToolInc::getOnlineIdFromHash(const IdentifierHash& hash) const { return m_data.getOnlineIdFromHash(hash); } SCT_OnlineId -SCT_CablingToolCB::getOnlineIdFromHash(const IdentifierHash& hash, const EventContext& /*ctx*/) const { +SCT_CablingToolInc::getOnlineIdFromHash(const IdentifierHash& hash, const EventContext& /*ctx*/) const { return getOnlineIdFromHash(hash); } // SCT_OnlineId -SCT_CablingToolCB::getOnlineIdFromOfflineId(const Identifier& offlineId) const { +SCT_CablingToolInc::getOnlineIdFromOfflineId(const Identifier& offlineId) const { if (not offlineId.is_valid()) return invalidId; IdentifierHash hash(m_idHelper->wafer_hash(offlineId)); return getOnlineIdFromHash(hash); } SCT_OnlineId -SCT_CablingToolCB::getOnlineIdFromOfflineId(const Identifier& offlineId, const EventContext& /*ctx*/) const { +SCT_CablingToolInc::getOnlineIdFromOfflineId(const Identifier& offlineId, const EventContext& /*ctx*/) const { return getOnlineIdFromOfflineId(offlineId); } // std::uint32_t -SCT_CablingToolCB::getRobIdFromHash(const IdentifierHash& hash) const { +SCT_CablingToolInc::getRobIdFromHash(const IdentifierHash& hash) const { return getOnlineIdFromHash(hash).rod(); } std::uint32_t -SCT_CablingToolCB::getRobIdFromHash(const IdentifierHash& hash, const EventContext& /*ctx*/) const { +SCT_CablingToolInc::getRobIdFromHash(const IdentifierHash& hash, const EventContext& /*ctx*/) const { return getRobIdFromHash(hash); } // std::uint32_t -SCT_CablingToolCB::getRobIdFromOfflineId(const Identifier& offlineId) const { +SCT_CablingToolInc::getRobIdFromOfflineId(const Identifier& offlineId) const { return getOnlineIdFromOfflineId(offlineId).rod(); } std::uint32_t -SCT_CablingToolCB::getRobIdFromOfflineId(const Identifier& offlineId, const EventContext& /*ctx*/) const { +SCT_CablingToolInc::getRobIdFromOfflineId(const Identifier& offlineId, const EventContext& /*ctx*/) const { return getRobIdFromOfflineId(offlineId); } // IdentifierHash -SCT_CablingToolCB::getHashFromSerialNumber(const SCT_SerialNumber& sn) const { +SCT_CablingToolInc::getHashFromSerialNumber(const SCT_SerialNumber& sn) const { if (not sn.isWellFormed()) return invalidHash; return m_data.getHashFromSerialNumber(sn); } IdentifierHash -SCT_CablingToolCB::getHashFromSerialNumber(const SCT_SerialNumber& sn, const EventContext& /*ctx*/) const { +SCT_CablingToolInc::getHashFromSerialNumber(const SCT_SerialNumber& sn, const EventContext& /*ctx*/) const { return getHashFromSerialNumber(sn); } SCT_SerialNumber -SCT_CablingToolCB::getSerialNumberFromHash(const IdentifierHash& hash) const { +SCT_CablingToolInc::getSerialNumberFromHash(const IdentifierHash& hash) const { if (not hash.is_valid()) return invalidSn; //hash must be even IdentifierHash evenHash{even(hash)}; @@ -224,22 +224,22 @@ SCT_CablingToolCB::getSerialNumberFromHash(const IdentifierHash& hash) const { } SCT_SerialNumber -SCT_CablingToolCB::getSerialNumberFromHash(const IdentifierHash& hash, const EventContext& /*ctx*/) const { +SCT_CablingToolInc::getSerialNumberFromHash(const IdentifierHash& hash, const EventContext& /*ctx*/) const { return getSerialNumberFromHash(hash); } void -SCT_CablingToolCB::getAllRods(std::vector<std::uint32_t>& usersVector) const { +SCT_CablingToolInc::getAllRods(std::vector<std::uint32_t>& usersVector) const { m_data.getRods(usersVector); } void -SCT_CablingToolCB::getAllRods(std::vector<std::uint32_t>& usersVector, const EventContext& /*ctx*/) const { +SCT_CablingToolInc::getAllRods(std::vector<std::uint32_t>& usersVector, const EventContext& /*ctx*/) const { getAllRods(usersVector); } void -SCT_CablingToolCB::getHashesForRod(std::vector<IdentifierHash>& usersVector, const std::uint32_t rodId) const { +SCT_CablingToolInc::getHashesForRod(std::vector<IdentifierHash>& usersVector, const std::uint32_t rodId) const { SCT_OnlineId firstPossibleId(rodId,SCT_OnlineId::FIRST_FIBRE); const bool withWarnings(false); for (SCT_OnlineId i(firstPossibleId);i!=SCT_OnlineId::INVALID_ONLINE_ID;++i) { @@ -251,6 +251,6 @@ SCT_CablingToolCB::getHashesForRod(std::vector<IdentifierHash>& usersVector, con } void -SCT_CablingToolCB::getHashesForRod(std::vector<IdentifierHash>& usersVector, const std::uint32_t rodId, const EventContext& /*ctx*/) const { +SCT_CablingToolInc::getHashesForRod(std::vector<IdentifierHash>& usersVector, const std::uint32_t rodId, const EventContext& /*ctx*/) const { getHashesForRod(usersVector, rodId); } diff --git a/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_CablingToolCB.h b/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_CablingToolInc.h similarity index 87% rename from InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_CablingToolCB.h rename to InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_CablingToolInc.h index 73cf362bbc56eabcd8ba7038f15e6069215ace76..21b1e2bd3a8c3d9264e209aac26bfa44b4f58af3 100644 --- a/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_CablingToolCB.h +++ b/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_CablingToolInc.h @@ -2,11 +2,11 @@ Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ -#ifndef SCT_CablingToolCB_h -#define SCT_CablingToolCB_h +#ifndef SCT_CablingToolInc_h +#define SCT_CablingToolInc_h /** - * @file SCT_CablingToolCB.h - * Header file for SCT cabling tool using call back + * @file SCT_CablingToolInc.h + * Header file for SCT cabling tool using incident * @author Shaun Roe * @date 20 October, 2008 **/ @@ -35,9 +35,9 @@ class SCT_ID; class Identifier; /** - * @class SCT_CablingToolCB, providing mappings of online and offline identifiers and also serial numbers + * @class SCT_CablingToolInc, providing mappings of online and offline identifiers and also serial numbers **/ -class SCT_CablingToolCB: public extends<AthAlgTool, ISCT_CablingTool, IIncidentListener> { +class SCT_CablingToolInc: public extends<AthAlgTool, ISCT_CablingTool, IIncidentListener> { public: ///Incident listener method @@ -45,13 +45,13 @@ class SCT_CablingToolCB: public extends<AthAlgTool, ISCT_CablingTool, IIncidentL //@name Service methods, reimplemented //@{ - SCT_CablingToolCB(const std::string& type, const std::string& name, const IInterface* parent); - virtual ~SCT_CablingToolCB() = default; + SCT_CablingToolInc(const std::string& type, const std::string& name, const IInterface* parent); + virtual ~SCT_CablingToolInc() = default; virtual StatusCode initialize() override; virtual StatusCode finalize() override; //@} - //@name ISCT_CablingToolCB methods implemented, these are visible to clients + //@name ISCT_CablingTool methods implemented, these are visible to clients //@{ /// size of the data structure (for the SCT should be 8176, one for each module side) virtual unsigned int size(const EventContext& ctx) const override; @@ -108,4 +108,4 @@ class SCT_CablingToolCB: public extends<AthAlgTool, ISCT_CablingTool, IIncidentL bool m_usingDatabase; }; -#endif // SCT_CablingToolCB_h +#endif // SCT_CablingToolInc_h diff --git a/InnerDetector/InDetDetDescr/SCT_Cabling/src/components/SCT_Cabling_entries.cxx b/InnerDetector/InDetDetDescr/SCT_Cabling/src/components/SCT_Cabling_entries.cxx index fb29b78888ee016f5fe80ce3f3d51ee2cf63c3d3..31ba57676fe76c290a180ba41a2328dbe606d8da 100644 --- a/InnerDetector/InDetDetDescr/SCT_Cabling/src/components/SCT_Cabling_entries.cxx +++ b/InnerDetector/InDetDetDescr/SCT_Cabling/src/components/SCT_Cabling_entries.cxx @@ -1,5 +1,5 @@ #include "../SCT_CablingTool.h" -#include "../SCT_CablingToolCB.h" +#include "../SCT_CablingToolInc.h" #include "../SCT_FillCablingFromText.h" #include "../SCT_FillCablingFromCoraCool.h" #include "../SCT_TestCablingAlg.h" @@ -7,7 +7,7 @@ #include "../SCT_CablingCondAlgFromText.h" DECLARE_COMPONENT( SCT_CablingTool ) -DECLARE_COMPONENT( SCT_CablingToolCB ) +DECLARE_COMPONENT( SCT_CablingToolInc ) DECLARE_COMPONENT( SCT_FillCablingFromText ) DECLARE_COMPONENT( SCT_FillCablingFromCoraCool ) DECLARE_COMPONENT( SCT_TestCablingAlg ) diff --git a/InnerDetector/InDetDigitization/FastSiDigitization/FastSiDigitization/PixelFastDigitizationTool.h b/InnerDetector/InDetDigitization/FastSiDigitization/FastSiDigitization/PixelFastDigitizationTool.h index d3685659523563497cef011f2c7c38306e54c700..323f354fb297f6e55fa807bc6a3011f552955b89 100644 --- a/InnerDetector/InDetDigitization/FastSiDigitization/FastSiDigitization/PixelFastDigitizationTool.h +++ b/InnerDetector/InDetDigitization/FastSiDigitization/FastSiDigitization/PixelFastDigitizationTool.h @@ -149,7 +149,7 @@ private: ServiceHandle<IPixelCalibSvc> m_pixelCalibSvc; // bool isActiveAndGood(const ServiceHandle<IInDetConditionsSvc> &svc, const IdentifierHash &idHash, const Identifier &id, bool querySingleChannel, const char *elementName, const char *failureMessage = "") const; - bool areNeighbours(const std::vector<Identifier>& group, const Identifier& rdoID, InDetDD::SiDetectorElement* /*element*/, const PixelID& pixelID) const; + bool areNeighbours(const std::vector<Identifier>& group, const Identifier& rdoID, const InDetDD::SiDetectorElement* /*element*/, const PixelID& pixelID) const; PixelFastDigitizationTool(); PixelFastDigitizationTool(const PixelFastDigitizationTool&); diff --git a/InnerDetector/InDetDigitization/FastSiDigitization/FastSiDigitization/SCT_FastDigitizationTool.h b/InnerDetector/InDetDigitization/FastSiDigitization/FastSiDigitization/SCT_FastDigitizationTool.h index 2a39bfccfdcae061471e6c7c11fcbbb0d9059f64..39a413ee9729e66f23e9e33b3903e3742a588b45 100644 --- a/InnerDetector/InDetDigitization/FastSiDigitization/FastSiDigitization/SCT_FastDigitizationTool.h +++ b/InnerDetector/InDetDigitization/FastSiDigitization/FastSiDigitization/SCT_FastDigitizationTool.h @@ -134,7 +134,7 @@ private: bool m_sctUseClusterMaker; //!< use the pixel cluster maker or not IntegerProperty m_vetoThisBarcode; - typedef std::multimap<IdentifierHash, const InDet::SCT_Cluster*> SCT_detElement_RIO_map; + typedef std::multimap<IdentifierHash, InDet::SCT_Cluster*> SCT_detElement_RIO_map; SCT_detElement_RIO_map* m_sctClusterMap; SG::WriteHandle<InDet::SCT_ClusterContainer> m_sctClusterContainer; //!< the SCT_ClusterContainer diff --git a/InnerDetector/InDetDigitization/FastSiDigitization/FastSiDigitization/SiSmearedDigitizationTool.h b/InnerDetector/InDetDigitization/FastSiDigitization/FastSiDigitization/SiSmearedDigitizationTool.h index 61cfc3ea257bc0bb7a5d9eb40dd0702ccf2fce86..9fe5bbc3195c4f5046606cc0ff84f52a2e8f2a15 100644 --- a/InnerDetector/InDetDigitization/FastSiDigitization/FastSiDigitization/SiSmearedDigitizationTool.h +++ b/InnerDetector/InDetDigitization/FastSiDigitization/FastSiDigitization/SiSmearedDigitizationTool.h @@ -98,9 +98,9 @@ public: StatusCode processAllSubEvents(); StatusCode mergeEvent(); - typedef std::multimap<IdentifierHash, const InDet::PixelCluster*> Pixel_detElement_RIO_map; - typedef std::multimap<IdentifierHash, const iFatras::PlanarCluster*> Planar_detElement_RIO_map; - typedef std::multimap<IdentifierHash, const InDet::SCT_Cluster*> SCT_detElement_RIO_map; + typedef std::multimap<IdentifierHash, InDet::PixelCluster*> Pixel_detElement_RIO_map; + typedef std::multimap<IdentifierHash, iFatras::PlanarCluster*> Planar_detElement_RIO_map; + typedef std::multimap<IdentifierHash, InDet::SCT_Cluster*> SCT_detElement_RIO_map; StatusCode mergeClusters(Pixel_detElement_RIO_map * cluster_map); StatusCode mergeClusters(Planar_detElement_RIO_map * cluster_map); StatusCode mergeClusters(SCT_detElement_RIO_map * cluster_map); diff --git a/InnerDetector/InDetDigitization/FastSiDigitization/src/PixelFastDigitizationTool.cxx b/InnerDetector/InDetDigitization/FastSiDigitization/src/PixelFastDigitizationTool.cxx index 9a026cbe60324ea93740c88f4ebe11fe490c571f..1c60247e15a575144631aad3f420d5efaebd4d5e 100644 --- a/InnerDetector/InDetDigitization/FastSiDigitization/src/PixelFastDigitizationTool.cxx +++ b/InnerDetector/InDetDigitization/FastSiDigitization/src/PixelFastDigitizationTool.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ //////////////////////////////////////////////////////////////////////////// @@ -762,7 +762,7 @@ StatusCode PixelFastDigitizationTool::digitize() std::vector<Identifier> currentRdoList = currentCluster->rdoList(); bool areNb = false; for (std::vector<Identifier>::const_iterator rdoIter = rdoList.begin(); rdoIter != rdoList.end(); ++rdoIter) { - areNb = this->areNeighbours(currentRdoList, *rdoIter, const_cast<InDetDD::SiDetectorElement*>(hitSiDetElement),*m_pixel_ID); + areNb = this->areNeighbours(currentRdoList, *rdoIter, hitSiDetElement,*m_pixel_ID); if (areNb) { break; } } if (areNb) { @@ -926,7 +926,7 @@ StatusCode PixelFastDigitizationTool::createAndStoreRIOs() for ( Pixel_detElement_RIO_map::iterator iter = range.first; iter != range.second; ++iter){ - InDet::PixelCluster* pixelCluster = const_cast<InDet::PixelCluster*>((*iter).second); + InDet::PixelCluster* pixelCluster = (*iter).second; pixelCluster->setHashAndIndex(clusterCollection->identifyHash(),clusterCollection->size()); clusterCollection->push_back(pixelCluster); @@ -956,7 +956,7 @@ StatusCode PixelFastDigitizationTool::createAndStoreRIOs() bool PixelFastDigitizationTool::areNeighbours (const std::vector<Identifier>& group, const Identifier& rdoID, - InDetDD::SiDetectorElement* /*element*/, + const InDetDD::SiDetectorElement* /*element*/, const PixelID& pixelID) const { // note: in the PixelClusteringToolBase, m_splitClusters is a variable; here diff --git a/InnerDetector/InDetDigitization/FastSiDigitization/src/SCT_FastDigitizationTool.cxx b/InnerDetector/InDetDigitization/FastSiDigitization/src/SCT_FastDigitizationTool.cxx index 5cdfb2add49479d827074d5228ef7e78934d6036..effe3467eea36eb1e0c6b73d5c1ab0424bdc3090 100644 --- a/InnerDetector/InDetDigitization/FastSiDigitization/src/SCT_FastDigitizationTool.cxx +++ b/InnerDetector/InDetDigitization/FastSiDigitization/src/SCT_FastDigitizationTool.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "FastSiDigitization/SCT_FastDigitizationTool.h" @@ -988,7 +988,7 @@ StatusCode SCT_FastDigitizationTool::createAndStoreRIOs() clusterCollection->setIdentifier(detElement->identify()); for ( SCT_detElement_RIO_map::iterator localClusterIter = range.first; localClusterIter != range.second; ++localClusterIter) { - InDet::SCT_Cluster *sctCluster = const_cast<InDet::SCT_Cluster*>(localClusterIter->second); + InDet::SCT_Cluster *sctCluster = localClusterIter->second; sctCluster->setHashAndIndex(clusterCollection->identifyHash(),clusterCollection->size()); clusterCollection->push_back(sctCluster); } diff --git a/InnerDetector/InDetDigitization/FastSiDigitization/src/SiSmearedDigitizationTool.cxx b/InnerDetector/InDetDigitization/FastSiDigitization/src/SiSmearedDigitizationTool.cxx index 2d6e5d0a7be7779f7022a8480ab5ba69ac00d666..582802d7170582d8898a19aee45646d2be811d9c 100644 --- a/InnerDetector/InDetDigitization/FastSiDigitization/src/SiSmearedDigitizationTool.cxx +++ b/InnerDetector/InDetDigitization/FastSiDigitization/src/SiSmearedDigitizationTool.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ //////////////////////////////////////////////////////////////////////////// @@ -1386,7 +1386,7 @@ StatusCode SiSmearedDigitizationTool::digitize() siWidth, hitSiDetElement, clusterErr); - m_pixelClusterMap->insert(std::pair<IdentifierHash, const InDet::PixelCluster* >(waferID, pixelCluster)); + m_pixelClusterMap->insert(std::pair<IdentifierHash, InDet::PixelCluster* >(waferID, pixelCluster)); if (FillTruthMap(m_pixelPrdTruth, pixelCluster, hit).isFailure()) { ATH_MSG_FATAL ( "FillTruthMap() for pixel failed!" ); @@ -1401,7 +1401,7 @@ StatusCode SiSmearedDigitizationTool::digitize() hitPlanarDetElement, clusterErr); - m_planarClusterMap->insert(std::pair<IdentifierHash, const iFatras::PlanarCluster* >(waferID, planarCluster)); + m_planarClusterMap->insert(std::pair<IdentifierHash, iFatras::PlanarCluster* >(waferID, planarCluster)); if (FillTruthMap(m_planarPrdTruth, planarCluster, hit).isFailure()) { ATH_MSG_FATAL ( "FillTruthMap() for planar element failed!" ); @@ -1520,7 +1520,7 @@ StatusCode SiSmearedDigitizationTool::digitize() hitSiDetElement, clusterErr); - m_sctClusterMap->insert(std::pair<IdentifierHash, const InDet::SCT_Cluster* >(waferID, sctCluster)); + m_sctClusterMap->insert(std::pair<IdentifierHash, InDet::SCT_Cluster* >(waferID, sctCluster)); if (FillTruthMap(m_SCTPrdTruth, sctCluster, hit).isFailure()) { ATH_MSG_FATAL ( "FillTruthMap() for SCT failed!" ); @@ -1581,7 +1581,7 @@ StatusCode SiSmearedDigitizationTool::digitize() hitPlanarDetElement, clusterErr); - m_planarClusterMap->insert(std::pair<IdentifierHash, const iFatras::PlanarCluster* >(waferID, planarCluster)); + m_planarClusterMap->insert(std::pair<IdentifierHash, iFatras::PlanarCluster* >(waferID, planarCluster)); if (FillTruthMap(m_planarPrdTruth, planarCluster, hit).isFailure()) { ATH_MSG_FATAL ( "FillTruthMap() for planar element failed!" ); @@ -1687,7 +1687,7 @@ StatusCode SiSmearedDigitizationTool::createAndStoreRIOs() for ( Planar_detElement_RIO_map::iterator iter = range.first; iter != range.second; ++iter ) { - iFatras::PlanarCluster* planarCluster = const_cast<iFatras::PlanarCluster*>((*iter).second); + iFatras::PlanarCluster* planarCluster = (*iter).second; planarCluster->setHashAndIndex(clusterCollection->identifyHash(),clusterCollection->size()); clusterCollection->push_back(planarCluster); } @@ -1725,7 +1725,7 @@ StatusCode SiSmearedDigitizationTool::createAndStoreRIOs() for ( Pixel_detElement_RIO_map::iterator iter = range.first; iter != range.second; ++iter ) { - InDet::PixelCluster* pixelCluster = const_cast<InDet::PixelCluster*>((*iter).second); + InDet::PixelCluster* pixelCluster = (*iter).second; pixelCluster->setHashAndIndex(clusterCollection->identifyHash(),clusterCollection->size()); clusterCollection->push_back(pixelCluster); } @@ -1761,7 +1761,7 @@ StatusCode SiSmearedDigitizationTool::createAndStoreRIOs() for ( SCT_detElement_RIO_map::iterator iter = range.first; iter != range.second; ++iter ) { - InDet::SCT_Cluster* sctCluster = const_cast<InDet::SCT_Cluster*>((*iter).second); + InDet::SCT_Cluster* sctCluster = (*iter).second; sctCluster->setHashAndIndex(clusterCollection->identifyHash(),clusterCollection->size()); clusterCollection->push_back(sctCluster); } diff --git a/InnerDetector/InDetRecTools/InDetSecVtxTrackSelectionTool/InDetSecVtxTrackSelectionTool/selection.xml b/InnerDetector/InDetRecTools/InDetSecVtxTrackSelectionTool/InDetSecVtxTrackSelectionTool/selection.xml index b6c16f624846ee39fd636c103f56d6796622b7db..f6c43ec97aa056c43c05b99b35e52be213c893df 100644 --- a/InnerDetector/InDetRecTools/InDetSecVtxTrackSelectionTool/InDetSecVtxTrackSelectionTool/selection.xml +++ b/InnerDetector/InDetRecTools/InDetSecVtxTrackSelectionTool/InDetSecVtxTrackSelectionTool/selection.xml @@ -1,6 +1,5 @@ <lcgdict> <class name="InDet::InDetSecVtxTrackSelectionTool" /> - <class name="InDet::IInDetTrackSelectionTool" /> <class name="ToolHandle<InDet::IInDetTrackSelectionTool" /> <!-- Suppress the unwanted classes found by ROOT 6. --> <!-- Hopefully we can remove these extra lines at one point... --> diff --git a/InnerDetector/InDetRecTools/PixelToTPIDTool/src/PixeldEdxTestAlg.cxx b/InnerDetector/InDetRecTools/PixelToTPIDTool/src/PixeldEdxTestAlg.cxx index 3d6d682da4752556fd63e7bc442ce06baefae5b8..6fd9c6fcf998aa6b18fb37cc9f7098d4dabe69ea 100755 --- a/InnerDetector/InDetRecTools/PixelToTPIDTool/src/PixeldEdxTestAlg.cxx +++ b/InnerDetector/InDetRecTools/PixelToTPIDTool/src/PixeldEdxTestAlg.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "PixelToTPIDTool/PixeldEdxTestAlg.h" @@ -13,12 +13,10 @@ // Gaudi includes #include "GaudiKernel/IIncidentSvc.h" +#include "GaudiKernel/Incident.h" #include "GaudiKernel/GaudiException.h" #include "GaudiKernel/ThreadLocalContext.h" -// Event Info -#include "EventInfo/EventIncident.h" - // AttributeList #include "CoralBase/Attribute.h" #include "CoralBase/AttributeListSpecification.h" @@ -95,7 +93,6 @@ StatusCode PixeldEdxTestAlg::initialize(){ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * StatusCode PixeldEdxTestAlg::readWithBeginRun(){ - StatusCode status; ATH_MSG_INFO ( "in readWithBeginRun()" ); // As a result of the restructuring the EventIncident class (dropping the reference to EventInfo) @@ -106,8 +103,7 @@ StatusCode PixeldEdxTestAlg::readWithBeginRun(){ ServiceHandle<IIncidentSvc> incSvc("IncidentSvc", name() ); ATH_CHECK( incSvc.retrieve() ); - EventIncident evtInc(name(), "BeginRun", getContext()); - incSvc->fireIncident( evtInc ); + incSvc->fireIncident( Incident(name(), IncidentType::BeginRun, getContext()) ); return StatusCode::SUCCESS; } diff --git a/LArCalorimeter/LArBadChannelTool/LArBadChannelTool/LArBadChannelDBTools.h b/LArCalorimeter/LArBadChannelTool/LArBadChannelTool/LArBadChannelDBTools.h index 2053ed2633c8d9e968f6d129e60f5c89b716d902..fdc38c0395281ca45c208b19c11874e3f3cdeb8e 100644 --- a/LArCalorimeter/LArBadChannelTool/LArBadChannelTool/LArBadChannelDBTools.h +++ b/LArCalorimeter/LArBadChannelTool/LArBadChannelTool/LArBadChannelDBTools.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef LArBadChannelDBTools_H @@ -72,10 +72,10 @@ namespace LArBadChannelDBTools { } std::vector<BadChanEntry> - readBadChan( const AthenaAttributeList& attrList, MsgStream& log); + readBadChan( const coral::AttributeList& attrList, MsgStream& log); std::vector<BadFebEntry> - readBadFeb( const AthenaAttributeList& attrList, MsgStream& log); + readBadFeb( const coral::AttributeList& attrList, MsgStream& log); } #endif diff --git a/LArCalorimeter/LArBadChannelTool/src/LArBadChannelCondAlg.cxx b/LArCalorimeter/LArBadChannelTool/src/LArBadChannelCondAlg.cxx index 12604f7cbe54e72e51b2a18acffa0e4a13f7910f..146969ad38da73065097106e8e595d8d3a96a12c 100644 --- a/LArCalorimeter/LArBadChannelTool/src/LArBadChannelCondAlg.cxx +++ b/LArCalorimeter/LArBadChannelTool/src/LArBadChannelCondAlg.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "LArBadChannelTool/LArBadChannelCondAlg.h" @@ -70,7 +70,7 @@ StatusCode LArBadChannelCondAlg::execute() { CondAttrListCollection::const_iterator chanIt_e=attrListColl->end(); for (;chanIt!=chanIt_e;++chanIt) { - const AthenaAttributeList& attrList( chanIt->second); + const coral::AttributeList& attrList = chanIt->second; const coral::Blob& blob = attrList["Blob"].data<coral::Blob>(); unsigned int chanSize = attrList["ChannelSize"].data<unsigned int>(); unsigned int stateSize = attrList["StatusWordSize"].data<unsigned int>(); diff --git a/LArCalorimeter/LArBadChannelTool/src/LArBadChannelDBTools.cxx b/LArCalorimeter/LArBadChannelTool/src/LArBadChannelDBTools.cxx index 236cb55e9911ae6fde97b151256f0359ff4a3049..2ac49686469f97049c61c43204d7070e114f2d49 100644 --- a/LArCalorimeter/LArBadChannelTool/src/LArBadChannelDBTools.cxx +++ b/LArCalorimeter/LArBadChannelTool/src/LArBadChannelDBTools.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "LArBadChannelTool/LArBadChannelDBTools.h" @@ -139,7 +139,7 @@ namespace LArBadChannelDBTools { } std::vector<BadChanEntry> - readBadChan( const AthenaAttributeList& attrList, MsgStream& log) + readBadChan( const coral::AttributeList& attrList, MsgStream& log) { const coral::Blob& blob = attrList["Blob"].data<coral::Blob>(); unsigned int chanSize = attrList["ChannelSize"].data<unsigned int>(); @@ -153,7 +153,7 @@ namespace LArBadChannelDBTools { } std::vector<BadFebEntry> - readBadFeb( const AthenaAttributeList& attrList, MsgStream& log) + readBadFeb( const coral::AttributeList& attrList, MsgStream& log) { const coral::Blob& blob = attrList["Blob"].data<coral::Blob>(); unsigned int chanSize = attrList["ChannelSize"].data<unsigned int>(); diff --git a/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/CalibNtupleAnalysisAlg/src/CalibNtupleLoader.cxx b/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/CalibNtupleAnalysisAlg/src/CalibNtupleLoader.cxx index ceb64abcf7a8d54c93ea1b99c1f0066dcaebc0bf..526de669b36b18dbd34fe8077d7cb1d159d26f39 100644 --- a/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/CalibNtupleAnalysisAlg/src/CalibNtupleLoader.cxx +++ b/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/CalibNtupleAnalysisAlg/src/CalibNtupleLoader.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ //this @@ -17,10 +17,10 @@ // StoreGateSvc, IncidentSvc #include "StoreGate/StoreGateSvc.h" #include "GaudiKernel/IIncidentSvc.h" +#include "GaudiKernel/Incident.h" #include "GaudiKernel/ThreadLocalContext.h" // Athena EventInfo -#include "EventInfo/EventIncident.h" #include "EventInfo/EventType.h" #include "EventInfo/EventInfo.h" #include "EventInfo/EventID.h" @@ -178,7 +178,7 @@ void CalibNtupleLoader::prepareSegments(const MuonCalibEvent *&event, std::map<N // Fire the EndEvent incident; this is normally done by the // AthenaEventLoopMgr after calling the "execute" method of all // Algorithms - m_incSvc->fireIncident(EventIncident(name(),"EndEvent",Gaudi::Hive::currentContext())); + m_incSvc->fireIncident(Incident(name(),IncidentType::EndEvent,Gaudi::Hive::currentContext())); // Change the EventInfo in StoreGate to the correct info from // the event in the ntuple @@ -198,11 +198,11 @@ void CalibNtupleLoader::prepareSegments(const MuonCalibEvent *&event, std::map<N if ( event->eventInfo().runNumber() != m_prev_run_nr ) { m_prev_run_nr = event->eventInfo().runNumber() ; m_incSvc->fireIncident(Incident(name(),"EndRun")); - m_incSvc->fireIncident(EventIncident(name(),"BeginRun",Gaudi::Hive::currentContext())); + m_incSvc->fireIncident(Incident(name(),IncidentType::BeginRun,Gaudi::Hive::currentContext())); } // Fire BeginEvent Incident - m_incSvc->fireIncident(EventIncident(name(),"BeginEvent",Gaudi::Hive::currentContext())); + m_incSvc->fireIncident(Incident(name(),IncidentType::BeginEvent,Gaudi::Hive::currentContext())); } //end CalibNtupleLoader::prepareSegments diff --git a/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/DCMathSegmentMaker/src/MdtMathSegmentFinder.cxx b/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/DCMathSegmentMaker/src/MdtMathSegmentFinder.cxx index e4e82bdbfccbd83270f41bbbd20e15aade85ce90..2d16af875b3396cdc1a406b3370994fccc0c4340 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/DCMathSegmentMaker/src/MdtMathSegmentFinder.cxx +++ b/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/DCMathSegmentMaker/src/MdtMathSegmentFinder.cxx @@ -20,10 +20,7 @@ namespace Muon { MdtMathSegmentFinder::MdtMathSegmentFinder (const std::string& t, const std::string& n, const IInterface* p) : AthAlgTool (t, n, p), m_dcslFitProvider(""), - m_idHelperTool("Muon::MuonIdHelperTool/MuonIdHelperTool"), - m_segmentFinder(0), - m_dcslFitter(0), - m_fitter(0) + m_idHelperTool("Muon::MuonIdHelperTool/MuonIdHelperTool") { declareInterface <IMdtSegmentFinder> (this); @@ -65,97 +62,96 @@ namespace Muon { if( AthAlgTool::initialize().isFailure() ) return StatusCode::FAILURE; + if( !m_dcslFitProvider.empty() ){ + ATH_CHECK( m_dcslFitProvider.retrieve() ); + ATH_MSG_INFO(" Using fitter from " << m_dcslFitProvider); + } + + if( !m_idHelperTool.empty() ){ + ATH_CHECK( m_idHelperTool.retrieve() ); + } + return StatusCode::SUCCESS; + } + + StatusCode MdtMathSegmentFinder::finalize() + { + + return AthAlgTool::finalize(); + } + + const TrkDriftCircleMath::SegVec MdtMathSegmentFinder::findSegments (const TrkDriftCircleMath::DCVec& dcvec, + const TrkDriftCircleMath::CLVec& clvec, + const TrkDriftCircleMath::Road& road, + const TrkDriftCircleMath::DCStatistics& dcstats, + const TrkDriftCircleMath::ChamberGeometry* multiGeo = 0 ) const + { + + // setup finder - m_segmentFinder = new TrkDriftCircleMath::SegmentFinder(m_roadWidth,m_mdtAssociationPullCut,false); + std::unique_ptr<TrkDriftCircleMath::SegmentFinder> segmentFinder (new TrkDriftCircleMath::SegmentFinder(m_roadWidth,m_mdtAssociationPullCut,false)); // set debug level - m_segmentFinder->debugLevel(m_finderDebugLevel); + segmentFinder->debugLevel(m_finderDebugLevel); // configure uasge of chamber position for angular seeding - m_segmentFinder->setUseChamberPhi( m_useChamberTheta ); - + segmentFinder->setUseChamberPhi( m_useChamberTheta ); + // enable dropping of hits - m_segmentFinder->setDropHits( m_doDrop ); + segmentFinder->setDropHits( m_doDrop ); // enable seed cleaing - m_segmentFinder->setSeedCleaning( m_enableSeedCleaning ); + segmentFinder->setSeedCleaning( m_enableSeedCleaning ); - // enable seed cleaing - m_segmentFinder->setSingleMultiLayerScan( m_doSingleMultiLayerScan ); + // do single multilayer scan? + segmentFinder->setSingleMultiLayerScan( m_doSingleMultiLayerScan ); // set chi2/ndof threshold for cleaning of segments - m_segmentFinder->setChi2DropCut( m_chi2PerDofDrop ); + segmentFinder->setChi2DropCut( m_chi2PerDofDrop ); // set ratio for dropping segments with many empty tubes - m_segmentFinder->setRatioEmptyTubesCut( m_ratioEmptyTubesCut ); + segmentFinder->setRatioEmptyTubesCut( m_ratioEmptyTubesCut ); // set sort mode segment finder - m_segmentFinder->setSortSegmentsUsingAllHits( m_doAllHitSort ); + segmentFinder->setSortSegmentsUsingAllHits( m_doAllHitSort ); // set RPC pull cut - m_segmentFinder->setRPCPullCut( m_rpcAssociationPullCut ); + segmentFinder->setRPCPullCut( m_rpcAssociationPullCut ); // set TGC pull cut - m_segmentFinder->setTGCPullCut( m_tgcAssociationPullCut ); + segmentFinder->setTGCPullCut( m_tgcAssociationPullCut ); // set MDT outlier recovery - m_segmentFinder->setRecoverMDT( m_recoverMdtOutliers ); + segmentFinder->setRecoverMDT( m_recoverMdtOutliers ); // set removal of single outliers - m_segmentFinder->setRemoveSingleOutliers( m_removeSingleOutliers ); + segmentFinder->setRemoveSingleOutliers( m_removeSingleOutliers ); // set the curved segment finder - m_segmentFinder->setCurvedSegmentFinder( m_doCurvedSegmentFinder ); + segmentFinder->setCurvedSegmentFinder( m_doCurvedSegmentFinder ); // set removal of single outliers - m_segmentFinder->setDeltaCutT0( m_deltaCutT0Segments ); + segmentFinder->setDeltaCutT0( m_deltaCutT0Segments ); // reset defaults // set removal of single outliers - m_segmentFinder->setResidualCutT0( m_residualCutT0Segments ); + segmentFinder->setResidualCutT0( m_residualCutT0Segments ); - // set removal of single outliers - m_segmentFinder->setUseSegmentQuality( m_useSegmentQuality ); + // set use of segment quality + segmentFinder->setUseSegmentQuality( m_useSegmentQuality ); + std::unique_ptr<TrkDriftCircleMath::DCSLFitter> dcslFitter; if( !m_dcslFitProvider.empty() ){ - ATH_CHECK( m_dcslFitProvider.retrieve() ); - ATH_MSG_INFO(" Using fitter from " << m_dcslFitProvider); - m_fitter = m_dcslFitProvider->getFitter(); - m_segmentFinder->setFitter( m_fitter ); - m_dcslFitter = new TrkDriftCircleMath::DCSLFitter(); + segmentFinder->setFitter( m_dcslFitProvider->getFitter() ); } - - if( !m_idHelperTool.empty() ){ - ATH_CHECK( m_idHelperTool.retrieve() ); + else{ + dcslFitter=std::make_unique<TrkDriftCircleMath::DCSLFitter>(); + segmentFinder->setFitter( dcslFitter.get() ); } - return StatusCode::SUCCESS; - } - - StatusCode MdtMathSegmentFinder::finalize() - { - - delete m_segmentFinder; - delete m_dcslFitter; - return AthAlgTool::finalize(); - } - - const TrkDriftCircleMath::SegVec MdtMathSegmentFinder::findSegments (const TrkDriftCircleMath::DCVec& dcvec, - const TrkDriftCircleMath::CLVec& clvec, - const TrkDriftCircleMath::Road& road, - const TrkDriftCircleMath::DCStatistics& dcstats, - const TrkDriftCircleMath::ChamberGeometry* multiGeo = 0 ) const - { - // reset defaults - if( m_fitter ) { - m_segmentFinder->setFitter( m_fitter ); - } - m_segmentFinder->setSeedCleaning( m_enableSeedCleaning ); // set angle prediction from road - m_segmentFinder->setPhiRoad( road.angle(), road.chamberAngle(), road.width(), m_doRoadAngleSeeding, m_doIPAngleSeeding ); + segmentFinder->setPhiRoad( road.angle(), road.chamberAngle(), road.width(), m_doRoadAngleSeeding, m_doIPAngleSeeding ); // set pointer to geometry - m_segmentFinder->setMdtGeometry( multiGeo ); - m_segmentFinder->setSingleMultiLayerScan( m_doSingleMultiLayerScan ); + segmentFinder->setMdtGeometry( multiGeo ); // set seed cleaning bool highOccupancy = false; @@ -194,7 +190,7 @@ namespace Muon { << " nhits " << nmdtHits << " cut " << m_maxHitsPerFullSearch); return TrkDriftCircleMath::SegVec(); } - + // enable seed cleaning if( highOccupancy || nmdtHits > m_maxHitsPerFullSearch ) { @@ -202,22 +198,18 @@ namespace Muon { ATH_MSG_DEBUG(" switch to fast search: occupancy " << occupancyMax << " cut " << m_occupancyThreshold << " nhits " << nmdtHits << " cut " << m_maxHitsPerFullSearch); - // to speed up reconstruction use default fitter if special is selected - if( !m_dcslFitProvider.empty() ) { - m_segmentFinder->setFitter( m_dcslFitter ); + // to speed up reconstruction use default fitter + if( !m_dcslFitProvider.empty() ){ + dcslFitter=std::make_unique<TrkDriftCircleMath::DCSLFitter>(); + segmentFinder->setFitter( dcslFitter.get() ); } // use tight road cuts and only look for pointing segments - m_segmentFinder->setPhiRoad( road.chamberAngle(), road.chamberAngle(), m_tightRoadCut ); - - // only perform two layer scan - m_segmentFinder->setSingleMultiLayerScan( false ); + segmentFinder->setPhiRoad( road.chamberAngle(), road.chamberAngle(), m_tightRoadCut ); } - m_segmentFinder->setSingleMultiLayerScan( m_doSingleMultiLayerScan ); - - return m_segmentFinder->findSegments(dcvec,clvec); + return segmentFinder->findSegments(dcvec,clvec); } diff --git a/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/DCMathSegmentMaker/src/MdtMathSegmentFinder.h b/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/DCMathSegmentMaker/src/MdtMathSegmentFinder.h index 34dd62c73b07f0efaf795533cda24a649f764ab2..5412882f4f7666e2121774655aa91acef64c08fb 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/DCMathSegmentMaker/src/MdtMathSegmentFinder.h +++ b/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/DCMathSegmentMaker/src/MdtMathSegmentFinder.h @@ -73,9 +73,6 @@ namespace Muon { bool m_useSegmentQuality; //<! use segment quality in hit dropping instead of chi2 unsigned int m_maxHitsPerFullSearch; //<! maximum number of hits, above will use faster search mode - mutable TrkDriftCircleMath::SegmentFinder* m_segmentFinder; //<! pointer to actual finder - mutable TrkDriftCircleMath::DCSLFitter* m_dcslFitter; //<! pointer to default fitter - mutable TrkDriftCircleMath::DCSLFitter* m_fitter; //<! pointer to selected fitter }; } diff --git a/PhysicsAnalysis/JetMissingEtID/JetSelectorTools/src/components/JetSelectorTools_entries.cxx b/PhysicsAnalysis/JetMissingEtID/JetSelectorTools/src/components/JetSelectorTools_entries.cxx index 40df2bbb5e3dfd22f2bb68dc742dec5c44f5fe81..e9778688c98155bcab6e059caddef60b9cb00289 100644 --- a/PhysicsAnalysis/JetMissingEtID/JetSelectorTools/src/components/JetSelectorTools_entries.cxx +++ b/PhysicsAnalysis/JetMissingEtID/JetSelectorTools/src/components/JetSelectorTools_entries.cxx @@ -1,4 +1,6 @@ #include "JetSelectorTools/JetCleaningTool.h" +#include "JetSelectorTools/EventCleaningTool.h" DECLARE_COMPONENT( JetCleaningTool ) +DECLARE_COMPONENT( ECUtils::EventCleaningTool ) diff --git a/TileCalorimeter/TileMonitoring/CMakeLists.txt b/TileCalorimeter/TileMonitoring/CMakeLists.txt index 61d4de3312ae1a2c3ada96e8369b7dc102dae244..517fe6d3d5d498e69d1760adbc76e93337b543fb 100644 --- a/TileCalorimeter/TileMonitoring/CMakeLists.txt +++ b/TileCalorimeter/TileMonitoring/CMakeLists.txt @@ -25,6 +25,7 @@ atlas_depends_on_subdirs( Event/xAOD/xAODEventInfo Event/xAOD/xAODTrigger Event/xAOD/xAODMuon + PhysicsAnalysis/JetMissingEtID/JetSelectorTools Reconstruction/Jet/JetMomentTools Reconstruction/Jet/JetUtils TileCalorimeter/TileCalib/TileCalibBlobObjs diff --git a/TileCalorimeter/TileMonitoring/TileMonitoring/TileJetMonTool.h b/TileCalorimeter/TileMonitoring/TileMonitoring/TileJetMonTool.h index fadb27c9b1826f51c0e88b7b2310557dd102cdc5..d47f2bc67abfbcc78bbaaa1d5fe818e0360923a7 100644 --- a/TileCalorimeter/TileMonitoring/TileMonitoring/TileJetMonTool.h +++ b/TileCalorimeter/TileMonitoring/TileMonitoring/TileJetMonTool.h @@ -17,16 +17,13 @@ #include "xAODJet/Jet.h" #include "TileMonitoring/TileFatherMonTool.h" -// to use JVT #include "AsgTools/ToolHandle.h" -//#include "JetMomentTools/JetVertexTaggerTool.h" -#define JVT -#ifdef JVT +// JVT #include "JetInterface/IJetUpdateJvt.h" -#endif // Jet cleaning #include "JetInterface/IJetSelector.h" -//#include "JetSelectorTools/JetCleaningTool.h" +// Event cleaning +#include "JetSelectorTools/IEventCleaningTool.h" class ITileBadChanTool; @@ -61,6 +58,7 @@ class TileJetMonTool: public TileFatherMonTool { unsigned int find_index(const int gain, const float energy); bool isGoodChannel(int part, int mod, int pmt, uint32_t bad, unsigned int qbit, Identifier id); + bool passesJvt(const xAOD::Jet& jet); bool isGoodJet(const xAOD::Jet& jet); bool isGoodEvent(); @@ -71,10 +69,6 @@ class TileJetMonTool: public TileFatherMonTool { LooseBad, MediumBad, TightBad } BadJetCategory; - bool isBad(BadJetCategory criteria, double quality, double NegE, double emf, double hecf, - double time, double fmax, double eta, double chf, double HecQ); - - private: float m_jetPtMin; @@ -131,14 +125,15 @@ class TileJetMonTool: public TileFatherMonTool { bool m_do_jet_cleaning; float m_jet_tracking_eta_limit; float m_jet_jvt_threshold; + float m_jet_jvt_ptmax; bool m_first_event; // JVT -#ifdef JVT ToolHandle<IJetUpdateJvt> m_jvt; -#endif + std::string m_JvtDecorator; + std::string m_OrDecorator; // event/jet cleaning ToolHandle<IJetSelector> m_cleaningTool; - // JetCleaningTool* m_cleaningTool; + ToolHandle<ECUtils::IEventCleaningTool> m_ECTool; }; #endif diff --git a/TileCalorimeter/TileMonitoring/share/TileMon_jobOptions.py b/TileCalorimeter/TileMonitoring/share/TileMon_jobOptions.py index d05a9904271eab82d72a7dbdcfc90a29e1e5e49e..f61bf648e55de0ee5a9653d18b0b1d3efa95fef0 100644 --- a/TileCalorimeter/TileMonitoring/share/TileMon_jobOptions.py +++ b/TileCalorimeter/TileMonitoring/share/TileMon_jobOptions.py @@ -115,9 +115,10 @@ if tileESDMon: if (jobproperties.Beam.beamType() == 'collisions'): + jetPtMin = 20000. TileJetMonTool = CfgMgr.TileJetMonTool(name = 'TileJetMonTool' , OutputLevel = INFO - , jetPtMin = 20000.0 + , jetPtMin = jetPtMin , jetEtaMax = 1.6 , jetCollectionName = 'AntiKt4EMTopoJets' , do_1dim_histos = False @@ -131,20 +132,32 @@ if tileESDMon: , do_jet_cleaning = False # , useJVTTool = jvt # , useJetCleaning = cleaning - , jet_JVT_threshold = 0.64 + , jet_JVT_threshold = 0.59 + , jet_JVT_pTmax = 120000 # MeV , histoPathBase = "/Tile/Jet") from JetRec.JetRecFlags import jetFlags if jetFlags.useTracks(): + jet_tracking_eta_limit = 2.4 jvt = CfgMgr.JetVertexTaggerTool('JVT') ToolSvc += jvt cleaning = CfgMgr.JetCleaningTool("MyCleaningTool") cleaning.CutLevel = "LooseBad" cleaning.DoUgly = False ToolSvc += cleaning - TileJetMonTool.do_jet_cleaning = True - TileJetMonTool.useJVTTool = jvt - TileJetMonTool.useJetCleaning = cleaning + ecTool = CfgMgr.ECUtils__EventCleaningTool("MyEventCleaningTool") + ecTool.JetCleaningTool = cleaning + ecTool.PtCut = jetPtMin + ecTool.EtaCut = jet_tracking_eta_limit + ecTool.JvtDecorator = "passJvt" + ecTool.OrDecorator = "passOR" + ecTool.CleaningLevel = cleaning.CutLevel + ToolSvc += ecTool + TileJetMonTool.do_jet_cleaning = True + TileJetMonTool.useJVTTool = jvt + TileJetMonTool.useJetCleaning = cleaning + TileJetMonTool.useEventCleaning = ecTool + TileJetMonTool.jet_tracking_eta_limit = jet_tracking_eta_limit if DQMonFlags.monManDataType == 'heavyioncollisions': if not rec.doHIP(): diff --git a/TileCalorimeter/TileMonitoring/share/Tile_JetMonTool_time.py b/TileCalorimeter/TileMonitoring/share/Tile_JetMonTool_time.py index af7dfe8f4c32afa18540b4c8d009195687139b38..2d301ac86ed6fdb4fe2348c5bfcf4fb43dd9a316 100644 --- a/TileCalorimeter/TileMonitoring/share/Tile_JetMonTool_time.py +++ b/TileCalorimeter/TileMonitoring/share/Tile_JetMonTool_time.py @@ -236,24 +236,35 @@ cleaning = CfgMgr.JetCleaningTool("MyCleaningTool") cleaning.CutLevel = "LooseBad" cleaning.DoUgly = False ToolSvc += cleaning +ecTool = CfgMgr.ECUtils__EventCleaningTool("MyEventCleaningTool") +ecTool.JetCleaningTool = cleaning +ecTool.PtCut = 20000.0 +ecTool.EtaCut = 2.4 +ecTool.JvtDecorator = "passJvt" +ecTool.OrDecorator = "passOR" +ecTool.CleaningLevel = cleaning.CutLevel +ToolSvc += ecTool from TileMonitoring.TileMonitoringConf import TileJetMonTool -TileJetMonTool = TileJetMonTool(name = 'TileJetMonTool', - jetPtMin = 20000.0, - jetEtaMax = 1.6, - jetCollectionName = 'AntiKt4EMTopoJets', - do_1dim_histos = True, - do_2dim_histos = False, - do_enediff_histos = False, - energyChanMin = 15000, # 2000, - energyChanMax = 50000, # 4000, - enediff_threshold = 2000, - do_event_cleaning = True, - do_jet_cleaning = True, - useJVTTool = jvt, - useJetCleaning = cleaning, - jet_JVT_threshold = 0.64, - OutputLevel = INFO); +TileJetMonTool = TileJetMonTool(name = 'TileJetMonTool', + jetPtMin = 20000.0, + jetEtaMax = 1.6, + jetCollectionName = 'AntiKt4EMTopoJets', + do_1dim_histos = True, + do_2dim_histos = False, + do_enediff_histos = False, + energyChanMin = 15000, # 2000, + energyChanMax = 50000, # 4000, + enediff_threshold = 2000, + do_event_cleaning = True, + do_jet_cleaning = True, + useJVTTool = jvt, + useJetCleaning = cleaning, + useEventCleaning = ecTool, + jet_tracking_eta_limit = 2.4, + jet_JVT_threshold = 0.59, + jet_JVT_pTmax = 120000, # MeV + OutputLevel = INFO); #ToolSvc += TileJetMonTool; ManagedAthenaTileMon.AthenaMonTools += [ TileJetMonTool ]; diff --git a/TileCalorimeter/TileMonitoring/src/TileJetMonTool.cxx b/TileCalorimeter/TileMonitoring/src/TileJetMonTool.cxx index 8a7cbd02657a196c4da80e0a05dfd3404934696e..6f1e95052564377cb492a2e52d894054cfee899d 100644 --- a/TileCalorimeter/TileMonitoring/src/TileJetMonTool.cxx +++ b/TileCalorimeter/TileMonitoring/src/TileJetMonTool.cxx @@ -23,6 +23,7 @@ // ******************************************************************** #include "xAODJet/JetContainer.h" +#include <xAODCore/ShallowCopy.h> #include "JetUtils/JetCaloQualityUtils.h" #include "JetUtils/JetCellAccessor.h" @@ -44,6 +45,7 @@ #include "xAODEventInfo/EventInfo.h" #include "JetMomentTools/JetVertexTaggerTool.h" + //#include "CaloIdentifier/Tile_Base_ID.h" //#include "TH2F.h" //#include "TH1F.h" @@ -55,18 +57,12 @@ using xAOD::EventInfo; /*---------------------------------------------------------*/ -#ifdef JVT TileJetMonTool::TileJetMonTool(const std::string & type, const std::string & name, const IInterface* parent) : TileFatherMonTool(type, name, parent) , m_tileBadChanTool("TileBadChanTool") , m_jvt("JVT") , m_cleaningTool("MyCleaningTool") -#else -TileJetMonTool::TileJetMonTool(const std::string & type, const std::string & name, const IInterface* parent) - : TileFatherMonTool(type, name, parent) - , m_tileBadChanTool("TileBadChanTool") -#endif -/*---------------------------------------------------------*/ + , m_ECTool("ECTool") { declareInterface<IMonitorToolBase>(this); @@ -83,12 +79,14 @@ TileJetMonTool::TileJetMonTool(const std::string & type, const std::string & nam declareProperty("do_energy_profiles", m_do_energy_profiles = true); declareProperty("do_event_cleaning",m_do_event_cleaning = true); declareProperty("do_jet_cleaning",m_do_jet_cleaning = true); -#ifdef JVT declareProperty("useJVTTool",m_jvt); declareProperty("useJetCleaning",m_cleaningTool); -#endif + declareProperty("useEventCleaning",m_ECTool); + declareProperty("JvtDecorator",m_JvtDecorator = "passJvt"); + declareProperty("OrDecorator",m_OrDecorator = "passOR"); declareProperty("jet_tracking_eta_limit",m_jet_tracking_eta_limit = 2.4); - declareProperty("jet_JVT_threshold",m_jet_jvt_threshold = 0.64); + declareProperty("jet_JVT_threshold",m_jet_jvt_threshold = 0.59); + declareProperty("jet_JVT_pTmax",m_jet_jvt_ptmax = 120000); m_path = "/Tile/Jet"; m_partname[0] = "LBA"; @@ -97,8 +95,9 @@ TileJetMonTool::TileJetMonTool(const std::string & type, const std::string & nam m_partname[3] = "EBC"; m_first_event = true; - } +/*---------------------------------------------------------*/ + /*---------------------------------------------------------*/ TileJetMonTool::~TileJetMonTool() { @@ -112,39 +111,27 @@ StatusCode TileJetMonTool::initialize() { /*---------------------------------------------------------*/ ATH_MSG_INFO("in initialize()"); + ATH_MSG_INFO("value of m_do_jet_cleaning: " << m_do_jet_cleaning); //=== get TileBadChanTool ATH_MSG_DEBUG("TileJetMonTool: Retrieving tile bad channel tool"); CHECK(m_tileBadChanTool.retrieve()); ATH_MSG_DEBUG("TileJetMonTool: Retrieved tile bad channel tool"); - if (m_do_jet_cleaning) { ATH_MSG_DEBUG("TileJetMonTool: initializing JVT updater"); - -#ifdef JVT CHECK(m_jvt.retrieve()); - ATH_MSG_DEBUG("TileJetMonTool: initialized JVT updater"); ATH_MSG_DEBUG("TileJetMonTool: initializing JetCleaningTool"); - /* This is RootCore approach - m_cleaningTool = new JetCleaningTool("MyCleaningTool"); - CHECK(m_cleaningTool->setProperty("CutLevel", "LooseBad")); // also "TightBad" - CHECK(m_cleaningTool->setProperty("DoUgly", false)); - CHECK(m_cleaningTool->initialize()); - */ CHECK(m_cleaningTool.retrieve()); - + CHECK(m_ECTool.retrieve()); ATH_MSG_DEBUG("TileJetMonTool: initialized JetCleaningTool"); -#endif - } - else { -#ifdef JVT + } else { m_jvt.disable(); m_cleaningTool.disable(); -#endif - } + m_ECTool.disable(); + } return TileFatherMonTool::initialize(); } @@ -737,124 +724,55 @@ bool TileJetMonTool::isGoodEvent() { if (! m_do_event_cleaning) return true; ATH_MSG_DEBUG("TileJetMonTool::isGoodEvent()...."); - const EventInfo* eventInfo(NULL); - CHECK(evtStore()->retrieve(eventInfo), false); + const EventInfo* eventInfo = nullptr; + if (! evtStore()->retrieve(eventInfo, "EventInfo").isSuccess()){ + ATH_MSG_ERROR("Cannot retrieve EventInfo object!"); + return false; + } if (eventInfo->errorState(EventInfo::LAr) == EventInfo::Error) return(false); if (eventInfo->errorState(EventInfo::Tile) == EventInfo::Error) return(false); - /* see https://twiki.cern.ch/twiki/bin/viewauth/AtlasProtected/HowToCleanJets2015#Event_Cleaning and - https://twiki.cern.ch/twiki/bin/view/AtlasProtected/JetVertexTaggerTool + /* see https://twiki.cern.ch/twiki/bin/view/AtlasProtected/HowToCleanJets2017 */ - -#ifdef JVT if (! m_do_jet_cleaning) return true; -#endif - const xAOD::JetContainer* jetContainer = evtStore()->tryConstRetrieve<xAOD::JetContainer>("AntiKt4EMTopoJets"); - if (!jetContainer) return true; + const xAOD::JetContainer* jetContainer = nullptr; + if (! evtStore()->retrieve(jetContainer, "AntiKt4EMTopoJets").isSuccess()){ + ATH_MSG_INFO("Cannot retrieve AntiKt4EMTopoJets. However, returning true."); + return true; + } + auto jetsSC = xAOD::shallowCopyContainer(*jetContainer); int ijet=0; - for (const xAOD::Jet* jet : *jetContainer) { + for (auto jet : *jetsSC.first) { ATH_MSG_DEBUG("Jet " << ijet << ", pT " << jet->pt()/1000.0 << " GeV, eta " << jet->eta()); -#ifdef JVT - if (jet->pt() > 50000) { - if (m_cleaningTool->keep(*jet) == 0) return false; - } else if ((jet->pt() > 20000) && (fabs(jet->eta()) < m_jet_tracking_eta_limit)) { - float jvt = m_jvt->updateJvt(*jet); - ATH_MSG_DEBUG("... jvt = " << jvt); - if ((jvt > m_jet_jvt_threshold) && (m_cleaningTool->keep(*jet) == 0)) return false; - } -#endif + jet->auxdata<char>(m_JvtDecorator) = passesJvt(*jet); + jet->auxdata<char>(m_OrDecorator) = true; ATH_MSG_DEBUG("... done with jet " << ijet); ijet++; } + bool accept = m_ECTool->acceptEvent(jetsSC.first); + delete jetsSC.first; + delete jetsSC.second; + return accept; +} + +bool TileJetMonTool::passesJvt(const xAOD::Jet& jet) { + if (jet.pt() > m_jetPtMin + && jet.pt() < m_jet_jvt_ptmax + && fabs(jet.getAttribute<float>("DetectorEta")) < m_jet_tracking_eta_limit + && m_jvt->updateJvt(jet) < m_jet_jvt_threshold) + return false; return true; } bool TileJetMonTool::isGoodJet(const xAOD::Jet& jet) { - /* Run-1 stuff - double hecf = jet.getAttribute<float>(xAOD::JetAttribute::HECFrac); - - //double tileGap3f = tileGap3F(&jet); - - double quality = jet.getAttribute<float>(xAOD::JetAttribute::LArQuality); - double HecQ = jet.getAttribute<float>(xAOD::JetAttribute::HECQuality); - double NegE = jet.getAttribute<float>(xAOD::JetAttribute::NegativeE); - double emf = jet.getAttribute<float>(xAOD::JetAttribute::EMFrac); - double time = jet.getAttribute<float>(xAOD::JetAttribute::Timing); - double pt = jet.pt(); - const std::vector<float>& sumPtTrk = jet.getAttribute<std::vector<float> >(xAOD::JetAttribute::SumPtTrkPt1000); - double chf = (pt != 0 && !sumPtTrk.empty()) ? sumPtTrk[0] / pt : 0; - - double em_eta = jet.jetP4(xAOD::JetEMScaleMomentum).eta(); - - double fmax = jet.getAttribute<float>(xAOD::JetAttribute::FracSamplingMax); - - bool isBadJet = isBad(MediumBad, quality, NegE, emf, hecf, time, fmax, em_eta, chf, HecQ); - return (!isBadJet); - */ -#ifdef JVT if (! m_do_jet_cleaning) return true; - double pt = jet.pt(); - if (pt > 50000) { - return(m_cleaningTool->keep(jet)); - } else if (pt > 20000) { - if (fabs(jet.eta()) < m_jet_tracking_eta_limit) { - float jvt = m_jvt->updateJvt(jet); - return(m_cleaningTool->keep(jet) && (jvt > m_jet_jvt_threshold)); - } else { - return(true); - } - } else { - return(true); - } -#else - return(true); -#endif -} - -/* - This is copy & paste from JetCaloUtilsFillerTool.cxx. The function is private, - so it cannot be just included -*/ -bool TileJetMonTool::isBad(BadJetCategory criteria, double quality, double NegE, double emf, - double hecf, double time, double fmax, double eta, double chf, double HecQ) { - if (criteria == LooseBad || criteria == MediumBad || criteria == TightBad) { - // HEC spike - if (hecf > 0.5 && fabs(HecQ) > 0.5) return true; - if (fabs(NegE) > 60000./*MeV*/) return true; - // EM coherent noise - if (emf > 0.95 && fabs(quality) > 0.8 && fabs(eta) < 2.8) return true; - // Cosmics and Beam background - if (fabs(time) > 25.) return true; - if (emf < 0.05 && chf < 0.05 && fabs(eta) < 2.) return true; - if (emf < 0.05 && fabs(eta) > 2.) return true; - if (fmax > 0.99 && fabs(eta) < 2) return true; - } - - if (criteria == MediumBad || criteria == TightBad) { - // HEC spike - if (hecf > 1 - fabs(HecQ)) return true; - // EM coherent noise - if (emf > 0.9 && fabs(quality) > 0.8 && fabs(eta) < 2.8) return true; - // Cosmics and Beam background - if (fabs(time) > 10.) return true; - if (emf < 0.05 && chf < 0.1 && fabs(eta) < 2.) return true; - if (emf > 0.95 && chf < 0.05 && fabs(eta) < 2.) return true; - } - - if (criteria == TightBad) { - // EM coherent noise - if (fabs(quality) > 0.95) return true; - if (emf > 0.98 && fabs(quality) > 0.05) return true; - // Cosmics and Beam background - if (emf < 0.1 && chf < 0.2 && fabs(eta) < 2.) return true; - if (emf < 0.1 && fabs(eta) > 2.) return true; - if (emf > 0.9 && chf < 0.02 && fabs(eta) < 2.) return true; - - } - return false; + if (jet.pt() < m_jetPtMin) return false; + if (! passesJvt(jet)) return false; + if (! m_cleaningTool->keep(jet)) return false; + return true; } unsigned int TileJetMonTool::find_index(const int gain, const float energy) { diff --git a/Trigger/TrigAlgorithms/TrigEFMissingET/test/test_met_fexes.sh b/Trigger/TrigAlgorithms/TrigEFMissingET/test/test_met_fexes.sh index e561e9830be77ec9d27f18fa97c146de99a7ed54..33591ac57d95f2c9d490e06990f872746830f226 100755 --- a/Trigger/TrigAlgorithms/TrigEFMissingET/test/test_met_fexes.sh +++ b/Trigger/TrigAlgorithms/TrigEFMissingET/test/test_met_fexes.sh @@ -12,7 +12,7 @@ OPT_DEBUG="" OPT_EVT=10 OPT_THREADS=1 OPT_FILES_INPUT=""/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data17_13TeV.00327265.physics_EnhancedBias.merge.RAW._lb0100._SFO-1._0001.1"" -OPT_JOBO="TrigUpradeTest/met.menu.py" +OPT_JOBO="TrigUpgradeTest/met.menu.py" OPT_DRY_RUN=0 OPT_LOG_LEVEL="" OPT_INTERACTIVE=0 diff --git a/Trigger/TrigFTK/FastTrackSimWrap/FastTrackSimWrap/FTKRegionalWrapper.h b/Trigger/TrigFTK/FastTrackSimWrap/FastTrackSimWrap/FTKRegionalWrapper.h index 9844bbb6ebabcd19a034b63a52192699f31b48cc..eb779d9ab0709808bbedfbd7062f70fc5e9ae6f4 100644 --- a/Trigger/TrigFTK/FastTrackSimWrap/FastTrackSimWrap/FTKRegionalWrapper.h +++ b/Trigger/TrigFTK/FastTrackSimWrap/FastTrackSimWrap/FTKRegionalWrapper.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef FTKRegionalWrapper_h @@ -58,7 +58,7 @@ private: ToolHandle<ITrigFTKClusterConverterTool> m_clusterConverterTool; /** Tool to convert FTKHits to IDClusters */ ServiceHandle<IPixelCablingSvc> m_pix_cabling_svc; - ToolHandle<ISCT_CablingTool> m_sct_cablingToolCB; // This class accesses SCT cabling during initialization. + ToolHandle<ISCT_CablingTool> m_sct_cablingToolInc; // This class accesses SCT cabling during initialization. // Needed to retrieve m_pixelId in order to get the barrel_ec, phi/eta_modules etc. diff --git a/Trigger/TrigFTK/FastTrackSimWrap/src/FTKRegionalWrapper.cxx b/Trigger/TrigFTK/FastTrackSimWrap/src/FTKRegionalWrapper.cxx index 48775b6dfa7b54cb1711cf8c366d33da50970c52..827ef98bec19cfc779bb3c0f3a20a2e703208676 100644 --- a/Trigger/TrigFTK/FastTrackSimWrap/src/FTKRegionalWrapper.cxx +++ b/Trigger/TrigFTK/FastTrackSimWrap/src/FTKRegionalWrapper.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "xAODTracking/TrackParticleContainer.h" #include "FastTrackSimWrap/FTKRegionalWrapper.h" @@ -46,7 +46,7 @@ FTKRegionalWrapper::FTKRegionalWrapper (const std::string& name, ISvcLocator* pS m_hitInputTool("FTK_SGHitInput/FTK_SGHitInput"), m_clusterConverterTool("TrigFTKClusterConverterTool"), m_pix_cabling_svc("PixelCablingSvc", name), - m_sct_cablingToolCB("SCT_CablingToolCB"), + m_sct_cablingToolInc("SCT_CablingToolInc"), m_storeGate(0), m_detStore( 0 ), m_evtStore(0 ), @@ -146,7 +146,7 @@ FTKRegionalWrapper::FTKRegionalWrapper (const std::string& name, ISvcLocator* pS declareProperty("FixEndcapL0", m_fixEndcapL0); declareProperty("ITkMode",m_ITkMode); declareProperty("PixelCablingSvc", m_pix_cabling_svc); - declareProperty("SCT_CablingTool",m_sct_cablingToolCB); + declareProperty("SCT_CablingTool",m_sct_cablingToolInc); // hit type options declareProperty("SaveRawHits",m_SaveRawHits); @@ -261,11 +261,11 @@ StatusCode FTKRegionalWrapper::initialize() log << MSG::FATAL << "SCT_Cabling not initialized so m_DumpTestVectors and m_EmulateDF must both be set to false!" << endmsg; return StatusCode::FAILURE; } - } else if (m_sct_cablingToolCB.retrieve().isFailure()) { - log << MSG::FATAL << "Failed to retrieve tool " << m_sct_cablingToolCB << endmsg; + } else if (m_sct_cablingToolInc.retrieve().isFailure()) { + log << MSG::FATAL << "Failed to retrieve tool " << m_sct_cablingToolInc << endmsg; return StatusCode::FAILURE; } else { - log << MSG::INFO << "Retrieved tool " << m_sct_cablingToolCB << endmsg; + log << MSG::INFO << "Retrieved tool " << m_sct_cablingToolInc << endmsg; } if (!m_SaveRawHits && !m_SaveHits) { @@ -390,14 +390,14 @@ StatusCode FTKRegionalWrapper::initialize() //uint id = mit->first; ATH_MSG_DEBUG("Pixel offline map hashID to RobId "<<MSG::dec<<mit->first<<" "<<MSG::hex<<mit->second<<MSG::dec); } - ATH_MSG_DEBUG("Printing full SCT map via m_sct_cablingToolCB->getAllRods()"); + ATH_MSG_DEBUG("Printing full SCT map via m_sct_cablingToolInc->getAllRods()"); std::vector<uint32_t> sctVector; - m_sct_cablingToolCB->getAllRods(sctVector); - ATH_MSG_DEBUG("Printing full SCT map via m_sct_cablingToolCB->getAllRods() "<<sctVector.size()<<" rods "); + m_sct_cablingToolInc->getAllRods(sctVector); + ATH_MSG_DEBUG("Printing full SCT map via m_sct_cablingToolInc->getAllRods() "<<sctVector.size()<<" rods "); for(auto mit = sctVector.begin(); mit != sctVector.end(); mit++){ // Retrive hashlist - m_sct_cablingToolCB->getHashesForRod(m_identifierHashList,*mit ); + m_sct_cablingToolInc->getHashesForRod(m_identifierHashList,*mit ); ATH_MSG_DEBUG("Retrieved "<<m_identifierHashList.size()<<" hashes "); for (auto mhit = m_identifierHashList.begin(); mhit != m_identifierHashList.end(); mhit++) @@ -641,7 +641,7 @@ StatusCode FTKRegionalWrapper::execute() //SCT //then get the corresponding RobId - uint32_t robid = m_sct_cablingToolCB->getRobIdFromHash(modHash); + uint32_t robid = m_sct_cablingToolInc->getRobIdFromHash(modHash); if (dumpedSCT == false){ ATH_MSG_VERBOSE("Dumping SCT Rod List "); @@ -1070,7 +1070,7 @@ bool FTKRegionalWrapper::dumpFTKTestVectors(FTKPlaneMap *pmap, FTKRegionMap *rma // The getAllRods returns all of the rods in the StoreGateSvc hitTyp = 0; vector<uint32_t> sctrods; - m_sct_cablingToolCB->getAllRods(sctrods); + m_sct_cablingToolInc->getAllRods(sctrods); id = 0; for (uint32_t rod : sctrods) { @@ -1086,7 +1086,7 @@ bool FTKRegionalWrapper::dumpFTKTestVectors(FTKPlaneMap *pmap, FTKRegionMap *rma if (myfile.is_open() ) { // Retrive hashlist - m_sct_cablingToolCB->getHashesForRod(m_identifierHashList,rod ); + m_sct_cablingToolInc->getHashesForRod(m_identifierHashList,rod ); // Some dumping variables vector<IdentifierHash>::const_iterator hashit = m_identifierHashList.begin(); @@ -1096,7 +1096,7 @@ bool FTKRegionalWrapper::dumpFTKTestVectors(FTKPlaneMap *pmap, FTKRegionMap *rma for (; hashit != hashit_e; ++hashit){ // TODO: Check for invalid onlineId && hashId numbers (?) // Retrieve OnlineId - sct_onlineId = m_sct_cablingToolCB->getOnlineIdFromHash( *hashit ); + sct_onlineId = m_sct_cablingToolInc->getOnlineIdFromHash( *hashit ); if (sct_onlineId.rod() == rod){ // Check for correct rodId myfile.setf(ios::right | ios::showbase); diff --git a/Trigger/TrigT1/L1Topo/L1TopoCoreSim/L1TopoCoreSim/TopoASCIIReader.h b/Trigger/TrigT1/L1Topo/L1TopoCoreSim/L1TopoCoreSim/TopoASCIIReader.h index e4901d1d4d3024e285054d09ec31bed6b8b39a92..42de59df4f50649198f6ba7bafba6be7940c88f4 100644 --- a/Trigger/TrigT1/L1Topo/L1TopoCoreSim/L1TopoCoreSim/TopoASCIIReader.h +++ b/Trigger/TrigT1/L1Topo/L1TopoCoreSim/L1TopoCoreSim/TopoASCIIReader.h @@ -1,11 +1,11 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ // TopoASCIIReader.h // L1TopoCoreSimulation -#ifndef __L1TopoCoreSimulation__TopoASCIIReader__ -#define __L1TopoCoreSimulation__TopoASCIIReader__ +#ifndef L1TOPOCORESIM_TOPOASCIIREADER_H +#define L1TOPOCORESIM_TOPOASCIIREADER_H #include "L1TopoEvent/TopoInputEvent.h" #include "L1TopoEvent/ClusterTOB.h" @@ -26,7 +26,7 @@ #include <sstream> #include <vector> -using namespace std; + namespace TCS { diff --git a/Trigger/TrigT1/TrigT1CaloCalibConditions/src/L1CaloEnergyScanResultsContainer.cxx b/Trigger/TrigT1/TrigT1CaloCalibConditions/src/L1CaloEnergyScanResultsContainer.cxx index f71f18a117af80ea68c2a549e800d4e3f32980ff..338f7b60889aa6bf1428c5def81e1a9834069b88 100644 --- a/Trigger/TrigT1/TrigT1CaloCalibConditions/src/L1CaloEnergyScanResultsContainer.cxx +++ b/Trigger/TrigT1/TrigT1CaloCalibConditions/src/L1CaloEnergyScanResultsContainer.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "TrigT1CaloCalibConditions/L1CaloEnergyScanResultsContainer.h" @@ -109,7 +109,7 @@ void L1CaloEnergyScanResultsContainer::makeTransient(const std::map<std::string, CondAttrListCollection::const_iterator end = attrListCollection->begin(); for(; pos!= end; ++pos) { - AthenaAttributeList attrList = pos->second; + const coral::AttributeList& attrList = pos->second; // Get value of each row for the current channel CondAttrListCollection::ChanNum chanNum(pos->first); diff --git a/Trigger/TrigT1/TrigT1CaloCalibConditions/src/L1CaloHVCorrectionsContainer.cxx b/Trigger/TrigT1/TrigT1CaloCalibConditions/src/L1CaloHVCorrectionsContainer.cxx index 570b2ce80b16cf95444a67292c6fce53f326a63b..4c52deca03b7419643e38039a5ee77a15128965a 100644 --- a/Trigger/TrigT1/TrigT1CaloCalibConditions/src/L1CaloHVCorrectionsContainer.cxx +++ b/Trigger/TrigT1/TrigT1CaloCalibConditions/src/L1CaloHVCorrectionsContainer.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "TrigT1CaloCalibConditions/L1CaloHVCorrectionsContainer.h" @@ -124,7 +124,7 @@ void L1CaloHVCorrectionsContainer::makeTransient(const std::map<std::string, Con CondAttrListCollection::const_iterator end = attrListCollection->end(); for(; pos!= end; ++pos) { - AthenaAttributeList attrList = pos->second; + const coral::AttributeList& attrList = pos->second; // Get value of each row for the current channel CondAttrListCollection::ChanNum chanNum(pos->first); diff --git a/Trigger/TrigT1/TrigT1CaloCalibConditions/src/L1CaloPedestalContainer.cxx b/Trigger/TrigT1/TrigT1CaloCalibConditions/src/L1CaloPedestalContainer.cxx index 8a8abeb6c0f59d722c837fbc08088a231805868d..c6418da0bc6a86d5dd9381db1b9f6e93f031ec35 100755 --- a/Trigger/TrigT1/TrigT1CaloCalibConditions/src/L1CaloPedestalContainer.cxx +++ b/Trigger/TrigT1/TrigT1CaloCalibConditions/src/L1CaloPedestalContainer.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "TrigT1CaloCalibConditions/L1CaloPedestalContainer.h" @@ -63,7 +63,7 @@ void L1CaloPedestalContainer::makeTransient(const CondAttrListCollection*& attrL CondAttrListCollection::const_iterator it = attrListCollection->begin(); for(;it!=attrListCollection->end();++it) { - AthenaAttributeList attrList = it->second; + const coral::AttributeList& attrList = it->second; // Get value of each row for the current channel CondAttrListCollection::ChanNum chanNum = it->first; diff --git a/Trigger/TrigT1/TrigT1CaloCalibConditions/src/L1CaloPpmFineTimeRefsContainer.cxx b/Trigger/TrigT1/TrigT1CaloCalibConditions/src/L1CaloPpmFineTimeRefsContainer.cxx index b4590d1e08c78016c2cd4bf7751576ddde5a8b0f..d4d205e040326dbf9cca9263b6d75295aa463b58 100755 --- a/Trigger/TrigT1/TrigT1CaloCalibConditions/src/L1CaloPpmFineTimeRefsContainer.cxx +++ b/Trigger/TrigT1/TrigT1CaloCalibConditions/src/L1CaloPpmFineTimeRefsContainer.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "TrigT1CaloCalibConditions/L1CaloPpmFineTimeRefsContainer.h" @@ -98,7 +98,7 @@ void L1CaloPpmFineTimeRefsContainer::makeTransient(const std::map<std::string, C CondAttrListCollection::const_iterator it = attrListCollection->begin(); for(;it!=attrListCollection->end();++it) { - AthenaAttributeList attrList = it->second; + const coral::AttributeList& attrList = it->second; // Get value of each row for the current channel CondAttrListCollection::ChanNum chanNum = it->first; diff --git a/Trigger/TrigT1/TrigT1CaloCalibConditions/src/L1CaloPprConditionsContainer.cxx b/Trigger/TrigT1/TrigT1CaloCalibConditions/src/L1CaloPprConditionsContainer.cxx index 1ca3eac3d34cdffe0a505536ea3d61d884ece382..5dea8038aa1fc1be8623136e0837efabf1b5bbf2 100755 --- a/Trigger/TrigT1/TrigT1CaloCalibConditions/src/L1CaloPprConditionsContainer.cxx +++ b/Trigger/TrigT1/TrigT1CaloCalibConditions/src/L1CaloPprConditionsContainer.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "TrigT1CaloCalibConditions/L1CaloPprConditionsContainer.h" @@ -164,7 +164,7 @@ void L1CaloPprConditionsContainer::makeTransient(const std::map<std::string, Con // There should be only one channel (channel#1) in the Default folder // we just retrieve that one, waiting for a better method to retrieve that information. const int defaultChannel = 1; - const AthenaAttributeList& chanDefaultAttrList(chanDefaultsAttrListCollection->attributeList(defaultChannel)); + const coral::AttributeList& chanDefaultAttrList(chanDefaultsAttrListCollection->attributeList(defaultChannel)); m_bcidDecision1 = chanDefaultAttrList[ this->specificationName(eBcidDecision1) ].data<unsigned int>(); m_satOverride1 = chanDefaultAttrList[ this->specificationName(eSatOverride1) ].data<unsigned int>(); @@ -180,7 +180,7 @@ void L1CaloPprConditionsContainer::makeTransient(const std::map<std::string, Con for(;it_AttrListColl!=chanCalibAttrListCollection->end();++it_AttrListColl) { CondAttrListCollection::ChanNum chanNum(it_AttrListColl->first); - const AthenaAttributeList& chanCalibAttrList(it_AttrListColl->second); + const coral::AttributeList& chanCalibAttrList(it_AttrListColl->second); unsigned short extBcidThreshold = chanCalibAttrList[ this->specificationName(eExtBcidThreshold) ].data<unsigned short>(); unsigned short satBcidThreshLow = chanCalibAttrList[ this->specificationName(eSatBcidThreshLow) ].data<unsigned short>(); diff --git a/Trigger/TrigT1/TrigT1CaloCalibConditions/src/L1CaloPprConditionsContainerRun2.cxx b/Trigger/TrigT1/TrigT1CaloCalibConditions/src/L1CaloPprConditionsContainerRun2.cxx index 4f2dab89e4030a962342a6fdebd9ebd9a6b3d13e..2897a06fe34ffe93d21cdd29d500cba16ce6cca5 100644 --- a/Trigger/TrigT1/TrigT1CaloCalibConditions/src/L1CaloPprConditionsContainerRun2.cxx +++ b/Trigger/TrigT1/TrigT1CaloCalibConditions/src/L1CaloPprConditionsContainerRun2.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "TrigT1CaloCalibConditions/L1CaloPprConditionsContainerRun2.h" @@ -257,8 +257,8 @@ void L1CaloPprConditionsContainerRun2::makeTransient(const std::map< // we just retrieve that one, waiting for a better method to retrieve that // information. const int defaultChannel = 1; - const AthenaAttributeList& chanDefaultAttrList( - chanDefaultsAttrListCollection->attributeList(defaultChannel)); + const coral::AttributeList& chanDefaultAttrList = + chanDefaultsAttrListCollection->attributeList(defaultChannel); m_bcidDecision1 = chanDefaultAttrList[this->specificationName(eBcidDecision1)].data<int>(); @@ -291,7 +291,7 @@ void L1CaloPprConditionsContainerRun2::makeTransient(const std::map< continue; } // ------------------------------------------------------------------------ - const AthenaAttributeList& chanCalibAttrList(it_AttrListColl->second); + const coral::AttributeList& chanCalibAttrList(it_AttrListColl->second); // ------------------------------------------------------------------------ unsigned short extBcidThreshold = chanCalibAttrList[this->specificationName(eExtBcidThreshold)] @@ -433,7 +433,7 @@ void L1CaloPprConditionsContainerRun2::makeTransient(const std::map< continue; } - const AthenaAttributeList& chanCalibAttrList(it_AttrListColl->second); + const coral::AttributeList& chanCalibAttrList(it_AttrListColl->second); if (m_pprConditionsVec[index] == nullptr){ std::cout << "L1CaloPprConditionsContainerRun2 : Could not find channel " diff --git a/Trigger/TrigT1/TrigT1CaloCalibConditions/src/L1CaloPprDisabledChannelContainer.cxx b/Trigger/TrigT1/TrigT1CaloCalibConditions/src/L1CaloPprDisabledChannelContainer.cxx index 5529f9f9ad764d40aaa0ff73065f1d15419355bd..55cbc307992b61b495ea230cf03acd8cc57c5c6d 100755 --- a/Trigger/TrigT1/TrigT1CaloCalibConditions/src/L1CaloPprDisabledChannelContainer.cxx +++ b/Trigger/TrigT1/TrigT1CaloCalibConditions/src/L1CaloPprDisabledChannelContainer.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "TrigT1CaloCalibConditions/L1CaloPprDisabledChannelContainer.h" @@ -154,7 +154,7 @@ void L1CaloPprDisabledChannelContainer::makeTransient(const std::map<std::string it_attrE = deadChannelsAttrListCollection->end(); for(;it_attr!=it_attrE;++it_attr) { - const AthenaAttributeList& attrList(it_attr->second); + const coral::AttributeList& attrList(it_attr->second); // Get value of each row for the current channel CondAttrListCollection::ChanNum chanNum(it_attr->first); @@ -181,7 +181,7 @@ void L1CaloPprDisabledChannelContainer::makeTransient(const std::map<std::string it_attrE = calibChannelsAttrListCollection->end(); for(;it_attr!=it_attrE;++it_attr) { - const AthenaAttributeList& attrList(it_attr->second); + const coral::AttributeList& attrList(it_attr->second); // Get value of each row for the current channel CondAttrListCollection::ChanNum chanNum(it_attr->first); @@ -203,7 +203,7 @@ void L1CaloPprDisabledChannelContainer::makeTransient(const std::map<std::string it_attrE = disabledTowersAttrListCollection->end(); for(;it_attr!=it_attrE;++it_attr) { - const AthenaAttributeList& attrList(it_attr->second); + const coral::AttributeList& attrList(it_attr->second); // Get value of each row for the current channel CondAttrListCollection::ChanNum chanNum(it_attr->first); diff --git a/Trigger/TrigT1/TrigT1CaloCalibConditions/src/L1CaloPprLutContainer.cxx b/Trigger/TrigT1/TrigT1CaloCalibConditions/src/L1CaloPprLutContainer.cxx index 13687122dcd1acf3bb93b11844552e39dedd8a78..615aec652741b844b1a55b4af32bad343d1e6c83 100755 --- a/Trigger/TrigT1/TrigT1CaloCalibConditions/src/L1CaloPprLutContainer.cxx +++ b/Trigger/TrigT1/TrigT1CaloCalibConditions/src/L1CaloPprLutContainer.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "TrigT1CaloCalibConditions/L1CaloPprLutContainer.h" @@ -108,7 +108,7 @@ void L1CaloPprLutContainer::makeTransient(const std::map<std::string, CondAttrLi CondAttrListCollection::const_iterator it = attrListCollection->begin(); for(;it!=attrListCollection->end();++it) { - AthenaAttributeList attrList = it->second; + const coral::AttributeList& attrList = it->second; // Get value of each row for the current channel CondAttrListCollection::ChanNum chanNum(it->first); diff --git a/Trigger/TrigT1/TrigT1CaloCalibConditions/src/L1CaloRxGainContainer.cxx b/Trigger/TrigT1/TrigT1CaloCalibConditions/src/L1CaloRxGainContainer.cxx index 8cad7e18f598c1422a3fa7f32cb95e7159402f90..8f6c41fc4027d103e296f9ac951c7968e8a75484 100755 --- a/Trigger/TrigT1/TrigT1CaloCalibConditions/src/L1CaloRxGainContainer.cxx +++ b/Trigger/TrigT1/TrigT1CaloCalibConditions/src/L1CaloRxGainContainer.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "TrigT1CaloCalibConditions/L1CaloRxGainContainer.h" @@ -103,7 +103,7 @@ void L1CaloRxGainContainer::makeTransient(const std::map<std::string, CondAttrLi CondAttrListCollection::const_iterator it = attrListCollection->begin(); for(;it!=attrListCollection->end();++it) { - AthenaAttributeList attrList = it->second; + const coral::AttributeList& attrList = it->second; // Get value of each row for the current channel CondAttrListCollection::ChanNum chanNum = it->first; diff --git a/Trigger/TrigT1/TrigT1CaloCalibConditions/src/L1CaloRxLayersContainer.cxx b/Trigger/TrigT1/TrigT1CaloCalibConditions/src/L1CaloRxLayersContainer.cxx index a6befeb18cd2c70dd108174dfe291f32d7469b3b..9a6ac8b2ee959bdb87004a736024babe4e0b3b36 100644 --- a/Trigger/TrigT1/TrigT1CaloCalibConditions/src/L1CaloRxLayersContainer.cxx +++ b/Trigger/TrigT1/TrigT1CaloCalibConditions/src/L1CaloRxLayersContainer.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "TrigT1CaloCalibConditions/L1CaloRxLayersContainer.h" @@ -124,7 +124,7 @@ void L1CaloRxLayersContainer::makeTransient(const std::map<std::string, CondAttr CondAttrListCollection::const_iterator end = attrListCollection->end(); for(; pos!= end; ++pos) { - AthenaAttributeList attrList = pos->second; + const coral::AttributeList& attrList = pos->second; // Get value of each row for the current channel CondAttrListCollection::ChanNum chanNum(pos->first); diff --git a/Trigger/TrigValidation/TrigUpgradeTest/python/MuonSetup.py b/Trigger/TrigValidation/TrigUpgradeTest/python/MuonSetup.py index 5611105e81a4538a175aae6738aa504cbd69040a..64a8a435f92691fe38fcc89a8e93e49afa00801b 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/python/MuonSetup.py +++ b/Trigger/TrigValidation/TrigUpgradeTest/python/MuonSetup.py @@ -438,7 +438,7 @@ def l2muisoRecoSequence( RoIs, OutputLevel=INFO ): return l2muisoRecoSequence, sequenceOut -def muEFSARecoSequence( RoIs, OutputLevel=INFO ): +def muEFSARecoSequence( RoIs, name, OutputLevel=INFO ): from MuonRecExample.MuonRecFlags import muonRecFlags from AthenaCommon.DetFlags import DetFlags @@ -451,7 +451,7 @@ def muEFSARecoSequence( RoIs, OutputLevel=INFO ): from AthenaCommon import CfgMgr from AthenaCommon.CFElements import parOR, seqAND, seqOR, stepSeq - muEFSARecoSequence = parOR("efmsViewNode") + muEFSARecoSequence = parOR("efmsViewNode_"+name) efAlgs = [] @@ -469,7 +469,7 @@ def muEFSARecoSequence( RoIs, OutputLevel=INFO ): theSegmentFinder = CfgGetter.getPublicToolClone("MuonSegmentFinder","MooSegmentFinder", OutputLevel=OutputLevel ) theSegmentFinder.DoSummary=True CfgGetter.getPublicTool("MuonLayerHoughTool").DoTruth=False - theSegmentFinderAlg=CfgMgr.MooSegmentFinderAlg( "MuonSegmentMaker", + theSegmentFinderAlg=CfgMgr.MooSegmentFinderAlg( "MuonSegmentMaker_"+name, SegmentFinder=theSegmentFinder, MuonSegmentOutputLocation = "MooreSegments", UseCSC = muonRecFlags.doCSCs(), @@ -484,7 +484,7 @@ def muEFSARecoSequence( RoIs, OutputLevel=INFO ): - theNCBSegmentFinderAlg=CfgMgr.MooSegmentFinderAlg( "MuonSegmentMaker_NCB", + theNCBSegmentFinderAlg=CfgMgr.MooSegmentFinderAlg( "MuonSegmentMaker_NCB_"+name, OutputLevel = OutputLevel, SegmentFinder = getPublicToolClone("MooSegmentFinder_NCB","MuonSegmentFinder", DoSummary=False, @@ -523,7 +523,7 @@ def muEFSARecoSequence( RoIs, OutputLevel=INFO ): muonRecTrackParticleContainerCnvTool = xAODMaker__RecTrackParticleContainerCnvTool(name = "MuonRecTrackParticleContainerCnvTool", TrackParticleCreator = muonParticleCreatorTool ) - xAODTrackParticleCnvAlg = xAODMaker__TrackParticleCnvAlg( name = "MuonStandaloneTrackParticleCnvAlg", + xAODTrackParticleCnvAlg = xAODMaker__TrackParticleCnvAlg( name = "MuonStandaloneTrackParticleCnvAlg_"+name, TrackParticleCreator = muonParticleCreatorTool, TrackCollectionCnvTool=muonTrackCollectionCnvTool, RecTrackParticleContainerCnvTool = muonRecTrackParticleContainerCnvTool, @@ -535,13 +535,13 @@ def muEFSARecoSequence( RoIs, OutputLevel=INFO ): theCandidateTool = getPublicToolClone("MuonCandidateTool_SA", "MuonCandidateTool", TrackBuilder="",ExtrapolationStrategy=1) - theMuonCandidateAlg=CfgMgr.MuonCombinedMuonCandidateAlg("MuonCandidateAlg",MuonCandidateTool=theCandidateTool) + theMuonCandidateAlg=CfgMgr.MuonCombinedMuonCandidateAlg("MuonCandidateAlg_"+name,MuonCandidateTool=theCandidateTool) muonparticlecreator = getPublicToolClone("MuonParticleCreator", "TrackParticleCreatorTool", UseTrackSummaryTool=False, UseMuonSummaryTool=True, KeepAllPerigee=True) thecreatortool= getPublicToolClone("MuonCreatorTool_SA", "MuonCreatorTool", ScatteringAngleTool="", MuonSelectionTool="", FillTimingInformation=False, UseCaloCells=False, MakeSAMuons=True, MomentumBalanceTool="", TrackParticleCreator=muonparticlecreator, OutputLevel=DEBUG) - themuoncreatoralg = CfgMgr.MuonCreatorAlg("MuonCreatorAlg", MuonCreatorTool=thecreatortool, CreateSAmuons=True, MakeClusters=False, TagMaps=[], MuonContainerLocation=muEFSAInfo) + themuoncreatoralg = CfgMgr.MuonCreatorAlg("MuonCreatorAlg_"+name, MuonCreatorTool=thecreatortool, CreateSAmuons=True, MakeClusters=False, TagMaps=[], MuonContainerLocation=muEFSAInfo+"_"+name ) #Algorithms to views efAlgs.append( theSegmentFinderAlg ) @@ -551,13 +551,18 @@ def muEFSARecoSequence( RoIs, OutputLevel=INFO ): efAlgs.append( theMuonCandidateAlg ) efAlgs.append( themuoncreatoralg ) + # setup muEFMsonly algs for efAlg in efAlgs: if efAlg.properties().has_key("RoIs"): + if "FS" in RoIs: + efAlg.RoIs = "FSRoI" + else: efAlg.RoIs = RoIs muEFSARecoSequence += efAlg sequenceOut = themuoncreatoralg.MuonContainerLocation + return muEFSARecoSequence, sequenceOut diff --git a/Trigger/TrigValidation/TrigUpgradeTest/python/muMenuDefs.py b/Trigger/TrigValidation/TrigUpgradeTest/python/muMenuDefs.py index 24febe797233219afd23ebfb8d67d302da198b4e..addc98ddd19e8462a2eeb1f311a44fa9b0d656f9 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/python/muMenuDefs.py +++ b/Trigger/TrigValidation/TrigUpgradeTest/python/muMenuDefs.py @@ -139,7 +139,7 @@ def muEFMSStep(): ### get EF reco sequence ### from TrigUpgradeTest.MuonSetup import muEFSARecoSequence - muEFMSRecoSequence, sequenceOut = muEFSARecoSequence( efmsViewsMaker.InViewRoIs, OutputLevel=DEBUG ) + muEFMSRecoSequence, sequenceOut = muEFSARecoSequence( efmsViewsMaker.InViewRoIs, 'RoI', OutputLevel=DEBUG ) efmsViewsMaker.ViewNodeName = muEFMSRecoSequence.name() @@ -169,7 +169,7 @@ def muEFSAStep(): ### get EF reco sequence ### from TrigUpgradeTest.MuonSetup import muEFSARecoSequence - muEFSARecoSequence, sequenceOut = muEFSARecoSequence( efsaViewsMaker.InViewRoIs, OutputLevel=DEBUG ) + muEFSARecoSequence, sequenceOut = muEFSARecoSequence( efsaViewsMaker.InViewRoIs, 'RoI', OutputLevel=DEBUG ) efsaViewsMaker.ViewNodeName = muEFSARecoSequence.name() @@ -222,6 +222,37 @@ def muEFCBStep(): Hypo = trigMuonEFCBHypo, HypoToolGen = TrigMuonEFCombinerHypoToolFromName ) +### EF SA full scan ### +def muEFSAFSStep(): + + efsafsInputMaker = EventViewCreatorAlgorithm("MuonFSInputMaker", RoIsLink="initialRoI",OutputLevel=VERBOSE) + efsafsInputMaker.InViewRoIs = "MUFSRoIs" + efsafsInputMaker.Views = "MUFSViewRoI" + efsafsInputMaker.ViewPerRoI=True + efsafsInputMaker.ViewFallThrough=True + + ### get EF reco sequence ### + from TrigUpgradeTest.MuonSetup import muEFSARecoSequence + muEFSAFSRecoSequence, sequenceOut = muEFSARecoSequence( efsafsInputMaker.InViewRoIs,'FS', OutputLevel=DEBUG ) + + efsafsInputMaker.ViewNodeName = muEFSAFSRecoSequence.name() + + # setup EFSA hypo + from TrigMuonHypoMT.TrigMuonHypoMTConfig import TrigMuonEFMSonlyHypoAlg + trigMuonEFSAFSHypo = TrigMuonEFMSonlyHypoAlg( "TrigMuonEFSAFSHypoAlg" ) + trigMuonEFSAFSHypo.OutputLevel = DEBUG + trigMuonEFSAFSHypo.MuonDecisions = sequenceOut + + muonEFSAFSSequence = seqAND( "muonEFSAFSSequence", [efsafsInputMaker, muEFSAFSRecoSequence ] ) + + from TrigMuonHypoMT.TrigMuonHypoMTConfig import TrigMuonEFMSonlyHypoToolFromName + + return MenuSequence( Sequence = muonEFSAFSSequence, + Maker = efsafsInputMaker, + Hypo = trigMuonEFSAFSHypo, + HypoToolGen = TrigMuonEFMSonlyHypoToolFromName ) + + ### l2Muiso step ### def muIsoStep(): diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/metTest.py b/Trigger/TrigValidation/TrigUpgradeTest/share/metTest.py index 3c9800612f1b85d0bb882efa935c0755e70a7f52..2652f6212119d7b7acf97cfec37652e924858566 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/share/metTest.py +++ b/Trigger/TrigValidation/TrigUpgradeTest/share/metTest.py @@ -45,7 +45,7 @@ cellTool.CellsCollection = "cells" helperTool = EFMissingETFromHelper("theHelperTool") metAlg = EFMissingETAlgMT( name="EFMET" ) - +metAlg.METContainerKey="HLT_MET" metAlg.METTools=[ cellTool ] metAlg.HelperTool= helperTool @@ -83,7 +83,7 @@ hypoAlg = MissingETHypoAlgMT("METHypoAlg") hypoAlg.HypoTools=[makeMETHypoTool()] for t in hypoAlg.HypoTools: t.OutputLevel=VERBOSE -hypoAlg.METContainerKey="HLT_MET" +hypoAlg.METContainerKey=metAlg.METContainerKey # Not sure how to implement monitoring at the moment. # Left here in case will be useful. diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/mu.menu.py b/Trigger/TrigValidation/TrigUpgradeTest/share/mu.menu.py index dd4cbcfaeedc928dca95e6007dbfe51587d93a2a..920f6f7f66425c79cfcbdd36d994da5dc429fe2e 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/share/mu.menu.py +++ b/Trigger/TrigValidation/TrigUpgradeTest/share/mu.menu.py @@ -39,7 +39,7 @@ if TriggerFlags.doMuon==True: ########################################## from TriggerMenuMT.HLTMenuConfig.Menu.MenuComponents import Chain, ChainStep - from TrigUpgradeTest.muMenuDefs import muFastStep, muCombStep, muEFMSStep, muEFSAStep, muIsoStep, muEFCBStep, inDetSetup + from TrigUpgradeTest.muMenuDefs import muFastStep, muCombStep, muEFMSStep, muEFSAStep, muIsoStep, muEFCBStep, muEFSAFSStep, inDetSetup inDetSetup() @@ -55,6 +55,8 @@ if TriggerFlags.doMuon==True: step3muIso =ChainStep("Step3_muIso", [ muIsoStep() ]) # step4 step4muEFCB=ChainStep("Step4_muEFCB", [ muEFCBStep() ]) + # Full scan MS tracking step + stepFSmuEFSA=ChainStep("Step_FSmuEFSA", [muEFSAFSStep()]) ## single muon trigger MenuChains += [Chain(name='HLT_mu6fast', Seed="L1_MU6", ChainSteps=[ step1mufast ])] @@ -66,7 +68,10 @@ if TriggerFlags.doMuon==True: # multi muon trigger MenuChains += [Chain(name='HLT_2mu6Comb', Seed="L1_MU6", ChainSteps=[ step1mufast, step2muComb ])] MenuChains += [Chain(name='HLT_2mu6', Seed="L1_MU6", ChainSteps=[ step1mufast, step2muComb, step3muEFSA, step4muEFCB ])] - + + #FS Muon trigger + MenuChains += [Chain(name='HLT_mu6nol1', Seed="L1_MU6", ChainSteps=[stepFSmuEFSA])] + ################################# # Some moer configurations diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/mu.withViews.py b/Trigger/TrigValidation/TrigUpgradeTest/share/mu.withViews.py index 52bd223b749284dee69ad7dc487b1951b2bdaeb7..494842f7c2d56cbc2866e92c8e0790f040c966d0 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/share/mu.withViews.py +++ b/Trigger/TrigValidation/TrigUpgradeTest/share/mu.withViews.py @@ -259,7 +259,7 @@ if TriggerFlags.doMuon: ### get EF reco sequence ### from TrigUpgradeTest.MuonSetup import muEFSARecoSequence - muEFMSRecoSequence, muEFSASequenceOut = muEFSARecoSequence( efMuViewsMaker.InViewRoIs, OutputLevel=DEBUG ) + muEFMSRecoSequence, muEFSASequenceOut = muEFSARecoSequence( efMuViewsMaker.InViewRoIs, 'RoI', OutputLevel=DEBUG ) efMuViewsMaker.ViewNodeName = muEFMSRecoSequence.name() diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/muMenu.ref b/Trigger/TrigValidation/TrigUpgradeTest/share/muMenu.ref index 80164ce5ecf32f541d4d139dd8d091fee3a90a26..11a3085361381bd3bbd2da276afe0ead09901723 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/share/muMenu.ref +++ b/Trigger/TrigValidation/TrigUpgradeTest/share/muMenu.ref @@ -1,10 +1,12 @@ TriggerSummaryStep1 4 0 DEBUG +++ HLT_mu20_ivar ID#267444585 TriggerSummaryStep1 4 0 DEBUG +++ HLT_mu6Comb ID#393364983 +TriggerSummaryStep1 4 0 DEBUG +++ HLT_mu6nol1 ID#1250234908 TriggerSummaryStep1 4 0 DEBUG +++ HLT_mu6 ID#1672162766 TriggerSummaryStep1 4 0 DEBUG +++ HLT_mu6fast ID#2393852230 TriggerSummaryStep2 4 0 DEBUG +++ HLT_mu6Comb ID#393364983 TriggerSummaryStep2 4 0 DEBUG +++ HLT_mu6 ID#1672162766 TriggerSummaryStep1 6 0 DEBUG +++ HLT_mu6Comb ID#393364983 +TriggerSummaryStep1 6 0 DEBUG +++ HLT_mu6nol1 ID#1250234908 TriggerSummaryStep1 6 0 DEBUG +++ HLT_mu6 ID#1672162766 TriggerSummaryStep1 6 0 DEBUG +++ HLT_mu6fast ID#2393852230 TriggerSummaryStep1 6 0 DEBUG +++ HLT_2mu6Comb ID#2762422737 @@ -28,3 +30,5 @@ TrigSignatureMoniMT INFO HLT_mu6Comb TrigSignatureMoniMT INFO HLT_mu6Comb decisions 3 3 0 0 TrigSignatureMoniMT INFO HLT_mu6fast 10 10 2 0 0 0 2 TrigSignatureMoniMT INFO HLT_mu6fast decisions 3 0 0 0 +TrigSignatureMoniMT INFO HLT_mu6nol1 10 10 2 0 0 0 2 +TrigSignatureMoniMT INFO HLT_mu6nol1 decisions 3 0 0 0 diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/newJOtest.py b/Trigger/TrigValidation/TrigUpgradeTest/share/newJOtest.py index cd6b9b94966a7d01daade152fb1aef82f77aa0ae..9a2055fbe333426ea64eb69ff7ca68d7baa8fc92 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/share/newJOtest.py +++ b/Trigger/TrigValidation/TrigUpgradeTest/share/newJOtest.py @@ -71,13 +71,13 @@ if mcc: from AthenaConfiguration.ComponentAccumulator import forcomps from AthenaCommon.Logging import logging logging.getLogger('forcomps').setLevel(DEBUG) -forcomps(acc, "*/L1Decoder").OutputLevel = DEBUG -forcomps(acc, "*/L1Decoder/*Tool").OutputLevel = DEBUG # tools -forcomps(acc, "*HLTTop/*Hypo*").OutputLevel = DEBUG # hypo algs -forcomps(acc, "*HLTTop/*Hypo*/*Tool*").OutputLevel = DEBUG # hypo tools -forcomps(acc, "*HLTTop/RoRSeqFilter/*").OutputLevel = DEBUG # filters -forcomps(acc, "*HLTTop/*Input*").OutputLevel = DEBUG # input makers -forcomps(acc, "*HLTTop/*GenericMonitoringTool*").OutputLevel = WARNING # silcence mon tools (addressing by type) +foreach_component(acc, "*/L1Decoder").OutputLevel = DEBUG +foreach_component(acc, "*/L1Decoder/*Tool").OutputLevel = DEBUG # tools +foreach_component(acc, "*HLTTop/*Hypo*").OutputLevel = DEBUG # hypo algs +foreach_component(acc, "*HLTTop/*Hypo*/*Tool*").OutputLevel = DEBUG # hypo tools +foreach_component(acc, "*HLTTop/RoRSeqFilter/*").OutputLevel = DEBUG # filters +foreach_component(acc, "*HLTTop/*Input*").OutputLevel = DEBUG # input makers +foreach_component(acc, "*HLTTop/*GenericMonitoringTool*").OutputLevel = WARNING # silcence mon tools (addressing by type) # # from TrigUpgradeTest.TestUtils import applyMenu diff --git a/Trigger/TriggerSimulation/TrigSimTransforms/src/MergingEventLoopMgr.cxx b/Trigger/TriggerSimulation/TrigSimTransforms/src/MergingEventLoopMgr.cxx index 26705951d3675f303a4671239ace216912213fcb..b82063281dff997c741b0eff4c6038a2a6a14ddb 100644 --- a/Trigger/TriggerSimulation/TrigSimTransforms/src/MergingEventLoopMgr.cxx +++ b/Trigger/TriggerSimulation/TrigSimTransforms/src/MergingEventLoopMgr.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ //------------------------------------------------------------------------------ @@ -21,7 +21,6 @@ #include "EventInfo/EventID.h" #include "EventInfo/EventType.h" #include "EventInfo/TriggerInfo.h" -#include "EventInfo/EventIncident.h" #include "SGTools/DataProxy.h" @@ -33,6 +32,7 @@ #include "GaudiKernel/ThreadLocalContext.h" #include "GaudiKernel/Algorithm.h" +#include "GaudiKernel/Incident.h" #include "GaudiKernel/ThreadLocalContext.h" @@ -526,7 +526,7 @@ namespace TrigSim { m_currentRun = pPrimEvt->event_ID()->run_number(); m_firstRun = false; - m_incidentSvc->fireIncident(EventIncident(name(),"BeginRun",Gaudi::Hive::currentContext())); + m_incidentSvc->fireIncident(Incident(name(),IncidentType::BeginRun,Gaudi::Hive::currentContext())); sc = beginRunAlgorithms(); if(sc.isFailure()) { @@ -545,7 +545,7 @@ namespace TrigSim { * Fire suitable incident */ - m_incidentSvc->fireIncident(EventIncident(name(),"BeginEvent",Gaudi::Hive::currentContext())); + m_incidentSvc->fireIncident(Incident(name(),IncidentType::BeginEvent,Gaudi::Hive::currentContext())); @@ -849,7 +849,7 @@ namespace TrigSim { /* * Fire suitable incident */ - m_incidentSvc->fireIncident(EventIncident(name(),"EndEvent",Gaudi::Hive::currentContext())); + m_incidentSvc->fireIncident(Incident(name(),IncidentType::EndEvent,Gaudi::Hive::currentContext())); diff --git a/graphics/VP1/VP1Algs/share/vp1 b/graphics/VP1/VP1Algs/share/vp1 index a002f03111787fac1c35d9912ad884f5903a203a..9106ba9983e72a87e96c764076effe8c7b7c7a30 100755 --- a/graphics/VP1/VP1Algs/share/vp1 +++ b/graphics/VP1/VP1Algs/share/vp1 @@ -135,6 +135,7 @@ CRUISEWITHTIME="" LOGFILE="" FILTEREVENTS="" FLAG_BATCH=0 +FLAG_BATCH_RANDOM_CONFIG=0 FLAG_BATCH_ALL_EVENTS=0 FLAG_BATCH_N_EVENTS=0 FLAG_BATCH_OUT_FOLDER="" @@ -233,10 +234,6 @@ while [ $i -le $# ]; do FLAG_BATCH_ALL_EVENTS=1 elif [ "x${arg}" == "x-batch-random-config" ]; then FLAG_BATCH_RANDOM_CONFIG=1 - echo -e "\e[1m\e[31m\e[4mNote!\e[24m You chose the option 'batch-random-config' ('${arg}').\e[39m" - echo -e "Thus, for each event a different configuration file will be used, randomly picked from the configuration files (.vp1) you provide.\e[0m" - echo - #elif [ "x${arg}" == "x-batch-output-folder" ]; then elif [ "x${arg:0:21}" == "x-batch-output-folder=" ]; then FLAG_BATCH_OUT_FOLDER=${arg:21:$((${#arg}-21))} if [ "x$FLAG_BATCH_OUT_FOLDER" == "x" ]; then @@ -249,7 +246,7 @@ while [ $i -le $# ]; do fi elif [ "x${arg:0:16}" == "x-batch-n-events=" ]; then FLAG_BATCH_N_EVENTS=${arg:16:$((${#arg}-16))} - echo -e "\e[1m\e[31m\e[4mNote!\e[24m You chose to run VP1 in 'batch-mode' over ${FLAG_BATCH_N_EVENTS} events only. ('${arg}').\e[39m" + echo -e "\e[1m\e[31m\e[4mNote!\e[24m You chose to run VP1 in 'batch-mode' over ${FLAG_BATCH_N_EVENTS} events ('${arg}'). VP1 will exit after having processed the given number of events.\e[39m" if [ "x$FLAG_BATCH_N_EVENTS" == "x" ]; then ERRORS="$ERRORS\nNeed a numeric argument to -batch-n-events" else @@ -487,7 +484,7 @@ if [ "x$FLAG_BATCH_RANDOM_CONFIG" == "x1" -a "x$FLAG_BATCH" == "x0" ]; then ERRORS="$ERRORS\nOption '-batch-random-config' can't be used without '-batch'..." fi if [ "x$FLAG_BATCH_RANDOM_CONFIG" == "x1" ]; then - echo -e "\e[1m\e[31m\e[4mNote!\e[24m You chose the option 'batch-random-config' ('${arg}').\e[39m" + echo -e "\e[1m\e[31m\e[4mNote!\e[24m You chose the option '-batch-random-config'.\e[39m" echo -e "Thus, for each event a different configuration file will be used, randomly picked from the configuration files (.vp1) you provided:\e[0m" printf "["; printf '"%s", ' "${FILES_VP1CFG[@]}"; printf "]\n"; echo fi