revtStation_ROOT.cc
Go to the documentation of this file.
1 #include <io/revtStation_ROOT.h>
2 #include <io/revtStationSimData_ROOT.h>
3 #include <io/revtStationRecData_ROOT.h>
4 #include <io/revtStationTriggerData_ROOT.h>
5 #include <io/revtStationGPSData_ROOT.h>
6 #include <io/revtStationHeader_ROOT.h>
7 #include <io/StreamerUtilities.h>
8 #include <rdet/RDetector.h>
9 #include <utl/AugerException.h>
10 
11 using namespace io;
12 
13 
14 ClassImp(revtStation_ROOT)
15 
16 
18 {
19  delete fSimData;
20  delete fRecData;
21  delete fTriggerData;
22  delete fGPSData;
23  delete fStationHeader;
24 }
25 
26 
29 {
30  if (this != &s) {
31  fId = s.fId;
32  fChannels = s.fChannels;
48  }
49  return *this;
50 }
51 
52 
54  fId(s.GetId()),
55  fChannels(s.ChannelsBegin(), s.ChannelsEnd()),
56  fSimData(s.HasSimData() ? new revtStationSimData_ROOT(s.GetSimData()) : nullptr),
57  fRecData(s.HasRecData() ? new revtStationRecData_ROOT(s.GetRecData()) : nullptr),
58  fTriggerData(s.HasTriggerData() ? new revtStationTriggerData_ROOT(s.GetTriggerData()) : nullptr),
59  fGPSData(s.HasGPSData() ? new revtStationGPSData_ROOT(s.GetGPSData()) : nullptr),
60  fStationHeader(s.HasStationHeader() ? new revtStationHeader_ROOT(s.GetStationHeader()) : nullptr),
61  fRawTraceStartTime(s.GetRawTraceStartTime()),
62  fRawTraceStartTimeLocked(s.GetRawTraceStartTimeLocked()),
63  fFFTDataContainer(s.GetFFTDataContainer()),
64  fReconstructionStatus(s.GetReconstructionStatus()),
65  fExcludedReason(s.GetExcludedReason()),
66  fIsSaturated(s.IsSaturated()),
67  fRejectedReason(s.GetRejectedReason()),
68  fHWTemperature(s.GetHWTemperature()),
69  fHWTemperatureInt(s.GetHWTemperatureInt()),
70  fHWTemperatureExt(s.GetHWTemperatureExt())
71 { }
72 
73 
74 void
76  const
77 {
78  const unsigned int id = s.GetId();
79  const rdet::Station& dStation = det::Detector::GetInstance().GetRDetector().GetStation(id);
80  if (int(fChannels.size()) != dStation.GetNChannels())
81  throw utl::IOFailureException("Invalid number of Channels specified in ROOT file");
82 
83  const auto& chid = dStation.GetListOfChannelIds();
84  for (unsigned int i = 0, n = chid.size(); i < n; ++i)
85  fChannels[i] >> s.GetChannel(chid[i]);
86 
87  if (fSimData) {
88  s.MakeSimData();
89  *fSimData >> s.GetSimData();
90  }
91 
92  if (fRecData) {
93  s.MakeRecData();
94  *fRecData >> s.GetRecData();
95  }
96 
97  if (fTriggerData) {
98  s.MakeTriggerData();
100  }
101 
102  if (fGPSData) {
103  s.MakeGPSData();
104  *fGPSData >> s.GetGPSData();
105  }
106 
107  if (fStationHeader) {
108  s.MakeStationHeader();
110  }
111 
113 
115 
117 
118  s.SetReconstructionStatus(static_cast<revt::ReconstructionStatus>(fReconstructionStatus));
119 
121  s.SetExcludedReason(static_cast<revt::ExcludedReason>(fExcludedReason));
122 
123  if (fIsSaturated)
124  s.SetSaturated();
125  else
126  s.SetNotSaturated();
127 
130 
134 }
void SetNotSaturated()
StationSimData & GetSimData()
Get simulated data at station level.
StationTriggerData & GetTriggerData()
Get Trigger data for the station.
Detector description interface for Station-related data.
Persistent revtStationTriggerData using ROOT.
StationRecData & GetRecData()
Get station level reconstructed data.
revtStationGPSData_ROOT * fGPSData
void MakeSimData()
Make station simulated data object.
void SetSaturated()
Saturation status.
std::vector< revtChannel_ROOT > fChannels
void SetHWTemperatureExt(const double temp)
void MakeGPSData()
Make GPS data object.
Base class to report exceptions in IO.
utl::TimeStamp Convert() const
void MakeTriggerData()
Make trigger data object.
class to hold data at the radio Station level.
constexpr double s
Definition: AugerUnits.h:163
void SetRawTraceStartTime(const utl::TimeStamp &time)
Set absolute start time of the station-level trace as originally provided in raw data, for reconstructions use eTraceStartTime in StationRecData!
void DeepCopy(T *&destination, U *const source)
unsigned long long int fRejectedReason
void MakeStationHeader()
Make Station Header object.
int GetNChannels() const
Number of channels in station.
TimeStamp_ROOT fRawTraceStartTime
revtStationTriggerData_ROOT * fTriggerData
void SetRawTraceStartTimeLocked(const bool lock=true)
StationGPSData & GetGPSData()
Get GPS data for the station.
StationFFTDataContainer_ROOT fFFTDataContainer
void SetRejectedReason(const unsigned long long int reason)
int GetId() const
Get the station Id.
Persistent revt::StationRecData using ROOT.
std::vector< int > GetListOfChannelIds() const
returns a list with the commissioned channels ids of the station
Persistent revt::Station using ROOT.
Channel & GetChannel(const int pmtId)
Retrieve a Channel by Id.
void operator>>(revt::Station &s) const
void MakeRecData()
Make station reconstructed data object.
const StationFFTDataContainer & GetFFTDataContainer() const
retrieve Station FFTDataContainer (read access)
void SetExcludedReason(const ExcludedReason reason)
revtStation_ROOT & operator=(const revtStation_ROOT &s)
Persistent revt::StationSimData using ROOT.
StationHeader & GetStationHeader()
Get the Station Header.
void SetReconstructionStatus(const ReconstructionStatus s)
revtStationHeader_ROOT * fStationHeader
revtStationSimData_ROOT * fSimData
void SetHWTemperatureInt(const double temp)
void SetHWTemperature(const double temp)
revtStationRecData_ROOT * fRecData

, generated on Tue Sep 26 2023.