Project

General

Profile

Loading Subsets of the Data

By default, the nominal validity context variables are:

  • detector id
  • data type (data, mc or mcdata)
  • validity start time
  • validity stop time

One may optionally select data based on:

  • tag (see Tags)
  • channel range
  • value of one or more columns
  • timestamp when data were recorded

The latter option here requires knowledge of the exact time stamp in the database, and so is really only meant for expert use.

To select a subset of data based on a range of channels, use:

Table::SetChannelRange(int min, int max), or
Table::SetMinChannel(int chan) and Table::SetMaxChannel(int chan).

To select a subset of data based on the value of one or more columns, use:

Table::SetValiditySQL(std::string)

For example, if we have two columns called "x" and "y", then one may do something like:

Table::SetValiditySQL("x>0,x<=3.2,y!=0")

Calling Table::Load() after the above line would return only rows for which the value of "x" falls in the range (0,3.2] and "y" is not zero.