ReleaseType Namespace Reference

Typedefs

typedef enum
ReleaseType::EDataMCRelease 
DataMC_t
typedef enum
ReleaseType::ERecoRelease 
Reco_t
typedef enum
ReleaseType::ESubMCRelease 
SubMC_t
typedef enum
ReleaseType::ESubRecoRelease 
SubReco_t
typedef enum ReleaseType::ETestFlag RecoTest_t
typedef Int_t Release_t
typedef enum
ReleaseType::EFieldMaskRelease 
FieldMask_t

Enumerations

enum  EDataMCRelease {
  kData = 0x00, kAvocado = 0x01, kBeet = 0x02, kCarrot = 0x03,
  kDaikon = 0x04, kEggplant = 0x05, kFava = 0x06, kGarlic = 0x07,
  kHops = 0x08, kIceberg = 0x09, kJicama = 0x0A
}
enum  ERecoRelease {
  kAsh = 0x10, kBirch = 0x20, kCedar = 0x30, kDogwood = 0x40,
  kElm = 0x50, kFir = 0x60, kGinkgo = 0x70, kHickory = 0x80,
  kIvy = 0x90, kJuniper = 0xA0
}
enum  ESubMCRelease {
  k00 = 0x0000, k01 = 0x0100, k02 = 0x0200, k03 = 0x0300,
  k04 = 0x0400, k05 = 0x0500, k06 = 0x0600, k07 = 0x0700,
  k08 = 0x0800, k09 = 0x0900, k10 = 0x0A00
}
enum  ESubRecoRelease {
  kR00 = 0x0000, kR01 = 0x1000, kR02 = 0x2000, kR03 = 0x3000,
  kR04 = 0x4000, kR05 = 0x5000, kR06 = 0x6000, kR07 = 0x7000,
  kR08 = 0x8000, kR09 = 0x9000, kR10 = 0xA000
}
enum  ETestFlag { kStandard = 0x00000, kTest = 0x10000 }
enum  EFieldMaskRelease {
  kUnknown = -1, DataMCMask = 0x0000F, RecoMask = 0x000F0, SubMCMask = 0x00F00,
  SubRecoMask = 0x0F000, RecoTestMask = 0xF0000
}

Functions

Release_t GetRecoInfo (int type)
Release_t GetMCInfo (int type)
bool IsData (int type)
bool IsMC (int type)
bool IsTest (int type)
bool IsAvocado (int type)
bool IsBeet (int type)
bool IsCarrot (int type)
bool IsDaikon (int type)
bool IsEggplant (int type)
bool IsFava (int type)
bool IsGarlic (int type)
bool IsHops (int type)
bool IsIceberg (int type)
bool IsJicama (int type)
bool IsAsh (int type)
bool IsBirch (int type)
bool IsCedar (int type)
bool IsDogwood (int type)
bool IsElm (int type)
bool IsFir (int type)
bool IsGinkgo (int type)
bool IsHickory (int type)
bool IsIvy (int type)
bool IsJuniper (int type)
int GetMCSubVersion (int type)
int GetRecoSubVersion (int type)
Release_t GetRecoRelease (const char *recoreleasename)
Release_t GetSubRecoRelease (const char *subrecoreleasename)
Release_t GetDataMCRelease (const char *mcreleasename)
Release_t GetSubMCRelease (const char *submcreleasename)
Release_t GetTestFlag (const char *testflagname)
Release_t GetProductionRelease (const char *prodreleasename)
const char * AsString (ERecoRelease recorelease)
const char * AsString (ESubRecoRelease subrecorelease)
const char * AsString (EDataMCRelease datamcrelease)
const char * AsString (ESubMCRelease submcrelease)
const char * AsString (ReleaseType::ETestFlag testflag)
std::string AsString (int type)
std::string GetVersionString (int val)
Release_t StringToType (const char *nameChar)
Release_t MakeReleaseType (std::string fTitle, std::string mcinfo="")
const std::pair< std::string,
std::string > 
AsBatchString (int type)

Variables

static const Release_t kBirchData = kBirch | kData
static const Release_t kBirchCarrot = kBirch | kCarrot
static const Release_t kCedarData = kCedar | kData
static const Release_t kCedarCarrot = kCedar | kCarrot
static const Release_t kCedarDaikon = kCedar | kDaikon
static const Release_t kR1_24_0 = kCedar | kR00
static const Release_t kR1_24_1 = kCedar | kR01
static const Release_t kR1_24_2 = kCedar | kR02
static const Release_t kR1_24_Cal = kCedar | kR08
static const Release_t kR1_24_CalB = kCedar | kR09
static const Release_t kR1_24_3 = kCedar | kR03
static const Release_t kCedar_Phy = kCedar | kR02
static const Release_t kCedarPhy = kCedar | kR02
static const Release_t kCedarPhyData = kCedar | kR02 | kData
static const Release_t kCedar_PhyData = kCedar | kR02 | kData
static const Release_t kCedarPhyDaikon = kCedarPhy | kDaikon
static const Release_t kR2_0_0 = kDogwood | kR00
static const Release_t kR2_0_1 = kDogwood | kR01
static const Release_t kR2_0_2 = kDogwood | kR02
static const Release_t kR2_0_3 = kDogwood | kR03
static const Release_t kR2_0_4 = kDogwood | kR04
static const Release_t kR2_0_5 = kDogwood | kR05
static const Release_t kR2_0_6 = kDogwood | kR06
static const Release_t kR2_0_7 = kDogwood | kR07
static const Release_t kDogwood0 = kDogwood | kR00
static const Release_t kDogwood1 = kDogwood | kR01
static const Release_t kDogwood2 = kDogwood | kR02
static const Release_t kDogwood3 = kDogwood | kR03
static const Release_t kDogwood4 = kDogwood | kR04
static const Release_t kDogwood5 = kDogwood | kR05
static const Release_t kDogwood6 = kDogwood | kR06
static const Release_t kDogwood7 = kDogwood | kR07
static const Release_t kDogwood0Data = kDogwood | kR00 | kData
static const Release_t kDogwood0Daikon = kDogwood | kR00 | kDaikon
static const Release_t kDogwood0Garlic = kDogwood | kR00 | kGarlic
static const Release_t kDogwood0Hops = kDogwood | kR00 | kHops
static const Release_t kDogwood1Data = kDogwood | kR01 | kData
static const Release_t kDogwood1Daikon = kDogwood | kR01 | kDaikon
static const Release_t kDogwood1Garlic = kDogwood | kR01 | kGarlic
static const Release_t kDogwood1Hops = kDogwood | kR01 | kHops
static const Release_t kDogwood2Data = kDogwood | kR02 | kData
static const Release_t kDogwood2Daikon = kDogwood | kR02 | kDaikon
static const Release_t kDogwood2Garlic = kDogwood | kR02 | kGarlic
static const Release_t kDogwood2Hops = kDogwood | kR02 | kHops
static const Release_t kDogwood3Data = kDogwood | kR03 | kData
static const Release_t kDogwood3Daikon = kDogwood | kR03 | kDaikon
static const Release_t kDogwood3Garlic = kDogwood | kR03 | kGarlic
static const Release_t kDogwood3Hops = kDogwood | kR03 | kHops
static const Release_t kDogwood4Data = kDogwood | kR04 | kData
static const Release_t kDogwood4Daikon = kDogwood | kR04 | kDaikon
static const Release_t kDogwood4Garlic = kDogwood | kR04 | kGarlic
static const Release_t kDogwood4Hops = kDogwood | kR04 | kHops
static const Release_t kDogwood5Data = kDogwood | kR05 | kData
static const Release_t kDogwood5Daikon = kDogwood | kR05 | kDaikon
static const Release_t kDogwood5Garlic = kDogwood | kR05 | kGarlic
static const Release_t kDogwood5Hops = kDogwood | kR05 | kHops
static const Release_t kDogwood7Data = kDogwood | kR07 | kData
static const Release_t kDogwood7Daikon = kDogwood | kR07 | kDaikon
static const Release_t kDogwood7Garlic = kDogwood | kR07 | kGarlic
static const Release_t kDogwood7Hops = kDogwood | kR07 | kHops
static const Release_t kElm0Data = kElm | kR00 | kData
static const Release_t kElm0Daikon = kElm | kR00 | kDaikon
static const Release_t kElm0Garlic = kElm | kR00 | kGarlic
static const Release_t kElm0Hops = kElm | kR00 | kHops
static const Release_t kElm1Data = kElm | kR01 | kData
static const Release_t kElm1Daikon = kElm | kR01 | kDaikon
static const Release_t kElm1Garlic = kElm | kR01 | kGarlic
static const Release_t kElm1Hops = kElm | kR01 | kHops
static const Release_t kElm2Data = kElm | kR02 | kData
static const Release_t kElm2Daikon = kElm | kR02 | kDaikon
static const Release_t kElm2Garlic = kElm | kR02 | kGarlic
static const Release_t kElm2Hops = kElm | kR02 | kHops
static const Release_t kElm3Data = kElm | kR03 | kData
static const Release_t kElm3Daikon = kElm | kR03 | kDaikon
static const Release_t kElm3Garlic = kElm | kR03 | kGarlic
static const Release_t kElm3Hops = kElm | kR03 | kHops

