RunTypeName.cxx File Reference

#include "DatabaseUpdater/RunTypeName.h"
#include "OnlineUtil/mdRunTypeCodes.h"
#include "TString.h"

Go to the source code of this file.

Functions

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

Function Documentation

const char* RunTypeName ( Short_t  runtype,
Detector::Detector_t  detector,
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 }

const char * RunTypeNameOld ( Short_t  runtype  ) 

Definition at line 47 of file RunTypeName.cxx.

Referenced by RunTypeName().

00048 {
00049 //
00050 //  Translate a run type into a string (original numbering scheme)
00051 //
00052 //  Contact:   R. Hatcher
00053  
00054    switch (runtype) {
00055  
00056      // Soudan (far) [1..99]
00057    case 1:   return "va-pedestal";      //"Pedestal";
00058    case 2:   return "normal-data";      //"NormalData";
00059    case 3:   return "va-calibrate";     //"ChargeInjection";
00060  
00061 //   case ?:  return "PlaneTrigger";
00062 //   case ?:  return "SinglesData";
00063 //   case ?:  return "LightInjectionDrift";
00064 //   case ?:  return "LightInjectionFull";
00065  
00066      // FNAL (near detector) [100-199]
00067    case 102: return "normal-data";      //"NormalData";
00068  
00069      // CalDet [200-299]
00070    case 201: return "normal-data";      //"NormalData";
00071    case 202: return "external-trig";    //"ExternalTrig";
00072    case 203: return "external-trig+li"; //"ExternalTrig+LI";
00073    case 204: return "null-trig";        //"NullTrig";
00074    case 205: return "null-trig+li";     //"NullTrig+LI";
00075  
00076    case 210: return "va-pedestal";      //"FarPedestal";
00077    case 211: return "va-calibrate";     //"FarCalInject";
00078  
00079    case 220: return "qie-calibrate";    //"NearCalibrate";
00080    case 221: return "qie-check-cal";    //"NearCheckCal";
00081    case 222: return "qie-expert-data";  //"NearExpertData";
00082    case 223: return "qie-expert-raw";   //"NearExpertRaw";
00083  
00084      // values gleaned from configs by Peter Shannahan
00085    case 301: return "qie-spill";        //"NearSpill";
00086    case 305: return "external-spill";   //"ExternalSpill";
00087    case 307: return "external-trigger"; //"ExternalTrigger";
00088    case 309: return "cosmic-sgate";     //"CosmicSgate";
00089  
00090    case 320: return "qie-calibrate";    //"NearCalibrate";
00091    case 321: return "qie-check-cal";    //"NearCheckCal";
00092    case 323: return "qie-expert-raw";   //"NearExpertRaw";
00093  
00094    case 355: return "dave-reyna-test";  //"DavesTest";
00095  
00096      // undefined
00097    default:  return "unknown";           //"Unknown";
00098    }
00099  
00100 }


Generated on 11 Apr 2019 for loon by  doxygen 1.6.1