CMS 3D CMS Logo

Public Types | Public Member Functions | Private Attributes

DTT0 Class Reference

#include <DTT0.h>

List of all members.

Public Types

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

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
int cellT0 (const DTWireId &id, float &t0mean, float &t0rms, DTTimeUnits::type unit) const
void clear ()
 reset content
 DTT0 (const std::string &version)
 DTT0 ()
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 (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
 ~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.

          :
  dataVersion( " " ),
  nsPerCount( 25.0 / 32.0 ),
  dataList( DTSequentialCellNumber::max() + 10 ) {
}
DTT0::DTT0 ( const std::string &  version)

Definition at line 41 of file DTT0.cc.

                                    :
  dataVersion( version ),
  nsPerCount( 25.0 / 32.0 ),
  dataList( DTSequentialCellNumber::max() + 10 ) {
}
DTT0::~DTT0 ( )

Destructor

Definition at line 58 of file DTT0.cc.

            {
}

Member Function Documentation

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

Definition at line 206 of file DTT0.cc.

References dataList.

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

                                     {
  return dataList.begin();
}
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().

      { return get( id, t0mean, t0rms, unit ); };
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.

References unit().

      { return get( wheelId, stationId, sectorId, slId, layerId, cellId,
                    t0mean, t0rms, unit ); };
void DTT0::clear ( void  )

reset content

Definition at line 130 of file DTT0.cc.

References DTT0Data::channelId, AlCaHLTBitMon_QueryRunRegistry::data, dataList, i, n, DTT0Data::t0mean, and DTT0Data::t0rms.

                 {
  int i;
  int n = dataList.size();
  for ( i = 0; i < n; ++i ) {
    DTT0Data& data = dataList[i];
    data.channelId = 0;
    data.t0mean = data.t0rms;
  }
  return;
}
DTT0::const_iterator DTT0::end ( void  ) const

Definition at line 211 of file DTT0.cc.

References dataList.

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

                                   {
  return dataList.end();
}
int DTT0::get ( int  wheelId,
int  stationId,
int  sectorId,
int  slId,
int  layerId,
int  cellId,
float &  t0mean,
float &  t0rms,
DTTimeUnits::type  unit 
) const
int DTT0::get ( const DTWireId id,
float &  t0mean,
float &  t0rms,
DTTimeUnits::type  unit 
) const

Definition at line 100 of file DTT0.cc.

References unit().

                                            {
  return get( id.wheel(),
              id.station(),
              id.sector(),
              id.superLayer(),
              id.layer(),
              id.wire(),
              t0mean, t0rms, unit );
}
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, AlCaHLTBitMon_QueryRunRegistry::data, dataList, DTSequentialCellNumber::id(), DTTimeUnits::ns, nsPerCount, DTT0Data::t0mean, and DTT0Data::t0rms.

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

                                      {

  if ( unit == DTTimeUnits::ns ) {
    t0mean /= nsPerCount;
    t0rms  /= nsPerCount;
  }

  int seqNum = DTSequentialCellNumber::id( wheelId, stationId, sectorId,
                                              slId,   layerId,   cellId );
  if ( seqNum < 0 ) return seqNum;

  DTWireId id(  wheelId, stationId, sectorId,
                   slId,   layerId,   cellId );
  DTT0Data& data = dataList[seqNum];
  data.channelId = id.rawId();
  data.t0mean    = t0mean;
  data.t0rms     = t0rms;

  return 0;

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

Definition at line 173 of file DTT0.cc.

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

                                      {

  if ( unit == DTTimeUnits::ns ) {
    t0mean /= nsPerCount;
    t0rms  /= nsPerCount;
  }

  int seqNum = DTSequentialCellNumber::id( id.wheel(),
                                           id.station(),
                                           id.sector(),
                                           id.superLayer(),
                                           id.layer(),
                                           id.wire() );
  if ( seqNum < 0 ) return seqNum;

  DTT0Data& data = dataList[seqNum];
  data.channelId = id.rawId();
  data.t0mean    = t0mean;
  data.t0rms     = t0rms;

  return 0;

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

      { return set( wheelId, stationId, sectorId, slId, layerId, cellId,
                    t0mean, t0rms, unit ); };
int DTT0::setCellT0 ( const DTWireId id,
float  t0mean,
float  t0rms,
DTTimeUnits::type  unit 
) [inline]

Definition at line 118 of file DTT0.h.

References unit().

      { return set( id, t0mean, t0rms, unit ); };
void DTT0::setUnit ( float  unit)

Definition at line 201 of file DTT0.cc.

References nsPerCount, and unit().

                               {
  nsPerCount = unit;
}
float DTT0::unit ( ) const

Definition at line 114 of file DTT0.cc.

References nsPerCount.

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

                       {
  return nsPerCount;
}
const std::string & DTT0::version ( ) const

access version

Definition at line 120 of file DTT0.cc.

References dataVersion.

                               {
  return dataVersion;
}
std::string & DTT0::version ( )

Definition at line 125 of file DTT0.cc.

References dataVersion.

                         {
  return dataVersion;
}

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