Data time slice.
More...
#include <JDAQTimeslice.hh>
|
| JDAQTimeslice () |
| Default constructor. More...
|
|
| JDAQTimeslice (const JDAQChronometer &chronometer) |
| Constructor. More...
|
|
| JDAQTimeslice (const JDAQEvent &event, const bool snapshot=true) |
| Constructor. More...
|
|
| JDAQTimeslice (const JDAQEvent &event, const JDAQSummaryslice &summary, const bool snapshot=true) |
| Constructor. More...
|
|
virtual | ~JDAQTimeslice () |
| Virtual destructor. More...
|
|
void | clear () |
| Clear data. More...
|
|
JDAQTimeslice & | operator= (const JDAQTimeslice ×lice) |
| Assignment operator. More...
|
|
JDAQTimeslice & | add (const JDAQTimeslice ×lice) |
| Add another timeslice. More...
|
|
std::ostream & | print (std::ostream &out, const bool lpr=false) const |
| Print DAQ Timeslice. More...
|
|
| ClassDef (JDAQTimeslice, 4) |
|
| ClassDef (JDAQPreamble, 1) |
|
int | getLength () const |
| Get length. More...
|
|
int | getDataType () const |
| Get data type. More...
|
|
| ClassDefNV (JDAQAbstractPreamble, 1) |
|
const JDAQTimesliceHeader & | getDAQTimesliceHeader () const |
| Get DAQ time slice header. More...
|
|
| ClassDef (JDAQTimesliceHeader, 2) |
|
| ClassDef (JDAQHeader, 2) |
|
| ClassDef (JDAQChronometer, 3) |
|
const JDAQHeader & | getDAQHeader () const |
| Get DAQ header. More...
|
|
void | setDAQHeader (const JDAQHeader &header) |
| Set DAQ header. More...
|
|
const JDAQChronometer & | getDAQChronometer () const |
| Get DAQ chronometer. More...
|
|
void | setDAQChronometer (const JDAQChronometer &chronometer) |
| Set DAQ chronometer. More...
|
|
int | getDetectorID () const |
| Get detector identifier. More...
|
|
int | getRunNumber () const |
| Get run number. More...
|
|
int | getFrameIndex () const |
| Get frame index. More...
|
|
JDAQUTCExtended | getTimesliceStart () const |
| Get start of timeslice. More...
|
|
void | setRunNumber (const int run) |
| Set run number. More...
|
|
void | setFrameIndex (const int frame_index) |
| Set frame index. More...
|
|
void | setTimesliceStart (const JDAQUTCExtended ×lice_start) |
| Set timeslice start time. More...
|
|
Data time slice.
Definition at line 30 of file JDAQTimeslice.hh.
◆ JDAQTimeslice() [1/4]
KM3NETDAQ::JDAQTimeslice::JDAQTimeslice |
( |
| ) |
|
|
inline |
◆ JDAQTimeslice() [2/4]
KM3NETDAQ::JDAQTimeslice::JDAQTimeslice |
( |
const JDAQChronometer & |
chronometer | ) |
|
|
inline |
Constructor.
- Parameters
-
chronometer | DAQ chronometer |
Definition at line 56 of file JDAQTimeslice.hh.
◆ JDAQTimeslice() [3/4]
KM3NETDAQ::JDAQTimeslice::JDAQTimeslice |
( |
const JDAQEvent & |
event, |
|
|
const bool |
snapshot = true |
|
) |
| |
Constructor.
- Parameters
-
event | DAQ event |
snapshot | use shapshot hits (else use triggered hits) |
Definition at line 22 of file externals/km3net-dataformat/src/JDAQTimeslice.cc.
35 buffer[hit->getModuleID()].push_back(*hit);
41 buffer[hit->getModuleID()].push_back(*hit);
48 sort(entry->second.begin(), entry->second.end());
52 this->rbegin()->add(entry->second.size(), entry->second.data());
◆ JDAQTimeslice() [4/4]
KM3NETDAQ::JDAQTimeslice::JDAQTimeslice |
( |
const JDAQEvent & |
event, |
|
|
const JDAQSummaryslice & |
summary, |
|
|
const bool |
snapshot = true |
|
) |
| |
Constructor.
- Parameters
-
event | DAQ event |
summary | summary |
snapshot | use shapshot hits (else use triggered hits) |
Definition at line 64 of file externals/km3net-dataformat/src/JDAQTimeslice.cc.
79 buffer[hit->getModuleID()].push_back(*hit);
85 buffer[hit->getModuleID()].push_back(*hit);
91 for (JDAQSummaryslice::const_iterator i = summary.begin(); i != summary.end(); ++i) {
92 sumo[i->getModuleID()] = i->getDAQFrameStatus();
97 sort(entry->second.begin(), entry->second.end());
103 if (ps != sumo.end()) {
109 this->rbegin()->add(entry->second.size(), entry->second.data());
◆ ~JDAQTimeslice()
virtual KM3NETDAQ::JDAQTimeslice::~JDAQTimeslice |
( |
| ) |
|
|
inlinevirtual |
◆ clear()
void KM3NETDAQ::JDAQTimeslice::clear |
( |
| ) |
|
|
inline |
◆ operator=()
Assignment operator.
- Parameters
-
- Returns
- this timeslice
Definition at line 113 of file JDAQTimeslice.hh.
119 for (const_iterator i = timeslice.begin(); i != timeslice.end(); ++i) {
◆ add()
Add another timeslice.
- Parameters
-
- Returns
- this timeslice
Definition at line 133 of file JDAQTimeslice.hh.
139 for (const_iterator i = this->begin(); i != this->end(); ++i) {
140 buffer[i->getModuleIdentifier()] =
distance(static_cast<const JDAQTimeslice&>(*this).begin(),i);
143 for (JDAQTimeslice::const_iterator i = timeslice.begin(); i != timeslice.end(); ++i) {
147 if (p != buffer.end()) {
◆ print()
std::ostream& KM3NETDAQ::JDAQTimeslice::print |
( |
std::ostream & |
out, |
|
|
const bool |
lpr = false |
|
) |
| const |
|
inline |
Print DAQ Timeslice.
- Parameters
-
out | output stream |
lpr | long print |
- Returns
- output stream
Definition at line 172 of file JDAQTimeslice.hh.
176 out << this->ClassName() << endl;
177 out << dynamic_cast<const JDAQPreamble&> (*
this) << endl;
178 out << dynamic_cast<const JDAQChronometer&>(*
this) << endl;
180 for (JDAQTimeslice::const_iterator frame = this->begin(); frame != this->end(); ++frame) {
182 out <<
' ' << setw(10) << frame->getModuleID();
183 out <<
' ' << setw(6) << frame->getLength();
184 out <<
' ' << setw(6) << frame->getDataType();
185 out <<
' ' << setw(6) << frame->getTimesliceStart();
186 out <<
' ' << setw(8) << setfill(
'0') << hex << frame->getStatus() << dec << setfill(
' ');
187 out <<
'|' << setw(8) << setfill(
'0') << hex << frame->getFIFOStatus() << dec << setfill(
' ');
188 out <<
' ' << setw(6) << frame->size();
192 if (!frame->empty()) {
194 out <<
' ' << setw(10) << frame-> begin()->getT();
196 out <<
' ' << setw(10) << frame->rbegin()->getT();
208 out << setw(2) << (int) hit->getPMT() <<
' ' << setw(8) << hit->getT() << (
n%10 == 0 ?
'\n' :
' ');
◆ ClassDef() [1/5]
◆ getDAQPreamble()
template<class T >
static JDAQPreamble KM3NETDAQ::JDAQPreamble::getDAQPreamble |
( |
const T & |
object | ) |
|
|
inlinestaticinherited |
Get DAQ preamble.
This method should be used for binary I/O to get the actual data for the given object.
To this end, the following method should be overloaded for the corresponding data type.
size_t getSizeof(const T&);
- Parameters
-
- Returns
- preamble
Definition at line 76 of file JDAQPreamble.hh.
81 preamble.
type = KM3NETDAQ::getDataType<T>();
◆ ClassDef() [2/5]
◆ getLength()
int KM3NETDAQ::JDAQAbstractPreamble::getLength |
( |
| ) |
const |
|
inlineinherited |
◆ getDataType()
int KM3NETDAQ::JDAQAbstractPreamble::getDataType |
( |
| ) |
const |
|
inlineinherited |
◆ ClassDefNV()
◆ getDAQTimesliceHeader()
Get DAQ time slice header.
- Returns
- DAQ time slice header
Definition at line 43 of file JDAQTimesliceHeader.hh.
45 return static_cast<const JDAQTimesliceHeader&>(*
this);
◆ ClassDef() [3/5]
◆ ClassDef() [4/5]
KM3NETDAQ::JDAQHeader::ClassDef |
( |
JDAQHeader |
, |
|
|
2 |
|
|
) |
| |
|
inherited |
◆ ClassDef() [5/5]
◆ getDAQHeader()
const JDAQHeader& KM3NETDAQ::JDAQHeader::getDAQHeader |
( |
| ) |
const |
|
inlineinherited |
Get DAQ header.
- Returns
- DAQ header
Definition at line 49 of file JDAQHeader.hh.
51 return static_cast<const JDAQHeader&>(*
this);
◆ setDAQHeader()
void KM3NETDAQ::JDAQHeader::setDAQHeader |
( |
const JDAQHeader & |
header | ) |
|
|
inlineinherited |
Set DAQ header.
- Parameters
-
Definition at line 60 of file JDAQHeader.hh.
62 static_cast<JDAQHeader&>(*
this) = header;
◆ getDAQChronometer()
const JDAQChronometer& KM3NETDAQ::JDAQChronometer::getDAQChronometer |
( |
| ) |
const |
|
inlineinherited |
Get DAQ chronometer.
- Returns
- DAQ chronometer
Definition at line 88 of file JDAQChronometer.hh.
90 return static_cast<const JDAQChronometer&>(*
this);
◆ setDAQChronometer()
void KM3NETDAQ::JDAQChronometer::setDAQChronometer |
( |
const JDAQChronometer & |
chronometer | ) |
|
|
inlineinherited |
Set DAQ chronometer.
- Parameters
-
chronometer | DAQ chronometer |
Definition at line 99 of file JDAQChronometer.hh.
101 static_cast<JDAQChronometer&>(*
this) = chronometer;
◆ getDetectorID()
int KM3NETDAQ::JDAQChronometer::getDetectorID |
( |
| ) |
const |
|
inlineinherited |
◆ getRunNumber()
int KM3NETDAQ::JDAQChronometer::getRunNumber |
( |
| ) |
const |
|
inlineinherited |
◆ getFrameIndex()
int KM3NETDAQ::JDAQChronometer::getFrameIndex |
( |
| ) |
const |
|
inlineinherited |
◆ getTimesliceStart()
◆ setRunNumber()
void KM3NETDAQ::JDAQChronometer::setRunNumber |
( |
const int |
run | ) |
|
|
inlineinherited |
◆ setFrameIndex()
void KM3NETDAQ::JDAQChronometer::setFrameIndex |
( |
const int |
frame_index | ) |
|
|
inlineinherited |
◆ setTimesliceStart()
void KM3NETDAQ::JDAQChronometer::setTimesliceStart |
( |
const JDAQUTCExtended & |
timeslice_start | ) |
|
|
inlineinherited |
Set timeslice start time.
- Parameters
-
timeslice_start | timeslice start time |
Definition at line 177 of file JDAQChronometer.hh.
◆ getSizeof
Get size of object.
- Parameters
-
- Returns
- number of bytes
Definition at line 25 of file JDAQTimesliceIO.hh.
34 for (JDAQTimeslice::const_iterator frame =
object.begin(); frame !=
object.end(); ++frame) {
◆ operator>>
Read DAQ time slice from input.
- Parameters
-
in | reader |
object | DAQ time slice |
- Returns
- reader
Definition at line 49 of file JDAQTimesliceIO.hh.
53 in >> static_cast<JDAQPreamble&> (
object);
54 in >> static_cast<JDAQTimesliceHeader&> (
object);
◆ operator<<
Write DAQ time slice to output.
- Parameters
-
out | writer |
object | DAQ time slice |
- Returns
- writer
Definition at line 68 of file JDAQTimesliceIO.hh.
71 out << static_cast<const JDAQTimesliceHeader&> (
object);
72 out << static_cast<const std::vector<JDAQSuperFrame>&>(object);
◆ length
int KM3NETDAQ::JDAQAbstractPreamble::length |
|
protectedinherited |
◆ type
int KM3NETDAQ::JDAQAbstractPreamble::type |
|
protectedinherited |
◆ detector_id
int KM3NETDAQ::JDAQChronometer::detector_id |
|
protectedinherited |
◆ run
int KM3NETDAQ::JDAQChronometer::run |
|
protectedinherited |
◆ frame_index
int KM3NETDAQ::JDAQChronometer::frame_index |
|
protectedinherited |
◆ timeslice_start
The documentation for this class was generated from the following files:
std::vector< T >::difference_type distance(typename std::vector< T >::const_iterator first, typename PhysicsEvent::const_iterator< T > second)
Specialisation of STL distance.