QDbDetector Namespace Reference
[DataBase]


Detailed Description

namespace of functions to access the DataBase for detector information

Author:
Riccardo Faccini & contributors


Classes

class  RootLoad

Enumerations

enum  RunType {
  RT_UNKNOWN, RT_BACKGROUND, RT_CALIBRATION, RT_NPULSES,
  RT_TEST, RT_SIMULATION, RT_REPROCESS
}
 possible run types More...
enum  DetectorName {
  DN_CUORICINO = 0, DN_THREETOWERS = 1, DN_CUORE0 = 2, DN_CUORE = 3,
  DN_HALLA = 4, DN_HALLC = 5, DN_HALLC_CUORE = 6, DN_UNKNOWN = 9
}
 possible detector names More...

Functions

QDbDetector::RunType GetRunType (int run)
 return run type
QDbDetector::RunType GetRunTypeFromBasket (int basket)
 get run type for a given settings basket
QDbDetector::RunType String2RunType (const std::string &s)
 string to RunType
std::string RunType2String (QDbDetector::RunType runType)
 RunType to string.
int GetMinAllowedRunNumber (DetectorName detector)
 get the minimum allowed run number for a given detector
int GetMaxAllowedRunNumber (DetectorName detector)
 get the maximum allowed run number for a given detector
QDbDetector::DetectorName GetDetectorName (int run)
 return DetectorName
std::string DetectorName2String (QDbDetector::DetectorName detectorId)
 DetectorName to string.
int NRun (const QTime &time)
int NRun (time_t time)
 run number from timestamp
int ProfileId (int run)
 profile_id from run_number
int BoloId (const int run, const int ch)
 bolo_id from run_number and channel, or throws QError if bolo_id is NULL
int Channel (const int run, const int boloId)
 channel from run_number and bolo_id
std::vector< int > FloorList (int run)
 list of all floors in a given run
std::vector< int > BoloList (int run)
 list of all bolometers in a given run (no thermometers) Note that the return values are bolo_id, not channel
std::vector< int > ActiveBoloList (int run)
 list of only active bolometers in a given run (no thermometers) Note that the return values are bolo_id, not channel
bool IsActiveBolo (int run, int id)
 check if a channel is active
std::vector< int > ActiveChannelList (const int run)
 list of only active channels in a given run (no thermometers)
std::vector< int > ThermList (int run)
 list of thermistors (without crystals) read in a given run
std::map< int, int > TrgThresholdList (int run)
 get trigger threshold list
std::vector< int > GetRelativeChannels (int run, int channel, const std::string fileName="DB")
 Get list of channels on the same crystal of channel (useful when there is more than one thermistor per crystal).
int GetPulserId (int run, int boloId, const std::string filename="DB")
 Get Pulser Id for bolometer boloId.
QVector Position (int run, int channel)
 position of the crystal (QVector with 3 components, x,y,z)
int BoloFloor (const int run, const int channel)
 return the floor of the bolometer
vector< int > BolometersOnFloor (const int run, const int floor)
 return a vector containing all the channels on
std::map< int, int > ChannelFloor (int run)
 return a map of (channel, floor)
std::multimap< int, int > FloorChannel (int run)
 return a multimap (floor,channel)
int BoloTower (const int run, const int channel)
 return the tower of the bolometer
int BoloPosition (const int run, const int channel)
 return the position of the bolometer within its floor possible values are 1, 2, 3, or 4
string BoloName (const int run, const int channel)
 return bolometer name
double SamplingFrequency (int run, int chan)
 sampling frequency for a given channel in a given run
std::vector< double > ADCRange (int run, int chan)
 adc range for a given channel in a given run
int GetThermometerChannel (int run)
 tower termometer channel
std::vector< int > GetMuonQDCChannels (int)
 get the list of QDC daq channels
std::vector< int > GetMuonTDCChannels (int)
 get the list of TDC daq channels
double GetScintillatorThickness (std::string name, int run)
std::string GetScintillatorNameFromQDCCh (int channel, int run)
 get the name of the scintillator
std::map< unsigned int,
unsigned int > 
GetDaqCrates (int basket)
 get a map of logical channels and the DAQ crates they belong to
unsigned int SettingsBasket (const unsigned int run)
 get settings basket for the requested run number
unsigned int GetCurrentRunNumber ()
 get current run number (used by online)
void GetListOfChannels (unsigned int run, std::list< unsigned int > &chList)
 get the list of active logical channels in a given run
void GetListOfPulsers (unsigned int run, std::map< unsigned int, std::list< unsigned int > > &pulsers)
 get a map of pulser channels and corresponding list of logical channels
vector< int > GetBolometerChannels (const int run)
 Get bolometer channels of a given run.
