DcsUser Namespace Reference

Concept A class that holds and interprets rows from the DCS_RADON_LEVEL table More...


Detailed Description

Concept A class that holds and interprets rows from the DCS_RADON_LEVEL table

Purpose To provide both access to the raw table data and mean/interpolated radon levels. To access the standard Singleton:-

DcsRadonLevelFinder& rlf(*DcsRadonLevelFinderInstance());

Then to get the radon level for the current VldContext context:-

Float_t radon_level = rlf.GetRadonLevel(context); or Float_t radon_level = rlf.GetRadonLevel(context,numPoints);

The first method does a linear interpolation between the nearest two points. The second does an average of the nearest numPoints (<=50) points.

Both methods return -999. if unable to get a level.

To get all the radon level entries e.g. for Near detector April 2009:-

rlf.NewQuery(VldTimeStamp(2009,4,1,0,0,0),VldTimeStamp(2009,5,1,0,0,0),Detector::kNear);

const std::vector<const Dcs_Radon_Level*>& RadonLevels = rlf.GetRadonLevelTable();

for (UInt_t elem=0; elem < RadonLevels.size(); ++elem) { const Dcs_Radon_Level rl(*RadonLevels[elem]); std::cout << "Time: " << rl.GetTimeStamp() << " Level: " << rl.GetRadonLevel() << std::endl; }

The table is ordered in increasing time but may contain invalid levels (= -999.) This is an artifact of the way the data is obtained.

Users that want to own a set of results from the table should create their own DcsRadonLevelFinder

e.g. DcsRadonLevelFinder myRadonLevels(start_date,end_date,Detector::kNear)

This behaves exactly like the Singleton except that the method GetRadonLevel never performs a new query, the call NewQuery must be used explicitly.

Contact: n.west1@physics.ox.ac.uk


Generated on 17 Jun 2018 for loon by  doxygen 1.6.1