test
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 | Friends
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 &)
 
template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 

Private Attributes

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

Friends

class boost::serialization::access
 
template<typename CondSerializationT , typename Enabled >
struct cond::serialization::access
 

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( " " ),
35  dataList.reserve( 1000 );
36 }
std::string dataVersion
Definition: DTRangeT0.h:152
std::vector< std::pair< DTRangeT0Id, DTRangeT0Data > > dataList
Definition: DTRangeT0.h:154
DTBufferTree< int, int > * dBuf
Definition: DTRangeT0.h:156
DTRangeT0::DTRangeT0 ( const std::string &  version)

Definition at line 39 of file DTRangeT0.cc.

References dataList.

39  :
42  dataList.reserve( 1000 );
43 }
std::string dataVersion
Definition: DTRangeT0.h:152
const std::string & version() const
access version
Definition: DTRangeT0.cc:121
std::vector< std::pair< DTRangeT0Id, DTRangeT0Data > > dataList
Definition: DTRangeT0.h:154
DTBufferTree< int, int > * dBuf
Definition: DTRangeT0.h:156
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 191 of file DTRangeT0.cc.

References dataList.

191  {
192  return dataList.begin();
193 }
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 196 of file DTRangeT0.cc.

References dataList.

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

196  {
197  return dataList.end();
198 }
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 AlCaHLTBitMon_QueryRunRegistry::data, dataList, dBuf, DTBufferTree< Key, Content >::find(), edm::second(), DTRangeT0Data::t0max, and DTRangeT0Data::t0min.

Referenced by Options.Options::__getitem__(), betterConfigParser.BetterConfigParser::__updateDict(), util.rrapi.RRApi::columns(), rrapi.RRApi::columns(), util.rrapi.RRApi::count(), rrapi.RRApi::count(), rrapi.RRApi::data(), util.rrapi.RRApi::data(), betterConfigParser.BetterConfigParser::getCompares(), betterConfigParser.BetterConfigParser::getGeneral(), betterConfigParser.BetterConfigParser::getResultingSection(), rrapi.RRApi::report(), util.rrapi.RRApi::report(), rrapi.RRApi::reports(), util.rrapi.RRApi::reports(), util.rrapi.RRApi::tables(), rrapi.RRApi::tables(), rrapi.RRApi::tags(), util.rrapi.RRApi::tags(), rrapi.RRApi::templates(), util.rrapi.RRApi::templates(), util.rrapi.RRApi::workspaces(), 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  //Guarantee const correctness for thread-safety
96  const DTBufferTree<int,int>* constDBuf = dBuf;
97  int searchStatus = constDBuf->find( chanKey.begin(), chanKey.end(), ientry );
98  if ( !searchStatus ) {
99  const DTRangeT0Data& data( dataList[ientry].second );
100  t0min = data.t0min;
101  t0max = data.t0max;
102  }
103 
104  return searchStatus;
105 
106 }
int find(ElementKey fKey, ElementKey lKey, typename DTBufferTreeTrait< Content >::outputTypeOfConstFind &cont) const
U second(std::pair< T, U > const &p)
std::vector< std::pair< DTRangeT0Id, DTRangeT0Data > > dataList
Definition: DTRangeT0.h:154
DTBufferTree< int, int > * dBuf
Definition: DTRangeT0.h:156
int DTRangeT0::get ( const DTSuperLayerId id,
int &  t0min,
int &  t0max 
) const
void DTRangeT0::initialize ( )

Definition at line 208 of file DTRangeT0.cc.

References DTBufferTree< Key, Content >::clear(), dataList, dBuf, DTBufferTree< Key, Content >::insert(), and DTRangeT0Id::stationId.

Referenced by clear().

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

read and store full content

Definition at line 201 of file DTRangeT0.cc.

References dataVersion, and mergeVDriftHistosByStation::name.

201  {
202  std::stringstream name;
203  name << dataVersion << "_map_RangeT0" << this;
204  return name.str();
205 }
std::string dataVersion
Definition: DTRangeT0.h:152
DTRangeT0& DTRangeT0::operator= ( DTRangeT0 const &  )
private
template<class Archive >
void DTRangeT0::serialize ( Archive &  ar,
const unsigned int  version 
)
private
int DTRangeT0::set ( int  wheelId,
int  stationId,
int  sectorId,
int  slId,
int  t0min,
int  t0max 
)

Definition at line 138 of file DTRangeT0.cc.

References AlCaHLTBitMon_QueryRunRegistry::data, dataList, dBuf, DTBufferTree< Key, Content >::find(), DTBufferTree< Key, Content >::insert(), relval_steps::key, edm::second(), DTRangeT0Id::stationId, DTRangeT0Data::t0max, and DTRangeT0Data::t0min.

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

143  {
144 
145  std::vector<int> chanKey;
146  chanKey.reserve(4);
147  chanKey.push_back( wheelId );
148  chanKey.push_back( stationId );
149  chanKey.push_back( sectorId );
150  chanKey.push_back( slId );
151  int ientry;
152  int searchStatus = dBuf->find( chanKey.begin(), chanKey.end(), ientry );
153 
154  if ( !searchStatus ) {
155  DTRangeT0Data& data( dataList[ientry].second );
156  data.t0min = t0min;
157  data.t0max = t0max;
158  return -1;
159  }
160  else {
162  key. wheelId = wheelId;
163  key.stationId = stationId;
164  key. sectorId = sectorId;
165  key. slId = slId;
167  data.t0min = t0min;
168  data.t0max = t0max;
169  ientry = dataList.size();
170  dataList.push_back( std::pair<DTRangeT0Id,DTRangeT0Data>( key, data ) );
171  dBuf->insert( chanKey.begin(), chanKey.end(), ientry );
172  return 0;
173  }
174 
175  return 99;
176 
177 }
int find(ElementKey fKey, ElementKey lKey, typename DTBufferTreeTrait< Content >::outputTypeOfConstFind &cont) const
U second(std::pair< T, U > const &p)
std::vector< std::pair< DTRangeT0Id, DTRangeT0Data > > dataList
Definition: DTRangeT0.h:154
string key
FastSim: produces sample of signal events, overlayed with premixed minbias events.
int insert(ElementKey fKey, ElementKey lKey, Content cont)
int stationId
Definition: DTRangeT0.h:47
DTBufferTree< int, int > * dBuf
Definition: DTRangeT0.h:156
int DTRangeT0::set ( const DTSuperLayerId id,
int  t0min,
int  t0max 
)

Definition at line 180 of file DTRangeT0.cc.

References set(), and relativeConstraints::station.

Referenced by betterConfigParser.BetterConfigParser::getGeneral().

182  {
183  return set( id.wheel(),
184  id.station(),
185  id.sector(),
186  id.superLayer(),
187  t0min, t0max );
188 }
int set(int wheelId, int stationId, int sectorId, int slId, int t0min, int t0max)
Definition: DTRangeT0.cc:138
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:138
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:138
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 121 of file DTRangeT0.cc.

References dataVersion.

Referenced by validation.Sample::datasetpattern(), and validation.Sample::filename().

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

Definition at line 126 of file DTRangeT0.cc.

References dataVersion.

Referenced by validation.Sample::datasetpattern(), and validation.Sample::filename().

126  {
127  return dataVersion;
128 }
std::string dataVersion
Definition: DTRangeT0.h:152

Friends And Related Function Documentation

friend class boost::serialization::access
friend

Definition at line 162 of file DTRangeT0.h.

template<typename CondSerializationT , typename Enabled >
friend struct cond::serialization::access
friend

Definition at line 162 of file DTRangeT0.h.

Member Data Documentation

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().

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

Definition at line 156 of file DTRangeT0.h.

Referenced by get(), initialize(), and set().