Typedefs | Enumerations | Functions
TrkPoint Namespace Reference

Typedefs

typedef enum TrkPoint::ETrkPoint TrkPoint_t
 

Enumerations

enum  ETrkPoint {
  kTarget = 1, kTargetExit = 2, kTargetEndPlane = 3, kHorn1Enter = 11,
  kHorn1NeckPlane = 12, kHorn1Exit = 13, kHorn1EndPlane = 14, kHorn2Enter = 21,
  kHorn2NeckPlane = 22, kHorn2Exit = 23, kHorn2EndPlane = 24, kDPipeEnter = 31,
  kDPipeExit = 32, kUnknown = -99
}
 

Functions

TrkPoint_t StringToEnum (const std::string &trkpt)
 
TrkPoint_t IntToEnum (int trkpt)
 
std::string IntToString (int trkpt)
 
int StringToInt (const std::string &trkpt)
 
std::string AsString (TrkPoint_t trkpt)
 
std::string AsLabel (TrkPoint_t trkpt)
 
int AsInt (TrkPoint_t trkpt)
 
bool Overlap (const TrkPoint_t lhs, const TrkPoint_t rhs)
 

Typedef Documentation

Enumeration Type Documentation

Enumerator
kTarget 
kTargetExit 
kTargetEndPlane 
kHorn1Enter 
kHorn1NeckPlane 
kHorn1Exit 
kHorn1EndPlane 
kHorn2Enter 
kHorn2NeckPlane 
kHorn2Exit 
kHorn2EndPlane 
kDPipeEnter 
kDPipeExit 
kUnknown 

Definition at line 25 of file LBNEDataNtp_t.hh.

Function Documentation

int TrkPoint::AsInt ( TrkPoint_t  trkpt)

Definition at line 569 of file LBNEDataNtp_t.cc.

570 {
571  switch (trkpt)
572  {
573  case kTarget : return 1; break;
574  case kTargetExit : return 2; break;
575  case kTargetEndPlane : return 3; break;
576  case kHorn1Enter : return 11; break;
577  case kHorn1NeckPlane : return 12; break;
578  case kHorn1Exit : return 13; break;
579  case kHorn1EndPlane : return 14; break;
580  case kHorn2Enter : return 21; break;
581  case kHorn2NeckPlane : return 22; break;
582  case kHorn2Exit : return 23; break;
583  case kHorn2EndPlane : return 24; break;
584  case kDPipeEnter : return 31; break;
585  case kDPipeExit : return 32; break;
586  case kUnknown : return -99; break;
587  default : return -99; break;
588  }
589 }
std::string TrkPoint::AsLabel ( TrkPoint_t  trkpt)

Definition at line 545 of file LBNEDataNtp_t.cc.

546 {
547  switch (trkpt)
548  {
549  case kTarget : return "Target"; break;
550  case kTargetExit : return "TargetExit"; break;
551  case kTargetEndPlane : return "TargetEndPlane"; break;
552  case kHorn1Enter : return "Horn1Enter"; break;
553  case kHorn1NeckPlane : return "Horn1NeckPlane"; break;
554  case kHorn1Exit : return "Horn1Exit"; break;
555  case kHorn1EndPlane : return "Horn1EndPlane"; break;
556  case kHorn2Enter : return "Horn2Enter"; break;
557  case kHorn2NeckPlane : return "Horn2NeckPlane"; break;
558  case kHorn2Exit : return "Horn2Exit"; break;
559  case kHorn2EndPlane : return "Horn2EndPlane"; break;
560  case kDPipeEnter : return "DPipeEnter"; break;
561  case kDPipeExit : return "DPipeExit"; break;
562  case kUnknown : return "Unknown"; break;
563  default : return "Unknown"; break;
564  }
565 
566 }
std::string TrkPoint::AsString ( TrkPoint_t  trkpt)

Definition at line 522 of file LBNEDataNtp_t.cc.

523 {
524  switch (trkpt)
525  {
526  case kTarget : return "Target"; break;
527  case kTargetExit : return "TargetExit"; break;
528  case kTargetEndPlane : return "TargetEndPlane"; break;
529  case kHorn1Enter : return "Horn1Enter"; break;
530  case kHorn1NeckPlane : return "Horn1NeckPlane"; break;
531  case kHorn1Exit : return "Horn1Exit"; break;
532  case kHorn1EndPlane : return "Horn1EndPlane"; break;
533  case kHorn2Enter : return "Horn2Enter"; break;
534  case kHorn2NeckPlane : return "Horn2NeckPlane"; break;
535  case kHorn2Exit : return "Horn2Exit"; break;
536  case kHorn2EndPlane : return "Horn2EndPlane"; break;
537  case kDPipeEnter : return "DPipeEnter"; break;
538  case kDPipeExit : return "DPipeExit"; break;
539  case kUnknown : return "Unknown"; break;
540  default : return "Unknown"; break;
541  }
542 }
TrkPoint::TrkPoint_t TrkPoint::IntToEnum ( int  trkpt)

