Class to manage Fd UpTime ROOT files. More...
#include <FdUpTimeFileManager.h>
Classes | |
struct | ChannelInfo |
Public Types | |
typedef std::map< std::string, std::string > | IndexMap |
enum | Status { eFound, eNotFound } |
Specifies success or (eventually) various possible failure modes. More... | |
Public Member Functions | |
FdUpTimeFileManager ()=default | |
virtual Status | GetData (double &returnData, const std::string &componentProperty, const std::string &componentName, const IndexMap &componentIndex) const |
virtual Status | GetData (int &returnData, const std::string &componentProperty, const std::string &componentName, const IndexMap &componentIndex) const |
virtual Status | GetData (bool &, const std::string &componentProperty, const std::string &componentName, const VManager::IndexMap &) const |
virtual Status | GetData (std::string &returnData, const std::string &componentProperty, const std::string &componentName, const IndexMap &componentIndex) const =0 |
virtual Status | GetData (std::vector< double > &returnData, const std::string &componentProperty, const std::string &componentName, const IndexMap &componentIndex) const =0 |
virtual Status | GetData (std::vector< int > &returnData, const std::string &componentProperty, const std::string &componentName, const IndexMap &componentIndex) const =0 |
virtual Status | GetData (std::vector< std::string > &returnData, const std::string &componentProperty, const std::string &componentName, const IndexMap &componentIndex) const =0 |
virtual Status | GetData (std::vector< bool > &returnData, const std::string &componentProperty, const std::string &componentName, const IndexMap &componentIndex) const =0 |
virtual Status | GetData (std::list< double > &returnData, const std::string &componentProperty, const std::string &componentName, const IndexMap &componentIndex) const =0 |
virtual Status | GetData (std::list< int > &returnData, const std::string &componentProperty, const std::string &componentName, const IndexMap &componentIndex) const =0 |
virtual Status | GetData (std::list< std::string > &returnData, const std::string &componentProperty, const std::string &componentName, const IndexMap &componentIndex) const =0 |
virtual Status | GetData (std::list< std::pair< int, int >> &returnData, const std::string &componentProperty, const std::string &componentName, const IndexMap &componentIndex) const =0 |
virtual Status | GetData (utl::TabulatedFunction &returnData, const std::string &componentProperty, const std::string &componentName, const IndexMap &componentIndex) const =0 |
virtual Status | GetData (std::map< int, utl::TabulatedFunction > &returnData, const std::string &componentProperty, const std::string &componentName, const IndexMap &componentIndex) const =0 |
virtual Status | GetData (utl::TabulatedFunctionComplexLgAmpPhase &returnData, const std::string &componentProperty, const std::string &componentName, const IndexMap &componentIndex) const =0 |
virtual Status | GetData (std::map< std::string, double > &returnData, const std::string &componentProperty, const std::string &componentName, const IndexMap &componentIndex) const =0 |
virtual Status | GetData (std::vector< std::vector< int >> &, const std::string &componentProperty, const std::string &componentName, const VManager::IndexMap &) const |
virtual Status | GetData (std::map< unsigned int, int > &, const std::string &componentProperty, const std::string &componentName, const VManager::IndexMap &) const |
Status | GetData (Handle &returnData, const std::string &component, const std::string &property, const IndexMap &index=IndexMap()) const |
new data accessor More... | |
const std::string & | GetName () const |
void | Init (const std::string &configLink) |
Manager Initialization. configLink is the CentralConfig hook for the configuration file. More... | |
bool | IsInitialized () const |
void | SetName (const std::string &name) |
void | SetReportingErrors (const bool flag=true) |
Generic data accessors. More... | |
virtual | ~FdUpTimeFileManager ()=default |
Static Public Member Functions | |
template<typename T > | |
static T | FindComponent (const std::string &componentName, const IndexMap &componentIndex) |
template<typename T , typename U > | |
static T | FindComponent (const std::string &componentName, const U &defaultValue, const IndexMap &componentIndex) |
static std::string | QueryInfoMessage (const Handle &returnData, const std::string &component) |
static std::string | QueryInfoMessage (const Handle &returnData, const std::string &component, const std::string &property, const IndexMap &index) |
static std::string | QueryInfoMessage (const std::string &componentProperty, const std::string &componentName) |
static std::string | QueryInfoMessage (const std::string &componentProperty, const std::string &componentName, const IndexMap &componentIndex) |
Protected Member Functions | |
template<typename T > | |
void | AddAvailability (const std::string &component) |
void | FindConfig (const std::string &configLink) |
Locate the configuration file in CentralConfig and make a Reader for it. More... | |
bool | IsReportingErrors () const |
std::string | NotImplementedMessage (const std::string &type, const std::string &componentProperty, const std::string &componentName) const |
Protected Attributes | |
std::set< std::string > | fAvailableComponents |
utl::Branch | fBranch |
bool | fIsInitialized = false |
bool | fReportingErrors = false |
Private Types | |
typedef Index::const_iterator | ConstIndexIterator |
typedef std::map< unsigned int, IndexVector > | Index |
typedef std::pair< unsigned int, unsigned int > | IndexEntry |
typedef Index::iterator | IndexIterator |
typedef std::pair< IndexEntry, UpTimePeriod > | IndexRecord |
typedef std::vector< IndexRecord > | IndexVector |
typedef IndexVector::const_iterator | IndexVectorIterator |
Private Member Functions | |
Status | GetChannelData (double &returnData, const std::string &componentProperty, const std::string &componentName, const IndexMap &componentIndex) const |
int | GetChannelIndex (const IndexMap &componentIndex) const |
int | GetEyeIndex (const IndexMap &componentIndex) const |
Status | GetOkFlag (int &returnData, const std::string &componentProperty, const std::string &componentName, const IndexMap &componentIndex) const |
int | GetTelIndex (const IndexMap &componentIndex) const |
Status | GetUpTimeFraction (double &returnData, const std::string &componentProperty, const std::string &componentName, const IndexMap &componentIndex) const |
Status | GetVetoFraction (double &returnData, const std::string &componentProperty, const std::string &componentName, const IndexMap &componentIndex) const |
void | Initialize () |
bool | ReadData () const |
Private Attributes | |
int | fCDASStatus |
double | fCDASUpTimeFraction |
std::map< int, double > | fCDASVetoFraction |
std::map< int, std::vector < ChannelInfo > > | fChannelInfo |
det::ValidityStamp | fDataValidity |
std::map< int, int > | fEyeStatus |
std::map< int, double > | fEyeUpTimeFraction |
std::map< int, double > | fFDASVetoFraction |
std::vector< std::string > | fFileList |
Index | fIndexHeadered |
Index | fIndexUnheadered |
std::vector< std::string > ::const_iterator | fRootFileIterator |
std::map< int, int > | fTelescopeStatus |
std::map< int, double > | fTelescopeUpTimeFraction |
std::vector< UpTimePeriod > | fUpTimeVector |
std::vector< UpTimePeriod > ::const_iterator | fUpTimeVectorIterator |
VMANAGER_GETDATA_HANDLE_DENIED int | fVerbosity = 0 |
Static Private Attributes | |
static const double | fgSearchMapBinning = 10000 |
static const unsigned int | kNPixelPerTel = 440 |
Class to manage Fd UpTime ROOT files.
The Fd uptime data is needed for realistic Fd/Hybrid aperture simulations. You have to specify the location (FdUpTimeFileManagerConfig.xml) of a ROOT data file or a list of them, containing all the needed data in a TTree based format:
All variable names are self explanatory. The numbering of eyes is LosLeones 0, LosMorados 1, LomaAmarilla 2, Coihueco 3 and HEAT 4. Consequently the telescopes are numbered as (eyeNumber*6+telescopeNumberInEye).
Each "UpFraction" comes with an additional "status", that can have a selection of bit flags for personal use, BUT if "status==0" the specified component is flagged as NOT-IN-DAQ (upFraction=0).
The last three entries consume a lot of memory (ADCVariance, ADCThreshold, ADCBaseline), since they contain per pixel data for the full detector. They may be skipped if not needed.
Monthly ROOT data files can be obtained from
http://mon.auger.uni-wuppertal.de/UpTime/
The Values can be inspected in the monitoring Web-Interface: http://mon.auger.uni-wuppertal.de/pro/FD/Eye/DAQ-Trigger/uptime.php
The code for the production of the UpTime values can be found in the repo: https://at-web.physik.uni-wuppertal.de/svn/AugerUptime
In case of problems contact julia n.ra utenb erg@ uni-w uppe rtal. de
There are three modules in the F/HSimulation chain, where use of the FdUpTime-data can be turned on:
Set upTime to 1 and replacing FdAlwaysUpManager by FdUpTimeFileManager will set the detector status dynamically.
Set bgMode to bgLoop requires your FdUpTime ROOT file to contain valid ADCVariance ADCThreshold and ADCBaseline data. The pixel background variance will be taken directly from the FdUpTimeFileManager, and not from the calculated mean photon flux as provided by R. Caruso et al..
Set useMonitoringInfo to 1 requires your FdUpTime ROOT file to contain valid ADCVariance ADCThreshold and ADCBaseline data. The pixel FLT threshold as well as the FADC baseline are taken from the FdUpTimeFileManager. This makes sense only in combination with realistic ADCVariance (FdBackgroundSimulatorOG).
Definition at line 88 of file FdUpTimeFileManager.h.
|
private |
Definition at line 190 of file FdUpTimeFileManager.h.
|
private |
Definition at line 188 of file FdUpTimeFileManager.h.
|
private |
Definition at line 184 of file FdUpTimeFileManager.h.
|
private |
Definition at line 189 of file FdUpTimeFileManager.h.
|
inherited |
Definition at line 133 of file VManager.h.
|
private |
Definition at line 185 of file FdUpTimeFileManager.h.
|
private |
Definition at line 186 of file FdUpTimeFileManager.h.
|
private |
Definition at line 187 of file FdUpTimeFileManager.h.
|
inherited |
Specifies success or (eventually) various possible failure modes.
Various failure modes to be specified (for example, failure to connect to db, faiure to find db record, failure to find table name, etc
Enumerator | |
---|---|
eFound | |
eNotFound |
Definition at line 127 of file VManager.h.
|
default |
|
virtualdefault |
|
inlineprotectedinherited |
Definition at line 347 of file VManager.h.
|
inlinestaticinherited |
Definition at line 307 of file VManager.h.
References ERROR.
|
inlinestaticinherited |
Definition at line 322 of file VManager.h.
|
protectedinherited |
Locate the configuration file in CentralConfig and make a Reader for it.
Definition at line 25 of file VManager.cc.
|
private |
Definition at line 503 of file FdUpTimeFileManager.cc.
References INFO, and INFO_TERSE.
|
private |
Definition at line 489 of file FdUpTimeFileManager.cc.
References INFO_TERSE.
|
virtual |
|
inlinevirtual |
Implements det::VManager.
Definition at line 115 of file FdUpTimeFileManager.h.
References GetOkFlag().
|
inlinevirtualinherited |
Definition at line 241 of file VManager.h.
|
pure virtualinherited |
Implemented in det::ManagerRegister, and fwk::TestSQLManager.
|
pure virtualinherited |
Implemented in det::ManagerRegister, and fwk::TestSQLManager.
|
pure virtualinherited |
Implemented in det::ManagerRegister, and fwk::TestSQLManager.
|
pure virtualinherited |
Implemented in det::ManagerRegister, and fwk::TestSQLManager.
|
pure virtualinherited |
Implemented in det::ManagerRegister, and fwk::TestSQLManager.
|
pure virtualinherited |
Implemented in det::ManagerRegister, and fwk::TestSQLManager.
|
pure virtualinherited |
Implemented in det::ManagerRegister, and fwk::TestSQLManager.
|
pure virtualinherited |
Implemented in det::ManagerRegister, and fwk::TestSQLManager.
|
pure virtualinherited |
|
pure virtualinherited |
|
pure virtualinherited |
Implemented in det::ManagerRegister, and fwk::TestSQLManager.
|
pure virtualinherited |
Implemented in det::ManagerRegister, and fwk::TestSQLManager.
|
pure virtualinherited |
Implemented in det::ManagerRegister, and fwk::TestSQLManager.
|
inlinevirtualinherited |
Definition at line 255 of file VManager.h.
|
inlinevirtualinherited |
Definition at line 256 of file VManager.h.
|
inlineinherited |
new data accessor
Any property of the detector is supposed to be accessible through this interface. Interface specifies the name of the property and the component to which it belongs, together with a map of (index name, index value) identifying the specific instance of the component. For example, to request the quantum efficiency of PMT 3 in station 57, one would have
Definition at line 275 of file VManager.h.
References det::VManager::CheckedGetData().
|
private |
Definition at line 456 of file FdUpTimeFileManager.cc.
References INFO_TERSE.
|
inlineinherited |
Definition at line 330 of file VManager.h.
References det::VManager::fName.
Referenced by det::VManager::CheckedGetData(), det::ManagerRegister::GenericGetData(), det::ManagerRegister::GetManagerData(), and det::ManagerBuilderRegisterEntry::ManagerBuilderRegisterEntry().
|
private |
Definition at line 201 of file FdUpTimeFileManager.cc.
References INFO, and INFO_TERSE.
Referenced by GetData().
|
private |
Definition at line 471 of file FdUpTimeFileManager.cc.
References INFO_TERSE.
|
private |
Definition at line 335 of file FdUpTimeFileManager.cc.
References INFO, and INFO_TERSE.
|
private |
Definition at line 398 of file FdUpTimeFileManager.cc.
References INFO, and INFO_TERSE.
|
virtual |
Manager Initialization. configLink is the CentralConfig hook for the configuration file.
This method instructs the manager to initialize itself. In the case of a manager which fetches data from an XML file, configuration involves getting the link to the appropriate configuration file from the CentralConfig and parsing the file to create a DOM or some other representation of the data in memory. For a manager which uses a MySQL database, configuration involves getting the link to the appropriate configuration file from the CentralConfig, then using the instructions in that file to establish a connection to the relevant database.
Note that one might initially think it makes more sense to just initialize managers automatically in their constructors so that developers don't need to remember to explicitly invoke the Init() method. (In fact it worked like this in an earlier version.) The rationale for not having automatic configuration via the constructors is that the configuration can now be delayed until the time that the user specifically requests a particular manager, rather than doing it at the time that the Detector object constructs the Managers. For example, when the user declares his set of desired managers in the ManagerRegister configuration, only those particular Managers will get initialized (though all available Managers will be constructed!). Consider someone who wants to test only the Fluorescence portion of the detector. By requiring explicit invocation of Init() one avoids providing hooks to all the SD related configuration files and databases which aren't even going to be used. Though the SD Managers will be constructed, no attempt will be made to Initialize them until the user specifically requests them by, for example, specifying them in the configuration file for the appropriate ManagerRegister.
Reimplemented from det::VManager.
Definition at line 84 of file FdUpTimeFileManager.cc.
References ERROR, UpTimePeriod::fRootFilePtr, fwk::CoordinateSystemRegistry::Init(), and WARNING.
|
private |
Definition at line 122 of file FdUpTimeFileManager.cc.
References INFO, and UpTimePeriodSortFunction().
|
inlineinherited |
Definition at line 214 of file VManager.h.
References det::VManager::fIsInitialized.
Referenced by det::ManagerRegister::InterpretXML().
|
inlineprotectedinherited |
Definition at line 338 of file VManager.h.
References det::VManager::fReportingErrors.
Referenced by det::VManager::CheckedGetData(), det::XXMLManager< Info >::FindModelBranch(), det::XXMLManager< Info >::GetDataInternal(), and det::if().
|
protectedinherited |
Definition at line 47 of file VManager.cc.
|
staticinherited |
Definition at line 108 of file VManager.cc.
References det::VManager::Handle::GetTypeIdName().
Referenced by det::VManager::CheckedGetData(), det::ManagerRegister::GenericGetData(), atm::AAerosolSQLManager::GetDBResFundamental(), atm::AAerosolSQLManager::GetDBResVector(), det::ManagerRegister::GetManagerData(), fdet::Pixel::GetPixelData(), fdet::Pixel::GetPixelDataDiaphragm(), and det::if().
|
staticinherited |
Definition at line 119 of file VManager.cc.
|
inlinestaticinherited |
Definition at line 294 of file VManager.h.
|
staticinherited |
Definition at line 58 of file VManager.cc.
|
private |
Definition at line 563 of file FdUpTimeFileManager.cc.
References INFO, and galactic::second.
|
inlineinherited |
Definition at line 332 of file VManager.h.
References det::VManager::fName.
Referenced by det::ManagerRegister::InterpretXML().
|
inlineinherited |
Generic data accessors.
Any property of the detector is supposed to be accessible through this interface. Interface specifies the name of the property and the component to which it belongs, together with a map of (index name, index value) identifying the specific instance of the component. For example, to request the quantum efficiency of PMT 3 in station 57, one would have
Definition at line 231 of file VManager.h.
References det::VManager::fReportingErrors.
|
protectedinherited |
Definition at line 362 of file VManager.h.
Referenced by atm::AAerosolSQLManager::AAerosolSQLManager(), atm::ACloudSQLManager::ACloudSQLManager(), atm::ALidarSQLManager::ALidarSQLManager(), atm::ACloudSQLManager::GetDBResFundamental(), atm::ALidarSQLManager::GetDBResFundamental(), atm::AAerosolSQLManager::GetDBResFundamental(), atm::ALidarSQLManager::GetDBResVector(), and atm::AAerosolSQLManager::GetDBResVector().
|
protectedinherited |
Definition at line 360 of file VManager.h.
Referenced by det::XXMLManager< Info >::FindRoot(), det::XXMLManager< Info >::ConfigHandler< AllowMultiConfig, dummy >::for(), and det::XXMLManager< Info >::ConfigHandler< false, dummy >::Handle().
|
mutableprivate |
Definition at line 180 of file FdUpTimeFileManager.h.
|
mutableprivate |
Definition at line 181 of file FdUpTimeFileManager.h.
|
mutableprivate |
Definition at line 168 of file FdUpTimeFileManager.h.
|
mutableprivate |
Definition at line 179 of file FdUpTimeFileManager.h.
|
mutableprivate |
Definition at line 163 of file FdUpTimeFileManager.h.
|
mutableprivate |
Definition at line 164 of file FdUpTimeFileManager.h.
|
mutableprivate |
Definition at line 166 of file FdUpTimeFileManager.h.
|
mutableprivate |
Definition at line 167 of file FdUpTimeFileManager.h.
|
private |
Definition at line 154 of file FdUpTimeFileManager.h.
|
staticprivate |
Definition at line 183 of file FdUpTimeFileManager.h.
|
private |
Definition at line 191 of file FdUpTimeFileManager.h.
|
private |
Definition at line 192 of file FdUpTimeFileManager.h.
|
mutableprotectedinherited |
Definition at line 354 of file VManager.h.
Referenced by det::VManager::IsInitialized().
|
protectedinherited |
Definition at line 356 of file VManager.h.
Referenced by det::VManager::IsReportingErrors(), and det::VManager::SetReportingErrors().
|
private |
Definition at line 155 of file FdUpTimeFileManager.h.
|
mutableprivate |
Definition at line 165 of file FdUpTimeFileManager.h.
|
mutableprivate |
Definition at line 169 of file FdUpTimeFileManager.h.
|
private |
Definition at line 156 of file FdUpTimeFileManager.h.
|
private |
Definition at line 157 of file FdUpTimeFileManager.h.
|
private |
Definition at line 153 of file FdUpTimeFileManager.h.
|
staticprivate |
Definition at line 160 of file FdUpTimeFileManager.h.