CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
l1t::TrigSystem Class Reference

#include <TrigSystem.h>

Public Member Functions

void addDaqCrate (const std::string &daq, const std::string &crate)
 
void addDaqRole (const std::string &daq, const std::string &role)
 
void addMask (const std::string &id, const std::string &procRole)
 
void addProcCrate (const std::string &processor, const std::string &crate)
 
void addProcRole (const std::string &processor, const std::string &role)
 
void addProcSlot (const std::string &processor, const std::string &slot)
 
void addSetting (const std::string &type, const std::string &id, const std::string &value, const std::string &procRole, const std::string &delim="")
 
void addSettingTable (const std::string &id, const std::string &columns, const std::string &types, const std::vector< std::string > &rows, const std::string &procRole, const std::string &delim)
 
void configureSystemFromFiles (const std::string &hwCfgFile, const std::string &topCfgFile, const std::string &key)
 
void disableDaqProc (const std::string &daqProc)
 
std::map< std::string, MaskgetMasks (const std::string &proccessor)
 
const std::map< std::string,
std::string > & 
getProcRole ()
 
const std::map< std::string,
std::vector< std::string > > & 
getRoleProcs ()
 
std::map< std::string, SettinggetSettings (const std::string &processor)
 
bool isMasked (const std::string &proccessor, const std::string &id)
 
bool isProcEnabled (const std::string &proccessor)
 
void setConfigured (const bool state=true)
 
void setHwInfo ()
 
void setPrintAllLogs ()
 
void setSystemId (const std::string id)
 
std::string systemId ()
 
 TrigSystem ()
 
 ~TrigSystem ()
 

Private Member Functions

bool checkIdExistsAndSetSetting_ (std::vector< Setting > &vec, const std::string &id, const std::string &value, const std::string &procRole)
 
bool checkIdExistsAndSetSetting_ (std::vector< Setting > &vec, const std::string &id, const std::string &columns, const std::string &types, const std::vector< std::string > &rows, const std::string &procRole, const std::string &delim)
 

Private Attributes

std::map< std::string,
std::vector< std::string > > 
crateProcs_
 
std::map< std::string,
std::string > 
daqttcCrate_
 
std::map< std::string,
std::string > 
daqttcRole_
 
bool isConfigured_
 
std::string * logText_
 
std::map< std::string, bool > procEnabled_
 
std::map< std::string,
std::vector< Mask > > 
procMasks_
 
std::map< std::string,
std::string > 
procRole_
 
std::map< std::string,
std::vector< Setting > > 
procSettings_
 
std::map< std::string, int > procSlot_
 
std::map< std::string,
std::vector< std::string > > 
roleDaqttcs_
 
std::map< std::string,
std::vector< std::string > > 
roleProcs_
 
std::string sysId_
 

Detailed Description

Definition at line 14 of file TrigSystem.h.

Constructor & Destructor Documentation

l1t::TrigSystem::TrigSystem ( )

Definition at line 5 of file TrigSystem.cc.

References logText_, and NULL.

5  : isConfigured_(false)
6 {
7  logText_ = NULL;
8 }
#define NULL
Definition: scimark2.h:8
bool isConfigured_
Definition: TrigSystem.h:55
std::string * logText_
Definition: TrigSystem.h:58
l1t::TrigSystem::~TrigSystem ( )

Definition at line 10 of file TrigSystem.cc.

References gather_cfg::cout, and logText_.

11 {
12  if (logText_)
13  {
14  std::cout << "Printing all logs\n" << *logText_;
15  delete logText_;
16  }
17 }
std::string * logText_
Definition: TrigSystem.h:58
tuple cout
Definition: gather_cfg.py:145

Member Function Documentation

void l1t::TrigSystem::addDaqCrate ( const std::string &  daq,
const std::string &  crate 
)

Definition at line 77 of file TrigSystem.cc.

References daqttcCrate_.

Referenced by l1t::XmlConfigReader::readHwDescription().

78 {
79  daqttcCrate_[daq] = crate;
80 }
std::map< std::string, std::string > daqttcCrate_
Definition: TrigSystem.h:49
void l1t::TrigSystem::addDaqRole ( const std::string &  daq,
const std::string &  role 
)

Definition at line 65 of file TrigSystem.cc.

References daqttcRole_, and roleDaqttcs_.

Referenced by l1t::XmlConfigReader::readHwDescription().

