CMS 3D CMS Logo

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

#include <DTUserKeyedConfigHandler.h>

Inheritance diagram for DTUserKeyedConfigHandler:
popcon::PopConSourceHandler< DTCCBConfig >

Public Member Functions

 DTUserKeyedConfigHandler (const edm::ParameterSet &ps)
 
void getNewObjects ()
 
std::string id () const
 
virtual ~DTUserKeyedConfigHandler ()
 
- Public Member Functions inherited from popcon::PopConSourceHandler< DTCCBConfig >
void convertFromOld ()
 
SummarydummySummary (typename OldContainer::value_type const &) const
 
void initialize (cond::DbSession dbSession, cond::TagInfo const &tagInfo, cond::LogDBEntry const &logDBEntry)
 
Ref lastPayload () const
 
cond::LogDBEntry const & logDBEntry () const
 
std::pair< Container const
*, std::string const > 
operator() (cond::DbSession session, cond::TagInfo const &tagInfo, cond::LogDBEntry const &logDBEntry) const
 
 PopConSourceHandler ()
 
Container const & returnData ()
 
void sort ()
 
cond::TagInfo const & tagInfo () const
 
std::string const & userTextLog () const
 
virtual ~PopConSourceHandler ()
 

Static Public Member Functions

static void setList (cond::KeyList *list)
 

Private Member Functions

void chkConfigList (const std::map< int, bool > &userBricks)
 
bool userDiscardedKey (int key)
 

Static Private Member Functions

static bool sameConfigList (const std::vector< DTConfigKey > &cfgl, const std::vector< DTConfigKey > &cfgr)
 

Private Attributes

std::string brickContainer
 
DTCCBConfigccbConfig
 
cond::DbConnection connection
 
int dataRun
 
std::string dataTag
 
cond::DbSession isession
 
std::string onlineAuthentication
 
std::string onlineConnect
 
std::vector< DTConfigKeyuserConf
 
bool writeData
 
bool writeKeys
 

Static Private Attributes

static cond::KeyListkeyList = 0
 

Additional Inherited Members

- Public Types inherited from popcon::PopConSourceHandler< DTCCBConfig >
typedef std::vector< TripletContainer
 
typedef std::vector< std::pair
< DTCCBConfig *, cond::Time_t > > 
OldContainer
 
typedef PopConSourceHandler
< DTCCBConfig
self
 
typedef cond::Summary Summary
 
typedef cond::Time_t Time_t
 
typedef DTCCBConfig value_type
 
- Protected Member Functions inherited from popcon::PopConSourceHandler< DTCCBConfig >
int add (value_type *payload, Summary *summary, Time_t time)
 
- Protected Attributes inherited from popcon::PopConSourceHandler< DTCCBConfig >
OldContainer m_to_transfer
 
std::string m_userTextLog
 

Detailed Description

Description:

Date:
2010/07/21 16:06:53
Revision:
1.4
Author
Paolo Ronchese INFN Padova

Definition at line 40 of file DTUserKeyedConfigHandler.h.

Constructor & Destructor Documentation

DTUserKeyedConfigHandler::DTUserKeyedConfigHandler ( const edm::ParameterSet ps)

Constructor

Definition at line 50 of file DTUserKeyedConfigHandler.cc.

References DTConfigKey::confKey, DTConfigKey::confType, gather_cfg::cout, CommonMethods::cp(), edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), onlineAuthentication, and userConf.

