test
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 (const cond::persistency::Session &dbSession, cond::TagInfo_t const &tagInfo, cond::LogDBEntry_t const &logDBEntry)
 
Ref lastPayload () const
 
cond::LogDBEntry_t const & logDBEntry () const
 
std::pair< Container const
*, std::string const > 
operator() (const cond::persistency::Session &session, cond::TagInfo_t const &tagInfo, cond::LogDBEntry_t const &logDBEntry) const
 
 PopConSourceHandler ()
 
Container const & returnData ()
 
void sort ()
 
cond::TagInfo_t const & tagInfo () const
 
std::string const & userTextLog () const
 
virtual ~PopConSourceHandler ()
 

Static Public Member Functions

static void setList (cond::persistency::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::persistency::ConnectionPool connection
 
int dataRun
 
std::string dataTag
 
boost::shared_ptr
< coral::ISessionProxy > 
isession
 
std::string onlineAuthentication
 
int onlineAuthSys
 
std::string onlineConnect
 
std::vector< DTConfigKeyuserConf
 
bool writeData
 
bool writeKeys
 

Static Private Attributes

static cond::persistency::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 17:13:43
Revision:
1.3
Author
Paolo Ronchese INFN Padova

Definition at line 46 of file DTUserKeyedConfigHandler.h.

Constructor & Destructor Documentation

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

Constructor

Definition at line 49 of file DTUserKeyedConfigHandler.cc.

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

49  :
50  dataRun( ps.getParameter<int> ( "run" ) ),
51  dataTag( ps.getParameter<std::string> ( "tag" ) ),
52  onlineConnect( ps.getParameter<std::string> ( "onlineDB" ) ),
54  "onlineAuthentication" ) ),
55  onlineAuthSys( ps.getUntrackedParameter<int>( "onlineAuthSys",1 ) ),
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
boost::shared_ptr< coral::ISessionProxy > isession
tuple cout
Definition: gather_cfg.py:145
cond::persistency::ConnectionPool connection
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 331 of file DTUserKeyedConfigHandler.cc.

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

Referenced by getNewObjects().

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

Operations

Implements popcon::PopConSourceHandler< DTCCBConfig >.

Definition at line 92 of file DTUserKeyedConfigHandler.cc.

