#include "Evt.hh"
#include "Hit.hh"
#include "Trk.hh"
#include "Exception.hh"
#include "../online/JDAQEvent.hh"
#include "../online/JDAQKeyHit.hh"
#include "../online/JDAQTimeslice.hh"
#include "../online/JDAQSummaryslice.hh"
#include "TStreamerInfo.h"
#include "TFile.h"
#include "TTree.h"
#include <map>
#include <vector>
Go to the source code of this file.
◆ read() [1/4]
Read a hit from a DAQ hit.
- Parameters
-
Definition at line 30 of file io_online.hh.
34 hit.
t = daqhit.
getT();
◆ read() [2/4]
Read a hit from a DAQ key hit.
- Parameters
-
Definition at line 43 of file io_online.hh.
50 hit.
t = daqhit.
getT();
◆ read() [3/4]
Read an event from a DAQ event.
- Parameters
-
Definition at line 59 of file io_online.hh.
81 evt.
hits.reserve(snapshotHits.size());
83 for(
auto& daqhit : snapshotHits )
87 evt.
hits.push_back( h );
91 for(
auto& daqtrighit: triggeredHits)
93 Hit* g = M[daqtrighit.getModuleID()][daqtrighit.getPMT()][daqtrighit.getT()];
94 if (g) g->
trig = daqtrighit.getTriggerMask ();
97 THROW(
Exception,
"Failed to flag snaphot hit" << (
int) daqtrighit.getPMT() <<
" " << daqtrighit.getT());
◆ read() [4/4]
Read an event from a DAQ time slice.
- Parameters
-
Definition at line 108 of file io_online.hh.
124 for(
auto& daqhit: sf )
127 h.
dom_id = sf.getModuleID();
128 evt.
hits.push_back(h);
◆ get_summary_slice()
Get summary slice from given file with given frame index.
- Parameters
-
f | pointer to ROOT file |
frame_index | frame index |
- Returns
- pointer to summary slice
Definition at line 149 of file io_online.hh.
153 static TBranch* BS=0;
164 JDAQSummaryFrame::ROOT_IO_VERSION = ((TStreamerInfo*)_f -> GetStreamerInfoList()->FindObject(
"JDAQSummaryslice"))->GetClassVersion();
168 S = (TTree*) _f->Get(
"KM3NET_SUMMARYSLICE");
174 BS = S->GetBranch(
"KM3NET_SUMMARYSLICE");
180 std::cout <<
"building index to lookup timeslices..." << std::endl;
181 int n = S->BuildIndex(
"frame_index");
183 BS->SetAddress( &
r );
187 int nbytes = S->GetEntryWithIndex( frame_index );
190 THROW(
Exception,
"Failed to find entry with frame_index " << frame_index);