Typedef Documentation

typedef Int_t ReleaseType::Release_t

Definition at line 229 of file ReleaseType.h.


Enumeration Type Documentation

Enumerator:
kData 
kAvocado 
kBeet 
kCarrot 
kDaikon 
kEggplant 
kFava 
kGarlic 
kHops 
kIceberg 
kJicama 

Definition at line 169 of file ReleaseType.h.

00169                                 {
00170       kData     = 0x00,
00171       kAvocado  = 0x01,
00172       kBeet     = 0x02,
00173       kCarrot   = 0x03,
00174       kDaikon   = 0x04,    //Production began December 2006
00175       kEggplant = 0x05,
00176       kFava     = 0x06,
00177       kGarlic   = 0x07,
00178       kHops     = 0x08,
00179       kIceberg  = 0x09,
00180       kJicama   = 0x0A
00181     } DataMC_t;

Enumerator:
kUnknown 
DataMCMask 
RecoMask 
SubMCMask 
SubRecoMask 
RecoTestMask 

Definition at line 231 of file ReleaseType.h.

00231                                    {
00232       kUnknown     = -1,
00233       DataMCMask   = 0x0000F,
00234       RecoMask     = 0x000F0,
00235       SubMCMask    = 0x00F00,
00236       SubRecoMask  = 0x0F000,
00237       RecoTestMask = 0xF0000
00238     } FieldMask_t;

Enumerator:
kAsh 
kBirch 
kCedar 
kDogwood 
kElm 
kFir 
kGinkgo 
kHickory 
kIvy 
kJuniper 

Definition at line 183 of file ReleaseType.h.

00183                               {    
00184       kAsh     = 0x10,   // R1.18
00185       kBirch   = 0x20,   // R1.18.{2/4}
00186       kCedar   = 0x30,   // Fall 2006 (R1.24.{0/1}
00187       kDogwood = 0x40,   // Winter 2009 (R2.0)
00188       kElm     = 0x50,   // Summer 2013 (R3.0)
00189       kFir     = 0x60,
00190       kGinkgo  = 0x70,
00191       kHickory = 0x80,
00192       kIvy     = 0x90,
00193       kJuniper = 0xA0   
00194     } Reco_t;

Enumerator:
k00 
k01 
k02 
k03 
k04 
k05 
k06 
k07 
k08 
k09 
k10 

Definition at line 196 of file ReleaseType.h.

00196                                {
00197       k00 = 0x0000,  // first order release and backwards comp
00198       k01 = 0x0100,  //
00199       k02 = 0x0200,  //
00200       k03 = 0x0300,  //
00201       k04 = 0x0400,  //
00202       k05 = 0x0500,
00203       k06 = 0x0600,
00204       k07 = 0x0700,
00205       k08 = 0x0800,
00206       k09 = 0x0900,
00207       k10 = 0x0A00
00208     } SubMC_t;

Enumerator:
kR00 
kR01 
kR02 
kR03 
kR04 
kR05 
kR06 
kR07 
kR08 
kR09 
kR10 

Definition at line 210 of file ReleaseType.h.

00210                                  {
00211       kR00 = 0x0000,  // first order release and backwards comp
00212       kR01 = 0x1000,  // 
00213       kR02 = 0x2000,  // 
00214       kR03 = 0x3000,  // 
00215       kR04 = 0x4000,  //
00216       kR05 = 0x5000,
00217       kR06 = 0x6000,  
00218       kR07 = 0x7000,  
00219       kR08 = 0x8000,  
00220       kR09 = 0x9000,
00221       kR10 = 0xA000
00222     } SubReco_t;

Enumerator:
kStandard 
kTest 

Definition at line 224 of file ReleaseType.h.

00224                            {
00225       kStandard = 0x00000,
00226       kTest     = 0x10000
00227     } RecoTest_t;


Function Documentation

const std::pair< std::string, std::string > ReleaseType::AsBatchString ( int  type  ) 

Definition at line 385 of file ReleaseType.cxx.

References GetMCSubVersion(), GetRecoSubVersion(), IsAsh(), IsAvocado(), IsBeet(), IsBirch(), IsCarrot(), IsCedar(), IsDaikon(), IsDogwood(), IsEggplant(), IsElm(), IsFava(), IsFir(), IsGarlic(), IsGinkgo(), IsHickory(), IsHops(), IsIceberg(), IsIvy(), IsJicama(), IsJuniper(), IsMC(), and IsTest().

00386 {
00387    //
00388    // Return pair of strings: 
00389    //    1st element is reconstruction release name as used for pnfs file storage
00390    //    2nd element is Monte-Carlo release name as used for pnfs file storage
00391    //
00392 
00393   string dmc = "unknown_mc";
00394   string reco = "unknown_reco";
00395 
00396   if(ReleaseType::IsMC(type))
00397   {
00398      if(ReleaseType::IsAvocado(type))       dmc = "avocado";
00399      else if(ReleaseType::IsBeet(type))     dmc = "beet";
00400      else if(ReleaseType::IsCarrot(type))   dmc = "carrot";
00401      else if(ReleaseType::IsDaikon(type))   dmc = "daikon";
00402      else if(ReleaseType::IsEggplant(type)) dmc = "eggplant";
00403      else if(ReleaseType::IsFava(type))     dmc = "fava";  
00404      else if(ReleaseType::IsGarlic(type))   dmc = "garlic";
00405      else if(ReleaseType::IsHops(type))     dmc = "hops";
00406      else if(ReleaseType::IsIceberg(type))  dmc = "iceberg";
00407      else if(ReleaseType::IsJicama(type))   dmc = "jicama";
00408 
00409      if(ReleaseType::GetMCSubVersion(type) < 0 || ReleaseType::GetMCSubVersion(type) > 99)
00410      {
00411         std::cerr << "ReleaseType::AsBatchString - bad Monte-Carlo version: " 
00412                   << ReleaseType::GetMCSubVersion(type) << std::endl;
00413      }
00414      else
00415      {
00416         std::stringstream mver;
00417         mver << std::setw(2) << std::setfill('0') << ReleaseType::GetMCSubVersion(type);
00418         dmc = dmc + "_" + mver.str();
00419      }     
00420   }
00421   else
00422   {
00423      dmc = "data";
00424   }
00425   
00426   if(ReleaseType::IsAsh(type)) reco = "ash";
00427   if(ReleaseType::IsBirch(type)) reco = "birch";
00428   if(ReleaseType::IsCedar(type))
00429   {
00430      if(ReleaseType::GetRecoSubVersion(type) == 0)
00431      {
00432         reco = "cedar";
00433      }
00434      else if(ReleaseType::GetRecoSubVersion(type) == 1)
00435      {
00436         reco = "cedar";
00437      }
00438      else if(ReleaseType::GetRecoSubVersion(type) == 2)
00439      {
00440         reco = "cedar_phy";
00441      }
00442      else if(ReleaseType::GetRecoSubVersion(type) == 3)
00443      {
00444         reco = "cedar_phy_bhcurv";
00445      }
00446      else
00447      {
00448         std::cerr << "ReleaseType::AsBatchString - bad cedar reconstuction version: "
00449                   << ReleaseType::GetRecoSubVersion(type) << std::endl; 
00450      }
00451   }
00452   if(ReleaseType::IsDogwood(type))
00453   {
00454     if(ReleaseType::GetRecoSubVersion(type) == 0)
00455       {
00456         reco = "dogwood0";
00457       }
00458     else if(ReleaseType::GetRecoSubVersion(type) == 1)
00459       {
00460         reco = "dogwood1";
00461       }
00462     else if(ReleaseType::GetRecoSubVersion(type) == 2)
00463       {
00464         reco = "dogwood2";
00465       }
00466     else if(ReleaseType::GetRecoSubVersion(type) == 3)
00467       {
00468         reco = "dogwood3";
00469       }
00470     else if(ReleaseType::GetRecoSubVersion(type) == 4)
00471       {
00472         reco = "dogwood4";
00473       }
00474     else if(ReleaseType::GetRecoSubVersion(type) == 5)
00475       {
00476         reco = "dogwood5";
00477       }
00478     else if(ReleaseType::GetRecoSubVersion(type) == 6)
00479       {
00480         reco = "dogwood6";
00481       }
00482     else if(ReleaseType::GetRecoSubVersion(type) == 7)
00483       {
00484         reco = "dogwood7";
00485       }
00486     else
00487       {
00488         std::cerr << "ReleaseType::AsBatchString - bad dogwood reconstuction version: "
00489                   << ReleaseType::GetRecoSubVersion(type) << std::endl; 
00490       }
00491   }
00492   if(ReleaseType::IsElm(type)) reco = "elm";
00493   if(ReleaseType::IsFir(type)) reco = "fir";
00494   if(ReleaseType::IsGinkgo(type)) reco = "ginkgo";
00495   if(ReleaseType::IsHickory(type)) reco = "hickory";
00496   if(ReleaseType::IsIvy(type)) reco = "ivy";
00497   if(ReleaseType::IsJuniper(type)) reco = "juniper";
00498  
00499   if(ReleaseType::IsTest(type)) reco += "test";
00500 
00501   return std::pair<std::string, std::string>(dmc, reco);
00502 }

string ReleaseType::AsString ( int  type  ) 

Definition at line 149 of file ReleaseType.cxx.

References GetMCSubVersion(), GetRecoInfo(), GetRecoSubVersion(), GetVersionString(), IsAsh(), IsAvocado(), IsBeet(), IsBirch(), IsCarrot(), IsCedar(), IsDaikon(), IsDogwood(), IsEggplant(), IsElm(), IsFava(), IsFir(), IsGarlic(), IsGinkgo(), IsHickory(), IsHops(), IsIceberg(), IsIvy(), IsJicama(), IsJuniper(), IsMC(), IsTest(), kCedarPhy, kDogwood1, kDogwood2, kDogwood3, kDogwood4, kDogwood5, kDogwood6, kDogwood7, kR1_24_3, kR2_0_1, kR2_0_2, kR2_0_3, kR2_0_4, kR2_0_5, and kR2_0_7.

00150 {
00151   string dmc = "unknown";
00152   string reco = "unknownRel";
00153 
00154   if(ReleaseType::IsMC(type)){
00155     if(ReleaseType::IsAvocado(type)) dmc = "Avocado";
00156     else if(ReleaseType::IsBeet(type)) dmc = "Beet";
00157     else if(ReleaseType::IsCarrot(type)) dmc = "Carrot";
00158     else if(ReleaseType::IsDaikon(type)) dmc = "Daikon";
00159     else if(ReleaseType::IsEggplant(type)) dmc = "Eggplant";
00160     else if(ReleaseType::IsFava(type)) dmc = "Fava";  
00161     else if(ReleaseType::IsGarlic(type)) dmc = "Garlic";
00162     else if(ReleaseType::IsHops(type)) dmc = "Hops";
00163     else if(ReleaseType::IsIceberg(type)) dmc = "Iceberg";
00164     else if(ReleaseType::IsJicama(type)) dmc = "Jicama";
00165     else dmc = "unknown MC";
00166    
00167     dmc += GetVersionString(ReleaseType::GetMCSubVersion(type));
00168   }else{
00169     dmc = "Data";
00170   }
00171 
00172   if(ReleaseType::IsAsh(type)) reco = "Ash";
00173   if(ReleaseType::IsBirch(type)) reco = "Birch";
00174   if(ReleaseType::IsCedar(type)){
00175      if(ReleaseType::GetRecoInfo(type) == ReleaseType::kCedarPhy ||
00176          ReleaseType::GetRecoInfo(type) == ReleaseType::kR1_24_3 )
00177         reco = "CedarPhy";
00178      else  reco = "Cedar";
00179   }
00180   if(ReleaseType::IsDogwood(type)) {
00181     if     (ReleaseType::GetRecoInfo(type) == ReleaseType::kDogwood1 ||
00182             ReleaseType::GetRecoInfo(type) == ReleaseType::kR2_0_1 )
00183       reco = "Dogwood";
00184     else if(ReleaseType::GetRecoInfo(type) == ReleaseType::kDogwood2 ||
00185             ReleaseType::GetRecoInfo(type) == ReleaseType::kR2_0_2 )
00186       reco = "Dogwood";
00187     else if(ReleaseType::GetRecoInfo(type) == ReleaseType::kDogwood3 ||
00188             ReleaseType::GetRecoInfo(type) == ReleaseType::kR2_0_3 )
00189       reco = "Dogwood";
00190     else if(ReleaseType::GetRecoInfo(type) == ReleaseType::kDogwood4 ||
00191             ReleaseType::GetRecoInfo(type) == ReleaseType::kR2_0_4 )
00192       reco = "Dogwood";
00193     else if(ReleaseType::GetRecoInfo(type) == ReleaseType::kDogwood5 ||
00194             ReleaseType::GetRecoInfo(type) == ReleaseType::kR2_0_5 )
00195       reco = "Dogwood";
00196     else if(ReleaseType::GetRecoInfo(type) == ReleaseType::kDogwood6 ||
00197             ReleaseType::GetRecoInfo(type) == ReleaseType::kR2_0_7 )
00198       reco = "Dogwood";
00199     else if(ReleaseType::GetRecoInfo(type) == ReleaseType::kDogwood7 ||
00200             ReleaseType::GetRecoInfo(type) == ReleaseType::kR2_0_7 )
00201       reco = "Dogwood";
00202     else reco = "Dogwood";    
00203   }
00204   if(ReleaseType::IsElm(type)) reco = "Elm";
00205   if(ReleaseType::IsFir(type)) reco = "Fir";
00206   if(ReleaseType::IsGinkgo(type)) reco = "Ginkgo";
00207   if(ReleaseType::IsHickory(type)) reco = "Hickory";
00208   if(ReleaseType::IsIvy(type)) reco = "Ivy";
00209   if(ReleaseType::IsJuniper(type)) reco = "Juniper";
00210 
00211   if(ReleaseType::IsTest(type)) reco += "Test";
00212   reco += GetVersionString(ReleaseType::GetRecoSubVersion(type));
00213 
00214   string name = reco + " " + dmc;
00215 
00216   return name;
00217 }                             

const char * ReleaseType::AsString ( ReleaseType::ETestFlag  testflag  ) 

Definition at line 721 of file ReleaseType.cxx.

References Msg::kError, kStandard, kTest, and MSG.

00722 {
00723   switch ( testflag) {
00724   case kStandard:    return "";
00725   case kTest:        return "test";
00726   default:
00727     MSG("Conv",Msg::kError) << "ReleaseType::AsString for unknown "
00728                             << "ETestFlag " << testflag
00729                             << ". Fix method. Abort." << endl;
00730     abort();
00731   }
00732 }

const char * ReleaseType::AsString ( ReleaseType::ESubMCRelease  submcrelease  ) 

Definition at line 681 of file ReleaseType.cxx.

References k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, Msg::kError, and MSG.

00681                                                                        {
00682   // Purpose: Convert enumerated submcrelease to string
00683   
00684   switch ( submcrelease ) {
00685 
00686   case k00:    return "00";
00687   case k01:    return "01";
00688   case k02:    return "02";
00689   case k03:    return "03";
00690   case k04:    return "04";
00691   case k05:    return "05";
00692   case k06:    return "06";
00693   case k07:    return "07";
00694   case k08:    return "08";
00695   case k09:    return "09";
00696   case k10:    return "10";
00697   default:
00698     MSG("Conv",Msg::kError) << "ReleaseType::AsString for unknown "
00699                             << "ESubMCRelease " << submcrelease 
00700                             << ". Fix method. Abort." << endl;
00701     abort();
00702   }
00703   
00704 }

const char * ReleaseType::AsString ( ReleaseType::EDataMCRelease  datamcrelease  ) 

Definition at line 631 of file ReleaseType.cxx.

References kAvocado, kBeet, kCarrot, kDaikon, kData, kEggplant, Msg::kError, kFava, kGarlic, kHops, kIceberg, kJicama, and MSG.

00631                                                                          {
00632   // Purpose: Convert enumerated datamcrelease to string
00633   
00634   switch ( datamcrelease ) {
00635 
00636   case kData:       return "Data";
00637   case kAvocado:    return "Avocado";
00638   case kBeet:       return "Beet";
00639   case kCarrot:     return "Carrot";
00640   case kDaikon:     return "Daikon";
00641   case kEggplant:   return "Eggplant";
00642   case kFava:       return "Fava";
00643   case kGarlic:     return "Garlic";
00644   case kHops:       return "Hops";
00645   case kIceberg:    return "Iceberg";
00646   case kJicama:     return "Jicama";
00647   default:
00648     MSG("Conv",Msg::kError) << "ReleaseType::AsString for unknown "
00649                             << "EDataMCRelease " << datamcrelease 
00650                             << ". Fix method. Abort." << endl;
00651     abort();
00652   }
00653   
00654 }

const char * ReleaseType::AsString ( ReleaseType::ESubRecoRelease  subrecorelease  ) 

Definition at line 580 of file ReleaseType.cxx.

References Msg::kError, kR00, kR01, kR02, kR03, kR04, kR05, kR06, kR07, kR08, kR09, kR10, and MSG.

00580                                                                           {
00581   // Purpose: Convert enumerated subrecorelease to string
00582   
00583   switch ( subrecorelease ) {
00584 
00585   case kR00:    return "00";
00586   case kR01:    return "01";
00587   case kR02:    return "02";
00588   case kR03:    return "03";
00589   case kR04:    return "04";
00590   case kR05:    return "05";
00591   case kR06:    return "06";
00592   case kR07:    return "07";
00593   case kR08:    return "08";
00594   case kR09:    return "09";
00595   case kR10:    return "10";
00596   default:
00597     MSG("Conv",Msg::kError) << "ReleaseType::AsString for unknown "
00598                             << "ESubRecoRelease " << subrecorelease 
00599                             << ". Fix method. Abort." << endl;
00600     abort();
00601   }
00602   
00603 }

const char * ReleaseType::AsString ( ReleaseType::ERecoRelease  recorelease  ) 

Definition at line 532 of file ReleaseType.cxx.

References kAsh, kBirch, kCedar, kDogwood, kElm, Msg::kError, kFir, kGinkgo, kHickory, kIvy, kJuniper, and MSG.

Referenced by MasterGeVPerMip::AddSet(), MuonRemovalInfoAna::Analyze(), AnalysisInfoAna::Analyze(), EnergyCorrections::CalibrationGroupEnergyCorrections(), ANtpInfoObjectFiller::FillEventInformation(), NuPIDInterface::InitialiseDpID(), Anp::FillMadId::Run(), MasterGeVPerMip::SelectSet(), and MasterGeVPerMip::SetExists().

00532                                                                     {
00533   // Purpose: Convert enumerated recorelease to string
00534   
00535   switch ( recorelease ) {
00536 
00537   case kAsh:      return "Ash";
00538   case kBirch:    return "Birch";
00539   case kCedar:    return "Cedar";
00540   case kDogwood:  return "Dogwood";
00541   case kElm:      return "Elm";
00542   case kFir:      return "Fir";
00543   case kGinkgo:   return "Ginkgo";
00544   case kHickory:  return "Hickory";
00545   case kIvy:      return "Ivy";
00546   case kJuniper:  return "Juniper";
00547   default:
00548     MSG("Conv",Msg::kError) << "ReleaseType::AsString for unknown "
00549                             << "ERecoRelease " << recorelease 
00550                             << ". Fix method. Abort." << endl;
00551     abort();
00552   }
00553   
00554 }

ReleaseType::Release_t ReleaseType::GetDataMCRelease ( const char *  mcreleasename  ) 

Definition at line 606 of file ReleaseType.cxx.

References kAvocado, kBeet, kCarrot, kDaikon, kData, kEggplant, kFava, kGarlic, kHops, kIceberg, kJicama, and kUnknown.

Referenced by GetProductionRelease().

00607                                                                           {
00608   // Purpose: Search for substring in datamcreleasename corresponding to
00609   //          an EDataMCRelease.  Returns EDataMCRelease if found, else
00610   //          kUnknown.
00611 
00612   TString tmpstr(datamcreleasename);
00613   tmpstr.ToLower();
00614   if ( strstr(tmpstr.Data(),"data") != 0 ) return kData;
00615   else if ( strstr(tmpstr.Data(),"avocado") != 0 ) return kAvocado;
00616   else if ( strstr(tmpstr.Data(),"beet") != 0 ) return kBeet;
00617   else if ( strstr(tmpstr.Data(),"carrot") != 0 ) return kCarrot;
00618   else if ( strstr(tmpstr.Data(),"daikon") != 0 ) return kDaikon;
00619   else if ( strstr(tmpstr.Data(),"eggplant") != 0 ) return kEggplant;
00620   else if ( strstr(tmpstr.Data(),"fava") != 0 ) return kFava;
00621   else if ( strstr(tmpstr.Data(),"garlic") != 0 ) return kGarlic;
00622   else if ( strstr(tmpstr.Data(),"hops") != 0 ) return kHops;
00623   else if ( strstr(tmpstr.Data(),"iceberg") != 0 ) return kIceberg;
00624   else if ( strstr(tmpstr.Data(),"jicama") != 0 ) return kJicama;
00625   return kUnknown;
00626   
00627 }

ReleaseType::Release_t ReleaseType::GetMCInfo ( int  type  ) 

Definition at line 127 of file ReleaseType.cxx.

References DataMCMask, and SubMCMask.

Referenced by NuAnalysis::ExtractConfig().

00127                                                     {
00128   return (type & (ReleaseType::DataMCMask + ReleaseType::SubMCMask));
00129 }

int ReleaseType::GetMCSubVersion ( int  type  ) 
ReleaseType::Release_t ReleaseType::GetProductionRelease ( const char *  prodreleasename  ) 

Definition at line 735 of file ReleaseType.cxx.

References GetDataMCRelease(), GetRecoRelease(), GetSubMCRelease(), GetSubRecoRelease(), GetTestFlag(), and kUnknown.

Referenced by RecJobRecord::GetProdReleaseType(), and reroot_configure().

00736                                                                        {
00737   // Purpose: Convert text string prodreleasename to release type.
00738   // Returns kUnknown if unknown.
00739   // If prodreleasename is from reco batch production, 
00740   // e.g. "dogwood2" or "dogwoodtest0", returns ReleaseType as combination of 
00741   // ERecoRelease, ESubReco, and ETestFlag.
00742   // If prodreleasename is from MC production, e.g. Daikon_00, returns
00743   // ReleaseType as combination of EDataMCRelease and ESubMCRelease.
00744 
00745   ReleaseType::Release_t result = kUnknown;
00746                                                             
00747   result = ReleaseType::GetRecoRelease(prodreleasename);
00748   
00749   if ( result != kUnknown ) {
00750     // Batch production. Add test flag.
00751     result |= ReleaseType::GetTestFlag(prodreleasename);
00752     // Add version
00753     std::string tmpstr = std::string(prodreleasename);
00754     //  char version = tmpstr[tmpstr.size()-1];
00755     char ver[3];  sprintf(ver, "0%c", tmpstr[tmpstr.size()-1]);
00756     ReleaseType::Release_t subver = ReleaseType::GetSubRecoRelease(ver);
00757     if ( subver != kUnknown ) result |= subver;
00758   }
00759   else {
00760     result = ReleaseType::GetDataMCRelease(prodreleasename);
00761     if ( result != kUnknown ) {
00762       // MC production.  Add version.
00763       ReleaseType::Release_t subver 
00764                               = ReleaseType::GetSubMCRelease(prodreleasename);
00765       if ( subver != kUnknown ) result |= subver;
00766     }
00767   }
00768   
00769   return result;
00770 }

ReleaseType::Release_t ReleaseType::GetRecoInfo ( int  type  ) 
ReleaseType::Release_t ReleaseType::GetRecoRelease ( const char *  recoreleasename  ) 

Definition at line 505 of file ReleaseType.cxx.

References kAsh, kBirch, kCedar, kDogwood, kElm, kFir, kGinkgo, kHickory, kIvy, kJuniper, kTest, and kUnknown.

Referenced by GetProductionRelease().