References DTCCBConfig::appendConfigKey(), DTCCBConfig::begin(), looper::cfg, chkConfigList(), cond::persistency::ConnectionPool::configure(), DTConfigKey::confKey, DTConfigKey::confType, connection, gather_cfg::cout, cond::persistency::ConnectionPool::createCoralSession(), dataRun, dataTag, DTCCBConfig::end(), isession, relval_steps::key, keyList, plotBeamSpotDB::last, cond::TagInfo_t::lastInterval, popcon::PopConSourceHandler< DTCCBConfig >::lastPayload(), popcon::PopConSourceHandler< DTCCBConfig >::m_to_transfer, onlineAuthentication, onlineAuthSys, onlineConnect, DTCCBId::sectorId, cond::persistency::ConnectionPool::setAuthenticationPath(), cond::persistency::ConnectionPool::setAuthenticationSystem(), DTCCBConfig::setFullKey(), DTCCBConfig::setStamp(), relativeConstraints::station, DTCCBId::stationId, AlCaHLTBitMon_QueryRunRegistry::string, popcon::PopConSourceHandler< DTCCBConfig >::tagInfo(), 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 );
129  std::cout << "create/open DbSession" << std::endl;
131  std::cout << "start transaction" << std::endl;
132  isession->transaction().start( true );
133 
134  // get ccb identifiers map
135  std::cout << "retrieve CCB map" << std::endl;
136  std::map<int,DTCCBId> ccbMap;
137  coral::ITable& ccbMapTable =
138  isession->nominalSchema().tableHandle( "CCBMAP" );
139  std::auto_ptr<coral::IQuery>
140  ccbMapQuery( ccbMapTable.newQuery() );
141  ccbMapQuery->addToOutputList( "CCBID" );
142  ccbMapQuery->addToOutputList( "WHEEL" );
143  ccbMapQuery->addToOutputList( "SECTOR" );
144  ccbMapQuery->addToOutputList( "STATION" );
145  coral::ICursor& ccbMapCursor = ccbMapQuery->execute();
146  while( ccbMapCursor.next() ) {
147  const coral::AttributeList& row = ccbMapCursor.currentRow();
148  int ccb = row["CCBID" ].data<int>();
149  int wheel = row["WHEEL" ].data<int>();
150  int sector = row["SECTOR" ].data<int>();
151  int station = row["STATION"].data<int>();
152  DTCCBId ccbId;
153  ccbId. wheelId = wheel;
154  ccbId.stationId = station;
155  ccbId. sectorId = sector;
156  ccbMap.insert( std::pair<int,DTCCBId>( ccb, ccbId ) );
157  }
158 
159  // get brick types
160  std::cout << "retrieve brick types" << std::endl;
161  std::map<int,int> bktMap;
162  coral::AttributeList emptyBindVariableList;
163  std::auto_ptr<coral::IQuery>
164  brickTypeQuery( isession->nominalSchema().newQuery() );
165  brickTypeQuery->addToTableList( "CFGBRICKS" );
166  brickTypeQuery->addToTableList( "BRKT2CSETT" );
167  std::string bTypeCondition = "CFGBRICKS.BRKTYPE=BRKT2CSETT.BRKTYPE";
168  brickTypeQuery->addToOutputList( "CFGBRICKS.BRKID" );
169  brickTypeQuery->addToOutputList( "BRKT2CSETT.CSETTYPE" );
170  brickTypeQuery->setCondition( bTypeCondition, emptyBindVariableList );
171  coral::ICursor& brickTypeCursor = brickTypeQuery->execute();
172  while( brickTypeCursor.next() ) {
173  const coral::AttributeList& row = brickTypeCursor.currentRow();
174  int id = row["CFGBRICKS.BRKID" ].data<int>();
175  int bt = row["BRKT2CSETT.CSETTYPE"].data<short>();
176 // std::cout << "brick " << id << " type " << bt << std::endl;
177 // @@FIX - TEMPORARY PATCH
178 // if ( bt > 3 ) bt = 3;
179  bktMap.insert( std::pair<int,int>( id, bt ) );
180  }
181 
182  // get ccb config keys
183  std::cout << "retrieve CCB configuration keys" << std::endl;
184  std::map<int,std::map<int,int>*> keyMap;
185  std::map<int,int> cckMap;
186  coral::ITable& ccbRelTable =
187  isession->nominalSchema().tableHandle( "CCBRELATIONS" );
188  std::auto_ptr<coral::IQuery>
189  ccbRelQuery( ccbRelTable.newQuery() );
190  ccbRelQuery->addToOutputList( "CONFKEY" );
191  ccbRelQuery->addToOutputList( "CCBID" );
192  ccbRelQuery->addToOutputList( "CONFCCBKEY" );
193  coral::ICursor& ccbRelCursor = ccbRelQuery->execute();
194  // loop over all full configurations
195  while( ccbRelCursor.next() ) {
196  const coral::AttributeList& row = ccbRelCursor.currentRow();
197  int cfg = row["CONFKEY" ].data<int>();
198  int ccb = row["CCBID" ].data<int>();
199  int key = row["CONFCCBKEY"].data<int>();
200  // check for used configurations
201 // if ( cfgMap.find( cfg ) == cfgMap.end() ) continue;
202  if ( userDiscardedKey( cfg ) ) continue;
203  std::map<int,std::map<int,int>*>::const_iterator keyIter =
204  keyMap.find( cfg );
205  std::map<int,std::map<int,int>*>::const_iterator keyIend =
206  keyMap.end();
207  std::map<int,int>* mapPtr = 0;
208  // check for new full configuration
209  if ( keyIter != keyIend ) mapPtr = keyIter->second;
210  else keyMap.insert(
211  std::pair<int,std::map<int,int>*>( cfg,
212  mapPtr = new std::map<int,int> ) );
213  // store ccb config key
214  std::map<int,int>& mapRef( *mapPtr );
215  mapRef.insert( std::pair<int,int>( ccb, key ) );
216  // check for new ccb config key
217  if ( cckMap.find( key ) == cckMap.end() )
218  cckMap.insert( std::pair<int,int>( key, ccb ) );
219  }
220 
221  // get brick keys
222  std::cout << "retrieve CCB configuration bricks" << std::endl;
223  std::map<int,std::vector<int>*> brkMap;
224  coral::ITable& confBrickTable =
225  isession->nominalSchema().tableHandle( "CFG2BRKREL" );
226  std::auto_ptr<coral::IQuery>
227  confBrickQuery( confBrickTable.newQuery() );
228  confBrickQuery->addToOutputList( "CONFID" );
229  confBrickQuery->addToOutputList( "BRKID" );
230  coral::ICursor& confBrickCursor = confBrickQuery->execute();
231  // loop over all brick keys
232  while( confBrickCursor.next() ) {
233  const coral::AttributeList& row = confBrickCursor.currentRow();
234  int key = row["CONFID"].data<int>();
235  int brk = row["BRKID" ].data<int>();
236  // check for used ccb config key
237  if ( cckMap.find( key ) == cckMap.end() ) continue;
238  std::map<int,std::vector<int>*>::const_iterator brkIter =
239  brkMap.find( key );
240  std::map<int,std::vector<int>*>::const_iterator brkIend =
241  brkMap.end();
242  // check for new ccb config key
243  std::vector<int>* brkPtr = 0;
244  if ( brkIter != brkIend ) brkPtr = brkIter->second;
245  else brkMap.insert(
246  std::pair<int,std::vector<int>*>( key,
247  brkPtr = new std::vector<int> ) );
248  // store brick key
249  brkPtr->push_back( brk );
250  }
251 
252  // set run and full configuration in payload
253  DTCCBConfig* fullConf = new DTCCBConfig( dataTag );
254  fullConf->setStamp( 1 );
255  fullConf->setFullKey( userConf );
256  std::map<int,bool> userBricks;
257  std::map<int,bool>::const_iterator uBrkIter = userBricks.begin();
258  std::map<int,bool>::const_iterator uBrkIend = userBricks.end();
259  std::vector<DTConfigKey>::const_iterator cfgIter = userConf.begin();
260  std::vector<DTConfigKey>::const_iterator cfgIend = userConf.end();
261  while ( cfgIter != cfgIend ) {
262  const DTConfigKey& cfgEntry = *cfgIter++;
263  int cft = cfgEntry.confType;
264  int cfg = cfgEntry.confKey;
265  // retrieve ccb config map
266  std::map<int,std::map<int,int>*>::const_iterator keyIter =
267  keyMap.find( cfg );
268  std::map<int,std::map<int,int>*>::const_iterator keyIend =
269  keyMap.end();
270  std::map<int,int>* mapPtr = 0;
271  if ( keyIter != keyIend ) mapPtr = keyIter->second;
272  if ( mapPtr == 0 ) continue;
273  std::map<int,int>::const_iterator ccbIter = mapPtr->begin();
274  std::map<int,int>::const_iterator ccbIend = mapPtr->end();
275  while ( ccbIter != ccbIend ) {
276  const std::pair<int,int>& ccbEntry = *ccbIter++;
277  // get ccb config key
278  int ccb = ccbEntry.first;
279  int key = ccbEntry.second;
280  // retrieve chamber id
281  std::map<int,DTCCBId>::const_iterator ccbIter = ccbMap.find( ccb );
282  std::map<int,DTCCBId>::const_iterator ccbIend = ccbMap.end();
283  if ( ccbIter == ccbIend ) continue;
284  const DTCCBId& chaId = ccbIter->second;
285  // retrieve brick id list
286  std::map<int,std::vector<int>*>::const_iterator brkIter =
287  brkMap.find( key );
288  std::map<int,std::vector<int>*>::const_iterator brkIend =
289  brkMap.end();
290  if ( brkIter == brkIend ) continue;
291  std::vector<int>* brkPtr = brkIter->second;
292  if ( brkPtr == 0 ) continue;
293  // brick id lists in payload
294  std::vector<int> bkList;
295  bkList.reserve( 20 );
296  std::map<int,int>::const_iterator bktIter = bktMap.begin();
297  std::map<int,int>::const_iterator bktIend = bktMap.end();
298  std::vector<int>::const_iterator bkiIter = brkPtr->begin();
299  std::vector<int>::const_iterator bkiIend = brkPtr->end();
300  while ( bkiIter != bkiIend ) {
301  int brickId = *bkiIter++;
302  bktIter = bktMap.find( brickId );
303  if ( bktIter == bktIend ) continue;
304  if ( bktIter->second == cft ) {
305  bkList.push_back( brickId );
306  uBrkIter = userBricks.find( brickId );
307  if ( uBrkIter == uBrkIend )
308  userBricks.insert( std::pair<int,bool>( brickId, true ) );
309  }
310  }
311  fullConf->appendConfigKey( chaId.wheelId,
312  chaId.stationId,
313  chaId.sectorId,
314  bkList );
315  }
316  }
317  cond::Time_t snc = dataRun;
318  if ( writeKeys ) m_to_transfer.push_back( std::make_pair( fullConf, snc ) );
319  std::cout << "writing payload : " << sizeof( *fullConf )
320  << " ( " << ( fullConf->end() - fullConf->begin() )
321  << " ) " << std::endl;
322  if ( writeData ) chkConfigList( userBricks );
323 
324  isession->transaction().commit();
325 
326  return;
327 
328 }
tuple cfg
Definition: looper.py:293
int wheelId
Definition: DTCCBConfig.h:45
void setStamp(int s)
Definition: DTCCBConfig.cc:174
boost::shared_ptr< coral::ISessionProxy > createCoralSession(const std::string &connectionString, bool writeCapable=false)
std::vector< DTConfigKey > userConf
boost::shared_ptr< coral::ISessionProxy > isession
const_iterator end() const
Definition: DTCCBConfig.cc:291
int sectorId
Definition: DTCCBConfig.h:47
cond::ValidityInterval lastInterval
Definition: Types.h:73
static cond::persistency::KeyList * keyList
unsigned long long Time_t
Definition: Time.h:16
int stationId
Definition: DTCCBConfig.h:46
void setAuthenticationSystem(int authSysCode)
string key
FastSim: produces sample of signal events, overlayed with premixed minbias events.
void chkConfigList(const std::map< int, bool > &userBricks)
tuple cout
Definition: gather_cfg.py:145
void setFullKey(const std::vector< DTConfigKey > &)
Definition: DTCCBConfig.cc:169
cond::persistency::ConnectionPool connection
const_iterator begin() const
Definition: DTCCBConfig.cc:286
void setAuthenticationPath(const std::string &p)
int appendConfigKey(int wheelId, int stationId, int sectorId, const std::vector< int > &confKey)
Definition: DTCCBConfig.cc:238
cond::TagInfo_t const & tagInfo() const
std::string DTUserKeyedConfigHandler::id ( ) const
virtual

