#include <CalibReadoutPmtCrate.h>
Inheritance diagram for DayaBay::CalibReadoutPmtCrate:
Public Types | |
typedef std::vector< DayaBay::CalibReadoutPmtChannel > | PmtChannelReadouts |
Vector of calibrated PMT data. | |
Public Member Functions | |
CalibReadoutPmtCrate (const DayaBay::Detector &detector, unsigned int triggerNumber, const TimeStamp &triggerTime, const DayaBay::Trigger::TriggerType_t &triggerType) | |
standard constructor | |
CalibReadoutPmtCrate (const DayaBay::CalibReadoutPmtCrate &rhs) | |
copy constructor | |
CalibReadoutPmtCrate () | |
Default Constructor. | |
virtual | ~CalibReadoutPmtCrate () |
Default Destructor. | |
CalibReadoutPmtCrate & | operator= (const DayaBay::CalibReadoutPmtCrate &rhs) |
assignment operator | |
void | addSensor (const DayaBay::DetectorSensor &sensorId) |
Adds a sensor to this readout. | |
CalibReadoutPmtChannel * | sensor (const DayaBay::DetectorSensor &sensorId) |
Returns the specified sensor from this readout. | |
std::vector< DayaBay::DetectorSensor > | sensors () |
Returns a list of sensors included in the readout. | |
std::ostream & | fillStream (std::ostream &s) const |
Print the crate data. | |
const PmtChannelReadouts & | channelReadout () const |
Retrieve const The set of sensors in this readout. | |
void | setChannelReadout (const PmtChannelReadouts &value) |
Update The set of sensors in this readout. | |
const DayaBay::Detector & | detector () const |
Retrieve const The detector associated with this readout. | |
void | setDetector (const DayaBay::Detector &value) |
Update The detector associated with this readout. | |
unsigned int | triggerNumber () const |
Retrieve const The count of the trigger command from this detector. | |
void | setTriggerNumber (unsigned int value) |
Update The count of the trigger command from this detector. | |
const TimeStamp & | triggerTime () const |
Retrieve const The absolute time of the trigger command. | |
void | setTriggerTime (const TimeStamp &value) |
Update The absolute time of the trigger command. | |
const DayaBay::Trigger::TriggerType_t & | triggerType () const |
Retrieve const The type of trigger conditions which produced this readout. | |
void | setTriggerType (const DayaBay::Trigger::TriggerType_t &value) |
Update The type of trigger conditions which produced this readout. | |
const DayaBay::CalibReadoutHeader * | header () const |
Retrieve const The calib readout header associated with this readout. | |
void | setHeader (DayaBay::CalibReadoutHeader *value) |
Update The calib readout header associated with this readout. | |
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 | |
PmtChannelReadouts | m_channelReadout |
The set of sensors in this readout. |
Definition at line 41 of file CalibReadoutPmtCrate.h.
typedef std::vector<DayaBay::CalibReadoutPmtChannel> DayaBay::CalibReadoutPmtCrate::PmtChannelReadouts |
DayaBay::CalibReadoutPmtCrate::CalibReadoutPmtCrate | ( | const DayaBay::Detector & | detector, | |
unsigned int | triggerNumber, | |||
const TimeStamp & | triggerTime, | |||
const DayaBay::Trigger::TriggerType_t & | triggerType | |||
) | [inline] |
standard constructor
Definition at line 49 of file CalibReadoutPmtCrate.h.
00052 : CalibReadout(detector, 00053 triggerNumber, 00054 triggerTime, 00055 triggerType) {}
DayaBay::CalibReadoutPmtCrate::CalibReadoutPmtCrate | ( | const DayaBay::CalibReadoutPmtCrate & | rhs | ) |
copy constructor
Definition at line 18 of file CalibReadoutPmtCrate.cc.
00020 : CalibReadout(rh) 00021 { 00022 DayaBay::CalibReadoutPmtCrate::PmtChannelReadouts sensors = rh.channelReadout(); 00023 DayaBay::CalibReadoutPmtCrate::PmtChannelReadouts::iterator it, done = sensors.end(); 00024 for (it = sensors.begin(); it != done; ++it) { 00025 it->setCalibReadout(this); 00026 } 00027 this->setChannelReadout(sensors); 00028 }
DayaBay::CalibReadoutPmtCrate::CalibReadoutPmtCrate | ( | ) | [inline] |
Default Constructor.
Definition at line 61 of file CalibReadoutPmtCrate.h.
00061 : m_channelReadout() {}
virtual DayaBay::CalibReadoutPmtCrate::~CalibReadoutPmtCrate | ( | ) | [inline, virtual] |
DayaBay::CalibReadoutPmtCrate & DayaBay::CalibReadoutPmtCrate::operator= | ( | const DayaBay::CalibReadoutPmtCrate & | rhs | ) |
assignment operator
Definition at line 30 of file CalibReadoutPmtCrate.cc.
00031 { 00032 if (this == &rh) return *this; 00033 00034 (CalibReadout&)(*this) = (CalibReadout&)(rh); 00035 00036 DayaBay::CalibReadoutPmtCrate::PmtChannelReadouts sensors = rh.channelReadout(); 00037 DayaBay::CalibReadoutPmtCrate::PmtChannelReadouts::iterator it, done = sensors.end(); 00038 for (it = sensors.begin(); it != done; ++it) { 00039 it->setCalibReadout(this); 00040 } 00041 this->setChannelReadout(sensors); 00042 00043 return *this; 00044 }
void DayaBay::CalibReadoutPmtCrate::addSensor | ( | const DayaBay::DetectorSensor & | sensorId | ) | [inline] |
Adds a sensor to this readout.
Definition at line 153 of file CalibReadoutPmtCrate.h.
00154 { 00155 00156 if(! this->sensor(sensorId) ){ 00157 m_channelReadout.push_back( 00158 DayaBay::CalibReadoutPmtChannel(sensorId, this) 00159 ); 00160 } 00161 00162 }
DayaBay::CalibReadoutPmtChannel * DayaBay::CalibReadoutPmtCrate::sensor | ( | const DayaBay::DetectorSensor & | sensorId | ) | [inline] |
Returns the specified sensor from this readout.
Definition at line 164 of file CalibReadoutPmtCrate.h.
00165 { 00166 00167 DayaBay::CalibReadoutPmtCrate::PmtChannelReadouts::iterator crIter, 00168 crEnd = m_channelReadout.end(); 00169 for(crIter=m_channelReadout.begin(); crIter!=crEnd; crIter++){ 00170 if( crIter->pmtSensorId() == sensorId ) return &(*crIter); 00171 } 00172 return 0; 00173 00174 }
std::vector< DayaBay::DetectorSensor > DayaBay::CalibReadoutPmtCrate::sensors | ( | ) | [inline] |
Returns a list of sensors included in the readout.
Definition at line 176 of file CalibReadoutPmtCrate.h.
00177 { 00178 00179 DayaBay::CalibReadoutPmtCrate::PmtChannelReadouts::iterator crIter = m_channelReadout.begin(); 00180 std::vector<DayaBay::DetectorSensor> sensors; 00181 for(;crIter != m_channelReadout.end(); crIter++) 00182 sensors.push_back(crIter->pmtSensorId()); 00183 return sensors; 00184 00185 }
std::ostream & DayaBay::CalibReadoutPmtCrate::fillStream | ( | std::ostream & | s | ) | const [virtual] |
Print the crate data.
Reimplemented from DayaBay::CalibReadout.
Definition at line 3 of file CalibReadoutPmtCrate.cc.
00004 { 00005 size_t siz = m_channelReadout.size(); 00006 00007 s << "{ " 00008 << siz << " readouts : " << std::endl; 00009 00010 PmtChannelReadouts::const_iterator it, done = m_channelReadout.end(); 00011 for (it=m_channelReadout.begin(); it != done; ++it) { 00012 s << *it << std::endl; 00013 } 00014 s << "}"; 00015 return s; 00016 }
const DayaBay::CalibReadoutPmtCrate::PmtChannelReadouts & DayaBay::CalibReadoutPmtCrate::channelReadout | ( | ) | const [inline] |
Retrieve const The set of sensors in this readout.
Definition at line 143 of file CalibReadoutPmtCrate.h.
00144 { 00145 return m_channelReadout; 00146 }
void DayaBay::CalibReadoutPmtCrate::setChannelReadout | ( | const PmtChannelReadouts & | value | ) | [inline] |
Update The set of sensors in this readout.
Definition at line 148 of file CalibReadoutPmtCrate.h.
00149 { 00150 m_channelReadout = value; 00151 }
static void* DayaBay::CalibReadoutPmtCrate::operator new | ( | size_t | size | ) | [inline, static] |
operator new
Reimplemented from DayaBay::CalibReadout.
Definition at line 92 of file CalibReadoutPmtCrate.h.
00093 { 00094 return ( sizeof(CalibReadoutPmtCrate) == size ? 00095 boost::singleton_pool<CalibReadoutPmtCrate, sizeof(CalibReadoutPmtCrate)>::malloc() : 00096 ::operator new(size) ); 00097 }
static void* DayaBay::CalibReadoutPmtCrate::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
Reimplemented from DayaBay::CalibReadout.
Definition at line 102 of file CalibReadoutPmtCrate.h.
static void DayaBay::CalibReadoutPmtCrate::operator delete | ( | void * | p | ) | [inline, static] |
operator delete
Reimplemented from DayaBay::CalibReadout.
Definition at line 108 of file CalibReadoutPmtCrate.h.
00109 { 00110 boost::singleton_pool<CalibReadoutPmtCrate, sizeof(CalibReadoutPmtCrate)>::is_from(p) ? 00111 boost::singleton_pool<CalibReadoutPmtCrate, sizeof(CalibReadoutPmtCrate)>::free(p) : 00112 ::operator delete(p); 00113 }
static void DayaBay::CalibReadoutPmtCrate::operator delete | ( | void * | p, | |
void * | pObj | |||
) | [inline, static] |
placement operator delete not sure if really needed, but it does not harm
Reimplemented from DayaBay::CalibReadout.
Definition at line 117 of file CalibReadoutPmtCrate.h.
00118 { 00119 ::operator delete (p, pObj); 00120 }
const DayaBay::Detector & DayaBay::CalibReadout::detector | ( | ) | const [inline, inherited] |
Retrieve const The detector associated with this readout.
Definition at line 205 of file CalibReadout.h.
00206 { 00207 return m_detector; 00208 }
void DayaBay::CalibReadout::setDetector | ( | const DayaBay::Detector & | value | ) | [inline, inherited] |
Update The detector associated with this readout.
Definition at line 210 of file CalibReadout.h.
00211 { 00212 m_detector = value; 00213 }
unsigned int DayaBay::CalibReadout::triggerNumber | ( | ) | const [inline, inherited] |
Retrieve const The count of the trigger command from this detector.
Definition at line 215 of file CalibReadout.h.
00216 { 00217 return m_triggerNumber; 00218 }
void DayaBay::CalibReadout::setTriggerNumber | ( | unsigned int | value | ) | [inline, inherited] |
Update The count of the trigger command from this detector.
Definition at line 220 of file CalibReadout.h.
00221 { 00222 m_triggerNumber = value; 00223 }
const TimeStamp & DayaBay::CalibReadout::triggerTime | ( | ) | const [inline, inherited] |
Retrieve const The absolute time of the trigger command.
Definition at line 225 of file CalibReadout.h.
00226 { 00227 return m_triggerTime; 00228 }
void DayaBay::CalibReadout::setTriggerTime | ( | const TimeStamp & | value | ) | [inline, inherited] |
Update The absolute time of the trigger command.
Definition at line 230 of file CalibReadout.h.
00231 { 00232 m_triggerTime = value; 00233 }
const DayaBay::Trigger::TriggerType_t & DayaBay::CalibReadout::triggerType | ( | ) | const [inline, inherited] |
Retrieve const The type of trigger conditions which produced this readout.
Definition at line 235 of file CalibReadout.h.
00236 { 00237 return m_triggerType; 00238 }
void DayaBay::CalibReadout::setTriggerType | ( | const DayaBay::Trigger::TriggerType_t & | value | ) | [inline, inherited] |
Update The type of trigger conditions which produced this readout.
Definition at line 240 of file CalibReadout.h.
00241 { 00242 m_triggerType = value; 00243 }
const DayaBay::CalibReadoutHeader * DayaBay::CalibReadout::header | ( | ) | const [inline, inherited] |
Retrieve const The calib readout header associated with this readout.
Definition at line 245 of file CalibReadout.h.
00246 { 00247 return m_header; 00248 }
void DayaBay::CalibReadout::setHeader | ( | DayaBay::CalibReadoutHeader * | value | ) | [inline, inherited] |
Update The calib readout header associated with this readout.
Definition at line 250 of file CalibReadout.h.
00251 { 00252 m_header = value; 00253 }