Skip to content
Snippets Groups Projects
Commit 6659d30c authored by Vakhtang Tsulaia's avatar Vakhtang Tsulaia
Browse files

Merge branch 'master-ATLASRECTS-4072-v2' into 'master'

Use InDetBSErrContainer to define temporarily masked chips (ATLASRECTS-4072, ATLASRECTS-3178)

See merge request atlas/athena!9693

Former-commit-id: d140c014
parents 3548fb51 4eadfdcb
No related branches found
No related tags found
No related merge requests found
Showing
with 542 additions and 551 deletions
......@@ -7,11 +7,15 @@ atlas_subdir( InDetByteStreamErrors )
# Declare the package's dependencies:
atlas_depends_on_subdirs( PUBLIC
Control/AthenaKernel
Control/CLIDSvc
Control/DataModel
Control/SGTools
DetectorDescription/Identifier )
# External dependencies:
find_package( Boost COMPONENTS filesystem thread system )
# this line failed automatic conversion in cmt2cmake :
# use AtlasReflex AtlasReflex-* External - no_auto_imports
......@@ -21,6 +25,12 @@ atlas_add_dictionary( InDetByteStreamErrorsDict
InDetByteStreamErrors/selection.xml
LINK_LIBRARIES DataModel SGTools Identifier )
atlas_add_library( InDetByteStreamErrors
src/*.cxx
INCLUDE_DIRS ${Boost_INCLUDE_DIRS}
PUBLIC_HEADERS InDetByteStreamErrors
LINK_LIBRARIES AthenaKernel )
# Install files from the package:
atlas_install_headers( InDetByteStreamErrors )
......@@ -8,6 +8,7 @@
#include "InDetByteStreamErrors/InDetBSErrContainer.h"
#include "InDetByteStreamErrors/TRT_BSErrContainer.h"
#include "InDetByteStreamErrors/TRT_BSIdErrContainer.h"
#include "InDetByteStreamErrors/SCT_ByteStreamFractionContainer.h"
namespace {
// Need this to create the dict entries
......
......@@ -35,10 +35,25 @@ public:
// Get majority
bool majority() const;
// Get entries
unsigned int entries() const;
// Get true set
std::set<uint32_t> getTrueSet() const;
// Get false set
std::set<uint32_t> getFalseSet() const;
// Set true set
void setTrueSet(const std::set<uint32_t>& trueSet);
// Set false set
void setFalseSet(const std::set<uint32_t>& falseSet);
private:
// Store RODIDs with true and false separately
std::set<uint32_t> m_trueSets;
std::set<uint32_t> m_falseSets;
std::set<uint32_t> m_trueSet;
std::set<uint32_t> m_falseSet;
};
......
......@@ -11,7 +11,7 @@
#ifndef SCT_ByteStreamFractionContainer_h
#define SCT_ByteStreamFractionContainer_h
#include "SCT_ConditionsData/SCT_ByteStreamFraction.h"
#include "InDetByteStreamErrors/SCT_ByteStreamFraction.h"
// Include Athena stuff
#include "AthenaKernel/CLASS_DEF.h"
......@@ -36,6 +36,15 @@ public:
// Get majority
bool majority(const Type type) const;
// Set true set
void setTrueSet(const Type type, const std::set<uint32_t> trueSet);
// Set false set
void setFalseSet(const Type type, const std::set<uint32_t> falseSet);
// Get fraction
SCT_ByteStreamFraction getFraction(const Type type) const;
private:
// Store RODIDs with true and false separately
SCT_ByteStreamFraction m_fraction[NumberOfTypes];
......
......@@ -6,7 +6,7 @@
// Implementation file for a data object class for SCT_ByteStreamErrorSvc
//----------------------------------------------------------------------
#include "SCT_ConditionsData/SCT_ByteStreamFraction.h"
#include "InDetByteStreamErrors/SCT_ByteStreamFraction.h"
//----------------------------------------------------------------------
// Constructor
......@@ -19,21 +19,56 @@ SCT_ByteStreamFraction::SCT_ByteStreamFraction()
// a new rodId with a bool value
void SCT_ByteStreamFraction::insert(const uint32_t rodId, const bool value)
{
if (value) m_trueSets.insert(rodId);
else m_falseSets.insert(rodId);
if (value) m_trueSet.insert(rodId);
else m_falseSet.insert(rodId);
}
//----------------------------------------------------------------------
// Clear m_trueSets and m_falseSets
// Clear m_trueSet and m_falseSet
void SCT_ByteStreamFraction::clear()
{
m_trueSets.clear();
m_falseSets.clear();
m_trueSet.clear();
m_falseSet.clear();
}
//----------------------------------------------------------------------
// Get majority
bool SCT_ByteStreamFraction::majority() const
{
return (m_trueSets.size() >= m_falseSets.size());
return (m_trueSet.size() >= m_falseSet.size());
}
//----------------------------------------------------------------------
// Get entries
unsigned int SCT_ByteStreamFraction::entries() const
{
return (m_trueSet.size() + m_falseSet.size());
}
//----------------------------------------------------------------------
// Get true set
std::set<uint32_t> SCT_ByteStreamFraction::getTrueSet() const
{
return m_trueSet;
}
//----------------------------------------------------------------------
// Get false set
std::set<uint32_t> SCT_ByteStreamFraction::getFalseSet() const
{
return m_falseSet;
}
//----------------------------------------------------------------------
// Set true set
void SCT_ByteStreamFraction::setTrueSet(const std::set<uint32_t>& trueSet)
{
m_trueSet = trueSet;
}
//----------------------------------------------------------------------
// Set false set
void SCT_ByteStreamFraction::setFalseSet(const std::set<uint32_t>& falseSet)
{
m_falseSet = falseSet;
}
......@@ -6,7 +6,7 @@
// Implementation file for a data object class for SCT_ByteStreamErrorSvc
//----------------------------------------------------------------------
#include "SCT_ConditionsData/SCT_ByteStreamFractionContainer.h"
#include "InDetByteStreamErrors/SCT_ByteStreamFractionContainer.h"
//----------------------------------------------------------------------
// Constructor
......@@ -37,8 +37,35 @@ void SCT_ByteStreamFractionContainer::clear()
// Get majority
bool SCT_ByteStreamFractionContainer::majority(const Type type) const
{
if (type>=FirstIndex and type<NumberOfTypes) {
return m_fraction[type].majority();
}
return false;
// Check invalid type
if (not (type>=FirstIndex and type<NumberOfTypes)) return false;
// Default value without entries is different
if (type==SimulatedData and m_fraction[type].entries()==0) return false;
if (type==CondensedMode and m_fraction[type].entries()==0) return true;
if (type==HVOn and m_fraction[type].entries()==0) return false;
return m_fraction[type].majority();
}
//----------------------------------------------------------------------
// Set true set
void SCT_ByteStreamFractionContainer::setTrueSet(const Type type, const std::set<uint32_t> trueSet)
{
if (type>=FirstIndex and type<NumberOfTypes) m_fraction[type].setTrueSet(trueSet);
}
//----------------------------------------------------------------------
// Set false set
void SCT_ByteStreamFractionContainer::setFalseSet(const Type type, const std::set<uint32_t> falseSet)
{
if (type>=FirstIndex and type<NumberOfTypes) m_fraction[type].setFalseSet(falseSet);
}
//----------------------------------------------------------------------
// Get fraction
SCT_ByteStreamFraction SCT_ByteStreamFractionContainer::getFraction(const Type type) const
{
if (type>=FirstIndex and type<NumberOfTypes) return m_fraction[type];
return SCT_ByteStreamFraction{};
}
......@@ -22,7 +22,8 @@ atlas_add_poolcnv_library( InDetByteStreamErrorsAthenaPoolPoolCnv src/*.cxx
FILES InDetByteStreamErrors/InDetBSErrContainer.h
InDetByteStreamErrors/TRT_BSIdErrContainer.h
InDetByteStreamErrors/TRT_BSErrContainer.h
LINK_LIBRARIES AthenaPoolUtilities Identifier TestTools AthAllocators
InDetByteStreamErrors/SCT_ByteStreamFractionContainer.h
LINK_LIBRARIES AthenaPoolUtilities Identifier InDetByteStreamErrors TestTools AthAllocators
AthenaPoolCnvSvcLib )
atlas_add_dictionary( InDetByteStreamErrorsAthenaPoolCnvDict
......
......@@ -7,4 +7,5 @@
#include "InDetByteStreamErrorsAthenaPool/InDetBSErrContainer_p1.h"
#include "InDetByteStreamErrorsAthenaPool/TRT_BSErrContainer_p1.h"
#include "InDetByteStreamErrorsAthenaPool/TRT_BSIdErrContainer_p1.h"
#include "InDetByteStreamErrorsAthenaPool/SCT_ByteStreamFractionContainer_p1.h"
#endif
/*
Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
*/
#ifndef INDETBYTESTREAMERRORSATHENAPOOL_SCT_BYTESTREAMFRACTIONCONTAINER_P1_H
#define INDETBYTESTREAMERRORSATHENAPOOL_SCT_BYTESTREAMFRACTIONCONTAINER_P1_H
#include <vector>
#include <cstdint>
#include <set>
class SCT_ByteStreamFractionContainer_p1
{
public:
/// Default constructor
SCT_ByteStreamFractionContainer_p1();
friend class SCT_ByteStreamFractionContainerCnv_p1;
private:
std::vector<std::set<uint32_t> > m_trueSets;
std::vector<std::set<uint32_t> > m_falseSets;
};
inline
SCT_ByteStreamFractionContainer_p1::SCT_ByteStreamFractionContainer_p1() {}
#endif // INDETBYTESTREAMERRORSATHENAPOOL_SCT_BYTESTREAMFRACTIONCONTAINER_P1_H
......@@ -2,4 +2,5 @@
<class name="InDetBSErrContainer_p1" id="FA64DC17-D07E-4305-9B21-18C64F1B4C47" />
<class name="TRT_BSErrContainer_p1" id="D461AC01-02CA-4A9E-886B-24EC14309121" />
<class name="TRT_BSIdErrContainer_p1" id="26F44F1E-D1F5-43B3-93E9-09376AB37491" />
<class name="SCT_ByteStreamFractionContainer_p1" id="EB75984C-F651-4F40-BA1C-9C2A0A558A55" />
</lcgdict>
/*
Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
*/
/**
* @file SCT_ByteStreamFractionContainerCnv.cxx
* @brief Generated implementation file which includes header files needed by SCT_ByteStreamFractionContainerCnv
* @author Susumu Oda <Susumu.Oda@cern.ch>
*/
#include "SCT_ByteStreamFractionContainerCnv.h"
SCT_ByteStreamFractionContainer_PERS*
SCT_ByteStreamFractionContainerCnv::createPersistent(SCT_ByteStreamFractionContainer* transCont) {
MsgStream log(msgSvc(), "SCT_ByteStreamFractionContainerCnv");
SCT_ByteStreamFractionContainer_PERS *persObj = m_TPConverter.createPersistent(transCont, log);
return persObj;
}
SCT_ByteStreamFractionContainer*
SCT_ByteStreamFractionContainerCnv::createTransient() {
MsgStream log(msgSvc(), "SCT_ByteStreamFractionContainerCnv" );
static pool::Guid p1_guid("EB75984C-F651-4F40-BA1C-9C2A0A558A55");
if( compareClassGuid(p1_guid) ) {
/** using auto_ptr ensures deletion of the persistent object */
std::auto_ptr< SCT_ByteStreamFractionContainer_p1 > col_vect( poolReadObject< SCT_ByteStreamFractionContainer_p1 >() );
return m_TPConverter.createTransient( col_vect.get(), log );
}
throw std::runtime_error("Unsupported persistent version of Data Collection");
}
/*
Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
*/
/**
* @file SCT_ByteStreamFractionContainerCnv.h
* @brief Generated header file which defines a typedef for templated converter class
* @author Susumu Oda <Susumu.Oda@cern.ch>
*/
#ifndef INDETBYTESTREAMERRORSATHENAPOOL_SCT_ByteStreamFractionContainerCnv_H
#define INDETBYTESTREAMERRORSATHENAPOOL_SCT_ByteStreamFractionContainerCnv_H
#include "AthenaPoolCnvSvc/T_AthenaPoolCnv.h"
#include "InDetByteStreamErrors/SCT_ByteStreamFractionContainer.h"
#include "AthenaPoolCnvSvc/T_AthenaPoolCustomCnv.h"
#include "InDetByteStreamErrorsAthenaPool/SCT_ByteStreamFractionContainer_p1.h"
#include "SCT_ByteStreamFractionContainerCnv_p1.h"
/** the latest persistent representation type of DataCollection: */
typedef SCT_ByteStreamFractionContainer_p1 SCT_ByteStreamFractionContainer_PERS;
typedef T_AthenaPoolCustomCnv<SCT_ByteStreamFractionContainer, SCT_ByteStreamFractionContainer_PERS> SCT_ByteStreamFractionContainerCnvBase;
class SCT_ByteStreamFractionContainerCnv : public SCT_ByteStreamFractionContainerCnvBase {
friend class CnvFactory<SCT_ByteStreamFractionContainerCnv>;
protected:
SCT_ByteStreamFractionContainerCnv (ISvcLocator* svcloc) : SCT_ByteStreamFractionContainerCnvBase(svcloc) {}
virtual SCT_ByteStreamFractionContainer_PERS*createPersistent(SCT_ByteStreamFractionContainer* transCont);
virtual SCT_ByteStreamFractionContainer* createTransient();
SCT_ByteStreamFractionContainerCnv_p1 m_TPConverter;
};
#endif // INDETBYTESTREAMERRORSATHENAPOOL_SCT_ByteStreamFractionContainerCnv_H
/*
Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
*/
#include "InDetByteStreamErrorsAthenaPool/SCT_ByteStreamFractionContainer_p1.h"
#include "InDetByteStreamErrors/SCT_ByteStreamFractionContainer.h"
#include "SCT_ByteStreamFractionContainerCnv_p1.h"
#include "AthAllocators/DataPool.h"
void SCT_ByteStreamFractionContainerCnv_p1::transToPers(const SCT_ByteStreamFractionContainer* transCont, SCT_ByteStreamFractionContainer_p1* persCont, MsgStream & /*log */)
{
(persCont->m_trueSets).reserve(SCT_ByteStreamFractionContainer::NumberOfTypes);
(persCont->m_falseSets).reserve(SCT_ByteStreamFractionContainer::NumberOfTypes);
for (unsigned int i=SCT_ByteStreamFractionContainer::FirstIndex; i<SCT_ByteStreamFractionContainer::NumberOfTypes; i++) {
SCT_ByteStreamFractionContainer::Type type = static_cast<SCT_ByteStreamFractionContainer::Type>(i);
(persCont->m_trueSets).push_back(transCont->getFraction(type).getTrueSet());
(persCont->m_falseSets).push_back(transCont->getFraction(type).getFalseSet());
}
return;
}
void SCT_ByteStreamFractionContainerCnv_p1::persToTrans(const SCT_ByteStreamFractionContainer_p1* persCont, SCT_ByteStreamFractionContainer* transCont, MsgStream & /*log */)
{
std::vector<std::set<uint32_t> >::const_iterator it = (persCont->m_trueSets).begin();
std::vector<std::set<uint32_t> >::const_iterator itEnd = (persCont->m_trueSets).end();
for (unsigned int i=SCT_ByteStreamFractionContainer::FirstIndex; i<SCT_ByteStreamFractionContainer::NumberOfTypes and it!=itEnd; i++, it++) {
SCT_ByteStreamFractionContainer::Type type = static_cast<SCT_ByteStreamFractionContainer::Type>(i);
transCont->setTrueSet(type, *it);
}
std::vector<std::set<uint32_t> >::const_iterator jt = (persCont->m_falseSets).begin();
std::vector<std::set<uint32_t> >::const_iterator jtEnd = (persCont->m_falseSets).end();
for (unsigned int j=SCT_ByteStreamFractionContainer::FirstIndex; j<SCT_ByteStreamFractionContainer::NumberOfTypes and jt!=jtEnd; j++, jt++) {
SCT_ByteStreamFractionContainer::Type type = static_cast<SCT_ByteStreamFractionContainer::Type>(j);
transCont->setFalseSet(type, *jt);
}
return;
}
//================================================================
SCT_ByteStreamFractionContainer* SCT_ByteStreamFractionContainerCnv_p1::createTransient(const SCT_ByteStreamFractionContainer_p1* persObj, MsgStream& log) {
std::auto_ptr<SCT_ByteStreamFractionContainer> trans(new SCT_ByteStreamFractionContainer());
persToTrans(persObj, trans.get(), log);
return(trans.release());
}
/*
Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
*/
#ifndef INDETBYTESTREAMERRORSATHENAPOOL_SCT_BYTESTREAMFRACTIONCONTAINERCNV_P1_H
#define INDETBYTESTREAMERRORSATHENAPOOL_SCT_BYTESTREAMFRACTIONCONTAINERCNV_P1_H
#include "InDetByteStreamErrors/SCT_ByteStreamFractionContainer.h"
#include "AthenaPoolCnvSvc/T_AthenaPoolTPConverter.h"
#include "InDetByteStreamErrorsAthenaPool/SCT_ByteStreamFractionContainer_p1.h"
class SCT_ByteStreamFractionContainerCnv_p1 : public T_AthenaPoolTPCnvBase<SCT_ByteStreamFractionContainer, SCT_ByteStreamFractionContainer_p1>
{
public:
SCT_ByteStreamFractionContainerCnv_p1(){};
virtual void persToTrans(const SCT_ByteStreamFractionContainer_p1* persCont,
SCT_ByteStreamFractionContainer* transCont,
MsgStream &log) ;
virtual void transToPers(const SCT_ByteStreamFractionContainer* transCont,
SCT_ByteStreamFractionContainer_p1* persCont,
MsgStream &log) ;
virtual SCT_ByteStreamFractionContainer* createTransient(const SCT_ByteStreamFractionContainer_p1* persObj, MsgStream& log) ;
};
#endif // INDETBYTESTREAMERRORSATHENAPOOL_SCT_BYTESTREAMFRACTIONCONTAINERCNV_P1_H
......@@ -41,13 +41,13 @@ find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
atlas_add_component( SCT_ConditionsServices
src/components/*.cxx
INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${COOL_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
LINK_LIBRARIES ${ROOT_LIBRARIES} ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${COOL_LIBRARIES} ${CLHEP_LIBRARIES} AthenaKernel Identifier GaudiKernel SCT_ConditionsData AthenaBaseComps StoreGateLib SGtests AthenaPoolUtilities GeoModelUtilities EventInfo xAODEventInfo SiPropertiesSvcLib InDetIdentifier InDetReadoutGeometry SCT_CablingLib PathResolver SCT_ConditionsServicesLib )
LINK_LIBRARIES ${ROOT_LIBRARIES} ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${COOL_LIBRARIES} ${CLHEP_LIBRARIES} AthenaKernel Identifier GaudiKernel InDetByteStreamErrors SCT_ConditionsData AthenaBaseComps StoreGateLib SGtests AthenaPoolUtilities GeoModelUtilities EventInfo xAODEventInfo SiPropertiesSvcLib InDetIdentifier InDetReadoutGeometry SCT_CablingLib PathResolver SCT_ConditionsServicesLib )
atlas_add_library ( SCT_ConditionsServicesLib
src/*.cxx
PUBLIC_HEADERS SCT_ConditionsServices
INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${COOL_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
LINK_LIBRARIES ${ROOT_LIBRARIES} ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${COOL_LIBRARIES} ${CLHEP_LIBRARIES} AthenaKernel Identifier GaudiKernel SCT_ConditionsData AthenaBaseComps StoreGateLib SGtests AthenaPoolUtilities GeoModelUtilities EventInfo xAODEventInfo SiPropertiesSvcLib InDetIdentifier InDetReadoutGeometry SCT_CablingLib PathResolver)
LINK_LIBRARIES ${ROOT_LIBRARIES} ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${COOL_LIBRARIES} ${CLHEP_LIBRARIES} AthenaKernel Identifier GaudiKernel InDetByteStreamErrors SCT_ConditionsData AthenaBaseComps StoreGateLib SGtests AthenaPoolUtilities GeoModelUtilities EventInfo xAODEventInfo SiPropertiesSvcLib InDetIdentifier InDetReadoutGeometry SCT_CablingLib PathResolver)
# Install files from the package:
atlas_install_headers( SCT_ConditionsServices )
......
......@@ -39,35 +39,15 @@ class ISCT_ByteStreamErrorsSvc: virtual public ISCT_ConditionsSvc {
virtual const std::set<IdentifierHash>* getErrorSet(int errorType)=0;
virtual void setRODSimulatedData()=0;
virtual bool isRODSimulatedData() const =0;
virtual bool isRODSimulatedData()=0;
virtual bool isCondensedReadout() const =0;
virtual bool HVisOn() const =0;
virtual void addError(IdentifierHash id, int errorType)=0;
virtual void addErrorCount(int errorType)=0;
virtual void resetSets()=0;
virtual void resetCounts()=0; /** for the counts used by HLT */
virtual int getNumberOfErrors(int errorType)=0; /** for HLT */
virtual void addRODHVCounter(bool HVisOn)=0;
virtual bool isCondensedReadout()=0;
virtual void setCondensedReadout(bool isCondensed)=0;
virtual bool HVisOn()=0;
/** Set first temporarily masked chip information from byte stream trailer */
virtual void setFirstTempMaskedChip(const IdentifierHash& hashId, const unsigned int firstTempMaskedChip)=0;
/** Get first temporarily masked chip information */
virtual unsigned int getFirstTempMaskedChip(const IdentifierHash& hashId) const =0;
/** Map of temporary chip status for all modules with at least one bad chip (packed as 1st 12 bits of unsigned int) */
virtual const std::map<Identifier, unsigned int>* tempMaskedChips() const =0;
/** Temporary status of chips for a particular module (packed as 1st 12 bits of unsigned int) */
virtual unsigned int tempMaskedChips(const Identifier& moduleId) const =0;
virtual unsigned int tempMaskedChips(const Identifier& moduleId)=0;
/** Status ABCD errors of chips for a particular module (packed as 1st 12 bits of unsigned int) */
virtual unsigned int abcdErrorChips(const Identifier& moduleId) const =0;
virtual unsigned int abcdErrorChips(const Identifier& moduleId)=0;
private:
......
......@@ -10,21 +10,23 @@
#ifndef SCT_ByteStreamErrorsSvc_h
#define SCT_ByteStreamErrorsSvc_h
///STL includes
///STL includes
#include <set>
#include <map>
#include <list>
#include <mutex>
///Gaudi includes
#include "GaudiKernel/IIncidentListener.h"
#include "GaudiKernel/ServiceHandle.h"
#include "GaudiKernel/EventContext.h"
///Athena includes
#include "AthenaBaseComps/AthService.h"
#include "InDetConditionsSummaryService/InDetHierarchy.h"
#include "SCT_Cabling/ISCT_CablingSvc.h"
#include "SCT_ConditionsServices/ISCT_ByteStreamErrorsSvc.h"
#include "InDetByteStreamErrors/InDetBSErrContainer.h"
#include "InDetByteStreamErrors/SCT_ByteStreamFractionContainer.h"
/** needs to be included here for gcc 4.3 compatibility */
#include "StoreGate/StoreGateSvc.h"
......@@ -50,7 +52,7 @@ namespace InDetDD {
* Service that keeps track of modules that give rise to errors in the bytestram.
**/
class SCT_ByteStreamErrorsSvc: virtual public ISCT_ByteStreamErrorsSvc, virtual public IIncidentListener, virtual public AthService {
class SCT_ByteStreamErrorsSvc: virtual public ISCT_ByteStreamErrorsSvc, virtual public AthService {
friend class SvcFactory<SCT_ByteStreamErrorsSvc>;
public:
//@name Service methods
......@@ -60,8 +62,6 @@ public:
virtual StatusCode initialize() override;
virtual StatusCode finalize() override;
virtual StatusCode queryInterface( const InterfaceID& riid, void** ppvInterface );
virtual void handle(const Incident& inc) override;
//@}
virtual bool canReportAbout(InDetConditions::Hierarchy h) override;
......@@ -80,66 +80,48 @@ public:
virtual bool canFillDuringInitialize() override { return false; }
const std::set<IdentifierHash>* getErrorSet(int errorType) override; // Used by SCTRawDataProviderTool and others
void addError(IdentifierHash id, int errorType) override; // Used by SCT_RodDecoder
virtual void resetSets() override; // Internally used
virtual int getNumberOfErrors(int errorType) override; /** for HLT */ // Used by SCT_TrgClusterization and SCT_ClusterCacheTool
void addErrorCount(int errorType) override; // Used by SCT_RodDecoder
virtual void resetCounts() override; /** for the counts used by HLT */ // Used internally and by SCT_ClusterCacheTool
virtual void setFirstTempMaskedChip(const IdentifierHash& hashId, const unsigned int firstTempMaskedChip) override; // Used by SCT_RodDecoder
virtual unsigned int getFirstTempMaskedChip(const IdentifierHash& hashId) const override; // Internally used
virtual const std::map<Identifier, unsigned int>* tempMaskedChips() const override {return &m_tempMaskedChips;} // Internally used
virtual unsigned int tempMaskedChips(const Identifier & moduleId) const override; // Internally used
virtual unsigned int abcdErrorChips(const Identifier & moduleId) const override; // Internally used
void setRODSimulatedData() override; // Used by SCT_RodDecoder
bool isRODSimulatedData() override; // Internally used
virtual void addRODHVCounter(bool HVisOn) override; // Used by SCT_RodDecoder
virtual bool HVisOn() override; // Internally used
virtual bool isCondensedReadout() override; // Not used
virtual void setCondensedReadout(bool isCondensed) override; // Used by SCT_RodDecoder
virtual unsigned int tempMaskedChips(const Identifier& moduleId) override; // Internally used
virtual unsigned int abcdErrorChips(const Identifier& moduleId) override; // Internally used
virtual bool isRODSimulatedData() const override; // Internally used
virtual bool HVisOn() const override; // Internally used
virtual bool isCondensedReadout() const override; // Not used
private:
ServiceHandle<StoreGateSvc> m_evtStore;
ServiceHandle<StoreGateSvc> m_detStore;
ServiceHandle<ISCT_CablingSvc> m_cabling;
ServiceHandle<ISCT_ConfigurationConditionsSvc> m_config;
const SCT_ID* m_sct_id;
IdContext m_cntx_sct;
const InDetDD::SCT_DetectorManager* m_pManager; //!< SCT detector manager
bool m_filled;
bool m_useRXredundancy;
bool m_lookForSGErrContainer;
SG::ReadHandleKey<InDetBSErrContainer> m_bsErrContainerName;
SG::ReadHandleKey<SCT_ByteStreamFractionContainer> m_bsFracContainerName;
// Used by getErrorSet, addError, resetSets
std::set<IdentifierHash> m_bsErrors[SCT_ByteStreamErrors::NUM_ERROR_TYPES];
// Used by getNumberOfErrors, addErrorCount, resetCounts
int m_numBsErrors[SCT_ByteStreamErrors::NUM_ERROR_TYPES];
std::vector<std::set<IdentifierHash> > m_bsErrors[SCT_ByteStreamErrors::NUM_ERROR_TYPES]; // Used by getErrorSet, addError, resetSets
// Used by setFirstTempMaskedChip, getFirstTempMaskedChip, tempMaskedChips
std::map<IdentifierHash, unsigned int> m_firstTempMaskedChips;
std::map<Identifier, unsigned int> m_tempMaskedChips;
std::vector<std::map<Identifier, unsigned int> > m_tempMaskedChips;
std::vector<std::map<Identifier, unsigned int> > m_abcdErrorChips;
// Used by setRODSimulatedData and isRODSimulatedData
bool m_isRODSimulatedData; // This can be ROD dependent.
// Mutex to protect the contents.
mutable std::mutex m_mutex;
// Cache to store events for slots
mutable std::vector<EventContext::ContextEvt_t> m_cache;
// Used by addRODHVCounter and HVisOn
int m_numRODsHVon;
int m_numRODsTotal;
StatusCode fillData(const EventContext& ctx);
// Used by isCondensedReadout and setCondensedReadout
bool m_condensedMode; // This can be ROD dependent.
void addError(IdentifierHash id, int errorType, const EventContext& ctx);
void resetSets(const EventContext& ctx);
bool isGoodChip(const Identifier& stripId) const;
bool isGoodChip(const Identifier& stripId);
int getChip(const Identifier& stripId) const;
// For isRODSimulatedData, HVisOn and isCondensedReadout
const SCT_ByteStreamFractionContainer* getFracData() const;
const std::set<IdentifierHash>& getErrorSet(SCT_ByteStreamErrors::errorTypes errorType, const EventContext& ctx);
const std::map<Identifier, unsigned int>& getTempMaskedChips(const EventContext& ctx);
const std::map<Identifier, unsigned int>& getAbcdErrorChips(const EventContext& ctx);
};
#endif // SCT_ByteStreamErrorsSvc_h
......@@ -12,7 +12,6 @@ atlas_depends_on_subdirs( PUBLIC
GaudiKernel
InnerDetector/InDetRawEvent/InDetRawData
InnerDetector/InDetConditions/InDetByteStreamErrors
InnerDetector/InDetConditions/SCT_ConditionsData
PRIVATE
Control/AthenaBaseComps
Control/StoreGate
......@@ -33,7 +32,7 @@ atlas_add_component( SCT_RawDataByteStreamCnv
src/*.cxx
src/components/*.cxx
INCLUDE_DIRS ${TDAQ-COMMON_INCLUDE_DIRS}
LINK_LIBRARIES ${TDAQ-COMMON_LIBRARIES} ByteStreamCnvSvcBaseLib ByteStreamData ByteStreamData_test GaudiKernel InDetRawData SCT_ConditionsData AthenaBaseComps StoreGateLib SGtests Identifier EventInfo xAODEventInfo InDetIdentifier InDetReadoutGeometry SCT_CablingLib TrigSteeringEvent)
LINK_LIBRARIES ${TDAQ-COMMON_LIBRARIES} ByteStreamCnvSvcBaseLib ByteStreamData ByteStreamData_test GaudiKernel InDetRawData InDetByteStreamErrors AthenaBaseComps StoreGateLib SGtests Identifier EventInfo xAODEventInfo InDetIdentifier InDetReadoutGeometry SCT_CablingLib TrigSteeringEvent)
# Install files from the package:
atlas_install_headers( SCT_RawDataByteStreamCnv )
......
......@@ -10,7 +10,7 @@
#include "InDetRawData/SCT_RDO_Container.h"
#include "InDetRawData/InDetTimeCollection.h"
#include "InDetByteStreamErrors/InDetBSErrContainer.h"
#include "SCT_ConditionsData/SCT_ByteStreamFractionContainer.h"
#include "InDetByteStreamErrors/SCT_ByteStreamFractionContainer.h"
#include <set>
#include <string>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment