CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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 (DTRangeT0 const &)=delete
 
 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 ()
 
DTRangeT0operator= (DTRangeT0 const &)=delete
 
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

std::string mapName () const
 read and store full content More...
 
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 63 of file DTRangeT0.h.

Member Typedef Documentation

Access methods to data.

Definition at line 101 of file DTRangeT0.h.

Constructor & Destructor Documentation

DTRangeT0::DTRangeT0 ( )

Constructor

Definition at line 31 of file DTRangeT0.cc.

References dataList.

31 : dataVersion(" "), dBuf(new DTBufferTree<int, int>) { dataList.reserve(1000); }
std::string dataVersion
Definition: DTRangeT0.h:108
std::vector< std::pair< DTRangeT0Id, DTRangeT0Data > > dataList
Definition: DTRangeT0.h:110
DTBufferTree< int, int > * dBuf
Definition: DTRangeT0.h:112
DTRangeT0::DTRangeT0 ( DTRangeT0 const &  )
delete
DTRangeT0::DTRangeT0 ( const std::string &  version)

Definition at line 33 of file DTRangeT0.cc.

References dataList.

34  dataList.reserve(1000);
35 }
std::string dataVersion
Definition: DTRangeT0.h:108
const std::string & version() const
access version
Definition: DTRangeT0.cc:79
std::vector< std::pair< DTRangeT0Id, DTRangeT0Data > > dataList
Definition: DTRangeT0.h:110
DTBufferTree< int, int > * dBuf
Definition: DTRangeT0.h:112
DTRangeT0::~DTRangeT0 ( )

Destructor

Definition at line 44 of file DTRangeT0.cc.

44 {}

Member Function Documentation

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

Definition at line 126 of file DTRangeT0.cc.

References dataList.

126 { return dataList.begin(); }
std::vector< std::pair< DTRangeT0Id, DTRangeT0Data > > dataList
Definition: DTRangeT0.h:110
void DTRangeT0::clear ( void  )

reset content

Definition at line 83 of file DTRangeT0.cc.

References dataList, and initialize().

Referenced by BeautifulSoup.Tag::setString().

83  {
84  dataList.clear();
85  initialize();
86  return;
87 }
std::vector< std::pair< DTRangeT0Id, DTRangeT0Data > > dataList
Definition: DTRangeT0.h:110
void initialize()
Definition: DTRangeT0.cc:136
DTRangeT0::const_iterator DTRangeT0::end ( void  ) const

Definition at line 128 of file DTRangeT0.cc.

References dataList.

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

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

Definition at line 53 of file DTRangeT0.cc.

References data, dataList, dBuf, DTBufferTree< Key, Content >::find(), edm::second(), DTRangeT0Data::t0max, and DTRangeT0Data::t0min.

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

53  {
54  t0min = t0max = 0;
55 
56  std::vector<int> chanKey;
57  chanKey.reserve(4);
58  chanKey.push_back(wheelId);
59  chanKey.push_back(stationId);
60  chanKey.push_back(sectorId);
61  chanKey.push_back(slId);
62  int ientry;
63  //Guarantee const correctness for thread-safety
64  const DTBufferTree<int, int>* constDBuf = dBuf;
65  int searchStatus = constDBuf->find(chanKey.begin(), chanKey.end(), ientry);
66  if (!searchStatus) {
67  const DTRangeT0Data& data(dataList[ientry].second);
68  t0min = data.t0min;
69  t0max = data.t0max;
70  }
71 
72  return searchStatus;
73 }
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:110
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
DTBufferTree< int, int > * dBuf
Definition: DTRangeT0.h:112
int DTRangeT0::get ( const DTSuperLayerId id,
int &  t0min,
int &  t0max 
) const
void DTRangeT0::initialize ( )

Definition at line 136 of file DTRangeT0.cc.

References officialStyle::chan, DTBufferTree< Key, Content >::clear(), dataList, dBuf, DTBufferTree< Key, Content >::insert(), DTRangeT0Id::sectorId, DTRangeT0Id::slId, DTRangeT0Id::stationId, and DTRangeT0Id::wheelId.

Referenced by clear().

