9 #include <AugerEvent.h>
10 #include <EyeEvent.hh>
11 #include <EyeEventHeader.hh>
12 #include <FadcData.hh>
13 #include <FdNumbering.hh>
14 #include <FDEventLibVersion.hh>
16 #include <io/FDasToOfflineEventConverter.h>
18 #include <evt/Event.h>
19 #include <evt/Header.h>
21 #include <fevt/FEvent.h>
22 #include <fevt/Header.h>
24 #include <fevt/EyeHeader.h>
25 #include <fevt/Telescope.h>
26 #include <fevt/Channel.h>
27 #include <fevt/Pixel.h>
29 #include <utl/Trace.h>
30 #include <utl/TimeStamp.h>
31 #include <utl/TabulatedFunction.h>
32 #include <utl/AugerUnits.h>
34 #include <utl/ErrorLogger.h>
51 TEyeEventHeader*
const eyeheader =
52 const_cast<TEyeEvent&
>(theData).GetEventHeader();
54 const unsigned int sec = eyeheader->GetTimeStamp()->GetGPSSec();
55 const unsigned int nsec = eyeheader->GetTimeStamp()->GetNanoSec();
59 const int eyeid = eyeheader->GetEyeNo();
61 #if FDEVENTLIB_VERSION_CODE < ModuleVersionCode(4, 0, 0)
64 msg <<
"Trying to read data with eye ids > 4 (HEAT) using an "
65 <<
"FDEventLib older than v4r0. Old FDEventLibs do not support "
66 <<
"HEAT data. I will skip this eye (id=" << eyeid <<
").";
72 if (fevent.
HasEye(eyeid)) {
76 " *************************************************************\n"
77 " *************************************************************\n"
78 " * FDAS raw-eye with Id=" << eyeid <<
" added twice!"
79 " * Report corrupt data, or check your input files!\n"
80 " *************************************************************\n"
81 " *************************************************************"
97 const unsigned int runno = eyeheader->GetRunNo();
98 const unsigned int evno = eyeheader->GetEventNo();
99 const int eclass = eyeheader->GetEventClass();
100 const int etype = eyeheader->GetEventType();
105 const std::string& previous_str = evtHeader.
GetId();
108 previous_time > tstamp)
111 ostringstream id_str;
112 if (!previous_str.empty())
113 id_str << previous_str <<
"__";
114 id_str <<
"eye" << eyeid
120 headerFEvent.
SetId(eyeid);
127 headerEye.
SetEventType(static_cast<fevt::EyeHeader::EventType>(etype));
128 headerEye.
SetEventClass(static_cast<fevt::EyeHeader::EventClass>(eclass));
131 for (
unsigned int i = FdUtil::Fd::kEYE_FIRST_MIRROR;
132 i <= FdUtil::Fd::kEYE_LAST_MIRROR; ++i)
134 if (eyeheader->IsMirrorDataPresent(i)) {
142 ostringstream pointing;
143 pointing <<
"data: ";
144 #if FDEVENTLIB_VERSION_CODE >= ModuleVersionCode(4, 0, 4)
145 TEyeGeometryData *
const eyeGeometry =
146 const_cast<TEyeEvent&
>(theData).GetGeometryData();
148 pointing <<
"unknown";
151 float pointingElev, pointingPhi;
152 eyeGeometry->GetAxisDirection(i, pointingPhi, pointingElev);
153 pointing << pointingElev;
156 pointing <<
"unknown";
void operator>>(const Event &theEvent, IoSdEvent &rawSEvent)
Telescope & GetTelescope(const unsigned int telescopeId, const ComponentSelector::Status status=ComponentSelector::eHasData)
Retrieve Telescope by Id, throw exception if not existent.
fevt::EyeHeader & GetHeader()
Header for this Eye Event.
Fluorescence Detector Eye Event.
evt::Header & GetHeader()
void SetTimeOffset(const unsigned int toffset)
void MakeEye(const unsigned int eyeId, const ComponentSelector::Status status=ComponentSelector::eHasData)
ostream & operator<<(ostream &os, const StationTriggerInfo &info)
void MakeTelescope(const unsigned int telescopeId, const ComponentSelector::Status status=ComponentSelector::eHasData)
Make Telescope telescopeId.
A TimeStamp holds GPS second and nanosecond for some event.
void SetRawTelPointing(const std::string &pointing)
#define WARNING(message)
Macro for logging warning messages.
Top of Fluorescence Detector event hierarchy.
Eye & GetEye(const unsigned int eyeId, const ComponentSelector::Status status=ComponentSelector::eHasData)
return Eye by id
fevt::FEvent & GetFEvent()
bool HasEye(const unsigned int eyeId, const ComponentSelector::Status status=ComponentSelector::eHasData) const
unsigned long GetGPSSecond() const
GPS second.
bool HasTelescope(const unsigned int telescopeId, const ComponentSelector::Status status=ComponentSelector::eHasData) const
Check if the telescope is in the event.
Fluorescence Detector Telescope Event.
#define ERROR(message)
Macro for logging error messages.