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 Attributes
DTT0 Class Reference

#include <DTT0.h>

Public Types

typedef std::vector< DTT0Data >
::const_iterator 
const_iterator
 Access methods to data. More...
 

Public Member Functions

const_iterator begin () const
 
int cellT0 (int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId, float &t0mean, float &t0rms, DTTimeUnits::type unit) const
 get content More...
 
int cellT0 (const DTWireId &id, float &t0mean, float &t0rms, DTTimeUnits::type unit) const
 
void clear ()
 reset content More...
 
 DTT0 ()
 
 DTT0 (const std::string &version)
 
const_iterator end () const
 
int get (int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId, float &t0mean, float &t0rms, DTTimeUnits::type unit) const
 
int get (const DTWireId &id, float &t0mean, float &t0rms, DTTimeUnits::type unit) const
 
int set (int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId, float t0mean, float t0rms, DTTimeUnits::type unit)
 
int set (const DTWireId &id, float t0mean, float t0rms, DTTimeUnits::type unit)
 
int setCellT0 (int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId, float t0mean, float t0rms, DTTimeUnits::type unit)
 
int setCellT0 (const DTWireId &id, float t0mean, float t0rms, DTTimeUnits::type unit)
 
void setUnit (float unit)
 
float unit () const
 
const std::string & version () const
 access version More...
 
std::string & version ()
 
 ~DTT0 ()
 

Private Attributes

std::vector< DTT0DatadataList
 
std::string dataVersion
 
float nsPerCount
 

Detailed Description

Description: Class to hold drift tubes T0s ( cell by cell time offsets )

Date:
2012/02/18 10:46:28
Revision:
1.12
Author
Paolo Ronchese INFN Padova

Definition at line 52 of file DTT0.h.

Member Typedef Documentation

Access methods to data.

Definition at line 139 of file DTT0.h.

Constructor & Destructor Documentation

DTT0::DTT0 ( )

Constructor

Definition at line 34 of file DTT0.cc.

34  :
35  dataVersion( " " ),
36  nsPerCount( 25.0 / 32.0 ),
38 }
std::vector< DTT0Data > dataList
Definition: DTT0.h:148
std::string dataVersion
Definition: DTT0.h:145
float nsPerCount
Definition: DTT0.h:146
DTT0::DTT0 ( const std::string &  version)

Definition at line 41 of file DTT0.cc.

41  :
43  nsPerCount( 25.0 / 32.0 ),
45 }
std::vector< DTT0Data > dataList
Definition: DTT0.h:148
std::string dataVersion
Definition: DTT0.h:145
float nsPerCount
Definition: DTT0.h:146
const std::string & version() const
access version
Definition: DTT0.cc:120
DTT0::~DTT0 ( )

Destructor

Definition at line 58 of file DTT0.cc.

58  {
59 }

Member Function Documentation

DTT0::const_iterator DTT0::begin ( void  ) const

Definition at line 206 of file DTT0.cc.

References dataList.

Referenced by DTT0Calibration::endJob(), and DTT0CalibrationNew::endJob().

206  {
207  return dataList.begin();
208 }
std::vector< DTT0Data > dataList
Definition: DTT0.h:148
int DTT0::cellT0 ( int  wheelId,
int  stationId,
int  sectorId,
int  slId,
int  layerId,
int  cellId,
float &  t0mean,
float &  t0rms,
DTTimeUnits::type  unit 
) const
inline

get content

Operations

Definition at line 68 of file DTT0.h.

77  { return get( wheelId, stationId, sectorId, slId, layerId, cellId,
78  t0mean, t0rms, unit ); };
float unit() const
Definition: DTT0.cc:114
int DTT0::cellT0 ( const DTWireId id,
float &  t0mean,
float &  t0rms,
DTTimeUnits::type  unit 
) const
inline

Definition at line 79 of file DTT0.h.

References unit().

83  { return get( id, t0mean, t0rms, unit ); };
float unit() const
Definition: DTT0.cc:114
void DTT0::clear ( void  )
DTT0::const_iterator DTT0::end ( void  ) const

Definition at line 211 of file DTT0.cc.

References dataList.

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

211  {
212  return dataList.end();
213 }
std::vector< DTT0Data > dataList
Definition: DTT0.h:148
int DTT0::get ( int  wheelId,
int  stationId,
int  sectorId,
int  slId,
int  layerId,
int  cellId,
float &  t0mean,
float &  t0rms,
DTTimeUnits::type  unit 
) const