00506                                                                        {
00507   // Purpose: Convert text string recoreleasename to an ERecoRelease.
00508   // Returns kUnknown if unknown.
00509   ReleaseType::Release_t result = kUnknown;
00510 
00511   TString tmpstr(recoreleasename);
00512   tmpstr.ToLower();
00513   if ( strstr(tmpstr.Data(),"ash") != 0 )  result = kAsh;
00514   else if ( strstr(tmpstr.Data(),"birch") != 0 ) result = kBirch;
00515   else if ( strstr(tmpstr.Data(),"cedar") != 0 ) result = kCedar;
00516   else if ( strstr(tmpstr.Data(),"dogwood") != 0 ) result = kDogwood;
00517   else if ( strstr(tmpstr.Data(),"elm") != 0 ) result = kElm;
00518   else if ( strstr(tmpstr.Data(),"fir") != 0 ) result = kFir;
00519   else if ( strstr(tmpstr.Data(),"ginkgo") != 0 ) result = kGinkgo;
00520   else if ( strstr(tmpstr.Data(),"hickory") != 0 ) result = kHickory;
00521   else if ( strstr(tmpstr.Data(),"ivy") != 0 ) result = kIvy;
00522   else if ( strstr(tmpstr.Data(),"juniper") != 0 ) result = kJuniper;
00523 
00524   if(result == kUnknown) return result;
00525   
00526   if(strstr(tmpstr.Data(),"test") != 0) result |= kTest;
00527 
00528   return result;
00529 }

int ReleaseType::GetRecoSubVersion ( int  type  ) 

Definition at line 141 of file ReleaseType.cxx.

References SubRecoMask.

Referenced by AsBatchString(), AsString(), Anp::Header::GetRECOTYPE(), NueConvention::NueEnergyCorrection(), NueConvention::NueEnergyCorrectionNeverUseThisFunction(), and NuOutputWriter::OpenFile().

00142 {
00143    int temp = type & SubRecoMask;
00144    return temp/(SubRecoMask/0xF);
00145 }

ReleaseType::Release_t ReleaseType::GetSubMCRelease ( const char *  submcreleasename  ) 

Definition at line 657 of file ReleaseType.cxx.

References k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, and kUnknown.

Referenced by GetProductionRelease().

00658                                                                         {
00659   // Purpose: Search for substring in submcreleasename corresponding to
00660   //          an ESubMCRelease.  Returns matching ESubMCRelease if found,
00661   //          else kUnknown if no match.
00662 
00663   TString tmpstr(submcreleasename);
00664   tmpstr.ToLower();
00665   if ( strstr(tmpstr.Data(),"00") != 0 ) return k00;
00666   else if ( strstr(tmpstr.Data(),"01") != 0 ) return k01;
00667   else if ( strstr(tmpstr.Data(),"02") != 0 ) return k02;
00668   else if ( strstr(tmpstr.Data(),"03") != 0 ) return k03;
00669   else if ( strstr(tmpstr.Data(),"04") != 0 ) return k04;
00670   else if ( strstr(tmpstr.Data(),"05") != 0 ) return k05;
00671   else if ( strstr(tmpstr.Data(),"06") != 0 ) return k06;
00672   else if ( strstr(tmpstr.Data(),"07") != 0 ) return k07;
00673   else if ( strstr(tmpstr.Data(),"08") != 0 ) return k08;
00674   else if ( strstr(tmpstr.Data(),"09") != 0 ) return k09;
00675   else if ( strstr(tmpstr.Data(),"10") != 0 ) return k10;
00676   return kUnknown;
00677   
00678 }

ReleaseType::Release_t ReleaseType::GetSubRecoRelease ( const char *  subrecoreleasename  ) 

Definition at line 557 of file ReleaseType.cxx.

References kR00, kR01, kR02, kR03, kR04, kR05, kR06, kR07, kR08, kR09, kR10, and kUnknown.

Referenced by GetProductionRelease().

00558                                                                         {
00559   // Purpose: Search for substring in subrecoreleasename corresponding to
00560   //          an ESubRecoRelease code.  Returns kUnknown if no match.
00561 
00562   TString tmpstr(subrecoreleasename);
00563   tmpstr.ToLower();
00564   if ( strstr(tmpstr.Data(),"00") != 0 ) return kR00;
00565   else if ( strstr(tmpstr.Data(),"01") != 0 ) return kR01;
00566   else if ( strstr(tmpstr.Data(),"02") != 0 ) return kR02;
00567   else if ( strstr(tmpstr.Data(),"03") != 0 ) return kR03;
00568   else if ( strstr(tmpstr.Data(),"04") != 0 ) return kR04;
00569   else if ( strstr(tmpstr.Data(),"05") != 0 ) return kR05;
00570   else if ( strstr(tmpstr.Data(),"06") != 0 ) return kR06;
00571   else if ( strstr(tmpstr.Data(),"07") != 0 ) return kR07;
00572   else if ( strstr(tmpstr.Data(),"08") != 0 ) return kR08;
00573   else if ( strstr(tmpstr.Data(),"09") != 0 ) return kR09;
00574   else if ( strstr(tmpstr.Data(),"10") != 0 ) return kR10;
00575   return kUnknown;
00576   
00577 }

ReleaseType::Release_t ReleaseType::GetTestFlag ( const char *  testflagname  ) 

Definition at line 707 of file ReleaseType.cxx.

References kStandard, and kTest.

Referenced by GetProductionRelease().

00708 {
00709   // Purpose: Search for substring in testflagname corresponding to
00710   //          an ETestFlag.  Returns matching ETestFlag if found, else
00711   //          ETestFlag::kStandard.
00712 
00713   TString tmpstr(testflagname);
00714   tmpstr.ToLower();
00715   if ( strstr(tmpstr.Data(),"test") != 0 ) return kTest;
00716   return kStandard; // default
00717 
00718 }

std::string ReleaseType::GetVersionString ( int  val  ) 

Definition at line 219 of file ReleaseType.cxx.

Referenced by AsString().

00220 {
00221    char dum[4];
00222    sprintf(dum, "V%02d", val);
00223    std::string temp = dum;
00224    return temp;
00225 }

bool ReleaseType::IsAsh ( int  type  ) 

Definition at line 80 of file ReleaseType.cxx.

References kAsh, and RecoMask.

Referenced by AsBatchString(), and AsString().

00080                                  {
00081   return  ((type & ReleaseType::RecoMask) == ReleaseType::kAsh);
00082 }

bool ReleaseType::IsAvocado ( int  type  ) 

Definition at line 35 of file ReleaseType.cxx.

References DataMCMask, and kAvocado.

Referenced by AsBatchString(), and AsString().

00035                                     {
00036   return ((type & ReleaseType::DataMCMask) == ReleaseType::kAvocado);
00037 }

bool ReleaseType::IsBeet ( int  type  ) 

Definition at line 39 of file ReleaseType.cxx.

References DataMCMask, and kBeet.

Referenced by AsBatchString(), and AsString().

00039                                  {
00040   return ((type & ReleaseType::DataMCMask) == ReleaseType::kBeet);
00041 }

bool ReleaseType::IsBirch ( int  type  ) 
bool ReleaseType::IsCarrot ( int  type  ) 
bool ReleaseType::IsCedar ( int  type  ) 
bool ReleaseType::IsDaikon ( int  type  ) 
bool ReleaseType::IsData ( int  type  ) 
bool ReleaseType::IsDogwood ( int  type  ) 
bool ReleaseType::IsEggplant ( int  type  ) 

Definition at line 51 of file ReleaseType.cxx.

References DataMCMask, and kEggplant.

Referenced by AsBatchString(), and AsString().

00051                                      {
00052   return ((type & ReleaseType::DataMCMask) == ReleaseType::kEggplant);
00053 }

bool ReleaseType::IsElm ( int  type  ) 
bool ReleaseType::IsFava ( int  type  ) 

Definition at line 55 of file ReleaseType.cxx.

References DataMCMask, and kFava.

Referenced by AsBatchString(), and AsString().

00055                                  {
00056   return ((type & ReleaseType::DataMCMask) == ReleaseType::kFava);
00057 }

bool ReleaseType::IsFir ( int  type  ) 

Definition at line 100 of file ReleaseType.cxx.

References kFir, and RecoMask.

Referenced by AsBatchString(), AsString(), NuExtraction::ExtractShwInfo(), and NuReco::GetShowerEnergyCC().

00100                                  {
00101   return  ((type & ReleaseType::RecoMask) == ReleaseType::kFir);
00102 }

bool ReleaseType::IsGarlic ( int  type  ) 

Definition at line 59 of file ReleaseType.cxx.

References DataMCMask, and kGarlic.

Referenced by AsBatchString(), and AsString().

00059                                    {
00060   return ((type & ReleaseType::DataMCMask) == ReleaseType::kGarlic);
00061 }

bool ReleaseType::IsGinkgo ( int  type  ) 

Definition at line 104 of file ReleaseType.cxx.

References kGinkgo, and RecoMask.

Referenced by AsBatchString(), AsString(), NuExtraction::ExtractShwInfo(), and NuReco::GetShowerEnergyCC().

00104                                     {
00105   return  ((type & ReleaseType::RecoMask) == ReleaseType::kGinkgo);
00106 }

bool ReleaseType::IsHickory ( int  type  ) 

Definition at line 108 of file ReleaseType.cxx.

References kHickory, and RecoMask.

Referenced by AsBatchString(), AsString(), NuExtraction::ExtractShwInfo(), and NuReco::GetShowerEnergyCC().

00108                                      {
00109   return  ((type & ReleaseType::RecoMask) == ReleaseType::kHickory);
00110 }

bool ReleaseType::IsHops ( int  type  ) 

Definition at line 63 of file ReleaseType.cxx.

References DataMCMask, and kHops.

Referenced by AsBatchString(), and AsString().

00063                                  {
00064   return ((type & ReleaseType::DataMCMask) == ReleaseType::kHops);
00065 }

bool ReleaseType::IsIceberg ( int  type  ) 

Definition at line 67 of file ReleaseType.cxx.

References DataMCMask, and kIceberg.

Referenced by AsBatchString(), and AsString().

00067                                     {
00068   return ((type & ReleaseType::DataMCMask) == ReleaseType::kIceberg);
00069 }

bool ReleaseType::IsIvy ( int  type  ) 

Definition at line 112 of file ReleaseType.cxx.

References kIvy, and RecoMask.

Referenced by AsBatchString(), AsString(), NuExtraction::ExtractShwInfo(), and NuReco::GetShowerEnergyCC().

00112                                  {
00113   return  ((type & ReleaseType::RecoMask) == ReleaseType::kIvy);
00114 }

bool ReleaseType::IsJicama ( int  type  ) 

Definition at line 71 of file ReleaseType.cxx.

References DataMCMask, and kJicama.

Referenced by AsBatchString(), and AsString().

00071                                    {
00072   return ((type & ReleaseType::DataMCMask) == ReleaseType::kJicama);
00073 }

bool ReleaseType::IsJuniper ( int  type  ) 

Definition at line 116 of file ReleaseType.cxx.

References kJuniper, and RecoMask.

Referenced by AsBatchString(), AsString(), NuExtraction::ExtractShwInfo(), and NuReco::GetShowerEnergyCC().

00116                                      {
00117   return  ((type & ReleaseType::RecoMask) == ReleaseType::kJuniper);
00118 }

bool ReleaseType::IsMC ( int  type  ) 

Definition at line 25 of file ReleaseType.cxx.

References DataMCMask.

Referenced by AsBatchString(), AsString(), NCEventInfo::GetSKZPCalc(), and NCAnalysisCutsNC::IsGoodBeamEvent().

00025                                    { 
00026   return  ((type & ReleaseType::DataMCMask) > 0);
00027 }

bool ReleaseType::IsTest ( int  type  ) 

Definition at line 29 of file ReleaseType.cxx.

References RecoTestMask.

Referenced by AsBatchString(), and AsString().

00029                                      {
00030   return  ((type & ReleaseType::RecoTestMask) > 0);
00031 }

ReleaseType::Release_t ReleaseType::MakeReleaseType ( std::string  fTitle,
std::string  mcinfo = "" 
)

Definition at line 310 of file ReleaseType.cxx.

References k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, kBirch, kCarrot, kCedar, kCedarPhy, kDaikon, kData, kR1_24_1, kR1_24_2, kR1_24_3, kR1_24_Cal, and kUnknown.

Referenced by MNtpModule::Ana(), MadTVAnalysis::CreatePAN(), and NtpStRecord::GetRelease().

00311          : Deprecated from R1.28 on, meaning should not be used for
00312 //Dogwood and more modern releases.
00313 
00314 //  string relName = NtpStRecord->GetTitle();
00315 //  string mcinfo =  NtpStRecord->mchdr.geninfo.codename;
00316 /*
00317     Suggested Usage with NtpStRecord str;
00318 
00319     string relName = str->GetTitle();
00320     string mcinfo = "";
00321     if(vc.GetSimFlag() == SimFlag::kMC){
00322        mcinfo = "Carrot";
00323        string temp = str->mchdr.geninfo.codename;
00324        if(temp.size() != 0){   mcinfo = temp;  }
00325     }
00326     release = ReleaseType::MakeReleaseType(relName, mcinfo);
00327 */
00328 {
00329    string relName = fTitle;
00330    string reco = relName.substr(0,relName.find_first_of("("));
00331    ReleaseType::Release_t release = ReleaseType::kUnknown;
00332 
00333    //Setting for dealing with Cedar and Cedar Variants
00334    if(strstr(reco.c_str(), "CEDAR") != 0 || 
00335        strstr(reco.c_str(), "CHERRY") != 0 ){
00336 
00337       if(reco == "CEDAR"){
00338          release = ReleaseType::kCedar;   //Fine for Data or Carrot
00339          string temp = relName.substr(22,1);
00340          if(temp == "1") release = ReleaseType::kR1_24_1;
00341       }
00342 
00343       if(reco == "CEDAR_PHY"){
00344          release = ReleaseType::kCedarPhy;
00345          if(strstr(fTitle.c_str(), "Daikon") != 0)   release = ReleaseType::kR1_24_2;
00346 
00347          std::string software = relName.substr(relName.find_first_of(":")+1,
00348                relName.find_first_of(",") - relName.find_first_of(":") - 1);
00349 
00350          if(software == "R1.24.2") release = ReleaseType::kR1_24_2;
00351          if(software == "R1.24.3") release = ReleaseType::kR1_24_3;
00352 
00353       }
00354 
00355       if(reco == "CHERRY") release = ReleaseType::kR1_24_Cal;
00356    }
00357    else release = ReleaseType::kBirch;
00358 
00359 
00360    //Setting Data/MC version
00361    if(mcinfo.size() > 0){
00362      if(strstr(mcinfo.c_str(), "daikon") != 0)
00363         release += ReleaseType::kDaikon;
00364      else
00365         release += ReleaseType::kCarrot;
00366                                                                                 
00367      if(strstr(mcinfo.c_str(), "00") != 0) release += ReleaseType::k00;
00368      if(strstr(mcinfo.c_str(), "01") != 0) release += ReleaseType::k01;
00369      if(strstr(mcinfo.c_str(), "02") != 0) release += ReleaseType::k02;
00370      if(strstr(mcinfo.c_str(), "03") != 0) release += ReleaseType::k03;
00371      if(strstr(mcinfo.c_str(), "04") != 0) release += ReleaseType::k04;
00372      if(strstr(mcinfo.c_str(), "05") != 0) release += ReleaseType::k05;
00373      if(strstr(mcinfo.c_str(), "06") != 0) release += ReleaseType::k06;
00374      if(strstr(mcinfo.c_str(), "07") != 0) release += ReleaseType::k07;
00375      if(strstr(mcinfo.c_str(), "08") != 0) release += ReleaseType::k08;
00376      if(strstr(mcinfo.c_str(), "09") != 0) release += ReleaseType::k09;
00377    }
00378    else
00379      release += ReleaseType::kData;
00380  
00381   return release;
00382 }

ReleaseType::Release_t ReleaseType::StringToType ( const char *  nameChar  ) 

Definition at line 228 of file ReleaseType.cxx.

References k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, kAsh, kAvocado, kBeet, kBirch, kCarrot, kCedar, kDaikon, kData, kDogwood, kEggplant, kElm, kFava, kFir, kGarlic, kGinkgo, kHickory, kHops, kIceberg, kIvy, kJicama, kJuniper, kR00, kR01, kR02, kR03, kR04, kR05, kR06, kR07, kR08, kR09, kR10, kTest, and kUnknown.

