ATLAS Offline Software
LArTT_Selector.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 LARRAWUTILS_LARTT_SELECTOR_H
6 #define LARRAWUTILS_LARTT_SELECTOR_H
7 
8 #include "Identifier/Identifier.h"
10 
11 class LArRoIMap;
12 
13 template <class CONTAINER >
15 {
16 
17  public:
27 // typedef LArRawChannelContainer CONTAINER;
28 // typedef LArRawChannelCollection COLLECTION;
29 // typedef LArRawChannel OBJECT;
30 
31  typedef typename CONTAINER::IDENTIFIABLE COLLECTION;
32  typedef typename CONTAINER::const_iterator COLL_IT;
33  typedef typename COLLECTION::const_iterator OBJ_IT;
34  typedef typename COLLECTION::OBJECT OBJECT;
35  typedef typename COLLECTION::ID COLL_ID;
36  typedef typename std::vector<COLL_ID>::const_iterator COLL_ID_IT;
37 // typedef std::vector<COLL_ID>::const_iterator COLL_ID_IT;
38 
39  // a vector of ROI_ID
40  // typedef LArRoI_ID ROI_ID;
42  typedef std::vector<TT_ID> VEC_TT_ID;
43  typedef VEC_TT_ID::const_iterator TT_ID_IT;
44 
45  typedef unsigned int TT_SAM_ID;
46  typedef std::vector<TT_SAM_ID> VEC_TT_SAM_ID;
47  typedef VEC_TT_SAM_ID::const_iterator TT_SAM_ID_IT;
48 
49  typedef std::pair<OBJ_IT,OBJ_IT> ITPAIR;
50  typedef std::vector<ITPAIR> VEC_ITPAIR;
51  typedef typename VEC_ITPAIR::const_iterator ITPAIR_IT;
52 
53  // a map of Collection ID and vector
54  // a Collection is associated with a list of TT_ID
55  typedef std::map<const COLLECTION*, VEC_TT_ID> MAP_COLL_ROI ;
56  typedef typename MAP_COLL_ROI::const_iterator MAP_IT ;
57 
59  {
60  friend class LArTT_Selector<CONTAINER> ;
61  public:
63 
65 
67 
68  const OBJECT* operator * () ;
69 
70  bool operator != ( const const_iterator& it ) const ;
71 
72  bool operator == ( const const_iterator& it ) const ;
73 
74 
75  private:
77  const_iterator( const VEC_ITPAIR* v, const ITPAIR_IT& it ) ;
78 
83 
84  };
85 
86  friend class const_iterator;
87 
88  LArTT_Selector ( const LArRoIMap* map= 0,
89  const CONTAINER* c=NULL );
90 
91  virtual ~LArTT_Selector () {} ;
92 
93  void setMap(const LArRoIMap* map) ;
94  void setContainer(const CONTAINER* c) ;
95 
96  // set RoI according TT, + a sam number.
97 // void setRoIs( const VEC_TT_ID& ids, int sam ) ;
98  void setRoIs ( const VEC_TT_ID& ids ) ;
99 
100  // set RoI according to combined TT_Sampling ID (unsigned int).
101 // void setRoIs( const VEC_TT_SAM_ID& ids ) ;
102 
104  const_iterator end() const ;
105 
106  private:
107  void initialize();
108 
110  const CONTAINER* m_container;
111 
113 
114 };
115 
117 
118 #endif
LArTT_Selector::m_container
const CONTAINER * m_container
Definition: LArTT_Selector.h:110
LArTT_Selector::MAP_IT
MAP_COLL_ROI::const_iterator MAP_IT
Definition: LArTT_Selector.h:56
LArTT_Selector::COLLECTION
CONTAINER::IDENTIFIABLE COLLECTION
Constructors.
Definition: LArTT_Selector.h:31
LArTT_Selector::TT_SAM_ID_IT
VEC_TT_SAM_ID::const_iterator TT_SAM_ID_IT
Definition: LArTT_Selector.h:47
LArTT_Selector::const_iterator
Definition: LArTT_Selector.h:59
LArTT_Selector::setContainer
void setContainer(const CONTAINER *c)
LArTT_Selector::TT_SAM_ID
unsigned int TT_SAM_ID
Definition: LArTT_Selector.h:45
ID
std::vector< Identifier > ID
Definition: CalibHitIDCheck.h:24
LArTT_Selector::end
const_iterator end() const
LArTT_Selector::m_vecItPair
VEC_ITPAIR m_vecItPair
Definition: LArTT_Selector.h:112
skel.it
it
Definition: skel.GENtoEVGEN.py:423
LArTT_Selector::VEC_ITPAIR
std::vector< ITPAIR > VEC_ITPAIR
Definition: LArTT_Selector.h:50
LArTT_Selector::VEC_TT_ID
std::vector< TT_ID > VEC_TT_ID
Definition: LArTT_Selector.h:42
LArTT_Selector::const_iterator::operator*
const OBJECT * operator*()
LArTT_Selector::const_iterator::operator!=
bool operator!=(const const_iterator &it) const
LArTT_Selector::const_iterator
friend class const_iterator
Definition: LArTT_Selector.h:86
LArTT_Selector::COLL_ID
COLLECTION::ID COLL_ID
Definition: LArTT_Selector.h:35
LArTT_Selector::const_iterator::const_iterator
const_iterator(const VEC_ITPAIR *v)
LArTT_Selector::~LArTT_Selector
virtual ~LArTT_Selector()
Definition: LArTT_Selector.h:91
LArTT_Selector::ITPAIR_IT
VEC_ITPAIR::const_iterator ITPAIR_IT
Definition: LArTT_Selector.h:51
LArTT_Selector::begin
const_iterator begin() const
LArTT_Selector::OBJECT
COLLECTION::OBJECT OBJECT
Definition: LArTT_Selector.h:34
LArTT_Selector::COLL_IT
CONTAINER::const_iterator COLL_IT
Definition: LArTT_Selector.h:32
LArTT_Selector::setRoIs
void setRoIs(const VEC_TT_ID &ids)
LArTT_Selector::COLL_ID_IT
std::vector< COLL_ID >::const_iterator COLL_ID_IT
Definition: LArTT_Selector.h:36
LArTT_Selector::TT_ID
IdentifierHash TT_ID
Definition: LArTT_Selector.h:41
LArTT_Selector::const_iterator::m_pair_it
ITPAIR_IT m_pair_it
Definition: LArTT_Selector.h:80
LArTT_Selector::const_iterator::m_vec_itpair
const VEC_ITPAIR * m_vec_itpair
Definition: LArTT_Selector.h:79
LArTT_Selector::initialize
void initialize()
python.subdetectors.mmg.ids
ids
Definition: mmg.py:8
IdentifierHash.h
LArTT_Selector::m_roiMap
const LArRoIMap * m_roiMap
Definition: LArTT_Selector.h:109
LArTT_Selector
Definition: LArTT_Selector.h:15
LArTT_Selector::const_iterator::m_obj_it
OBJ_IT m_obj_it
Definition: LArTT_Selector.h:81
python.PyAthena.v
v
Definition: PyAthena.py:157
LArTT_Selector::LArTT_Selector
LArTT_Selector(const LArRoIMap *map=0, const CONTAINER *c=NULL)
LArTT_Selector::ITPAIR
std::pair< OBJ_IT, OBJ_IT > ITPAIR
Definition: LArTT_Selector.h:49
LArTT_Selector::VEC_TT_SAM_ID
std::vector< TT_SAM_ID > VEC_TT_SAM_ID
Definition: LArTT_Selector.h:46
LArTT_Selector::setMap
void setMap(const LArRoIMap *map)
LArRoIMap
Mapping between calorimeter trigger id to offline/online Identifier.
Definition: LArRoIMap.h:31
LArTT_Selector::TT_ID_IT
VEC_TT_ID::const_iterator TT_ID_IT
Definition: LArTT_Selector.h:43
LArTT_Selector::const_iterator::const_iterator
const_iterator()
LArTT_Selector::MAP_COLL_ROI
std::map< const COLLECTION *, VEC_TT_ID > MAP_COLL_ROI
Definition: LArTT_Selector.h:55
IdentifierHash
Definition: IdentifierHash.h:38
LArTT_Selector::const_iterator::operator==
bool operator==(const const_iterator &it) const
python.compressB64.c
def c
Definition: compressB64.py:93
LArTT_Selector::const_iterator::operator++
const_iterator & operator++()
LArTT_Selector::const_iterator::const_iterator
const_iterator(const VEC_ITPAIR *v, const ITPAIR_IT &it)
LArTT_Selector::OBJ_IT
COLLECTION::const_iterator OBJ_IT
Definition: LArTT_Selector.h:33
LArTT_Selector::const_iterator::m_obj_it_end
OBJ_IT m_obj_it_end
Definition: LArTT_Selector.h:82
LArTT_Selector.icc