File indexing completed on 2023-03-17 11:14:28
0001 #include "L1Trigger/L1TCommon/src/setting.cpp"
0002 #include "L1Trigger/L1TCommon/src/mask.cpp"
0003 #include "L1Trigger/L1TCommon/src/XmlConfigReader.cc"
0004 #include "L1Trigger/L1TCommon/src/trigSystem.cpp"
0005
0006 #include <iostream>
0007 #include <fstream>
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019 using namespace std;
0020
0021 int main(int argc, char *argv[]){
0022 XMLPlatformUtils::Initialize();
0023
0024
0025 ifstream input( argv[1] );
0026 if( !input ){ cout << "Cannot open " << argv[1] << " file" << endl; return 0; }
0027
0028 string xmlPayload;
0029 size_t nLinesRead=0;
0030
0031 while( !input.eof() ){
0032 string tmp;
0033 getline( input, tmp, '\n' );
0034 xmlPayload.append( tmp );
0035 nLinesRead++;
0036 }
0037
0038 cout << "read " << nLinesRead << " lines" << endl;
0039 input.close();
0040
0041
0042 XmlConfigReader xmlReader;
0043 l1t::trigSystem ts;
0044 ts.addProcRole("processors", "processors");
0045
0046
0047 xmlReader.readDOMFromString( xmlPayload );
0048 xmlReader.readRootElement( "calol1", ts );
0049 ts.setConfigured();
0050
0051
0052 map<string, l1t::setting> conf = ts.getSettings("processors");
0053
0054
0055 string tmp = conf["layer1ECalScaleETBins"].getValueAsStr();
0056 cout << "layer1ECalScaleETBins =" << tmp << endl;
0057
0058 return 0;
0059 }