Referenced by MicroDSTMaker::ExtractNCCC(), NCEventInfo::FindMEGAFitWeight(), NCEventInfo::FindNeugenWeight(), NCAnalysisCuts::GetReleaseType(), NCEventInfo::GetShowerEnergy(), NCEventInfo::GetSKZPCalc(), and NCEventInfo::GetTrackEnergy().

00228                                                                   {
00229   string name(nameChar);
00230   Release_t type = 0x00;
00231 
00232   string dmc = name.substr(1+name.find(" "));
00233   if(dmc.find("Data") != string::npos) type += kData;
00234 
00235   // Now could just check the first letter if speed is an issue.
00236   else if(dmc.find("Avocado") != string::npos ) type += kAvocado;
00237   else if(dmc.find("Beet") != string::npos) type += kBeet;
00238   else if(dmc.find("Carrot") != string::npos) type += kCarrot;
00239   else if(dmc.find("Daikon") != string::npos) type += kDaikon;
00240   else if(dmc.find("Eggplant") != string::npos) type += kEggplant;
00241   else if(dmc.find("Fava") != string::npos) type += kFava;
00242   else if(dmc.find("Garlic") != string::npos) type += kGarlic;
00243   else if(dmc.find("Hops") != string::npos) type += kHops;
00244   else if(dmc.find("Iceberg") != string::npos) type += kIceberg;
00245   else if(dmc.find("Jicama") != string::npos) type += kJicama;
00246   // No good way to treat "unknown MC"; leave it as "kUnknown"
00247   else type = kUnknown;
00248 
00249   string dmcver = dmc.substr(1 + dmc.find_last_of("V"));
00250   if(dmcver.find("00") != string::npos) type += k00;  
00251   else if(dmcver.find("01") != string::npos) type += k01;
00252   else if(dmcver.find("02") != string::npos) type += k02;
00253   else if(dmcver.find("03") != string::npos) type += k03;
00254   else if(dmcver.find("04") != string::npos) type += k04; 
00255   else if(dmcver.find("05") != string::npos) type += k05;
00256   else if(dmcver.find("06") != string::npos) type += k06;
00257   else if(dmcver.find("07") != string::npos) type += k07;
00258   else if(dmcver.find("08") != string::npos) type += k08;
00259   else if(dmcver.find("09") != string::npos) type += k09;
00260   else if(dmcver.find("10") != string::npos) type += k10;
00261   else type += k00;
00262 
00263   string reco = name.substr(0, name.find(" "));
00264   if( type != kUnknown ){
00265     if (reco.find("Ash") != string::npos) type += kAsh;
00266     else if (reco.find("Birch") != string::npos) type += kBirch;
00267     else if (reco.find("Cedar") != string::npos){
00268       if(reco.find("CedarPhy") != string::npos) type += kCedar;
00269       else if(reco.find("Cedar_Phy") != string::npos) type += kCedar;
00270       else type += kCedar;
00271     }else if (reco.find("Dogwood") != string::npos){ 
00272       if     (reco.find("Dogwood0") != string::npos) type += kDogwood;
00273       else if(reco.find("Dogwood1") != string::npos) type += kDogwood;
00274       else if(reco.find("Dogwood2") != string::npos) type += kDogwood;
00275       else if(reco.find("Dogwood3") != string::npos) type += kDogwood;
00276       else if(reco.find("Dogwood4") != string::npos) type += kDogwood;
00277       else if(reco.find("Dogwood5") != string::npos) type += kDogwood;
00278       else if(reco.find("Dogwood6") != string::npos) type += kDogwood;
00279       else if(reco.find("Dogwood7") != string::npos) type += kDogwood;
00280       else type += kDogwood;
00281     }else if (reco.find("Elm") != string::npos) type += kElm;
00282     else if (reco.find("Fir") != string::npos) type += kFir;
00283     else if (reco.find("Ginkgo") != string::npos) type += kGinkgo;
00284     else if (reco.find("Hickory") != string::npos) type += kHickory;
00285     else if (reco.find("Ivy") != string::npos) type += kIvy;
00286     else if (reco.find("Juniper") != string::npos) type += kJuniper;
00287 
00288     if(name.find("Test")  != string::npos) type += kTest;
00289 
00290     // Unknown reconstruction is possible; just leave that bit 0.
00291 
00292     string rver = reco.substr(1 + reco.find_last_of("V"));
00293     if(rver.find("00") != string::npos) type += kR00;
00294     else if(rver.find("01") != string::npos) type += kR01;
00295     else if(rver.find("02") != string::npos) type += kR02;
00296     else if(rver.find("03") != string::npos) type += kR03;
00297     else if(rver.find("04") != string::npos) type += kR04;
00298     else if(rver.find("05") != string::npos) type += kR05;
00299     else if(rver.find("06") != string::npos) type += kR06;
00300     else if(rver.find("07") != string::npos) type += kR07;
00301     else if(rver.find("08") != string::npos) type += kR08;
00302     else if(rver.find("09") != string::npos) type += kR09;
00303     else if(rver.find("10") != string::npos) type += kR10;
00304     else type += kR00;
00305   }  // if (a known dmc type)
00306   
00307   return type;
00308 }


Variable Documentation

const Release_t ReleaseType::kBirchCarrot = kBirch | kCarrot [static]

Definition at line 246 of file ReleaseType.h.

const Release_t ReleaseType::kBirchData = kBirch | kData [static]

Definition at line 245 of file ReleaseType.h.

const Release_t ReleaseType::kCedar_Phy = kCedar | kR02 [static]

Definition at line 257 of file ReleaseType.h.

Referenced by MasterGeVPerMip::MasterGeVPerMip().

const Release_t ReleaseType::kCedar_PhyData = kCedar | kR02 | kData [static]

Definition at line 261 of file ReleaseType.h.

const Release_t ReleaseType::kCedarCarrot = kCedar | kCarrot [static]

Definition at line 248 of file ReleaseType.h.

Referenced by ANtpInfoObjectFiller::FillEventInformation().

const Release_t ReleaseType::kCedarDaikon = kCedar | kDaikon [static]

Definition at line 249 of file ReleaseType.h.

Referenced by NuDemoModule::Ana(), and ANtpInfoObjectFiller::FillEventInformation().

const Release_t ReleaseType::kCedarData = kCedar | kData [static]

Definition at line 247 of file ReleaseType.h.

Referenced by ANtpInfoObjectFiller::FillEventInformation().

const Release_t ReleaseType::kCedarPhy = kCedar | kR02 [static]
const Release_t ReleaseType::kCedarPhyDaikon = kCedarPhy | kDaikon [static]

Definition at line 262 of file ReleaseType.h.

Referenced by MergeEvent::Reco().

const Release_t ReleaseType::kCedarPhyData = kCedar | kR02 | kData [static]

Definition at line 260 of file ReleaseType.h.

const Release_t ReleaseType::kDogwood0 = kDogwood | kR00 [static]

Definition at line 273 of file ReleaseType.h.

const Release_t ReleaseType::kDogwood0Daikon = kDogwood | kR00 | kDaikon [static]

Definition at line 283 of file ReleaseType.h.

const Release_t ReleaseType::kDogwood0Data = kDogwood | kR00 | kData [static]

Definition at line 282 of file ReleaseType.h.

const Release_t ReleaseType::kDogwood0Garlic = kDogwood | kR00 | kGarlic [static]

Definition at line 284 of file ReleaseType.h.

const Release_t ReleaseType::kDogwood0Hops = kDogwood | kR00 | kHops [static]

Definition at line 285 of file ReleaseType.h.

const Release_t ReleaseType::kDogwood1 = kDogwood | kR01 [static]

Definition at line 274 of file ReleaseType.h.

Referenced by AsString(), and MasterGeVPerMip::MasterGeVPerMip().

const Release_t ReleaseType::kDogwood1Daikon = kDogwood | kR01 | kDaikon [static]

Definition at line 288 of file ReleaseType.h.

const Release_t ReleaseType::kDogwood1Data = kDogwood | kR01 | kData [static]

Definition at line 287 of file ReleaseType.h.

const Release_t ReleaseType::kDogwood1Garlic = kDogwood | kR01 | kGarlic [static]

Definition at line 289 of file ReleaseType.h.

const Release_t ReleaseType::kDogwood1Hops = kDogwood | kR01 | kHops [static]

Definition at line 290 of file ReleaseType.h.

const Release_t ReleaseType::kDogwood2 = kDogwood | kR02 [static]

Definition at line 275 of file ReleaseType.h.