Definition at line 486 of file LBNEDataNtp_t.cc.

487 {
488 //returns enum
489  switch (trkpt)
490  {
491  case 1: return kTarget; break;
492  case 2: return kTargetExit; break;
493  case 3: return kTargetEndPlane; break;
494  case 11: return kHorn1Enter; break;
495  case 12: return kHorn1NeckPlane; break;
496  case 13: return kHorn1Exit; break;
497  case 14: return kHorn1EndPlane; break;
498  case 21: return kHorn2Enter; break;
499  case 22: return kHorn2NeckPlane; break;
500  case 23: return kHorn2Exit; break;
501  case 24: return kHorn2EndPlane; break;
502  case 31: return kDPipeEnter; break;
503  case 32: return kDPipeExit; break;
504  case -99: return kUnknown; break;
505  default: return kUnknown; break;
506  }
507 }
std::string TrkPoint::IntToString ( int  trkpt)

Definition at line 510 of file LBNEDataNtp_t.cc.

511 {
513 }
std::string AsString(TrkPoint_t trkpt)
TrkPoint_t IntToEnum(int trkpt)
bool TrkPoint::Overlap ( const TrkPoint_t  lhs,
const TrkPoint_t  rhs 
)

Definition at line 592 of file LBNEDataNtp_t.cc.

593 {
594  if(lhs == kUnknown || rhs == kUnknown)
595  {
596  std::cout << "LBNEDataNtp_t.cxx: TrkPoint::Overlap - TrkPoint is kUnknown." << std::endl;
597  return false;
598  }
599 
600  if(lhs == rhs)
601  {
602  return true;
603  }
604  else
605  return false;
606 
607 }
QTextStream & endl(QTextStream &s)
TrkPoint::TrkPoint_t TrkPoint::StringToEnum ( const std::string trkpt)

Definition at line 465 of file LBNEDataNtp_t.cc.

466 {
467  if (trkpt == TrkPoint::AsString(TrkPoint::kTarget) || trkpt == "kTarget") return kTarget;
468  else if (trkpt == TrkPoint::AsString(TrkPoint::kTargetExit) || trkpt == "kTargetExit") return kTargetExit;
469  else if (trkpt == TrkPoint::AsString(TrkPoint::kTargetEndPlane) || trkpt == "kTargetEndPlane") return kTargetEndPlane;
470  else if (trkpt == TrkPoint::AsString(TrkPoint::kHorn1Enter) || trkpt == "kHorn1Enter") return kHorn1Enter;
471  else if (trkpt == TrkPoint::AsString(TrkPoint::kHorn1NeckPlane) || trkpt == "kHorn1NeckPlane") return kHorn1NeckPlane;
472  else if (trkpt == TrkPoint::AsString(TrkPoint::kHorn1Exit) || trkpt == "kHorn1Exit") return kHorn1Exit;
473  else if (trkpt == TrkPoint::AsString(TrkPoint::kHorn1EndPlane) || trkpt == "kHorn1EndPlane") return kHorn1EndPlane;
474  else if (trkpt == TrkPoint::AsString(TrkPoint::kHorn2Enter) || trkpt == "kHorn2Enter") return kHorn2Enter;
475  else if (trkpt == TrkPoint::AsString(TrkPoint::kHorn2NeckPlane) || trkpt == "kHorn2NeckPlane") return kHorn2NeckPlane;
476  else if (trkpt == TrkPoint::AsString(TrkPoint::kHorn2Exit) || trkpt == "kHorn2Exit") return kHorn2Exit;
477  else if (trkpt == TrkPoint::AsString(TrkPoint::kHorn2EndPlane) || trkpt == "kHorn2EndPlane") return kHorn2EndPlane;
478  else if (trkpt == TrkPoint::AsString(TrkPoint::kDPipeEnter) || trkpt == "kDPipeEnter") return kDPipeEnter;
479  else if (trkpt == TrkPoint::AsString(TrkPoint::kDPipeExit) || trkpt == "kDPipeExit") return kDPipeExit;
480 
481  else if (trkpt == TrkPoint::AsString(TrkPoint::kUnknown) || trkpt == "kUnknown") return kUnknown;
482  else return kUnknown;
483 }
std::string AsString(TrkPoint_t trkpt)
int TrkPoint::StringToInt ( const std::string trkpt)

Definition at line 516 of file LBNEDataNtp_t.cc.

517 {
519 }
int AsInt(TrkPoint_t trkpt)
TrkPoint_t StringToEnum(const std::string &trkpt)