CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Member Functions | Private Attributes | Friends
DTLVStatus Class Reference

#include <DTLVStatus.h>

Public Types

typedef std::vector< std::pair< DTLVStatusId, DTLVStatusData > >::const_iterator const_iterator
 Access methods to data. More...
 

Public Member Functions

const_iterator begin () const
 
void clear ()
 reset content More...
 
 DTLVStatus ()
 
 DTLVStatus (const std::string &version)
 
const_iterator end () const
 
int get (int wheelId, int stationId, int sectorId, int &flagCFE, int &flagDFE, int &flagCMC, int &flagDMC) const
 get content More...
 
int get (const DTChamberId &id, int &flagCFE, int &flagDFE, int &flagCMC, int &flagDMC) const
 
void initialize ()
 
int set (int wheelId, int stationId, int sectorId, int flagCFE, int flagDFE, int flagCMC, int flagDMC)
 
int set (const DTChamberId &id, int flagCFE, int flagDFE, int flagCMC, int flagDMC)
 
int setFlagCFE (int wheelId, int stationId, int sectorId, int flag)
 
int setFlagCFE (const DTChamberId &id, int flag)
 
int setFlagCMC (int wheelId, int stationId, int sectorId, int flag)
 
int setFlagCMC (const DTChamberId &id, int flag)
 
int setFlagDFE (int wheelId, int stationId, int sectorId, int flag)
 
int setFlagDFE (const DTChamberId &id, int flag)
 
int setFlagDMC (int wheelId, int stationId, int sectorId, int flag)
 
int setFlagDMC (const DTChamberId &id, int flag)
 
const std::string & version () const
 access version More...
 
std::string & version ()
 
 ~DTLVStatus ()
 

Private Member Functions

 DTLVStatus (DTLVStatus const &)=delete
 
std::string mapName () const
 read and store full content More...
 
DTLVStatusoperator= (DTLVStatus const &)=delete
 
template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 

Private Attributes

std::vector< std::pair< DTLVStatusId, DTLVStatusData > > dataList
 
std::string dataVersion
 
edm::ConstRespectingPtr< DTBufferTree< int, int > > dBuf
 

Friends

class boost::serialization::access
 
template<typename CondSerializationT , typename Enabled >
struct cond::serialization::access
 

Detailed Description

Description: Class to hold CCB status

Author
Paolo Ronchese INFN Padova

Definition at line 71 of file DTLVStatus.h.

Member Typedef Documentation

Access methods to data.

Definition at line 147 of file DTLVStatus.h.

Constructor & Destructor Documentation

DTLVStatus::DTLVStatus ( )

Constructor

Definition at line 33 of file DTLVStatus.cc.

References dataList.

33  :
34  dataVersion( " " ),
36  dataList.reserve( 10 );
37 }
std::string dataVersion
Definition: DTLVStatus.h:158
std::vector< std::pair< DTLVStatusId, DTLVStatusData > > dataList
Definition: DTLVStatus.h:160
edm::ConstRespectingPtr< DTBufferTree< int, int > > dBuf
Definition: DTLVStatus.h:162
DTLVStatus::DTLVStatus ( const std::string &  version)

Definition at line 40 of file DTLVStatus.cc.

References dataList.

40  :
43  dataList.reserve( 10 );
44 }
const std::string & version() const
access version
Definition: DTLVStatus.cc:128
std::string dataVersion
Definition: DTLVStatus.h:158
std::vector< std::pair< DTLVStatusId, DTLVStatusData > > dataList
Definition: DTLVStatus.h:160
edm::ConstRespectingPtr< DTBufferTree< int, int > > dBuf
Definition: DTLVStatus.h:162
DTLVStatus::~DTLVStatus ( )

Destructor

Definition at line 65 of file DTLVStatus.cc.

65  {
66 }
DTLVStatus::DTLVStatus ( DTLVStatus const &  )
privatedelete

Member Function Documentation

DTLVStatus::const_iterator DTLVStatus::begin ( void  ) const

Definition at line 342 of file DTLVStatus.cc.

342  {
343  return dataList.begin();
344 }
std::vector< std::pair< DTLVStatusId, DTLVStatusData > > dataList
Definition: DTLVStatus.h:160
void DTLVStatus::clear ( void  )
DTLVStatus::const_iterator DTLVStatus::end ( void  ) const

Definition at line 347 of file DTLVStatus.cc.

Referenced by Types.LuminosityBlockRange::cppID(), and Types.EventRange::cppID().

