EvtCyclic3 Namespace Reference


Enumerations

enum  Index { A = 0, B = 1, C = 2 }
enum  Pair {
  BC = 0, CB = BC, CA = 1, AC = CA,
  AB = 2, BA = AB
}
enum  Perm {
  ABC = 0, BCA = 1, CAB = 2, CBA = 3,
  BAC = 4, ACB = 5
}

Functions

Index permute (Index i, Perm p)
Perm permutation (Index i1, Index i2, Index i3)
Perm permute (Perm i, Perm p)
Pair permute (Pair i, Perm p)
Pair i2pair (int i)
Index prev (Index i)
Index next (Index i)
Index other (Index i, Index j)
Pair other (Index i)
Pair combine (Index i, Index j)
Pair prev (Pair i)
Pair next (Pair i)
Pair other (Pair i, Pair j)
Index first (Pair i)
Index second (Pair i)
Index other (Pair i)
Index common (Pair i, Pair j)
Index strToIndex (const char *str)
Pair strToPair (const char *str)
char * c_str (Index i)
char * c_str (Pair i)
char * c_str (Perm p)
char * append (const char *str, EvtCyclic3::Index i)
char * append (const char *str, EvtCyclic3::Pair i)


Enumeration Type Documentation

enum EvtCyclic3::Index

Enumerator:
A 
B 
C 

Definition at line 20 of file EvtCyclic3.hh.

00020 {A=0,B=1,C=2};

enum EvtCyclic3::Pair

Enumerator:
BC 
CB 
CA 
AC 
AB 
BA 

Definition at line 21 of file EvtCyclic3.hh.

00021 {BC=0,CB=BC,CA=1,AC=CA,AB=2,BA=AB}; 

enum EvtCyclic3::Perm

Enumerator:
ABC 
BCA 
CAB 
CBA 
BAC 
ACB 

Definition at line 22 of file EvtCyclic3.hh.

00022 {ABC=0,BCA=1,CAB=2,CBA=3,BAC=4,ACB=5};


Function Documentation

Index EvtCyclic3::permute ( Index  i,
Perm  p 
)

Definition at line 20 of file EvtCyclic3.cc.

References A, ABC, ACB, B, BAC, BCA, C, CAB, and CBA.

Referenced by permute().

00021 {
00022   if(p == ABC) return i;
00023   else if(p == BCA) {
00024     if(i == A) return C;
00025     else if(i == B) return A;
00026     else if(i == C) return B;
00027   }
00028   else if(p == BCA) {
00029     if(i == A) return C;
00030     else if(i == B) return A;
00031     else if(i == C) return B;
00032   }
00033   else if(p == CAB) {
00034     if(i == A) return B;
00035     else if(i == B) return C;
00036     else if(i == C) return A;
00037   }
00038   else if(p == CBA) {
00039     if(i == A) return C;
00040     else if(i == B) return B;
00041     else if(i == C) return A;
00042   }
00043   else if(p == BAC) {
00044     if(i == A) return B;
00045     else if(i == B) return A;
00046     else if(i == C) return C;
00047   }
00048   else if(p == ACB) {
00049     if(i == A) return A;
00050     else if(i == B) return C;
00051     else if(i == C) return B;
00052   }
00053   return A;
00054 }

Perm EvtCyclic3::permutation ( Index  i1,
Index  i2,
Index  i3 
)

Definition at line 56 of file EvtCyclic3.cc.

References A, ABC, ACB, B, BAC, BCA, C, CAB, and CBA.

Referenced by permute().

00057 {
00058   assert(i1 != i2  && i2 != i3 && i3 != i1);
00059   if(i1 == A) return (i2 == B) ? ABC : ACB;
00060   if(i1 == B) return (i2 == C) ? BCA : BAC;
00061   if(i1 == C) return (i2 == A) ? CAB : CBA;
00062   return ABC;
00063 }

Perm EvtCyclic3::permute ( Perm  i,
Perm  p 
)

Definition at line 66 of file EvtCyclic3.cc.

References A, B, C, permutation(), and permute().

00067 {
00068   Index i1 = permute(permute(A,i),p);
00069   Index i2 = permute(permute(B,i),p);
00070   Index i3 = permute(permute(C,i),p);
00071 
00072   return permutation(i1,i2,i3);
00073 }

Pair EvtCyclic3::permute ( Pair  i,
Perm  p 
)

Definition at line 75 of file EvtCyclic3.cc.

References combine(), first(), permute(), and second().

00076 {
00077   Index i1 = permute(first(i),p);
00078   Index i2 = permute(second(i),p);
00079   return combine(i1,i2);
00080 }

Pair EvtCyclic3::i2pair ( int  i  ) 

Definition at line 83 of file EvtCyclic3.cc.

References AB, BC, and CA.

00084 {
00085   assert(0<=i && i<=2); 
00086   switch(i) {
00087   case 0: return BC;
00088   case 1: return CA;
00089   case 2: return AB;
00090   }
00091   assert(0); return AB; // should never get here
00092 }

Index EvtCyclic3::prev ( Index  i  ) 

Definition at line 96 of file EvtCyclic3.cc.

References A, B, and C.

Referenced by MdcDetector::buildSuperLayers(), hist_sample(), hist_sample_angle(), hist_sample_comp(), EvtDalitzPoint::qhel(), EvtDalitzPlot::qHelAbsMax(), EvtDalitzPlot::qHelAbsMin(), EvtDalitzPoint::qres(), Event::RelTable< T1, T2 >::removeFirst(), and Event::RelTable< T1, T2 >::removeSecond().

00097 {
00098   switch(i) {
00099   case A: return C;
00100   case B: return A;
00101   case C: return B;
00102   }
00103   assert(0); return A; // should never get here
00104 }

Index EvtCyclic3::next ( Index  i  ) 

Definition at line 107 of file EvtCyclic3.cc.

References A, B, and C.

Referenced by EvtDalitzResPdf::compute_integral(), EvtDalitzPoint::qres(), and EvtDalitzResPdf::randomPoint().

00108 {
00109   switch(i) {
00110   case A: return B;
00111   case B: return C;
00112   case C: return A;
00113   }
00114   assert(0); return A; // should never get here
00115 }

Index EvtCyclic3::other ( Index  i,
Index  j 
)

Definition at line 118 of file EvtCyclic3.cc.

References A, B, and C.

