ATLAS Offline Software
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes | List of all members
MuonTGC_Cabling::TGCDatabase Class Reference

#include <TGCDatabase.h>

Inheritance diagram for MuonTGC_Cabling::TGCDatabase:
Collaboration diagram for MuonTGC_Cabling::TGCDatabase:

Public Types

enum  DatabaseType {
  NoDatabaseType =-1, ASDToPP, InPP, PPToSL,
  SLBToROD, MaxDatabaseType
}
 

Public Member Functions

 TGCDatabase (DatabaseType type=NoDatabaseType)
 
 TGCDatabase (DatabaseType type, const std::string &filename, const std::string &blockname)
 
 TGCDatabase (const TGCDatabase &)=default
 
virtual ~TGCDatabase (void)
 
TGCDatabaseoperator= (const TGCDatabase &)=default
 
DatabaseType getDatabaseType (void) const
 
virtual int getEntry (int entry, int column) const
 
virtual int getEntrySize (int entry) const
 
virtual int getMaxEntry (void) const
 
virtual bool update (const std::vector< int > &)
 
virtual int find (const std::vector< int > &) const
 
virtual int getIndexDBIn (int *indexIn) const
 
virtual int getIndexDBOut (int *indexOut) const
 

Protected Member Functions

virtual void readDB (void)
 

Protected Attributes

std::string m_filename
 
std::string m_blockname
 
std::vector< std::vector< int > > m_database
 

Private Attributes

DatabaseType m_type
 

Detailed Description

Definition at line 14 of file TGCDatabase.h.

Member Enumeration Documentation

◆ DatabaseType

Enumerator
NoDatabaseType 
ASDToPP 
InPP 
PPToSL 
SLBToROD 
MaxDatabaseType 

Definition at line 17 of file TGCDatabase.h.

Constructor & Destructor Documentation

◆ TGCDatabase() [1/3]

MuonTGC_Cabling::TGCDatabase::TGCDatabase ( DatabaseType  type = NoDatabaseType)

Definition at line 10 of file TGCDatabase.cxx.

11  : m_type(vtype)
12 {
13 }

◆ TGCDatabase() [2/3]

MuonTGC_Cabling::TGCDatabase::TGCDatabase ( DatabaseType  type,
const std::string &  filename,
const std::string &  blockname 
)

Definition at line 15 of file TGCDatabase.cxx.

18  : m_filename(vfilename),
19  m_blockname(vblockname),
20  m_type(vtype)
21 {
22 }

◆ TGCDatabase() [3/3]

MuonTGC_Cabling::TGCDatabase::TGCDatabase ( const TGCDatabase )
default

◆ ~TGCDatabase()

MuonTGC_Cabling::TGCDatabase::~TGCDatabase ( void  )
virtual

Definition at line 24 of file TGCDatabase.cxx.

25 {
26 }

Member Function Documentation

◆ find()

int MuonTGC_Cabling::TGCDatabase::find ( const std::vector< int > &  ) const
virtual

Reimplemented in MuonTGC_Cabling::TGCDatabaseASDToPP, MuonTGC_Cabling::TGCDatabaseInPP, MuonTGC_Cabling::TGCDatabaseSLBToROD, and MuonTGC_Cabling::TGCDatabasePPToSL.

Definition at line 46 of file TGCDatabase.cxx.

47 {
48  // not implemented in the base class
49  return -1;
50 }

◆ getDatabaseType()

DatabaseType MuonTGC_Cabling::TGCDatabase::getDatabaseType ( void  ) const
inline

Definition at line 35 of file TGCDatabase.h.

35 { return m_type; }

◆ getEntry()

int MuonTGC_Cabling::TGCDatabase::getEntry ( int  entry,
int  column 
) const
virtual

Definition at line 28 of file TGCDatabase.cxx.

28  {
29  return m_database[entry].at(column);
30 }

◆ getEntrySize()

int MuonTGC_Cabling::TGCDatabase::getEntrySize ( int  entry) const
virtual

Definition at line 32 of file TGCDatabase.cxx.

32  {
33  return m_database[entry].size();
34 }

◆ getIndexDBIn()

int MuonTGC_Cabling::TGCDatabase::getIndexDBIn ( int *  indexIn) const
virtual

Reimplemented in MuonTGC_Cabling::TGCDatabaseASDToPP, and MuonTGC_Cabling::TGCDatabaseInPP.

Definition at line 52 of file TGCDatabase.cxx.

53 {
54  // not implemented in the base class
55  if(!indexIn) return -1;
56 
57  return -1;
58 }

◆ getIndexDBOut()

int MuonTGC_Cabling::TGCDatabase::getIndexDBOut ( int *  indexOut) const
virtual

Reimplemented in MuonTGC_Cabling::TGCDatabaseASDToPP.

Definition at line 60 of file TGCDatabase.cxx.

61 {
62  // not implemented in the base class
63  if(!indexOut) return -1;
64 
65  return -1;
66 }

◆ getMaxEntry()

int MuonTGC_Cabling::TGCDatabase::getMaxEntry ( void  ) const
virtual

Definition at line 36 of file TGCDatabase.cxx.

36  {
37  return m_database.size();
38 }

◆ operator=()

TGCDatabase& MuonTGC_Cabling::TGCDatabase::operator= ( const TGCDatabase )
default

◆ readDB()

virtual void MuonTGC_Cabling::TGCDatabase::readDB ( void  )
inlineprotectedvirtual

◆ update()

bool MuonTGC_Cabling::TGCDatabase::update ( const std::vector< int > &  )
virtual

Reimplemented in MuonTGC_Cabling::TGCDatabaseASDToPP, MuonTGC_Cabling::TGCDatabaseInPP, MuonTGC_Cabling::TGCDatabaseSLBToROD, and MuonTGC_Cabling::TGCDatabasePPToSL.

Definition at line 40 of file TGCDatabase.cxx.

41 {
42  // not implemented in the base class
43  return false;
44 }

Member Data Documentation

◆ m_blockname

std::string MuonTGC_Cabling::TGCDatabase::m_blockname
protected

Definition at line 53 of file TGCDatabase.h.

◆ m_database

std::vector< std::vector<int> > MuonTGC_Cabling::TGCDatabase::m_database
protected

Definition at line 54 of file TGCDatabase.h.

◆ m_filename

std::string MuonTGC_Cabling::TGCDatabase::m_filename
protected

Definition at line 52 of file TGCDatabase.h.

◆ m_type

DatabaseType MuonTGC_Cabling::TGCDatabase::m_type
private

Definition at line 57 of file TGCDatabase.h.


The documentation for this class was generated from the following files:
MuonTGC_Cabling::TGCDatabase::PPToSL
@ PPToSL
Definition: TGCDatabase.h:18
MuonTGC_Cabling::TGCDatabase::ASDToPP
@ ASDToPP
Definition: TGCDatabase.h:18
MuonTGC_Cabling::TGCDatabase::NoDatabaseType
@ NoDatabaseType
Definition: TGCDatabase.h:17
DeMoUpdate.column
dictionary column
Definition: DeMoUpdate.py:1110
MuonTGC_Cabling::TGCDatabase::m_filename
std::string m_filename
Definition: TGCDatabase.h:52
GetAllXsec.entry
list entry
Definition: GetAllXsec.py:132
MuonTGC_Cabling::TGCDatabase::m_blockname
std::string m_blockname
Definition: TGCDatabase.h:53
MuonTGC_Cabling::TGCDatabase::MaxDatabaseType
@ MaxDatabaseType
Definition: TGCDatabase.h:19
MuonTGC_Cabling::TGCDatabase::SLBToROD
@ SLBToROD
Definition: TGCDatabase.h:18
MuonTGC_Cabling::TGCDatabase::m_database
std::vector< std::vector< int > > m_database
Definition: TGCDatabase.h:54
MuonTGC_Cabling::TGCDatabase::InPP
@ InPP
Definition: TGCDatabase.h:18
MuonTGC_Cabling::TGCDatabase::m_type
DatabaseType m_type
Definition: TGCDatabase.h:57