CMS 3D CMS Logo

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 () override
 
std::string id () const override
 
 ~DTUserKeyedConfigHandler () override
 
- 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
 
std::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< Triplet > Container
 
typedef std::vector< std::pair< DTCCBConfig *, cond::Time_t > > OldContainer
 
typedef PopConSourceHandler< DTCCBConfigself
 
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)
 
cond::persistency::SessiondbSession () const
 
- 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 47 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, SimDataFormats::CaloAnalysis::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  onlineAuthSys( ps.getUntrackedParameter<int>( "onlineAuthSys",1 ) ),
57  brickContainer( ps.getParameter<std::string> ( "container" ) ),
58  writeKeys( ps.getParameter<bool> ( "writeKeys" ) ),
59  writeData( ps.getParameter<bool> ( "writeData" ) ),
60  connection(),
61  isession() {
62  std::cout << " PopCon application for DT configuration export "
63  << onlineAuthentication << std::endl;
64 
65  std::vector<edm::ParameterSet> dtConfigKeys (
66  ps.getParameter< std::vector<edm::ParameterSet> >( "DTConfigKeys" )
67  );
68  std::vector<edm::ParameterSet>::const_iterator iter = dtConfigKeys.begin();
69  std::vector<edm::ParameterSet>::const_iterator iend = dtConfigKeys.end();
70  while ( iter != iend ) {
71  const edm::ParameterSet& cp = *iter++;
72  int configType = cp.getUntrackedParameter<int>( "configType" );
73  int configKey = cp.getUntrackedParameter<int>( "configKey" );
74  std::cout << "config: "
75  << configType << " -> "
76  << configKey << std::endl;
77  DTConfigKey userKey;
78  userKey.confType = configType;
79  userKey.confKey = configKey;
80  userConf.push_back( userKey );
81  }
82 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
std::vector< DTConfigKey > userConf
std::shared_ptr< coral::ISessionProxy > isession
cond::persistency::ConnectionPool connection
DTUserKeyedConfigHandler::~DTUserKeyedConfigHandler ( )
override

Destructor

Definition at line 87 of file DTUserKeyedConfigHandler.cc.

87  {
88 }

Member Function Documentation

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

Definition at line 332 of file DTUserKeyedConfigHandler.cc.

References DTKeyedConfig::add(), brickContainer, gather_cfg::cout, MillePedeFileConverter_cfg::e, cppFunctionSkipper::exception, cond::persistency::KeyList::get(), isession, gen::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().

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

Operations

Implements popcon::PopConSourceHandler< DTCCBConfig >.

Definition at line 93 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, crabWrapper::key, keyList, plotBeamSpotDB::last, cond::TagInfo_t::lastInterval, popcon::PopConSourceHandler< DTCCBConfig >::lastPayload(), popcon::PopConSourceHandler< DTCCBConfig >::m_to_transfer, onlineAuthentication, onlineAuthSys, onlineConnect, jets_cff::payload, 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(), makeMuonMisalignmentScenario::wheel, DTCCBId::wheelId, writeData, and writeKeys.

93  {
94 
95  //to access the information on the tag inside the offline database:
96  cond::TagInfo const & ti = tagInfo();
97  unsigned int last = ti.lastInterval.first;
98  std::cout << "last configuration key already copied for run: "
99  << last << std::endl;
100 
101  std::vector<DTConfigKey> lastKey;
102 // std::cout << "check for last " << std::endl;
103  if ( last == 0 ) {
104  DTCCBConfig* dummyConf = new DTCCBConfig( dataTag );
105  dummyConf->setStamp( 0 );
106  dummyConf->setFullKey( lastKey );
107  cond::Time_t snc = 1;
108  if ( writeKeys && ( dataRun > 1 ) )
109  m_to_transfer.push_back( std::make_pair( dummyConf, snc ) );
110  }
111  else {
112  std::cout << "get last payload" << std::endl;
113  Ref payload = lastPayload();
114  std::cout << "get last full key" << std::endl;
115  lastKey = payload->fullKey();
116  std::cout << "last key: " << std::endl;
117  std::vector<DTConfigKey>::const_iterator keyIter = lastKey.begin();
118  std::vector<DTConfigKey>::const_iterator keyIend = lastKey.end();
119  while ( keyIter != keyIend ) {
120  const DTConfigKey& keyList = *keyIter++;
121  std::cout << keyList.confType << " : " << keyList.confKey << std::endl;
122  }
123  }
124 
125  std::cout << "configure DbConnection" << std::endl;
126  // conn->configure( cond::CmsDefaults );
130  std::cout << "create/open DbSession" << std::endl;
132  std::cout << "start transaction" << std::endl;
133  isession->transaction().start( true );
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 = nullptr;
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 = nullptr;
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 = nullptr;
272  if ( keyIter != keyIend ) mapPtr = keyIter->second;
273  if ( mapPtr == nullptr ) 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 == nullptr ) 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 
325  isession->transaction().commit();
326 
327  return;
328 
329 }
int wheelId
Definition: DTCCBConfig.h:45
void setStamp(int s)
Definition: DTCCBConfig.cc:174
std::vector< DTConfigKey > userConf
const_iterator end() const
Definition: DTCCBConfig.cc:291
int sectorId
Definition: DTCCBConfig.h:47
cond::ValidityInterval lastInterval
Definition: Types.h:75
static cond::persistency::KeyList * keyList
unsigned long long Time_t
Definition: Time.h:16
int stationId
Definition: DTCCBConfig.h:46
void setAuthenticationSystem(int authSysCode)
void chkConfigList(const std::map< int, bool > &userBricks)
std::shared_ptr< coral::ISessionProxy > isession
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)
std::shared_ptr< coral::ISessionProxy > createCoralSession(const std::string &connectionString, bool writeCapable=false)
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
overridevirtual