Referenced by EvtPto3PAmp::amplitude(), TrkDifPieceTraj::append(), facilities::BadTimeInput::BadTimeInput(), CalibData::CalibBase::CalibBase(), CalibData::CalibBase1::CalibBase1(), combine(), common(), TrkView::contains(), DstMdcKalTrack::DstMdcKalTrack(), DstMdcTrack::DstMdcTrack(), EvtDalitzReso::evaluate(), EvtAmplitudeSum< EvtDalitzPoint >::EvtAmplitudeSum(), EvtDecayMode::EvtDecayMode(), EvtPdfSum< T >::EvtPdfSum(), ers::FIFOStream::FIFOStream(), eformat::write::FullEventFragment::FullEventFragment(), rdbModel::Datatype::isCompatible(), MucMark::IsInBoxWith(), MucMark::IsInSegWith(), MucMark::IsNeighborWith(), EvtDalitzPlot::jacobian(), EvtDecayBase::matchingDecay(), MdcHit::MdcHit(), MdcSeg::MdcSeg(), MucBakelite::MucBakelite(), MucBox::MucBox(), MucEntity::MucEntity(), MucEntityCal::MucEntityCal(), MucGap::MucGap(), MucGapCal::MucGapCal(), MucGas::MucGas(), MucRpc::MucRpc(), MucStrip::MucStrip(), MucStripCal::MucStripCal(), MucStripPlane::MucStripPlane(), EvtPto3PAmp::numerator(), EvtDalitzReso::numerator(), EvtValError::operator *=(), XmlRpc::XmlRpcValue::operator!=(), TrkView::operator!=(), MucRecHitID::operator!=(), Identifier::operator!=(), facilities::Timestamp::operator!=(), EvtValError::operator+=(), eformat::PagedMemory< TMAXPAGES >::const_iterator::operator-(), EvtValError::operator/=(), TrkStoreHypo::operator<(), TrkRecoTrk::operator<(), TrkId::operator<(), MucRecHitID::operator<(), eformat::PagedMemory< TMAXPAGES >::const_iterator::operator<(), Identifier::operator<(), facilities::Timestamp::operator<(), operator<<(), facilities::Timestamp::operator<=(), TrkStoreHypo::operator=(), TrkView::operator=(), TrkParams::operator=(), TrkLineTraj::operator=(), TrkHotListEmpty::operator=(), TrkHistory::operator=(), TrkExchangeData::operator=(), TrkDifPieceTraj::operator=(), ChisqConsistency::operator=(), MdcSeg::operator=(), Trajectory::operator=(), MdcSagTraj::operator=(), MdcHit::operator=(), MucStripPlane::operator=(), MucStrip::operator=(), MucRpc::operator=(), MucGas::operator=(), MucGap::operator=(), MucEntity::operator=(), MucBoxCover::operator=(), MucBox::operator=(), MucBakelite::operator=(), MucAbsorber::operator=(), MucStripCal::operator=(), MucGapCal::operator=(), MucEntityCal::operator=(), MucBoxCal::operator=(), EvtValError::operator=(), eformat::write::SubDetectorFragment::operator=(), eformat::write::ROSFragment::operator=(), eformat::write::ROBFragment::operator=(), eformat::write::FullEventFragment::operator=(), eformat::SubDetectorFragment< TPointer >::operator=(), eformat::ROSFragment< TPointer >::operator=(), eformat::ROBFragment< TPointer >::operator=(), eformat::Header< TPointer >::operator=(), eformat::FullEventFragment< TPointer >::operator=(), DstMdcKalTrack::operator=(), facilities::Timestamp::operator=(), XmlRpc::XmlRpcValue::operator==(), BesTStats::operator==(), TrkView::operator==(), TrkStoreHypo::operator==(), TrkRecoTrk::operator==(), TrkDifPieceTraj::operator==(), MucRecHitID::operator==(), MucMark::operator==(), EvtStreamInputIterator< Point >::operator==(), EvtDalitzPlot::operator==(), EvtDalitzCoord::operator==(), DecayMode::operator==(), ers::Issue::operator==(), eformat::PagedMemory< TMAXPAGES >::const_iterator::operator==(), Identifier::operator==(), facilities::Timestamp::operator==(), MucRecHitID::operator>(), eformat::PagedMemory< TMAXPAGES >::const_iterator::operator>(), Identifier::operator>(), facilities::Timestamp::operator>(), facilities::Timestamp::operator>=(), other(), EvtCPUtil::OtherB(), TrkDifPieceTraj::prepend(), eformat::write::ROBFragment::ROBFragment(), eformat::write::ROSFragment::ROSFragment(), ers::StreamFactory::StreamFactory(), eformat::write::SubDetectorFragment::SubDetectorFragment(), TrkDifPieceTraj::TrkDifPieceTraj(), TrkExchangeData::TrkExchangeData(), TrkHotListEmpty::TrkHotListEmpty(), CalibData::TofSimData::update(), CalibData::TofElecData::update(), CalibData::TofCalibData::update(), CalibData::MucCalibData::update(), CalibData::MdcDataConst::update(), CalibData::MdcCalibData::update(), CalibData::MdcAlignData::update(), CalibData::EsTimeCalibData::update(), CalibData::EmcCalibData::update(), CalibData::DedxSimData::update(), CalibData::DedxCalibData::update(), CalibData::DacCol::update(), and CalibData::ValSig::ValSig().

