ATLAS Offline Software
TGCDatabaseASDToPP.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef MUONTGC_CABLING_TGCDATABASEASDTOPP_HH
6 #define MUONTGC_CABLING_TGCDATABASEASDTOPP_HH
7 
9 
10 namespace MuonTGC_Cabling
11 {
12 
14 {
15 public:
31  enum INDEXIN {NIndexIn=3};
32  static const int IndexIn[NIndexIn];
33  static const int ReverseIndexIn[DATABASESIZE];
34  enum INDEXOUT {NIndexOut=3};
35  static const int IndexOut[NIndexOut];
36  static const int ReverseIndexOut[DATABASESIZE];
37 
39  TGCDatabaseASDToPP(const std::string& filename,
40  const std::string& blockname,
41  bool v_isCommon=true);
43  TGCDatabaseASDToPP(const TGCDatabaseASDToPP&, bool v_isCommon=true);
45  virtual ~TGCDatabaseASDToPP(void);
46 
47  virtual bool update(const std::vector<int>&) override;
48 
49  virtual int find(const std::vector<int>&) const override;
50 
53  virtual int getIndexDBIn(int* indexIn) const override;
56  virtual int getIndexDBOut(int* indexOut) const override;
57 
59  virtual void getindexDBVectorIn(std::vector<int>& tmpindexDBIn) const;
61  virtual void getNIndexDBIn(int& tmpNIndexDBIn) const;
63  virtual void getmaxIndexIn(int* tmpmaxIndexIn) const;
65  virtual void getminIndexIn(int* tmpminIndexIn) const;
66 
68  virtual void getindexDBVectorOut(std::vector<int>& tmpindexDBOut) const;
70  virtual void getNIndexDBOut(int& tmpNIndexDBOut) const;
72  virtual void getmaxIndexOut(int* tmpmaxIndexOut) const;
74  virtual void getminIndexOut(int* tmpminIndexOut) const;
75 
77  bool isCommon() const;
78 
79 private:
80  virtual void readDB(void) override;
82 
84  virtual void makeIndexDBIn(void);
86  virtual int convertIndexDBIn(int* indexIn) const;
87 
88  std::vector<int> m_indexDBIn;
89  int m_NIndexDBIn = 0;
92 
94  virtual void makeIndexDBOut(void);
96  virtual int convertIndexDBOut(int* indexOut) const;
97 
98  std::vector<int> m_indexDBOut;
99  int m_NIndexDBOut = 0;
102 
104  bool m_isCommon;
105 
108 };
109 
110 } // end of namespace
111 
112 #endif
MuonTGC_Cabling::TGCDatabaseASDToPP::ReverseIndexOut
static const int ReverseIndexOut[DATABASESIZE]
Definition: TGCDatabaseASDToPP.h:36
MuonTGC_Cabling::TGCDatabaseASDToPP::getindexDBVectorOut
virtual void getindexDBVectorOut(std::vector< int > &tmpindexDBOut) const
Get the IndexDBOut table.
Definition: TGCDatabaseASDToPP.cxx:152
MuonTGC_Cabling::TGCDatabaseASDToPP::NIndexOut
@ NIndexOut
Definition: TGCDatabaseASDToPP.h:34
MuonTGC_Cabling::TGCDatabaseASDToPP::getminIndexOut
virtual void getminIndexOut(int *tmpminIndexOut) const
Get the minimum values of indexOut with NIndexOut dimensions.
Definition: TGCDatabaseASDToPP.cxx:169
TGCDatabase.h
MuonTGC_Cabling::TGCDatabaseASDToPP::IndexIn
static const int IndexIn[NIndexIn]
Definition: TGCDatabaseASDToPP.h:32
MuonTGC_Cabling::TGCDatabaseASDToPP::TGCDatabaseASDToPP
TGCDatabaseASDToPP(void)
Definition: TGCDatabaseASDToPP.h:81
MuonTGC_Cabling::TGCDatabaseASDToPP::getIndexDBIn
virtual int getIndexDBIn(int *indexIn) const override
Get IndexDBIn (position in the databse between 0 and database.size()-1) from indexIn which is NIndexI...
Definition: TGCDatabaseASDToPP.cxx:108
MuonTGC_Cabling::TGCDatabaseASDToPP::DATABASESIZE
DATABASESIZE
Definition: TGCDatabaseASDToPP.h:30
MuonTGC_Cabling::TGCDatabaseASDToPP::m_maxIndexIn
int m_maxIndexIn[NIndexIn]
Definition: TGCDatabaseASDToPP.h:90
MuonTGC_Cabling::TGCDatabaseASDToPP::convertIndexDBIn
virtual int convertIndexDBIn(int *indexIn) const
Get the interal number, which is between 0 and NIndexDBIn-1.
Definition: TGCDatabaseASDToPP.cxx:281
MuonTGC_Cabling::TGCDatabaseASDToPP::getindexDBVectorIn
virtual void getindexDBVectorIn(std::vector< int > &tmpindexDBIn) const
Get the IndexDBIn table.
Definition: TGCDatabaseASDToPP.cxx:118
MuonTGC_Cabling::TGCDatabaseASDToPP::NIndexIn
@ NIndexIn
Definition: TGCDatabaseASDToPP.h:31
MuonTGC_Cabling::TGCDatabaseASDToPP::IndexOut
static const int IndexOut[NIndexOut]
Definition: TGCDatabaseASDToPP.h:35
MuonTGC_Cabling::TGCDatabaseASDToPP::find
virtual int find(const std::vector< int > &) const override
Definition: TGCDatabaseASDToPP.cxx:93
MuonTGC_Cabling::TGCDatabaseASDToPP
Definition: TGCDatabaseASDToPP.h:14
MuonTGC_Cabling::TGCDatabaseASDToPP::m_minIndexOut
int m_minIndexOut[NIndexOut]
Definition: TGCDatabaseASDToPP.h:101
MuonTGC_Cabling::TGCDatabaseASDToPP::isCommon
bool isCommon() const
This method is used to know the database is common or sector specific.
Definition: TGCDatabaseASDToPP.cxx:176
MuonTGC_Cabling::TGCDatabaseASDToPP::~TGCDatabaseASDToPP
virtual ~TGCDatabaseASDToPP(void)
Destructor.
Definition: TGCDatabaseASDToPP.cxx:51
MuonTGC_Cabling::TGCDatabaseASDToPP::makeIndexDBOut
virtual void makeIndexDBOut(void)
Make the IndexDBOut table.
Definition: TGCDatabaseASDToPP.cxx:292
MuonTGC_Cabling::TGCDatabaseASDToPP::INDEXOUT
INDEXOUT
Definition: TGCDatabaseASDToPP.h:34
MuonTGC_Cabling::TGCDatabase
Definition: TGCDatabase.h:15
MuonTGC_Cabling::TGCDatabaseASDToPP::operator=
TGCDatabaseASDToPP & operator=(const TGCDatabaseASDToPP &right)
hidden assignment operator
MuonTGC_Cabling::TGCDatabaseASDToPP::getNIndexDBOut
virtual void getNIndexDBOut(int &tmpNIndexDBOut) const
Get the size of the IndexDBOut table.
Definition: TGCDatabaseASDToPP.cxx:157
MuonTGC_Cabling::TGCDatabaseASDToPP::getmaxIndexOut
virtual void getmaxIndexOut(int *tmpmaxIndexOut) const
Get the maximum values of indexOut with NIndexOut dimensions.
Definition: TGCDatabaseASDToPP.cxx:162
MuonTGC_Cabling
Definition: TGCCable.h:13
MuonTGC_Cabling::TGCDatabaseASDToPP::getminIndexIn
virtual void getminIndexIn(int *tmpminIndexIn) const
Get the minimum values of indexIn with NIndexIn dimensions.
Definition: TGCDatabaseASDToPP.cxx:135
MuonTGC_Cabling::TGCDatabaseASDToPP::readDB
virtual void readDB(void) override
Definition: TGCDatabaseASDToPP.cxx:181
MuonTGC_Cabling::TGCDatabaseASDToPP::ReverseIndexIn
static const int ReverseIndexIn[DATABASESIZE]
Definition: TGCDatabaseASDToPP.h:33
MuonTGC_Cabling::TGCDatabaseASDToPP::m_indexDBIn
std::vector< int > m_indexDBIn
Definition: TGCDatabaseASDToPP.h:88
python.egammaTruthD3PDObject.blockname
blockname
Definition: egammaTruthD3PDObject.py:64
MuonTGC_Cabling::TGCDatabaseASDToPP::makeIndexDBIn
virtual void makeIndexDBIn(void)
Make the IndexDBIn table.
Definition: TGCDatabaseASDToPP.cxx:261
MuonTGC_Cabling::TGCDatabaseASDToPP::m_minIndexIn
int m_minIndexIn[NIndexIn]
Definition: TGCDatabaseASDToPP.h:91
MuonTGC_Cabling::TGCDatabaseASDToPP::m_NIndexDBOut
int m_NIndexDBOut
Definition: TGCDatabaseASDToPP.h:99
MuonTGC_Cabling::TGCDatabaseASDToPP::m_isCommon
bool m_isCommon
This bool variable is used to know the database is common or sector specific.
Definition: TGCDatabaseASDToPP.h:104
MuonTGC_Cabling::TGCDatabaseASDToPP::m_maxIndexOut
int m_maxIndexOut[NIndexOut]
Definition: TGCDatabaseASDToPP.h:100
MuonTGC_Cabling::TGCDatabaseASDToPP::getIndexDBOut
virtual int getIndexDBOut(int *indexOut) const override
Get IndexDBOut (position in the databse between 0 and database.size()-1) from indexOut which is NInde...
Definition: TGCDatabaseASDToPP.cxx:142
MuonTGC_Cabling::TGCDatabaseASDToPP::convertIndexDBOut
virtual int convertIndexDBOut(int *indexOut) const
Get the interal number, which is between 0 and NIndexDBOut-1.
Definition: TGCDatabaseASDToPP.cxx:312
MuonTGC_Cabling::TGCDatabaseASDToPP::m_indexDBOut
std::vector< int > m_indexDBOut
Definition: TGCDatabaseASDToPP.h:98
CaloCellTimeCorrFiller.filename
filename
Definition: CaloCellTimeCorrFiller.py:24
MuonTGC_Cabling::TGCDatabaseASDToPP::update
virtual bool update(const std::vector< int > &) override
Definition: TGCDatabaseASDToPP.cxx:55
MuonTGC_Cabling::TGCDatabaseASDToPP::m_NIndexDBIn
int m_NIndexDBIn
Definition: TGCDatabaseASDToPP.h:89
MuonTGC_Cabling::TGCDatabaseASDToPP::INDEXIN
INDEXIN
Definition: TGCDatabaseASDToPP.h:31
MuonTGC_Cabling::TGCDatabaseASDToPP::getmaxIndexIn
virtual void getmaxIndexIn(int *tmpmaxIndexIn) const
Get the maximum values of indexIn with NIndexIn dimensions.
Definition: TGCDatabaseASDToPP.cxx:128
MuonTGC_Cabling::TGCDatabaseASDToPP::getNIndexDBIn
virtual void getNIndexDBIn(int &tmpNIndexDBIn) const
Get the size of the IndexDBIn table.
Definition: TGCDatabaseASDToPP.cxx:123