66 {
67  for(auto it=daqttcRole_.begin(); it!=daqttcRole_.end(); ++it)
68  {
69  if ( it->first.compare(daq) == 0 && it->second.compare(role) != 0 )
70  throw std::runtime_error ("DAQttc: " + daq + " already exists but with different role");
71  }
72 
73  roleDaqttcs_[role].push_back(daq);
74  daqttcRole_[daq] = role;
75 }
std::map< std::string, std::string > daqttcRole_
Definition: TrigSystem.h:48
std::map< std::string, std::vector< std::string > > roleDaqttcs_
Definition: TrigSystem.h:47
void l1t::TrigSystem::addMask ( const std::string &  id,
const std::string &  procRole 
)

Definition at line 231 of file TrigSystem.cc.

References begin, crateProcs_, daqttcCrate_, daqttcRole_, procEnabled_, procMasks_, procRole_, procSlot_, roleDaqttcs_, and roleProcs_.

Referenced by l1t::XmlConfigReader::readContext().

232 {
233  bool applyOnRole(false), foundRoleProc(false);
234 
235  if (procRole_.find(procRole) != procRole_.end())
236  {
237  applyOnRole = false;
238  foundRoleProc = true;
239  }
240  else if (roleProcs_.find(procRole) != roleProcs_.end())
241  {
242  applyOnRole = true;
243  foundRoleProc = true;
244  }
245 
246 
247  if (!applyOnRole && foundRoleProc)
248  procMasks_[procRole].push_back(Mask(id, procRole));
249 
250  else if (applyOnRole && foundRoleProc)
251  {
252  for( auto it = roleProcs_[procRole].begin(); it != roleProcs_[procRole].end(); ++it)
253  {
254  if ( procMasks_.find(*it) != procMasks_.end() )
255  {
256  bool MaskAlreadyExist(false);
257  for(auto is = procMasks_.at(*it).begin(); is != procMasks_.at(*it).end(); ++is)
258  {
259  if (is->getId().compare(id) == 0)
260  {
261  MaskAlreadyExist = true;
262  break;
263  }
264  }
265  if (!MaskAlreadyExist)
266  procMasks_.at(*it).push_back(Mask(id, procRole));
267  }
268  else
269  procMasks_[*it].push_back(Mask(id, procRole));
270  }
271 
272  }
273 
274  else if (!applyOnRole && !foundRoleProc)
275  {
276  if ( daqttcRole_.find(procRole) != daqttcRole_.end() )
277  {
278  for( auto it = crateProcs_[daqttcCrate_[procRole]].begin(); it != crateProcs_[daqttcCrate_[procRole]].end(); ++it)
279  {
280  if (procSlot_[*it] == atoi(id.substr(11,2).c_str()) )
281  procEnabled_.at(*it) = false;
282  }
283 
284  }
285  else if ( roleDaqttcs_.find(procRole) != roleDaqttcs_.end() )
286  {
287  for( auto it=roleDaqttcs_[procRole].begin(); it!=roleDaqttcs_[procRole].end(); ++it)
288  {
289  for( auto itt = crateProcs_[daqttcCrate_[*it]].begin(); itt != crateProcs_[daqttcCrate_[*it]].end(); ++itt)
290  {
291  if ( procSlot_[*itt] == atoi(id.substr(11,2).c_str()) )
292  procEnabled_.at(*itt) = false;
293  }
294  }
295 
296  }
297 
298  }
299  if (procRole_.find(procRole) == procRole_.end() && roleProcs_.find(procRole) == roleProcs_.end() && daqttcRole_.find(procRole) == daqttcRole_.end() && roleDaqttcs_.find(procRole) == roleDaqttcs_.end() )
300  throw std::runtime_error ("Processor/DAQ or Role " + procRole + " was not found in the map for masking");
301 
302 }
std::map< std::string, std::vector< std::string > > roleProcs_
Definition: TrigSystem.h:45
std::map< std::string, std::string > daqttcCrate_
Definition: TrigSystem.h:49
std::map< std::string, std::string > daqttcRole_
Definition: TrigSystem.h:48
std::map< std::string, std::vector< std::string > > crateProcs_
Definition: TrigSystem.h:46
std::map< std::string, std::vector< std::string > > roleDaqttcs_
Definition: TrigSystem.h:47
std::map< std::string, int > procSlot_
Definition: TrigSystem.h:44
#define begin
Definition: vmac.h:30
std::map< std::string, bool > procEnabled_
Definition: TrigSystem.h:53
std::map< std::string, std::vector< Mask > > procMasks_
Definition: TrigSystem.h:52
std::map< std::string, std::string > procRole_
Definition: TrigSystem.h:41
void l1t::TrigSystem::addProcCrate ( const std::string &  processor,
const std::string &  crate 
)

Definition at line 60 of file TrigSystem.cc.

References crateProcs_.

Referenced by l1t::XmlConfigReader::readHwDescription().

61 {
62  crateProcs_[crate].push_back(processor);
63 }
std::map< std::string, std::vector< std::string > > crateProcs_
Definition: TrigSystem.h:46
void l1t::TrigSystem::addProcRole ( const std::string &  processor,
const std::string &  role 
)

Definition at line 39 of file TrigSystem.cc.

References procEnabled_, procRole_, and roleProcs_.

Referenced by L1TGlobalPrescalesVetosESProducer::L1TGlobalPrescalesVetosESProducer(), L1TGlobalPrescalesVetosOnlineProd::newObject(), L1TCaloParamsOnlineProd::newObject(), and l1t::XmlConfigReader::readHwDescription().

40 {
41  for(auto it=procRole_.begin(); it!=procRole_.end(); ++it)
42  {
43  if ( it->second.compare(processor) == 0 && it->first.compare(role) != 0 )
44  throw std::runtime_error ("Processor: " + processor + " already exists but with different role");
45  }
46 
47  procRole_[processor] = role;
48 
49  roleProcs_[role].push_back(processor);
50 
51  procEnabled_[processor] = true;
52 
53 }
std::map< std::string, std::vector< std::string > > roleProcs_
Definition: TrigSystem.h:45
std::map< std::string, bool > procEnabled_
Definition: TrigSystem.h:53
std::map< std::string, std::string > procRole_
Definition: TrigSystem.h:41
void l1t::TrigSystem::addProcSlot ( const std::string &  processor,
const std::string &  slot 
)

Definition at line 55 of file TrigSystem.cc.

References procSlot_.

Referenced by l1t::XmlConfigReader::readHwDescription().

56 {
57  procSlot_[processor] = atoi(slot.c_str());
58 }
std::map< std::string, int > procSlot_
Definition: TrigSystem.h:44
void l1t::TrigSystem::addSetting ( const std::string &  type,
const std::string &  id,
const std::string &  value,
const std::string &  procRole,
const std::string &  delim = "" 
)

Definition at line 82 of file TrigSystem.cc.

References begin, checkIdExistsAndSetSetting_(), logText_, procRole_, procSettings_, and roleProcs_.

Referenced by l1t::XmlConfigReader::readContext().

83 {
84  bool applyOnRole, foundRoleProc(false);
85 
86  if (procRole_.find(procRole) != procRole_.end())
87  {
88  applyOnRole = false;
89  foundRoleProc = true;
90  }
91  else if (roleProcs_.find(procRole) != roleProcs_.end())
92  {
93  applyOnRole = true;
94  foundRoleProc = true;
95  }
96 
97  if (!foundRoleProc)
98  throw std::runtime_error ("Processor or Role " + procRole + " was not found in the map");
99 
100  if (!applyOnRole)
101  {
102  if (!checkIdExistsAndSetSetting_(procSettings_[procRole], id, value, procRole))
103  procSettings_[procRole].push_back(Setting(type, id, value, procRole, logText_, delim));
104 
105  }
106  else
107  {
108  for( auto it = roleProcs_[procRole].begin(); it != roleProcs_[procRole].end(); ++it)
109  {
110  if ( procSettings_.find(*it) != procSettings_.end() )
111  {
112  bool SettingAlreadyExist(false);
113  for(auto is = procSettings_.at(*it).begin(); is != procSettings_.at(*it).end(); ++is)
114  {
115  if (is->getId().compare(id) == 0)
116  {
117  SettingAlreadyExist = true;
118  break;
119  }
120  }
121  if (!SettingAlreadyExist)
122  procSettings_.at(*it).push_back(Setting(type, id, value, procRole, logText_, delim));
123  }
124  else
125  procSettings_[*it].push_back(Setting(type, id, value, procRole, logText_, delim));
126  }
127 
128  }
129 }
type
Definition: HCALResponse.h:21
std::map< std::string, std::vector< std::string > > roleProcs_
Definition: TrigSystem.h:45
std::string * logText_
Definition: TrigSystem.h:58
bool checkIdExistsAndSetSetting_(std::vector< Setting > &vec, const std::string &id, const std::string &value, const std::string &procRole)
Definition: TrigSystem.cc:194
std::map< std::string, std::vector< Setting > > procSettings_
Definition: TrigSystem.h:51
#define begin
Definition: vmac.h:30
std::map< std::string, std::string > procRole_
Definition: TrigSystem.h:41
void l1t::TrigSystem::addSettingTable ( const std::string &  id,
const std::string &  columns,
const std::string &  types,
const std::vector< std::string > &  rows,
const std::string &  procRole,
const std::string &  delim 
)