Referenced by AsString(), and MasterGeVPerMip::MasterGeVPerMip().

const Release_t ReleaseType::kDogwood2Daikon = kDogwood | kR02 | kDaikon [static]

Definition at line 293 of file ReleaseType.h.

const Release_t ReleaseType::kDogwood2Data = kDogwood | kR02 | kData [static]

Definition at line 292 of file ReleaseType.h.

const Release_t ReleaseType::kDogwood2Garlic = kDogwood | kR02 | kGarlic [static]

Definition at line 294 of file ReleaseType.h.

const Release_t ReleaseType::kDogwood2Hops = kDogwood | kR02 | kHops [static]

Definition at line 295 of file ReleaseType.h.

const Release_t ReleaseType::kDogwood3 = kDogwood | kR03 [static]

Definition at line 276 of file ReleaseType.h.

Referenced by AsString(), and MasterGeVPerMip::MasterGeVPerMip().

const Release_t ReleaseType::kDogwood3Daikon = kDogwood | kR03 | kDaikon [static]

Definition at line 298 of file ReleaseType.h.

const Release_t ReleaseType::kDogwood3Data = kDogwood | kR03 | kData [static]

Definition at line 297 of file ReleaseType.h.

const Release_t ReleaseType::kDogwood3Garlic = kDogwood | kR03 | kGarlic [static]

Definition at line 299 of file ReleaseType.h.

const Release_t ReleaseType::kDogwood3Hops = kDogwood | kR03 | kHops [static]

Definition at line 300 of file ReleaseType.h.

const Release_t ReleaseType::kDogwood4 = kDogwood | kR04 [static]

Definition at line 277 of file ReleaseType.h.

Referenced by AsString(), and MasterGeVPerMip::MasterGeVPerMip().

const Release_t ReleaseType::kDogwood4Daikon = kDogwood | kR04 | kDaikon [static]

Definition at line 303 of file ReleaseType.h.

const Release_t ReleaseType::kDogwood4Data = kDogwood | kR04 | kData [static]

Definition at line 302 of file ReleaseType.h.

const Release_t ReleaseType::kDogwood4Garlic = kDogwood | kR04 | kGarlic [static]

Definition at line 304 of file ReleaseType.h.

const Release_t ReleaseType::kDogwood4Hops = kDogwood | kR04 | kHops [static]

Definition at line 305 of file ReleaseType.h.

const Release_t ReleaseType::kDogwood5 = kDogwood | kR05 [static]

Definition at line 278 of file ReleaseType.h.

Referenced by AsString(), and MasterGeVPerMip::MasterGeVPerMip().

const Release_t ReleaseType::kDogwood5Daikon = kDogwood | kR05 | kDaikon [static]

Definition at line 308 of file ReleaseType.h.

const Release_t ReleaseType::kDogwood5Data = kDogwood | kR05 | kData [static]

Definition at line 307 of file ReleaseType.h.

const Release_t ReleaseType::kDogwood5Garlic = kDogwood | kR05 | kGarlic [static]

Definition at line 309 of file ReleaseType.h.

const Release_t ReleaseType::kDogwood5Hops = kDogwood | kR05 | kHops [static]

Definition at line 310 of file ReleaseType.h.

const Release_t ReleaseType::kDogwood6 = kDogwood | kR06 [static]

Definition at line 279 of file ReleaseType.h.

Referenced by AsString(), and MasterGeVPerMip::MasterGeVPerMip().

const Release_t ReleaseType::kDogwood7 = kDogwood | kR07 [static]

Definition at line 280 of file ReleaseType.h.

Referenced by AsString(), and MasterGeVPerMip::MasterGeVPerMip().

const Release_t ReleaseType::kDogwood7Daikon = kDogwood | kR07 | kDaikon [static]

Definition at line 313 of file ReleaseType.h.

const Release_t ReleaseType::kDogwood7Data = kDogwood | kR07 | kData [static]

Definition at line 312 of file ReleaseType.h.

const Release_t ReleaseType::kDogwood7Garlic = kDogwood | kR07 | kGarlic [static]

Definition at line 314 of file ReleaseType.h.

const Release_t ReleaseType::kDogwood7Hops = kDogwood | kR07 | kHops [static]

Definition at line 315 of file ReleaseType.h.

const Release_t ReleaseType::kElm0Daikon = kElm | kR00 | kDaikon [static]

Definition at line 318 of file ReleaseType.h.

const Release_t ReleaseType::kElm0Data = kElm | kR00 | kData [static]

Definition at line 317 of file ReleaseType.h.

const Release_t ReleaseType::kElm0Garlic = kElm | kR00 | kGarlic [static]

Definition at line 319 of file ReleaseType.h.

const Release_t ReleaseType::kElm0Hops = kElm | kR00 | kHops [static]

Definition at line 320 of file ReleaseType.h.

const Release_t ReleaseType::kElm1Daikon = kElm | kR01 | kDaikon [static]

Definition at line 323 of file ReleaseType.h.

const Release_t ReleaseType::kElm1Data = kElm | kR01 | kData [static]

Definition at line 322 of file ReleaseType.h.

const Release_t ReleaseType::kElm1Garlic = kElm | kR01 | kGarlic [static]

Definition at line 324 of file ReleaseType.h.

const Release_t ReleaseType::kElm1Hops = kElm | kR01 | kHops [static]

Definition at line 325 of file ReleaseType.h.

const Release_t ReleaseType::kElm2Daikon = kElm | kR02 | kDaikon [static]

Definition at line 328 of file ReleaseType.h.

const Release_t ReleaseType::kElm2Data = kElm | kR02 | kData [static]

Definition at line 327 of file ReleaseType.h.

const Release_t ReleaseType::kElm2Garlic = kElm | kR02 | kGarlic [static]

Definition at line 329 of file ReleaseType.h.

const Release_t ReleaseType::kElm2Hops = kElm | kR02 | kHops [static]

Definition at line 330 of file ReleaseType.h.

const Release_t ReleaseType::kElm3Daikon = kElm | kR03 | kDaikon [static]

Definition at line 333 of file ReleaseType.h.

const Release_t ReleaseType::kElm3Data = kElm | kR03 | kData [static]

Definition at line 332 of file ReleaseType.h.

const Release_t ReleaseType::kElm3Garlic = kElm | kR03 | kGarlic [static]

Definition at line 334 of file ReleaseType.h.

const Release_t ReleaseType::kElm3Hops = kElm | kR03 | kHops [static]

Definition at line 335 of file ReleaseType.h.

const Release_t ReleaseType::kR1_24_0 = kCedar | kR00 [static]

Definition at line 251 of file ReleaseType.h.

const Release_t ReleaseType::kR1_24_1 = kCedar | kR01 [static]
const Release_t ReleaseType::kR1_24_2 = kCedar | kR02 [static]
const Release_t ReleaseType::kR1_24_3 = kCedar | kR03 [static]
const Release_t ReleaseType::kR1_24_Cal = kCedar | kR08 [static]
const Release_t ReleaseType::kR1_24_CalB = kCedar | kR09 [static]

Definition at line 255 of file ReleaseType.h.

const Release_t ReleaseType::kR2_0_0 = kDogwood | kR00 [static]

Definition at line 264 of file ReleaseType.h.

const Release_t ReleaseType::kR2_0_1 = kDogwood | kR01 [static]

Definition at line 265 of file ReleaseType.h.

Referenced by AsString().

const Release_t ReleaseType::kR2_0_2 = kDogwood | kR02 [static]

Definition at line 266 of file ReleaseType.h.

Referenced by AsString().

const Release_t ReleaseType::kR2_0_3 = kDogwood | kR03 [static]

Definition at line 267 of file ReleaseType.h.

Referenced by AsString().

const Release_t ReleaseType::kR2_0_4 = kDogwood | kR04 [static]

Definition at line 268 of file ReleaseType.h.

Referenced by AsString().

const Release_t ReleaseType::kR2_0_5 = kDogwood | kR05 [static]

Definition at line 269 of file ReleaseType.h.

Referenced by AsString().

const Release_t ReleaseType::kR2_0_6 = kDogwood | kR06 [static]

Definition at line 270 of file ReleaseType.h.

const Release_t ReleaseType::kR2_0_7 = kDogwood | kR07 [static]

Definition at line 271 of file ReleaseType.h.

Referenced by AsString().


Generated on 24 Jul 2018 for loon by  doxygen 1.6.1