ATLAS Offline Software
Loading...
Searching...
No Matches
TBDetDescrManager.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3*/
4
5//==============================================
6// File TBDetDescrManager.h
7// keeps positions of all detectors at the testbeam
8//=============================================
9#ifndef TBDetDescrManager_H
10#define TBDetDescrManager_H
11
13
16class MsgStream;
17
18#include <vector>
19
21{
22 public:
24
25 virtual ~TBDetDescrManager() { }
26
27 // copy all elements from a vector to private vector
28 void initialize(const std::vector<TBElement> & vec);
29
30 // copy all elements from container to private vector
31 void initialize(const TBElementContainer * pTBElementContainer);
32
33 // copy all elements to a container
34 void getAll(TBElementContainer * pTBElementContainer) const;
35
36 // get one element
38
39 // re-initialize one element
40 void setElement(const TBElement & element);
41
42 bool is_initialized (void) const {return (m_elements>0);}
43 int n_elements (void) const {return m_elements; }
44 int max_size (void) const {return m_TBElementVec.size(); }
45
46 void print (MsgStream& log) const;
47
48private:
49
50 unsigned int m_elements; // number of non-empty elements
51 std::vector<TBElement> m_TBElementVec; // TBElementID::TBElementID as index
52
53 };
54
56
57#endif
58
std::vector< size_t > vec
macros to associate a CLID to a type
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
void getAll(TBElementContainer *pTBElementContainer) const
int max_size(void) const
void print(MsgStream &log) const
int n_elements(void) const
std::vector< TBElement > m_TBElementVec
unsigned int m_elements
bool is_initialized(void) const
const TBElement & getElement(TBElementID::TBElementID id) const
void setElement(const TBElement &element)
void initialize()