Skip to content
Snippets Groups Projects
Commit 923ac093 authored by Walter Lampl's avatar Walter Lampl
Browse files

Merge branch 'master-static' into 'master'

Remove static keyword from some SCT classes

See merge request atlas/athena!21796
parents baa0fbd9 71e7d1fe
No related branches found
No related tags found
No related merge requests found
......@@ -38,7 +38,7 @@ xAODSCTRDOContainerCnv::createPersistent( xAOD::SCTRawHitValidationContainer* tr
xAOD::SCTRawHitValidationContainer* xAODSCTRDOContainerCnv::createTransient() {
// The known ID(s) for this container:
static pool::Guid v1_guid( "BC8CE35A-5785-4F97-82B6-1E4A21A8C28F" );
const pool::Guid v1_guid( "BC8CE35A-5785-4F97-82B6-1E4A21A8C28F" );
// Check if we're reading the most up to date type:
if( compareClassGuid( v1_guid ) ) {
......
......@@ -20,7 +20,7 @@ SCT_ByteStreamFractionContainerCnv::createPersistent(SCT_ByteStreamFractionConta
SCT_ByteStreamFractionContainer*
SCT_ByteStreamFractionContainerCnv::createTransient() {
MsgStream log(msgSvc(), "SCT_ByteStreamFractionContainerCnv" );
static pool::Guid p1_guid("EB75984C-F651-4F40-BA1C-9C2A0A558A55");
const 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 >() );
......
......@@ -8,15 +8,17 @@
#include <memory>
template <class T>
static std::vector<T>
string2Vector(const std::string& s) {
std::vector<T> v;
std::istringstream inputStream{s};
std::istream_iterator<T> vecRead{inputStream};
std::istream_iterator<T> endOfString; //relies on default constructor to produce eof
std::copy(vecRead,endOfString, std::back_inserter(v)); // DOESN'T ALLOW NON-WHITESPACE DELIMITER !
return v;
namespace {
template <class T>
std::vector<T>
string2Vector(const std::string& s) {
std::vector<T> v;
std::istringstream inputStream{s};
std::istream_iterator<T> vecRead{inputStream};
std::istream_iterator<T> endOfString; //relies on default constructor to produce eof
std::copy(vecRead,endOfString, std::back_inserter(v)); // DOESN'T ALLOW NON-WHITESPACE DELIMITER !
return v;
}
}
SCT_ModuleVetoCondAlg::SCT_ModuleVetoCondAlg(const std::string& name, ISvcLocator* pSvcLocator)
......
......@@ -5,7 +5,6 @@
#include "SCT_TdaqEnabledCondAlg.h"
#include "Identifier/IdentifierHash.h"
#include "SCT_Cabling/SCT_OnlineId.h"
#include "GaudiKernel/EventIDRange.h"
......@@ -14,6 +13,7 @@
SCT_TdaqEnabledCondAlg::SCT_TdaqEnabledCondAlg(const std::string& name, ISvcLocator* pSvcLocator)
: ::AthReentrantAlgorithm(name, pSvcLocator)
, m_condSvc{"CondSvc", name}
, m_onlineId{}
{
}
......@@ -94,7 +94,7 @@ StatusCode SCT_TdaqEnabledCondAlg::execute(const EventContext& ctx) const
unsigned int rodNumber{parseChannelName(chanName)};
// range check on the rod channel number has been removed, since it refers both to existing channel names
// which can be rods in slots 1-128 but also historical names which have since been removed
if (SCT_OnlineId::rodIdInRange(rodNumber)) {
if (m_onlineId.rodIdInRange(rodNumber)) {
if ((not enabled.empty()) and (not writeCdo->setGoodRod(rodNumber))) {
ATH_MSG_WARNING("Set insertion failed for rod "<<rodNumber);
}
......
......@@ -9,6 +9,7 @@
#include "AthenaPoolUtilities/CondAttrListCollection.h"
#include "SCT_Cabling/ISCT_CablingTool.h"
#include "SCT_Cabling/SCT_OnlineId.h"
#include "SCT_ConditionsData/SCT_TdaqEnabledCondData.h"
#include "StoreGate/ReadCondHandleKey.h"
#include "StoreGate/WriteCondHandleKey.h"
......@@ -35,6 +36,8 @@ class SCT_TdaqEnabledCondAlg : public AthReentrantAlgorithm
ServiceHandle<ICondSvc> m_condSvc;
ToolHandle<ISCT_CablingTool> m_cablingTool{this, "SCT_CablingTool", "SCT_CablingTool", "Tool to retrieve SCT Cabling"};
SCT_OnlineId m_onlineId;
static const unsigned int s_NRODS;
static const unsigned int s_modulesPerRod;
static const unsigned int s_earliestRunForFolder;
......
......@@ -58,7 +58,7 @@ public:
unsigned int index() const;
///Is the rod in range?
static bool rodIdInRange(std::uint32_t r);
bool rodIdInRange(std::uint32_t r) const;
///constants for evaluating hash indices of the online id. The hashing formula is in 'index()'
enum {
......
/*
Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
*/
/*
* SCT_OnlineId.cxx
......@@ -90,7 +90,7 @@ bool SCT_OnlineId::fibreInRange(std::uint32_t f) const{
}
//
bool SCT_OnlineId::rodIdInRange(std::uint32_t r) {
bool SCT_OnlineId::rodIdInRange(std::uint32_t r) const {
const std::uint32_t lowestRodId(0x210000);
const std::uint32_t highestRodId=0x24010F;
return ((r >=lowestRodId) and (r<=highestRodId)) ;
......
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