Implements popcon::PopConSourceHandler< DTCCBConfig >.

Definition at line 417 of file DTUserKeyedConfigHandler.cc.

References dataTag.

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

Definition at line 422 of file DTUserKeyedConfigHandler.cc.

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

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

Definition at line 465 of file DTUserKeyedConfigHandler.cc.

References keyList, and list().

Referenced by DTUserKeyedConfigPopConAnalyzer::analyze().

465  {
466  keyList = list;
467 }
static cond::persistency::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 455 of file DTUserKeyedConfigHandler.cc.

References DTConfigKey::confKey, mps_splice::entry, and userConf.

Referenced by getNewObjects().

455  {
456  std::vector<DTConfigKey>::const_iterator iter = userConf.begin();
457  std::vector<DTConfigKey>::const_iterator iend = userConf.end();
458  while ( iter != iend ) {
459  const DTConfigKey& entry = *iter++;
460  if ( entry.confKey == key ) return false;
461  }
462  return true;
463 }
std::vector< DTConfigKey > userConf
string key
FastSim: produces sample of signal events, overlayed with premixed minbias events.
list entry
Definition: mps_splice.py:62

Member Data Documentation

std::string DTUserKeyedConfigHandler::brickContainer
private

Definition at line 73 of file DTUserKeyedConfigHandler.h.

