File indexing completed on 2024-04-06 12:22:27
0001 #include "L1Trigger/L1TCommon/src/Setting.cc"
0002 #include "L1Trigger/L1TCommon/src/Mask.cc"
0003 #include "L1Trigger/L1TCommon/src/Tools.cc"
0004 #include "L1Trigger/L1TCommon/src/XmlConfigReader.cc"
0005 #include "L1Trigger/L1TCommon/src/TrigSystem.cc"
0006
0007 #include <iostream>
0008 #include <fstream>
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020 using namespace std;
0021
0022 int main(int argc, char *argv[]){
0023
0024
0025 list<string> sequence;
0026 map<string,string> xmlPayload;
0027 for(int p=1; p<argc; p++){
0028
0029 ifstream input( argv[p] );
0030 if( !input ){ cout << "Cannot open " << argv[p] << " file" << endl; return 0; }
0031 sequence.push_back( argv[p] );
0032
0033 size_t nLinesRead=0;
0034
0035 while( !input.eof() ){
0036 string tmp;
0037 getline( input, tmp, '\n' );
0038 xmlPayload[ argv[p] ].append( tmp );
0039 nLinesRead++;
0040 }
0041
0042 cout << argv[p] << ": read " << nLinesRead << " lines" << endl;
0043 input.close();
0044 }
0045
0046
0047 l1t::XmlConfigReader xmlRdr;
0048 l1t::TrigSystem trgSys;
0049
0050
0051
0052
0053 for(auto &name : sequence){
0054 cout<<"Parsing "<<name<<endl;
0055 xmlRdr.readDOMFromString( xmlPayload[name] );
0056 xmlRdr.readRootElement ( trgSys );
0057 }
0058 trgSys.setConfigured();
0059
0060
0061
0062
0063
0064
0065
0066
0067
0068 std::cout << "Checking the masked procs\n";
0069 std::map<std::string, std::string> allProcs = trgSys.getProcRole();
0070 for(auto it = allProcs.begin(); it != allProcs.end(); ++it)
0071 std::cout << "Proc " << it->first << " is " << trgSys.isProcEnabled(it->first) << std::endl;
0072
0073 return 0;
0074 }
0075