ATLAS Offline Software
Loading...
Searching...
No Matches
SCT_TdaqEnabledCondData.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3*/
4
5//----------------------------------------------------------------------
6// Implementation file for the data object class for SCT_TdaqEnabledSvc
7//----------------------------------------------------------------------
8
10
11#include <algorithm>
12#include <iterator>
13
14//----------------------------------------------------------------------
15// Constructor
22
23//----------------------------------------------------------------------
24// Set a good ROD number
25bool SCT_TdaqEnabledCondData::setGoodRod(const unsigned int rodNumber)
26{
27 return m_goodRods.insert(rodNumber).second;
28}
29
30//----------------------------------------------------------------------
31// Get good ROD numbers
32const std::set<unsigned int>& SCT_TdaqEnabledCondData::getGoodRods() const
33{
34 return m_goodRods;
35}
36
37//----------------------------------------------------------------------
38// Set a list of good modules
39void SCT_TdaqEnabledCondData::setGoodModules(const std::vector<IdentifierHash>& idVec)
40{
41 std::copy(idVec.begin(), idVec.end(), std::inserter(m_goodIds, m_goodIds.end()));
42}
43
44//----------------------------------------------------------------------
45// Set filled variable
47{
48 m_filled = filled;
49}
50
51//----------------------------------------------------------------------
52// Get filled variable
54{
55 return m_filled;
56}
57
58//----------------------------------------------------------------------
59// Set noneBad variable
61{
62 m_noneBad = noneBad;
63}
64
65//----------------------------------------------------------------------
66// Get noneBad variable
68{
69 return m_noneBad;
70}
71
72//----------------------------------------------------------------------
73// Check if a module is good
75{
76 if (m_noneBad) return true;
77 return (m_goodIds.find(hashId)!=m_goodIds.end());
78}
79
80//----------------------------------------------------------------------
81// Clear
83 m_goodRods.clear();
84 m_goodIds.clear();
85 m_noneBad = false;
86 m_filled = false;
87}
header file for data object for SCT_TdaqEnabledCondAlg and SCT_TdaqEnabledTool.
This is a "hash" representation of an Identifier.
bool isGood(const IdentifierHash &hashId) const
Check if a module is good.
const std::set< unsigned int > & getGoodRods() const
Get good RODs.
bool isFilled() const
Get filled variable.
std::set< unsigned int > m_goodRods
void clear()
Clear m_goodRods, m_goodIds, m_noneBad, m_filled.
void setGoodModules(const std::vector< IdentifierHash > &idVec)
Set a list of good modules.
void setNoneBad(const bool noneBad)
Set noneBad value.
bool isNoneBad() const
Get noneBad value.
void setFilled(const bool filled)
Set filled variable.
std::set< IdentifierHash > m_goodIds
bool setGoodRod(const unsigned int rodNumber)
Set a good ROD.