Definition at line 131 of file TrigSystem.cc.

References begin, checkIdExistsAndSetSetting_(), logText_, procRole_, procSettings_, and roleProcs_.

Referenced by l1t::XmlConfigReader::readContext().

132 {
133  bool applyOnRole, foundRoleProc(false);
134 
135  if (procRole_.find(procRole) != procRole_.end())
136  {
137  applyOnRole = false;
138  foundRoleProc = true;
139  }
140  else if (roleProcs_.find(procRole) != roleProcs_.end())
141  {
142  applyOnRole = true;
143  foundRoleProc = true;
144  }
145  if (!foundRoleProc)
146  throw std::runtime_error ("Processor or Role " + procRole + " was not found in the map");
147 
148  if (!applyOnRole)
149  {
150  if (!checkIdExistsAndSetSetting_(procSettings_[procRole], id, columns, types, rows, procRole, delim))
151  procSettings_[procRole].push_back(Setting(id, columns, types, rows, procRole, logText_, delim));
152 
153  }
154  else
155  {
156  for( auto it = roleProcs_[procRole].begin(); it != roleProcs_[procRole].end(); ++it)
157  {
158  if ( procSettings_.find(*it) != procSettings_.end() )
159  {
160  bool SettingAlreadyExist(false);
161  for(auto is = procSettings_.at(*it).begin(); is != procSettings_.at(*it).end(); ++is)
162  {
163  if (is->getId().compare(id) == 0)
164  {
165  SettingAlreadyExist = true;
166  break;
167  }
168  }
169  if (!SettingAlreadyExist)
170  procSettings_.at(*it).push_back(Setting(id, columns, types, rows, procRole, logText_, delim));
171  }
172  else
173  procSettings_[*it].push_back(Setting(id, columns, types, rows, procRole, logText_, delim));
174  }
175 
176  }
177 }
std::map< std::string, std::vector< std::string > > roleProcs_
Definition: TrigSystem.h:45
std::string * logText_
Definition: TrigSystem.h:58
bool checkIdExistsAndSetSetting_(std::vector< Setting > &vec, const std::string &id, const std::string &value, const std::string &procRole)
Definition: TrigSystem.cc:194
std::map< std::string, std::vector< Setting > > procSettings_
Definition: TrigSystem.h:51
#define begin
Definition: vmac.h:30
tuple columns
Definition: mps_check.py:210
std::map< std::string, std::string > procRole_
Definition: TrigSystem.h:41
bool l1t::TrigSystem::checkIdExistsAndSetSetting_ ( std::vector< Setting > &  vec,
const std::string &  id,
const std::string &  value,
const std::string &  procRole 
)
private

Definition at line 194 of file TrigSystem.cc.

References newFWLiteAna::found.

Referenced by addSetting(), and addSettingTable().

195 {
196  bool found(false);
197  for(auto it = vec.begin(); it != vec.end(); ++it)
198  {
199  if (it->getId().compare(id) == 0)
200  {
201  found = true;
202  it->setValue(value);
203  it->setProcRole(procRole);
204  }
205  }
206 
207  return found;
208 }
bool l1t::TrigSystem::checkIdExistsAndSetSetting_ ( std::vector< Setting > &  vec,
const std::string &  id,
const std::string &  columns,
const std::string &  types,
const std::vector< std::string > &  rows,
const std::string &  procRole,
const std::string &  delim 
)
private

Definition at line 210 of file TrigSystem.cc.

References newFWLiteAna::found, and l1t::str2VecStr_().

