CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Member Functions | Private Attributes | Friends
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 Member Functions

template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 

Private Attributes

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

Friends

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

Detailed Description

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

Author
Paolo Ronchese INFN Padova

Definition at line 48 of file DTT0.h.

Member Typedef Documentation

◆ const_iterator

Access methods to data.

Definition at line 122 of file DTT0.h.

Constructor & Destructor Documentation

◆ DTT0() [1/2]

DTT0::DTT0 ( )

Constructor

Definition at line 31 of file DTT0.cc.

31 : dataVersion(" "), nsPerCount(25.0 / 32.0), dataList(DTSequentialCellNumber::max() + 10) {}
std::string dataVersion
Definition: DTT0.h:127
std::vector< DTT0Data > dataList
Definition: DTT0.h:130
float nsPerCount
Definition: DTT0.h:128

◆ DTT0() [2/2]

DTT0::DTT0 ( const std::string &  version)

Definition at line 33 of file DTT0.cc.

std::string dataVersion
Definition: DTT0.h:127
std::vector< DTT0Data > dataList
Definition: DTT0.h:130
const std::string & version() const
access version
Definition: DTT0.cc:82
float nsPerCount
Definition: DTT0.h:128

◆ ~DTT0()

DTT0::~DTT0 ( )

Destructor

Definition at line 41 of file DTT0.cc.

41 {}

Member Function Documentation

◆ begin()

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

Definition at line 145 of file DTT0.cc.

References dataList.

Referenced by DTTPDeadWriter::analyze(), DTt0DBValidation::beginRun(), and DTT0CalibrationRMS::endJob().

145 { return dataList.begin(); }
std::vector< DTT0Data > dataList
Definition: DTT0.h:130

◆ cellT0() [1/2]

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 62 of file DTT0.h.

70  {
71  return get(wheelId, stationId, sectorId, slId, layerId, cellId, t0mean, t0rms, unit);
72  };
float unit() const
Definition: DTT0.cc:80

◆ cellT0() [2/2]

int DTT0::cellT0 ( const DTWireId id,
float &  t0mean,
float &  t0rms,
DTTimeUnits::type  unit 
) const
inline

Definition at line 73 of file DTT0.h.

References triggerObjects_cff::id, and unit().

73  {
74  return get(id, t0mean, t0rms, unit);
75  };
float unit() const
Definition: DTT0.cc:80

◆ clear()

void DTT0::clear ( void  )

reset content

Definition at line 86 of file DTT0.cc.

References data, dataList, mps_fire::i, and dqmiodumpmetadata::n.

Referenced by BeautifulSoup.Tag::setString().

86  {
87  int i;
88  int n = dataList.size();
89  for (i = 0; i < n; ++i) {
90  DTT0Data& data = dataList[i];
91  data.channelId = 0;
92  data.t0mean = data.t0rms;
93  }
94  return;
95 }
std::vector< DTT0Data > dataList
Definition: DTT0.h:130
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
Definition: DTT0.h:36

◆ end()

DTT0::const_iterator DTT0::end ( void  ) const

Definition at line 147 of file DTT0.cc.

References dataList.

Referenced by DTTPDeadWriter::analyze(), DTt0DBValidation::beginRun(), Types.LuminosityBlockRange::cppID(), Types.EventRange::cppID(), and DTT0CalibrationRMS::endJob().

147 { return dataList.end(); }
std::vector< DTT0Data > dataList
Definition: DTT0.h:130

◆ get() [1/2]

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 48 of file DTT0.cc.

References data, dataList, DTSequentialCellNumber::id(), DTTimeUnits::ns, nsPerCount, and unit().

Referenced by Options.Options::__getitem__(), betterConfigParser.BetterConfigParser::__updateDict(), submitPVValidationJobs.BetterConfigParser::__updateDict(), DTTPDeadWriter::analyze(), DTDigiTask::analyze(), DTt0DBValidation::beginRun(), rrapi.RRApi::columns(), util.rrapi.RRApi::columns(), dtCalibration::DTT0FillDefaultFromDB::correction(), dtCalibration::DTT0AbsoluteReferenceCorrection::correction(), dtCalibration::DTT0FillChamberFromDB::correction(), dtCalibration::DTT0ChamberReferenceCorrection::correction(), dtCalibration::DTT0FEBPathCorrection::correction(), dtCalibration::DTT0WireInChamberReferenceCorrection::correction(), rrapi.RRApi::count(), util.rrapi.RRApi::count(), util.rrapi.RRApi::data(), rrapi.RRApi::data(), dtCalibration::DTT0AbsoluteReferenceCorrection::defaultT0(), dtCalibration::DTT0ChamberReferenceCorrection::defaultT0(), dtCalibration::DTT0WireInChamberReferenceCorrection::defaultT0(), dtCalibration::DTT0FEBPathCorrection::defaultT0(), DTTTrigSyncFromDB::emulatorOffset(), DTT0Correction::endJob(), DTT0CalibrationRMS::endJob(), betterConfigParser.BetterConfigParser::getCompares(), betterConfigParser.BetterConfigParser::getGeneral(), DTConfigPedestals::getOffset(), betterConfigParser.BetterConfigParser::getResultingSection(), submitPVValidationJobs.BetterConfigParser::getResultingSection(), DTTTrigSyncT0Only::offset(), DTTTrigSyncFromDB::offset(), util.rrapi.RRApi::report(), rrapi.RRApi::report(), rrapi.RRApi::reports(), util.rrapi.RRApi::reports(), util.rrapi.RRApi::tables(), rrapi.RRApi::tables(), util.rrapi.RRApi::tags(), rrapi.RRApi::tags(), rrapi.RRApi::templates(), util.rrapi.RRApi::templates(), rrapi.RRApi::workspaces(), and util.rrapi.RRApi::workspaces().

56  {
57  t0mean = t0rms = 0.0;
58 
59  int seqNum = DTSequentialCellNumber::id(wheelId, stationId, sectorId, slId, layerId, cellId);
60  if (seqNum < 0)
61  return seqNum;
62 
63  const DTT0Data& data = dataList[seqNum];
64  if (data.channelId == 0)
65  return -999999999;
66 
67  t0mean = data.t0mean;
68  t0rms = data.t0rms;
69  if (unit == DTTimeUnits::ns) {
70  t0mean *= nsPerCount;
71  t0rms *= nsPerCount;
72  }
73  return 0;
74 }
float unit() const
Definition: DTT0.cc:80
std::vector< DTT0Data > dataList
Definition: DTT0.h:130
static int id(int wheel, int station, int sector, int superlayer, int layer, int cell)
float nsPerCount
Definition: DTT0.h:128
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
Definition: DTT0.h:36

◆ get() [2/2]

int DTT0::get ( const DTWireId id,
float &  t0mean,
float &  t0rms,
DTTimeUnits::type  unit 
) const

◆ serialize()

template<class Archive >
void DTT0::serialize ( Archive &  ar,
const unsigned int  version 
)
private

◆ set() [1/2]

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 97 of file DTT0.cc.

References data, dataList, triggerObjects_cff::id, DTSequentialCellNumber::id(), DTTimeUnits::ns, nsPerCount, and unit().

Referenced by DTT0Correction::endJob(), DTT0CalibrationRMS::endJob(), and DTT0Calibration::endJob().

105  {
106  if (unit == DTTimeUnits::ns) {
107  t0mean /= nsPerCount;
108  t0rms /= nsPerCount;
109  }
110 
111  int seqNum = DTSequentialCellNumber::id(wheelId, stationId, sectorId, slId, layerId, cellId);
112  if (seqNum < 0)
113  return seqNum;
114 
115  DTWireId id(wheelId, stationId, sectorId, slId, layerId, cellId);
116  DTT0Data& data = dataList[seqNum];
117  data.channelId = id.rawId();
118  data.t0mean = t0mean;
119  data.t0rms = t0rms;
120 
121  return 0;
122 }
float unit() const
Definition: DTT0.cc:80
std::vector< DTT0Data > dataList
Definition: DTT0.h:130
static int id(int wheel, int station, int sector, int superlayer, int layer, int cell)
float nsPerCount
Definition: DTT0.h:128
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
Definition: DTT0.h:36

◆ set() [2/2]

int DTT0::set ( const DTWireId id,
float  t0mean,
float  t0rms,
DTTimeUnits::type  unit 
)

Definition at line 124 of file DTT0.cc.

References data, dataList, DTSequentialCellNumber::id(), phase1PixelTopology::layer, DTTimeUnits::ns, nsPerCount, relativeConstraints::station, unit(), and makeMuonMisalignmentScenario::wheel.

124  {
125  if (unit == DTTimeUnits::ns) {
126  t0mean /= nsPerCount;
127  t0rms /= nsPerCount;
128  }
129 
130  int seqNum =
131  DTSequentialCellNumber::id(id.wheel(), id.station(), id.sector(), id.superLayer(), id.layer(), id.wire());
132  if (seqNum < 0)
133  return seqNum;
134 
135  DTT0Data& data = dataList[seqNum];
136  data.channelId = id.rawId();
137  data.t0mean = t0mean;
138  data.t0rms = t0rms;
139 
140  return 0;
141 }
float unit() const
Definition: DTT0.cc:80
constexpr std::array< uint8_t, layerIndexSize > layer
std::vector< DTT0Data > dataList
Definition: DTT0.h:130
static int id(int wheel, int station, int sector, int superlayer, int layer, int cell)
float nsPerCount
Definition: DTT0.h:128
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
Definition: DTT0.h:36

◆ setCellT0() [1/2]

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 95 of file DTT0.h.

References unit().

103  {
104  return set(wheelId, stationId, sectorId, slId, layerId, cellId, t0mean, t0rms, unit);
105  };
float unit() const
Definition: DTT0.cc:80

◆ setCellT0() [2/2]

int DTT0::setCellT0 ( const DTWireId id,
float  t0mean,
float  t0rms,
DTTimeUnits::type  unit 
)
inline

Definition at line 106 of file DTT0.h.

References triggerObjects_cff::id, and unit().

106  {
107  return set(id, t0mean, t0rms, unit);
108  };
float unit() const
Definition: DTT0.cc:80

◆ setUnit()

void DTT0::setUnit ( float  unit)

Definition at line 143 of file DTT0.cc.

References nsPerCount, and unit().

143 { nsPerCount = unit; }
float unit() const
Definition: DTT0.cc:80
float nsPerCount
Definition: DTT0.h:128

◆ unit()

float DTT0::unit ( ) const

Definition at line 80 of file DTT0.cc.

References nsPerCount.

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

80 { return nsPerCount; }
float nsPerCount
Definition: DTT0.h:128

◆ version() [1/2]

const std::string & DTT0::version ( ) const

◆ version() [2/2]

std::string & DTT0::version ( )

Definition at line 84 of file DTT0.cc.

References dataVersion.

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

84 { return dataVersion; }
std::string dataVersion
Definition: DTT0.h:127

Friends And Related Function Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Definition at line 132 of file DTT0.h.

◆ cond::serialization::access

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

Definition at line 132 of file DTT0.h.

Member Data Documentation

◆ dataList

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

Definition at line 130 of file DTT0.h.

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

◆ dataVersion

std::string DTT0::dataVersion
private

Definition at line 127 of file DTT0.h.

Referenced by version().

◆ nsPerCount

float DTT0::nsPerCount
private

Definition at line 128 of file DTT0.h.

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