00119 {
00120   assert(i != j);
00121   switch(i) {
00122   case A:
00123     switch(j) {
00124     case B: return C;
00125     case C: return B;
00126     default: assert(0);
00127     }
00128   case B:
00129     switch(j) {
00130     case C: return A;
00131     case A: return C;
00132     default: assert(0);
00133     }
00134   case C:
00135     switch(j) {
00136     case A: return B;
00137     case B: return A;
00138     default: assert(0);
00139     }
00140   }
00141   assert(0); return A; // should never get here
00142 }

Pair EvtCyclic3::other ( Index  i  ) 

Definition at line 147 of file EvtCyclic3.cc.

References A, AB, B, BC, C, and CA.

00148 {
00149   switch(i) {
00150   case A: return BC;
00151   case B: return CA;
00152   case C: return AB;
00153   }
00154   assert(0); return AB; // should never get here
00155 }

Pair EvtCyclic3::combine ( Index  i,
Index  j 
)

Definition at line 158 of file EvtCyclic3.cc.

References other().

Referenced by HoughValidUpdate::AmbigChoose(), EvtPto3PAmp::numerator(), EvtDalitzReso::numerator(), other(), permute(), and EvtDalitzPoint::pp().

00159 {
00160   return other(other(i,j));
00161 }

Pair EvtCyclic3::prev ( Pair  i  ) 

Definition at line 166 of file EvtCyclic3.cc.

References AB, BC, and CA.

00167 {
00168   Pair ret = CA;
00169   if(i == BC) ret = AB;
00170   else
00171     if(i == CA) ret = BC;
00172 
00173   return ret;
00174 } 

Pair EvtCyclic3::next ( Pair  i  ) 

Definition at line 176 of file EvtCyclic3.cc.

References AB, BC, and CA.

00177 {
00178   Pair ret = BC;
00179   if(i == BC) ret = CA;
00180   else
00181     if(i == CA) ret = AB;
00182 
00183   return ret;
00184 } 

Pair EvtCyclic3::other ( Pair  i,
Pair  j 
)

Definition at line 186 of file EvtCyclic3.cc.

References combine(), and other().

00187 {
00188   return combine(other(i),other(j));
00189 }

Index EvtCyclic3::first ( Pair  i  ) 

Definition at line 195 of file EvtCyclic3.cc.

References A, AB, B, BC, C, and CA.

Referenced by EvtPto3PAmp::amplitude(), EvtPto3PAmp::numerator(), and permute().

00196 {
00197   switch(i) {
00198   case BC: return B;
00199   case CA: return C;
00200   case AB: return A;
00201   }
00202   assert(0); return A; // should never get here
00203 }  

Index EvtCyclic3::second ( Pair  i  ) 

Definition at line 206 of file EvtCyclic3.cc.

References A, AB, B, BC, C, and CA.

Referenced by EvtPto3PAmp::amplitude(), TofConverter::convert(), DumpDecayTreeAlg::execute(), MdcHitDict::get(), EventType::get_detdescr_tags(), EvtDecayMode::m(), EvtPto3PAmp::numerator(), permute(), EvtDecayMode::q(), EvtDalitzPlot::q(), CDCandidate::recurseNode(), EmcRecSplitWeighted::Split(), xmlBase::IFile::~IFile(), and xmlBase::IFile_Section::~IFile_Section().

00207 {
00208   switch(i) {
00209   case BC: return C;
00210   case CA: return A;
00211   case AB: return B;
00212   }
00213   assert(0); return A; // should never get here
00214 } 

Index EvtCyclic3::other ( Pair  i  ) 

Definition at line 217 of file EvtCyclic3.cc.

References A, AB, B, BC, C, and CA.

00218 {
00219   switch(i) {
00220   case BC: return A;
00221   case CA: return B;
00222   case AB: return C;
00223   }
00224   assert(0); return A; // should never get here
00225 }

Index EvtCyclic3::common ( Pair  i,
Pair  j 
)

Definition at line 228 of file EvtCyclic3.cc.

References other().

