#ifndef _sdet_T2LifeFileManager_h_ #define _sdet_T2LifeFileManager_h_ #include namespace sdet { /** \ingroup managers \brief Class to manage T2Life files. This class provides access to the T2Life files generated with the code from Orsay. This code can be found at http://ipnweb.in2p3.fr/~auger/AugerProtected/soft.htm and is used to process the T2 files found in the $AUGER_DATA area. A monthly T2Life file can be HUGE, so make sure you have space!. The following are the steps you need to follow to configure and use this manager:

Configuration

  1. Add the following line to the SManagerRegisterConfig.xml \verbatim T2LifeFileManager \endverbatim This line can be almost anywhere in the file, but has to come BEFORE the line that mentions SCalibSQLManager.
  2. Specify the location of the T2Life files. To do this, change the T2LifeFileManagerConfig.xml file to resemble something like the following. Note that you need to specify the first and last gps second for each file: \verbatim /home/jgonzalez/T2Life/T2Life/Output/T2Life_2005_09.txt 0 812160000 /home/jgonzalez/T2Life/T2Life/Output/T2Life_2005_10.txt 812160000 814838400 /home/jgonzalez/T2Life/T2Life/Output/T2Life_2005_11.txt 814838400 816480000 \endverbatim

Usage

After configuring the manager, it can be used through the SDetector interface by calling the method Station::IsInAcquisition() For example, the following code will write to the screen the station ids of those stations not sending T2s on November 01, 2005 at 00:00 \code TimeStamp now(2005, 11, 01); Detector::GetInstance().Update(now); const SDetector& sdetector = Detector::GetInstance().GetSDetector(); for (sdet::SDetector::StationIterator station = sdetector.StationsBegin(); station != sdetector.StationsEnd(); ++station) if (!station->IsInAcquisition()) cout << station->GetId() << endl; cout << endl; \endcode

Notes

\author Javier Gonzalez \author Darko Veberic \date 22 Nov 2005 \date 12 Jan 2007 DV update \ingroup T2LifeFileManager */ class T2LifeFileManager : public det::VManager { public: virtual ~T2LifeFileManager() { } void Init(const std::string& configLink); VMANAGER_GETDATA_CALL(GetOkFlag, int) VMANAGER_GETDATA_DENIED(double) VMANAGER_GETDATA_DENIED(std::string) VMANAGER_GETDATA_DENIED(std::list) VMANAGER_GETDATA_DENIED(std::list) VMANAGER_GETDATA_DENIED(std::list) VMANAGER_GETDATA_DENIED(std::list >) VMANAGER_GETDATA_DENIED(std::vector) VMANAGER_GETDATA_DENIED(std::vector) VMANAGER_GETDATA_DENIED(std::vector) VMANAGER_GETDATA_DENIED(std::vector) VMANAGER_GETDATA_DENIED(utl::TabulatedFunction) VMANAGER_GETDATA_DENIED(utl::TabulatedFunctionComplexLgAmpPhase) VMANAGER_GETDATA_DENIED(std::map) VMANAGER_GETDATA_DENIED(std::map) private: Status GetOkFlag(int& returnData, const std::string& componentProperty, const std::string& componentName, const IndexMap& componentIndex) const; std::string fT2FilesDirectory; mutable std::vector fStationList; mutable int fDetTime; }; } #endif // Configure (x)emacs for this file ... // Local Variables: // mode: c++ // End: