ReadAerosolLL.cc
Go to the documentation of this file.
1 #include <sstream>
2 
3 #include "ReadAerosolLL.h"
4 #include <utl/ErrorLogger.h>
5 
6 #include <evt/Event.h>
7 #include <det/Detector.h>
8 #include <utl/TimeStamp.h>
9 #include <utl/UTCDateTime.h>
10 
11 #include <atm/AerosolDB.h>
12 #include <atm/AerosolZone.h>
13 
14 using namespace std;
15 using namespace utl;
16 using namespace fwk;
17 using namespace det;
18 using namespace atm;
19 
20 using namespace ReadAerosolLLNS;
21 
22 ReadAerosolLL::ReadAerosolLL(){}
23 
24 ReadAerosolLL::~ReadAerosolLL(){}
25 
27  //
28  //
29  INFO("ReadAerosolLL::Init()");
30  return eSuccess;
31 }
32 
33 VModule::ResultFlag ReadAerosolLL::Run(evt::Event& event){
34  //
35  //
36  INFO("ReadAerosolLL::Run()");
37 
38  Detector& det = Detector::GetInstance();
39 
40  // Set detector time to something .
41  //
42  det.Update(UTCDateTime(2005, 5, 11, 9, 0).GetTimeStamp());
43 
44 
45  // Retrieve the low-level aerosol DB interface
46  //
47  const AerosolDB& aerosol1 = det.GetAtmosphere().GetAerosolDB();
48 
49  // Iterate over all the zones found in the db
50  //
51  for (AerosolDB::ZoneIterator zIt = aerosol1.ZonesBegin() ;
52  zIt != aerosol1.ZonesEnd() ; ++zIt){
53 
54  cout << "Got zone : " << zIt->GetName() << endl;
55  cout << " with coordinates : " << zIt->GetNorthing()/m << "N, " << zIt->GetEasting()/m << " E " << endl;
56 
57  // Iterate over slices in the zone
58  //
59  for (AerosolZone::AttSliceIterator attIt = zIt->AttSlicesBegin() ;
60  attIt != zIt->AttSlicesEnd() ; ++attIt) {
61 
62  cout << " att length slice " << endl;
63  cout << " min, max height "
64  << attIt->GetMinHeight()/m << " m, "
65  << attIt->GetMaxHeight()/m << "m " << endl;
66 
67  cout << " VAOD, max VAOD cor, min VAOD cor, max VAOD uncor, min VAOD uncor "
68  << attIt->GetVAOD() << " "
69  << attIt->GetMaxVAODCor() << " "
70  << attIt->GetMinVAODCor() << " "
71  << attIt->GetMaxVAODCor() << " "
72  << attIt->GetMaxVAODUncor() << endl;
73 
74  cout << " 1/(att length), min cor, max cor, min uncor, max uncor "
75  << attIt->GetAttAlpha() / (1./m) << " m^-1, "
76  << attIt->GetMinAttAlphaCor() / (1./m) << " m^-1, "
77  << attIt->GetMaxAttAlphaCor() / (1./m) << " m^-1 "
78  << attIt->GetMinAttAlphaUncor() / (1./m) << " m^-1, "
79  << attIt->GetMaxAttAlphaUncor() / (1./m) << " m^-1 " << endl;
80 
81 
82  // etc.
83 
84  }
85  }
86 
87  return eSuccess;
88 }
89 
90 VModule::ResultFlag ReadAerosolLL::Finish(){
91  //
92  //
93  INFO("ReadAerosolLL::Finish()");
94  return eSuccess;
95 }
ZoneIterator ZonesBegin() const
Beginning of the collection of valid Zones.
Definition: AerosolDB.h:36
void Update(const utl::TimeStamp &time, const bool invData=true, const bool invComp=true, const bool forceRadio=false)
Update detector: deletes currently constructed stations and sets new time.
Definition: Detector.cc:179
#define INFO(message)
Macro for logging informational messages.
Definition: ErrorLogger.h:161
void Init()
Initialise the registry.
const atm::Atmosphere & GetAtmosphere() const
Definition: Detector.h:113
boost::transform_iterator< InternalZoneFunctor, InternalZoneIterator, const AerosolZone & > ZoneIterator
ZoneIterator returns a pointer to an AerosolZone.
Definition: AerosolDB.h:33
Class for loading and storing a collection of aerosol data.
Definition: AerosolDB.h:14
Top of the hierarchy of the detector description interface.
Definition: Detector.h:81
boost::indirect_iterator< InternalAttSliceIterator, const AttSlice & > AttSliceIterator
AttSlice iterator returns a pointer to the attenuation data slice for this zone.
Definition: AerosolZone.h:43
ResultFlag
Flag returned by module methods to the RunController.
Definition: VModule.h:60
ZoneIterator ZonesEnd() const
End of the collection of valid Zones.
Definition: AerosolDB.h:40
const AerosolDB & GetAerosolDB() const
Low-level interface to portion of the database with aerosol information.
constexpr double m
Definition: AugerUnits.h:121

, generated on Tue Sep 26 2023.