136  {
137  dBuf->clear();
138 
139  int entryNum = 0;
140  int entryMax = dataList.size();
141  std::vector<int> chanKey;
142  chanKey.reserve(4);
143  while (entryNum < entryMax) {
144  const DTRangeT0Id& chan = dataList[entryNum].first;
145 
146  chanKey.clear();
147  chanKey.push_back(chan.wheelId);
148  chanKey.push_back(chan.stationId);
149  chanKey.push_back(chan.sectorId);
150  chanKey.push_back(chan.slId);
151  dBuf->insert(chanKey.begin(), chanKey.end(), entryNum++);
152  }
153  return;
154 }
int wheelId
Definition: DTRangeT0.h:44
tuple chan
lumi = TPaveText(lowX+0.38, lowY+0.061, lowX+0.45, lowY+0.161, &quot;NDC&quot;) lumi.SetBorderSize( 0 ) lumi...
std::vector< std::pair< DTRangeT0Id, DTRangeT0Data > > dataList
Definition: DTRangeT0.h:110
int sectorId
Definition: DTRangeT0.h:46
int insert(ElementKey fKey, ElementKey lKey, Content cont)
DTBufferTree< int, int > * dBuf
Definition: DTRangeT0.h:112
int stationId
Definition: DTRangeT0.h:45
std::string DTRangeT0::mapName ( ) const
private

read and store full content

Definition at line 130 of file DTRangeT0.cc.

References dataVersion, and mergeVDriftHistosByStation::name.

130  {
131  std::stringstream name;
132  name << dataVersion << "_map_RangeT0" << this;
133  return name.str();
134 }
std::string dataVersion
Definition: DTRangeT0.h:108
DTRangeT0& DTRangeT0::operator= ( DTRangeT0 const &  )
delete
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 89 of file DTRangeT0.cc.

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

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

89  {
90  std::vector<int> chanKey;
91  chanKey.reserve(4);
92  chanKey.push_back(wheelId);
93  chanKey.push_back(stationId);
94  chanKey.push_back(sectorId);
95  chanKey.push_back(slId);
96  int ientry;
97  int searchStatus = dBuf->find(chanKey.begin(), chanKey.end(), ientry);
98 
99  if (!searchStatus) {
100  DTRangeT0Data& data(dataList[ientry].second);
101  data.t0min = t0min;
102  data.t0max = t0max;
103  return -1;
104  } else {
106  key.wheelId = wheelId;
107  key.stationId = stationId;
108  key.sectorId = sectorId;
109  key.slId = slId;
111  data.t0min = t0min;
112  data.t0max = t0max;
113  ientry = dataList.size();
114  dataList.push_back(std::pair<DTRangeT0Id, DTRangeT0Data>(key, data));
115  dBuf->insert(chanKey.begin(), chanKey.end(), ientry);
116  return 0;
117  }
118 
119  return 99;
120 }
int wheelId
Definition: DTRangeT0.h:44
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:110
tuple key
prepare the HTCondor submission files and eventually submit them
int sectorId
Definition: DTRangeT0.h:46
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
int insert(ElementKey fKey, ElementKey lKey, Content cont)
DTBufferTree< int, int > * dBuf
Definition: DTRangeT0.h:112
int stationId
Definition: DTRangeT0.h:45
int DTRangeT0::set ( const DTSuperLayerId id,
int  t0min,
int  t0max 
)

Definition at line 122 of file DTRangeT0.cc.

References set(), and relativeConstraints::station.

122  {
123  return set(id.wheel(), id.station(), id.sector(), id.superLayer(), t0min, t0max);
124 }
int set(int wheelId, int stationId, int sectorId, int slId, int t0min, int t0max)
Definition: DTRangeT0.cc:89
int DTRangeT0::setSLRangeT0 ( int  wheelId,
int  stationId,
int  sectorId,
int  slId,
int  t0min,
int  t0max 
)
inline

Definition at line 93 of file DTRangeT0.h.

References set().

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

Definition at line 96 of file DTRangeT0.h.

References set().

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

get content

Operations

Definition at line 79 of file DTRangeT0.h.

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

Definition at line 82 of file DTRangeT0.h.

References gpuClustering::id.

82 { return get(id, t0min, t0max); };
uint16_t *__restrict__ id
const std::string & DTRangeT0::version ( ) const

access version

Definition at line 79 of file DTRangeT0.cc.

References dataVersion.

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

79 { return dataVersion; }
std::string dataVersion
Definition: DTRangeT0.h:108
std::string & DTRangeT0::version ( )

Definition at line 81 of file DTRangeT0.cc.

References dataVersion.

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

81 { return dataVersion; }
std::string dataVersion
Definition: DTRangeT0.h:108

Friends And Related Function Documentation

friend class boost::serialization::access
friend

Definition at line 117 of file DTRangeT0.h.

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

Definition at line 117 of file DTRangeT0.h.

Member Data Documentation

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

Definition at line 110 of file DTRangeT0.h.

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

std::string DTRangeT0::dataVersion
private

Definition at line 108 of file DTRangeT0.h.

Referenced by mapName(), and version().

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

Definition at line 112 of file DTRangeT0.h.

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