211 {
212  bool found(false);
213  for(auto it = vec.begin(); it != vec.end(); ++it)
214  {
215  if (it->getId().compare(id) == 0)
216  {
217  found = true;
218 
219  it->resetTableRows();
220  //it->setRowTypes(types);
221  //it->setRowColumns(columns);
222  for(auto ir=rows.begin(); ir!=rows.end(); ++ir)
223  it->addTableRow(*ir, str2VecStr_(types, delim), str2VecStr_(columns, delim));
224 
225  }
226  }
227 
228  return found;
229 }
std::vector< std::string > str2VecStr_(const std::string &aStr, const std::string &delim)
Definition: Tools.cc:23
tuple columns
Definition: mps_check.py:210
void l1t::TrigSystem::configureSystemFromFiles ( const std::string &  hwCfgFile,
const std::string &  topCfgFile,
const std::string &  key 
)

Definition at line 19 of file TrigSystem.cc.

References l1t::XmlConfigReader::buildGlobalDoc(), isConfigured_, l1t::XmlConfigReader::readContexts(), l1t::XmlConfigReader::readDOMFromFile(), l1t::XmlConfigReader::readRootElement(), and sysId_.

Referenced by L1TMuonBarrelParamsESProducer::L1TMuonBarrelParamsESProducer(), and L1TMuonGlobalParamsESProducer::L1TMuonGlobalParamsESProducer().

20 {
21  // read hw description xml
22  // this will set the sysId
23  {
24  XmlConfigReader xmlRdr;
25  xmlRdr.readDOMFromFile(hwCfgFile);
26  xmlRdr.readRootElement(*this);
27  }
28  // read configuration xml files
29  {
30  XmlConfigReader xmlRdr;
31  xmlRdr.readDOMFromFile(topCfgFile);
32  xmlRdr.buildGlobalDoc(key, topCfgFile);
33  xmlRdr.readContexts(key, sysId_, *this);
34  }
35  isConfigured_ = true;
36 }
bool isConfigured_
Definition: TrigSystem.h:55
string key
FastSim: produces sample of signal events, overlayed with premixed minbias events.
std::string sysId_
Definition: TrigSystem.h:56
void l1t::TrigSystem::disableDaqProc ( const std::string &  daqProc)

Definition at line 340 of file TrigSystem.cc.

References begin, crateProcs_, daqttcCrate_, daqttcRole_, procEnabled_, procRole_, roleDaqttcs_, and roleProcs_.

Referenced by l1t::XmlConfigReader::readContext(), and l1t::XmlConfigReader::readHwDescription().

341 {
342  if ( procRole_.find(daqProc) == procRole_.end() && roleProcs_.find(daqProc) == roleProcs_.end() && roleDaqttcs_.find(daqProc) == roleDaqttcs_.end() && daqttcRole_.find(daqProc) == daqttcRole_.end() )
343  throw std::runtime_error("Cannot Mask daq/processor " + daqProc + "! Not found in the system.");
344 
345  if ( procRole_.find(daqProc) != procRole_.end() )
346  procEnabled_.at(daqProc) = false;
347  else if ( roleProcs_.find(daqProc) != roleProcs_.end() )
348  {
349  for (auto it = roleProcs_[daqProc].begin(); it != roleProcs_[daqProc].end(); ++it)
350  procEnabled_.at(*it) = false;
351  }
352  else if ( daqttcRole_.find(daqProc) != daqttcRole_.end() )
353  {
354  for(auto it = crateProcs_[daqttcCrate_[daqProc]].begin(); it != crateProcs_[daqttcCrate_[daqProc]].end(); ++it)
355  procEnabled_.at(*it) = false;
356  }
357  else if ( roleDaqttcs_.find(daqProc) != roleDaqttcs_.end() )
358  {
359  for(auto it = roleDaqttcs_[daqProc].begin(); it != roleDaqttcs_[daqProc].end(); ++it)
360  {
361  for(auto itt = crateProcs_[daqttcCrate_[*it]].begin(); itt != crateProcs_[daqttcCrate_[*it]].begin(); ++itt)
362  procEnabled_.at(*itt) = false;
363  }
364  }
365 }
std::map< std::string, std::vector< std::string > > roleProcs_
Definition: TrigSystem.h:45
std::map< std::string, std::string > daqttcCrate_
Definition: TrigSystem.h:49
std::map< std::string, std::string > daqttcRole_
Definition: TrigSystem.h:48
std::map< std::string, std::vector< std::string > > crateProcs_
Definition: TrigSystem.h:46
std::map< std::string, std::vector< std::string > > roleDaqttcs_
Definition: TrigSystem.h:47
#define begin
Definition: vmac.h:30
std::map< std::string, bool > procEnabled_
Definition: TrigSystem.h:53
std::map< std::string, std::string > procRole_
Definition: TrigSystem.h:41
std::map< std::string, Mask > l1t::TrigSystem::getMasks ( const std::string &  proccessor)