double GetMass (int run, int channel)
 return crystal mass in kg
double GetMass130Te (int run, int channel)
 return mass of 130Te in crystal (in kg)
int NRun (const Cuore::QTime &time)
 run number from time of event


Enumeration Type Documentation

possible detector names

Enumerator:
DN_CUORICINO  Cuoricino
DN_THREETOWERS  Three Towers
DN_CUORE0  Cuore 0
DN_CUORE  Cuore
DN_HALLA  HallA crio (generic)
DN_HALLC  HallC crio (generic)
DN_HALLC_CUORE  HallC CUORE crystals test
DN_UNKNOWN  UNKNOWN

possible run types

Enumerator:
RT_UNKNOWN  runtype is unknown
RT_BACKGROUND  background measurement
RT_CALIBRATION  calibration measurement
RT_NPULSES  heater pulses at several amplitudes
RT_TEST  test measurement
RT_SIMULATION  simulated data
RT_REPROCESS  reprocess data starting from gz files


Function Documentation

std::vector< int > QDbDetector::ActiveBoloList ( int  run  ) 

list of only active bolometers in a given run (no thermometers) Note that the return values are bolo_id, not channel

Parameters:
run run number

References BoloList(), and IsActiveBolo().

Referenced by ActiveChannelList(), MDetermineHeaterProperties::Do(), MCheckTimeBehaviour::Do(), MCheckOffsetAndSat::Do(), MCheckHeaterDAQ::Do(), and MCheckTimeBehaviour::Done().

std::vector< int > QDbDetector::ActiveChannelList ( const int  run  ) 

list of only active channels in a given run (no thermometers)

Parameters:
run run number

References ActiveBoloList(), and Channel().

Referenced by MCoincidenceMultiplicity::Do(), MOTShiftBack::Do(), MOTAmplitude::Do(), and MLiveTime::Fill().

std::vector< double > QDbDetector::ADCRange ( int  run,
int  chan 
)

adc range for a given channel in a given run

Parameters:
run 
channel 
Returns:
vector[0] = min, vector[1] = max.

References ProfileId().

int QDbDetector::BoloId ( const int  run,
const int  ch 
)

bolo_id from run_number and channel, or throws QError if bolo_id is NULL

Parameters:
run run number
ch channel

References ProfileId().

Referenced by BoloFloor(), BoloName(), BoloPosition(), BoloTower(), GetRelativeChannels(), and Position().

std::vector< int > QDbDetector::BoloList ( int  run  ) 

list of all bolometers in a given run (no thermometers) Note that the return values are bolo_id, not channel

Parameters:
run run number

References ProfileId().

Referenced by ActiveBoloList(), ChannelFloor(), MDetermineHeaterProperties::Do(), MCreateRateReference::Do(), MCheckTimeBehaviour::Do(), MCheckOffsetAndSat::Do(), MCheckHeaterDAQ::Do(), MHeaterFlagByCoincidence::Do(), MHeaterHistoryPlots::Do(), and MStabDbWriter::Done().

std::vector< int > QDbDetector::BolometersOnFloor ( const int  run,
const int  floor 
)

return a vector containing all the channels on

Parameters:
floor 

References ProfileId().

Referenced by MDetermineHeaterProperties::Done(), MCheckTimeBehaviour::Done(), MCheckOffsetAndSat::Done(), MRawDataFilter::Filter(), and FloorChannel().

std::string QDbDetector::BoloName ( const int  run,
const int  channel 
)

return bolometer name

Parameters:
run run number
channel channel number

References BoloId().

int QDbDetector::Channel ( const int  run,
const int  boloId 
)

channel from run_number and bolo_id

Parameters:
run run_number
boloId bolo_id

References ProfileId().

Referenced by ActiveChannelList().

std::map< int, int > QDbDetector::ChannelFloor ( int  run  ) 

return a map of (channel, floor)

Parameters:
run run number

References BoloFloor(), and BoloList().

std::multimap< int, int > QDbDetector::FloorChannel ( int  run  ) 

return a multimap (floor,channel)

Parameters:
run run number

References BolometersOnFloor(), and FloorList().

Referenced by MDetermineHeaterProperties::Do(), MCheckTimeBehaviour::Do(), and MCheckOffsetAndSat::Do().

std::vector< int > QDbDetector::FloorList ( int  run  ) 

list of all floors in a given run

Parameters:
run run number

References ProfileId().

Referenced by FloorChannel().

std::vector< int > QDbDetector::GetBolometerChannels ( const int  run  ) 

Get bolometer channels of a given run.

Parameters:
run run number
This function only returns active logical channels associated to bolometers daq_id is defined and corresponding daq_type is BOLOMETER daqsettings.flag_act is nonzero (CUORICINO style) or NULL (Apollo style) bolometers.xl_name is a nonempty string

References ProfileId(), and SettingsBasket().

std::map< unsigned int, unsigned int > QDbDetector::GetDaqCrates ( int  basket  ) 

get a map of logical channels and the DAQ crates they belong to

Parameters:
basket settings basket
Returns:
map of logical channels (key) and corresponding daq crates (val)

Referenced by QWPSlowConfigHandler::GetCratesToKill(), QLCSlowConfigHandler::GetCratesToKill(), and QEleConfigHandler::GetCratesToKill().

DetectorName QDbDetector::GetDetectorName ( int  run  ) 

return DetectorName

Parameters:
run run number

Referenced by MChannelsWithHeater::Filter(), GetMass(), GetMass130Te(), and QASCII::ReadQRunData().

void QDbDetector::GetListOfChannels ( unsigned int  run,
std::list< unsigned int > &  chList 
)

get the list of active logical channels in a given run

Parameters:
run run number
chList filled with list of active channels
This function only return logical channels associated to bolometers (those for which a daq_id is defined and corresponding daq_type is BOLOMETER).

Referenced by MApolloHistoMaker::GetListOfChannels(), MWPSlowController::Init(), MLCSlowController::Init(), and MApolloEventBuilder::Init().

void QDbDetector::GetListOfPulsers ( unsigned int  run,
std::map< unsigned int, std::list< unsigned int > > &  pulsers 
)

get a map of pulser channels and corresponding list of logical channels

Parameters:
run run number
pulsers map filled with pulser channels (key) and corresponding list of logical channels (value). The lists of logical channels are sorted in ascending order

double QDbDetector::GetMass ( int  run,
int  channel 
)

return crystal mass in kg

Parameters:
run run number
channel (logical) channel number

References DN_CUORICINO, and GetDetectorName().

Referenced by MLiveTime::Done(), and GetMass130Te().

double QDbDetector::GetMass130Te ( int  run,
int  channel 
)

return mass of 130Te in crystal (in kg)

Parameters:
run run number
channel (logical) channel number

References DN_CUORICINO, GetDetectorName(), and GetMass().

Referenced by MLiveTime::Done().

std::vector< int > QDbDetector::GetMuonQDCChannels ( int   ) 

get the list of QDC daq channels

Parameters:
run 

References ProfileId().

std::vector< int > QDbDetector::GetMuonTDCChannels ( int   ) 

get the list of TDC daq channels

Parameters:
run 

References ProfileId().

RunType QDbDetector::GetRunType ( int  run  ) 

return run type

Parameters:
run run number

References String2RunType().

Referenced by QGuiControlWindow::UpdateDaqStatus().

RunType QDbDetector::GetRunTypeFromBasket ( int  basket  ) 

get run type for a given settings basket

Returns:
requested run type or RT_UNKNOWN if the basket is invalid

References RT_UNKNOWN, and String2RunType().

Referenced by QGUIDataCollector::Reset().

std::string QDbDetector::GetScintillatorNameFromQDCCh ( int  channel,
int  run 
)

get the name of the scintillator

Parameters:
qdc channel
run 

References ProfileId().

double QDbDetector::GetScintillatorThickness ( std::string  name,
int  run 
)

get the thickness of a scintillator (in cm) param scintillaotr name param run

int QDbDetector::GetThermometerChannel ( int  run  ) 

tower termometer channel

Parameters:
run 

References ProfileId().

bool QDbDetector::IsActiveBolo ( int  run,
int  id 
)

check if a channel is active

Parameters:
run run number, id bolometer id

References ProfileId().

Referenced by ActiveBoloList().

int QDbDetector::NRun ( const Cuore::QTime &  time  ) 

run number from time of event

Parameters:
time QTime of event MV FIXME need run number as input AB: MV must mean need detector as input

int QDbDetector::NRun ( time_t  time  ) 

run number from timestamp

Parameters:
time timestamp in msec from 1901 MV FIXME need run number as input AB: MV must mean need detector as input

Cuore::QVector QDbDetector::Position ( int  run,
int  channel 
)

position of the crystal (QVector with 3 components, x,y,z)

Parameters:
channel logical channel (1-1 correspondence with bolometers)

References BoloId().

int QDbDetector::ProfileId ( int  run  ) 

double QDbDetector::SamplingFrequency ( int  run,
int  chan 
)

sampling frequency for a given channel in a given run

Parameters:
run 
channel 

References ProfileId().

std::vector< int > QDbDetector::ThermList ( int  run  ) 

list of thermistors (without crystals) read in a given run

Parameters:
run run number


Generated on Tue Nov 16 10:50:09 2010 for CUORE Software by  doxygen 1.5.6