Referenced by EvtPto3PAmp::numerator(), and EvtDalitzReso::numerator().

00229 {
00230  return other(other(i,j));
00231 }

Index EvtCyclic3::strToIndex ( const char *  str  ) 

Definition at line 234 of file EvtCyclic3.cc.

References A, B, and C.

00235 {
00236   if(strcmp(str,"A")) return A;
00237   else if(strcmp(str,"B")) return B;
00238   else if(strcmp(str,"C")) return C;
00239   else assert(0);
00240 }

Pair EvtCyclic3::strToPair ( const char *  str  ) 

Definition at line 243 of file EvtCyclic3.cc.

References AB, BC, and CA.

Referenced by EvtPto3PAmpFactory::processAmp().

00244 {
00245   if(!strcmp(str,"AB") || !strcmp(str,"BA")) return AB;
00246   else if(!strcmp(str,"BC") || !strcmp(str,"CB")) return BC;
00247   else if(!strcmp(str,"CA") || !strcmp(str,"AC")) return CA;
00248   else assert(0);
00249 }

char * EvtCyclic3::c_str ( Index  i  ) 

Definition at line 252 of file EvtCyclic3.cc.

References A, B, and C.

Referenced by XmlRpc::XmlRpcServer::acceptConnection(), EvtParticleDecayList::addMode(), append(), eformat::SubDetectorFragment< TPointer >::assign(), eformat::ROSFragment< TPointer >::assign(), eformat::ROBFragment< TPointer >::assign(), eformat::Header< TPointer >::assign(), eformat::FullEventFragment< TPointer >::assign(), XmlRpc::XmlRpcServer::bindAndListen(), eformat::ROBFragment< TPointer >::check(), eformat::Header< TPointer >::check(), EvtDecayBase::checkQ(), eformat::Header< TPointer >::child(), efpsc::SC::configure(), RootInterface::createTree(), EvtTauola::decay(), EvtPythia::decay(), EvtPhokhara_ppbar::decay(), EvtPhokhara_pipipi0::decay(), EvtPhokhara_pipi::decay(), EvtPhokhara_pi0pi0pipi::decay(), EvtPhokhara_nnbar::decay(), EvtPhokhara_LLB::decay(), EvtPhokhara_KK::decay(), EvtPhokhara_K0K0::decay(), EvtPhokhara_4pi::decay(), EvtPhokhara::decay(), EvtLundCharm::decay(), EvtLunda::decay(), EvtJetSet::decay(), XmlRpc::XmlRpcClient::doConnect(), XmlRpc::XmlRpcValue::doubleToXml(), MixerAlg::execute(), RootRawEvtReader::execute(), RootInterface::f_createTree(), calib_barrel_q0::fillGraph(), MucMappingAlg::finalize(), RawFileReader::findEventById(), EvtDecayBase::findMass(), EvtDecayBase::findMasses(), MdcxTrackFinder::FitMdcxTrack(), EvtDecayBase::getArg(), EvtDecayBase::getArgs(), EvtParticleDecayList::getDecayModel(), DedxCurSvc::getDedxCurveInfo(), TagFilterSvc::getDstFiles(), xmlBase::Dom::getElementById(), RootInterface::getOtherTree(), EvtDecayBase::getProbMax(), RootInterface::getTree(), XmlRpc::XmlRpcClient::handleEvent(), eformat::Header< TPointer >::Header(), EvtCPUtil::incoherentMix(), MixerAlg::initialize(), MucMappingAlg::initialize(), KKMC::initialize(), BesTwogam::initialize(), RootEvtSelector::initialize(), StringParse::intpiece(), EvtJetSet::jetSetInit(), SimplePIDSvc::loadHistogram(), StringParse::longpiece(), EvtLunda::LundaInit(), EvtLundCharm::LundcrmInit(), main(), EvtDecayProb::makeDecay(), EvtDecayAmp::makeDecay(), eformat::Header< TPointer >::nchildren(), RawFileReader::nextEvent(), StringParse::numpiece(), EvtMultiChannelParser::parse(), EvtMultiChannelParser::parseComplexCoef(), MagneticFieldSvc::parseFile(), MagneticFieldSvc::parseFile_TE(), EvtMultiChannelParser::parseRealCoef(), parseTemplate(), EvtDecayBase::printSummary(), EvtParticle::printTreeRec(), EvtPto3PAmpFactory::processAmp(), EvtPythia::pythiaInit(), RealizationSvc::readDB(), EvtDecayTable::readDecayFile(), XmlRpc::XmlRpcServerConnection::readHeader(), XmlRpc::XmlRpcClient::readHeader(), XmlRpc::XmlRpcServerConnection::readRequest(), XmlRpc::XmlRpcClient::readResponse(), EvtDecay::ReadTruth(), EvtParticleDecayList::removeMode(), eformat::ROBFragment< TPointer >::ROBFragment(), RawFileReader::roughlyNextEvent(), ReaderRpc< Reader >::rpcHandler(), EvtDecayBase::saveDecayInfo(), Identifier::set(), facilities::Timestamp::toBinary(), TrigMdc::TrigMdc(), RawFileTools::wildcard_correct(), DedxCalibWireGain::WriteHists(), DedxCalibMomentum::WriteHists(), DedxCalibLayerGain::WriteHists(), DedxCalibEAng::WriteHists(), DedxCalibDocaEAng::WriteHists(), DedxCalibCostheta::WriteHists(), XmlRpc::XmlRpcClient::writeRequest(), XmlRpc::XmlRpcServerConnection::writeResponse(), and EvtParticle::writeTreeRec().

