AltDeMuxPatternMaster Class Reference

#include <AltDeMuxPatternMaster.h>

List of all members.

Public Member Functions

 AltDeMuxPatternMaster ()
bool SelectPattern (int entriesE, int entriesW)
AltDeMuxPatternNext ()

Private Member Functions

 ClassDef (AltDeMuxPatternMaster, 1)

Private Attributes

int icursor
int imax
std::vector< AltDeMuxPattern * > pattern11
std::vector< AltDeMuxPattern * > pattern22
std::vector< AltDeMuxPattern * > pattern23
std::vector< AltDeMuxPattern * > pattern24
std::vector< AltDeMuxPattern * > pattern32
std::vector< AltDeMuxPattern * > pattern33
std::vector< AltDeMuxPattern * > pattern34
std::vector< AltDeMuxPattern * > pattern35
std::vector< AltDeMuxPattern * > pattern43
std::vector< AltDeMuxPattern * > pattern44
std::vector< AltDeMuxPattern * > pattern45
std::vector< AltDeMuxPattern * > pattern53
std::vector< AltDeMuxPattern * > pattern54
std::vector< AltDeMuxPattern * > pattern55
std::vector< AltDeMuxPattern * > * pCurrentSet

Detailed Description

Definition at line 35 of file AltDeMuxPatternMaster.h.


Constructor & Destructor Documentation

AltDeMuxPatternMaster::AltDeMuxPatternMaster (  ) 

Definition at line 6 of file AltDeMuxPatternMaster.cxx.

References pattern11, pattern22, pattern23, pattern32, pattern33, pattern34, pattern35, pattern43, pattern44, pattern45, pattern53, pattern54, and pattern55.

