RunTypeName.h File Reference

#include "Conventions/Detector.h"

Go to the source code of this file.

Functions

const char * RunTypeName (Short_t runtype, Detector::Detector_t det, Int_t run)

Function Documentation

const char* RunTypeName ( Short_t  runtype,
Detector::Detector_t  det,
Int_t  run 
)

Definition at line 11 of file RunTypeName.cxx.

References Form(), Detector::kCalDet, Detector::kFar, RUN_TYPE_CHECKOUT, RUN_TYPE_MASK_MODIFIED, RUN_TYPE_MASK_TEST, RUN_TYPE_MASK_TYPECODE, RUN_TYPE_PHYSICS, RUN_TYPE_QIE_CALIBRATE, RUN_TYPE_QIE_MONITOR, RUN_TYPE_VA_CALIBRATE, RUN_TYPE_VA_PEDESTAL, and RunTypeNameOld().

Referenced by BDLivePlot::BDLivePlot(), DbuRunSummary::Commit(), main(), operator<<(), DbuSubRunSummary::Store(), DbuRunSummary::Store(), DbuDaqFileModule::WritePythonFile(), and DbuDaqMonitorModule::WriteSubRunSummaryEntry().

00014 {
00015 //
00016 //  Translate runtype code into a reasonable string
00017 //
00018 //  Contact:   R. Hatcher
00019 
00020   // old run type scheme
00021   if ( Detector::kCalDet == detector ||
00022        ( Detector::kFar == detector && run <= 25190 ) )
00023     return RunTypeNameOld(runtype);
00024  
00025   int baseruntype =  RUN_TYPE_MASK_TYPECODE & runtype;
00026  
00027   const char* basetypename = "unknown";
00028   switch (baseruntype) {
00029   case RUN_TYPE_VA_CALIBRATE:  basetypename = "va-calibrate";  break;
00030   case RUN_TYPE_VA_PEDESTAL:   basetypename = "va-pedestal";   break;
00031   case RUN_TYPE_QIE_CALIBRATE: basetypename = "qie-calibrate"; break;
00032   case RUN_TYPE_QIE_MONITOR:   basetypename = "qie-monitor";   break;
00033   case RUN_TYPE_PHYSICS:       basetypename = "physics";       break;
00034   case RUN_TYPE_CHECKOUT:      basetypename = "checkout";      break;
00035   default:                     basetypename = "unknown";       break;
00036   }
00037  
00038   int nmod = 0;
00039   char modchars[5] = { 0 };
00040   if ( RUN_TYPE_MASK_TEST     & runtype ) { modchars[nmod] = 't'; nmod++; }
00041   if ( RUN_TYPE_MASK_MODIFIED & runtype ) { modchars[nmod] = 'm'; nmod++; }
00042  
00043   if ( ! nmod ) return basetypename;
00044   return Form("%s;%s",basetypename,modchars);
00045 }


Generated on 2 Nov 2017 for loon by  doxygen 1.6.1