Definition at line 69 of file DTT0.cc.

References DTT0Data::channelId, data, dataList, DTSequentialCellNumber::id(), DTTimeUnits::ns, nsPerCount, DTT0Data::t0mean, and DTT0Data::t0rms.

Referenced by Options.Options::__getitem__(), betterConfigParser.BetterConfigParser::__updateDict(), dtCalibration::DTT0FillDefaultFromDB::correction(), dtCalibration::DTT0AbsoluteReferenceCorrection::correction(), dtCalibration::DTT0ChamberReferenceCorrection::correction(), dtCalibration::DTT0FillChamberFromDB::correction(), dtCalibration::DTT0WireInChamberReferenceCorrection::correction(), dtCalibration::DTT0ChamberReferenceCorrection::defaultT0(), dtCalibration::DTT0AbsoluteReferenceCorrection::defaultT0(), dtCalibration::DTT0WireInChamberReferenceCorrection::defaultT0(), DTT0Calibration::endJob(), DTT0CalibrationNew::endJob(), betterConfigParser.BetterConfigParser::getCompares(), betterConfigParser.BetterConfigParser::getGeneral(), DTConfigPedestals::getOffset(), and betterConfigParser.BetterConfigParser::getResultingSection().

77  {
78 
79  t0mean =
80  t0rms = 0.0;
81 
82  int seqNum = DTSequentialCellNumber::id( wheelId, stationId, sectorId,
83  slId, layerId, cellId );
84  if ( seqNum < 0 ) return seqNum;
85 
86  const DTT0Data& data = dataList[seqNum];
87  if ( data.channelId == 0 ) return -999999999;
88 
89  t0mean = data.t0mean;
90  t0rms = data.t0rms;
91  if ( unit == DTTimeUnits::ns ) {
92  t0mean *= nsPerCount;
93  t0rms *= nsPerCount;
94  }
95  return 0;
96 
97 }
std::vector< DTT0Data > dataList
Definition: DTT0.h:148
uint32_t channelId
Definition: DTT0.h:45
static int id(int wheel, int station, int sector, int superlayer, int layer, int cell)
float unit() const
Definition: DTT0.cc:114
float nsPerCount
Definition: DTT0.h:146
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
float t0rms
Definition: DTT0.h:47
float t0mean
Definition: DTT0.h:46
Definition: DTT0.h:38
int DTT0::get ( const DTWireId id,
float &  t0mean,
float &  t0rms,
DTTimeUnits::type  unit 
) const

Definition at line 100 of file DTT0.cc.

References unit().

Referenced by Options.Options::__getitem__(), betterConfigParser.BetterConfigParser::__updateDict(), betterConfigParser.BetterConfigParser::getCompares(), betterConfigParser.BetterConfigParser::getGeneral(), and betterConfigParser.BetterConfigParser::getResultingSection().

103  {
104  return get( id.wheel(),
105  id.station(),
106  id.sector(),
107  id.superLayer(),
108  id.layer(),
109  id.wire(),
110  t0mean, t0rms, unit );
111 }
float unit() const
Definition: DTT0.cc:114
int DTT0::set ( int  wheelId,
int  stationId,
int  sectorId,
int  slId,
int  layerId,
int  cellId,
float  t0mean,
float  t0rms,
DTTimeUnits::type  unit 
)

Definition at line 142 of file DTT0.cc.

References DTT0Data::channelId, data, dataList, DTSequentialCellNumber::id(), DTTimeUnits::ns, nsPerCount, DTT0Data::t0mean, and DTT0Data::t0rms.

Referenced by DTT0Correction::endJob(), DTT0Calibration::endJob(), DTT0CalibrationNew::endJob(), betterConfigParser.BetterConfigParser::getGeneral(), DTT0Handler::getNewObjects(), DTFakeT0ESProducer::produce(), and setCellT0().