00007 {
00008 
00009   AltDeMuxPattern* pPattern;
00010 
00011   // pattern11
00012   pPattern = new AltDeMuxPattern(11);
00013   pattern11.push_back(pPattern);
00014 
00015   // pattern22
00016   
00017   pPattern = new AltDeMuxPattern(11,22);
00018   pattern22.push_back(pPattern);
00019   pPattern = new AltDeMuxPattern(12,21);
00020   pattern22.push_back(pPattern);
00021 
00022 
00023   // pattern23
00024   
00025   pPattern = new AltDeMuxPattern(11,22);
00026   pattern23.push_back(pPattern);
00027   pPattern = new AltDeMuxPattern(12,21);
00028   pattern23.push_back(pPattern);
00029   pPattern = new AltDeMuxPattern(11,23);
00030   pattern23.push_back(pPattern);
00031   pPattern = new AltDeMuxPattern(13,21);
00032   pattern23.push_back(pPattern);
00033   pPattern = new AltDeMuxPattern(12,23);
00034   pattern23.push_back(pPattern);
00035   pPattern = new AltDeMuxPattern(13,22);
00036   pattern23.push_back(pPattern);
00037 
00038 
00039   // pattern32
00040   
00041   pPattern = new AltDeMuxPattern(11,22);
00042   pattern32.push_back(pPattern);
00043   pPattern = new AltDeMuxPattern(12,21);
00044   pattern32.push_back(pPattern);
00045   pPattern = new AltDeMuxPattern(11,32);
00046   pattern32.push_back(pPattern);
00047   pPattern = new AltDeMuxPattern(12,31);
00048   pattern32.push_back(pPattern);
00049   pPattern = new AltDeMuxPattern(21,32);
00050   pattern32.push_back(pPattern);
00051   pPattern = new AltDeMuxPattern(22,31);
00052   pattern32.push_back(pPattern);
00053 
00054   // pattern33
00055   
00056   pPattern = new AltDeMuxPattern(11,22,33);
00057   pattern33.push_back(pPattern);
00058   pPattern = new AltDeMuxPattern(11,23,32);
00059   pattern33.push_back(pPattern);
00060   pPattern = new AltDeMuxPattern(12,21,33);
00061   pattern33.push_back(pPattern);
00062   pPattern = new AltDeMuxPattern(12,23,31);
00063   pattern33.push_back(pPattern);
00064   pPattern = new AltDeMuxPattern(13,21,32);
00065   pattern33.push_back(pPattern);
00066   pPattern = new AltDeMuxPattern(13,22,31);
00067   pattern33.push_back(pPattern);
00068 
00069   // pattern34
00070 
00071   for(int i1=1 ;i1 <=4; i1++){
00072     for(int i2=1 ;i2 <=4; i2++){
00073       if(i2!=i1){
00074         for(int i3=1 ;i3 <=4; i3++){
00075           if((i3!=i1)&&(i3!=i2)){
00076             pPattern = new AltDeMuxPattern(10+i1,20+i2,30+i3);
00077             pattern34.push_back(pPattern);
00078           }
00079         }
00080       }
00081     }
00082   }
00083 
00084   // pattern35
00085   for(int i1=1 ;i1 <=5; i1++){
00086     for(int i2=1 ;i2 <=5; i2++){
00087       if(i2!=i1){
00088         for(int i3=1 ;i3 <=5; i3++){
00089           if((i3!=i1)&&(i3!=i2)){
00090             pPattern = new AltDeMuxPattern(10+i1,20+i2,30+i3);
00091             pattern35.push_back(pPattern);
00092           }
00093         }
00094       }
00095     }
00096   }
00097 
00098   // pattern43
00099   for(int i1=1 ;i1 <=3; i1++){
00100     for(int i2=1 ;i2 <=3; i2++){
00101       if(i2!=i1){
00102         for(int i3=1 ;i3 <=3; i3++){
00103           if((i3!=i1)&&(i3!=i2)){
00104             pPattern = new AltDeMuxPattern(10+i1,20+i2,30+i3);
00105             pattern43.push_back(pPattern);
00106             pPattern = new AltDeMuxPattern(10+i1,20+i2,40+i3);
00107             pattern43.push_back(pPattern);
00108             pPattern = new AltDeMuxPattern(10+i1,30+i2,40+i3);
00109             pattern43.push_back(pPattern);
00110             pPattern = new AltDeMuxPattern(20+i1,30+i2,40+i3);
00111             pattern43.push_back(pPattern);
00112           }
00113         }
00114       }
00115     }
00116   }
00117 
00118   // pattern44
00119   for(int i1=1 ;i1 <=4; i1++){
00120     for(int i2=1 ;i2 <=4; i2++){
00121       if(i2!=i1){
00122         for(int i3=1 ;i3 <=4; i3++){
00123           if((i3!=i1)&&(i3!=i2)){
00124             for(int i4=1 ;i4 <=4; i4++){
00125               if((i4!=i1)&&(i4!=i2)&&(i4!=i3)){
00126                 pPattern = new AltDeMuxPattern(10+i1,20+i2,30+i3,40+i4);
00127                 pattern44.push_back(pPattern);
00128               }
00129             }
00130           }
00131         }
00132       }
00133     }
00134   }
00135 
00136 
00137   // pattern45
00138 
00139   for(int i1=1 ;i1 <=5; i1++){
00140     for(int i2=1 ;i2 <=5; i2++){
00141       if(i2!=i1){
00142         for(int i3=1 ;i3 <=5; i3++){
00143           if((i3!=i1)&&(i3!=i2)){
00144             for(int i4=1 ;i4 <=5; i4++){
00145               if((i4!=i1)&&(i4!=i2)&&(i4!=i3)){
00146                 pPattern = new AltDeMuxPattern(10+i1,20+i2,30+i3,40+i4);
00147                 pattern45.push_back(pPattern);
00148               }
00149             }
00150           }
00151         }
00152       }
00153     }
00154   }
00155 
00156   // pattern53
00157   for(int i1=1 ;i1 <=3; i1++){
00158     for(int i2=1 ;i2 <=3; i2++){
00159       if(i2!=i1){
00160         for(int i3=1 ;i3 <=3; i3++){
00161           if((i3!=i1)&&(i3!=i2)){
00162             pPattern = new AltDeMuxPattern(10+i1,20+i2,30+i3);
00163             pattern53.push_back(pPattern);
00164             pPattern = new AltDeMuxPattern(10+i1,20+i2,40+i3);
00165             pattern53.push_back(pPattern);
00166             pPattern = new AltDeMuxPattern(10+i1,20+i2,50+i3);
00167             pattern53.push_back(pPattern);
00168             pPattern = new AltDeMuxPattern(10+i1,30+i2,40+i3);
00169             pattern53.push_back(pPattern);
00170             pPattern = new AltDeMuxPattern(10+i1,30+i2,50+i3);
00171             pattern53.push_back(pPattern);
00172             pPattern = new AltDeMuxPattern(10+i1,40+i2,50+i3);
00173             pattern53.push_back(pPattern);
00174             pPattern = new AltDeMuxPattern(20+i1,30+i2,40+i3);
00175             pattern53.push_back(pPattern);
00176             pPattern = new AltDeMuxPattern(20+i1,30+i2,50+i3);
00177             pattern53.push_back(pPattern);
00178             pPattern = new AltDeMuxPattern(20+i1,40+i2,50+i3);
00179             pattern53.push_back(pPattern);
00180             pPattern = new AltDeMuxPattern(30+i1,40+i2,50+i3);
00181             pattern53.push_back(pPattern);
00182           }
00183         }
00184       }
00185     }
00186   }
00187 
00188 
00189   // pattern54
00190   for(int i1=1 ;i1 <=4; i1++){
00191     for(int i2=1 ;i2 <=4; i2++){
00192       if(i2!=i1){
00193         for(int i3=1 ;i3 <=4; i3++){
00194           if((i3!=i1)&&(i3!=i2)){
00195             for(int i4=1 ;i4 <=4; i4++){
00196               if((i4!=i1)&&(i4!=i2)&&(i4!=i3)){
00197                 pPattern = new AltDeMuxPattern(10+i1,20+i2,30+i3,40+i4);
00198                 pattern54.push_back(pPattern);
00199                 pPattern = new AltDeMuxPattern(10+i1,20+i2,30+i3,50+i4);
00200                 pattern54.push_back(pPattern);
00201                 pPattern = new AltDeMuxPattern(10+i1,20+i2,40+i3,50+i4);
00202                 pattern54.push_back(pPattern);
00203                 pPattern = new AltDeMuxPattern(10+i1,30+i2,30+i3,40+i4);
00204                 pattern54.push_back(pPattern);
00205                 pPattern = new AltDeMuxPattern(10+i1,30+i2,30+i3,50+i4);
00206                 pattern54.push_back(pPattern);
00207                 pPattern = new AltDeMuxPattern(10+i1,30+i2,40+i3,50+i4);
00208                 pattern54.push_back(pPattern);
00209                 pPattern = new AltDeMuxPattern(20+i1,30+i2,30+i3,40+i4);
00210                 pattern54.push_back(pPattern);
00211                 pPattern = new AltDeMuxPattern(20+i1,30+i2,30+i3,50+i4);
00212                 pattern54.push_back(pPattern);
00213                 pPattern = new AltDeMuxPattern(20+i1,30+i2,40+i3,50+i4);
00214                 pattern54.push_back(pPattern);
00215               }
00216             }
00217           }
00218         }
00219       }
00220     }
00221   }
00222 
00223 
00224   // pattern55
00225   for(int i1=1 ;i1 <=5; i1++){
00226     for(int i2=1 ;i2 <=5; i2++){
00227       if(i2!=i1){
00228         for(int i3=1 ;i3 <=5; i3++){
00229           if( (i3!=i1)&& (i3!=i2) ){
00230             for(int i4=1 ;i4 <=5; i4++){
00231               if((i4!=i1)&&(i4!=i2)&&(i4!=i3)){
00232                 for(int i5=1 ;i5 <=5; i5++){
00233                   if((i5!=i1)&&(i5!=i2)&&(i5!=i3)&&(i5!=i4)){
00234                     pPattern=new AltDeMuxPattern(10+i1,20+i2,30+i3,40+i4,50+i5);
00235                     pattern55.push_back(pPattern);
00236                   }
00237                 }
00238               }
00239             }
00240           }
00241         }
00242       }
00243     }
00244   }
00245 
00246   
00247 }


Member Function Documentation

AltDeMuxPatternMaster::ClassDef ( AltDeMuxPatternMaster  ,
 
) [private]
AltDeMuxPattern * AltDeMuxPatternMaster::Next (  ) 

Definition at line 312 of file AltDeMuxPatternMaster.cxx.

References icursor, imax, and pCurrentSet.

Referenced by AlgAltDeMuxBase::SelectHits().

00312                                             {
00313 
00314   icursor++;
00315   if(icursor>imax)return NULL;
00316   return (*pCurrentSet)[icursor]; 
00317 
00318 } 

bool AltDeMuxPatternMaster::SelectPattern ( int  entriesE,
int  entriesW 
)

Definition at line 250 of file AltDeMuxPatternMaster.cxx.

References icursor, imax, pattern11, pattern22, pattern23, pattern32, pattern33, pattern34, pattern35, pattern43, pattern44, pattern45, pattern53, pattern54, pattern55, and pCurrentSet.

Referenced by AlgAltDeMuxBase::SelectHits().

00251 {
00252   
00253   int selector;
00254 
00255   if(ne<1 || ne > 6)return false;
00256   if(nw<1 || nw > 6)return false;
00257   if( (ne!=nw) && (ne==1 || nw==1) )return false; 
00258 
00259   selector =  10*ne+nw;
00260 
00261   switch(selector){
00262   case 11:
00263     pCurrentSet = &pattern11;
00264     break;
00265   case 22:
00266     pCurrentSet = &pattern22;
00267     break;
00268   case 23:
00269     pCurrentSet = &pattern23;
00270     break;
00271   case 32:
00272     pCurrentSet = &pattern32;
00273     break;
00274   case 33:
00275     pCurrentSet = &pattern33;
00276     break;
00277   case 34:
00278     pCurrentSet = &pattern34;
00279     break;
00280   case 35:
00281     pCurrentSet = &pattern35;
00282     break;
00283   case 43:
00284     pCurrentSet = &pattern43;
00285     break;
00286   case 44:
00287     pCurrentSet = &pattern44;
00288     break;
00289   case 45:
00290     pCurrentSet = &pattern45;
00291     break;
00292   case 53:
00293     pCurrentSet = &pattern53;
00294     break;
00295   case 54:
00296     pCurrentSet = &pattern54;
00297     break;
00298   case 55:
00299     pCurrentSet = &pattern55;
00300     break;
00301   default:
00302     return false;
00303     break;
00304   }
00305 
00306   icursor = -1;
00307   imax    = (*pCurrentSet).size() - 1;
00308 
00309   return true;
00310 }


