Converts an Offline event to ADST. More...
#include "RecDataWriterNG/Offline2ADST.h"
Public Member Functions | |
const otoa::Config & | Config () const |
Fetch the converter configuration. More... | |
otoa::Config & | Config () |
Fetch the converter configuration. More... | |
bool | Convert (const evt::Event &event, RecEvent &recEvent) |
void | FinishDetectorAndFileInfo () |
const DetectorGeometry & | GetDetectorGeometry () const |
DetectorGeometry & | GetDetectorGeometry () |
const FileInfo & | GetFileInfo () const |
FileInfo & | GetFileInfo () |
Offline2ADST ()=default | |
Offline2ADST (const otoa::Config &cfg) | |
const otoa::Status & | Status () const |
Fetch the current conversion status. More... | |
otoa::Status & | Status () |
Fetch the current conversion status. More... | |
int | Verbosity () |
Private Member Functions | |
void | ConvertGenParticle (GenParticle &adstGP, const evt::GenParticle &evtGP) |
void | FillDetectorGeometryIncremental () |
void | FillGlobalInfo (const evt::Event &event, RecEvent &recEvent) |
void | FillRadio (const evt::Event &event, RecEvent &recEvent) |
Fills the per-event radio part of the event, EventInfo, and DetectorGeometry. More... | |
void | FillSim (const evt::Event &event, GenShower &gen, bool saveProfiles) |
Private Attributes | |
otoa::Config | fConfig |
DetectorGeometry | fDetectorGeometry |
FileInfo | fFileInfo |
otoa::Status | fStatus |
Converts an Offline event to ADST.
Definition at line 27 of file Offline2ADST.h.
|
default |
Offline2ADST::Offline2ADST | ( | const otoa::Config & | cfg | ) |
Definition at line 84 of file Offline2ADST.cc.
|
inline |
Fetch the converter configuration.
Definition at line 52 of file Offline2ADST.h.
References fConfig.
Referenced by otoa::FD2ADST::Config(), Convert(), RecDataWriterNG::RecDataWriter::Init(), and RecDataWriterNG::RecDataWriter::ReadConfig().
|
inline |
Fetch the converter configuration.
Definition at line 54 of file Offline2ADST.h.
References fConfig.
bool Offline2ADST::Convert | ( | const evt::Event & | event, |
RecEvent & | recEvent | ||
) |
Converts the given Offline event to the given RecEvent. Returns true if the RecEvent should be written to file according to the configuration and the event contents. The converter keeps its own DetectorGeometry and FileInfo instances and updates their incremental components as it goes along.
Definition at line 90 of file Offline2ADST.cc.
References Config(), otoa::SD2ADST::Convert(), otoa::Detector2ADST::Convert(), otoa::MD2ADST::Convert(), otoa::FD2ADST::Convert(), otoa::Config::DropUntriggeredDetector(), otoa::Config::DropUntriggeredMCProfiles(), fConfig, FillDetectorGeometryIncremental(), FillGlobalInfo(), FillRadio(), FillSim(), fStatus, evt::Event::HasMEvent(), evt::Event::HasSimShower(), INFO, otoa::Status::SetIsMCEvent(), otoa::Config::WriteFD(), and otoa::Config::WriteSD().
Referenced by RecDataWriterNG::RecDataWriter::Run().
|
private |
Definition at line 617 of file Offline2ADST.cc.
References evt::GenParticle::GetDaughterParticles(), evt::GenParticle::GetDepth(), evt::GenParticle::GetEnergyCM(), evt::GenParticle::GetHeight(), evt::GenParticle::GetKinel(), evt::GenParticle::GetMultiplicity(), evt::GenParticle::GetParentEnergy(), evt::GenParticle::GetParentId(), and evt::GenParticle::GetTargetMass().
Referenced by FillSim().
|
private |
Definition at line 295 of file Offline2ADST.cc.
References utl::degree, fdet::FDetComponentSelector::eAll, sdet::SDetectorConstants::eInfill750, fDetectorGeometry, utl::AugerException::GetMessage(), utl::BasicVector< HepVector >::GetX(), utl::BasicVector< HepVector >::GetY(), INFO, utl::kPi, utl::kTwoPi, utl::m, galactic::meter, otoa::ToTVector3(), Verbosity(), and WARNING.
Referenced by Convert().
|
private |
Definition at line 282 of file Offline2ADST.cc.
References evt::Event::GetHeader(), evt::Header::GetId(), utl::ModifiedJulianDate(), otoa::TimeStamp2HHMMSS(), and otoa::TimeStamp2YYMMDD().
Referenced by Convert().
|
private |
Fills the per-event radio part of the event, EventInfo, and DetectorGeometry.
Definition at line 139 of file Offline2ADST.cc.
References otoa::RdFiller::AddRadioDetector(), fConfig, otoa::RdFiller::FillRadioChannels(), otoa::RdFiller::FillRadioEventInfo(), otoa::RdFiller::FillRadioShower(), otoa::RdFiller::FillRadioStations(), otoa::RdFiller::FillSimRadioStations(), otoa::RdFiller::GetRdEvent(), evt::Event::HasRecShower(), evt::Event::HasREvent(), INFO, otoa::Config::StoreExcludedRdStations(), and otoa::Config::StoreRadioLevel().
Referenced by Convert().
|
private |
Definition at line 457 of file Offline2ADST.cc.
References utl::cm, utl::cm2, ConvertGenParticle(), electrons, ERROR, galactic::eV, utl::g, utl::UTMPoint::GetEasting(), utl::UTMPoint::GetHeight(), utl::UTMPoint::GetNorthing(), utl::TabulatedFunction::GetNPoints(), evt::Event::HasSimShower(), galactic::meter, utl::ModifiedJulianDate(), PeV, utl::QuadraticMaximumInterpolation(), otoa::TimeStamp2GMST(), otoa::ToTVector3(), WARNING, atm::ProfileResult::Y(), and utl::TabulatedFunction::Y().
Referenced by Convert().
void Offline2ADST::FinishDetectorAndFileInfo | ( | ) |
Needs to be called before fetching the final DetectorGeometry and FileInfo for writing to a RecEventFile.
Definition at line 170 of file Offline2ADST.cc.
References otoa::RdFiller::AddRadioDetectorGeometry(), otoa::RdFiller::AddRadioInfo(), sdet::SDetectorConstants::eInfill750, fConfig, fDetectorGeometry, fFileInfo, fStatus, fwk::CentralConfig::GetConfig(), GetFileInfo(), fwk::CentralConfig::GetInstance(), otoa::Status::IsMCEvent(), utl::m, galactic::meter, otoa::Config::StoreFDTraces(), otoa::Config::StoreRadioLevel(), otoa::Config::StoreSDTraces(), otoa::ToTVector3(), and WARNING.
Referenced by RecDataWriterNG::RecDataWriter::Finish().
|
inline |
Definition at line 43 of file Offline2ADST.h.
References fDetectorGeometry.
Referenced by RecDataWriterNG::RecDataWriter::Finish().
|
inline |
Definition at line 45 of file Offline2ADST.h.
References fDetectorGeometry.
|
inline |
Definition at line 47 of file Offline2ADST.h.
References fFileInfo.
Referenced by RecDataWriterNG::RecDataWriter::Finish(), and FinishDetectorAndFileInfo().
|
inline |
Definition at line 49 of file Offline2ADST.h.
References fFileInfo.
|
inline |
Fetch the current conversion status.
Definition at line 57 of file Offline2ADST.h.
References fStatus.
|
inline |
Fetch the current conversion status.
Definition at line 59 of file Offline2ADST.h.
References fStatus.
|
inline |
Definition at line 61 of file Offline2ADST.h.
References fConfig, and otoa::Config::Verbosity().
Referenced by FillDetectorGeometryIncremental().
|
private |
Definition at line 75 of file Offline2ADST.h.
Referenced by Config(), Convert(), FillRadio(), FinishDetectorAndFileInfo(), and Verbosity().
|
private |
Definition at line 79 of file Offline2ADST.h.
Referenced by FillDetectorGeometryIncremental(), FinishDetectorAndFileInfo(), and GetDetectorGeometry().
|
private |
Definition at line 78 of file Offline2ADST.h.
Referenced by FinishDetectorAndFileInfo(), and GetFileInfo().
|
private |
Definition at line 76 of file Offline2ADST.h.
Referenced by Convert(), FinishDetectorAndFileInfo(), and Status().