150  {
151 
152  if ( unit == DTTimeUnits::ns ) {
153  t0mean /= nsPerCount;
154  t0rms /= nsPerCount;
155  }
156 
157  int seqNum = DTSequentialCellNumber::id( wheelId, stationId, sectorId,
158  slId, layerId, cellId );
159  if ( seqNum < 0 ) return seqNum;
160 
161  DTWireId id( wheelId, stationId, sectorId,
162  slId, layerId, cellId );
163  DTT0Data& data = dataList[seqNum];
164  data.channelId = id.rawId();
165  data.t0mean = t0mean;
166  data.t0rms = t0rms;
167 
168  return 0;
169 
170 }
std::vector< DTT0Data > dataList
Definition: DTT0.h:148
uint32_t channelId
Definition: DTT0.h:45
static int id(int wheel, int station, int sector, int superlayer, int layer, int cell)
float unit() const
Definition: DTT0.cc:114
float nsPerCount
Definition: DTT0.h:146
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
float t0rms
Definition: DTT0.h:47
float t0mean
Definition: DTT0.h:46
Definition: DTT0.h:38
int DTT0::set ( const DTWireId id,
float  t0mean,
float  t0rms,
DTTimeUnits::type  unit 
)

Definition at line 173 of file DTT0.cc.

References DTT0Data::channelId, data, dataList, DTSequentialCellNumber::id(), DTTimeUnits::ns, nsPerCount, relativeConstraints::station, DTT0Data::t0mean, and DTT0Data::t0rms.

Referenced by betterConfigParser.BetterConfigParser::getGeneral().

176  {
177 
178  if ( unit == DTTimeUnits::ns ) {
179  t0mean /= nsPerCount;
180  t0rms /= nsPerCount;
181  }
182 
183  int seqNum = DTSequentialCellNumber::id( id.wheel(),
184  id.station(),
185  id.sector(),
186  id.superLayer(),
187  id.layer(),
188  id.wire() );
189  if ( seqNum < 0 ) return seqNum;
190 
191  DTT0Data& data = dataList[seqNum];
192  data.channelId = id.rawId();
193  data.t0mean = t0mean;
194  data.t0rms = t0rms;
195 
196  return 0;
197 
198 }
std::vector< DTT0Data > dataList
Definition: DTT0.h:148
uint32_t channelId
Definition: DTT0.h:45
static int id(int wheel, int station, int sector, int superlayer, int layer, int cell)
float unit() const
Definition: DTT0.cc:114
float nsPerCount
Definition: DTT0.h:146
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
float t0rms
Definition: DTT0.h:47
float t0mean
Definition: DTT0.h:46
Definition: DTT0.h:38
int DTT0::setCellT0 ( int  wheelId,
int  stationId,
int  sectorId,
int  slId,
int  layerId,
int  cellId,
float  t0mean,
float  t0rms,
DTTimeUnits::type  unit 
)
inline

Definition at line 107 of file DTT0.h.

References set().

116  { return set( wheelId, stationId, sectorId, slId, layerId, cellId,
117  t0mean, t0rms, unit ); };
int set(int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId, float t0mean, float t0rms, DTTimeUnits::type unit)
Definition: DTT0.cc:142
float unit() const
Definition: DTT0.cc:114
int DTT0::setCellT0 ( const DTWireId id,
float  t0mean,
float  t0rms,
DTTimeUnits::type  unit 
)
inline

Definition at line 118 of file DTT0.h.

References set().

122  { return set( id, t0mean, t0rms, unit ); };
int set(int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId, float t0mean, float t0rms, DTTimeUnits::type unit)
Definition: DTT0.cc:142
float unit() const
Definition: DTT0.cc:114
void DTT0::setUnit ( float  unit)

Definition at line 201 of file DTT0.cc.

References nsPerCount, and unit().

201  {
202  nsPerCount = unit;
203 }
float unit() const
Definition: DTT0.cc:114
float nsPerCount
Definition: DTT0.h:146
float DTT0::unit ( ) const

Definition at line 114 of file DTT0.cc.

References nsPerCount.

Referenced by cellT0(), get(), and setUnit().

114  {
115  return nsPerCount;
116 }
float nsPerCount
Definition: DTT0.h:146
const std::string & DTT0::version ( ) const

access version

Definition at line 120 of file DTT0.cc.

References dataVersion.

120  {
121  return dataVersion;
122 }
std::string dataVersion
Definition: DTT0.h:145
std::string & DTT0::version ( )

Definition at line 125 of file DTT0.cc.

References dataVersion.

125  {
126  return dataVersion;
127 }
std::string dataVersion
Definition: DTT0.h:145

Member Data Documentation

std::vector< DTT0Data > DTT0::dataList
private

Definition at line 148 of file DTT0.h.

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

std::string DTT0::dataVersion
private

Definition at line 145 of file DTT0.h.

Referenced by version().

float DTT0::nsPerCount
private

Definition at line 146 of file DTT0.h.

Referenced by get(), set(), setUnit(), and unit().