347  {
348  return dataList.end();
349 }
std::vector< std::pair< DTLVStatusId, DTLVStatusData > > dataList
Definition: DTLVStatus.h:160
int DTLVStatus::get ( int  wheelId,
int  stationId,
int  sectorId,
int &  flagCFE,
int &  flagDFE,
int &  flagCMC,
int &  flagDMC 
) const

get content

Operations

Definition at line 80 of file DTLVStatus.cc.

References data, DTLVStatusData::flagCFE, DTLVStatusData::flagCMC, DTLVStatusData::flagDFE, DTLVStatusData::flagDMC, and edm::second().

Referenced by Options.Options::__getitem__(), betterConfigParser.BetterConfigParser::__updateDict(), util.rrapi.RRApi::columns(), rrapi.RRApi::columns(), rrapi.RRApi::count(), util.rrapi.RRApi::count(), rrapi.RRApi::data(), util.rrapi.RRApi::data(), betterConfigParser.BetterConfigParser::getCompares(), betterConfigParser.BetterConfigParser::getResultingSection(), rrapi.RRApi::report(), util.rrapi.RRApi::report(), rrapi.RRApi::reports(), util.rrapi.RRApi::reports(), rrapi.RRApi::tables(), util.rrapi.RRApi::tables(), rrapi.RRApi::tags(), util.rrapi.RRApi::tags(), rrapi.RRApi::templates(), util.rrapi.RRApi::templates(), util.rrapi.RRApi::workspaces(), and rrapi.RRApi::workspaces().

86  {
87  flagCFE = 0;
88  flagDFE = 0;
89  flagCMC = 0;
90  flagDMC = 0;
91 
92  std::vector<int> chanKey;
93  chanKey.reserve(3);
94  chanKey.push_back( wheelId );
95  chanKey.push_back( stationId );
96  chanKey.push_back( sectorId );
97  int ientry;
98  int searchStatus = dBuf->find( chanKey.begin(), chanKey.end(), ientry );
99  if ( !searchStatus ) {
100  const DTLVStatusData& data( dataList[ientry].second );
101  flagCFE = data.flagCFE;
102  flagDFE = data.flagDFE;
103  flagCMC = data.flagCMC;
104  flagDMC = data.flagDMC;
105  }
106 
107  return searchStatus;
108 
109 }
std::vector< std::pair< DTLVStatusId, DTLVStatusData > > dataList
Definition: DTLVStatus.h:160
int find(ElementKey fKey, ElementKey lKey, typename DTBufferTreeTrait< Content >::outputTypeOfConstFind &cont) const
U second(std::pair< T, U > const &p)
edm::ConstRespectingPtr< DTBufferTree< int, int > > dBuf
Definition: DTLVStatus.h:162
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
int DTLVStatus::get ( const DTChamberId id,
int &  flagCFE,
int &  flagDFE,
int &  flagCMC,
int &  flagDMC 
) const
void DTLVStatus::initialize ( )

Definition at line 359 of file DTLVStatus.cc.

References officialStyle::chan, and DTLVStatusId::stationId.

359  {
360 
361  dBuf->clear();
362 
363  int entryNum = 0;
364  int entryMax = dataList.size();
365  std::vector<int> chanKey;
366  chanKey.reserve(3);
367  while ( entryNum < entryMax ) {
368 
369  const DTLVStatusId& chan = dataList[entryNum].first;
370 
371  chanKey.clear();
372  chanKey.push_back( chan. wheelId );
373  chanKey.push_back( chan.stationId );
374  chanKey.push_back( chan. sectorId );
375  dBuf->insert( chanKey.begin(), chanKey.end(), entryNum++ );
376 
377  }
378 
379  return;
380 
381 }
std::vector< std::pair< DTLVStatusId, DTLVStatusData > > dataList
Definition: DTLVStatus.h:160
edm::ConstRespectingPtr< DTBufferTree< int, int > > dBuf
Definition: DTLVStatus.h:162
chan
lumi = TPaveText(lowX+0.38, lowY+0.061, lowX+0.45, lowY+0.161, "NDC") lumi.SetBorderSize( 0 ) lumi...
int insert(ElementKey fKey, ElementKey lKey, Content cont)
std::string DTLVStatus::mapName ( ) const
private

read and store full content

Definition at line 352 of file DTLVStatus.cc.

References dataset::name.

352  {
353  std::stringstream name;
354  name << dataVersion << "_map_Mtime" << this;
355  return name.str();
356 }
std::string dataVersion
Definition: DTLVStatus.h:158
DTLVStatus& DTLVStatus::operator= ( DTLVStatus const &  )
privatedelete
template<class Archive >
void DTLVStatus::serialize ( Archive &  ar,
const unsigned int  version 
)
private
int DTLVStatus::set ( int  wheelId,
int  stationId,
int  sectorId,
int  flagCFE,
int  flagDFE,
int  flagCMC,
int  flagDMC 
)

