ATLAS Offline Software
Public Member Functions | Public Attributes | Private Types | Private Attributes | List of all members
TileCondDCS_Data Class Reference

#include <TileCondDCS_Data.h>

Collaboration diagram for TileCondDCS_Data:

Public Member Functions

 TileCondDCS_Data ()
 
virtual ~TileCondDCS_Data ()
 
virtual StatusCode initialize ()
 
virtual StatusCode finalize ()
 
void fill (const CondAttrListCollection::ChanNum &chanNum, const std::string &param)
 add defect More...
 
void remove (const CondAttrListCollection::ChanNum &chanNum, const std::string &param)
 remove a defect More...
 
int output (const CondAttrListCollection::ChanNum &chanNum, std::vector< std::string > &usersVector)
 copy all defects to a users vector, the return value is the size More...
 
int output (const CondAttrListCollection::ChanNum &chanNum)
 

Public Attributes

std::map< CondAttrListCollection::ChanNum, float > * m_pModulesHV
 

Private Types

typedef std::map< CondAttrListCollection::ChanNum, std::vector< std::string > > DCSConditions
 

Private Attributes

DCSConditions m_bad_channels
 

Detailed Description

Definition at line 20 of file TileCondDCS_Data.h.

Member Typedef Documentation

◆ DCSConditions

typedef std::map<CondAttrListCollection::ChanNum, std::vector< std::string > > TileCondDCS_Data::DCSConditions
private

Definition at line 44 of file TileCondDCS_Data.h.

Constructor & Destructor Documentation

◆ TileCondDCS_Data()

TileCondDCS_Data::TileCondDCS_Data ( )

Definition at line 16 of file TileCondDCS_Data.cxx.

17  : m_pModulesHV(nullptr)
18 {}

◆ ~TileCondDCS_Data()

TileCondDCS_Data::~TileCondDCS_Data ( )
virtual

Definition at line 21 of file TileCondDCS_Data.cxx.

22 { }

Member Function Documentation

◆ fill()

void TileCondDCS_Data::fill ( const CondAttrListCollection::ChanNum chanNum,
const std::string &  param 
)

add defect

Definition at line 42 of file TileCondDCS_Data.cxx.

43 {
44  if (m_bad_channels.find(chanNum) != m_bad_channels.end()) {
45  vector<string> par= (*m_bad_channels.find(chanNum)).second;
46  vector<string>::iterator par_itr=find(par.begin(),par.end(),param);
47  if (par_itr == par.end()){
48  par.push_back(param);
49  m_bad_channels.insert(make_pair(chanNum, par));
50  }
51  }
52  else {
53  vector<string> par;
54  par.push_back(param);
55  m_bad_channels.insert(make_pair(chanNum, par));
56  }
57 }

◆ finalize()

StatusCode TileCondDCS_Data::finalize ( )
virtual

Definition at line 34 of file TileCondDCS_Data.cxx.

35 {
36  return StatusCode::SUCCESS;
37 }

◆ initialize()

StatusCode TileCondDCS_Data::initialize ( )
virtual

Definition at line 27 of file TileCondDCS_Data.cxx.

28 {
29  m_pModulesHV = new map<CondAttrListCollection::ChanNum, float >;
30  return StatusCode::SUCCESS;
31 }

◆ output() [1/2]

int TileCondDCS_Data::output ( const CondAttrListCollection::ChanNum chanNum)

Definition at line 83 of file TileCondDCS_Data.cxx.

83  {
84  DCSConditions::const_iterator pPair(m_bad_channels.find(chanNum) );
85  return (pPair != m_bad_channels.end() )? (pPair->second.size()) : 0;
86 }

◆ output() [2/2]

int TileCondDCS_Data::output ( const CondAttrListCollection::ChanNum chanNum,
std::vector< std::string > &  usersVector 
)

copy all defects to a users vector, the return value is the size

Definition at line 73 of file TileCondDCS_Data.cxx.

73  {
74  DCSConditions::const_iterator pPair(m_bad_channels.find(chanNum) );
75  if ( pPair != m_bad_channels.end()){
76  const vector< string > & v(pPair->second);
77  usersVector.insert(usersVector.begin(), v.begin(), v.end() );
78  }
79  return usersVector.size();
80 }

◆ remove()

void TileCondDCS_Data::remove ( const CondAttrListCollection::ChanNum chanNum,
const std::string &  param 
)

remove a defect

Definition at line 61 of file TileCondDCS_Data.cxx.

62 {
63  map< CondAttrListCollection::ChanNum,vector<string> >::iterator itr=m_bad_channels.find(chanNum);
64  if (itr != m_bad_channels.end()) {
65  vector<string>::iterator vec_itr=find((*itr).second.begin(),(*itr).second.end(),param);
66  if (vec_itr != (*itr).second.end()){
67  (*itr).second.erase(vec_itr);
68  }
69  }
70 }

Member Data Documentation

◆ m_bad_channels

DCSConditions TileCondDCS_Data::m_bad_channels
private

Definition at line 45 of file TileCondDCS_Data.h.

◆ m_pModulesHV

std::map<CondAttrListCollection::ChanNum, float >* TileCondDCS_Data::m_pModulesHV

Definition at line 41 of file TileCondDCS_Data.h.


The documentation for this class was generated from the following files:
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
python.SystemOfUnits.second
int second
Definition: SystemOfUnits.py:120
TileCondDCS_Data::m_bad_channels
DCSConditions m_bad_channels
Definition: TileCondDCS_Data.h:45
find
std::string find(const std::string &s)
return a remapped string
Definition: hcg.cxx:135
checkCoolLatestUpdate.chanNum
chanNum
Definition: checkCoolLatestUpdate.py:27
createCoolChannelIdFile.par
par
Definition: createCoolChannelIdFile.py:29
python.PyAthena.v
v
Definition: PyAthena.py:154
TileCondDCS_Data::m_pModulesHV
std::map< CondAttrListCollection::ChanNum, float > * m_pModulesHV
Definition: TileCondDCS_Data.h:41