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 (const DTWireId &id, float &t0mean, float &t0rms, DTTimeUnits::type unit) 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...
 
void clear ()
 reset content More...
 
 DTT0 ()
 
 DTT0 (const std::string &version)
 
const_iterator end () const
 
int get (const DTWireId &id, float &t0mean, float &t0rms, DTTimeUnits::type unit) const
 
int get (int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId, float &t0mean, float &t0rms, DTTimeUnits::type unit) const
 
int set (const DTWireId &id, float t0mean, float t0rms, DTTimeUnits::type unit)
 
int set (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)
 
int setCellT0 (int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId, float t0mean, float t0rms, DTTimeUnits::type unit)
 
void setUnit (float unit)
 
float unit () const
 
std::string & version ()
 
const std::string & version () const
 access version More...
 
 ~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) {}

◆ DTT0() [2/2]

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

Definition at line 33 of file DTT0.cc.

◆ ~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.

145 { return dataList.begin(); }

References dataList.

Referenced by DTT0CalibrationRMS::endJob().

◆ cellT0() [1/2]

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

Definition at line 73 of file DTT0.h.

73  {
74  return get(id, t0mean, t0rms, unit);
75  };

References get(), and unit().

◆ cellT0() [2/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  };

◆ clear()

void DTT0::clear ( void  )

reset content

Definition at line 86 of file DTT0.cc.

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 }

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

Referenced by BeautifulSoup.Tag::setString().

◆ end()

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

Definition at line 147 of file DTT0.cc.

147 { return dataList.end(); }

References dataList.

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

◆ get() [1/2]

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

◆ get() [2/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.

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 }

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

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

◆ serialize()

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

◆ set() [1/2]

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

Definition at line 124 of file DTT0.cc.

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 }

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

◆ set() [2/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.

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 }

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

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

◆ setCellT0() [1/2]

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

Definition at line 106 of file DTT0.h.

106  {
107  return set(id, t0mean, t0rms, unit);
108  };

References set(), and unit().

◆ setCellT0() [2/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.

103  {
104  return set(wheelId, stationId, sectorId, slId, layerId, cellId, t0mean, t0rms, unit);
105  };

References set(), and unit().

◆ setUnit()

void DTT0::setUnit ( float  unit)

Definition at line 143 of file DTT0.cc.

143 { nsPerCount = unit; }

References nsPerCount, and unit().

◆ unit()

float DTT0::unit ( ) const

Definition at line 80 of file DTT0.cc.

80 { return nsPerCount; }

References nsPerCount.

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

◆ version() [1/2]

std::string & DTT0::version ( )

Definition at line 84 of file DTT0.cc.

84 { return dataVersion; }

References dataVersion.

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

◆ version() [2/2]

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

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

DTSequentialCellNumber::max
static int max()
Definition: DTSequentialCellNumber.cc:95
mps_fire.i
i
Definition: mps_fire.py:355
DTSequentialCellNumber::id
static int id(int wheel, int station, int sector, int superlayer, int layer, int cell)
Definition: DTSequentialCellNumber.cc:39
DTT0::dataList
std::vector< DTT0Data > dataList
Definition: DTT0.h:130
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
relativeConstraints.station
station
Definition: relativeConstraints.py:67
DTT0::version
const std::string & version() const
access version
Definition: DTT0.cc:82
DTT0::nsPerCount
float nsPerCount
Definition: DTT0.h:128
DTT0::get
int get(int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId, float &t0mean, float &t0rms, DTTimeUnits::type unit) const
Definition: DTT0.cc:48
DTWireId
Definition: DTWireId.h:12
DTTimeUnits::ns
Definition: DTTimeUnits.h:32
DTT0Data
Definition: DTT0.h:36
DTT0::set
int set(int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId, float t0mean, float t0rms, DTTimeUnits::type unit)
Definition: DTT0.cc:97
DTT0::unit
float unit() const
Definition: DTT0.cc:80
makeMuonMisalignmentScenario.wheel
wheel
Definition: makeMuonMisalignmentScenario.py:319
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:31
data
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
DTT0::dataVersion
std::string dataVersion
Definition: DTT0.h:127