Definition at line 145 of file DTLVStatus.cc.

References data, DTLVStatusData::flagCFE, DTLVStatusData::flagCMC, DTLVStatusData::flagDFE, DTLVStatusData::flagDMC, crabWrapper::key, edm::second(), and DTLVStatusId::stationId.

151  {
152 
153  std::vector<int> chanKey;
154  chanKey.reserve(3);
155  chanKey.push_back( wheelId );
156  chanKey.push_back( stationId );
157  chanKey.push_back( sectorId );
158  int ientry;
159  int searchStatus = dBuf->find( chanKey.begin(), chanKey.end(), ientry );
160 
161  if ( !searchStatus ) {
162  DTLVStatusData& data( dataList[ientry].second );
163  data.flagCFE = flagCFE;
164  data.flagDFE = flagDFE;
165  data.flagCMC = flagCMC;
166  data.flagDMC = flagDMC;
167  return -1;
168  }
169  else {
171  key. wheelId = wheelId;
172  key.stationId = stationId;
173  key. sectorId = sectorId;
175  data.flagCFE = flagCFE;
176  data.flagDFE = flagDFE;
177  data.flagCMC = flagCMC;
178  data.flagDMC = flagDMC;
179  ientry = dataList.size();
180  dataList.push_back( std::pair<DTLVStatusId,
181  DTLVStatusData>( key, data ) );
182  dBuf->insert( chanKey.begin(), chanKey.end(), ientry );
183  return 0;
184  }
185 
186  return 99;
187 
188 }
std::vector< std::pair< DTLVStatusId, DTLVStatusData > > dataList
Definition: DTLVStatus.h:160
int find(ElementKey fKey, ElementKey lKey, typename DTBufferTreeTrait< Content >::outputTypeOfConstFind &cont) const
U second(std::pair< T, U > const &p)
edm::ConstRespectingPtr< DTBufferTree< int, int > > dBuf
Definition: DTLVStatus.h:162
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
int insert(ElementKey fKey, ElementKey lKey, Content cont)
int DTLVStatus::set ( const DTChamberId id,
int  flagCFE,
int  flagDFE,
int  flagCMC,
int  flagDMC 
)

Definition at line 191 of file DTLVStatus.cc.

References DTLVStatusData::flagCFE, DTLVStatusData::flagCMC, DTLVStatusData::flagDFE, and DTLVStatusData::flagDMC.

195  {
196  return set( id.wheel(),
197  id.station(),
198  id.sector(),
199  flagCFE,
200  flagDFE,
201  flagCMC,
202  flagDMC );
203 }
int DTLVStatus::setFlagCFE ( int  wheelId,
int  stationId,
int  sectorId,
int  flag 
)

Definition at line 206 of file DTLVStatus.cc.

References RemoveAddSevLevel::flag, DTLVStatusData::flagCFE, DTLVStatusData::flagCMC, DTLVStatusData::flagDFE, and DTLVStatusData::flagDMC.

209  {
210  int flagCFE;
211  int flagDFE;
212  int flagCMC;
213  int flagDMC;
214  get( wheelId,
215  stationId,
216  sectorId,
217  flagCFE,
218  flagDFE,
219  flagCMC,
220  flagDMC );
221  return set( wheelId,
222  stationId,
223  sectorId,
224  flag,
225  flagDFE,
226  flagCMC,
227  flagDMC );
228 }
int DTLVStatus::setFlagCFE ( const DTChamberId id,
int  flag 
)

Definition at line 231 of file DTLVStatus.cc.

References relativeConstraints::station, and makeMuonMisalignmentScenario::wheel.

232  {
233  return setFlagCFE( id.wheel(),
234  id.station(),
235  id.sector(),
236  flag );
237 }
int setFlagCFE(int wheelId, int stationId, int sectorId, int flag)
Definition: DTLVStatus.cc:206
int DTLVStatus::setFlagCMC ( int  wheelId,
int  stationId,
int  sectorId,
int  flag 
)

Definition at line 274 of file DTLVStatus.cc.

References RemoveAddSevLevel::flag, DTLVStatusData::flagCFE, DTLVStatusData::flagCMC, DTLVStatusData::flagDFE, and DTLVStatusData::flagDMC.