Definition at line 304 of file TrigSystem.cc.

References isConfigured_, procMasks_, and procRole_.

Referenced by L1TMuonGlobalParamsHelper::loadFromOnline().

305 {
306  if (!isConfigured_)
307  throw std::runtime_error("TrigSystem is not configured yet. First call the configureSystem method");
308  if ( procRole_.find(processor) == procRole_.end() )
309  throw std::runtime_error ("Processor " + processor + " was not found in the TrigSystem object list");
310 
311  std::map<std::string, Mask> Masks;
312  std::vector<Mask> vecMasks= procMasks_.at(processor);
313  for(auto it=vecMasks.begin(); it!=vecMasks.end(); ++it)
314  Masks.insert(std::pair<std::string, Mask>(it->getId(), *it));
315 
316  return Masks;
317 }
bool isConfigured_
Definition: TrigSystem.h:55
std::map< std::string, std::vector< Mask > > procMasks_
Definition: TrigSystem.h:52
std::map< std::string, std::string > procRole_
Definition: TrigSystem.h:41
const std::map<std::string, std::string>& l1t::TrigSystem::getProcRole ( )
inline

Definition at line 31 of file TrigSystem.h.

References procRole_.

Referenced by L1TMuonBarrelParamsHelper::configFromDB(), and L1TMuonGlobalParamsHelper::loadFromOnline().

31 { return procRole_; };
std::map< std::string, std::string > procRole_
Definition: TrigSystem.h:41
const std::map<std::string, std::vector<std::string> >& l1t::TrigSystem::getRoleProcs ( )
inline

Definition at line 32 of file TrigSystem.h.

References roleProcs_.

32 { return roleProcs_; };
std::map< std::string, std::vector< std::string > > roleProcs_
Definition: TrigSystem.h:45
std::map< std::string, Setting > l1t::TrigSystem::getSettings ( const std::string &  processor)

Definition at line 179 of file TrigSystem.cc.

References isConfigured_, procRole_, and procSettings_.

Referenced by L1TMuonBarrelParamsHelper::configFromDB(), L1TGlobalPrescalesVetosESProducer::L1TGlobalPrescalesVetosESProducer(), and L1TMuonGlobalParamsHelper::loadFromOnline().

180 {
181  if (!isConfigured_)
182  throw std::runtime_error("TrigSystem is not configured yet. First call the configureSystem method");
183  if ( procRole_.find(processor) == procRole_.end() )
184  throw std::runtime_error ("Processor " + processor + " was not found in the TrigSystem object list");
185 
186  std::map<std::string, Setting> Settings;
187  std::vector<Setting> vecSettings = procSettings_.at(processor);
188  for(auto it=vecSettings.begin(); it!=vecSettings.end(); ++it)
189  Settings.insert(std::pair<std::string, Setting>(it->getId(), *it));
190 
191  return Settings;
192 }
bool isConfigured_
Definition: TrigSystem.h:55
std::map< std::string, std::vector< Setting > > procSettings_
Definition: TrigSystem.h:51
std::map< std::string, std::string > procRole_
Definition: TrigSystem.h:41
bool l1t::TrigSystem::isMasked ( const std::string &  proccessor,
const std::string &  id 
)

Definition at line 319 of file TrigSystem.cc.

References isConfigured_, and procMasks_.

Referenced by L1TMuonGlobalParamsHelper::loadFromOnline().