50  :
51  dataRun( ps.getParameter<int> ( "run" ) ),
52  dataTag( ps.getParameter<std::string> ( "tag" ) ),
53  onlineConnect( ps.getParameter<std::string> ( "onlineDB" ) ),
55  "onlineAuthentication" ) ),
56  brickContainer( ps.getParameter<std::string> ( "container" ) ),
57  writeKeys( ps.getParameter<bool> ( "writeKeys" ) ),
58  writeData( ps.getParameter<bool> ( "writeData" ) ),
59  connection(),
60  isession() {
61  std::cout << " PopCon application for DT configuration export "
62  << onlineAuthentication << std::endl;
63 
64  std::vector<edm::ParameterSet> dtConfigKeys (
65  ps.getParameter< std::vector<edm::ParameterSet> >( "DTConfigKeys" )
66  );
67  std::vector<edm::ParameterSet>::const_iterator iter = dtConfigKeys.begin();
68  std::vector<edm::ParameterSet>::const_iterator iend = dtConfigKeys.end();
69  while ( iter != iend ) {
70  const edm::ParameterSet& cp = *iter++;
71  int configType = cp.getUntrackedParameter<int>( "configType" );
72  int configKey = cp.getUntrackedParameter<int>( "configKey" );
73  std::cout << "config: "
74  << configType << " -> "
75  << configKey << std::endl;
76  DTConfigKey userKey;
77  userKey.confType = configType;
78  userKey.confKey = configKey;
79  userConf.push_back( userKey );
80  }
81 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
std::vector< DTConfigKey > userConf
tuple cout
Definition: gather_cfg.py:121
DTUserKeyedConfigHandler::~DTUserKeyedConfigHandler ( )
virtual

Destructor

Definition at line 86 of file DTUserKeyedConfigHandler.cc.

86  {
87 }

Member Function Documentation

void DTUserKeyedConfigHandler::chkConfigList ( const std::map< int, bool > &  userBricks)
private

Definition at line 333 of file DTUserKeyedConfigHandler.cc.

References DTKeyedConfig::add(), brickContainer, gather_cfg::cout, alignCSCRings::e, cppFunctionSkipper::exception, cond::KeyList::get(), DTKeyedConfig::getId(), isession, gen::k, keyList, cond::KeyList::load(), cond::KeyedElement::m_key, cond::KeyedElement::m_obj, cond::DbSession::nominalSchema(), DTKeyedConfig::setId(), AlCaHLTBitMon_QueryRunRegistry::string, and cond::service::PoolDBOutputService::writeOne().

Referenced by getNewObjects().

334  {
335 
336  std::cout << "open POOL out db " << std::endl;
338 
339  std::map<int,bool>::const_iterator uBrkIter = userBricks.begin();
340  std::map<int,bool>::const_iterator uBrkIend = userBricks.end();
341 
342  coral::ITable& brickConfigTable =
343  isession.nominalSchema().tableHandle( "CFGBRICKS" );
344  std::auto_ptr<coral::IQuery>
345  brickConfigQuery( brickConfigTable.newQuery() );
346  brickConfigQuery->addToOutputList( "BRKID" );
347  brickConfigQuery->addToOutputList( "BRKNAME" );
348  coral::ICursor& brickConfigCursor = brickConfigQuery->execute();
349  DTKeyedConfig* brickData = 0;
350  std::vector<int> missingList;
351  std::vector<unsigned long long> checkedKeys;
352  while( brickConfigCursor.next() ) {
353  const coral::AttributeList& row = brickConfigCursor.currentRow();
354  int brickConfigId = row["BRKID"].data<int>();
355  uBrkIter = userBricks.find( brickConfigId );
356  if ( uBrkIter == uBrkIend ) continue;
357  if ( !( uBrkIter->second ) ) continue;
358  std::string brickConfigName = row["BRKNAME"].data<std::string>();
359  std::cout << "brick " << brickConfigId
360  << " : " << brickConfigName << std::endl;
361  checkedKeys.push_back( brickConfigId );
362  bool brickFound = false;
363  try {
364  std::cout << "load brick " << checkedKeys[0] << std::endl;
365  std::cout << "key list " << keyList << std::endl;
366  keyList->load( checkedKeys );
367  std::cout << "get brick..." << std::endl;
368  const DTKeyedConfig* brickCheck =
369  keyList->get<DTKeyedConfig>( 0 );
370  if ( brickCheck != 0 ) {
371  brickFound = ( brickCheck->getId() == brickConfigId );
372  }
373  }
374  catch ( std::exception e ) {
375  }
376  if ( !brickFound ) {
377  std::cout << "brick " << brickConfigId << " missing, copy request"
378  << std::endl;
379  missingList.push_back( brickConfigId );
380  }
381  checkedKeys.clear();
382  }
383  keyList->load( checkedKeys );
384 
385  std::vector<int>::const_iterator brickIter = missingList.begin();
386  std::vector<int>::const_iterator brickIend = missingList.end();
387  while ( brickIter != brickIend ) {
388  int brickConfigId = *brickIter++;
389  coral::AttributeList bindVariableList;
390  bindVariableList.extend( "brickId", typeid(int) );
391  bindVariableList["brickId"].data<int>() = brickConfigId;
392  std::auto_ptr<coral::IQuery>
393  brickDataQuery( isession.nominalSchema().newQuery() );
394  brickDataQuery->addToTableList( "CFGRELATIONS" );
395  brickDataQuery->addToTableList( "CONFIGCMDS" );
397  brickCondition = "CONFIGCMDS.CMDID=CFGRELATIONS.CMDID";
398  brickCondition += " and CFGRELATIONS.BRKID=:brickId";
399  brickDataQuery->addToOutputList( "CFGRELATIONS.BRKID" );
400  brickDataQuery->addToOutputList( "CONFIGCMDS.CONFDATA" );
401  brickDataQuery->setCondition( brickCondition, bindVariableList );
402  coral::ICursor& brickDataCursor = brickDataQuery->execute();
403  brickData = new DTKeyedConfig();
404  brickData->setId( brickConfigId );
405  while( brickDataCursor.next() ) {
406  const coral::AttributeList& row = brickDataCursor.currentRow();
407  brickData->add( row["CONFIGCMDS.CONFDATA"].data<std::string>() );
408  }
409  cond::KeyedElement k( brickData, brickConfigId );
410  std::cout << "now writing brick: " << brickConfigId << std::endl;
411  outdb->writeOne( k.m_obj, k.m_key, brickContainer );
412  }
413 
414  return;
415 
416 }
void load(std::vector< unsigned long long > const &keys)
Definition: KeyList.cc:10
void add(const std::string &data)
T const * get(int n) const
Definition: KeyList.h:39
void writeOne(T *payload, Time_t time, const std::string &recordName, bool withlogging=false)
int k[5][pyjets_maxn]
coral::ISchema & nominalSchema()
Definition: DbSession.cc:228
void setId(int id)
int getId() const
tuple cout
Definition: gather_cfg.py:121
static cond::KeyList * keyList
void DTUserKeyedConfigHandler::getNewObjects ( )
virtual

Operations

Implements popcon::PopConSourceHandler< DTCCBConfig >.

Definition at line 92 of file DTUserKeyedConfigHandler.cc.

References DTCCBConfig::appendConfigKey(), DTCCBConfig::begin(), chkConfigList(), cond::DbSession::close(), cond::DbTransaction::commit(), cond::DbConnection::configuration(), cond::DbConnection::configure(), DTConfigKey::confKey, DTConfigKey::confType, connection, gather_cfg::cout, cond::DbConnection::createSession(), dataRun, dataTag, DTCCBConfig::end(), isession, combine::key, keyList, prof2calltree::last, cond::TagInfo::lastInterval, popcon::PopConSourceHandler< DTCCBConfig >::lastPayload(), popcon::PopConSourceHandler< DTCCBConfig >::m_to_transfer, cond::DbSession::nominalSchema(), onlineAuthentication, onlineConnect, cond::DbSession::open(), DTCCBId::sectorId, cond::DbConnectionConfiguration::setAuthenticationPath(), DTCCBConfig::setFullKey(), DTCCBConfig::setStamp(), cond::DbTransaction::start(), relativeConstraints::station, DTCCBId::stationId, AlCaHLTBitMon_QueryRunRegistry::string, popcon::PopConSourceHandler< DTCCBConfig >::tagInfo(), cond::DbSession::transaction(), userConf, userDiscardedKey(), DTCCBId::wheelId, writeData, and writeKeys.

92  {
93 
94  //to access the information on the tag inside the offline database:
95  cond::TagInfo const & ti = tagInfo();
96  unsigned int last = ti.lastInterval.first;
97  std::cout << "last configuration key already copied for run: "
98  << last << std::endl;
99 
100  std::vector<DTConfigKey> lastKey;
101 // std::cout << "check for last " << std::endl;
102  if ( last == 0 ) {
103  DTCCBConfig* dummyConf = new DTCCBConfig( dataTag );
104  dummyConf->setStamp( 0 );
105  dummyConf->setFullKey( lastKey );
106  cond::Time_t snc = 1;
107  if ( writeKeys && ( dataRun > 1 ) )
108  m_to_transfer.push_back( std::make_pair( dummyConf, snc ) );
109  }
110  else {
111  std::cout << "get last payload" << std::endl;
112  Ref payload = lastPayload();
113  std::cout << "get last full key" << std::endl;
114  lastKey = payload->fullKey();
115  std::cout << "last key: " << std::endl;
116  std::vector<DTConfigKey>::const_iterator keyIter = lastKey.begin();
117  std::vector<DTConfigKey>::const_iterator keyIend = lastKey.end();
118  while ( keyIter != keyIend ) {
119  const DTConfigKey& keyList = *keyIter++;
120  std::cout << keyList.confType << " : " << keyList.confKey << std::endl;
121  }
122  }
123 
124  std::cout << "configure DbConnection" << std::endl;
125  // conn->configure( cond::CmsDefaults );
128  std::cout << "create DbSession" << std::endl;
130  std::cout << "open session" << std::endl;
132  std::cout << "start transaction" << std::endl;
134 
135  // get ccb identifiers map
136  std::cout << "retrieve CCB map" << std::endl;
137  std::map<int,DTCCBId> ccbMap;
138  coral::ITable& ccbMapTable =
139  isession.nominalSchema().tableHandle( "CCBMAP" );
140  std::auto_ptr<coral::IQuery>
141  ccbMapQuery( ccbMapTable.newQuery() );
142  ccbMapQuery->addToOutputList( "CCBID" );
143  ccbMapQuery->addToOutputList( "WHEEL" );
144  ccbMapQuery->addToOutputList( "SECTOR" );
145  ccbMapQuery->addToOutputList( "STATION" );
146  coral::ICursor& ccbMapCursor = ccbMapQuery->execute();
147  while( ccbMapCursor.next() ) {
148  const coral::AttributeList& row = ccbMapCursor.currentRow();
149  int ccb = row["CCBID" ].data<int>();
150  int wheel = row["WHEEL" ].data<int>();
151  int sector = row["SECTOR" ].data<int>();
152  int station = row["STATION"].data<int>();
153  DTCCBId ccbId;
154  ccbId. wheelId = wheel;
155  ccbId.stationId = station;
156  ccbId. sectorId = sector;
157  ccbMap.insert( std::pair<int,DTCCBId>( ccb, ccbId ) );
158  }
159 
160  // get brick types
161  std::cout << "retrieve brick types" << std::endl;
162  std::map<int,int> bktMap;
163  coral::AttributeList emptyBindVariableList;
164  std::auto_ptr<coral::IQuery>
165  brickTypeQuery( isession.nominalSchema().newQuery() );
166  brickTypeQuery->addToTableList( "CFGBRICKS" );
167  brickTypeQuery->addToTableList( "BRKT2CSETT" );
168  std::string bTypeCondition = "CFGBRICKS.BRKTYPE=BRKT2CSETT.BRKTYPE";
169  brickTypeQuery->addToOutputList( "CFGBRICKS.BRKID" );
170  brickTypeQuery->addToOutputList( "BRKT2CSETT.CSETTYPE" );
171  brickTypeQuery->setCondition( bTypeCondition, emptyBindVariableList );
172  coral::ICursor& brickTypeCursor = brickTypeQuery->execute();
173  while( brickTypeCursor.next() ) {
174  const coral::AttributeList& row = brickTypeCursor.currentRow();
175  int id = row["CFGBRICKS.BRKID" ].data<int>();
176  int bt = row["BRKT2CSETT.CSETTYPE"].data<short>();
177 // std::cout << "brick " << id << " type " << bt << std::endl;
178 // @@FIX - TEMPORARY PATCH
179 // if ( bt > 3 ) bt = 3;
180  bktMap.insert( std::pair<int,int>( id, bt ) );
181  }
182 
183  // get ccb config keys
184  std::cout << "retrieve CCB configuration keys" << std::endl;
185  std::map<int,std::map<int,int>*> keyMap;
186  std::map<int,int> cckMap;
187  coral::ITable& ccbRelTable =
188  isession.nominalSchema().tableHandle( "CCBRELATIONS" );
189  std::auto_ptr<coral::IQuery>
190  ccbRelQuery( ccbRelTable.newQuery() );
191  ccbRelQuery->addToOutputList( "CONFKEY" );
192  ccbRelQuery->addToOutputList( "CCBID" );
193  ccbRelQuery->addToOutputList( "CONFCCBKEY" );
194  coral::ICursor& ccbRelCursor = ccbRelQuery->execute();
195  // loop over all full configurations
196  while( ccbRelCursor.next() ) {
197  const coral::AttributeList& row = ccbRelCursor.currentRow();
198  int cfg = row["CONFKEY" ].data<int>();
199  int ccb = row["CCBID" ].data<int>();
200  int key = row["CONFCCBKEY"].data<int>();
201  // check for used configurations
202 // if ( cfgMap.find( cfg ) == cfgMap.end() ) continue;
203  if ( userDiscardedKey( cfg ) ) continue;
204  std::map<int,std::map<int,int>*>::const_iterator keyIter =
205  keyMap.find( cfg );
206  std::map<int,std::map<int,int>*>::const_iterator keyIend =
207  keyMap.end();
208  std::map<int,int>* mapPtr = 0;
209  // check for new full configuration
210  if ( keyIter != keyIend ) mapPtr = keyIter->second;
211  else keyMap.insert(
212  std::pair<int,std::map<int,int>*>( cfg,
213  mapPtr = new std::map<int,int> ) );
214  // store ccb config key
215  std::map<int,int>& mapRef( *mapPtr );
216  mapRef.insert( std::pair<int,int>( ccb, key ) );
217  // check for new ccb config key
218  if ( cckMap.find( key ) == cckMap.end() )
219  cckMap.insert( std::pair<int,int>( key, ccb ) );
220  }
221 
222  // get brick keys
223  std::cout << "retrieve CCB configuration bricks" << std::endl;
224  std::map<int,std::vector<int>*> brkMap;
225  coral::ITable& confBrickTable =
226  isession.nominalSchema().tableHandle( "CFG2BRKREL" );
227  std::auto_ptr<coral::IQuery>
228  confBrickQuery( confBrickTable.newQuery() );
229  confBrickQuery->addToOutputList( "CONFID" );
230  confBrickQuery->addToOutputList( "BRKID" );
231  coral::ICursor& confBrickCursor = confBrickQuery->execute();
232  // loop over all brick keys
233  while( confBrickCursor.next() ) {
234  const coral::AttributeList& row = confBrickCursor.currentRow();
235  int key = row["CONFID"].data<int>();
236  int brk = row["BRKID" ].data<int>();
237  // check for used ccb config key
238  if ( cckMap.find( key ) == cckMap.end() ) continue;
239  std::map<int,std::vector<int>*>::const_iterator brkIter =
240  brkMap.find( key );
241  std::map<int,std::vector<int>*>::const_iterator brkIend =
242  brkMap.end();
243  // check for new ccb config key
244  std::vector<int>* brkPtr = 0;
245  if ( brkIter != brkIend ) brkPtr = brkIter->second;
246  else brkMap.insert(
247  std::pair<int,std::vector<int>*>( key,
248  brkPtr = new std::vector<int> ) );
249  // store brick key
250  brkPtr->push_back( brk );
251  }
252 
253  // set run and full configuration in payload
254  DTCCBConfig* fullConf = new DTCCBConfig( dataTag );
255  fullConf->setStamp( 1 );
256  fullConf->setFullKey( userConf );
257  std::map<int,bool> userBricks;
258  std::map<int,bool>::const_iterator uBrkIter = userBricks.begin();
259  std::map<int,bool>::const_iterator uBrkIend = userBricks.end();
260  std::vector<DTConfigKey>::const_iterator cfgIter = userConf.begin();
261  std::vector<DTConfigKey>::const_iterator cfgIend = userConf.end();
262  while ( cfgIter != cfgIend ) {
263  const DTConfigKey& cfgEntry = *cfgIter++;
264  int cft = cfgEntry.confType;
265  int cfg = cfgEntry.confKey;
266  // retrieve ccb config map
267  std::map<int,std::map<int,int>*>::const_iterator keyIter =
268  keyMap.find( cfg );
269  std::map<int,std::map<int,int>*>::const_iterator keyIend =
270  keyMap.end();
271  std::map<int,int>* mapPtr = 0;
272  if ( keyIter != keyIend ) mapPtr = keyIter->second;
273  if ( mapPtr == 0 ) continue;
274  std::map<int,int>::const_iterator ccbIter = mapPtr->begin();
275  std::map<int,int>::const_iterator ccbIend = mapPtr->end();
276  while ( ccbIter != ccbIend ) {
277  const std::pair<int,int>& ccbEntry = *ccbIter++;
278  // get ccb config key
279  int ccb = ccbEntry.first;
280  int key = ccbEntry.second;
281  // retrieve chamber id
282  std::map<int,DTCCBId>::const_iterator ccbIter = ccbMap.find( ccb );
283  std::map<int,DTCCBId>::const_iterator ccbIend = ccbMap.end();
284  if ( ccbIter == ccbIend ) continue;
285  const DTCCBId& chaId = ccbIter->second;
286  // retrieve brick id list
287  std::map<int,std::vector<int>*>::const_iterator brkIter =
288  brkMap.find( key );
289  std::map<int,std::vector<int>*>::const_iterator brkIend =
290  brkMap.end();
291  if ( brkIter == brkIend ) continue;
292  std::vector<int>* brkPtr = brkIter->second;
293  if ( brkPtr == 0 ) continue;
294  // brick id lists in payload
295  std::vector<int> bkList;
296  bkList.reserve( 20 );
297  std::map<int,int>::const_iterator bktIter = bktMap.begin();
298  std::map<int,int>::const_iterator bktIend = bktMap.end();
299  std::vector<int>::const_iterator bkiIter = brkPtr->begin();
300  std::vector<int>::const_iterator bkiIend = brkPtr->end();
301  while ( bkiIter != bkiIend ) {
302  int brickId = *bkiIter++;
303  bktIter = bktMap.find( brickId );
304  if ( bktIter == bktIend ) continue;
305  if ( bktIter->second == cft ) {
306  bkList.push_back( brickId );
307  uBrkIter = userBricks.find( brickId );
308  if ( uBrkIter == uBrkIend )
309  userBricks.insert( std::pair<int,bool>( brickId, true ) );
310  }
311  }
312  fullConf->appendConfigKey( chaId.wheelId,
313  chaId.stationId,
314  chaId.sectorId,
315  bkList );
316  }
317  }
318  cond::Time_t snc = dataRun;
319  if ( writeKeys ) m_to_transfer.push_back( std::make_pair( fullConf, snc ) );
320  std::cout << "writing payload : " << sizeof( *fullConf )
321  << " ( " << ( fullConf->end() - fullConf->begin() )
322  << " ) " << std::endl;
323  if ( writeData ) chkConfigList( userBricks );
324 
326  isession.close();
327 
328  return;
329 
330 }
int wheelId
Definition: DTCCBConfig.h:43
void setStamp(int s)
Definition: DTCCBConfig.cc:197
DbTransaction & transaction()
Definition: DbSession.cc:189
void open(const std::string &connectionString, bool readOnly=false)
Definition: DbSession.cc:144
std::vector< DTConfigKey > userConf
int commit()
commit transaction.
DbConnectionConfiguration & configuration()
Definition: DbConnection.cc:89
const_iterator end() const
Definition: DTCCBConfig.cc:345
int sectorId
Definition: DTCCBConfig.h:45
int start(bool readOnly=false)
start transaction
unsigned long long Time_t
Definition: Time.h:16
int stationId
Definition: DTCCBConfig.h:44
DbSession createSession() const
Definition: DbConnection.cc:72
coral::ISchema & nominalSchema()
Definition: DbSession.cc:228
void setAuthenticationPath(const std::string &p)
void chkConfigList(const std::map< int, bool > &userBricks)
list key
Definition: combine.py:13
cond::ValidityInterval lastInterval
Definition: TagInfo.h:11
tuple cout
Definition: gather_cfg.py:121
void setFullKey(const std::vector< DTConfigKey > &)
Definition: DTCCBConfig.cc:192
const_iterator begin() const
Definition: DTCCBConfig.cc:340
int appendConfigKey(int wheelId, int stationId, int sectorId, const std::vector< int > &confKey)
Definition: DTCCBConfig.cc:278
static cond::KeyList * keyList
std::string DTUserKeyedConfigHandler::id ( void  ) const
virtual

Implements popcon::PopConSourceHandler< DTCCBConfig >.

Definition at line 419 of file DTUserKeyedConfigHandler.cc.

References dataTag.

419  {
420  return dataTag;
421 }
bool DTUserKeyedConfigHandler::sameConfigList ( const std::vector< DTConfigKey > &  cfgl,
const std::vector< DTConfigKey > &  cfgr 
)
staticprivate

Definition at line 424 of file DTUserKeyedConfigHandler.cc.

References DTConfigKey::confKey, and DTConfigKey::confType.

426  {
427  if ( cfgl.size() != cfgr.size() ) return false;
428  std::map<int,int> lmap;
429  std::vector<DTConfigKey>::const_iterator lIter = cfgl.begin();
430  std::vector<DTConfigKey>::const_iterator lIend = cfgl.end();
431  while ( lIter != lIend ) {
432  const DTConfigKey& entry = *lIter++;
433  lmap.insert( std::pair<int,int>( entry.confType, entry.confKey ) );
434  }
435  std::map<int,int> rmap;
436  std::vector<DTConfigKey>::const_iterator rIter = cfgr.begin();
437  std::vector<DTConfigKey>::const_iterator rIend = cfgr.end();
438  while ( rIter != rIend ) {
439  const DTConfigKey& entry = *rIter++;
440  rmap.insert( std::pair<int,int>( entry.confType, entry.confKey ) );
441  }
442  std::map<int,int>::const_iterator lmIter = lmap.begin();
443  std::map<int,int>::const_iterator lmIend = lmap.end();
444  std::map<int,int>::const_iterator rmIter = rmap.begin();
445  std::map<int,int>::const_iterator rmIend = rmap.end();
446  while ( ( lmIter != lmIend ) &&
447  ( rmIter != rmIend ) ) {
448  const std::pair<int,int>& lEntry = *lmIter++;
449  const std::pair<int,int>& rEntry = *rmIter++;
450  if ( lEntry.first != rEntry.first ) return false;
451  if ( lEntry.second != rEntry.second ) return false;
452  }
453  return true;
454 }
std::pair< std::string, MonitorElement * > entry
Definition: ME_MAP.h:8
void DTUserKeyedConfigHandler::setList ( cond::KeyList list)
static

Definition at line 467 of file DTUserKeyedConfigHandler.cc.

References keyList, and list().

Referenced by DTUserKeyedConfigPopConAnalyzer::analyze().

467  {
468  keyList = list;
469 }
static cond::KeyList * keyList
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger list("!*","!HLTx*"if it matches 2 triggers or more) will accept the event if all the matching triggers are FAIL.It will reject the event if any of the triggers are PASS or EXCEPTION(this matches the behavior of"!*"before the partial wildcard feature was incorporated).Triggers which are in the READY state are completely ignored.(READY should never be returned since the trigger paths have been run
bool DTUserKeyedConfigHandler::userDiscardedKey ( int  key)
private

Definition at line 457 of file DTUserKeyedConfigHandler.cc.

References DTConfigKey::confKey, and userConf.

Referenced by getNewObjects().

457  {
458  std::vector<DTConfigKey>::const_iterator iter = userConf.begin();
459  std::vector<DTConfigKey>::const_iterator iend = userConf.end();
460  while ( iter != iend ) {
461  const DTConfigKey& entry = *iter++;
462  if ( entry.confKey == key ) return false;
463  }
464  return true;
465 }
std::vector< DTConfigKey > userConf
std::pair< std::string, MonitorElement * > entry
Definition: ME_MAP.h:8
list key
Definition: combine.py:13

Member Data Documentation

std::string DTUserKeyedConfigHandler::brickContainer
private

Definition at line 66 of file DTUserKeyedConfigHandler.h.

Referenced by chkConfigList().

DTCCBConfig* DTUserKeyedConfigHandler::ccbConfig
private

Definition at line 70 of file DTUserKeyedConfigHandler.h.

cond::DbConnection DTUserKeyedConfigHandler::connection
private

Definition at line 72 of file DTUserKeyedConfigHandler.h.

Referenced by getNewObjects().

int DTUserKeyedConfigHandler::dataRun
private

Definition at line 62 of file DTUserKeyedConfigHandler.h.

Referenced by getNewObjects().

std::string DTUserKeyedConfigHandler::dataTag
private

Definition at line 63 of file DTUserKeyedConfigHandler.h.

Referenced by getNewObjects(), and id().

cond::DbSession DTUserKeyedConfigHandler::isession
private

Definition at line 73 of file DTUserKeyedConfigHandler.h.

Referenced by chkConfigList(), and getNewObjects().

cond::KeyList * DTUserKeyedConfigHandler::keyList = 0
staticprivate

Definition at line 79 of file DTUserKeyedConfigHandler.h.

Referenced by chkConfigList(), getNewObjects(), and setList().

std::string DTUserKeyedConfigHandler::onlineAuthentication
private

Definition at line 65 of file DTUserKeyedConfigHandler.h.

Referenced by DTUserKeyedConfigHandler(), and getNewObjects().

std::string DTUserKeyedConfigHandler::onlineConnect
private

Definition at line 64 of file DTUserKeyedConfigHandler.h.

Referenced by getNewObjects().

std::vector<DTConfigKey> DTUserKeyedConfigHandler::userConf
private
bool DTUserKeyedConfigHandler::writeData
private

Definition at line 69 of file DTUserKeyedConfigHandler.h.

Referenced by getNewObjects().

bool DTUserKeyedConfigHandler::writeKeys
private

Definition at line 68 of file DTUserKeyedConfigHandler.h.

Referenced by getNewObjects().