277  {
278  int flagCFE;
279  int flagDFE;
280  int flagCMC;
281  int flagDMC;
282  get( wheelId,
283  stationId,
284  sectorId,
285  flagCFE,
286  flagDFE,
287  flagCMC,
288  flagDMC );
289  return set( wheelId,
290  stationId,
291  sectorId,
292  flagCFE,
293  flagDFE,
294  flag,
295  flagDMC );
296 }
int DTLVStatus::setFlagCMC ( const DTChamberId id,
int  flag 
)

Definition at line 299 of file DTLVStatus.cc.

References relativeConstraints::station, and makeMuonMisalignmentScenario::wheel.

300  {
301  return setFlagCMC( id.wheel(),
302  id.station(),
303  id.sector(),
304  flag );
305 }
int setFlagCMC(int wheelId, int stationId, int sectorId, int flag)
Definition: DTLVStatus.cc:274
int DTLVStatus::setFlagDFE ( int  wheelId,
int  stationId,
int  sectorId,
int  flag 
)

Definition at line 240 of file DTLVStatus.cc.

References RemoveAddSevLevel::flag, DTLVStatusData::flagCFE, DTLVStatusData::flagCMC, DTLVStatusData::flagDFE, and DTLVStatusData::flagDMC.

243  {
244  int flagCFE;
245  int flagDFE;
246  int flagCMC;
247  int flagDMC;
248  get( wheelId,
249  stationId,
250  sectorId,
251  flagCFE,
252  flagDFE,
253  flagCMC,
254  flagDMC );
255  return set( wheelId,
256  stationId,
257  sectorId,
258  flagCFE,
259  flag,
260  flagCMC,
261  flagDMC );
262 }
int DTLVStatus::setFlagDFE ( const DTChamberId id,
int  flag 
)

Definition at line 265 of file DTLVStatus.cc.

References relativeConstraints::station, and makeMuonMisalignmentScenario::wheel.

266  {
267  return setFlagDFE( id.wheel(),
268  id.station(),
269  id.sector(),
270  flag );
271 }
int setFlagDFE(int wheelId, int stationId, int sectorId, int flag)
Definition: DTLVStatus.cc:240
int DTLVStatus::setFlagDMC ( int  wheelId,
int  stationId,
int  sectorId,
int  flag 
)

Definition at line 308 of file DTLVStatus.cc.

References RemoveAddSevLevel::flag, DTLVStatusData::flagCFE, DTLVStatusData::flagCMC, DTLVStatusData::flagDFE, and DTLVStatusData::flagDMC.

311  {
312  int flagCFE;
313  int flagDFE;
314  int flagCMC;
315  int flagDMC;
316  get( wheelId,
317  stationId,
318  sectorId,
319  flagCFE,
320  flagDFE,
321  flagCMC,
322  flagDMC );
323  return set( wheelId,
324  stationId,
325  sectorId,
326  flagCFE,
327  flagDFE,
328  flagCMC,
329  flag );
330 }
int DTLVStatus::setFlagDMC ( const DTChamberId id,
int  flag 
)

Definition at line 333 of file DTLVStatus.cc.

References relativeConstraints::station, and makeMuonMisalignmentScenario::wheel.

334  {
335  return setFlagDMC( id.wheel(),
336  id.station(),
337  id.sector(),
338  flag );
339 }
int setFlagDMC(int wheelId, int stationId, int sectorId, int flag)
Definition: DTLVStatus.cc:308
const std::string & DTLVStatus::version ( ) const

access version

Definition at line 128 of file DTLVStatus.cc.

Referenced by validation.Sample::datasetpattern(), and validation.Sample::filename().

128  {
129  return dataVersion;
130 }
std::string dataVersion
Definition: DTLVStatus.h:158
std::string & DTLVStatus::version ( )

Definition at line 133 of file DTLVStatus.cc.

Referenced by validation.Sample::datasetpattern(), and validation.Sample::filename().

133  {
134  return dataVersion;
135 }
std::string dataVersion
Definition: DTLVStatus.h:158

Friends And Related Function Documentation

friend class boost::serialization::access
friend

Definition at line 168 of file DTLVStatus.h.

template<typename CondSerializationT , typename Enabled >
friend struct cond::serialization::access
friend

Definition at line 168 of file DTLVStatus.h.

Member Data Documentation

std::vector< std::pair<DTLVStatusId,DTLVStatusData> > DTLVStatus::dataList
private

Definition at line 160 of file DTLVStatus.h.

Referenced by DTLVStatus().

std::string DTLVStatus::dataVersion
private

Definition at line 158 of file DTLVStatus.h.

edm::ConstRespectingPtr<DTBufferTree<int,int> > DTLVStatus::dBuf
private

Definition at line 162 of file DTLVStatus.h.