ATLAS Offline Software
Loading...
Searching...
No Matches
MdtTubeInChamberIdFields.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 * Identifier hashes
7 * -----------------------------------------
8 *
9 * Author : Martin Woudstra
10 * Creation Date: 28 April 2004
11 * Last Update : 28 April 2005
12 ***************************************************************************/
13
17
18#ifndef MUONCALIBIDENTIFIER_MDTTUBEINCHAMBERFIELDS_H
19# define MUONCALIBIDENTIFIER_MDTTUBEINCHAMBERFIELDS_H
20// std
21
22// other packages
23// this package
24#include "MuonCalibIdentifier/MdtFixedIds.h"
27
28class MdtTubeInChamberIdFields : public IdHashTableHelper<3,MdtTubeId,MdtTubeHash> {
29public:
33 enum { kTubeField = 0, kLayerField = 1, kMultilayerField = 2 };
35 void setAll( const MdtTubeId& id );
37 void setAll( int fields[3] );
38private:
39};
40
41inline void MdtTubeInChamberIdFields::setAll( int fields[3] ) {
42 BaseClass::setFields( fields );
43 MdtTubeId id( fields[kMultilayerField], fields[kLayerField], fields[kTubeField] );
44 BaseClass::setId( id );
45}
46
47inline void MdtTubeInChamberIdFields::setAll( const MdtTubeId& id ) {
48 BaseClass::setId( id );
49 BaseClass::setField( kMultilayerField, id.multilayer() );
50 BaseClass::setField( kLayerField, id.layer() );
51 BaseClass::setField( kTubeField, id.tube() );
52}
53
54
55
56#endif // MUONCALIBIDENTIFIER_MDTTUBEINCHAMBERFIELDS_H
void setId(const IdentifierType &id)
Helper class implementation to instantiate the templated IdentifierHashTable class.
IdHashTableHelper< 3, MdtTubeId, MdtTubeHash > BaseClass
define type BaseClasse
void setAll(const MdtTubeId &id)
Set identifier and also the fields (using the internal helper).