Referenced by chkConfigList().

DTCCBConfig* DTUserKeyedConfigHandler::ccbConfig
private

Definition at line 77 of file DTUserKeyedConfigHandler.h.

cond::persistency::ConnectionPool DTUserKeyedConfigHandler::connection
private

Definition at line 79 of file DTUserKeyedConfigHandler.h.

Referenced by getNewObjects().

int DTUserKeyedConfigHandler::dataRun
private

Definition at line 68 of file DTUserKeyedConfigHandler.h.

Referenced by getNewObjects().

std::string DTUserKeyedConfigHandler::dataTag
private

Definition at line 69 of file DTUserKeyedConfigHandler.h.

Referenced by getNewObjects(), and id().

boost::shared_ptr<coral::ISessionProxy> DTUserKeyedConfigHandler::isession
private

Definition at line 80 of file DTUserKeyedConfigHandler.h.

Referenced by chkConfigList(), and getNewObjects().

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

Definition at line 86 of file DTUserKeyedConfigHandler.h.

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

std::string DTUserKeyedConfigHandler::onlineAuthentication
private

Definition at line 71 of file DTUserKeyedConfigHandler.h.

Referenced by DTUserKeyedConfigHandler(), and getNewObjects().

int DTUserKeyedConfigHandler::onlineAuthSys
private

Definition at line 72 of file DTUserKeyedConfigHandler.h.

Referenced by getNewObjects().

std::string DTUserKeyedConfigHandler::onlineConnect
private

Definition at line 70 of file DTUserKeyedConfigHandler.h.

Referenced by getNewObjects().

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

Definition at line 76 of file DTUserKeyedConfigHandler.h.

Referenced by getNewObjects().

bool DTUserKeyedConfigHandler::writeKeys
private

Definition at line 75 of file DTUserKeyedConfigHandler.h.

Referenced by getNewObjects().