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...
  | 
|   | 
| virtual int  | getSize () const | 
|   | Get size of object.  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 36 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 57 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 software/JDAQ/JDAQTimeslice.cc.
   35         buffer[hit->getModuleID()].push_back(*hit);
 
   41         buffer[hit->getModuleID()].push_back(*hit);
 
   48       sort(entry->second.begin(), entry->second.end());
 
   50       this->push_back(JDAQSuperFrame(JDAQSuperFrameHeader(
getDAQChronometer(), entry->first)));
 
   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 software/JDAQ/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()) {
 
  107       this->push_back(JDAQSuperFrame(JDAQSuperFrameHeader(
getDAQChronometer(), entry->first, status)));
 
  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 114 of file JDAQTimeslice.hh.
  120       for (const_iterator i = timeslice.begin(); i != timeslice.end(); ++i) {
 
 
 
 
◆ add()
Add another timeslice. 
- Parameters
 - 
  
  
 
- Returns
 - this timeslice 
 
Definition at line 134 of file JDAQTimeslice.hh.
  140       for (const_iterator i = this->begin(); i != this->end(); ++i) {
 
  141         buffer[i->getModuleIdentifier()] = 
distance(static_cast<const JDAQTimeslice&>(*this).begin(),i);
 
  144       for (JDAQTimeslice::const_iterator i = timeslice.begin(); i != timeslice.end(); ++i) {
 
  148         if (p != buffer.end()) {
 
  150           JDAQSuperFrame& frame = this->at(p->second);
 
  154           sort(frame.begin(), frame.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 209 of file JDAQTimeslice.hh.
  213       out << this->ClassName() << endl;
 
  214       out << dynamic_cast<const JDAQPreamble&>   (*
this) << endl;
 
  215       out << dynamic_cast<const JDAQChronometer&>(*
this) << endl;
 
  217       for (JDAQTimeslice::const_iterator frame = this->begin(); frame != this->end(); ++frame) {
 
  219         out << 
' ' << setw(10) << frame->getModuleID();
 
  220         out << 
' ' << setw(6)  << frame->getLength();
 
  221         out << 
' ' << setw(6)  << frame->getDataType();
 
  222         out << 
' ' << setw(6)  << frame->getTimesliceStart();
 
  223         out << 
' ' << setw(8)  << setfill(
'0') << hex << frame->getStatus()     << dec << setfill(
' ');
 
  224         out << 
'|' << setw(8)  << setfill(
'0') << hex << frame->getFIFOStatus() << dec << setfill(
' ');
 
  225         out << 
' ' << setw(6)  << frame->size();
 
  229           if (!frame->empty()) {
 
  231             out << 
' ' << setw(10) << frame-> begin()->getT();
 
  233             out << 
' ' << setw(10) << frame->rbegin()->getT();
 
  245             out << setw(2) << (int) hit->getPMT() << 
' ' << setw(8) << hit->getT() << (
n%10 == 0 ? 
'\n' : 
' ');
 
 
 
 
◆ getSize()
  
  
      
        
          | virtual int KM3NETDAQ::JDAQTimeslice::getSize  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inlinevirtual   | 
  
 
Get size of object. 
- Returns
 - number of bytes 
 
Reimplemented from KM3NETDAQ::JDAQPreamble.
Definition at line 260 of file JDAQTimeslice.hh.
  269       for (const_iterator frame = begin(); frame != end(); ++frame) {
 
  270         len += frame->getSize();
 
 
 
 
◆ ClassDef() [1/5]
◆ sizeOf() [1/2]
  
  
      
        
          | static int KM3NETDAQ::JDAQPreamble::sizeOf  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
inlinestaticinherited   | 
  
 
Get size of object. 
- Returns
 - number of bytes 
 
Definition at line 110 of file JDAQPreamble.hh.
 
 
◆ ClassDef() [2/5]
◆ setLength()
  
  
      
        
          | void KM3NETDAQ::JDAQPreamble::setLength  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
inlineprotectedinherited   | 
  
 
 
◆ 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 49 of file JDAQTimesliceHeader.hh.
   51       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 51 of file JDAQHeader.hh.
   53       return static_cast<const JDAQHeader&>(*
this); 
 
 
 
 
◆ setDAQHeader()
  
  
      
        
          | void KM3NETDAQ::JDAQHeader::setDAQHeader  | 
          ( | 
          const JDAQHeader &  | 
          header | ) | 
           | 
         
       
   | 
  
inlineinherited   | 
  
 
Set DAQ header. 
- Parameters
 - 
  
  
 
Definition at line 62 of file JDAQHeader.hh.
   64       static_cast<JDAQHeader&>(*
this) = header;
 
 
 
 
◆ sizeOf() [2/2]
  
  
      
        
          | static int KM3NETDAQ::JDAQHeader::sizeOf  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
inlinestaticinherited   | 
  
 
Get size of object. 
- Returns
 - number of bytes 
 
Definition at line 103 of file JDAQHeader.hh.
 
 
◆ 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.
 
 
◆ operator>>
Read DAQ timeslice from input. 
- Parameters
 - 
  
  
 
- Returns
 - JReader 
 
Definition at line 173 of file JDAQTimeslice.hh.
  177       in >> static_cast<JDAQPreamble&>               (timeslice);
 
  178       in >> static_cast<JDAQTimesliceHeader&>        (timeslice);
 
 
 
 
◆ operator<<
Write DAQ timeslice to output. 
- Parameters
 - 
  
  
 
- Returns
 - JWriter 
 
Definition at line 192 of file JDAQTimeslice.hh.
  194       out << static_cast<const JDAQPreamble&>               (timeslice);
 
  195       out << static_cast<const JDAQTimesliceHeader&>        (timeslice);
 
  196       out << static_cast<const std::vector<JDAQSuperFrame>&>(timeslice);
 
 
 
 
◆ 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.