#include <CalibReadoutPmtChannel.h>
Collaboration diagram for DayaBay::CalibReadoutPmtChannel:
Public Member Functions | |
CalibReadoutPmtChannel (const DayaBay::DetectorSensor &sensorId, DayaBay::CalibReadoutPmtCrate *calibReadout) | |
standard constructor | |
CalibReadoutPmtChannel () | |
Default Constructor. | |
virtual | ~CalibReadoutPmtChannel () |
Default Destructor. | |
virtual std::ostream & | fillStream (std::ostream &s) const |
Fill the ASCII output stream. | |
unsigned int | size () const |
Return size of time vector(should be the same as charge vector). | |
double | charge (unsigned int index) const |
Return charge with a given index. | |
double | time (unsigned int index) const |
Return time with a given index. | |
int | maxChargeIndex () const |
Return the max charge index for this channel. | |
double | maxCharge () const |
Return max charge for this channel. | |
double | sumCharge () const |
Return sum of charge for this channel. | |
int | earliestTimeIndex () const |
Return the index of earliest(largest) time. | |
double | earliestTime () const |
Return earliest(largest) time. | |
double | earliestCharge () const |
Return the earliest ADC value. | |
const DayaBay::CalibReadoutPmtCrate * | calibReadout () const |
Retrieve const Reference to full calibrated readout which contains this data. | |
void | setCalibReadout (DayaBay::CalibReadoutPmtCrate *value) |
Update Reference to full calibrated readout which contains this data. | |
const DayaBay::DetectorSensor & | pmtSensorId () const |
Retrieve const Detector Sensor ID. | |
void | setPmtSensorId (const DayaBay::DetectorSensor &value) |
Update Detector Sensor ID. | |
const std::vector< double > & | charge () const |
Retrieve const Vector of charges (PE). | |
void | setCharge (const std::vector< double > &value) |
Update Vector of charges (PE). | |
const std::vector< double > & | time () const |
Retrieve const Vector of times (ns). | |
void | setTime (const std::vector< double > &value) |
Update Vector of times (ns). | |
Static Public Member Functions | |
static void * | operator new (size_t size) |
operator new | |
static void * | operator new (size_t size, void *pObj) |
placement operator new it is needed by libstdc++ 3.2.3 (e.g. | |
static void | operator delete (void *p) |
operator delete | |
static void | operator delete (void *p, void *pObj) |
placement operator delete not sure if really needed, but it does not harm | |
Private Attributes | |
DayaBay::CalibReadoutPmtCrate * | m_calibReadout |
Reference to full calibrated readout which contains this data. | |
DayaBay::DetectorSensor | m_pmtSensorId |
Detector Sensor ID. | |
std::vector< double > | m_charge |
Vector of charges (PE). | |
std::vector< double > | m_time |
Vector of times (ns). |
Definition at line 43 of file CalibReadoutPmtChannel.h.
DayaBay::CalibReadoutPmtChannel::CalibReadoutPmtChannel | ( | const DayaBay::DetectorSensor & | sensorId, | |
DayaBay::CalibReadoutPmtCrate * | calibReadout | |||
) | [inline] |
standard constructor
Definition at line 181 of file CalibReadoutPmtChannel.h.
00183 { 00184 00185 setPmtSensorId(sensorId); 00186 setCalibReadout(calibReadout); 00187 00188 }
DayaBay::CalibReadoutPmtChannel::CalibReadoutPmtChannel | ( | ) | [inline] |
Default Constructor.
Definition at line 52 of file CalibReadoutPmtChannel.h.
00052 : m_calibReadout(0), 00053 m_pmtSensorId(0), 00054 m_charge(), 00055 m_time() {}
virtual DayaBay::CalibReadoutPmtChannel::~CalibReadoutPmtChannel | ( | ) | [inline, virtual] |
std::ostream & DayaBay::CalibReadoutPmtChannel::fillStream | ( | std::ostream & | s | ) | const [inline, virtual] |
Fill the ASCII output stream.
Definition at line 190 of file CalibReadoutPmtChannel.h.
00191 { 00192 s << "{ " << "calibReadout : " << m_calibReadout << std::endl 00193 << "pmtSensorId : " << m_pmtSensorId << std::endl 00194 << "charge : " << m_charge << std::endl 00195 << "time : " << m_time << std::endl << " }"; 00196 return s; 00197 }
unsigned int DayaBay::CalibReadoutPmtChannel::size | ( | ) | const [inline] |
Return size of time vector(should be the same as charge vector).
Definition at line 240 of file CalibReadoutPmtChannel.h.
00241 { 00242 00243 return m_time.size(); 00244 00245 }
double DayaBay::CalibReadoutPmtChannel::charge | ( | unsigned int | index | ) | const [inline] |
double DayaBay::CalibReadoutPmtChannel::time | ( | unsigned int | index | ) | const [inline] |
int DayaBay::CalibReadoutPmtChannel::maxChargeIndex | ( | ) | const [inline] |
Return the max charge index for this channel.
Definition at line 261 of file CalibReadoutPmtChannel.h.
00262 { 00263 00264 if( m_charge.empty() ) return 0; 00265 double maxCharge = 0; 00266 int maxChargeIndex = 0; 00267 for(unsigned i=0; i<m_charge.size(); i++) { 00268 if( m_charge[i] > maxCharge ) { 00269 maxCharge = m_charge[i]; 00270 maxChargeIndex = i; 00271 } 00272 } 00273 return maxChargeIndex; 00274 00275 }
double DayaBay::CalibReadoutPmtChannel::maxCharge | ( | ) | const [inline] |
Return max charge for this channel.
Definition at line 277 of file CalibReadoutPmtChannel.h.
00278 { 00279 00280 if( m_charge.empty() ) return 0; 00281 return m_charge[maxChargeIndex()]; 00282 00283 }
double DayaBay::CalibReadoutPmtChannel::sumCharge | ( | ) | const [inline] |
Return sum of charge for this channel.
Definition at line 285 of file CalibReadoutPmtChannel.h.
00286 { 00287 00288 if( m_charge.empty() ) return 0; 00289 double sumCharge = 0; 00290 for(unsigned i=0; i<m_charge.size(); i++) { 00291 sumCharge += m_charge[i]; 00292 } 00293 return sumCharge; 00294 00295 }
int DayaBay::CalibReadoutPmtChannel::earliestTimeIndex | ( | ) | const [inline] |
Return the index of earliest(largest) time.
Definition at line 297 of file CalibReadoutPmtChannel.h.
00298 { 00299 00300 if( m_time.empty() ) return 0; 00301 double earliestTime = 0; 00302 int earliestTimeIndex = 0; 00303 for(unsigned int i=0; i < m_time.size(); i++) { 00304 if( i == 0 || m_time[i] < earliestTime ) { 00305 earliestTime = m_time[i]; 00306 earliestTimeIndex = i; 00307 } 00308 } 00309 return earliestTimeIndex; 00310 00311 }
double DayaBay::CalibReadoutPmtChannel::earliestTime | ( | ) | const [inline] |
Return earliest(largest) time.
Definition at line 313 of file CalibReadoutPmtChannel.h.
00314 { 00315 00316 if( m_time.empty() ) return 0; 00317 return m_time[earliestTimeIndex()]; 00318 00319 }
double DayaBay::CalibReadoutPmtChannel::earliestCharge | ( | ) | const [inline] |
Return the earliest ADC value.
Definition at line 321 of file CalibReadoutPmtChannel.h.
00322 { 00323 00324 if( m_charge.empty() ) return 0; 00325 return m_charge[earliestTimeIndex()]; 00326 00327 }
const DayaBay::CalibReadoutPmtCrate * DayaBay::CalibReadoutPmtChannel::calibReadout | ( | ) | const [inline] |
Retrieve const Reference to full calibrated readout which contains this data.
Definition at line 200 of file CalibReadoutPmtChannel.h.
00201 { 00202 return m_calibReadout; 00203 }
void DayaBay::CalibReadoutPmtChannel::setCalibReadout | ( | DayaBay::CalibReadoutPmtCrate * | value | ) | [inline] |
Update Reference to full calibrated readout which contains this data.
Definition at line 205 of file CalibReadoutPmtChannel.h.
00206 { 00207 m_calibReadout = value; 00208 }
const DayaBay::DetectorSensor & DayaBay::CalibReadoutPmtChannel::pmtSensorId | ( | ) | const [inline] |
Retrieve const Detector Sensor ID.
Definition at line 210 of file CalibReadoutPmtChannel.h.
00211 { 00212 return m_pmtSensorId; 00213 }
void DayaBay::CalibReadoutPmtChannel::setPmtSensorId | ( | const DayaBay::DetectorSensor & | value | ) | [inline] |
Update Detector Sensor ID.
Definition at line 215 of file CalibReadoutPmtChannel.h.
00216 { 00217 m_pmtSensorId = value; 00218 }
const std::vector< double > & DayaBay::CalibReadoutPmtChannel::charge | ( | ) | const [inline] |
Retrieve const Vector of charges (PE).
Definition at line 220 of file CalibReadoutPmtChannel.h.
00221 { 00222 return m_charge; 00223 }
void DayaBay::CalibReadoutPmtChannel::setCharge | ( | const std::vector< double > & | value | ) | [inline] |
Update Vector of charges (PE).
Definition at line 225 of file CalibReadoutPmtChannel.h.
00226 { 00227 m_charge = value; 00228 }
const std::vector< double > & DayaBay::CalibReadoutPmtChannel::time | ( | ) | const [inline] |
Retrieve const Vector of times (ns).
Definition at line 230 of file CalibReadoutPmtChannel.h.
00231 { 00232 return m_time; 00233 }
void DayaBay::CalibReadoutPmtChannel::setTime | ( | const std::vector< double > & | value | ) | [inline] |
Update Vector of times (ns).
Definition at line 235 of file CalibReadoutPmtChannel.h.
00236 { 00237 m_time = value; 00238 }
static void* DayaBay::CalibReadoutPmtChannel::operator new | ( | size_t | size | ) | [inline, static] |
operator new
Definition at line 125 of file CalibReadoutPmtChannel.h.
00126 { 00127 return ( sizeof(CalibReadoutPmtChannel) == size ? 00128 boost::singleton_pool<CalibReadoutPmtChannel, sizeof(CalibReadoutPmtChannel)>::malloc() : 00129 ::operator new(size) ); 00130 }
static void* DayaBay::CalibReadoutPmtChannel::operator new | ( | size_t | size, | |
void * | pObj | |||
) | [inline, static] |
placement operator new it is needed by libstdc++ 3.2.3 (e.g.
in std::vector) it is not needed in libstdc++ >= 3.4
Definition at line 135 of file CalibReadoutPmtChannel.h.
00136 { 00137 return ::operator new (size,pObj); 00138 }
static void DayaBay::CalibReadoutPmtChannel::operator delete | ( | void * | p | ) | [inline, static] |
operator delete
Definition at line 141 of file CalibReadoutPmtChannel.h.
00142 { 00143 boost::singleton_pool<CalibReadoutPmtChannel, sizeof(CalibReadoutPmtChannel)>::is_from(p) ? 00144 boost::singleton_pool<CalibReadoutPmtChannel, sizeof(CalibReadoutPmtChannel)>::free(p) : 00145 ::operator delete(p); 00146 }
static void DayaBay::CalibReadoutPmtChannel::operator delete | ( | void * | p, | |
void * | pObj | |||
) | [inline, static] |
placement operator delete not sure if really needed, but it does not harm
Definition at line 150 of file CalibReadoutPmtChannel.h.
00151 { 00152 ::operator delete (p, pObj); 00153 }
Reference to full calibrated readout which contains this data.
Definition at line 159 of file CalibReadoutPmtChannel.h.
std::vector<double> DayaBay::CalibReadoutPmtChannel::m_charge [private] |
std::vector<double> DayaBay::CalibReadoutPmtChannel::m_time [private] |