00253 {
00254   switch(i) {
00255   case A: return "A";
00256   case B: return "B";
00257   case C: return "C";
00258   }
00259   assert(0); return 0; // sngh
00260 }

char * EvtCyclic3::c_str ( Pair  i  ) 

Definition at line 263 of file EvtCyclic3.cc.

References AB, BC, and CA.

00264 {
00265   switch(i) {
00266   case BC: return "BC";
00267   case CA: return "CA";
00268   case AB: return "AB";
00269   }
00270   assert(0); return 0; // sngh
00271 }

char * EvtCyclic3::c_str ( Perm  p  ) 

Definition at line 273 of file EvtCyclic3.cc.

References ABC, ACB, BAC, BCA, CAB, and CBA.

00274 {
00275   if(p == ABC) return "ABC";
00276   if(p == BCA) return "BCA";
00277   if(p == CAB) return "CAB";
00278   if(p == CBA) return "CBA";
00279   if(p == BAC) return "BAC";
00280   if(p == ACB) return "ACB";
00281   return "???";
00282 }

char * EvtCyclic3::append ( const char *  str,
EvtCyclic3::Index  i 
)

Definition at line 284 of file EvtCyclic3.cc.

References c_str(), and s.

Referenced by MdcTrackListCsmc::createFromSegs(), MdcTrackList::createFromSegs(), TCurlFinder::createSuperLayer(), TConformalFinder::findSegments(), TConformalFinder::linkSegments(), TCurlFinder::makeWireHitsListsSegments(), FTSuperLayer::reduce_noise(), and TConformalFinder::refineLinks().

00285 {
00286   // str + null + 1 character
00287   char* s = new char[strlen(str)+2];
00288   strcpy(s,str);
00289   strcat(s,c_str(i));
00290   
00291   return s;
00292 }

char * EvtCyclic3::append ( const char *  str,
EvtCyclic3::Pair  i 
)

Definition at line 294 of file EvtCyclic3.cc.

References c_str(), and s.

00295 {
00296   // str + null + 2 characters
00297   char* s = new char[strlen(str)+3];
00298   strcpy(s,str);
00299   strcat(s,c_str(i));
00300   
00301   return s;
00302 }


Generated on Tue Nov 29 23:36:33 2016 for BOSS_7.0.2 by  doxygen 1.4.7