Implements popcon::PopConSourceHandler< DTCCBConfig >.

Definition at line 418 of file DTUserKeyedConfigHandler.cc.

References dataTag.

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

Definition at line 423 of file DTUserKeyedConfigHandler.cc.

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

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

Definition at line 466 of file DTUserKeyedConfigHandler.cc.

References keyList, and list().

Referenced by DTUserKeyedConfigPopConAnalyzer::analyze().

466  {
467  keyList = list;
468 }
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 456 of file DTUserKeyedConfigHandler.cc.

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

Referenced by getNewObjects().

456  {
457  std::vector<DTConfigKey>::const_iterator iter = userConf.begin();
458  std::vector<DTConfigKey>::const_iterator iend = userConf.end();
459  while ( iter != iend ) {
460  const DTConfigKey& entry = *iter++;
461  if ( entry.confKey == key ) return false;
462  }
463  return true;
464 }
std::vector< DTConfigKey > userConf

Member Data Documentation

std::string DTUserKeyedConfigHandler::brickContainer
private

Definition at line 74 of file DTUserKeyedConfigHandler.h.

Referenced by chkConfigList().

DTCCBConfig* DTUserKeyedConfigHandler::ccbConfig
private

Definition at line 78 of file DTUserKeyedConfigHandler.h.

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

Definition at line 80 of file DTUserKeyedConfigHandler.h.

Referenced by getNewObjects().

int DTUserKeyedConfigHandler::dataRun
private

Definition at line 69 of file DTUserKeyedConfigHandler.h.

Referenced by getNewObjects().

std::string DTUserKeyedConfigHandler::dataTag
private

Definition at line 70 of file DTUserKeyedConfigHandler.h.

Referenced by getNewObjects(), and id().

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

Definition at line 81 of file DTUserKeyedConfigHandler.h.

Referenced by chkConfigList(), and getNewObjects().

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

Definition at line 87 of file DTUserKeyedConfigHandler.h.

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

std::string DTUserKeyedConfigHandler::onlineAuthentication
private

Definition at line 72 of file DTUserKeyedConfigHandler.h.

Referenced by DTUserKeyedConfigHandler(), and getNewObjects().

int DTUserKeyedConfigHandler::onlineAuthSys
private

Definition at line 73 of file DTUserKeyedConfigHandler.h.

Referenced by getNewObjects().

std::string DTUserKeyedConfigHandler::onlineConnect
private

Definition at line 71 of file DTUserKeyedConfigHandler.h.

Referenced by getNewObjects().

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

Definition at line 77 of file DTUserKeyedConfigHandler.h.

Referenced by getNewObjects().

bool DTUserKeyedConfigHandler::writeKeys
private

Definition at line 76 of file DTUserKeyedConfigHandler.h.

Referenced by getNewObjects().