Member Data Documentation

Definition at line 45 of file AltDeMuxPatternMaster.h.

Referenced by Next(), and SelectPattern().

Definition at line 46 of file AltDeMuxPatternMaster.h.

Referenced by Next(), and SelectPattern().

Definition at line 50 of file AltDeMuxPatternMaster.h.

Referenced by AltDeMuxPatternMaster(), and SelectPattern().

Definition at line 51 of file AltDeMuxPatternMaster.h.

Referenced by AltDeMuxPatternMaster(), and SelectPattern().

Definition at line 52 of file AltDeMuxPatternMaster.h.

Referenced by AltDeMuxPatternMaster(), and SelectPattern().

Definition at line 53 of file AltDeMuxPatternMaster.h.

Definition at line 54 of file AltDeMuxPatternMaster.h.

Referenced by AltDeMuxPatternMaster(), and SelectPattern().

Definition at line 55 of file AltDeMuxPatternMaster.h.

Referenced by AltDeMuxPatternMaster(), and SelectPattern().

Definition at line 56 of file AltDeMuxPatternMaster.h.

Referenced by AltDeMuxPatternMaster(), and SelectPattern().

Definition at line 57 of file AltDeMuxPatternMaster.h.

Referenced by AltDeMuxPatternMaster(), and SelectPattern().

Definition at line 58 of file AltDeMuxPatternMaster.h.

Referenced by AltDeMuxPatternMaster(), and SelectPattern().

Definition at line 59 of file AltDeMuxPatternMaster.h.

Referenced by AltDeMuxPatternMaster(), and SelectPattern().

Definition at line 60 of file AltDeMuxPatternMaster.h.

Referenced by AltDeMuxPatternMaster(), and SelectPattern().

Definition at line 61 of file AltDeMuxPatternMaster.h.

Referenced by AltDeMuxPatternMaster(), and SelectPattern().

Definition at line 62 of file AltDeMuxPatternMaster.h.

Referenced by AltDeMuxPatternMaster(), and SelectPattern().

Definition at line 63 of file AltDeMuxPatternMaster.h.

Referenced by AltDeMuxPatternMaster(), and SelectPattern().

Definition at line 64 of file AltDeMuxPatternMaster.h.

Referenced by Next(), and SelectPattern().


The documentation for this class was generated from the following files:

Generated on 19 Jun 2017 for loon by  doxygen 1.6.1