320 {
321 
322  if (!isConfigured_)
323  throw std::runtime_error("TrigSystem is not configured yet. First call the configureSystem method");
324 
325  bool isMasked = false;
326  std::vector<Mask> vecMasks= procMasks_.at(processor);
327  for(auto it=vecMasks.begin(); it!=vecMasks.end(); ++it)
328  {
329  if (it->getId() == id)
330  {
331  isMasked = true;
332  break;
333  }
334  }
335 
336  edm::LogInfo ("l1t::TrigSystem::isMasked") << "Returning " << isMasked << " for processor " << processor << " and port " << id;
337  return isMasked;
338 }
bool isMasked(const std::string &proccessor, const std::string &id)
Definition: TrigSystem.cc:319
bool isConfigured_
Definition: TrigSystem.h:55
std::map< std::string, std::vector< Mask > > procMasks_
Definition: TrigSystem.h:52
bool l1t::TrigSystem::isProcEnabled ( const std::string &  proccessor)

Definition at line 367 of file TrigSystem.cc.

References isConfigured_, and procEnabled_.

368 {
369  if (!isConfigured_)
370  throw std::runtime_error("TrigSystem is not configured yet. First call the configureSystem method");
371 
372  edm::LogInfo ("l1t::TrigSystem::isProcEnabled") << "Returning " << procEnabled_[processor] << " for processor " << processor;
373  return procEnabled_[processor];
374 }
bool isConfigured_
Definition: TrigSystem.h:55
std::map< std::string, bool > procEnabled_
Definition: TrigSystem.h:53
void l1t::TrigSystem::setConfigured ( const bool  state = true)
inline
void l1t::TrigSystem::setHwInfo ( )
void l1t::TrigSystem::setPrintAllLogs ( )
inline

Definition at line 41 of file TrigSystem.h.

References logText_, and AlCaHLTBitMon_QueryRunRegistry::string.

void l1t::TrigSystem::setSystemId ( const std::string  id)
inline

Definition at line 38 of file TrigSystem.h.

References sysId_.

Referenced by l1t::XmlConfigReader::readHwDescription().

38 { sysId_=id; };
std::string sysId_
Definition: TrigSystem.h:56
std::string l1t::TrigSystem::systemId ( )
inline

Definition at line 37 of file TrigSystem.h.

References sysId_.

Referenced by l1t::XmlConfigReader::readContext().

37 { return sysId_; };
std::string sysId_
Definition: TrigSystem.h:56

Member Data Documentation

std::map<std::string, std::vector<std::string> > l1t::TrigSystem::crateProcs_
private

Definition at line 46 of file TrigSystem.h.

Referenced by addMask(), addProcCrate(), and disableDaqProc().

std::map<std::string, std::string> l1t::TrigSystem::daqttcCrate_
private

Definition at line 49 of file TrigSystem.h.

Referenced by addDaqCrate(), addMask(), and disableDaqProc().

std::map<std::string, std::string> l1t::TrigSystem::daqttcRole_
private

Definition at line 48 of file TrigSystem.h.

Referenced by addDaqRole(), addMask(), and disableDaqProc().

bool l1t::TrigSystem::isConfigured_
private
std::string* l1t::TrigSystem::logText_
private

Definition at line 58 of file TrigSystem.h.

Referenced by addSetting(), addSettingTable(), setPrintAllLogs(), TrigSystem(), and ~TrigSystem().

std::map<std::string, bool> l1t::TrigSystem::procEnabled_
private

Definition at line 53 of file TrigSystem.h.

Referenced by addMask(), addProcRole(), disableDaqProc(), and isProcEnabled().

std::map<std::string, std::vector<Mask> > l1t::TrigSystem::procMasks_
private

Definition at line 52 of file TrigSystem.h.

Referenced by addMask(), getMasks(), and isMasked().

std::map<std::string, std::string> l1t::TrigSystem::procRole_
private
std::map<std::string, std::vector<Setting> > l1t::TrigSystem::procSettings_
private

Definition at line 51 of file TrigSystem.h.

Referenced by addSetting(), addSettingTable(), and getSettings().

std::map<std::string, int> l1t::TrigSystem::procSlot_
private

Definition at line 44 of file TrigSystem.h.

Referenced by addMask(), and addProcSlot().

std::map<std::string, std::vector<std::string> > l1t::TrigSystem::roleDaqttcs_
private

Definition at line 47 of file TrigSystem.h.

Referenced by addDaqRole(), addMask(), and disableDaqProc().

std::map<std::string, std::vector<std::string> > l1t::TrigSystem::roleProcs_
private
std::string l1t::TrigSystem::sysId_
private

Definition at line 56 of file TrigSystem.h.

Referenced by configureSystemFromFiles(), setSystemId(), and systemId().