CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Private Member Functions | Private Attributes
DTRangeT0 Class Reference

#include <DTRangeT0.h>

Public Types

typedef std::vector< std::pair
< DTRangeT0Id, DTRangeT0Data >
>::const_iterator 
const_iterator
 Access methods to data. More...
 

Public Member Functions

const_iterator begin () const
 
void clear ()
 reset content More...
 
 DTRangeT0 ()
 
 DTRangeT0 (const std::string &version)
 
const_iterator end () const
 
int get (int wheelId, int stationId, int sectorId, int slId, int &t0min, int &t0max) const
 
int get (const DTSuperLayerId &id, int &t0min, int &t0max) const
 
void initialize ()
 
int set (int wheelId, int stationId, int sectorId, int slId, int t0min, int t0max)
 
int set (const DTSuperLayerId &id, int t0min, int t0max)
 
int setSLRangeT0 (int wheelId, int stationId, int sectorId, int slId, int t0min, int t0max)
 
int setSLRangeT0 (const DTSuperLayerId &id, int t0min, int t0max)
 
int slRangeT0 (int wheelId, int stationId, int sectorId, int slId, int &t0min, int &t0max) const
 get content More...
 
int slRangeT0 (const DTSuperLayerId &id, int &t0min, int &t0max) const
 
const std::string & version () const
 access version More...
 
std::string & version ()
 
 ~DTRangeT0 ()
 

Private Member Functions

 DTRangeT0 (DTRangeT0 const &)
 
std::string mapName () const
 read and store full content More...
 
DTRangeT0operator= (DTRangeT0 const &)
 

Private Attributes

 COND_SERIALIZABLE
 
DTBufferTree< int, int > *dBuf COND_TRANSIENT
 
std::vector< std::pair
< DTRangeT0Id, DTRangeT0Data > > 
dataList
 
std::string dataVersion
 

Detailed Description

Description: Class to hold drift tubes T0 range ( SL by SL min - max T0 )

Author
Paolo Ronchese INFN Padova

Definition at line 71 of file DTRangeT0.h.

Member Typedef Documentation

Access methods to data.

Definition at line 141 of file DTRangeT0.h.

Constructor & Destructor Documentation

DTRangeT0::DTRangeT0 ( )

Constructor

Definition at line 32 of file DTRangeT0.cc.

References dataList.

32  :
33  dataVersion( " " ),
34  dBuf(new DTBufferTree<int,int>) {
35  dataList.reserve( 1000 );
36 }
std::string dataVersion
Definition: DTRangeT0.h:152
std::vector< std::pair< DTRangeT0Id, DTRangeT0Data > > dataList
Definition: DTRangeT0.h:154
DTRangeT0::DTRangeT0 ( const std::string &  version)

Definition at line 39 of file DTRangeT0.cc.

References dataList.

39  :
41  dBuf(new DTBufferTree<int,int>) {
42  dataList.reserve( 1000 );
43 }
std::string dataVersion
Definition: DTRangeT0.h:152
const std::string & version() const
access version
Definition: DTRangeT0.cc:119
std::vector< std::pair< DTRangeT0Id, DTRangeT0Data > > dataList
Definition: DTRangeT0.h:154
DTRangeT0::~DTRangeT0 ( )

Destructor

Definition at line 63 of file DTRangeT0.cc.

63  {
64 }
DTRangeT0::DTRangeT0 ( DTRangeT0 const &  )
private

Member Function Documentation

DTRangeT0::const_iterator DTRangeT0::begin ( void  ) const

Definition at line 189 of file DTRangeT0.cc.

References dataList.

189  {
190  return dataList.begin();
191 }
std::vector< std::pair< DTRangeT0Id, DTRangeT0Data > > dataList
Definition: DTRangeT0.h:154
void DTRangeT0::clear ( void  )
DTRangeT0::const_iterator DTRangeT0::end ( void  ) const

Definition at line 194 of file DTRangeT0.cc.

References dataList.

Referenced by Types.LuminosityBlockRange::cppID(), and Types.EventRange::cppID().

194  {
195  return dataList.end();
196 }
std::vector< std::pair< DTRangeT0Id, DTRangeT0Data > > dataList
Definition: DTRangeT0.h:154
int DTRangeT0::get ( int  wheelId,
int  stationId,
int  sectorId,
int  slId,
int &  t0min,
int &  t0max 
) const

Definition at line 78 of file DTRangeT0.cc.

References data, dataList, edm::second(), DTRangeT0Data::t0max, and DTRangeT0Data::t0min.

Referenced by Options.Options::__getitem__(), betterConfigParser.BetterConfigParser::__updateDict(), rrapi.RRApi::columns(), rrapi.RRApi::count(), rrapi.RRApi::data(), betterConfigParser.BetterConfigParser::getCompares(), betterConfigParser.BetterConfigParser::getGeneral(), betterConfigParser.BetterConfigParser::getResultingSection(), rrapi.RRApi::report(), rrapi.RRApi::reports(), rrapi.RRApi::tables(), rrapi.RRApi::tags(), rrapi.RRApi::templates(), and rrapi.RRApi::workspaces().

83  {
84 
85  t0min =
86  t0max = 0;
87 
88  std::vector<int> chanKey;
89  chanKey.reserve(4);
90  chanKey.push_back( wheelId );
91  chanKey.push_back( stationId );
92  chanKey.push_back( sectorId );
93  chanKey.push_back( slId );
94  int ientry;
95  int searchStatus = dBuf->find( chanKey.begin(), chanKey.end(), ientry );
96  if ( !searchStatus ) {
97  const DTRangeT0Data& data( dataList[ientry].second );
98  t0min = data.t0min;
99  t0max = data.t0max;
100  }
101 
102  return searchStatus;
103 
104 }
U second(std::pair< T, U > const &p)
std::vector< std::pair< DTRangeT0Id, DTRangeT0Data > > dataList
Definition: DTRangeT0.h:154
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
int DTRangeT0::get ( const DTSuperLayerId id,
int &  t0min,
int &  t0max 
) const
void DTRangeT0::initialize ( )

Definition at line 206 of file DTRangeT0.cc.

References dataList, and DTRangeT0Id::stationId.

Referenced by clear().

206  {
207 
208  dBuf->clear();
209 
210  int entryNum = 0;
211  int entryMax = dataList.size();
212  std::vector<int> chanKey;
213  chanKey.reserve(4);
214  while ( entryNum < entryMax ) {
215 
216  const DTRangeT0Id& chan = dataList[entryNum].first;
217 
218  chanKey.clear();
219  chanKey.push_back( chan. wheelId );
220  chanKey.push_back( chan.stationId );
221  chanKey.push_back( chan. sectorId );
222  chanKey.push_back( chan. slId );
223  dBuf->insert( chanKey.begin(), chanKey.end(), entryNum++ );
224  }
225  return;
226 }
std::vector< std::pair< DTRangeT0Id, DTRangeT0Data > > dataList
Definition: DTRangeT0.h:154
int stationId
Definition: DTRangeT0.h:47
std::string DTRangeT0::mapName ( ) const
private

read and store full content

Definition at line 199 of file DTRangeT0.cc.

References dataVersion, and mergeVDriftHistosByStation::name.

199  {
200  std::stringstream name;
201  name << dataVersion << "_map_RangeT0" << this;
202  return name.str();
203 }
std::string dataVersion
Definition: DTRangeT0.h:152
DTRangeT0& DTRangeT0::operator= ( DTRangeT0 const &  )
private
int DTRangeT0::set ( int  wheelId,
int  stationId,
int  sectorId,
int  slId,
int  t0min,
int  t0max 
)

Definition at line 136 of file DTRangeT0.cc.

References data, dataList, combine::key, edm::second(), DTRangeT0Id::stationId, DTRangeT0Data::t0max, and DTRangeT0Data::t0min.

Referenced by betterConfigParser.BetterConfigParser::getGeneral(), DTRangeT0Handler::getNewObjects(), set(), and setSLRangeT0().

141  {
142 
143  std::vector<int> chanKey;
144  chanKey.reserve(4);
145  chanKey.push_back( wheelId );
146  chanKey.push_back( stationId );
147  chanKey.push_back( sectorId );
148  chanKey.push_back( slId );
149  int ientry;
150  int searchStatus = dBuf->find( chanKey.begin(), chanKey.end(), ientry );
151 
152  if ( !searchStatus ) {
153  DTRangeT0Data& data( dataList[ientry].second );
154  data.t0min = t0min;
155  data.t0max = t0max;
156  return -1;
157  }
158  else {
160  key. wheelId = wheelId;
161  key.stationId = stationId;
162  key. sectorId = sectorId;
163  key. slId = slId;
165  data.t0min = t0min;
166  data.t0max = t0max;
167  ientry = dataList.size();
168  dataList.push_back( std::pair<DTRangeT0Id,DTRangeT0Data>( key, data ) );
169  dBuf->insert( chanKey.begin(), chanKey.end(), ientry );
170  return 0;
171  }
172 
173  return 99;
174 
175 }
U second(std::pair< T, U > const &p)
std::vector< std::pair< DTRangeT0Id, DTRangeT0Data > > dataList
Definition: DTRangeT0.h:154
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
list key
Definition: combine.py:13
int stationId
Definition: DTRangeT0.h:47
int DTRangeT0::set ( const DTSuperLayerId id,
int  t0min,
int  t0max 
)

Definition at line 178 of file DTRangeT0.cc.

References set(), and relativeConstraints::station.

Referenced by betterConfigParser.BetterConfigParser::getGeneral().

180  {
181  return set( id.wheel(),
182  id.station(),
183  id.sector(),
184  id.superLayer(),
185  t0min, t0max );
186 }
int set(int wheelId, int stationId, int sectorId, int slId, int t0min, int t0max)
Definition: DTRangeT0.cc:136
int DTRangeT0::setSLRangeT0 ( int  wheelId,
int  stationId,
int  sectorId,
int  slId,
int  t0min,
int  t0max 
)
inline

Definition at line 117 of file DTRangeT0.h.

References set().

123  { return set( wheelId, stationId, sectorId, slId, t0min, t0max ); };
int set(int wheelId, int stationId, int sectorId, int slId, int t0min, int t0max)
Definition: DTRangeT0.cc:136
int DTRangeT0::setSLRangeT0 ( const DTSuperLayerId id,
int  t0min,
int  t0max 
)
inline

Definition at line 124 of file DTRangeT0.h.

References set().

127  { return set( id, t0min, t0max ); };
int set(int wheelId, int stationId, int sectorId, int slId, int t0min, int t0max)
Definition: DTRangeT0.cc:136
int DTRangeT0::slRangeT0 ( int  wheelId,
int  stationId,
int  sectorId,
int  slId,
int &  t0min,
int &  t0max 
) const
inline

get content

Operations

Definition at line 87 of file DTRangeT0.h.

93  { return get( wheelId, stationId, sectorId, slId,
94  t0min, t0max ); };
int DTRangeT0::slRangeT0 ( const DTSuperLayerId id,
int &  t0min,
int &  t0max 
) const
inline

Definition at line 95 of file DTRangeT0.h.

98  { return get( id, t0min, t0max ); };
const std::string & DTRangeT0::version ( ) const

access version

Definition at line 119 of file DTRangeT0.cc.

References dataVersion.

119  {
120  return dataVersion;
121 }
std::string dataVersion
Definition: DTRangeT0.h:152
std::string & DTRangeT0::version ( )

Definition at line 124 of file DTRangeT0.cc.

References dataVersion.

124  {
125  return dataVersion;
126 }
std::string dataVersion
Definition: DTRangeT0.h:152

Member Data Documentation

DTRangeT0::COND_SERIALIZABLE
private

Definition at line 162 of file DTRangeT0.h.

DTBufferTree<int,int>* dBuf DTRangeT0::COND_TRANSIENT
private

Definition at line 156 of file DTRangeT0.h.

std::vector< std::pair<DTRangeT0Id,DTRangeT0Data> > DTRangeT0::dataList
private

Definition at line 154 of file DTRangeT0.h.

Referenced by begin(), clear(), DTRangeT0(), end(), get(), initialize(), and set().

std::string DTRangeT0::dataVersion
private

Definition at line 152 of file DTRangeT0.h.

Referenced by mapName(), and version().