ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/L1RpcTriggerAnalysis/src/AnaMenu.cc
(Generate patch)

Comparing UserCode/L1RpcTriggerAnalysis/src/AnaMenu.cc (file contents):
Revision 1.5 by konec, Sun Dec 16 22:56:15 2012 UTC vs.
Revision 1.6 by konec, Tue Apr 23 09:27:55 2013 UTC

# Line 34 | Line 34 | bool AnaMenu::filter( const EventObj* ev
34  
35  
36    bool okL1 = false;
37 +  
38 +  if (debug) std::cout <<"--------------------------------------------------------------"<<std::endl;
39 +  if (debug) std::cout << "================== L1 names: "<< std::endl;
40    std::vector<std::string> acceptL1_Names = theConfig.exists("acceptL1_Names") ?  theConfig.getParameter<std::vector<std::string> >("acceptL1_Names") : std::vector<std::string>();
41    for (CIT it=algosL1.begin(); it != algosL1.end(); ++it) {
42 +    bool aokL1 = false;
43      std::string nameAlgo = theMenuL1[*it];
44      if (theAlgosL1.find(nameAlgo) == theAlgosL1.end()) theAlgosL1[nameAlgo]=0;    
45      bool isMu = ( nameAlgo.find("Mu") != std::string::npos);
46 <    if (theConfig.getParameter<bool>("acceptL1_OtherThanMu") && !isMu ) okL1 = true;
47 <    if (theConfig.getParameter<bool>("acceptL1_Mu") &&  isMu) okL1 = true;
48 <    for ( std::vector<std::string>::const_iterator is=acceptL1_Names.begin(); is != acceptL1_Names.end(); ++is) if (nameAlgo==(*is)) okL1 = true;
46 >    if (theConfig.getParameter<bool>("acceptL1_OtherThanMu") && !isMu ) aokL1 = true;
47 >    if (theConfig.getParameter<bool>("acceptL1_Mu") &&  isMu) aokL1 = true;
48 >    for ( std::vector<std::string>::const_iterator is=acceptL1_Names.begin(); is != acceptL1_Names.end(); ++is) if (nameAlgo==(*is)) aokL1 = true;
49 >    if (debug) {std::cout <<nameAlgo; if (aokL1) std::cout <<" <--"; std::cout << std::endl; }
50 >    if (aokL1) okL1=true;
51    }
52  
53    bool okHLT = false;
54 +  if (debug) std::cout << "================== L1 names: "<< std::endl;
55    for (CIT it=algosHLT.begin(); it != algosHLT.end(); ++it) {
56 +    bool aokHLT = false;
57      std::string nameAlgo = theMenuHLT[*it];
58      if (theAlgosHLT.find(nameAlgo) == theAlgosHLT.end()) theAlgosHLT[nameAlgo]=0;    
59      bool isMu = (    (    (nameAlgo.find("Mu") != std::string::npos   )
# Line 54 | Line 62 | bool AnaMenu::filter( const EventObj* ev
62      if ( theConfig.getParameter<bool>("acceptHLT_OtherThanMuPhysicsAlCa")
63           && !isMu
64           && (nameAlgo.find("Physics") == std::string::npos)
65 <         && (nameAlgo.find("AlCa") == std::string::npos) ) okHLT = true;
66 <    if (theConfig.getParameter<bool>("acceptHLT_Mu") && isMu) okHLT = true;
67 <    if (theConfig.getParameter<bool>("acceptHLT_L1")       && (nameAlgo.find("HLT_L1")   != std::string::npos) ) okHLT = true;
68 <    if (theConfig.getParameter<bool>("acceptHLT_Physics")  && (nameAlgo.find("Physics")  != std::string::npos) ) okHLT = true;
69 <    if (theConfig.getParameter<bool>("acceptHLT_ZeroBias") && (nameAlgo.find("ZeroBias") != std::string::npos) ) okHLT = true;
65 >         && (nameAlgo.find("AlCa") == std::string::npos) ) aokHLT = true;
66 >    if (theConfig.getParameter<bool>("acceptHLT_Mu") && isMu) aokHLT = true;
67 >    if (theConfig.getParameter<bool>("acceptHLT_L1")       && (nameAlgo.find("HLT_L1")   != std::string::npos) ) aokHLT = true;
68 >    if (theConfig.getParameter<bool>("acceptHLT_Physics")  && (nameAlgo.find("Physics")  != std::string::npos) ) aokHLT = true;
69 >    if (theConfig.getParameter<bool>("acceptHLT_ZeroBias") && (nameAlgo.find("ZeroBias") != std::string::npos) ) aokHLT = true;
70 >    if (debug) {std::cout <<nameAlgo; if (aokHLT) std::cout <<" <--"; std::cout << std::endl; }
71 >    if (aokHLT) okHLT=true;
72    }
73  
74    if (okL1  && okHLT) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines